IRC channel logs

2024-07-07.log

back to list of logs

<chrislck>sneek: botsnack
<sneek>:)
<dgr>why do I get: no code for module (crafty utils args) as ./modules/crafty/utils/args.scm exists?
<dsmith>dgr, Is ./modules in your %load-path ?
<sneek>Yey! chrislck is back :)
<dgr>dsmith: right above (add-to-load-path) is used and it works in the repl (minus current-filename but the modules load)
<dgr>(when (current-filename) (add-to-load-path (string-append (dirname (current-filename)) "/modules")))
<sneek>tohoyn: Greetings!
<tohoyn>sneek: botsnack
<sneek>:)
<graywolf>Given a binding, is it possible to figure out from which module it came from?
<dsmith>dgr, Hmm. "/modeles" or "./modules" ?
<dsmith>Bah. typo
<dsmith>"/m..." or "./m..."
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>goodbot
<sneek>ACTION wags
<dsmith>dgr, Another thing, is to strace it. Always handy for figureing out file finding issues
<dsmith>Also, forget my "./" noise. Didn't read your example clearly
<dgr>dsmith: a lot of data in the strace and I don't know which is signal and which is noise
<dsmith>Use -o to write to a file and then grep for "args.scm", Also, can use -efile to just log file syscalls
<dgr>dsmith: https://paste.debian.net/1322608
<dgr>all the lines containing utils/args
<dsmith>Finds something on line 19
<dgr>line 19 is the correct file
<dsmith>So it found it? Maybe need to clear out .cache/guile/ccache ?
<dsmith>dgr, I'm going out for a while, maybe someone else can assist..
<dgr>error persists after clearing ccache but it looked like the .go got build
<dgr>dsmith: thx
<rlb>dgr: iirc that error may indicate that the module's fs path and content don't agree, i.e. guile found foo/bar.scm when trying to load (foo bar), but after loading the file, no (foo bar) module was defined.
<rlb>...say if you had a typo in the define-module in the file, or...
<dgr>rlb: (define-module (crafty utils args) #:export (process-cli-arguments get-option))
<rlb>I wonder if that failed readlink later is expected.
<dgr>rlb: I guess as it's the proper file and not a link
<rlb>OK, and sounds like you rm -rf'ed the relevant .cache tree...
<rlb>If you can modify those files, could print from the top, just to verify that it's actually loading the file one of those times. And if so, then I'd guess it's something to do with the content of the file, i.e. by the time it gets to the end, it still hasn't defined the module "somehow".
<dgr>test got printed
<dgr>so I guess I just try to finish the assignment and maybe I get the warning to go away...
<rlb>Oh...
<dgr>?
<rlb>I didn't realize things were actually working in the end. If so, then maybe that message is coming from an earlier failed attempt in the search to load a crafty/utils/args.scm.
<dgr>same here, I didn't expect the test string to print
<dgr>guile errors are still quite strange to me
<rlb>I'm sure we can eventually track it down if it's causing you trouble, and if you did end up neededing to pursue it, I might look at the stat output right around the successes (i.e. where fstat returns 0) to see "what happened next". Did it then successfully open and read the file, etc.
<dgr>thx
<valorzard>hey so, does nayone here know about hoot?
<valorzard>it seems really cool and i wanna check it out
<dgr>valorzard: maybe have a look at the spring lisp game jam 2024 streams like https://fluxharmonic.itch.io/lambda-dungeon
<valorzard>oh i already saw that
<valorzard>i meant more like, i wanna try it myself
<mwette> https://spritely.institute/news/guile-hoot-v041-released.html