unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* language translator help
@ 2002-04-26 17:55 John W. Eaton
  2002-04-26 21:14 ` Thomas Bushnell, BSG
  2002-04-27  9:48 ` Neil Jerram
  0 siblings, 2 replies; 125+ messages in thread
From: John W. Eaton @ 2002-04-26 17:55 UTC (permalink / raw)


Although there has been much inactivity in the year or so since I
first asked this list for comments about the possibility of some kind
of Guile/Octave merger, I've not given up.

Right now, my ideas are that I would eventually modify Octave's parser
to emit Guile code, and then pass that off to Guile to interpret.  My
reasons for wanting to do this include

 * improving the performance of Octave's interpreter

 * immediately gaining some functionality that would otherwise be hard
   to get (object-oriented programming with goops, an interface to
   external packages like gtk, etc.)

 * allowing me to avoid having to maintain yet another scripting
   language interpreter (though it remains to be seen whether a
   translator will be any simpler than the current interpreter).

Obviously, making the new system fully functional would require not
only writing the translator, but also creating a run-time library of
Octave primitives that could be called from Guile.

As I see it, adapting Octave's core functions (the stuff written in C,
C++, and Fortran) for use with Guile is a big job, but one that is
certainly possible.  Even just having that capability inside of Guile
would probably be quite useful to some.  For the Octave users who are
more comfortable programming in Octave rather than Scheme (and this
includes me, at least currently), having the translator is essential.

Before jumping in and doing a lot of coding, I'm trying to get a
clearer idea about how the translation would work.  Some questions:

 * Is it a good idea for the translator to parse Octave code and emit
   Scheme code as strings that are then reinterpreted by Guile?  Is
   there a better way of doing that?  My guess is that this is OK, and
   the overhead of parsing twice is not so important.

 * I originally thought that translating the syntax would be trivial,
   but now I find that I'm really quite clueless when it comes right
   down to doing this part.

   For example, Octave has C-like break and continue statements for
   breaking out of or jumping to the end of a loop.  What is a
   reasonable way to translate them to Scheme?  I came up with a way
   to handle both, but they involve call/cc and seem much more
   complicated than the corresponding Octave code.  I'm left thinking
   that there must be a better way.  However, solutions that
   completely rewrite the structure of the loop are not so interesting
   to me unless there is a way to do that in a way that doesn't
   require the translator to do a lot of analysis of the incoming code.

   Can anyone offer some clues about these kinds of translation
   problems?  Failing that, is there a "Scheme for C Programming
   Dummies" kind of document somewhere?

 * If syntax can trip me up, I know semantics will too.  For example,
   it's not clear to me how to handle the differences in Octave and
   Scheme scoping rules for variables.

Any pointers or discussion (public or private) would be most
appreciated.

Thanks,

jwe

-- 
www.octave.org        | Unfortunately we were hoplessly optimistic in 1954
www.che.wisc.edu/~jwe | about the problems of debugging FORTRAN programs.
                      |                                       -- J. Backus

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 125+ messages in thread
* guile 1.4.1.86 (snap) available
@ 2002-09-08  6:23 Thien-Thi Nguyen
  2002-09-08 17:21 ` MJ Ray
  0 siblings, 1 reply; 125+ messages in thread
From: Thien-Thi Nguyen @ 2002-09-08  6:23 UTC (permalink / raw)


testing framework now liberated...  woo hoo!  (you can use "guile-tools
run-all-tests" for your own non-guile projects and get the tally for
PASS, FAIL, UPASS, XFAIL, UNTESTED, UNSUPPORTED, UNRESOLVED or ERROR
results.  SKIP is also available but not tallied -- patches welcome.)
tarball in dir:

  http://www.glug.org/tmp/2002-09/

new NEWS excerpt follows.

thi


__________________________________________________
* New module (ice-9 testing-lib)

This is actually the familiar (test-suite lib) module that has been
distributed for a long time, now repackaged for installation and general use.
Similarly, the driver program formerly known as test-suite/guile-test is now
available as one of the guile-tools.  The guile-specific parts of this are
in test-suite/prologue.scm.  After build, do:

    pre-inst-guile-tools run-all-tests --help

for more info.

* (bit-extract N ...) now signals out-of-range error for N < 0

* bug fix: (expt 0 0) => 1

* New configure option: --enable-site-dir=DIR

Normally, configuration sets scheme_site_dir to be ${datadir}/guile/site,
but you can select another directory to use instead.  The site directory
is available to C code as SCM_SITE_DIR, and to Scheme code as:

  (assq-ref %guile-build-info 'scheme_site_dir)	    ; note underscores

It is available to third party programs via the GUILE_SITE_DIR configure.ac
macro, which sets var GUILE_SITE and does AC_SUBST on it.

[end]


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2002-10-04 17:53 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-26 17:55 language translator help John W. Eaton
2002-04-26 21:14 ` Thomas Bushnell, BSG
2002-04-27  9:48 ` Neil Jerram
2002-04-28  0:47   ` John W. Eaton
2002-04-28  1:21     ` Thomas Bushnell, BSG
2002-04-28  1:32       ` John W. Eaton
2002-04-28  2:10         ` Thomas Bushnell, BSG
2002-04-28 14:44           ` John W. Eaton
2002-04-28 18:41             ` Thomas Bushnell, BSG
2002-04-28 22:18               ` John W. Eaton
2002-04-29  5:16                 ` Thomas Bushnell, BSG
2002-04-29 16:36                   ` John W. Eaton
2002-04-29 20:28                     ` Thien-Thi Nguyen
2002-04-30 17:57                     ` MJ Ray
2002-05-01  6:31                       ` Thomas Bushnell, BSG
2002-04-30 22:49                     ` Thomas Bushnell, BSG
2002-04-28 18:21       ` Neil Jerram
2002-04-28 18:42         ` Thomas Bushnell, BSG
2002-05-01 22:19           ` Neil Jerram
2002-05-15 11:35         ` Thien-Thi Nguyen
2002-05-15 20:49           ` Marius Vollmer
2002-05-15 23:13             ` Thien-Thi Nguyen
2002-05-16  0:26               ` Bill Gribble
2002-05-16  1:20                 ` Thien-Thi Nguyen
2002-05-16  5:02                 ` Per Bothner
2002-05-16 21:57               ` Marius Vollmer
2002-05-16 22:36                 ` Thien-Thi Nguyen
2002-05-22 12:37                   ` Marius Vollmer
2002-05-22 19:26                     ` Thien-Thi Nguyen
2002-05-22 20:50                       ` Marius Vollmer
2002-05-22 22:23                         ` Thien-Thi Nguyen
2002-05-23  0:23                           ` Marius Vollmer
2002-05-23  4:59                             ` Thien-Thi Nguyen
2002-05-23 11:37                               ` Bill Gribble
2002-05-23 23:41                                 ` Thien-Thi Nguyen
2002-05-23 11:46                           ` MJ Ray
2002-05-23 17:33                             ` Marius Vollmer
     [not found]                               ` <mvo@zagadka.ping.de>
2002-05-23 22:20                                 ` MJ Ray
2002-05-27 20:26                                   ` Marius Vollmer
2002-05-29  8:55                                     ` Thien-Thi Nguyen
2002-05-29 18:56                                       ` Marius Vollmer
2002-05-29 19:17                                         ` Thien-Thi Nguyen
2002-05-29 19:46                                           ` Marius Vollmer
2002-05-29 19:59                                             ` Thien-Thi Nguyen
2002-05-30 12:16                                               ` Marius Vollmer
2002-05-30 22:39                                                 ` Thien-Thi Nguyen
2002-05-30  2:28                                           ` Christopher Cramer
2002-05-30  7:38                                             ` Thien-Thi Nguyen
2002-06-04 22:58                                           ` MJ Ray
2002-06-04 23:56                                             ` Thien-Thi Nguyen
     [not found]                                               ` <ttn@giblet.glug.org>
2002-06-05  8:22                                                 ` MJ Ray
2002-06-05  9:42                                                   ` Thien-Thi Nguyen
2002-06-05 22:59                                                     ` MJ Ray
2002-06-05 23:32                                                       ` Thien-Thi Nguyen
2002-06-07 23:14                                                       ` Thien-Thi Nguyen
2002-06-05 23:54                                                 ` MJ Ray
2002-06-06  0:23                                                   ` Thien-Thi Nguyen
2002-06-06  2:44                                                     ` Bill Gribble
2002-06-06  7:23                                                       ` Thien-Thi Nguyen
2002-06-06  8:13                                                       ` Thien-Thi Nguyen
2002-06-06  9:24                                                 ` MJ Ray
2002-06-06 11:18                                                   ` Thien-Thi Nguyen
2002-06-07 23:25                                                     ` MJ Ray
2002-06-08  0:42                                                       ` Thien-Thi Nguyen
2002-06-08  4:49                                                       ` Thien-Thi Nguyen
2002-06-08 17:44                                                       ` rm
2002-06-10 16:45                                                         ` Marius Vollmer
2002-06-08 22:45                                                 ` MJ Ray
2002-06-08 23:18                                                   ` Thien-Thi Nguyen
2002-06-10 12:29                                                     ` MJ Ray
2002-06-10 12:31                                                     ` MJ Ray
2002-06-10 19:18                                                       ` Thien-Thi Nguyen
2002-06-10 23:30                                                 ` MJ Ray
2002-06-10 23:51                                                   ` Thien-Thi Nguyen
2002-06-11 17:50                                                     ` Robert Uhl <ruhl@4dv.net>
2002-06-11 20:09                                                       ` Thien-Thi Nguyen
2002-06-11 18:48                                                   ` news
2002-06-12 17:44                                                     ` Forking stables. was " MJ Ray
2002-06-12 20:31                                                       ` Rob Browning
2002-06-14 19:32                                                       ` Thien-Thi Nguyen
2002-06-14 20:08                                                         ` Clinton Ebadi
2002-06-14 20:21                                                           ` Thien-Thi Nguyen
2002-06-14 21:03                                                             ` Clinton Ebadi
2002-06-14 21:39                                                               ` Robert Uhl <ruhl@4dv.net>
2002-06-14 21:45                                                               ` news
2002-06-17 22:37                                                                 ` Neil Jerram
2002-06-17 23:06                                                                   ` Clinton Ebadi
2002-06-17 23:14                                                                     ` Clinton Ebadi
2002-06-17 23:35                                                                   ` Bill Gribble
2002-06-18 18:40                                                                   ` news
2002-10-04 17:53                                                                     ` Thien-Thi Nguyen
2002-06-15  6:29                                                               ` Thien-Thi Nguyen
2002-09-08 18:48                                                 ` guile 1.4.1.86 (snap) available MJ Ray
2002-09-08 20:09                                                   ` Thien-Thi Nguyen
2002-05-18 13:47           ` language translator help Neil Jerram
2002-05-19  2:32             ` Thien-Thi Nguyen
2002-05-19  3:03               ` Thien-Thi Nguyen
2002-04-28  6:53     ` Per Bothner
2002-04-28 18:21     ` Neil Jerram
2002-04-28  0:53   ` loop translations (was: Re: language translator help) John W. Eaton
2002-04-28  1:33     ` Thien-Thi Nguyen
2002-04-28  5:06       ` David Pirotte
2002-04-28  9:52         ` rm
2002-04-28 13:49     ` Marius Vollmer
2002-04-28 14:29       ` John W. Eaton
2002-04-28 18:15         ` Marius Vollmer
2002-04-28 18:48           ` Marius Vollmer
2002-04-29 20:07             ` Clinton Ebadi
2002-04-29 20:50               ` Eric E Moore
2002-04-30 15:07                 ` Eric E Moore
2002-04-28 18:21     ` Neil Jerram
2002-04-28  0:54   ` translators and scoping rules " John W. Eaton
2002-04-28 13:50     ` Marius Vollmer
2002-04-28 14:03       ` John W. Eaton
2002-04-28 14:35         ` Marius Vollmer
2002-04-29  2:26           ` John W. Eaton
2002-05-07 18:50             ` Marius Vollmer
2002-04-28 15:26         ` Per Bothner
2002-04-29  2:08           ` John W. Eaton
2002-04-29  4:37             ` Per Bothner
2002-04-29 16:27               ` John W. Eaton
2002-04-28 18:21     ` Neil Jerram
  -- strict thread matches above, loose matches on Subject: below --
2002-09-08  6:23 guile 1.4.1.86 (snap) available Thien-Thi Nguyen
2002-09-08 17:21 ` MJ Ray
2002-09-08 17:45   ` Thien-Thi Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).