url: http://code.google.com/p/paren/
I don't know if this is legal because I've copied some error messages from arc. I decided to learn lisp after stumbling reading about Blub, and mentions of it by lecturers. After
the horrible SLIME and tedius 1.5 chapters in the SICP scheme book, I've figured I could make the learning more interesting implementing lisp myself. (I'm still haven't even mastered vim yet) One thing I immediately dislike about lisp (like most others I suppose) was the insane number of parens I had to type. I tolerated the parens around the + - / * operators but the ones around var/cond lists in let and cond was just too much. I poked around the internets and found Arc. It's probably not merely a coincidence that one of its authors is the one who wrote about Blub, and seeing that it has less parens than the other two lisps, I decided I'll write an interpreter for this one as it answered my earlier concerns well. I know lua very well, so naturally it is written in lua. It can only read in the first 3 macro definitions in arc.arc and call only the first one properly. (`do`). To make it work the next step is to implement disp, sref and sig. (I've no clue what the last two are, probably why I am stopping). I don't think I'll continue it because I feel there isn't point (for me) to do more than just the base primitives, compared to the time it will take me. Implemented tokens: . ' ` , ,@ + - * / t nil car cdr cons fn if eval len type assign annotate type rep is bound Macros are also implemented, but not `mac`. A function tagged 'mac is a macro, as in arc.
It only has an repl and can't read file but that should be easy to fix. It also keeps on trying to evaluate an expression even after an error is detected so it might crash if there is an error in the input code. I'm posting it so the next time someone, if any, wants to write a lua interpreter for arc they could find bits of the code useful. Personally I doubt it, but it feels better than just leaving it forgotten on my hard disk. I look forward to when arc becomes big enough that I'll use it, but before then I'll continue to program in lua as my hobby. My turn to a comment on lisp.
Let Blub, y = lisp, tables
"How can you get anything done in Blub? It doesn't even have y." Lua tables are meta-syntactically pumped up and optimized hash tables that can make every data structure possible. It implements arc's tagging in a dozen lines (maybe because lua already has it ;)) I was disappointed when I found out lisp lacks it. P.S It's annoying that arc's t is reserved, I use t a lot as a temporary variable in other programming languages. edit: I forgot to mention lualisp http://code.google.com/p/lualisp/ I learnt how to write an interpreter from reading its source code. That said, it think its lua is quite hastily written because alot of its functions overlap in, well, functionality. |