This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

guile-hobbit release 1.2



Hello!

Release 1.2 of the Hobbit compiler for Guile is 
available at ftp.red-bean.com:pub/guile/contrib/misc

Partial copy from the README file:

This is version 1.2 of the hobbit compiler for Guile.
The users of previous versions should also read the following, as
there are many differences in the installation process and in the
options to the compiler wrapper program 'hob'.

What is hobbit ?
================
Hobbit is a Scheme to C compiler, originally written for SCM by  
Tanel Tammet (tammet@cs.chalmers.se). It compiles all R4RS (with the
exception of mutual tail recursion and hygienic macros) and some
SCM specific stuff. Defmacros are supported.

Last release of hobbit for SCM was 4d, and it is GPLed.

Requirements for installation
=============================
Any guile release or snapshot until now should work, but perhaps some
minor modifications (mainly in guilehob.h) may be needed.

Requirements for out-of-the-box installation
=================================================
The platforms where I tested hobbit are Cray-Unicos, Fujitsu VPP700,
HP-UX 10.20, SunOS and Linux-Elf. Except for the Cray, 
they provide dynamic linking, which is the most convenient,
as you can dynload in the guile interpreter the shared objects
which are always build in that case.

Now, automake and libtool are used, so these platforms should not be
the only ones where you can use hobbit. 

Installation
============
Configure detects automagically where guile lives, and
will in all cases install the compiler files in a correct place
relative to guile. So --prefix is not used.

./configure
make
make install

Manual
======
Executing hob without argument or with flags -h or -? will give you a
brief summary of the options. hob -V will be verbose about guile and
hobbit versions.

The loading of a shared library build with hobbit is best illustrated by
a simple example:
1) You run the command:
hob dir/test.scm
2) You run the interpreter with the following input:
guile
guile> (use-modules (hobbit4d link))
guile> (hobbit-load-from-path "dir/test")
3) You are done !

Bugs corrected
==============
On previous versions of hobbit, the following failed:

(define add
  (lambda args
    (apply + args)))

(define (mult) *) ;;; crashes guile-hobbit

(define (test x)
  ((if (even? x) add (mult)) 5 x)) ;;; generates bad code

This is now correct in version 1.2.

Limitations with modules
========================
Currently, the generated code does not interact well with the module
system. If a hobbit compiled code uses a variable defined in a
previous loaded module, it will not be recognized, but defined instead
as undefined in the root module.

Problem report, suggestions, etc...
===================================
Mail to Bernard.URBAN@meteo.fr