[Top][All Lists]

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

Re: Guile Interpreter as a Standalone Server

From: Ludovic Courtès
Subject: Re: Guile Interpreter as a Standalone Server
Date: Fri, 13 Oct 2006 14:30:01 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)


Looks like nobody answered you, so here we go.

Volkan YAZICI <address@hidden> writes:

> I need such a feature:
>   /*
>    * If there's an already running guile process in the background,
>    * return it, otherwise create a new one and return new process.
>    */
>   interp = guile_interp(...);
> With such a functionality, it'd be possible to
>  - Parse & execute faster. (We won't need to create a new process
>    everytime.)
>  - Cache parse plans.
>  - Use global variables that's accessible by any process using the
>    same interpreter.
> Is such a feature already supported by Guile? Can I achieve above 3
> functionalities with using another method?

Neil's new debugging framework (`guile-debugging', available in CVS HEAD
or on [0]) has support to send code for execution to a remote
Guile process so that might be useful to you.

However, as far as improving efficiency is concerned, I do not think
that running a single process is the right approach.  Profiling and then
improving Guile's startup may be a smarter approach.  ;-)

As for sharing information among processes: One could argue that the
notion of a process (and address space) is only vital for
non-memory-safe languages (such as C), and that memory-safe languages
(such as Scheme and Java) do not need such a mechanism because they
already provide other mechanisms to achieve memory safety (closures,
module systems, etc. --- see [1] on that topic).

Thus, providing mechanisms to share information among "processes" (or
"modules", or "programs") would more likely be the job of a "shell",
i.e., some sort of an enhanced REPL that has all the authority of the
user behind the keyboard (i.e., it can access all the data, programs and
resources the user has access to).  GUSH (``GNU User's Shell'') was more
or less an attempt to provide such a shell based on Guile, and indeed,
it would have been able to execute any Guile program _within_ the GUSH
process.  SCSH [2] is similar to that, and there's also a Guile port [3]
(not sure whether this is the last version).

Hope this helps,

[1] Jonathan Rees, "A Security Kernel Based on the Lambda-Calculus", --- a enlightening paper.

reply via email to

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