Bobbing for Kernels

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

Posts Tagged ‘Lisp’

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.

Read the rest of this entry »

Advertisements

Posted in computers, languages | Tagged: , , , , | 1 Comment »

Announcing kbscheme

Posted by kernelbob on November 22, 2008

I published my scheme interpreter on gitorious.  Now you can follow along.  It needed a name, so I called it kbscheme.  Not a brilliant name but it’ll do.

Here’s the project blurb.

kbscheme

This vanity project is yet another implementation of the Scheme programming language.

Project goals:

  • I want to learn Scheme.
  • I want to write something in C. I’ve been using higher level languages and my C is rusty.
  • I want to write a garbage collector. They’ve always fascinated me, but I’ve never written one.
  • I have some research ideas about garbage collection that I want to explore.

Project non-goals:

  • a production-quality Scheme interpreter
  • full implementation of the language

Check it out, Brandon.

Hint to the git-ignorant (as I was very recently).  Go to the repositories/mainline page and click on the “More info…” links,  Those will show the exact commands needed to copy (clone) the tree onto your local disk.

Actually, I’m still git-ignorant.  Gotta work on that…

Posted in computers, languages | Tagged: , , , , , , | 2 Comments »

Scheming, part 3

Posted by kernelbob on October 20, 2008

GC is hard.  Let’s go shopping.

I’ve been working on my scheme interpreter a lot.  But I don’t have much to show for it.  What I do have, finally, is a working garbage collector (GC).  GC is a real pain to debug.  Every error shows up as a memory corruption bug.

Read the rest of this entry »

Posted in computers, languages | Tagged: , , , , , | 1 Comment »

Scheming, part 2

Posted by kernelbob on October 9, 2008

I’ve been working on my Scheme interpreter.  I just got the nonrecursive evaluator working, so it seems like a good time to take stock.

Read the rest of this entry »

Posted in computers, languages | Tagged: , , , , | 1 Comment »

Scheming, part 1

Posted by kernelbob on September 25, 2008

I have a Scheme interpreter.

~/scheme> ./scheme
> ()
> 123
123
> +
#<C-proc 0x804ad19>
> (+ 12 34)
46
> (lambda (x) x)
#<proc 0x80590f8>
> ((lambda (x) (+ x x)) 3)
6
> [Ctrl-D]
~/scheme>

Read the rest of this entry »

Posted in computers, languages | Tagged: , , | 1 Comment »

Not another Scheme interpreter!

Posted by kernelbob on September 11, 2008

I’m getting psyched about the idea of writing a Scheme interpreter.  I’m wondering what’s the absolute minimum amount of C code you have to write to be able to bootstrap it.

Read the rest of this entry »

Posted in computers, languages | Tagged: , , | 2 Comments »