Original Post
ApochPiQ suggested in a thread on practicing recursion writing a simple Lisp dialect interpreter. I took that suggestion. With an almost shockingly small amount of Python code, I have a working Lisp interpreter. So far, I've avoided the harder parts - call/cc and macros, specifically. It's now reasonably functional, and I've had fun implementing some neat stuff, like the streams system from SICP.
I'm at a cross roads now with no obvious, essential next feature to implement. My current feeling with the project so-far is that while it's been neat, almost everything I've done has had a 1-to-1 mapping onto features of Python; closures, garbage collection, dynamic typing, etc. It's less like I'm implementing Lisp and more like I'm leaching Python's features into Lisps syntax. Here's what I'm thinking my options for the next step are:
1). Macros. This requires me learning, say, Scheme's macros, which wouldn't be a bad thing either. This sounds like an ambitious project, though.
2). call-with-current-continuation. I've thought a little about this, and have yet to come up with a reasonable way to achieve it, which I guess makes it a challenge.
3). Reimplementing it all. Writing it in another language would force me to "truly" implement the features of Lisp without just using those same features in another language. C++ wouldn't be bad, but the lack of a garbage collector makes the project into something quite large, and I'm not particularly interested in writing a GC. C# would be another option, but, again, it has most of the features of Lisp already (dynamic typing, however, would be gone). I've considered Haskell, too. I've put some time into learning Haskell, but have hardly written more than factorial programs in it, so this might give me something to expand into.
4). Modify to not use Python's obviously corresponding features. Though something feels wrong about simply overlooking a language feature just to be "more hardcore". I guess it's not far from just writing it in a lower-level language like C++. This just doesn't seem too exciting.
5). Lisp compiler to the .NET CIL? I've never done anything like this before (I hadn't done anything like writing an interpreter before, either!). Would this be a phenomenal amount of work? I assume it still would let me leach the .NET garbage collector, which I consider a good thing.
6). Going through "Lisp in Small Pieces" and doing it's projects. I guess I'd rather figure this all out on my own or through referring to language specification. (I've been using Scheme's R5RS. Any other suggestions?)
What do you all think a good next project would be? Am I overestimating the difficultly of a domain-specific GC implementation? I'm interested in investing several weeks to a couple months to get something fairly concrete. I've really enjoyed the interpreter project thus-far and want to continue. I'm not interested in making this a truly useful language or project; there's already more than enough Lisp dialects out there. So speed concerns, library support, and all those actually useful things can be essentially ignored.
And my thanks to ApochPiQ for the original suggestion!
I'm at a cross roads now with no obvious, essential next feature to implement. My current feeling with the project so-far is that while it's been neat, almost everything I've done has had a 1-to-1 mapping onto features of Python; closures, garbage collection, dynamic typing, etc. It's less like I'm implementing Lisp and more like I'm leaching Python's features into Lisps syntax. Here's what I'm thinking my options for the next step are:
1). Macros. This requires me learning, say, Scheme's macros, which wouldn't be a bad thing either. This sounds like an ambitious project, though.
2). call-with-current-continuation. I've thought a little about this, and have yet to come up with a reasonable way to achieve it, which I guess makes it a challenge.
3). Reimplementing it all. Writing it in another language would force me to "truly" implement the features of Lisp without just using those same features in another language. C++ wouldn't be bad, but the lack of a garbage collector makes the project into something quite large, and I'm not particularly interested in writing a GC. C# would be another option, but, again, it has most of the features of Lisp already (dynamic typing, however, would be gone). I've considered Haskell, too. I've put some time into learning Haskell, but have hardly written more than factorial programs in it, so this might give me something to expand into.
4). Modify to not use Python's obviously corresponding features. Though something feels wrong about simply overlooking a language feature just to be "more hardcore". I guess it's not far from just writing it in a lower-level language like C++. This just doesn't seem too exciting.
5). Lisp compiler to the .NET CIL? I've never done anything like this before (I hadn't done anything like writing an interpreter before, either!). Would this be a phenomenal amount of work? I assume it still would let me leach the .NET garbage collector, which I consider a good thing.
6). Going through "Lisp in Small Pieces" and doing it's projects. I guess I'd rather figure this all out on my own or through referring to language specification. (I've been using Scheme's R5RS. Any other suggestions?)
What do you all think a good next project would be? Am I overestimating the difficultly of a domain-specific GC implementation? I'm interested in investing several weeks to a couple months to get something fairly concrete. I've really enjoyed the interpreter project thus-far and want to continue. I'm not interested in making this a truly useful language or project; there's already more than enough Lisp dialects out there. So speed concerns, library support, and all those actually useful things can be essentially ignored.
And my thanks to ApochPiQ for the original suggestion!