guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile and GNU TeXmacs


From: Joris van der Hoeven
Subject: Re: Guile and GNU TeXmacs
Date: Tue, 11 Dec 2001 13:16:46 +0100 (MET)

Thanks for your reply!

On 17 Oct 2001, Neil Jerram wrote:

> >>>>> "Joris" == Joris van der Hoeven <address@hidden> writes:
> 
>     Joris> Hi,
> 
> Hi!  And sorry for the lateness of this reply.

Well the excuses are now on my side; I have had some health problems at
the moment that you replied. Afterwards I had at lot of email to be answered,
which (partially) explains my late answer...

>     Joris> I use guile as an extension language for GNU TeXmacs with
>     Joris> full satisfaction for about one year and a half now.
>     Joris> However, in order to get things more robust and standard, I
>     Joris> would like some help on the following questions:
> 
>     Joris> 1. The module system is not very clear to me and I could
>     Joris> not find a short description of how it works in the
>     Joris> documentation, or elsewhere on the web.
> 
> Have you looked at the reference manual in Guile CVS, or in any of the
> recent 1.5.x release candidates?

No, I found the manual on the web. I will try your suggestion.

>     Joris>    I am interested in two types of functionality:
> 
>     Joris>    a) Defining a module, and telling what are the other
>     Joris> modules which are required. I guess I see how to do this by
>     Joris> looking at the source code. However, when exactly is a
>     Joris> module loaded and what is the visibility/scope of functions
>     Joris> inside that module.
> 
> (define-module ...) begins a module definition.
> 
> The required modules can be specified either using the #:use-module
> keyword inside the (define-module ...) expression, or by standalone
> (use-modules ...) expressions.
> 
> If you use #:use-module or use-modules to import definitions from
> another module, the visible definitions will be those that have been
> marked for export in that module's source code.  Export-marking is
> achieved by the #:export keyword or by (export ...) or (define-public
> ...) expressions.
> 
> (This is oversimplified; we also now have selective and renaming
> imports - read the manual for the full picture.)
> 
> A module's source code is loaded when a (use-modules ...) expression
> naming that module is evaluated.

OK, that is more or less what I thought.
So now I have to use this convention too.

>     Joris>    b) I want to be able to require routines from additional
>     Joris> modules on demand. Typically, TeXmacs can be used as an
>     Joris> interface to computer algebra systems.  When starting such
>     Joris> a system, I might want to load an additional module with
>     Joris> routines relevant to that system. However, this module
>     Joris> should not be loaded as long as the system is not needed.
> 
> There is such a thing as an autoload module, but I don't know how they
> work.  I think we also support programmatic module loading
> (named-module-use!), which could help you here.

Well, I was searching for a standard way for doing this.
If this feature is a bit obscure, I can make my own implementation.
This will probably be faster for me and easier to maintain.

>     Joris> 2. I would like to provide documentation for the most
>     Joris> important scheme functions provided by TeXmacs.  I guess I
>     Joris> should write this documentation in the texinfo format?
>     Joris> Would it be possible to add such documentation to the main
>     Joris> documentation of guile?  Who would be in charge of doing
>     Joris> this?
> 
> Me, if anyone.  It's certainly feasible to combine this documentation
> wuth the main guile reference manual, but please could you clarify
> why you think this would be a useful idea?  If we do combine it, then,
> yes, it would have to be in texinfo format.

OK, that seems perfect. As I see it know, the guile reference manual comprises
several files, some of which contain information about extern systems.
When the Guile interface of TeXmacs will become more stable and better
documented, I think that it may be interesting to add a file for TeXmacs.
This has several advantages:

1. People may see what can be done with guile in an end-product.
   TeXmacs is particularly interesting because it is a structured editor
   in which all data are natively represented by trees (scheme expressions).
   It must be possible to design extremely powerful structured editing
   tools based on this feature.

2. People may discover the possibility to extend TeXmacs using Guile
   (strangely, very few people started to do this, but maybe the support
   is not yet sufficiently stable and documented).

3. There would be a standard web location where up to date documentation
   about guile and related software can be found. In the TeXmacs help menu,
   I plan to create a submenu 'Scheme', where one can find all relevant help
   about Guile (a tutorial, reference manual, the TeXmacs interface, etc.).
   This help might be automatically updated from the web on request.

In any case, it may take some time to write good documentation,
but I just wanted to know what to do at the moment that
I will have this time.

>     Joris>    In fact, the html code generated by texinfo can be
>     Joris> rendered pretty well by TeXmacs. I would like to add a
>     Joris> 'scheme' entry in the Help menu of TeXmacs, which would
>     Joris> look at a suitable location on the web where the guile
>     Joris> documentation is available online.  Is there such a
>     Joris> location (where the html docs are *exactly* those generated
>     Joris> by texinfo; *no* unnecessary markup and adds)?
> 
> www.glug.org carries a snapshot of the latest Guile documentation.
> After 1.6.0 is released, www.gnu.org should (I hope!) do so as well.
> 
> In the current Guile distribution, html doc is built using texi2html,
> not `makeinfo --html'.  There was a bit of a discussion a few weeks
> ago about which was better, inconclusive IIRC.  I don't know whether
> www.glug.org follows the Guile distribution or does its own html
> generation.

In relation to point 3 above, it would be nice to have a standard
web-location where to download a tarball for documentation in Html
(as well as a browsable version). Such a tarball does not need to be
updated every week; a few times a year would be sufficient.

>     Joris> 3. I would be interested in adding the Jacal system as a
>     Joris> computer algebra system with an interface to TeXmacs.  Is
>     Joris> there someone who can tell me in a detailed way how to get
>     Joris> Jacal installed and working in combination with Guile
>     Joris> Scheme on a GNU/Linux (or other Unix) system?
> 
> See the reference manual, node `JACAL'.  If this is wrong at all,
> please let us know so that we can update it.

I have contacted the author of JACAL in the meantime and
he might be willing to cooperate. However, he seems to be very busy,
so it often takes a long time before he replies (I should not blame
anyone for this...). Also, I did not manage to get JACAL working
properly in combination with Guile, even though I tried a very
recent version which was claimed to work well. If anyone can help
me with this, that would be nice. But I might as well wait for
an answer from the main developer; the project is not very urgent.

Best wishes and thanks again for your help,

Joris


-----------------------------------------------------------
Joris van der Hoeven <address@hidden>
http://www.texmacs.org: GNU TeXmacs scientific text editor
http://www.math.u-psud.fr/~vdhoeven: personal homepage
-----------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]