52,261 reputation
10146229
bio website tech.turbu-rpg.com
location Seattle, WA
age 32
visits member for 4 years, 7 months
seen 37 mins ago
A lifelong programmer who's been coding in Delphi since its initial release and currently makes a living at it.

Apr
24
comment Which mathematical properties apply to XOR Swap algorithm (and similar bitwise operator algorithms)?
@David: It does on early CPU architectures. An XOR looks at each bit position independently of any other bits, whereas + and - require carry operations where the result of an operation on one bit can affect the operation on neighboring bits. This means it's a more complicated operation to implement, and it used to take multiple cycles before Moore's Law made it cheap to implement the complicated transistor logic needed to do addition in a single CPU cycle. Look up the history of the Binary Adder for the details.
Apr
24
comment Open Source Licensing and Intellectual Property Rights
@gnasher729: But then it would not be an open-source license as recognized by the OSI, or a free software license as recognized by the FSF. (Which are basically the same thing, once you factor out the different ideological slants.)
Apr
23
comment Passing context around AST nodes
@vinnylinux: Then each object is larger, in the amount of the size of one pointer. As I said, it's one of the classic tradeoffs. There's no one "the right answer" to this; it depends on factors such as how many AST objects you're creating, how deep the parse tree will go, and how frequently you're going to access the global context.
Apr
23
comment Open Source Licensing and Intellectual Property Rights
@Snowman: Doesn't the Interbase/Firebird example I gave demonstrate exactly that point? I meant for it to. The open-source community even had to stop calling it "InterBase," but Borland couldn't keep them from continuing to develop it under a new name.
Apr
23
answered Passing context around AST nodes
Apr
23
answered Open Source Licensing and Intellectual Property Rights
Apr
23
comment Relationship between .NET for Linux and Mono
Considering how many parts of .NET are either not supported at all on Mono or just don't work very well, let's hope that it will! (Or, alternatively, that the Mono guys are able to take useful stuff from Microsoft's project and incorporate it into their own product to improve upon it. That's a big part of the theory of how open-source is supposed to work, afterall...)
Apr
23
comment Is String processing more complex than number processing in programming languages?
It is a built-in primitive type in Pascal. string is actually specified as a language keyword.
Apr
23
comment Why have many programmers moved to using exception handling for input or output?
Survival of the fittest. Exceptions work better than the alternative.
Apr
22
awarded  Good Question
Apr
22
comment Any library or dll to use to give a free lancers project from clients who accept your work but not pay
@PieterB: As I pointed out in the linked answer, there is no such thing as "waterproof enough" in the age of the Internet, period. It really is that simple.
Apr
22
answered Any library or dll to use to give a free lancers project from clients who accept your work but not pay
Apr
21
comment Does using a database server make sense if the application only does things locally?
@DocBrown: Firebird's embedded database provides full SQL support, including referential integrity, ACID guarantees, stored procs and triggers. It didn't used to support multiple concurrent connections to an embedded database, and I'm not sure if that limitation is still in place or not, but the entire SQL feature set is there.
Apr
21
comment In C++ why and how are virtual functions slower?
The virtual method doesn't take longer to execute. It does, however, take (slightly) longer to call. But once the virtual dispatch has been taken care of, the code of the method executes exactly as fast as any other method.
Apr
18
comment What about LISP, if anything, makes it easier to implement macro systems?
ReferenceExpression refers to a single identifier, like the name of a variable or class. There are other node types for control structures, but in Lisp, the control structures aren't defined at the language level, so your visitor would have to have all sorts of special cases to look at every node and figure out whether it's a control structure, a method invocation, an identifier, a macro, etc etc. With a strongly-typed, object-oriented AST you get all that for free.
Apr
18
comment What about LISP, if anything, makes it easier to implement macro systems?
@ThrowawayAccount3Million: On the contrary, that tutorial illustrates the simplicity of the system, showing how you can use the Visitor Pattern to make a macro in a simple way. You don't "need to know every class and how they fit together"; just the specific types you're dealing with. The visitor defined in the example only needs to know about one AST node type: ReferenceExpression; the class it inherits from takes care of all the rest of the logic of walking the AST. (more)
Apr
18
revised What about LISP, if anything, makes it easier to implement macro systems?
Improving the macro example
Apr
17
awarded  Nice Question
Apr
16
comment Why was the Itanium processor difficult to write a compiler for?
@supercat: I'm not talking about a hypothetical VM, but about a hypothetical IR that would be compiled the rest of the way by an Intel code generator.
Apr
16
asked Why was the Itanium processor difficult to write a compiler for?