IRC channel logs


back to list of logs

<listentolist>Hey! Why does pretty-print convert '(1+ 0) to (#{1+}# 0) instead of just (1+ 0)?
<listentolist>I would like to use pretty-print for formatting the source code. Are there other tools that are more suitable for this use case?
<wingo>listentolist: guix has a better pretty-printer that also preserves comments
<wingo>the 1+ thing is not incorrect but it is probably also a bug that it would print it in that way!
<listentolist>wingo: Thank you!
<dokma>What is the guile idiomatic way to send a shutdown message from a controlling thread to a worker thread?
<dokma>Any modules or something built in?
<jpoiret>i don't think there is, but there is the guile-fibers library which might make it easier to work with cooperative multithreading
<dokma>jpoiret: will take a look
<dokma>jpoiret: guile-fibers implements some kind of threads itself that aren't pthreads?
<jpoiret>it has so called "green threads" but they can run on different actual threads iirc. that's even the default behavior
<civodul>dokma: it implements "fibers" (lightweight threads) which are scheduled on POSIX threads
<flatwhatson>dokma: standard pthread approaches like checking an atomic flag in the worker loop, or using a mutex and/or condition variable work fine in guile
<dokma>I'm inclined to use standard pthread approaches for starters.
<soupladler>hey, is there a way to list procedures defined in a module?
<soupladler>oh wait, I worked it out
<soupladler>turns out my question was the wrong question. If you write something like (import-modlues (chickadee graphics color)) and you get 'no code in module', what's going wrong?
<dthompson>perhaps your load path doesn't have that module on it
<soupladler>mmm, OK. Think I just got an older version than the documentation I'm reading
<dthompson>te module location used to be (chickadee color) but it was moved to (chickadee graphics color) a year or so ago
<dthompson>highly recommend using the latest
<soupladler>hey, just recognized your name! Yes, trying to download the latest now. Have never messed around with guile before so I'm having a lot of teething issues. Chickadee seems cool though,
<dthompson>oh! yeah that must be a lot to take in at once