Tue Apr 4 20:08:39 CEST 2006
I ran into this problem today: suppose you are given a single channel
connected to a remote process. You can choose what that process is,
but the connection is a simple pipe. How to make sure they can
communicate objects bidirectionally in a synchronous way? They should
be able to communicate anything, and you are only allowed to solve the
This looks like what all the XML fuss is about. But it seems easier to
me to solve it with s expressions. Mostly because packet forth and
emacs are able to read and write them.
The only real problem is to make sure strings can accomodate any
binary data, and to make sure they are quoted properly. The rest is
optimization. Symbols can be made to work, i.e. there has to be a
The (toy) problem here is the following: i want to tunnel a connection
to emacs on a remote host over a ssh link. Let's call SERVER the
machine which has emacs running, and CLIENT the one wanting to use
it. The story goes like this:
A) client opens secure channel
B) client passes data to server
C) server passes data to emacs
D) server waits for editing to finish
E) server returns edited file to client
F) client closes secure channel
Using gnuserv i can pass arbitrary expressions to emacs directly. In
principle the client could talk to a gnuclient instance and just
evaluate an expression. What should this be?
A) client opens secure channel: ssh SERVER gnuclient -batch
B) client passes data to server: (edit "blabla")
C) server evaluates command, which creates a buffer with "blabla"
D) user gives signal: (done) after "blabla" -> "boeboe"
E) this makes the expression in (B) evaluate to "boeboe"
F) client closes channel
The nice thing would be to reuse the connect and perform B-E multiple
times. So this is really nothing more than your standard client/server
model, only with s expressions.