IRC channel logs
2023-12-10.log
back to list of logs
<euouae>I have this script to run tests on my project <euouae>I'm also trying to run this <https://termbin.com/3job> from the command line with either `env GUILE_LOAD_PATH=. guile -e main -s foo.scm` or `-l foo.scm` but neither work <euouae>I have a bar.scm with a define-module and a `message` variable. Why is this not working? I've also tried compiling it with guild but I get an error about message being potentially undefined <apteryx>is there something like map that also provides the index of the item in the list? <dsmith>enzuru, Use ((= i 10)) instead of (= i 10) <dsmith>sneek, later tell euouae Use ((= i 10)) instead of (= i 10) <ieugen>I am trying to learn guile while doing adventof code and I get an error message that does not help at all <ieugen>ice-9/boot-9.scm:1676:22: In procedure raise-exception: <ieugen>I am also finding emacs very unfriendly to work with ... <Arsen>emacs' a bit of a steep learning curve, yeah <Arsen>ieugen: your error happens because one of your start indices are outside the bounds of your string <Arsen>try, for instance, (string-contains "abcd" "b" 5) in the repl <ieugen>thank you Arsen: but is guile error reportin so "bad" ? I did a lot of coding in java and you get a wall of text but you can track the line that caused it <ieugen>any way I can display the stack trace here ? <Arsen>though, for some reason it printed: <Arsen> 0 (string-contains "nine" 4 8 #<undefined> #<undefined> #) <ieugen>ice-9/boot-9.scm:1676:22: In procedure raise-exception: <Arsen>hopefully (guile)Debugging can shed some light <Arsen>hmm, which guile version is that <ieugen>I dno't know how to debug - especially in Emacs - which is something new as well <ieugen>* I do know how to debug - but not in Emacs <Arsen>ah, I was running it directly. I don't recall exactly how geiser works <Arsen>(geiser being the scheme integration for emacs) <RhodiumToad>you might get more or better info by invoking guile as guile --debug <Arsen>guile does have when, (let ((x 5)) (when (= x 4) (display "foo\n"))) <ieugen>yes, but clojure when returns nil if condition is not true while guile returns unspecified <ieugen>it's hard to find that through all the manual <Arsen>well, the documentation for 'when'/'unless' defers to 'if', which states: <Arsen> When ALTERNATE is omitted and the TEST evaluates to â#fâ, the value <Arsen> of the expression is not specified. <ieugen>hence why I miss something like clojuredocs.org - it's very usefull - esp if you not familiar with functions <Arsen>I can't say I've ever used or seen clojure docs <Arsen>I'm sure improvements to guile docs are welcome