IRC channel logs

2021-09-01.log

back to list of logs

<ArneBab>leoprikler: I don’t really understand — do you have an example?
<ArneBab>mwette: this? https://github.com/wingo/fibers/blob/master/fibers/scheduler.scm
<daviid>ArneBab: not my 'specialty' either, but i'd look at some of the guile-a-sync[2|3] code maybe
<daviid>leoprikler: https://gitlab.com/samplet/guile-srfi-158
<ArneBab>just thinking … would this be a perfect usecase for fibers with a channel between them for input?
<daviid>for info, never used it
<mwette>ArneBab: yes. I believe that is using call-with-prompt to run co-routines
<mwette>I did one a few years ago. Here, with demo pasted on end: https://paste.debian.net/1209843/
<flatwhatson>fibers with suspendable ports are perfect for async io, you basically write blocking io and instead of blocking it runs another coroutine until unblocked
<flatwhatson>all the fuss of suspending and resuming operations "just works"
<d4ryus>ArneBab: wingo explains how scheduler/tasks/io of fibers work here: https://wingolog.org/archives/2017/06/27/growing-fibers
<ArneBab>mwette: I now tried this with fibers, and though I don’t have my channel work well yet, the initial tests work and the code is beautiful. Thank you!
<ArneBab>flatwhatson, d4ryus: thank you!
<ArneBab>How can I find out, why I am in a continuation barrier? I create fibers and run them, but when I try to read from a soft port which uses get-message, I get the error Attempt to suspend fiber within continuation barrier
<ArneBab>.
<ArneBab>This is my backtrace: https://paste.debian.net/1209894/
<ArneBab>here’s the implementation of the port https://paste.debian.net/1209895/
<ArneBab>in regular scheme, along with the usage: https://paste.debian.net/1209896/
<ArneBab>this happens during output: https://paste.debian.net/1209897/
<d4ryus>ArneBab: The wiki has a list of barriers: https://github.com/wingo/fibers/wiki/Manual#32-barriers I guess its 'Legacy “soft port” callbacks'
<ArneBab>ah, damn … thank you!
<ArneBab>is there an alternative to replace stdin and stdout to read from a channel?
<ArneBab>I’m trying to get code working the same in a websocket and on the terminal
<d4ryus>ArneBab: Guess you could use two pipes with a fiber each
<wingo>something funny: in guile 3.0.4, you can segfault via: (call-with-input-string (make-string #e1e5 #\() read)
<wingo>not in 3.0.7 tho!
<dsmith-work>UGT Greetings, Guilers
<dsmith-work>!uptime
<sneek>I've been running for 28 days
<sneek>This system has been up 6 weeks, 35 minutes
<stis>Hello guilers!
<tohoyn>lloda: do you know if the upstream code of guile-cairo is maintained anymore?
<rlb>wingo: nice. I might try to rework lokke's clj reader based on your work (the original reader was based on (hacked up from) the previous C scm reader). Though I also added a scheme (edn only) reader later. But I suspect what you've done is better, maybe wrt both perf, and support for syntax info (file/line info, etc.).