Racin's Blog

Website structure change - 2006, the 4th of February

Category : WebSite

My weblog is far more up to date than my previous site, so I decided to put it in the main page. You can still access the old contents here.

A bug in the Lisp META parser - 2006, the 4th in February

Category : Common Lisp

I discovered a bug in the cl-meta parsing library. The bug is already present in H. Baker's paper.

The problem occurs when trying to apply a recursive rule in a tree of conses, for instance in the following code:

(let (head a)
(with-list-meta (current-list  '((+ (1+ foo) bar baz)))
  (labels ((parse-exp ()
	       [@(atom a) !(progn (format t "atom ~a ~%" a) t) ]
	      ([@(atom head) !(progn (format t "list with head ~a ~%" head) t)
		$[!(parse-exp)] ! (progn (format t "end list ~%") t) ])

When meta encounters new subtrees, source-symbol is momentarily replaced by usage of a let declaration. But upon the next call to parse-exp, current-list won't have changed, and so we end up with an endless recursion.

Using a dynamic binding for source-symbol instead of a lexical binding solves the problem.

Here is a patch which fixes this.

A Turing-machine in Scheme - 2005, the 6th of October

Category : Scheme

I recently had a course on Turing machines, and as I'm learning scheme (I mean, I know the syntax and the basic operators, but I'd like to do things in the scheme way), I wrote this. It defines a double-linked list for scheme (useful for modelling the tape) and an interpretor for deterministic Turing Machines.

Modification to the program to support non-deterministic Turing machines is easy, and I'll need to do it.

I'd also like to write something which would convert lists into graphviz code, and apply it to graphical representation of Turing machines. Maybe one day I will want to write that.

A Qemu mode for Emacs - 2005, around the 10th of September

Category : Emacs

I wrote a little lisp module for emacs which enables me to run qemu from within emacs. It hasn't advanced features yet (input/output to qemu being an advanced feature), but it's useful anyway. I find qemu unpractical when running from the console and outputing to a serial driver, because you can't shut it down practically then.

This modules correct this : all it does is attaching the qemu output to a buffer in emacs, killing qemu when you want or when you close the buffer.

In the future, I plan to add the possibility to interact with Qemu, with for instance a buffer for each serial output. I'll add the features along my needs.

You can get it here.

First entry - 2005, the 18th of September

Category : Scheme

Welcome to my WebLog. As an introduction note, I'll say that this blog is going to be rather technical, if not technical only. Which means that you won't find any information about what I ate today, or any insignificant stuff, about which even I don't care, so why would you?

I write this blog mainly in order to remember about stuff that I wrote. As I begin it only today, there will be both chronological (in blue) and antichronological (in red) entries.

For my first entry, I'll put the stuff I wrote in order to write my blog. So here's the source code of my blog, which is generated by Skribe . Note that this is my very first scheme program, so it's probably far from perfect, but could nevertheless be useful.

This Html page has been produced by Skribe.
Last update Sat Feb 4 17:19:47 2006.