IRC channel logs

2026-05-19.log

back to list of logs

<daviid>tohoyn afaict, make install does not install any doc, by design, you must run make install-{html|pdf|info|...] as for any autool chained project - this is explained in the distributed INSTALL file (of all projects I work on, g-golfas well by the way...)
<spk121>TheTaoOfSu: since ncurses' behavior depends on the value of the TERM environment variable, you'll need to make sure that is properly set to get the behavior you want. If you don't know what to set it to, 'xterm-256color' is usually a pretty good guess.
<spk121>If you're not getting good extended characters, there are a couple of things to check. You should have a utf-8 locale. Most are these days, but if your LANG or LC_ALL environment variable is set to "C" or "POSIX" or something with "latin1" or 8859 in it, that could be the problem
<spk121>You should make sure you call (setlocale LC_ALL "")
<spk121>It is possible to build guile-ncurses without wide character support, but, by default it has wide character support.
<spk121>Lastly, you can't use ncurses at the REPL with geiser because ncurses will send control characters to the current terminal which will cause problems. If you forget, you should be able to get back to normal by calling (endwin).
<spk121>guile-ncurses comes with a janky little tool called guile-ncurses-shell that opens up an xterm and lets you control it with a REPL
<spk121>After 4 years off, I am actually going to make a new release of guile-ncurses, but, I want to wait until MinGW support for Guile lands.
<TheTaoOfSu>spk121: I appreciate the ncurses tips. I'm using guile-ncurses-shell already, so good to hear I made the right choice there. As for the TERM environment variable, I'm less concerned with my own capabilities and more with what I can expect to be available to others if I distribute this game
<TheTaoOfSu>I guess I'm gonna put up a Guix VM today so I can run the REPL there and get back to work. Still can't figure out what's up with mine and why it insists my code is out of scope, and nobody seems to have any ideas. Maybe I should try the mailing list later...
<janneke>ACTION produces a guile segfault
<janneke>...now to bisect if the problem is somehow me
<janneke>=> https://codeberg.org/guile/guile/issues/185
<janneke>of course, the ploblem is mostly me, but yeah ;)
<old>janneke: I'll have a look
<old>segfault are top priority for me
<janneke>old: (y)
<janneke>ACTION had a quick look in regex-posix.c but that checks the str
<janneke>so it's possibly some (tree-il?) optimization
<old>I could not tell, I just confirmed it can be reproduced
<old>if you have some hint, please add them to the issue so I can read them later!
<janneke>old: the hint is already there: regexp-exec (the "C worker" of fold-matches) works as expected
<janneke>showing a backtrace
<old>okay!
<old>(I haven't check the full issue yet, just copy/pasted the reproducer)
<janneke>it's been decades since i've seen a guile segfault!
<mwette>ArneBab: Is there no wisp manual in the guile distribution?
<TheTaoOfSu>How do I change the listen *address* for the Guile REPL? I want to run it in a VM and connect from the host machine because my local copy is borked, and I'm tired of trying to figure out why
<TheTaoOfSu>I don't see anything about it in the Guile Reference Manual
<old>TheTaoOfSu: --listen= ?
<TheTaoOfSu>old: --help says that only accepts the port. I guess I should try it with a full address
<TheTaoOfSu>Nope, including an IP just causes an error
<TheTaoOfSu>You know what, I bet I can fix this with an SSH tunnel and skip the problem
<old>ahh no it's only local
<old>you need to spawn a bridge if you want exterior access I suppose
<old>or SSH tunnel yes
<rlb>TheTaoOfSu: if you haven't, and wanted to diagnose, another option might be to just create a new temp local account, and try from there. That'd at least tell you if it's something to do with your account.
<rlb>And vaguely wondered if you might have anything in your ~/.guile that was interfering, but I'm not likely to be too much help, since I'm not yet very familiar with geiser.
<TheTaoOfSu>rlb: I'm on NixOS, so if I understand things properly, not much should be stored outside the immutable nix store, and I already tried nuking ~/.cache/guile
<TheTaoOfSu>It's also not a Geiser issue specifically as the problem persists if I (load) files into the REPL directly
<TheTaoOfSu>I'm setting this up in a Guix VM because I'm considering migrating anyway
<rlb>TheTaoOfSu: oh, didn't see/remeber you said that --- so you're saying that if you just run guile (load "foo.scm") and then try to refer to a top-level definition in foo.scm it's not available? i.e. (bar) or whatever?
<TheTaoOfSu>rlb: yeah, it claims anything I just loaded in is actually an unbound variable
<rlb>If so, did you try putting a "(write 'whatever)(newline)" in foo.scm so you can be sure it's actually loading the file you expected?
<rlb>Oh, and another bigger sledgehammer if that doesn't print "whatever" would be to run "strace -o log guile" do the load, and then look in log to see what it actually loaded.
<TheTaoOfSu>rlb: Inserting a (write) at the top prints out when I (load) it, so yeah, the file is loading and compiling
<TheTaoOfSu>I also don't have a ~/.guile file, so that can't be a factor
<old>what's not working ?
<TheTaoOfSu>old: When I use Geiser to compile a file or directly (load) it into the REPL, it complains that every variable/function I try to use is an unbound variable
<rlb>OK, so it prints and then bar or whatever still causes an unbound variable error?
<old>hm
<ieure>TheTaoOfSu, Do you have an example source file you can share?
<rlb>And I assume you have a (define bar ...) at the top level in the file?
<TheTaoOfSu>ieure: I've just been playing with ncurses, trying to figure out how exactly to work with it, so the file I have is pretty short https://pastebin.com/BFcaR7w7
<TheTaoOfSu>Everything was working just fine for like 2 days
<TheTaoOfSu>Last time it worked, I tested a function, ,q out of a bunch of old stack traces, tweaked and tried again, but it just started rejecting everything, including stuff that wasn't touched since before the problem started
<TheTaoOfSu>Someone recommended I recompile Geiser, so I figured out how to recompile all my Emacs plugins, and that didn't work
<TheTaoOfSu>Someone recommended I rm -r ~/.cache/guile, and that didn't work
<ieure>TheTaoOfSu, And what's the exact error you're getting?
<TheTaoOfSu>ieure: https://pastebin.com/kGdXhvQK
<ieure>TheTaoOfSu, That is odd. Restarting your REPL didn't help?
<rlb>TheTaoOfSu: just to be sure, could you put a print at the *end* of the file too?
<rlb>(top level)
<TheTaoOfSu>ieure: Restarting the REPL didn't help, and a full system reboot didn't help
<TheTaoOfSu>rlb: Another (write) at the end prints successfully
<rlb>How about, also, a (write render-tab) (newline), i.e. does that show the right thing during load?
<TheTaoOfSu>rlb: if I call specifically (write render-tab), it complains of unbound variable
<ieure>TheTaoOfSu, I can't reproduce your problem. Does `guile -l /path/to/your/file.scm' work?
<old>rlb: just pushed some flonum? and CPS optimization FYI
<old>I don't think that would affect rnrs benchmarks in any way
<old>just letting you know
<TheTaoOfSu>ieure: don't feel too bad, I couldn't replicate it, either, until it suddenly broke
<TheTaoOfSu>As far as I can tell, there wasn't really a trigger for it. Maaaaybe I managed to bump some Emacs/Geiser key combo to trigger something? But I can't imagine there's a defaul keybind for completely-bork-guile-repl
<ieure>TheTaoOfSu, Some stuff you can try... Comment out everything other than the define-module / use-modules, does that work? Add a completely empty procedure, like (define (render-tab title) title) -- does that work? etc
<TheTaoOfSu>ieure: even commenting out the entire render-tab function and then inserting that basic definition, I still get the same unbound variable issue
<TheTaoOfSu>Oh wait, I did it the dumb way
<TheTaoOfSu>I put the (write render-tab) at the very top of the file, before the definition
<TheTaoOfSu>If I move it to the bottom, with the new reduced definition, it's showing #<procedure render-tab (title)>
<TheTaoOfSu>If I revert back to the default definition, I get the new #<procedure output
<TheTaoOfSu>...But attempting to call (render-tab "Title") still doesn't work
<TheTaoOfSu>I don't super expect it to help, but the entire output of launching Guile, loading the source file, and attempting to use the function can be found here https://pastebin.com/G0e29EqC
<TheTaoOfSu>Oh, and the backtrace, which is not very informative
<ieure>TheTaoOfSu, Okay, I see your problem.
<ieure>TheTaoOfSu, Your source file declares a (idlers-guild tui) module to hold the code, but the repl is in the (guile-user) module.
<TheTaoOfSu>...I don't think I added that right before the problem started
<TheTaoOfSu>I can't be 100% sure since I've been fighting this a day and a half
<TheTaoOfSu>But it does kinda make sense that it would cause issues
<ieure>I cannot see into the past, but the problem in your paste is that `render-tab' is not bound in the guile-user module.
<TheTaoOfSu>So then I guess... Geiser probably stopped setting things properly somehow?
<ieure>No.
<TheTaoOfSu>I don't understand how it worked just fine before and then suddenly stopped
<TheTaoOfSu>Like, it makes sense doing it straight in the REPL now that you say it
<ieure>TheTaoOfSu, Probably you managed to get into the correct module in your REPL, but didn't understand that's what you were doing, then restarted, putting you back into (guile-user).
<TheTaoOfSu>But it worked with Geiser and emacs for ages
<ieure>¯\_(ツ)_/¯
<ieure>If you're using Geiser, C-u C-c C-z will tell the REPL to make the module you're editing the current one.
<ieure>And then your stuff should be visible.
<TheTaoOfSu>ieure: no, it broke in the middle of using it, that's what really threw me for a loop
<TheTaoOfSu>Like if I had always had problems, I'd get that, but... It went from fully working to fully not with no real provocation
<TheTaoOfSu>Well, maybe when I ,q out of all the backtraces that backed out of something
<ieure>Okay. Well, if you switch the REPL to the current module, does it work how you expect?
<TheTaoOfSu>(use-modules (idlers-guild tui)), yeah? That doesn't seem to be making a difference in the REPL. No change to the prompt or to the output when I try to call (render-tab)
<ieure>TheTaoOfSu, No. use-modules creates bindings in the current module for exported symbols in the specified module. Your specified module does not export any symbols, so it does nothing at all.
<ieure>TheTaoOfSu, You can make your module the current one with a REPL metacommand: ,m (idlers-guild tui)
<ieure>TheTaoOfSu, Or, like I said, C-u C-c C-z in a scheme-mode buffer with Geiser enabled.
<ieure>Looks like `set-current-module' is the Scheme procedure which is equivalent.
<TheTaoOfSu>The shortcut doesn't seem to work, pushes emacs into the background if in a terminal and minimizes it if I'm using the GUI
<TheTaoOfSu>But it does seem to be working if I make the change
<TheTaoOfSu>I would love to know what I managed to change, but at least it works, I guess
<ieure>TheTaoOfSu, The environment you're running Emacs in is intercepting the C-z rather than passing it to Emacs.
<TheTaoOfSu>Figured that was the case with the terminal, but I didn't expect it from the GUI
<ieure>Some GUIs treat C-z as a minimize command, there should be some way to unbind that. It's more verbose, but `C-u M-x geiser-mode-switch-to-repl RET' is equivalent.
<TheTaoOfSu>I wish my bindings matched the documentation. Like C-m is giving RET, which is ruining some bindings. C-z only gives me issues in Emacs, nothing else reacts to it
<rlb>old: ok, thanks. If I happen to run the benchmarks again soon, I'll keep that in mind.
<TheTaoOfSu>Thanks to ieure for helping me find the problem, btw, and to rlb and old for trying
<ieure>TheTaoOfSu, Where in the docs do you see C-m? That is equivalent to RET by default.
<ieure>It would be extremely unusual for an Emacs package to bind C-m to anything else.
<TheTaoOfSu>ieure: geiser uses it in a handful of bindings
<ieure>TheTaoOfSu, Example?
<TheTaoOfSu>C-c C-e C-m is supposed to be geiser-edit-module
<ieure>TheTaoOfSu, That is not the same as C-m.
<ieure>The binding is the whole sequence, C-c C-e C-m. C-e and C-m alone do different things.
<TheTaoOfSu>It was just interfering with another one I was trying to use
<ieure>What was? What other one?
<TheTaoOfSu>Trying to find it again, been scrolling around a lot
<ieure>Are you using something like evil-mode?
<TheTaoOfSu>I think it was C-c C-m for geiser-repl-switch-to-module, which doesn't work like if I M-x the command, and after a moment, it shows C-c RET- (C-h for help) in the status bar or whatever it's called
<TheTaoOfSu>My setup is pretty minimal so far. Only Geiser and I think ParEdit
<TheTaoOfSu>So for whatever reason, Emacs doesn't seem to be realizing the difference between C-m as RET and C-m as a component of a command
<ieure>TheTaoOfSu, Some other Emacs extension has rebound C-c C-m as a prefix for another keymap. I don't know if paredit does that or not, I don't use it. C-c C-m (or C-c RET) works how I'd expect in a *Geiser Guile REPL* buffer. You can see all a buffer's bindings with `C-h b' if you want to inspect them.
<TheTaoOfSu>Not only does that not show any commands with C-c C-m, it doesn't even seem to show all the Geiser commands that are allegedly already bound in the docs
<TheTaoOfSu>Like geiser-repl-switch-to-module isn't listed at all under the Geiser section in C-h b
<TheTaoOfSu>Paredit doesn't seem to have anything on C-c C-m at all, and Geiser does have some C-c RET commands, but none of them are what I'm looking at in the docs for Geiser
<ieure>TheTaoOfSu, What buffer are you looking at the bindings for? C-c C-m is only bound in geiser-repl-mode, not scheme-mode.
<ieure>TheTaoOfSu, geiser has geiser-mode (a minor mode intended to be used with scheme-mode) and geiser-repl-mode, a major mode for the REPL. I think you may be confused about which bindings apply to what mode.
<TheTaoOfSu>Ah, great, so Emacs is constantly swapping around my bindings depending on context, so I gotta get real used to paying attention to modes
<ieure>TheTaoOfSu, Yes, the active bindings change depending on the context, it has to work that way, otherwise you'd be stuck with a single map of the union of every possible binding for every possible mode.
<ieure>The majority of software humans interact work similarly, for example, if you open a save as dialogue, the functionality and bindings will differ from the main program; if you use a terminal embedded in VSCode, the bindings won't be the same as in the code editing pane. Same situation with Emacs.
<TheTaoOfSu>I wonder if I accidentally fumbled C-c C-a to load the module after I defined it as one while I was trying to do something else
<ieure>Possible. Not helpful at this moment, but in the future, if you hit some key combo and something unexpected happens, `C-h l' will show you recent inputs and what they did.
<TheTaoOfSu>That'd explain why it worked despite having the module define, I guess. And then I just assumed it was a feature of Geiser, which left me confused when I accidentally unloaded the module somehow
<TheTaoOfSu>Well thanks again for taking so much time to help
<ieure>Sure thing, best of luck with your project!