[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gush -> plush
On Nov 18, Paul Graunke wrote:
> The gush project, which provided a simple unix shell running under
> guile, is in limbo now. The only thing interesting about it is that
> scheme "shell scripts" are loaded into the same guile interpeter.
> Their OS like protections appear to be, "Please don't poke me too
> hard." Here's a first cut a replacing gush with a plt-scheme
> version, that hopefully does better on the protections. It's just
> something I hacked together in a few hours this afternoon, so don't
> expect scsh. It's more for interactive use with plain old scheme
> programs for more complex tasks.
I think that there are three independent things here:
1. There is the actual scripting support that means a lot of scsh
functionality imported into MzScheme. I think that one change for
that would be to redesign the system functions so they will return
an actual process object that will allow much more control than the
current list of return values.
2. For this gush-like thing there is the safe evaluation that is
needed.
3. Some interactive shell support.
Any of these three things will be useful by itself. I have some hacks
that does these things partially:
1. I started doing this, but it seems like there are things on higher
priority so it's on hold for now. Basically, I had a new function
in port.c that will fork and return a subprocess object, something
similar to process*/ports that returns a process. Then there is
some Scheme source that uses this to implement the current
functions using the new one, and adds more scsh-like stuff: I have
support for starting processes either in the foreground or in the
background, piping, using symbols as paths etc. One cute thing was
to find a way to have threads with return values and that get i/o
ports when they start, and the result was that you can use, in a
single pipeline, both system processes and Scheme threads.
2. For this point I had once an implementation of a Scheme server
(actually a Swindle server, but there wasn't any Swindle-specific
code there) that allowed users to telnet into and get their own
REPL that the single server provides. The safe execution is
provided by different evaluation threads and namespaces.
3. Finally, for user-interaction, the telnet server thing would
respond to some telnet sequences, so if you would hit ^Z the
expression that was evaluating was pushed to the background etc.
I'll try to see if there is these things still work.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!