jwz - Schemix! [entries|archive|friends|userinfo]
jwz

  www.jwz.org
  userinfo
  archive
  rss

Links
[»| [DNA Lounge] [Blog] [iCal] ]
[»| [DNA Lounge Legal Defense Fund] ]
[»| [WebCollage] [LJ WebCollage] ]

Schemix! [Wed, 30-Apr-2003 12:21 AM]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|, ]
[music |Dead Voices on Air -- Glae Bastards]

Schemix is a Scheme system, implemented as a patch to the Linux kernel. It aims to attain R5RS compliance while remaining small, fast and easy to understand.

The intended use of Schemix is for exploration of the Linux kernel and for rapid, interactive prototyping of Linux drivers and other new kernel features. To achieve this, Schemix will attempt to make a large subset of the kernel functionality available to Scheme programs. Interactivity is via a character device, /dev/schemix which presents a REPL (Read, Eval, Print Loop) to anyone having access to the device.

    $ echo "(display (+ 1 2 3))" > /dev/schemix
    $ cat /dev/schemix
    6
    $ cat > /dev/schemix
    (define foo (kernel-lambda (char*) printk))
    (foo "Blah, blah, blah")
    ^D
    $ dmesg | tail -n 1
    Blah, blah, blah

linkReply

Comments:
[User Picture]From: [info]brad
Wed, 30-Apr-2003 2:08 AM (UTC)

(Link)

I'm surprised I haven't seen that on sweetcode. Definitely worthy.
[User Picture]From: [info]evan
Wed, 30-Apr-2003 11:35 AM (UTC)

(Link)

I just submitted it.
[User Picture]From: [info]icis_machine
Wed, 30-Apr-2003 3:39 AM (UTC)

(Link)

i guess the part i get lost at is the word 'rapid'.

[User Picture]From: [info]justinjs
Wed, 30-Apr-2003 6:48 AM (UTC)

(Link)

How so?

Having a REPL with access to the kernel structures is a really huge win for testing and debugging, even if the language you're really writing in isn't the one you're testing with. Every time I switch back from developing in a language/implementation that has a useful REPL to a system that doesn't, I notice that development (especially initial prototyping) slows down significantly. Having this is a big win in nearly any development situation.

If you were referring to the speed of stuff actually written in it... I haven't looked at the internals of Schemix yet, but Scheme in general is one of the most optimization-friendly languages around. A number of Scheme implementations out there are Very Fast.

So, what part of 'rapid' lost you?
[User Picture]From: [info]icis_machine
Wed, 30-Apr-2003 9:04 AM (UTC)

(Link)

i'm sorry, you need to write all that in prefix notation.
From: [info]grayscalewolf
Thu, 1-May-2003 3:12 AM (UTC)

(Link)

Would you prefer writing XML?
[User Picture]From: [info]icis_machine
Thu, 1-May-2003 9:21 AM (UTC)

(Link)

The true Jedi only programs in LISP.