[Top][All Lists]

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

Re: emebedding guile line command interpretor

From: Georges KO
Subject: Re: emebedding guile line command interpretor
Date: 05 Feb 2001 18:33:43 +0800
User-agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7

Neil Jerram <address@hidden> writes:

> You really need to provide more details of your scenario.

    Basically, he would like to have an interpreter window within the
application, where the user could create figures with the mouse and
enter Lisp expressions from that intrepeter. For example, let's say
that the user creates a circle C from the GUI, then he should be able
to issues expressions such as :

(radius (figure 'c)) => 10.2
(center (figure 'c)) => (-12.34 3.3)

    but also use operators to move or change the radius of the circle :

(move (figure 'c) '(4.34 -10.2))
(modify (figure 'c) :radius :set 3)

    and actually see the circle moving and modifying (not just the
result of the circle at the new coordinates or with the ne
radius). The interpreter window would also do all the stuff with
indentation and parentheses... Think: LispWorks's IDE.

> Broadly, you have three options:
> 1. Run the GUI and the guile shell in different threads, with each
>    thread waiting only for its own input.

    I guess that would be the simplest way to do it, that is, by
making DrGeo Guile-aware and receiving expressions through pipe, thus
the interpreter part could be actually another Scheme implementation,
Common Lisp, Python, Perl, etc... :

                          Dr Geo
                       |         |            |        |
                     Guile   MzScheme   Common Lisp   Python

    That way, Dr Geo would be programmable in any language, as long as
it can spit expressions understandable by the Guile part of Dr
Geo... It could also be fun to use TCP/IP instead with a client-server

> 2. Give control to the guile shell, and write an input port that
>    selects for input for both the shell and the GUI.
> 3. Give control to the GUI, and tell the GUI to check also for input
>    for the guile shell (if it supports such function).
> So, is this the problem?  If so, what is the GUI written in?  (X, Gtk,
> ...)

 Georges KO, Taipei, Taiwan              address@hidden                 

reply via email to

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