guile-devel
[Top][All Lists]
Advanced

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

Re: A more generic REPL server


From: David Thompson
Subject: Re: A more generic REPL server
Date: Sun, 06 Oct 2013 08:14:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12

On 10/06/2013 06:08 AM, Chaos Eternal wrote:
Is this thing a threadless repl server?
if so, i suggest that the code be separated and can be easily
integrated into other project.

the guile-scsh badly needs such a feature.

It's not exactly threadless. There is one server thread that waits for clients, and for each client there is one thread that waits for user input. The difference is that the client REPL is executed in the main thread, sans reading user input. I use my own coroutine and scheduler modules to do it in guile-2d. I call it the "cooperative REPL".

I agree that it would be nice to extract this into something that more people could use. The modules in question are (2d coroutine), (2d agenda), and (2d repl coop-repl).

https://github.com/davexunit/guile-2d/blob/master/2d/coroutine.scm
https://github.com/davexunit/guile-2d/blob/master/2d/agenda.scm
https://github.com/davexunit/guile-2d/blob/repl-v2/2d/repl/coop-repl.scm

Thoughts?



reply via email to

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