Inspiration
I found Dan McCracken's Fortran book in the trash room of my lab and wanted to try implementing it. That wound up being too complicated, so I set my sights on something more reasonable.
What it does
Implements a subset of Scheme with some artistic license.
How I built it
I wrote a tokenizer, parser, and stack based interpreter in C, developed a set of example programs based on Project Euler, and created documentation.
Challenges I ran into
Learning to use gdb effectively, creating efficient hashing functions, managing memory usage
Accomplishments that I'm proud of
I did my own memory allocator with sbrk to optimize for smaller systems, implemented dynamic typing with minimal-ish overhead, and got the interpreter to a state where it usually doesn't segfault on correct programs and sometimes correctly reports errors on incorrect programs without segfaulting. I also implemented a REPL shell, and managed to get a "Stack smashing detected" error once which is pretty neat.
What I learned
"Lisp is Syntactically Pure" - Peter Norvig (Peter@Norvig.com)
What's next for mlisp
I plan on implementing more standard Lisp features like cons, car, cdr, and floats. I also plan on implementing a more efficient AST data structure, adding x86 Assembly output, and creating an Arduino port
Log in or sign up for Devpost to join the conversation.