IRC channel logs

2025-01-12.log

back to list of logs

<rgherdt>mwette, dthompson: I investigated the bug in type-fold but couldn't come much further. I submitted a bug report: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75504
<mwette>rgherdt: I could not spot what the bug is. I interpreted dthompson's response that he had an idea.
<lechner>mwette / is your home safe?
<mwette>yes; no longer in evac warning
<lechner>okay, glad to read that
<lechner>the area east of pasadena was in the news due to eaton, but i guess the wind turned eastward
<lechner>mwette / by the way, i'm not sure the arguments in callbacks are boxed in cdata, but maybe i misunderstood https://bpa.st/ZOEQ
<dodoyada>I typically use htmx for front end so I'm usually writing html server side with a bunch of attributes on elements. In clojure I'll commonly do things like (merge {:hx-post "/some-path" ...many more attributes} {:hx-post "/some-override-path"}) directly within my hiccup html, how would I do a similar thing with sxml in guile? I will often have something like `(input (@ (type "text") ... (hx-post ,post-to)) but I want to be able t
<dodoyada>it with swathes (eh 3 or 4) of attributes at once, and I know ,@ will let me do something like add '((a 1)(bunch 2)(of 3)(attributes 4)) but I don't see how I would overwrite any defaults (without splitting things into a bunch of functions, though that isn't bad, I just like to have it all colocated). Maybe I'm just asking how to (merge '((...pairs)) '((...pairs))) in scheme
<dodoyada>fwiw I can do that myself but I would like to use guile idiomatically
<ArneBab>sneek: later tell dthompson can the checks in define-typed be stripped by the compiler if a procedure is only used in places where the types have already been checked? Or does that require inlining?
<sneek>Okay.
<ArneBab>ACTION thinks it would be great to have every Guile concerning wingolog entry posted here. Had missed the one from 3 days ago.
<ArneBab>"Whippet’s algorithm is derived from what SpiderMonkey does, but extended to be parallel." ← this is seriously awesome. Thank you, Andy wingo! And I expect that it can have a big impact: in r7rs tests I recently checked where Guile takes about twice as much time as racket, most time is spent in GC.
<ArneBab>I think it would be neat if we would manage to identify generalizable innovations wingo finds to writing performant Guile Scheme and add them to ice-9. Similar for what dthompson is doing.
<ArneBab>I finally finished a patch to include a doctests to Guile (sent to guile-devel). Once that’s merged, the minimum tested procedure is (define (tested) #((tests (test-equal #f (tested)))) #f) — I’ve been using this for years and finally got to upstream it.
<ArneBab>This has simplified test-driven-development with Guile a lot for me and I think it will be useful to many more people. For me it lowers the barrier to adding a test a lot.
<sneek>Welcome back dsmith!
<dsmith>sneek, botsnack
<sneek>:)
<mwette>Should `and=>' be a scheme-indent-function-1 ?
<rlb>Been doing a bit of bug tracker maint, and got to this -- anyone know whether it should be considered a bug? https://debbugs.gnu.org/39395
<rlb>ayncs.test still fails after not very many iterations via (while ./check-guile asyncs.test; do true; done) -- I haven't delved, but if anyone here is more familiar with that area atm...
<stevelitt>Pre-boot error; key: misc-error, args: ("primitive-load-path" "Unable to find file ~S in load path" ("ice-9/boot-9") #f)Aborted
<stevelitt>I installed exactly according to https://www.gnu.org/software/guile/manual/html_node/Obtaining-and-Installing-Guile.html and its INSTALL file.
<stevelitt>I tried it with and without --prefix=/usr/local
<stevelitt>I tried as user slitt (with make-install being done as root) and as user root
<mwette>What architecture (e.g., via uname -m)?
<stevelitt>Void Linux, on an Athlon 6 core with 64GB RAM, but I don't like the Void guile package because it doesn't give me everything I need to follow along with the manual.
<stevelitt>By the way, *ONCE* it didn't give this error message, when I was in guile-3.10.0 and ran libguile/guile . But then I tried to put that directory on the path, logged out of Openbox, logged out and logged in, and even libguile/guile no longer worked.
<mwette>hmm. I'd look in logs to see if anything went wrong on the build earlier (e.g., configure). Also, I'd check environment to see if anything odd is there, but ordinarily the build clears env vars.
<stevelitt> https://dpaste.com/F2G4698PJ shows all my files related to ice-9/bind-9
<stevelitt>Which logs? What are their filenames?
<mwette>Like you, I always build as non-root and install as root. The only thing I do different is build in different dir: mkdir build; cd build; ../configure ...
<mwette>config.log
<mwette>and I usually do `make >& MakeOut ; tail -f MakeOut' so I can keep the make output
<mwette>try `--disable-fast-install'
<mwette>^ with configure
<mwette>I believe that does not use the pre-built .go's
<rlb>stevelitt: are you working from a clone or from a release archive?
<mwette>the link above indicated he's starting with a tarball
<rlb>Ahh, ok.
<rlb>I haven't done that for a while.
<stevelitt>rlb, I'm working from guile-3.0.10.tar.gz
<rlb>stevelitt: may not affect you, but note that 3.0.10 is definitely broken on 32-bit, but offhand I don't think you're seeing what I'd expect there.
<stevelitt>I *hope* I'm using 64. That was my intent.
<rlb>I mean as long as your host is (and looking, I think maybe you said that above).
<rlb>We should change that install link from ftp:// to https://...?
<rlb>(though of course if you're going to verify the signature, then wouldn't matter, but I'm guessing for many people https would be an improvement, because they're not going to verify)
<rlb>stevelitt: trying the instructions here, fwiw.
<stevelitt>I tried to verify the signature but didn't know how. I have the .sig file downloaded.
<rlb>(Ideally, I suppose, we should have some flavor of instructions/recommendations for that there too.)
<stevelitt>When you start it, do you go down to dirctory build and then ../configure --disable-fast-install ?
<rlb>I'm just doing exactly what it says (except https)
<rlb>but with ./configure --prefix /home/rlb/opt/guile-tgz
<rlb>(well *effectively* exactly, i.e. using "make -j5" to speed things up, etc.)
<stevelitt>I didn't know about make -j5 . Make took 29 minutes on my machine.
<rlb>Interesting -- it's re-bootstrapping, i.e. stage0 eval and psyntax-pp. I thought the tgzs were supposed to let you skip that.
<rlb>ACTION starts over with "tar xvpf" to see if that matters.
<rlb>I would have though tnot.
<stevelitt>I used tar xzvf .
<rlb>Or maybe they don't skip everything? (As mentioned, haven't built from an archive in *ages*, either locally, or wrt packaging -- debians source comes from git, not the archives.)
<rlb>"debian's"
<rlb>...yeah, still eval stage0, but if it only took you 28m with one core, then it must be using mostly pre-generated files -- or you may actually have a cpu from the future.
<stevelitt>Why did you --prefix /home/rlb/opt/guile-tgz ? You aready have one in /usr/local?
<stevelitt>I have 6 cores, 12 threads.
<rlb>Sure -- but you'll only use one without -jN
<rlb>I pretty much never use /usr/local -- also, this is just a throwaway build :)
<stevelitt>What's -jN ?
<mwette>make -jN uses N threads to execute the make; so parts can be done in parallel
<rlb>...but only for projects that can handle it -- fortunately guile does fairly solidly.
<rlb>was I wrong to think that an archive based build might be intended to skip a lot of stag0?
<stevelitt>Hmmmm, my temperature got up to 135F during the bootstrapping phase, so maybe I should leave well enough alone.
<lechner>mwette / anything wrong with -j (without a number)?
<lechner>mwette / re and=>, scheme-indent-function 1 sounds great. maybe then I would line-break more often after it
<rlb>lechner: fwiw, I suspect that might be a decelerator in some cases...
<rlb>i.e. if it swamps the machine "caches" wise, etc.
<lechner>linux has a scheduler
<rlb>it does, but launching a ton of processes that are going to be thrashing with each other isn't free.
<rlb>iirc how -j works.
<lechner>it's not a fork bomb
<lechner>anyway, it's not a big point. more of pet peeve
<rlb>yes, but iirc it can launch a flood before the the control loop stablizes, but again, would hav to refresh -- I thoought I'd had that happen and it wasn't pretty in the past, but of course, trivial to test for the cases that matter.
<lechner>okay
<rlb>fwiw, I usually just pick a number a bit higher than the core count, closer to it if I know it's cpu bound (as guile's build is), or further out if it's more balanced wrt io.
<rlb>Oh, and I may well be wrong there -- just commenting on where I'd ended up atm :)
<rlb>wrt -j
<lechner>my computer has crashed plenty, but never from make -j
<rlb>Oh, it wasn't crashing -- just swamping up front and then recovering.
<rlb>and I *think* I may have tested -j and -jN for some cases I cared about to end up with what I do now, but even if so, that was a long while back (things may have changed)
<stevelitt>I have guile-3.0.10.tar.gz and guile-3.0.10.tar.gz.sig . How do I check that they match?
<lechner>stevelitt / is that a GPG question?
<stevelitt>I think so.
<lechner>i think it's gpg --verify sig tarball but not sure
<lechner>actually, with a detached signature gpg --verify sig should be enough if the file names are similar
<rlb>...you'll also need to have the "right" key in your keyring (or a keyring you tell gpg to use), which is a whole other topic.
<rlb>stevelitt: I forgot -- "make -jN check" at least is also broken with 3.0.10 -- fixed in current main.
<rlb>FAIL: bit-operations.test: bit-extract: documented?
<lechner>oh yeah, key rings can be annoying
<lechner> https://paste.mozilla.org/TJS9Hxu7
<rlb>stevelitt: ok, so that worked here (ignoring the make check error), i.e. "./configure --prefix=/home/rlb/opt/guile-tgz && make install" and then: https://paste.debian.net/hidden/99829e7e/
<rlb>You might want to try that same thing first, see if that works -- that might narrow it down to "something with /usr/local", i.e. could you have a perms issue, or...
<rlb>(i.e. see if a build install just for the user works)
<lechner>sneek / later tell mwette / Hi, have you considered requiring module prefixes when users work with your generated files? In my case, I always use something like libpam:ffi-pam-symbol-value and wish it were named more simply libpam:resolve-c-define or so
<sneek>Will do.
<stevelitt>This is interesting: https://dpaste.com/797BKTMMZ
<stevelitt>rlb, my md5sum for guile-3.0.10.tar.gz is 0bf81de9444856aedf1bb3e829d61c06 . Do you get the same md5sum? Perhaps I got the wrong tarball.
<rlb>That's what I have.
<stevelitt>Good, that rules out one explanation.
<dsmith>stevelitt, Does that linux use glibc or musl?
<stevelitt>glibc
<dsmith>ok
<rlb>stevelitt: I'd try the user-only build first, but another option if you're comfortable with it, is to try "strace -f -o tmp-log guile ..." and then see what it's looking for when it can't find boot-9.
<stevelitt>rlb, you suggested "./configure --prefix=/home/rlb/opt/guile-tgz && make install" . I put a "make between the ./configure and the make install.
<stevelitt>"make" ^^^^^^^^^^^
<rlb>sure , "... && make && make install" should be fine too.
<rlb>I actually did that, so that's "safer".
<rlb>i.e. I didn't test what I wrote, exactly...
<stevelitt>So you never did "make" and it still worked because you did "make install" ?
<rlb>I did "make" and then "make install"
<stevelitt>OK, I'm going to try it with --prefix /home/slitt/opt/guile-tgz . Let's see what happens...
<mwette>lechner: I think prefixes are up to the users. nyacc2 produces fewer globals so that should help. There is a renamer option in define-ffi-module to help. And I think you can use #:export in define-ffi-module as well.
<sneek>Welcome back mwette, you have 1 message!
<sneek>mwette, lechner says: / Hi, have you considered requiring module prefixes when users work with your generated files? In my case, I always use something like libpam:ffi-pam-symbol-value and wish it were named more simply libpam:resolve-c-define or so
<lechner>mwette / okay, thanks!
<lechner>clean interface, btw
<lechner>super clean
<mwette>If you are just talking about the symbol-value thing, then yes. I could add a module-based exporter for that.
<mwette>thanks
<lechner>mwette / what does that mean, please?
<mwette>instead of ffi-pam-symbol-value maybe just pam-sym. Sorry, got a bit confused.
<stevelitt>LOL, see you in a half hour :-)
<mwette>stevelitt: hence --enable-fast-install for most
<lechner>actually, higher on the list would be another idea. could we specialize sets of DEFINE's and also get converters the other way? It would save me from having to do this fragile thing: https://codeberg.org/lechner/guile-pam/src/commit/fb8dd94783a30291ce14c1037cca66bfa63e7833/scm/pam.scm#L103-L138
<lechner>the idea is to keep things synchronized automatically
<lechner>and error out if not all all symbols were categorized in the .ffi input file
<stevelitt>Thanks mwette , I stopped it, removed directory guile-3.0.10, re-untarred, and added --enable-fast-install to the ./configure.
<rlb>mwette: oh, is skipping the bootstrapping opt-in? I had no idea -- that would explain my confusion :)
<rlb>stevelitt: I was not using --enable-fast-instal fwiw, but no reason offhand to think that matters.
<rlb>"install"
<mwette>lechner: not sure what you are after. Let me look at your stuff ...
<mwette>rlb: --enable-fast-install is default yes
<mwette>it seemed to make a difference, but I could be confused
<lechner>mwette / this too, for a different set of DEFINE's https://bpa.st/VW7A
<mwette>Where to the PAM_SYMBOL's come from? Is that a pam-defined enum (typedef)?
<lechner>#define
<mwette>Ah.
<lechner>by the way, the callbacks work beautifully! Very soon, Guile-PAM will be complete and can then compete with the big dogs (i.e. Linux-PAM and OpenPAM). I hope it opens up the elegance of GNU Guile to a larger group of users, namely system administrators and user who want to mount encrypted home folders
<mwette>And the compile-ffi is not finding and putting them in the ffi-pam-symbol-tab ?
<lechner>it is, but I need the reverse
<lechner>as well
<lechner>my current solution is to hardcode
<lechner>Guile is amazing! I never thought it could do the things I do with it. No segfaults or bus errors, ever! For ten years, I looked at other configuration languages, including Dhall (!) and GNU Guile was right there!
<lechner>or here, rather
<mwette>That looks like more of a utility add-on than internal compile-ffi product. I can think of a procedure to do that: Go through ffi-pam-symbol-tab, looking for sequences of like-prefixed symbols, collect key-val pairs into a list and reverse, and name it.
<lechner>actually, i envisioned being able to declare distinct sets (and perhaps pick a name) for the reverse transformations.
<mwette>Yes. maybe I can get something started.
<lechner>i can also work on it if you accept patches
<lechner>mwette / just exporting the different alist would help
<lechner>alists
<lechner>mwette / maybe that's something users should be doing themselves as long as the "big" alist is exported
<stevelitt>Hooray, it finished, and at least right now, Guile runs without error. Next step, modify ~/.bashrc to include /home/slitt/opt/guile-tgz/bin at the start of $PATH, log all the way out, log back in, and see if my good fortune holds.
<stevelitt>BRB...
<rlb>stevelitt: if it worked as /home/... and not as /usr/local/, without any additional info, I'd guess offhand permission issues of some kind with the /usr/local install...
<stevelitt>rlb, it must be some sort of edge case, because everything else in /usr/local/bin works fine. Probably has to do with library locations or something. Luckily for me, I use this computer as a one user desktop computer, so the per-user works out just fine.
<stevelitt>rlb
<lechner>rlb ^
<lechner>whoops, i thought you typed tlb
<stevelitt>rlb, 3wmette and lechner, thanks so much for all your help installing Guile!
<lechner>undeserved in my case, but good luck!
<mwette>stevelitt: good to hear you have it working
<dodoyada>do you all use flymake/flycheck or anything for syntax checking? I have been trying both but cannot get consistent warnings between them and just invoking guild compile with the same arguments directly. It probably has something to do with my super guixy setup but it's such a pain I am considering going without syntax checking.