50,740 reputation
9139222
bio website tech.turbu-rpg.com
location Seattle, WA
age 32
visits member for 4 years, 6 months
seen 1 hour ago
A lifelong programmer who's been coding in Delphi since its initial release and currently makes a living at it.

Feb
26
comment OCaml criticism: is it still valid?
@Doval: Of course you can detect overflow in hardware. Dealing with it, however, is a software matter.
Feb
26
awarded  Great Answer
Feb
25
comment When NOT to apply Dependency Inversion?
What if "your problem" is a hole in the wall? A saw would not remove it; it would make it worse. ;)
Feb
25
comment Dealing with state problems in functional programming
There's a simpler solution: when you come to a problem that's not easily modeled with FP techniques, don't use functional programming to solve it. Right tool for the job and all that...
Feb
25
answered Is there a name for a dictionary that returns the key as the value by default?
Feb
24
awarded  Guru
Feb
24
awarded  Nice Answer
Feb
24
comment What about LISP, if anything, makes it easier to implement macro systems?
@coredump: Turns out I was mistaken. Boo macros can actually be declared with a formal argument list; it's just that this is an optional (and unfortunately not very well-documented) feature.
Feb
24
awarded  Enlightened
Feb
24
awarded  Good Answer
Feb
24
awarded  Nice Answer
Feb
24
answered Is it premature optimization to add database indices?
Feb
24
comment Enemy AI for classic game Bubble Bobble
@Dbugger: If the map was just a grid of squares, from which each character can move in the four cardinal directions (and maybe diagonally?), Pac-Man style, this could be trivially modeled as a graph in which each square is a node and each open connection between two squares is an edge. Of course, if the world model contains gravity, then not all movement directions are equal, so that makes the calculations a bit more complicated. Try Googling "pathfinding for platformers" for some helpful research in this area.
Feb
23
answered Enemy AI for classic game Bubble Bobble
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
@RainerJoswig: I'm not ignoring all that; it's my basic thesis. Lisp's syntax is stuck in the 1960s and it's carrying all that baggage around with it even to modern times, whereas newer languages are able to much more easily take advantage of research in compiler engineering and language design, and do the same interesting things that Lisp is capable of without being burdened with stuff like homoiconicity.
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
@zwol: As I understand it--and I could be way off, so please tell me if this isn't right--but isn't that a "whole program optimization" system that compiles everything once, generates statistical data about the project, and then runs the entire compile a second time using the data to guide its optimization efforts? That obviously would require twice as much time.
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
@Doval: What you're missing is that once you have a tree--particularly an object-oriented tree with nodes of different semantic types being represented by distinct classes--searching through it for various patterns can be very fast by simply applying the Visitor Pattern, especially if the visitor for a certain optimization can recognize that a particular node is irrelevant and "prune" the tree search by not visiting its subnodes at all. For example, in the Boo compiler there are 61 "pipeline steps" (also known as "passes"). Parsing takes longer than the other 60 put together.
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
@coredump: The system you describe is how Boo's "meta methods" work. It's a more simplified metaprocessing system, and you can write a meta method with a well-defined signature like you're asking for, but it gives up a lot of the flexibility that comes with full macros. Different tools for different tasks, basically.
Feb
23
awarded  Nice Answer
Feb
23
comment What about LISP, if anything, makes it easier to implement macro systems?
@greenoldman: Pattern matching in Boo. It's implemented by a macro, as you suspected. It's possible to create some very different syntax using macros, such as a "parser generator" that is actually a parser, because macros have direct access to the AST and can rewrite it in arbitrary ways. Inside a macro body, the parser's rules on what is allowed is relaxed in some ways, so you can enter all sorts of stuff and sort it out in the macro code.