IRC channel logs

2020-03-24.log

back to list of logs

<lfam>How can I make Guile not abbreviate backtraces?
<apteryx>lfam: there's supposed to be a COLUMN environment variable taken into account, but I haven't been able to make it work.
<apteryx>Perhaps because on Guix most Guile code is run by the daemon so you have to inject this variable into the daemon's environment (service).
<spk121>apteryx: it is "COLUMNS", not COLUMN
<lfam>apteryx: I have set COLUMNS=9999 in the systemd service file but it doesn't have any effect :/
<lfam>I figured out the problem I was having. I don't need to read the backtrace anymore. But I wish I knew how to view it when I need to
<lfam>It's possible that it gets reset by Guix somehow
<lfam>I see that it gets set to 200 in (guix self)
***rekado_ is now known as rekado
<rekado>alextee[m]: instead of (when (not …) …) you can use (unless …)
<alextee[m]>omg this language is great
<rekado>alextee[m]: you also don’t need the begin on line 119 because that’s implicitly provided by “when”
<rekado>same two points on lines 124 and 125
<alextee[m]>rekado: nice, thanks! just fixed that
<rekado>if you want to improve option handling somewhat (it may not be worth it for a short script like this) you can take a look at srfi-37 args-fold
<rekado>if you want to go super fancy you could even use https://gitlab.com/a-sassmannshausen/guile-config
<rekado>but I think your script looks fine
<rekado>it’s a great first program!
<alextee[m]>thanks! i'll use those anyway just so i have them there for future reference
<rekado>I haven’t used guile-config myself yet, but I always wanted to give it a try.
<alextee[m]>it looks really useful for an actual program with --help and --version and all that
<rekado>yes, and I think the declaration looks nicer than the somewhat cryptic way srfi-37 options are declared.
<chrislck>alextee[m]: now is a good time to learn emacs which will multiply your .scm productivity :)
<wleslie>it's a good time to binge zamansky
<alextee[m]>i prefer vim lol, sorry (pray for me)
<chrislck>you have our condolences
<chrislck>it's been nice
<hugo>Did my message about him and emacs get delivered? I seem to have some problems with my irc app
<wleslie>not that I saw
<wleslie>just myself, chris, and alex
<wleslie>also (begin) and (ice-9 rdelim)
<alextee[m]>hugo: nope
***mood_ is now known as mood
***sneek_ is now known as sneek
<brendyyn>how can i append bytevectors?
<civodul>there's no standard bytevector-append, alas
<brendyyn>does that alas mean you think there should be?
<civodul>yeah
<brendyyn>ok well i thought there might be a Good Reason for it. How can I define that procedure then?
<brendyyn>do i have to just make-vector a new one, and measure all their lengths etc...?
*brendyyn notes Racket has vector-append
<mwette>create bv3 with size(bv1)+size(bv2), then use bytevector-copy!
<civodul>yeah
<brendyyn>Python just uses +
<brendyyn>I'm translating some python code into guile. I've never written python though. it's an interesting experience.
<civodul>you could define a GOOPS method if you want to use + for everything :-)
<civodul>i would not recommend it, though
<brendyyn>probably not a good idea
<spk121>I wonder how hard it would be to extract g_module from GLib to replace libltdl? I find libltdl's error message uninformative, but, unfortunately libtool is effectively unmaintained
<wingo>spk121: i would dearly love to kill our ltdl dep
<wingo>i gave it a look at one point but it was gnarlier than expected
<civodul>does macOS have dlopen now?
<mwette>civodul: yes
<mwette>civodul: at least dynamic-link works on my guile on macOS; let me check lower level
<spk121>civodul: google says there is a macos man page for dlopen()
***sneek_ is now known as sneek
<spk121>brendyyn: the README for guile-gi should now be closer to correct for Guix
<brendyyn>spk121: Thank you kindly.
<mwette>verified on 10.14.6, program using only /usr/bin/gcc, and dlopen("/path/to/lib", RTLD_NOW)
<civodul>spk121: ok
<spk121>gnulib's dlopen would get your everything common except mingw & native windows
<brendyyn>bytevector-append https://paste.debian.net/1136350/
<spk121>brendyyn: nice. works for me
<brendyyn>spk121: do you think my implementation is good?
<brendyyn>$_$ bye
<chrislck>the (begin) is redundant
<brendyyn>right. i had an if there before
<brendyyn>for bytevector-copy!, eldoc is only showing the first 3 arguments in the modeline
<bricewge>Hello
<bricewge>Can get-bytevector-n! block?
***oni-on-ion is now known as ear-the-art
<civodul>bricewge: i think so
<bricewge>civodul: Are there any non blocking procedure to get bytevector? I can't manage to find one.
<civodul>bricewge: not as such, but see "suspendable ports"
<bricewge>Thanks, I'm reading it.
<mwette>bricewge: maybe (ice-9 futures) can help
<mwette>oops, missed the context -- nevermind
<wingo>mooooo