IRC channel logs

2022-05-04.log

back to list of logs

<taw10>I have a Guile module which needs to do some initialisation (starting a thread), which seems to work. I just put the relevant procedure call in the top level of the module. But now when I try to do other things in the same way (add debug statements to solve a probably unrelated issue), they don't always seem to get called. Is it wrong to do "work" in the module like this? Should I instead require the
<taw10>user of the module to explicitly call the initialisation procedure?
<attila_lendvai_>i'm using guile in a shebang line; is there some trick to add relative load-path entries using -L ?
*attila_lendvai_ has found (add-to-load-path (string-append (dirname (current-filename)) "/.."))
***attila_lendvai_ is now known as attila_lendvai
<mwette>Anyone on ubuntu-22.04? I rebuilt guile 3.0.8. If I start guile in gdb it crashes (SIGSEGV) in GC_find_limit_with_bound : https://paste.debian.net/1239912/
<mwette>^ gdb worked fine (IIRC) on ubuntu-21.10 (fresh rebuild)
<dsmith-work>Hey Hi Howdy, Guilers
<dsmith-work>taw10: Look into eval-when https://www.gnu.org/software/guile/manual/html_node/Eval-When.html
<dsmith-work>!uptime
<sneek>I've been running for 23 days
<sneek>This system has been up 3 weeks, 2 days, 15 hours, 33 minutes
<dsmith-work>taw10: You probably want to call your function on "load".
<dsmith-work>taw10: Do you have a cat?
<taw10>dsmith-work: Thanks. I'd heard of eval-when, but wasn't sure how it applied to this situation.
<dirtcastle>best resource to learn guile
<dirtcastle>?
<tricon>dirtcastle: I've just been using the Guile Reference as-needed. If you have experience with Lisp, this may be sufficient.
<dirtcastle>tricon: I know very little elisp and common lisp.
<tricon>dirtcastle: this may be of interest: https://www.scheme.com/tspl4/
<tricon>dirtcastle: then the Guile Ref. becomes good for the Guile-specific details.
<tricon>dirtcastle: and this re: Emacs support: https://alexott.net/en/writings/emacs-devenv/EmacsScheme.html
<dirtcastle>thanks for your time!!! tricon
<dirtcastle>i was asking the same question in #guix. idk what to think abt recommendation not overlapping at all.
<attila_lendvai>is there some util somewhere that makes it easy to download http content into a local file?
<tricon>attila_lendvai: like wget or curl?
<attila_lendvai>tricon, yes
<tricon>i'll sometimes: curl https://... > file.html
<attila_lendvai>hrm, maybe i should just invoke them...?
<tricon>you could also look at the web module built into Guile.
<tricon>i've been using this to write both a client and a server for an API.
<tricon>attila_lendvai: specifically: (use-modules (web response)) and (use-modules (web client))
<tricon>you could then output the body of the request to a file: (with-output-to-file ...)
<tricon>if it's not urgent, i could put up a generic example tomorrow for ya.
<attila_lendvai>this looks doable... now i just need a handy way to copy from one port to another. i'm sure there's some util somewhere...
<attila_lendvai>tricon, i'll soon call it a day, so it's not urgent. if you add something to the guile repo, that's also fine, i'm happy to duplicate it locally until it reaches a release
<mwette>github.com/spk121/guile-curl
<tricon>mwette: well well. thank you, mwette.
*attila_lendvai is grateful for all the help
***daviid` is now known as daviid