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]

Guile & Octave (was Re: Docstring question)


On  9-Dec-1999, David Lutterkort <lutter@cise.ufl.edu> wrote:

| "John W. Eaton" <jwe@bevo.che.wisc.edu> writes:
| 
| > On  8-Dec-1999, Daschbach, John L <John.Daschbach@pnl.gov> wrote:
| > 
| > | Octave with guile scripting would be out of this world.
| > 
| > That's the reason I subscribed to this list.  Unfortunately, I've had
| > to give up on any use of guile in Octave, at least temporarily.
| 
| I have been dreaming about this a lot lately, mainly because I am fed up
| with Matlab's quirky home-cooked programming language which seems to become
| more quirky with every release (cell arrays anybody ?)
|
| I guess a good first step would be to hook libcruft from octave into
| guile. Then a good schemey notation for index ranges has to be invented
| (that's one of the things that Matlab got right) and maybe, one day,
| implement the interpreter for Octave into Guile. I guess this would be the
| most difficult part of the project and require some serious lexer/parser
| support in Guile; that's where Mikael Djurfeldt's idea of hooking flex
| and bison into Guile would come in handy.
| 
| I would be very interested in learning what you (or anybody else) thinks
| are the main problems, possible benefits etc. are of following that
| approach. 

My idea was to translate Octave/Matlab code to guile.  As I understand
it, I would need to create a way to handle Octave values and call at
least some of Octave's functions from guile.  Octave's parser
currently creates a parse tree that I think could be used to generate
equivalent guile code, so my idea was to just use the current parser,
not to try to write a new parser for Octave syntax in guile.  Once the
parse tree has been converted to the equivalent guile code, it could
be evaluated by the guile interpreter.

I would also like to be able to write modules in guile itself.  If
that were possible, then perhaps Octave could also take advantage of
other guile libraries using either guile syntax or Octave/Matlab
syntax.

Though it might be nice, I'm not sure it would really be necessary to
create a new syntax for index ranges.  Translating Octave code to
guile would only require some function that could do the work.  Slick
syntax wouldn't really matter much, though it might be nice to have
for writing matrix-oriented code directly in guile.

Some things that are preventing any of this from happening are a lack
of time and funding.  There are many other projects for Octave that
have a higher priority now.  For the people who currently pay the
bills, making Octave work with guile has a much lower priority than
improving its numerical tools.  Also, I don't really know scheme or
guile (yet) so that presents a bit of a barrier for me doing the
work myself.  However, if someone is really interested in this kind of
project, let me know.  I can probably help you get started
understanding how various parts of Octave work.

jwe

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