IRC channel logs
2023-04-13.log
back to list of logs
<jpoiret>i actually got lazy and used list-ref, take and drop <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 <jpoiret>i really encourage you to get used to syntax-case, it is extremely powerful <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 ...) ...).) <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 <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 <cow_2001>turns out guile does its (+ (f 0) (f 1)) evaluation from right to left <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 <ekaitz>haha that's the proper answer to any question <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 <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)