IRC channel logs

2023-05-04.log

back to list of logs

<flatwhatson>old: re: parameter vs thread-local fluid, did you mean parameter object? shouldn't that be equivalent to a fluid?
<old>flatwhatson: it is. but there's actual thread-fluid
<old>which are not captured by dynamic-state
<old>which is problematic in guile-parallel because I'm trying to use statprof on scheduler threads
<old>however, the job are executed in a captured dynamic state, which confuse the state of statprof
<old>setting the statprof to a thread-fluid makes it resistant to change in dynamic-state, which is great for context-switching!
<flatwhatson>ah interesting. did you have to hack statprof for that?
<old>basically copy/paste statprof.scm in the projet and change the parameter for a thread fluid
<flatwhatson>my attempt at a hygienic high-level ffi: https://notabug.org/flatwhatson/guile-openai/commit/8ca1f32a51419bb454419673a7990cc2f46476ca
<old>flatwhatson: here's mine for guile-ev: https://git.sr.ht/~old/guile-ev/tree/master/item/ev/foreign.scm
<old>and its usage here: https://git.sr.ht/~old/guile-ev/tree/master/item/ev/ffi.scm.in
<old>It's kind of slow though. Compiling ffi.scm is very long :-/
<civodul>old: i just mapped your nickname to your real name! :-)
<old>civodul: ^^
<civodul>you're doing HPC stuff when you don't write Guile code, right?
<old>Not really. I do instrumentation related stuff
<old>right now I do work on a HPC exascale project, on the instrumentation part.
<dthompson>can anyone explain the mysterious 3rd argument to call-with-values when looking at a backtrace?
<dthompson>run this: (call-with-values (lambda () (error 'oh-no)) list)
<dthompson>then ,bt in the debugger
<dthompson>and you'll see a frame like: 2 (_ #<procedure c32b18 at <unknown port>:34:18 ()> #<procedure list _> 1)
<dthompson>what the heck is the 1 doing at the end of the call?
<dthompson>and how about something even stranger: (append '(a b c) (call-with-values (lambda () (error 'oh-no)) list))
<dthompson>backtrace frame: 2 (_ #<procedure c346e0 at <unknown port>:37:35 ()> #<procedure list _> . #<unknown-type (0xb . 0x304) @ 0x7fe944c8d280>)
<dthompson>even worse, want to make guile segfault?
<dthompson>eval: (symbol? (call-with-values (lambda () (error 'oh-no)) list))
<dthompson>then run ,bt and say bye-bye repl
<Arsen>heh, nice
<dthompson>seems like a VM bug
<dthompson>or something... I dunno. going to file a bug report
<old>are we playing segfault golf?
<dthompson>yes :)
<dthompson>this took me quite some hours, actually
<dthompson>over at Spritely, we were scratching our heads over a very strange segfault issue
<old>try me. I'm a good hunter for that
<dthompson>after some fiddling with gdb, I traced it to frame-local-ref.
<dthompson>and after some more time I traced it to call-with-values stack frames.
<dthompson>the hunt is over :)
<dthompson>I'm about to file a bug report
<old>ah okay it was that ^^
<dthompson>bug report filed. zero thanks to gmail for mangling my original text with its auto word wrap -_-
<dthompson>this is what I deserve for still using gmail...
<old>*laught in emacs-notmuch*
<dthompson>;)
<dthompson>used to use that with offlineimap but got sick of dealing with it
<old>dthompson: I kind of have mix feeling toward it
<old>mu4e was great last time I used it. Perhaps I should migrate back to this workflow.