Subject: [clisp-list] REPL listening to a socket

From: Stig Erik Sandoe <[email-masked]>
Date: Sat, 4 Nov 2000 18:12:22 +0100 (MET)

hi,

does anyone have a fault-tolerant REPL that can listen to a socket
with CLISP?  Ideally it should not hang on the socket but use
a select()-alike thing to only be activated when there is actual
data coming.

------------------------------------------------------------------
Stig Erik Sandoe     [email-masked]    http://www.ii.uib.no/~stig/

---

From: Sam Steingold <[email-masked]>
Date: 04 Nov 2000 13:09:51 -0500

> * In message <[email-masked]>
> * On the subject of "[clisp-list] REPL listening to a socket"
> * Sent on Sat, 4 Nov 2000 18:12:22 +0100 (MET)
> * Honorable Stig Erik Sandoe <[email-masked]> writes:
>
> with CLISP?  Ideally it should not hang on the socket but use a
> select()-alike thing to only be activated when there is actual data
> coming.

what exactly is it what you want?

what's wrong with (print (eval (read socket)))?

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
"Syntactic sugar causes cancer of the semicolon."	-Alan Perlis

---

From: [email-masked] (Don Cohen)
Date: Sat, 4 Nov 2000 11:59:59 -0800 (PST)

> a select()-alike thing to only be activated when there is actual
Not quite as good as select, but take a look at server.lisp in
http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/clocc/src/donc/?cvsroot=clocc

That's one of the trivial examples as I recall.

---

From: Stig Erik Sandoe <[email-masked]>
Date: Sat, 4 Nov 2000 22:58:30 +0100 (MET)

> That's one of the trivial examples as I recall.

I already had it, but had apparently given a bad wait-parameter to
it.  It now works nicely except for one thing, it is strangely picky
about who it accepts connections from:

telnet localhost 7666   ; is not acceptable
telnet 192.168.1.1 7666 ; is acceptable (where this is the ip)

weird :-)

---

From: [email-masked] (Don Cohen)
Date: Sat, 4 Nov 2000 14:18:15 -0800 (PST)

> telnet 192.168.1.1 7666 ; is acceptable (where this is the ip)

Localhost is actually 127.0.0.1 and the clisp socket is not listening 
for that address.
There are many controls in the underlying socketh mechanism that are
not available from clisp.  I'm sure it would be helpful to certain
users (inc. me) to add those controls to the lisp interface.  I'm also 
sure it would be a lot of trouble.