GNOME for Scheme48

Posted 13 Jun 2005 at 20:00 UTC by rotty Share This

I've decided to laying the foundation for creating bindings of the GNOME software stack for Scheme48, specifically: create bindings for GLib/GObject.

At the core of GNOME, there is the GLib Object System (GObject), on top of which GTK+ and the rest of the developer platform are built. Thanks to the header scanning tool, which creates a S-Expression representation of the API, you are able to create bindings for any GObject-based library, once you got the core bindings right.

I have a rough plan how to do this; basically I plan to fork guile-gnome and reuse the existing infrastructure (e.g. .defs processing). The Guile-GNOME fork will drive a G-Wrap that's capable of emitting code for the upcoming Scheme48 FFI. Work on G-Wrap/Scheme48 has already progressed to a degree where it's possible to turn to the GObject bindings and fill out the holes as needed in the process.

The plan is also to make the resulting bindings "mostly compatible", so that programs written for Guile-GNOME will also work with Scheme48-GNOME and vice versa. Since Scheme48 has no built-in object system, and the object system would have to be compatible with GOOPS (Guile's object system) anyway to achieve source-compatibility between the bindings, I started working on a GOOPS-compatible version of TinyCLOS.

How did you come to this choice?, posted 22 Jun 2005 at 00:37 UTC by aminorex » (Journeyer)

I'm curious as to why a Scheme48 binding is helpful or desirable to you. Specifically, why Scheme48 above its alternatives, and likewise, why GNOME above its alternatives?

Advantages of scheme48, posted 23 Jun 2005 at 16:29 UTC by chalst » (Master)

I can't speak for rotty, but I see three main strengths for scheme48:

  1. scsh is built on top of it, which most people think is the right sort of way to use scheme for scripting UNIX. There are plans to port scsh elsewhere, and I've heard rumours of a complete port, but there are no complete, mature implementations on other schemes;
  2. scheme48 builds using prescheme, which is a closureless, runtimeless vrestriction of scheme that compiles very efficiently;
  3. scheme is build in a pretty robust and comprehensible way: it's nice code to read, by and large. It's one of the more attractive schemes to hack on. Noteworthy point: scheme48 was sused as a starting point for the VLISP provably correct compiler project.

Reasons for my choice, posted 6 Jul 2005 at 17:08 UTC by rotty » (Journeyer)

As I'm not only interested in just using the language implementation, but also on the internals, both because having insight into them can teach you a lot of things and because of nececessity: sometimes you have to be quite familiar with the implementation internals to make certain applications or (esp. extensions). As chalst already explained, Scheme48 is a very "hackable" implementation and has several features that make it technically interesting. Besides the VLISP project, there is also Kali Scheme built upon it, a distributed extension of Scheme48 that makes distribution transparent to a degree rather unimaginable in "mainstream" languages. As for choosing Scheme over alternatives: IMO, the Lisp family, with its powerful syntactic macro systems, and Scheme in particuliar (hygienic macros, continuations), are on the upper end of the spectrum of expressiveness of computer languages (at the other end would be assembly/machine code).

Now GNOME: I chose that, because it's written in C, which has the following desirable properties:

  • It's rather simple, esp. when compared with it's "big (and ugly, IMO) brother" C++.
  • The simplicity makes it easy (or easier, at least) to create bindings for C libraries.

Furthermore, GTK+/GNOME was written with language bindings in mind and provides an API taylored towards that. Also, I'm already involved with guile-gnome and thus have already a good bit of experience in GNOME language bindings. Last but not least, GTK+/GNOME as opposed to QT (the obvious alternative) is a real community-driven project.

Excellent, posted 11 Aug 2005 at 22:27 UTC by realblades » (Journeyer)

All I have to say is that I'm all for it. It would also be nice to have sort of "partial" bindings like plain Gtk+. Not all desktops are running full gnome or want to install all of it.

I hope it will also make it to distributions and porters/packagers instead of being just another crufty binding hidden somewhere.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page