IRC channel logs

2022-07-30.log

back to list of logs

<rgherdt>Hi! Sometimes I'm struggling debugging my Guile code. It seems lots of information are optmized away and my stack traces are full of "with-fluid* ..." calls, missing functions that were actually called. I'm already compiling the code with "guild compile -O0 ...", but it didn't help. Is there a way to get more meaningful stack traces of guile, maybe some flag I'm missing?
<rgherdt>I'm using guile 3.0.5 btw
<lilyp>rgherdt: Perhaps the missing function calls are tail-optimized? TCO is part of the scheme spec
<lilyp>in any case, peek is your friend, as is call-with-trace
<rgherdt>lilyp: thanks, that could be the case. I see that tail-optimization is mandatory, but maybe there are workarounds that could be explored in the future (maybe in some sorf of "debug mode"). Chicken's interpreter, for instance, does a nice job producing a somewhat accurate call chain, no idea what goes in the background though. Thanks for mentioning peek and call-with-trace, I wasn't aware of either (only the REPL's tracing features).
<andrzejku>ohh why scheme has so strange name
<andrzejku>for the tesitng library
<andrzejku>srfi-64
<andrzejku>ohh this is
<andrzejku> https://practical-scheme.net/wiliki/schemexref.cgi?SRFI
<andrzejku>like requirements
<lilyp>andrzejku: that's because after 63 Scheme Requests For Implementation of other things, the 64th specified unit tests
<andrzejku>lilyp: yes I just find what does it mean
<andrzejku>at first glance srfi means nothing :P
<andrzejku>but now I understand
<chrislck>srfi means surfer, which comes from the srfi.schemers.org logo
<chrislck>[*] ^ this part may not be true
<lilyp>I already explained that it's Scheme Request for Implementation tho 🤨️