Bobbing for Kernels

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

Posts Tagged ‘Lisp’

Reading List

Posted by kernelbob on January 24, 2011

I’ve been doing some reading this weekend.  This post records a little of what I’ve learned.

The focus has been Scheme macros and separate compilation.  I’m trying to understand how a production quality Scheme system “should” be organized.  “Should” is in scare quotes because every Scheme user has at least one opinion on the topic, and no two seem to agree.

So here are the papers I’ve looked at in the last few days.

Read the rest of this entry »

Posted in Scheme | Tagged: , , , , , | 1 Comment »

A Safer Scheme Interpreter, Part 3

Posted by kernelbob on January 4, 2011

In Part 1, I explained why my Scheme interpreter, Schetoo, has the ability to fail or restart any instruction.  In Part 2, I showed how it automatically checks that instructions do all necessary checks before they have any side effects.  Those two posts described raising exceptions with longjmp, but didn’t really explain how the interpreter catches exceptions.

Read the rest of this entry »

Posted in Scheme | Tagged: , , , , , , , | Leave a Comment »

A Safer Scheme Interpreter, Part 2

Posted by kernelbob on January 3, 2011

In my last post, I promised to explain how my Scheme interpreter, Schetoo, can automatically verify that its instructions are restartable.  But first, some background.

Read the rest of this entry »

Posted in Scheme | Tagged: , , , , , , , | 1 Comment »

A Safer Scheme Interpreter

Posted by kernelbob on January 2, 2011

In the first half of 2010, I wrote a Scheme interpreter which I called Schetoo. It is a sequel to an interpreter called kbscheme, which I worked on off-and-on in 2008 and 2009. Both are written in C.

You can see them both on github.

https://github.com/kbob/kbscheme
https://github.com/kbob/schetoo

I undertook these projects to learn more about Scheme, interpreters, and garbage collection. Along the way, I came up with an interesting technique to make interpreter implementation less error-prone. That’s what I want to write about today.

Read the rest of this entry »

Posted in Scheme | Tagged: , , , , , , , , | 3 Comments »

Son of Scheme: Introducing Schetoo

Posted by kernelbob on February 13, 2010

I’ve started a new Scheme project. This one is called Schetoo. The name has connotations of “Scheme Two”, “me too”, and “Gentoo” (a hardcore Linux distribution and a breed of penguin).

A ‘blogger named Peter Michaux started a series in January called Scheme from Scratch. His goal was to write a very quick and dirty Scheme, just enough to bootstrap a Scheme compiler. I read his postings and decided to get started again.

Schetoo is similar in concept to my first Scheme, kbscheme. In fact, I reused a fair amount of code to get Schetoo up and running faster. But at the same time, I’m applying what I learned to try to get a better design.

I’ve published the code on GitHub.

http://github.com/kbob/schetoo

Read the rest of this entry »

Posted in Scheme | Tagged: , , , , | Leave a Comment »

Scheme: Retrospective

Posted by kernelbob on January 9, 2010

The Scheme interpreter project is “on hold”. Maybe it’s “finished”. It’s time to take stock, see what I learned, what I accomplished, and what I could have done better.

Read the rest of this entry »

Posted in Scheme | Tagged: , , , | 2 Comments »

Scheme project is on hold.

Posted by kernelbob on January 1, 2010

I’m officially putting my Scheme interpreter project “on hold” for a while. Progress has slowed to a virtual stop. It’s not because I’ve lost interest, but because I’m lost.

Simultaneously learning to think in Scheme, implementing hygienic macros through syntax-case, and (re)designing the core interpreter has proven to be too much. I haven’t been able to hack my way through it.

Someday I’ll pick the project up again. I’m still very interested in it. Maybe I’ll continue from the same code base, and maybe I’ll start over.

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

Scheme status

Posted by kernelbob on October 15, 2009

I’ve written here before about my efforts to write a Scheme interpreter from scratch.  The last update was in May, but I’m still working on it.  I’ve made 60 git commits since then.  The major thing I’m trying to do is implement macros, but I’m having a hard time of it.  No matter.  When they’re done, I’ll understand macros thoroughly.

Read the rest of this entry »

Posted in languages | Tagged: , , , , , , , | 3 Comments »

Scheming, part 7. The Reader.

Posted by kernelbob on May 21, 2009

I haven’t ‘blogged about my Scheme interpreter in ages.  Development stopped from January through March, but I’ve been working on it again.  Here are links to the earlier articles.

The biggest new development  is the reader.  Most developers call them parsers, but Lisp people call them readers.  I have written six readers for Scheme now, and I’ve effectively completed a class in advanced parsing theory.  The current reader works very well, and I do not want to write another.

Read the rest of this entry »

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

Scheming, part 6

Posted by kernelbob on December 13, 2008

This morning I added vectors to my Scheme interpreter.  It was surprisingly easy.  It was nearly test-driven development — now that the scheme interpreter has a full unit test harness built in, I got the tests written before I finished the code (though not before I started).

Read the rest of this entry »

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