[gambit-list] Repl server on iOS?

Marc Feeley feeley at iro.umontreal.ca
Sun Sep 11 08:25:07 EDT 2011


On 2011-09-11, at 12:51 AM, mikel evins wrote:

> Marc,
> 
> I'm finding that the repl server in the source for Gambit REPL appears not to work. At least, when I try a telnet to an iOS device running Gambit REPL, the connection is refused. The same goes for my own app if I include the remote repl code, do a (start-repl-server), and try to telnet to the device.
> 
> It'd be mighty handy to have that repl server working.
> 
> --me

This could be a networking problem, possibly the configuration of your local network.  Could you try this on your iOS device:

> (socket-info-address (tcp-client-self-socket-info (open-tcp-client "apple.com:80")))
#u8(192 168 2 16)
> (read (open-tcp-server "*:8000"))

This will block.  Then on your desktop computer try to connect with telnet:

% telnet 192.168.2.16 8000

This should cause the "read" on your iOS device to complete.  For example:

> (read (open-tcp-server "*:8000"))
#<input-output-port #2 (tcp-client)>

It could also be a threading problem.  Is your application's event loop in C or Scheme?  If it is in C you have to arrange to periodically call a Scheme "heartbeat" function to allow the Scheme green threads to progress.  Check the function "heartbeat" in examples/iOS/program.scm .

Marc




More information about the Gambit-list mailing list