IRC channel logs
2023-02-14.log
back to list of logs
<lechner>Hi, would someone please point me into the right direction as to how to declare and use nested records with guile-json? The child record is being encoded a second time as a string http://paste.debian.net/1270645 <old>mfiano: I'm not aware fo any <mfiano>returns -1, 0, or 1 depending on the sign of a given exact/inexact number. <old>I guess that (lambda (x) (cond ((negative? x) -1) ((positive? x) 1) (else 0)) would be it <old>but I don't think it's anywhere in rnrs or srfi <daviid>sneek: later tell akirakyle '... There is one heisenbug g-golf crash that I'll sometimes run into with "large" gsk scene graphs ...' if you just make the code available, i can try to run, reproduce and debug, i hope you can find the time to just publish the code that causes the crash, thanks! and good stud semester then ... <daviid>sneek: later tell akirakyle i hope some (other) guix contributor do (find the time to) patch guix and make it so the latest v0.8.0-a.3 available to their guix users, recently a guix user did ping in this channel, thought there was a bug in g-golf, but as i did suspect, was actually trying a v0.8.0-a.3 against v0.8.0-a.1 ... <daviid>old: here, two examples of C and C++ libs that are (partially at least) some libs that 'later' provide <daviid>old: libvips is fully introspectable - opencv-glib is unfortunately only 'covewrs' a (very) small subset of opencv <daviid>old, last (but not least) - remember, GObject are 'just' C struct, but come with a bunch of well though, well designed, well written and well debugged functionality ... might be interesteing to 'play with' a tiny libpatch subset, make it introspectable ... then import its typelib in g-golf ... <daviid>note that i (totally) disagree with two comments made at the libvips site wrt GI: (1) '... it does not cross-compile well, since typelibs include a lot of ...' well, that is none sense, as any C lib _must_ 'describe' their C struct layout, ofc :) - (2) '... installation for your users is likely to be tricky' well, not at all, once configure pass, which means user have gobject-introspection-1.0 >= xx, glib-2.0 >= yy and gobject-2.0 >= <daviid>zz, from a user pov, it is exactly tha same as compiling any otyher C lib ... <Zambyte>Hi, is the (ice-9 psyntax) module broken right now? Importing it breaks for me <daviid>Zambyte: what guile version, what platform, how did you istall, how do youlaunch guile, then paste the error ... note that if/when psyntax does not work, guile itself does not even compile, so likely 'someting else' is going on, have to go though so i'll let others shimm in ... <Zambyte>v3.0.9 on Guix. The expression (import (ice-9 psyntax)) yields: No variable named syntax? in #<module (#{ g122}#) 7f0b47c30320> <Zambyte>Tried it from the REPL and from an R7RS library (also loaded from the REPL). Same error in both cases. <Zambyte>I get the same error using guix shell guile --pure -C -- guile <attila_lendvai>can i mix call-with-input-file and fibers? i mean, when the fibers lib suspends my fiber inside c-w-i-f, will it close the file? i see a closed file error that i'm unable to reason about <attila_lendvai>hrm, getting rid of call-with-input-file and simply using open-file "fixed" my problem... (and gave me another one) <attila_lendvai>open-pipe* really should return with (values port pid) instead of just the port <lloda>custom equality predicate for srfi-64? I can do (test-assert (custom=? args ...)) but i want the log to report args not #t/#f <old>lloda: I don't think you can do something like that <old>hmm there's no easy way. you would have to look at how it's done in srfi-64 and implement your own <old>I've tried this btw: <old> (define-syntax-rule (test-string= name expected exp ...) (let-syntax ((equal? (with-ellipsis ::: (syntax-rules () ((_ args :::) (string=? args :::))))) (test-equal name expected exp ...)) <old>I though that by binding equal? to a syntax-transform to string=? would work but nope <old>since srfi-64 generates a lot of syntaxes on its own <drakonis>wrenching it away from its mit scheme deps <old>drakonis: I wanted it to do at some point after reading it in Software Design for Flexibility <old>It it not that hard to do <old>And we might want to be able to parellelize it somehow <drakonis>apparently there has been work on that by ekmett in haskell <drakonis>old: have you published the sources anywhere? <drakonis>if you've already gotten started on it, that is. <old>I'm very busy with my master thesis and new job. That and working on guile-parallel and guile-ev <old>But I would like to start it soon <old>I want amb operator also <count3rmeasure>how useful is guile-ev right now? is it stable enough to code against? <wklew>wasn't cwebber working on a propagators impl in guile? <old>Still writting some tests for different watchers <old>API not stable. but you can already use the ffi <count3rmeasure>old: word! thanks for the answer, I've definitely got use cases in mind for it <old>I want to use guile-ev in guile-parallel for asynchronous timer and files <old>the rest is wrappers with GOOPs around the ffi <old>The difficulty reside in managing the lifetime of C structures properly <old>the wrappers does that for you <old>count3rmeasure: let me know if you have comments of the API <cow_2001>i miss python3 -m http.serve, but i don't want to install 1/2GiB just that. is there such a thing in guile? do i write my own? <cow_2001>skimmed through the info bits, but i didn't spot a file server <FiskFan1999>I was wondering, does the run-server procedure handle requests concurrently, or one at a time? <apteryx>cow_2001: yeah, the actual web server part seems left as a homework to the user <apteryx>which is a tough sell in the face of 'python3 -m http.serve' <cow_2001>maaan matrix is the unreliablest thing ever <flatwhatson>with the same handler interface as the built-in web servers, so you can swap out different server implementations