IRC channel logs

2023-04-13.log

back to list of logs

<ArneBab_>dthompson: nice!
<jpoiret>qookie: enjoy! https://paste.debian.net/1277152/
<jpoiret>i actually got lazy and used list-ref, take and drop
<jpoiret>i love using syntax-case so much
<qookie>yeah that was my original idea (using take drop list-ref), although i haven't used syntax-case before so didn't know how to make it work
<qookie>thank you very much
<jpoiret>i really encourage you to get used to syntax-case, it is extremely powerful
<jpoiret>a bit hard to grasp at first
<jpoiret>note that you can handle syntax violations with it, which is already great over syntax rules
<qookie>looking at the docs, with-syntax also seems like a simpler way of doing what i did in a different place with syntax-parameterize to introduce a binding into the expr given to the syntax
<rlb>qookie: be careful wrt literals, i.e. I've had to use explicit symbol-checking guards in some cases because the way it matches wrt the current envt/scoping didn't do what I wanted (which was that foo should always match as long as it's the symbol foo -- e.g. the catch in a clj style (try ... (catch something ex ...)). I forget the exact cause of the issue, but someone here explained what was going on to me a while back.
<rlb>(And switching to a slightly more complicated syntax-case guard (from a literal) fixed the problem entirely.)
<rlb>(And I mean the literals wrt (syntax-case x (literal-1 ...) ...).)
<qookie>+
<flatwhatson>does anyone have a good strategy for managing timeouts with (web client)?
<flatwhatson>i guess the main problem is just that C-c in geiser doesn't interrupt the socket read
<flatwhatson>maybe suspendable ports will behave better
<old>guile-parallel now support asynchronous I/O thanks to libev
<flatwhatson>horay, i have multipart/form-data file upload requests working
<flatwhatson>guile-openai now supports image variations, where you upload an image and dall-e riffs on it
<rekado>flatwhatson: I have been using the connect* and open-socket-for-uri variant in (guix build download) that aborts the connection after a timeout
<flatwhatson>my problem is that the api accepts the connection and starts streaming the response, but it stalls. i'm impatient and want to do something else or retry the request, but C-c in geiser doesn't kill it.
<flatwhatson>timeouts force me to decide how impatient i am up-front!
<flatwhatson>considering something more extreme like a SIGUSR1 handler to drop back into the debugger
<wingo>moo
<chrislck>oow
<cow_2001>turns out guile does its (+ (f 0) (f 1)) evaluation from right to left
<cow_2001> https://git.sr.ht/~kakafarm/sicp/tree/master/item/sicp/tests/3_8.scm https://git.sr.ht/~kakafarm/sicp/tree/master/item/sicp/solutions/3_8.scm
<cow_2001>:D
<cow_2001>~_~
<cow_2001>i expected it to evaluate from left to right! D:<
<ekaitz>cow_2001: AFAIK scheme does not impose any evaluation order in the standard
<cow_2001>yeah, i was talking about it on #scheme
<cow_2001>they tell me "read the spec"
<ekaitz>haha that's the proper answer to any question
<ekaitz>but not the friendliest
<ekaitz>cow_2001: think about scheme as any other language (like C if you wish) in most of them the expression evaluation order is not enforced by the standard
<ekaitz>in C for example: a() + b() + c() does not necessarily execute a() before b()
<cow_2001>ekaitz: nono, they're being helpful. it's a good idea.
<cow_2001>they said they use let* to enforce order
<ekaitz>cow_2001: yes!
<ekaitz>let*
<cow_2001>which is a bunch of nested let, semantically
<ekaitz>cow_2001: also reading the standard is a *pretty good* exercise in scheme because it's pretty short and easy to read (at least R7RS small)
<cow_2001>i've read 3 paragraph!
<cow_2001>paragraphs
<cow_2001>you should get in touch with this guy and get him to make a bunch of fezes https://fez-o-rama.com/
<cow_2001>ekaitz: thank you! going for a walk.
<ekaitz>cow_2001: np have a nice day!
<cow_2001>:D