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: Translators again


I'm a little confused by what you are talking about here, in terms
of clients and the module syntax (which I'm not familiar with --
this isn't possible in the current module system, is it?)

On Wed, Feb 09, 2000 at 06:14:24PM +0100, Jost Boekemeier wrote:
> Ian Bicking <bickiia@earlham.edu> writes:
> 
> > It seems as though the REPL may not be implemented in a standard way
> > in many applications.  That is, RPL are somewhat application-specific,
> > only the E really relates to Guile or the language.
> 
> Isn't it possible for a foreign language implementor to
> implement a language specific eval?
> 
> Lets assume someone wants to contribute the tcl module my.tcl.  This
> person must also implement a foreign language interface module
> `my.scm' which exports my.tcl's interface to the scheme world -- possibly
> by inheriting the standard tcl repl and standard tcl eval from the
> (ice-9 lang tcl) module.
> 
> 
> A client of my.tcl would look like:
> 
> (define-module (test-my-tcl))
> 
> (module-open (ice-9 guile) ((user my) (rename eval tcl:eval)))
> 
> (eval '(+ 1 2) (the-environment))
> (tcl:eval "1 + 2")
> 
> ;; or:
> 
> (module-open (user my) ((ice-9 guile) (rename eval system:eval)))
> 
> (system:eval '(+ 1 2) (the-environment))
> (eval "1 + 2")
> 
> 
> Jost
> 

-- 
Ian Bicking         / 4869 N. Talman Ave. Apt. G, Chicago, IL 60625
bickiia@earlham.edu / http://www.cs.earlham.edu/~bickiia

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