IRC channel logs

2021-06-02.log

back to list of logs

<dsmith-work>leoprikler: Heh. I can't tell if that means cargo is a good thing or not.
<leoprikler>I would call it contemporary baggage, but that's just me.
<amirouche>hey :)
<amirouche>I am reading on foldts, foldts* and foldts*-values
<amirouche>As far as I understand those are very important for guile because that is the tool used to describe the transformation of the guile IL / IR called tree-il (module/language/tree-il)
<amirouche>sort of like what nanopass framework is for chez.
<amirouche>here is the associated paper https://wingolog.org/pub/fold-and-xml-transformation.pdf
<amirouche>here is the documentation https://www.gnu.org/software/guile/manual/html_node/SXML-Tree-Fold.html
<amirouche>my first question is / was stupid: what is the point of -values variants, afaiu it does not matter, one could pass a list as seed to fold and its variants.
<amirouche>I am correct to think that foldts* allows to rewrite a tree in context sensitive manner, without building a closure?
<amirouche>That is exactly what is explained in section 3 of the above paper.
<amirouche>That is prolly overkill: is there a variant of fold that support cyclic data structures?
<lloda>found something about my problem with readline
<lloda>once I call some gl functions, guile-readline starts calling into libedit2 instead of libreadline
<lloda>so everything gets corrupted and i get crashes in short order
<lloda>my program doesn't use libedit2 or libreadline except through Guile
<lloda>i've compiled guile with --with-libreadline-prefix=/opt/readline/ and i compiled readline from source
<lloda>libedit2 is a dependence of some of the gl libraries in debian and I cannot remove it
<lloda>but I don't understand how the switcheroo is possible at all
<lloda>neither guile nor my program are linked to libedit2
<lloda>directly, i suppose i should say
<wingo>i would guess ELF superposition
<sneek>Welcome back wingo, you have 1 message!
<sneek>wingo, maximed says: When using #:drain? #t, I notice some fibers are not actually run to completion (tested by adding a few (pk 'i fiber-index); some indices are missing from the log). Does that sound a bell? (I need to make a minimal test case & try to work-around with condition variables)
<wingo>or imposition or whatever that is
<wingo>weird thing is, guile loads guile-readline via load-extension which doesn't pass RTDL_GLOBAL
<wingo>so am not sure exactly how the interposition would work
<lloda>>:(
<dsmith-work>As usual, an strace might reveal what is loading what.
<lloda>dsmith-work: thx, i should learn how to use that. I used gdb
<dsmith-work>So libedit2 provides the same api/abi as libreadline? Sounds similar to a problem I had with apache.
<dsmith-work>Apache provided it's own regex, and it was statically linked into the exec. The functions were nameed the same as the libc ones, but the actual structures were different and had different sizes.
<lloda>even if the libraries are byte identical their runtime data wouldn't match
<lloda>this is a bit of a nightmare tbh
<dsmith-work>Yep.
<lloda>that's why my history was always being deleted, i was building it up in libreadline but when the program was closed it was calling libedit2's functions to write it out and of course for libedit2 there wasn't any history
<dsmith-work>So what I ended up doing was #include'ing the apache headers
<dsmith-work> https://cvs.savannah.nongnu.org/viewvc/mod-guile/mod-guile/mod_guile.c?revision=1.3&view=markup#l703
<dsmith-work>lloda: That's not going to help with readline :(
<lloda>i'm trying to link readline statically
<dsmith-work>lloda: Good chance that's not going to work. The code that calls into libedit will probably call into your staticly linked libreadline. Unless you can hide the symbols.
<lloda>my bet is that no one is calling into libedit and it's a spurious dependence
<lloda>else I'll try to use libedit with Guile and remove libreadline
<lloda>this elf interposition sounds gross
<dsmith-work>There *are* ways to hide symbols.
<lloda>but i have no control of the other library
<dsmith-work>I was thinking staticlly link readline, and somehow not expose the global symbols.
<dsmith-work>So ldso (or whatever) doesn't see them when it links in libedit
<lloda>yeah it doesn't work
<lloda>i mean linking statically doesn't work
<lloda>still finds the symbol on the other library
<dsmith-work>Something with __(attribute)__ hidden? Looking for it..
<dsmith-work> https://gcc.gnu.org/onlinedocs/gcc-8.5.0/gcc/Code-Gen-Options.html#Code-Gen-Options
<dsmith-work>Near the very bottom -fvisibility=[default|internal|hidden|protected]
<dsmith-work>lloda: I wish you the best. Looks like a very nasty problem.
<dsmith-work>Oh, and this might help: https://gcc.gnu.org/wiki/Visibility
<dsmith-work>The real problem remains, a clash between two libraries providing the same function symols but with different data structures.
<dsmith-work>Maybe if there was a way to rename things..
<dsmith-work>And https://holtstrom.com/michael/blog/post/437/Shared-Library-Symbol-Conflicts-%28on-Linux%29.html
<dsmith-work>lloda: Make a symlink libedit2 -> libreadline ;^}
<apteryx_>there's no equivalent to gdb's 'list' in the Guile debugger, correct?
<lloda>i'm trying the symlink now dsmith-work x_x
<lloda>guile complains that readline is missing functions and is too old :p
<apteryx_>It seems most of my debugging in Guile Scheme is at the primitive 'print' level (pk in the sources) and the occasional ,trace at the REPL. I haven't become good at using ,break and ,step yet, it seems. Is it me, or is it notoriously tricky to use the 'live' debugger?
<lloda>symlink method failed as there's a libreadline.so.7 that a ton of stuff depends on that gets in the way as well
<lloda>apteryx_: i have tried a couple times and given up
<dsmith-work>lloda: The symlink *was* a joke.
<lloda>on me, then haha
<lloda>it would have worked if it wasn't for the other library tho
<dsmith-work>On an old mac-mini, they provide something that looks like readline, but isn't. So at build time, guile thinks it has readline, but at runtime, it was failing to find certain symbols.
<dsmith-work>I think they had a symlink from readline -> whaeveritwas
<lloda>i think i've seen that
<lloda>as long as there is only ONE, i guess
<apteryx_>one thing about the debbugger I haven't sorted out is how to break at a specific line. I'm trying ,bs NNN, but it wants a file argument. So I try for example ,bs the-module.scm 529 and it says: No procedures found at ~a:~a. "the-module.scm" 529. Ideas?
<apteryx_>ah OK, it wanted the absolute path of the file
<apteryx_>nevermind, relative path is fine if I adjust the cwd of the REPL first.
<stis>heya guilers!
<dsmith-work>stis: Heya! How goes the Python battle?
<stis>forward, been enjoying nice weather recently though
<apteryx_>what seems to work best for debugging is; ,break some-proc. Then run the code exercising the proc at some point. Then define an Emacs macro for ,step RET ,backtrace #:full?
<apteryx_>that way you can step at the press of a button and keep track of the locals in every frame.
<apteryx_>err, should have been ',step RET ,backtrace #:full? #t'
<apteryx_>F3 to start recording the macro, F4 to stop recording. F4 again to play back.
***jackhill is now known as KM4MBG
<lloda>found a couple links reporting similar problems
<lloda> https://developer.blender.org/T43491
<lloda> https://bugzilla.redhat.com/show_bug.cgi?id=1201897
***KM4MBG is now known as jackhill
<lispmacs[work]>hi, I'm needing to process an input stream as a series of whitespace delimited tokens, and am wondering what guile tools / modules would be useful
<manumanumanu>lispmacs[work]: guile-dsv might be useful, but that is for actualy DSV
<amirouche>later tell maximed use fibers issues and ping @amirouche
<amirouche>sneek: later tell maximed use fibers issues and ping @amirouche
<sneek>Will do.
<amirouche>sneek: later tell maximed and/or ping me here
<sneek>Will do.
<drakonis>dsmith: hey, where would i find the source for sneek? I'd like to use it in a private channel
<dsmith-work>drakonis: Ahh. Good quesiton.
*dsmith-work looks
<nckx>The core is bobot++ (https://unknownlamer.org/code/bobot.html), that much I know.
*nckx knew a thing, gets snack.
<dsmith-work>drakonis: Know that is is merely a dump of what I have. It's not ready as something you can run.
<dsmith-work>drakonis: https://gitlab.com/dalepsmith/sneek
<dsmith-work>drakonis: The old sarahbot is at https://github.com/igorhvr/bedlam.git under sisc/sisc-contrib/irc/scheme/sarah
<drakonis>thanks
<dsmith-work>drakonis: I basically wanted to run sarahbot, but on Guile instead of sisc
<drakonis>neat.