IRC channel logs

2025-09-25.log

back to list of logs

<resica>I got geiser and guile setup on fedora. I know I can connect (or at least I think I can connect) to the guile REPL. Typing C-x C-e to evaluate sexp returns '=> #<unspecified>'
<resica>I'm completely stumped how to understand what is going on.
<old>Will the new whippet compiler move objects around (will it compact the heap)
<old>whippet GC*
<old>Asking because I had this idea that object properties could be implemented has shadow-mapping of objects in the heap with a constant stride off
<old>thus accessing an object property could be a constant offset from an object pointer, thus true O(1) time access instead of amortized with hashmap
<dsmith>regtur, For everything? How about (+ 1 2)
<dsmith>regtur, I C-x C-e on on that in a Scheme buffer with Gesier + Guile enabled gives me "=> 3" in the minibuffer
<dsmith>regtur, On a (define ... ...) I get "=> #<unspecified>" That's normal.
<dsmith>Oh, They left
<dsmith>regtur, Sorry. Tab Completion Without Reading in action
<dsmith>sneek, later tell resica That's normal for (define ... xxx)'s on (+ 1 2) should show "=> 3" in minibuffer
<sneek>Got it.
<dsmith>Good bot
<sneek>ACTION wags
<dsmith>sneek, botsnack
<sneek>:)
<euouae>Hello
<dsmith>Heya euouae
<euouae>errors from guile are so maddening sometimes
<euouae>if you typo `let' instead of `let*' and suddenly get undefined variable errors, but you have no idea where in the source code it is
<wehlutyk>Hello all
<wehlutyk>I'm looking for webcam/camera input in guile
<wehlutyk>do people have any hints?
<wehlutyk>so far i've seen AIscm having developed a v4l2-reader for guile
<wehlutyk> https://wedesoft.github.io/aiscm/
<wehlutyk>and I'm exploring guile-gnome-* (which says it provides guile-gnome-gstreamer)
<wehlutyk>which is quite out of date
<wehlutyk> https://gstreamer.freedesktop.org/bindings/guile.html
<wehlutyk>wingo, I see you were doing this https://cgit.git.savannah.gnu.org/cgit/guile-gnome.git/log/
<wingo>ages ago, daviid probably has newer tips
<wehlutyk>:)
<wehlutyk>daviid, any tips for how to use gstreamer in guile 3?
<wehlutyk>that or other video input libs?
<kestrelwx>I'm thinking of asking portal for feed, but I haven't gotten much into it yet.
<kestrelwx> https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Camera.html
<dthompson>has anyone had problems with pipewire stutter lately? pipewire worked without issue for me for a long time but after an update a couple weeks ago I have had serious issues when system load is high
<dthompson>and even sometimes when cpu usage isn't very high at all
<kestrelwx>I guess it doesn't cover non-DBus non-Pipewire but luckily I don't need to care. There's 'ac-d-bus' but for the rest I think you'd have to write bindings.
<kestrelwx>I have crackle from apps using 'pipewire-pulseaudio' but no stuttering I could remember on Guix.
<dthompson>kestrelwx: I'm gonna try another upgrade soon and cross my fingers that something improves
<wehlutyk>kestrelwx: hmm! a lot to explore here and there. Hadn't thought about pipwire
<wehlutyk>I also see sdl3 with some camera input stuff https://wiki.libsdl.org/SDL3/CategoryCamera
<kestrelwx>Oh, yeah, I'm on a Sep 8th commit still.
<wehlutyk> https://codeberg.org/guix/guix/pulls/2636 and https://codeberg.org/guix/guix/issues/2699 got me stuck in Sep 3rd for the moment
<dsmith>sneek, software?
<dsmith>sneek, guile-software?
<sneek>From what I understand, guile-software is http://sph.mn/foreign/guile-software.html Send an email to tantalum, <sph at posteo dot eu> to make changes or post a new project.
<mwette>don't know about gstreamer, but got this to compile w/ nyacc's ffi-helper; you'll need the examples/ffi/glib.ffi from nyacc ; https://paste.debian.net/1398097/
<Serentty>I tried using Guile’s built-in Elisp support, but ran into issues when trying to use dotimes. It complains that the index variable is unbound. Is there something I need to import?
<sneek>Serentty, you have 1 message!
<sneek>Serentty, janneke says: guile-for-guile-emacs failed for me too, i've pushed a fix to master, thanks for the report!
<identity>Serentty: ‘dotimes’ is a macro, so see the expansions with ,expand (dotimes …)
<Serentty>I was trying the Mandelbrot set example from here, which works in Emacs.
<Serentty> https://rosettacode.org/wiki/Mandelbrot_set
<Serentty>I can try examining the expansion.
<ArneBab>rlb: I found another thing that might be worth adding: min implemented in pure scheme with the most trivial implementation is faster than what we have in numbers.c
<rlb>ArneBab: interesting, and ouch -- because the C version can't be optimized, I presume (and is probably (may vaguely recall) some giant logic tree?
<ArneBab>it’s not actually that long. I think the reason is lots of checking whether the operation is safe.
<ArneBab>I found that while profiling my distance sort implementation: min was 16% of the total runtime.
<ArneBab>though my implementation may be missing many special cases …
<rlb>right, I think, i.e. I was guessing that it might be in part because the optimizer has the opportunity to elide type checks, etc.
<ArneBab>I guess that, too
<ArneBab>also in Scheme I can just trust that the compiler ensures that invariants hold true
<rlb>Oh, that's not what you meant by "safe"?
<rlb>I see.
<ArneBab>I mean stuff like treating NaN correctly
<ArneBab>do you have an idea where in the guile repository I should put a scheme implementation of min?
<ArneBab>I don’t have to take care of -0 and +0, because I can trust that (< a b) already does that correctly.
<ArneBab>(I just put the current version directly into arithmetic.bm to test it)
<rlb>Not sure;2;27~. offhand, and also not sure what the precedents are there. Would we end up with duplicate implementations, or would s
<ArneBab>I think we could try to get rid of the C version
<rlb>oops (connection hitch)
<rlb>...would you attempt to have scm_num_ep_q redirect to the scheme version.
<rlb>(I meant to say)
<rlb>Also, imagine this might or might not be something that'd have to wait for 4.0
<rlb>(depending)
<rlb>and that logic tree's about what I recalled :)
<ArneBab>I guess we’d need to redirect from C to scheme, yes.
<rlb>Might also require bootstrap considerations -- not sure.
<rlb>So sorry, not enough experience with the relevant bits to know right offhand.
<ArneBab>complexity cropping up ☺
<ArneBab>thank you for those warnings!
<dsmith>I wonder if bouncing though C would lose the improvement of implementing in Scheme
<rlb>might for the C side, but presumably not for the scheme side?
<rlb>(if the scheme side's a win in the first place)
<ArneBab>yes
<ArneBab>here’s the replacement -- just drop it into benchmark-suite/benchmarks/arithmetic.bm and run ./benchmark-guile arithmetic.bm
<ArneBab> https://paste.debian.net/1398138/
<rlb>If you could find a case in the git history where we ever did something similar for another operator (recently enough) that might simplify things.
<rlb>And if there's not, that might tell us something too :)
<rlb>(e.g. maybe incidental, or maybe because "it's hard")
<rlb>...but also, clearly the compiler optimizes other numeric operations like + even though we have scm_sum, so "it's a thing".
<ArneBab>I don’t know where -- maybe I should leave that open for when wingo has more time. In the benchmarks with https://paste.debian.net/1398138/ I see a factor 1.5 to 3 speedup.
<ArneBab>But my time and energy is too limited right now to see it through I think. Maybe it’s best that I post this benchmark file to guile-devel.
<ArneBab>Moving more parts from C to Scheme is a longterm plan now that our compiler is good enough to beat simple C implementations.
<rlb>Yeah, hopefully Andy will have more time/energy to "consult" once he's finished with the whippet heavy lifting -- he'd almost certainly be a substantial amplifier wrt improvements.
<rlb>Many could "learn the compiler", but I'm pretty sure it'd be a lot less frustrating if someone could answer questions from time to time and/or provide guidance.
<ArneBab>yes
<rlb>(I learned a (very) little while working on part of the utf-8 conversion, and a bit of feedback from Andy was extremely helpful.)
<ArneBab>When I started, an implementation I created was golfed down in the mailing list to be at least factor 80 faster. It now lives in ice-9 string-fun.
<ArneBab>I wrote to the mailing list and have to call it a night (I’m stumped; could try to go on but would regret that deeply tomorrow)
<ArneBab>cu, and thank you for your work!
<rlb>night
<ArneBab>good night
<dthompson>ArneBab: min and max should be in scheme, yeah. I have a simple macro that handles just the cases I need it for here but would be easy to generalize: https://git.dthompson.us/chickadee/tree/chickadee/math.scm#n44
<dthompson>does your version get inlined?
<dthompson>when the number of args is known at compile time it's important for it to be inlined so the type inference pass can work its magic