Posted by sjs
on Thursday, August 02
Well it has been a while since my last post. I’ll try not to do that
frequently. Anyhow, on to the good stuff.
I’ve been developing a Scheme
interpreter in Haskell called
ElSchemo.
It started from Jonathan’s excellent Haskell
tutorial
which I followed in order to learn both Haskell and Scheme. Basically
that means the code here is for me to get some feedback as much
as to show others how to do this kind of stuff. This may not be too
interesting if you haven’t at least browsed the tutorial.
I’m going to cover 3 new special forms: and, or, and cond. I
promised to cover the let family of special forms this time around
but methinks this is long enough as it is. My sincere apologies if
you’ve been waiting for those.
Posted by sjs
on Sunday, June 24
Update: I’ve cleaned the code up a little bit by having LispNum derive Eq, Ord and Show.
NB: My Scheme interpreter is based on Jonathan Tang’s Write Yourself a Scheme in 48 hours Haskell tutorial. Not all of this makes sense outside that context, and the context of my previous posts on the subject.
My scheme interpreter has been christened ElSchemo, since it was sorely in need of a better name than “my Scheme interpreter”. It’s also seen far too much of my time and sports jazzy new features. I’ll probably post the full code up here sooner or later, including my stdlib.scm and misp slightly modified to run with ElSchemo’s limited vocabulary (namely the lack of define-syntax).
But that will be for another day, because today I want to talk about implementing floating point numbers, from parsing to operating on them.