Bobbing for Kernels

See Bob. See Bob bob. Bob, Bob, bob!

Scheming, part 5

Posted by kernelbob on November 28, 2008

Call/cc works!

That’s the big news.  Lots of little tweaks and cleanup, but call/cc is the big deal.  I’d designed the evaluator to handle call/cc way back when, so it wasn’t a major rewrite.  It was just a matter of figuring out exactly what it had to do.

Next I can either implement exceptions (which will improve usability a lot) or implement rest arguments.  E.g., you should be able to say this,

(define myproc (a b . rest) ...)

which declares myproc to take two or more arguments.  rest will be bound to a list containing all the args after the first two.  Of course, the reader doesn’t support dot notation, so maybe I should extend the reader first.

Another thing I want to do is add library support.  Right now there’s one big namespace.  I want to implement the r6rs library system.  But I’m not sure whether that needs to be implemented in C or can be written in Scheme.

And I’ve been looking at macros.  I’ve got a very rough idea of how to proceed.  I’ve successfully called an expansion routine, written in Scheme, from lambda.  The expansion doesn’t do anything useful, but in principle it could.

Unfortunately, I’m not learning Scheme very fast.  Because the interpreter is just barely functional, I’m not writing any significant amounts of Scheme code.


One Response to “Scheming, part 5”

  1. […] Scheming, part 5 […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: