rotty > sbank
About
This is the documentation sbank1, a Scheme binding for gobject-introspection 2.
Status
For missing/planned features see the TODO file included in the
distribution. sbank is currently still in alpha mode, this also why no
official releases exist, you have to grab the code via git. Alpha mode
means that sbank is not ready for general public consumption or even
production use. If, however, you are willing to deal with:
-
Not-yet-stable APIs: while in general, the APIs introduced by
sbank's
typelib-importmacro will not change much, and neither will the API oftypelib-importitself. -
Bugs. These may manifest in crashes, not properly covered API,
memory leaks (there are surely quite a few of those at the time of
this writing) or otherwise. sbank is only lightly tested, so you
should be prepared to run into bugs, and either fix them yourself,
or report them to me. I'm still investigating options regarding an
bug/issue tracking system. In the meantime, send me an email, or
even better, drop by on IRC, either
gnome/#introspection, orfreenode/#scheme– I'm hanging out there asrotty.
The following is a list of working code using sbank to access various libraries; this should give you an impression of what's already possible:
- The hello-world.c and hello-world2.c examples from the GTK+ tutorial have been ported (see examples/gtk/hello-world{,2}.sps).
- A working port of a part of guile-gnome's GTK+ demo suite is provided in examples/gtk/demo.
- There is a rather minimal example using gdk-pixbuf at examples/gdk-pixbuf.sps.
- The simple-httpd.c example from libsoup has been ported (examples/soup/simple-httpd.sps).
- I have a web server using libsoup via sbank, running on Ikarus Scheme that provides IRC logs. An instance of the code is currently available via http://rotty.yi.org/irclogs/, you can find a link to the code at the footer of that page.
Installation
- gobject-introspection
- Grab the code from git, build and install it:
git clone git://git.gnome.org/gobject-introspection cd gobject-introspection ./autogen.sh && make && sudo make install
- gir-repository
- While this is not a strict dependency, you probably want the typelib data it provides, so you can use e.g. GTK+. Procedure as above:
git clone git://git.gnome.org/gir-repository cd gir-repository ./autogen.sh && make && sudo make install
- Ikarus
- The newest version of Ikarus (from bzr) is required. Also see spells' Ikarus notes.
- Ypsilon
-
While Ypsilon should successfully run
sbank, it does not integrate with Ypsilon's garbage collector, due to missing functionality in Ypsilon. - Scheme code
-
sbankuses a bunch of Scheme libraries. You can grab them all in one go by using the SPE helper package:
IMPL=ikarus git clone git://github.com/rotty/spe.git cd spe ./scripts/fetch-systems $IMPL sbank
Testing
When you've completed the above installation procedure, you should run the sbank testsuite, to make sure that everything worked out as expected:
./scripts/launch $IMPL test sbank
Note that if you haven't installed gir-repository, you'll get
testcase failures for gtk.scm.
You can also run any of the examples using the launch script, for
example:
./scripts/launch $IMPL systems/sbank/examples/gtk/demo/main.sps
For more information on the launch script, see the documentation for SPE.
Documentation
I'm working on a short tutorial, which should help to get you started.