This blog chronicles my study of FSharp by means of implementing a simple programming language PUSH 3. The language was invented at Hampshire College for experiments in genetic programming. It is described in detail http://hampshire.edu/lspector/push3-description.html as well as in a number of books and papers by Lee Spector (http://hampshire.edu/lspector/).
In the spirit of a talmudic saying: “Grabbed too much – grabbed nothing”, I have stopped short of to implementing a full-blown genetic programming system that actually evolves PUSH programs trying to solve different symbolic regression problems. After all, I am sure folks at Hampshire College have spent years researching it.
While writing this implementation, the full source of which can be found on GitHUB https://github.com/fierval/Push3F/zipball/release I have also tried to observe my own process: making design decisions, following well known methodologies (like TDD) in a completely “clean” environment where I could not blame any mistakes I make or duct-tape kind of shortcuts I take on pressures of a production environment. This experience was also quite instructive, however, harder to document than simple language exploration.
Tools and resources used:
- GitHUB to host the code: https://github.com/fierval/Push3F
- Binaries required to build the interpreter (FParsec, FSharp PowerPack): https://github.com/downloads/fierval/Push3F/pushrefs.zip
- RedGate Reflector (http://www.reflector.net/)
- FParsec (http://www.quanttec.com/fparsec/)
- FSharp PowerPack (http://fsharppowerpack.codeplex.com/).
- Don Syme’s blog (http://blogs.msdn.com/b/dsyme/)
- Tomas Petricek’s blog (http://tomasp.net/),