guile-user
[Top][All Lists]
Advanced

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

Re: Guile bugs


From: Ludovic Courtès
Subject: Re: Guile bugs
Date: Sun, 10 Sep 2017 15:11:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi,

Linas Vepstas <address@hidden> skribis:

> 1) There is a need to pass messages between subsystems running on different
> machines.
>
> 2) Solutions include ROS, ZeroMQ,  google protocol buffers... whatever. All
> require lots of work, a learning curve, complexity, etc.
>
> 3) Wait!  I know! I will just send around ascii (utf8) strings that are
> guile programs!  Just use the guile repl server, connect to it, and send
> some guile string!  No muss, no fuss, no coding, no learning curve, simple
> easy ...  You can use netcat to drive things!  echo (display "hello
> world\n") | nc 1.2.3.4 37146

Then you’re sending sexps, not strings, and you’re reading them with
‘read’ from a port, as opposed to loading whole strings in memory.

Also, the REPL server is not necessarily the right thing here.  You
conceptually want a REPL, but not Guile’s full-blown REPL, which can be
hard to deal with (you need to parse the prompts, determine if you’re in
a recursive REPL, whether an exception occurred, etc.)

In the Shepherd, I implemented a very simple REPL that is just enough to
communicate evaluation results to the client, and to distinguish return
values from exceptions.  This does not use Guile’s REPL server, only
‘read’, ‘eval’, ‘write’.

HTH,
Ludo’.



reply via email to

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