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.
Posts Tagged ‘computers’
A Safer Scheme Interpreter, Part 3
Posted by kernelbob on January 4, 2011
Posted in Scheme | Tagged: C, computers, garbage collection, geeky, interpreter, kbscheme, Lisp, Scheme | 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.
Posted in Scheme | Tagged: C, computers, garbage collection, geeky, interpreter, Lisp, Scheme, Schetoo | 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.
Posted in Scheme | Tagged: C, computers, exception, geeky, interpreter, kbscheme, Lisp, Scheme, Schetoo | 3 Comments »
Scheme and Macro Expansion
Posted by kernelbob on November 15, 2009
I got to work on my Scheme interpreter this weekend. Real life had interfered for about three weeks straight.
Posted in computers, languages | Tagged: computers, geeky, kbscheme, Scheme | Leave a Comment »
NAND Gates to Tetris, wrap up.
Posted by kernelbob on June 25, 2008
That was a load of fun. I finished all the class projects in The Elements of Computing Systems. The projects got more involved as they got higher-level.
Posted in computers | Tagged: compilers, computers, education, geeky | Leave a Comment »
Nand Gates to Tetris, part 2
Posted by kernelbob on June 9, 2008
First, I told all my friends about this textbook. Last night, I started doing the exercises. I’ve done about half the course now, including all the hardware sections. It’s been a lot of fun. I’ve never designed a CPU before, and it was fun seeing how all the pieces fit together.
The machine the class uses has a weird architecture. It’s definitely more pedagogical than useful. For example, there are no shift instructions. It reminds me of the old bit slice processors — the instruction set is a lot like microcode.
Posted in computers, Uncategorized | Tagged: computers, education, geeky | Leave a Comment »
Nand Gates to Tetris
Posted by kernelbob on June 7, 2008
If you haven’t seen this, you should go see it.
From NAND Gates to Tetris in 14 Weeks.
It’s an undergraduate class that starts by building simple logic circuits, uses those to build sequential circuits, then registers, CPUs, VMs, compilers, OSes, and applications. Every project builds on the last one, and at the end, the student has a game (Tetris) every part of which he has constructed himself, down to the NAND gates. Okay, not really, but he’s been exposed to every level of technology and should have good comprehension of how each layer is implemented.
The whole textbookSelected chapters of the book, the problem sets, the simulator software, and the unit tests are available free at the above URL.
Pretty amazing stuff!
Posted in computers | Tagged: computers, education, geeky | Leave a Comment »