Slashdot Mirror


Schemix - A Scheme In The Linux Kernel

Phs2501 writes "Schemix is a Scheme running in the Linux kernel. It presents /dev/schemix to send Scheme forms to, and has extensions to read and set (C) kernel variables, call kernel functions, and make devices. If you've wanted to prototype your drivers in a high-level language that's 100% in the kernel, here you go."

5 of 58 comments (clear)

  1. Woot! Drivers in Scheme! by RevAaron · · Score: 4, Interesting

    Long have C people rallied behing it for all uses simply because it can (and usually should) be used for writing drivers or kernels, even when the application in question is a desktop GUI app.

    No longer does that argument apply- Schemix could be a great tool for those without a prejudice against Lispish languages who want to develop drivers or learn about the kernel. The value of an interactive environment cannot be understaed in the realm of learning, debugging, and development. I imagine this could be especially useful with kernel development, where debugging can be a bit harder than the usual user-space app.

    Naturally, for most drivers, you'll end up converting or compiling the code to C from Scheme, but I imagine there are some situations where straight-up Scheme would perform fine. From what I can tell, Schemix itself doesn't include an implementation of a Scheme->C compiler, but I bet some wrappers for one of the many Scheme compilers could be written to allow folks to write, develop and debug drivers/kmods in in Scheme, and when you're all ready to deploy, compile to C.

    Let's hope this sort of thing is the future of development- the lucky of us out there have been doing this for desktop development with Smalltalk and Lisp systems for quite a while.

    --

    Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
    1. Re:Woot! Drivers in Scheme! by cpeterso · · Score: 3, Interesting


      If device drivers were written in Scheme, then the same device driver could (possibly) work on an other OS that supported the Schemix driver API. You could have one device driver that works on Linux, Windows, BSD, ...

  2. Re:The Schemix home page by sir99 · · Score: 4, Interesting

    Intriguing. I bet this could be useful for making a nice active firewall, instead of using iptables or a kernel module for the netfilter hooks. It should be interesting to see what ideas come of this.

    --
    The ocean parts and the meteors come down
    Laid out in amber, baby.
  3. But I wanted... by cornice · · Score: 4, Interesting

    When will the python version be released or the perl version and don't forget ruby? This reminds me of Script-Fu for Gimp. Lots of people didn't want to work in Scheme so a number of other scripting languages were plugged in. Most didn't do very much but Gimp:Perl is now quite robust. I wonder if this will fire up a flame war over scripting languages for interfacing with the Linux kernel.

    1. Re:But I wanted... by RevAaron · · Score: 4, Interesting

      I doubt this will fire up any flame war because:

      a) not many people are registered to get this story, only people who specifically have an interest in the Developer section. It doesn't show up on the regular front page. Most of the idiots who would flame are weeded out that way.

      b) Anyone who thinks that the Schemix team should've implemented Perl, Ruby or Python kernel hooks should just quit crying and do the work themselves. There's a good chance that they'd find that in the course of the work that Perl/Ruby/Python would be more work to port into the kernel and use a huge amount of RAM, compared to TinyScheme, upon which Schemix is based. TinyScheme truly is tiny- less than 100k for the entire binary installation including a fair amount of library.

      --

      Working toward a usable PDA environment in the spirit of Newton OS: Dynapad