This is the mail archive of the guile@sourceware.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]

Re: Examples of embedding guile


Derry Bryson <dbguile@ta1.reno-onramp.com> writes:

> Klaus Schilling wrote:
> > 
> > Derry Bryson writes:
> >  >
> >  > I am beginning a program which will be a spreadsheet type program
> >  > and I hope to use Guile as the formula/macro language (i.e. where
> >  > the value of each cell would be a guile(lisp) expression).
> >  >
> > ...
> >  > So anyway, here I am.  I have downloaded and compiled Guile, but didn't
> >  > find much in the way of docs or examples.  What I am hoping for is some
> >  > simple example code that demonstrates embedding and utilizing Guile.
> >  > Does anyone have any pointers?
> > 
> > The best example by now is the Scheme Constraint Window Manager, SCWM,
> > by Greg Badros and Maciej Stachowiak. Both frequent this list, so will
> > most likely tell you themselves.
> 
> I will take a look at this.

Unfortunately, Scwm is far from simple.  But it is realistic, and does
contain lots of examples of lots of things one might want to do with
Guile.

http://scwm.mit.edu

contains links to my most recent release-- 0.99.6.

> > Talking about spreadsheets, there are already a few projects that try
> > to embed a guile interpreter into a spreadsheet. For example there are
> > some based on Oleo. Another big one is Gnumeric by the FSF-Award Winner
> > Miguel de Icaza, of Gnome fame. It will possibly integrate an optional
> > guile interpreter when time has come.
> > The main problem of embedding guile is that it occupies the main
> > function of the program.
> >
> 
> What do you mean by "it occupies the main function of the program?" 
> Do you mean that it must take over the main function?

Yep, but see Scwm's scwm.c and guile-compat.c to see how Maciej worked
around this issue to permit C code to drive the application.  I believe
he's planning on integrating this capability directly into libguile in
the near future.

Good luck!  But beware of re-inventing the wheel as there are other
Scheme-based spreadsheets out there (many have been mentioned on this
thread already).  Contributing to one of those may be a more worthwhile
investment of your time (or contributing to, say, scwm! :-) ).

Greg

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