there's one big issue remaining with my non-blocking guile repl: if you press enter without having typed in a full s-expression, it hangs. this is because guile's 'read' procedure will block until a full expression has been input. guile has a buffered input port type that could address this, but I rely upon delimited continuations to suspend the repl while waiting for user input. delimited continuations do not work if the call stack has anything from guile's c api in it. the 'read' procedure is implemented in c, so I'm stuck.
Conversation
Notices
-
dave (dthompson@toot.cat)'s status on Friday, 10-Sep-2021 21:26:16 CEST dave
-
dave (dthompson@toot.cat)'s status on Friday, 10-Sep-2021 21:28:28 CEST dave
I've worked around it with a big gross hack that prevents multi-line expressions but prevents hanging the repl. an okay trade-off for now until guile replaces the c reader with a scheme one, which could happen as soon as the next release because I know it has been worked on.
-
dave (dthompson@toot.cat)'s status on Friday, 10-Sep-2021 22:16:01 CEST dave
@ekaitz_zarraga the standard guile repl does not support being used in combination with an event loop at all. when you run that repl, it has complete control over the thread it is running in until the user quits the repl.
-