IRC channel logs
2025-04-07.log
back to list of logs
<trannus_aran>Omg how did I only find out about guile-hall JUST now? 🫠<trannus_aran>That being said, it would be nice if guile could just handle its own build system entirely á la build.zig or nob.h <ArneBab>ieure: as far as I know Racket intentionally decided to be more static that common lisp, so I think Guile may be your best bet to get that kind of interactive experience. <ArneBab>skeemer: as far as I know Racket intentionally decided to be more static that common lisp, so I think Guile may be your best bet to get that kind of interactive experience. <ArneBab>trannus_aran: if you need guile to handle the build, then it gets hard to bootstrap. <ArneBab>trannus_aran: that said, Guix is as close to a guile-based build system for guile as it gets. <trannus_aran>ArneBab: oh right! I was talking to a friend about making a C-like systems language that used s-exps (easier for my brain) <trannus_aran>And she brought up Mes as sort of the "closest we have so far" solution <trannus_aran>Also, since I haven't really plumbed the depths of the average hall project...what does guile actually need makefiles for? <rlb>but it's "in progress" <trannus_aran>rlb: yuppp she literally brought that one up too X) I think that's even being worked on by a friend of a friend? <rlb>ACTION is quite interested <ieure>Is there something that works like `call-with-output-file', but which appends to the file? <ieure>I guess I have to (call-with-port (open-file ...)) <lechner>Hi, why are (eq? 'a 'b) and (eq? a 'b) #t, please, when a and b are both 1 but not when they are both 2? <ieure>lechner, Can you share an executable form demonstrating what you're talking about? <ieure>(eq? 'a 'b) should never be #t, because you're comparing symbols. <trannus_aran>yeah, AFAIK, eq? checks if for strict object equivalence, not "just" equal values (eqv) <ieure>lechner, If you can just share ex (let ((a ...) (b ...)) (eq? ...)) <ieure>lechner, I'm not sure if (eq? a 'b) is a typo or not, is why I'm asking. That would be #f unless the value of a is 'b <lechner>no, those are not typos but thanks for asking! <ieure>lechner, Do I need `guix repl', or does `guile repl' suffice? <ieure>lechner, The comparisons seem to work fine to me, but when you run `guile', you're in (guile-user), and you're testing for (guix-user). <ieure>scheme@(guile-user)> (equal? (module-name (current-module)) '(guile-user)) <lechner>ieure / does guile-user make a difference? the comparisons have the expected value for you? <ieure>lechner, I don't understand your question. <ieure>If you run `guile', then (module-name (current-module)) ;; -> (guile-user) <ieure>And if you run `guix repl', then (module-name (current-module)) ;; -> (guix-user) <ieure>The test in your code is (equal? (module-name (current-module)) '(guix-user)) <ieure>Which should work for `guix repl', but won't work for `guile'. <lechner>which value do you get for (eq? 'a 'b) ? <ieure>Which is expected, since 'a and 'b are different symbols. <ieure>lechner, That's very weird. I cannot reproduce. <ieure>I get #t, #f, #f, respectively. <ieure>Which is exactly what I'd expect. <lechner>yeah, thanks for trying! it works here too, now <ieure>Must have been something hosed in your REPL state, but I don't know what would cause that. A module shadowing `eq?' maybe? <ieure>Too bad you can't see if eq? is eq? to eq? <lechner>i prefer not to think about it. it would mean sleepless nights <rlb>There's also a way to print the pointer value of anything, but I can't recall where it is offhand. <ArneBab>trannus_aran: a Makefile is the simplest way to compile with dependencies taken into account. It solves a lot of problems with little effort in a way that is compatible with bootstrapping. <trannus_aran>no I mean I'm familiar with them from C and what they're good for, I'm just surprised that guile distribution calls for it (thinking of other lisp dialects, here) <ArneBab>The background is that Guile itself has significant amounts of Guile Scheme for the implementation, but it cannot assume having Guile Scheme from the start (it bootstraps itself from C and a interpreter to then get to optimizing bytecode compilation in Scheme), so building of both Scheme and C is done via Makefile. Due to that the support for building Scheme from a Makefile must already be available and can be re-used for Guile-using <trannus_aran>ahhh, it's about uniformity of the build process even to the level of bootstrapping, I gotcha <ArneBab>(you put it much more nicely than my wording ☺) <trannus_aran>Would be nice if we had a tool in guile to generate the makefiles, so we could cut the number of req'd languages from 3 to 2, though ;P <ArneBab>trannus_aran: that we would still need to bootstrap Guile to generate the Makefile to bootstrap Guile to … ☺ <old>You could just generate a shell script that respect the dependencies chain of the source files <old>no need for makeifle if the goal is to compile the thing once <trannus_aran>ArneBab: but autotools and m4 don't have that same issue? :o <trannus_aran>anyone know what to do for this weird guix make error with a hall project? guile3.0: symbol lookup error [...] /gnu/store/[...]-glibc-2.33/lib/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE <ArneBab>trannus_aran: no, autotools and m4 are bootstrapped from just shell, and shell can be executed via gash which can run on MES which can be bootstrapped from stage0: https://www.gnu.org/software/mes/ — there are still some missing steps, but it is tiny already. <dthompson>ArneBab: I should really update that blog post. it overcomplicates things because it didn't consider utf-8 encoding so there's lots of those escape sequences. <graywolf>Hi Guile people! I am curious, would someone have an example how to use g-golf to mouse a mouse from a command line program? Is that possible? <daviid>graywolf: i don't understand the question <graywolf>I want to write a guile program that move a mouse to specific coordinates (expressed in pixels). So, for example, ./move-mouse 100 222. <graywolf>So I wonder whether I can use g-golf for that or I need to find some binding to libxcb (maybe? I have never done X11 stuff before) <graywolf>I see the typo now, should have been "to move a mouse" :) <daviid>graywolf: to track mouse and swipe events, using g-golf, you need gtk and a gtkwidget instance (or a subclass of) <graywolf>That looks... complex. Thanks for the pointers nevertheless, I will read up on the topic. :) <daviid>graywolf: you should ask in #gtk, if it is possible then it is possible using g-golf, but i never done this - but i a curious, why would you want to do this, what practicall example do you have in mind? <graywolf>I wanted to try re-implementing a program called keynav in Guile. It basically chops a screen into a grid, and allows you to move the pointer using keyboard. So, as a first step, I just wanted to try moving the mouse around a bit. It is ages since I last did any GUI programming (and last time was on Windows...), so I wanted to start slow :) <ieure>How does that relate to g-golf? <graywolf>Well, g-golf is a GUI toolkit, and mouse is part of the GUI, so I thought maybe it would be easy using it. <daviid>ok, but the grid would contain widgets, so you could navigate using 'groups and shortcuts' - but you could ask that same question (your last sentence) in #gtk, proviuding you'd be happy to use gtk <daviid>graywolf: i asked in #introspection, and the main dev answered: 'Not with GTK. If you're using X11, you can use XWarpPointer() It's pretty terrible UX.' <daviid>sneek: later tell graywolf i asked in #introspection, and the main dev answered: 'Not with GTK. If you're using X11, you can use XWarpPointer() It's pretty terrible UX.' <daviid>sneek later tell graywolf if you want to learn to dev a modern app, you should learn from examples of modern app, the g-golf adwaita-1-demo and gtk4 examples would be a good start, my 2c