= Day 1 == AST Going to try learn some Forth, to see how the AST should look. Googling for `forth tutorial`. Reading http://home.tampabay.rr.com/jforth/C04_Tutorial_Beginning.html == Parsec AST defined, going to try to parse forth into it Parser done! = Day 2 == Revisions === docs/01.kwid Gave more background, more context === docs/02.kwid complete def of AST, discussion of type constructors, pattern matching, and type classes. === docs/03.kwid Cover full parser source try to explain monadic bind better == Evaluator Read up on IORef Evaluator finished = Day 4 lightstep: the mode is part of Interp, presumably. switching from (Interp -> IO (a, Interp)) to (StateT Interp IO a) makes the code somewhat nicer == docs/05.kwid Today we try to do user words, and add some builtins = Day 5 Yesterday autrijus fried my brain with the Reader monad. While I was trying to recover the bastard sent me a patch, redoing the evaluator with a new monad, `Eval`, based on `ReaderT` and `IO. I'll try to explain it. If I don't come back, you know who did this to me. = Day 6 I think I'm finally grokking the Reader monad. Thanks to Autrijus, Ingo, and `ski` on #haskell == docs/06.kwid This chapter is written, ignoring `IO` at first, and explaining `Reader`. = Screw the days, I have no idea what day it is. = 7th Step == docs/07.kwid Looking at what a Forth machine really is on the insides. http://www.complang.tuwien.ac.at/forth/threaded-code.html http://www.ultratechnology.com/meta.html http://home.arcor.de/a.s.kochenburger/minforth.html = Step 8 Planning on constructing a continuation oriented representation of forth for evaluation. Calls contain the whole AST to call. Branches contain the whole AST to continue into. Have to learn about continuations in haskell, maybe use CPS or tail calls, but real continuations are cooler and I should learn about them. == docs/08.kwid Finished! New stateful evaluation, CPS everywhere (maybe ContT later). we also have the `SEE` word, but no branching. I suspect there's a really bad bug in the way branches and calls are handled, and that a branch inside a call will cause the caller to not execute properly. When `IF` is implemented this will be tested and resolved.