IRC channel logs

2025-03-20.log

back to list of logs

<daviid>RavenJoad: yes, see 4.4.4.6 Debug Commands, the width repl command
<RavenJoad>Right, but that only happens when inside of the debugging REPL. I was looking for a configuration file or something, since Guix commands do not leave you in a recursive REPL.
<RavenJoad>At least not guix commands launched from a shell command-line
<daviid>not sure, but some guix guru would know i guess
<rlb>ACTION doesn't think the test "tmp-dir" should be the source tree by default.
<rlb>(tmp-dir via test-suite/guile-test -- was just surprised when working on a test that it was scribbling there)
<chrislck>sneek: botsnack
<sneek>:)
<__monty__>Feels like I'm running in circles >.< Found another way to pass a list to `use-modules`, https://gist.github.com/toonn/7e9ddb17965c73af49e3a74115e52ba4
<sneek>Yey! chrislck is back!!
<mange>__monty__: Do you need use-exercises to be a syntax transformer? It might be simpler to use module reflection to do what you're trying. Something like this: https://paste.sr.ht/~czan/b055b9bcbff09bfe7be342ab708926ef2934e562
<__monty__>mange: I suppose that's what graywolf was suggesting earlier.
<__monty__>I'll try it out tomorrow but at this point I do kind of want to figure out the macro.
<__monty__>I've sunk too many costs!
<dsmith>heh
<euouae>Hello, I was told that Geiser can render Texinfo commands, but is that true? I don't see e.g. @emph{foo} have an effect with geiser-doc-symbol-at-point
<euouae>Another question is, if I have an autotools project with guile, do I install the scm files?
<euouae>Or do I install the compiled files? Or both?
<euouae>I think "Installing Site Packages" from the guile manual recommends to install both scheme and compiled files.
<euouae>I wonder if that means I need to invoke guile to find the build config variables?
<euouae>during the build proess
<euouae>I found this blog post that helps: <https://www.unwoundstack.com/blog/guile-and-autoconf.html>
<daviid>euouae: https://erikedrosa.com/2017/10/29/guile-projects-with-autotools.html
<euouae>daviid: nice, thank you! If I figure it all out I think I might send a patch to guile for its documentation
<euouae>There should be a section that deals with 'Guile project with autotools' or similar, that gives simple instructions
<daviid>euouae: you should look at and learn from another projetct as well, the above won't be enough, so to speak ... chickadee for example - https://git.dthompson.us/chickadee/tree/
<euouae>daviid: nice, thanks. I'll look into that as well.
<euouae>daviid: I'm noticing that you're using the ;;; Commentary: convention. What is the point of that? I don't see you using `guile-tools commentary` or similar anywhere
<euouae>Or is that expected to be used by someone else?
<euouae>sorry, I mean guild
<lloda>(help) uses the 'Commentary:' block
<lloda>like (help (a-module))
<euouae>nice, thank yuo
<ArneBab_>euouae: maybe this helps with packaging, too: https://www.draketo.de/software/programming-scheme#package
<euouae>In general it seems that the situation is not ideal
<euouae>it requires some guess work and can configure some user overrides, but there's issues.
<euouae>Basically it seems that autoconf needs 1st class support for guile
<ArneBab_>euouae: there is already tooling from guile. See the m4-folder in the guile sources. Maybe it could be possible to get part of that into autoconf, so that guile autoconf projects work out of the box?
<ArneBab_> https://git.savannah.gnu.org/cgit/guile.git/tree/m4
<euouae>ArneBab_: which macro file is relevant?
<ArneBab_>euouae: for your deployment I can’t answer that directly: those are tools that are used by the build system of Guile. But there’s a guile.m4 https://git.savannah.gnu.org/cgit/guile.git/tree/meta/guile.m4
<euouae>Yes, those macros are also documented in the manual. As <https://www.unwoundstack.com/blog/guile-and-autoconf.html> explains, these macros only work if your intention is to install to the default location.
<euouae>It's doing stuff like `pkg-config --print-errors --variable=sitedir guile-3.0`
<ArneBab_>yes — it sounds like you have an idea how you would want to improve it.
<euouae>As the blog says, it breaks distcheck too
<euouae>Hmhm... yeah I need to think about it some more. I need to learn a bit more about Guile's compilation process and what's already there, but thank you for pointing me to those files
<euouae>Before reaching to the autotools people I need to make sure it can't be done from Guile's side
<ArneBab_>If you want to see adaptions, you can look at the hacks I had to find to get wisp compilation working well: https://hg.sr.ht/~arnebab/dryads-sun/browse/configure.ac?rev=tiphttps://hg.sr.ht/~arnebab/dryads-sun/browse/Makefile.am?rev=tip
<ArneBab_>it’s not perfect — far from it — but it works and may give you ideas.
<euouae>A bit unrelated but do you know if sr.ht supports autotools tarball generation?
<euouae>version 0.0.0? heh
<euouae>okay thank you. I will look into those files too, although on first glance they're a bit scary
<ArneBab_>euouae: I didn’t try any of the build tooling of sr.ht yet.
<ArneBab_>My usecase is unusual, because I have multi-language compilation in there: first need to compile the language/wisp*, then the wisp files themselves.
<__monty__>So I can map over the inputs after converting `#'(exercises ...)` to a datum. Converting that datum to syntax again leaves me with a list though, I think. So I'm still ending up passing a list to `use-modules`, https://gist.github.com/toonn/7e9ddb17965c73af49e3a74115e52ba4
<euouae>What's this? What are you trying to do?
<euouae>You're trying to map strings to modules?
<__monty__>Yeah, map strings to module specs.
<euouae>Okay, first, why are you doing this weird formatting?
<euouae>parentheses should be collapsing together like ))))
<__monty__>More readable for me.
<euouae>so you want (use-exercises "2.7") ideally to expand to what?
<euouae>(use-modules (|chapter 2| |exercise 2.7|))?
<__monty__>`(use-exercise "2.7" "2.12")` would behave as if I entered `(use-modules (#{Chapter 2}# #{exercise 2.7.scm}#) (#{Chapter 2}# #{exercise 2.13.scm}#))`.
<euouae>I don't think you should include the .scm there
<__monty__>I do because Guile doesn't attempt appending `.scm` if the last symbol already contains a `.`.
<euouae>Oh that's why?
<__monty__>Yeah, reasoning is probably not to try appending `.scm` if it already has an extension.
<__monty__>I thought maybe to avoid the expression being bound to the pattern as a list I could use `exercise-symbols ...` instead but that doesn't work.
<dsmith>__monty__, If you used '-' instead of ' ' it would be a liitle nicer.
<dsmith>(use-modules (Chapter-2 exercise-2.7.scm) (Chapter-2 exercise 2.13.scm))
<dsmith>Bah. Missed a ' '
<__monty__>dsmith: Yeah but I prefer spaces in the file names.
<__monty__>¯\_(ツ)_/¯
<dsmith>ACTION shudders ...
<__monty__>I finally figured it out though, I can bind something with `with-syntax` to a pattern of the form `(name ...)`.
<__monty__>That effectively matches `name ...` to the contents of the list which can then be further used in the template.
<__monty__>Thank you to everyone for the help! <3
<__monty__>This was my first experience with macros so it was challenging.
<__monty__>(I know full well I'm doing language crimes BTW. But I've always had the impression that's the fun part of LISP!)
<rlb>I had not seen this yet -- https://codeberg.org/scheme/r7rs/wiki/Noncharacter-error-handling linked from https://codeberg.org/scheme/r7rs/issues/51 If that's really the plan (not sure it's settled?), then I'd be more than happy to start working on it, assuming (as I think from a cursory look), it's a sufficient solution to the "system data" problem.
<rlb>wingo: (maybe) ^
<dsmith>__monty__, So what was your final code?
<__monty__>dsmith: Oh, I guess I forgot to link the Gist, https://gist.github.com/toonn/7e9ddb17965c73af49e3a74115e52ba4