Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been working on the design of a fairly complicated system using the daffy robots to iterate over a bunch of different ideas. Trying things out (conceptually) to explore the pros and cons of each decision before even writing a single line of code. The code is really a formality at this point as each and every piece is laid out and documented.

Contrast this with the peg parser VM it basically one-shotted but needed a bunch of debug work. A fuzzy spec (basically just the lpeg paper) and a few iterations and it produced a fully tested VM. After that the AST -> Opcode compiler was super easy as it just had to do some simple (fully defined by this point) transforms and Bob's your uncle. Not the best code ever but a working and tested system.

Then my predilection for yak shaving took over as the AST needed to be rewritten to make integration as a python C extension module viable (and generated). And why have separate AST and opcode optimization passes when they can be integrated? Oh, and why even have opcodes in the first place when you can rewrite the VM to use Continuation Passing Style and make the entire machine AST-> CPS Transform -> Optimizer -> Execute with a minimum of fuss?

So, yeah, I think it's fair to say the daffy robots are a little more than a StackOverflow chatbot. Plus, what I'm really working on is a lot more complicated than this, needing to redo the AST was just the gateway drug.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: