<apteryx>what's the most efficient way to read a compressed file using guile-zstd or guile-zlib and write the decompressed data to a 2nd file? <apteryx>currently I had: (call-with-input-file "/tmp/chromium-98.0.4758.102.tar.zst" (lambda (port) (call-with-zstd-input-port port (lambda (port) (call-with-output-file "/tmp/chromium-98.0.4758.102-zstd-decompressed.tar" (lambda (p) (format p (get-string-all port)))))))) <apteryx>I'm trying to benchmark guile-zstd vs guile-zlib <tohoyn>daviid: even though gtk-widget-class-path is deprecated this may be some internal error in G-Golf <tohoyn>daviid: as the procedure is deprecated it probably does not make sense to make an overridden version of it <tohoyn>sneek: later tell daviid I posted some messages about G-Golf and gtk-widget-class-path <civodul>not sure how to combine to events in Fibers, like: wait until fd is available for read *or* some timeout has expired <civodul>i can suspend and do both schedule-task-when-fd-readable + schedule-task-at-time <civodul>(expiry would happen even if the fd became readable in the meantime, etc.) <civodul>and since there's no "operation" corresponding to "wait for fd", you can't just combine them the usual way <ArneBab>wingo: since Guile uses type-constraints during optimization already, would it be possible to expose that for warnings like the existing “called with wrong number of parameters”? <ArneBab>wingo: this throws a nice warning: (define (a b) b)(define (c)(a)) <wingo>ArneBab: that should exist, see -Warity iirc <ArneBab>What I mean is this: (define (c a) (when (number? a) (string-append "Hello " a))) <ArneBab>The call to string-append is guaranteed to fail. <ArneBab>Would it be possible to catch that at compile-time? <ArneBab>When I call it, I get for example (c 5) ⇒ In procedure string-append: Wrong type (expecting string): 5 <ArneBab>wingo: (sorry for the long intro — wanted to give the context of what already exists but hadn’t yet reached the actual question …) <wingo>humm, it's certainly possible <wingo>the issue is that right now warnings are on the tree-il level but the flow analysis to recover types is on the cps level. also the type info is more expensive to compute <wingo>to my mind a language layer like typed racket is more appropriate <ArneBab>wingo: Could we create something like typed racket in a way that improves performance in Guile programs? <wingo>well... the issue isn't typed racket performance. it's composition of typed and untyped modules, and specifically the overhead of contracts. if your whole program is typed, typed racket is a win <civodul>otherwise it can be achieved with one fiber that sleeps, a second one that calls peek-char, with both sending an updated to a common channel and the main fiber reading from that channel ***karlosz_ is now known as karlosz
<d4ryus>civodul: Uh yes, thats quite elegant :) <ArneBab>Is there a good way to avoid (or minimize) that contract-overhead? ***karlosz_ is now known as karlosz
***karlosz_ is now known as karlosz