[gambit-list] slime (swank) and gambit

Marc Feeley feeley at iro.umontreal.ca
Thu Jan 19 23:14:28 EST 2012


On 2012-01-19, at 10:48 PM, Attila Lendvai wrote:

> hallo Marc,
> 
>> Hello Attila.  I was wondering how your swank for Gambit project was coming along.
> 
> it's stalled while i'm further exploring the possibilities.
> 
> when i was asking around compiler authors about having a single
> swank-scheme project with backend-specific code in separate files,
> i've found little enthusiasm. and as i'm not sure how deep/long i will
> delve into scheme, i don't want to start yet another project that will
> end up being abandoned and merely be noise in the scheme universe…

That sounds familiar.

> as of my embedded device: in fact it's not that much embedded... it
> has 32MB ram and the OS on it is a linux distribution, so picobit is
> probably not what i need.
> 
> so far i've played with gambit, chicken, and chibi-scheme, and for now
> i'm further experimenting with chibi, which compiles out of the box on
> my target environment (cygwin based gcc cross compiler, bleh! they run
> linux and the SDK is windows+cygwin based... "for the convenience of
> the programmer")

Gambit also builds on cygwin "out of the box".

> basically what i need:
> - little headache porting the scheme VM to the device (i must admit,
> the gambit build infrastructure was a bit intimidating regarding this)

If the configure script and makefiles are not working for you in your environment, you could simply call the C compiler on all the .c files.  An example of this is in misc/vcexpress.bat (that's for Visual C++ Express, but just use it as a template to call the C compiler in your SDK).

> - modular compilation, because e.g. there's no floating point on the device

What do you mean by "modular compilation"?  This might be a problem because Gambit represents time information (such as timeouts) using floating point numbers.  Isn't there a floating point software emulation of some sort?

> - a http client

Do you mean client, or server?  A server is in examples/web-server.  A client is easy to write (for example see examples/iOS/wiki.scm) or the one I wrote for Snow (http://snow.iro.umontreal.ca/?viewpkg=http).

> - preferably bytecode support (but text representation is also ok),
> that i can http get to the device and eval (the actual program)

Gambit does not use bytecode.  But it can serialize interpreted closures, which makes them easy to send over the net.

> what is secondary:
> - speed
> - fancy features (the most complex stuff i need is an http client)
> 
> my plan for now is to compile the scheme VM and a smaller
> loader/bootstrap code that can download, signature check and eval
> scheme bytecode/text, which will be the program implementing the
> actual business logic.

Sounds neat!

>> Finally, talking about embedded devices, I've recently come across a cheap ($40) and super compact wifi module which contains 2 embedded ARM processors and a few hundred kilobytes of RAM. It sounds like the perfect embedded platform for wireless sensors, tiny robots, etc (here's a link: http://www.semiconductorstore.com/cart/pc/viewPrd.asp?idproduct=47055).  I'm thinking of installing picobit on one.
> 
> 
> sounds like fun! :)
> 
> i'm keeping an eye on http://www.raspberrypi.org/ and will most
> probably order one when it comes out...
> 
> as of swank-gambit: i'm not sure when i will get back to it, so i've
> attached my version of swank-gambit.scm that i've done parallel with
> you. it may have something useful, e.g. a basic code to load slime
> modules similar to how the CL swank does it.

Thanks!  I'll have a look.  Can I suggest you put it up on Gambit's Dumping Grounds? (http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Dumping_Grounds)

Marc




More information about the Gambit-list mailing list