IRC channel logs

2020-07-28.log

back to list of logs

*sneek yawns
<nckx>OK, that ☝ is adorable. I've never seen that in #guix.
<mwette>sneek: what day had the largest number of logged messages on #guile
<mwette>sneek not yawning now -- hehe
<nckx>sneek doesn't understand your big wurds.
***nckx is now known as ^
***^ is now known as nckx
<rekahsoft>Hi all, I was under the impression that sfri modules came with guile. However when I attempt to load them I see "no code for module (sfri sfri-1)". Any idea what might be wrong here?
<ft>(use-modules (srfi srfi-1)) ;; Then ,d fold → Apply PROC to the elements of LIST1 ... LISTN to build a result, and return…
<ft>it's "srfi" not "sfri" (scheme request for implementation)
<rekahsoft>ft: wow, thank you. That typo was killing me :(
<ft>No problem. It happens to everyone. :)
<peanutbutterandc>Hey there! A newbie here. I'm trying to run a trace of a recursive procedure call. The book I am studying (simply scheme) does this be `trace procedurename` and then `(procedurename arguments)`, and it prints a lovely trace (in the example)
<sneek>peanutbutterandc, you have 2 messages!
<sneek>peanutbutterandc, nckx says: I don't use systemd; does <https://tobias.gr/pbc.patch> make sense? I originally wrote gnu-store.mount as WantedBy=guix-daemon to keep it ‘separate’: i.e. if the local admin disabled gnu-store.mount, starting guix-daemon wouldn't start it behind their back. Maybe that's overkill.
<sneek>peanutbutterandc, nckx says: If I added Wants=gnu-store.mount to it instead, we wouldn't need to enable/start gnu-store.mount by hand at all. Is that correct? Would it be better?
<peanutbutterandc>Now, I tried doing so with guile's ,trace (proc args...) and it was.... a mess. Since the procedure depends on a lot of other things, it kinda' plluted the output.
<peanutbutterandc>,trace (proc-defined-in-the-repl-without-any-outer-loaded-scm-files-like-factorial-for-example arg) does produce a very clean trace: as beautiful as anything. But not in this case.
<peanutbutterandc>since the procedure depends on 'simply.scm' file (custom extensions to scheme, for the book)
<peanutbutterandc>now, I did find this that seems to do the same thing as (trace ...) in the book: https://www.gnu.org/software/guile/docs/master/guile.html/Tracing-Traps.html
<peanutbutterandc>If I do (use-modules (system vm trace)), there is a (trace-calls-to-procedure) procedure which, I was hoping would work just like (trace procedure) in the book: just a trace of the calls to that procedure. But that doesn't happen.
<peanutbutterandc>TL;DR: How is one supposed to use (trace-calls-to-procedure) from (system vm trace)? I tried (trace-calls-to-procedure a-procedure) but none of the subsequent calls to (a-procedure arg) produces a trace.
<peanutbutterandc>I was hoping (trace-calls-to-procedure) from (system vm trace) would work like (trace) as in guile1.x as shown here: https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Tracing.html
<peanutbutterandc>Perhaps I am doing something wrong. Any pointers would be greatly appreciated.
<seepel1>peanutbutterandc: I think you are looking for (add-trace-at-procedure-call! proc) from (system vm trap-state) https://www.gnu.org/software/guile/docs/docs-2.0/guile-ref/High_002dLevel-Traps.html
<seepel1>Whoops, that was 2.0 documentation... maybe it's different now
<peanutbutterandc>seepel1, I read the current documentation and the name does suggest that it should trace calls to that particular procedure... curioser and curioser
<seepel1>Oh, interesting, does it error when you call a procedure that has a trace set?
<seepel1>In 2.2 it works for me, but seems to error on an internal return-handler in 3.0.
<peanutbutterandc>seepel1, No... it just doesn't do anything. No trace. It's as if I never called it. Just normal output
<peanutbutterandc>so very strange
<seepel1>Hmmm, I'm not super knowledgeable about, this so I doubt I'll be of much help. Sorry!
<peanutbutterandc>seepel1, It's all right. I appreciate your trying to help. Wonder if I'll bump in to Mr. Wingo himself anytime soon. He could surely help. :)
<peanutbutterandc>Hey, anybody here?
<dsmith-work>Tuesday Greetings, Guilers
<str1ngs>greetings dsmith-work o/
<str1ngs>sneek: later tell daviid. Just a FYI I've submitted a patch to guix which updates nomad to now use feature-g-golf https://issues.guix.gnu.org/42582. And soon I'm I'll have a 0.2.0-alpha release so feature-g-golf should be completely merged at that time.
<sneek>Will do.
<pkill9>what's g-golf?
<str1ngs>pkill9: g-golf is Guile binding to gobject introspection
<str1ngs>in the case of nomad we use it to write GTK code in pure scheme.
<str1ngs>pkill9: I submitted a patch which should fix the nomad build issue on guix.
<str1ngs>it's actually a major update not just build fix.
<pkill9>nice
<str1ngs>apologize for the inconvenience. There was no point fixing the build issue. since I was hoping to release the move to g-golf.
<pkill9>what module is 'remove' in?
<pkill9>from https://www.gnu.org/software/guile/manual/html_node/SRFI_002d1-Filtering-and-Partitioning.html
<chrislck>srfi-1.c?
<pkill9>i need something i can import
<pkill9>it says 'remove' is unbound
<dsmith-work>It's in (srfi srfi-1)
<chrislck>isn't discovering srfi-1 a rite of passage for any schemer?
<dsmith-work>pkill9: remove is implemented in srfi-1.c, but you need to (use-modules (srfi srfi-1)) to get at it.
<pkill9>thanks
<dsmith-work>chrislck: I've been (slowly) learning Haskell. What a joy to see all my old friends there for working with lists.
***terpri_ is now known as terpri
<a_v_p>FWIW, here's a daemon that I wrote using Guile-Udev that auto-mounts USB devices for seats in a multi-seat configuration according to a config: https://gitlab.com/gkaz/mst/-/blob/master/mstd/mstd
<pkill9>i like alists