IRC channel logs


back to list of logs

<daviid>jao: it seems you're not in #geiser (?)
<daviid>jao: i recently (a few days ago) updated geiser, fwiw i install from the source, so I did a git pull both in in my local geiser/core and geiser/guile dirs, then with this new version, start a 'new' emacs instance, M-x geiser-guile works, but if i quit guile and also kill the guile's repl buffer, M-x geiser-guile -> Symbol's function definitionis void: project-root, i wonder why and how to solve this problem
<jao>daviid, i don't know why you wouldn't see me in #geiser, i'm certainly there. anyway, what's your emacs version?
<daviid>GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2021-11-27, modified by Debian
<daviid>jao: i actually used to see youin the user list, maybe some erc new features, you're not - *** #geiser: topic set by jao, 2021-06-27 21:04:03\n *** Users on #geiser: daviid bjc rgherdt ecraven wingo lampilelo
<apteryx>hm, maybe I'm rusty, but using ac-d-bus I can't seem to connect to the session bus anymore...
<apteryx>it looks like:
<apteryx>my DBUS_SESSION_BUS_ADDRESS is set to unix:abstract=/tmp/dbus-4E2RnM89HP,guid=42156cdf2a0b7e87144b4d7063267dd1 and dbus-monitor shows some trafic
<d4ryus>apteryx: Looks like ac-d-bus does not handle abstact sockets correctly. It specifies sizeof(addr) to connect, but it should be offsetof(struct sockaddr_un, sun_path) + pathlen
<lilyp>d4ryus: I'm p sure there's a guile-internal bug that prevents abstract sockets from being handled correctly; one that has a fix, mind you
<lilyp>apteryx: re "anymore" – you were at one point able to do this? abstract sockets were broken for years iirc
<d4ryus>lilyp: yes, i think there is no way to do it in guile without using C, as it uses strlen iirc. ac-d-bus otoh implements connect in C:
***taiju` is now known as taiju
***Noisytoot_ is now known as Noisytoot
<apteryx>lilyp: I think it uses to work; accordingy to a docstring comment D-Bus changed the URI it uses
<apteryx>it used to be something like: unix:path=/var/run/dbus/system_bus_socket
<apteryx>or perhaps that's for the system bus and the user bus already was an abstract socket? not sure
<lilyp>the system bus does work because it's not abstract; but the user bus never worked for me
<jpoiret>shouldn't format have a docstring?
<apteryx>lilyp: perhaps I was testing as root on a machine with the jami-service-type running, and pointing the DBUS_SESSION_BUS_ADDRESS to unix:path=/var/run/jami/bus the last time, I forget how I tested it
<apteryx>lilyp: do you have an idea of what would needs to be done to make ac-d-bus work with the abstract socket URI?
<apteryx>it'd be much easier to test if that worked
<apteryx>seems the associated bug was closed:
<apteryx>supposedly a bug fixed in Guile
<apteryx>which is your commit above?
<apteryx>I guess your fix is not yet released and would appear in an eventual Guile 3.0.9?
<lilyp>indeed, I think it should be fixed with the next Guile release
<apteryx>thanks for fixing it!
<apteryx>perhaps I can play around with guile-next
***maximed is now known as antipode
<apteryx>ah yes, that's how I was testing things for jami on Guix, with export DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/jami/bus and sudo -E ./pre-inst-env guix repl, then using the guile-ac-d-bus powered (gnu build dbus-service) and (gnu build jami-service).
<apteryx>(with a provisioned account for the jami-service-type service)
<lechner>Hi, what is the easiest way to append one text file to the end of another, please?
<lilyp>lechner: unless you want to shell out to cat, see the dump-port procedure in guix
<lechner>lilyp: thanks so much!
<lechner>Hi, how may I refer to the open input port in the (thunk) to with-input-from-file, please?
<lilyp>lechner: there's a call-with-input-file procedure that passes it as argument
<lechner>yes, but then i need a lambda, don't i? the input is the penultimate argument to dump-port
<lechner>lilyp: ^
<lechner>actually, maybe scheme does not have partial function application
<antipode>lechner: Do you know about 'cut' and 'cute' from SRFI-26?
<antipode>lechner: To access the input port: From the documentation: ‘with the new port setup as
<antipode> respectively the ‘current-input-port’, ‘current-output-port’, or
<antipode> ‘current-error-port’’
<antipode>'current-input-port' is documented in (guile)Default Ports
<antipode>‘Return the current input port’
<lechner>antipode: i tried the current-* thing but i got Wrong type argument in position 1 (expecting open input port)
<lechner>antipode: thanks for the srfi-26 pointer though. great stuff!
<lechner>i am very green behind the ears
<antipode>As documented in the manual, 'current-input-port' is not a port, but a procedure returning the port.
<antipode>If you call it, it will return the port.
<lechner>antipode: great, thanks! like i said, very green
<lechner>Hi, i am also new to the error messages. what does this mean for this code, please?
<rekado_>lechner: with-input-from-file expects a thunk as the second argument
<rekado_>the (dump-port …) expression evaluates to #t and with-input-from-file tries to apply #t, because it expects a procedure
<lechner>rekado_: thanks! a thunk is a procedure with no arguments?
<lechner>Hi, should (use-modules (srfi srfi-26)) be enough to resolve 'cut'?
<lechner>maybe a lambda is easier
<rekado_>yes to both questions
<rekado_>(lambda () (dump-port …))
<rekado_>don’t use cut for a thunk
<lechner>rekado_: thank you so much!
<lechner>i love guile, but it's not quite mutual yet!
<ArneBab>I cannot count anymore how often my code now broke with "Wrong type argument in position 1 (expecting mutable pair)"
<ArneBab>We provide both quoted datastructures as very convenient way to define data and assoc-set! — those two mix very, very badly.
<ArneBab>I need a simple way that says “make mutable if needed, use mutation for efficiency”
<antipode>ArneBab: how about `((bla .,"string") (blo . ,123) . ,(list)) ?
<antipode>Basically, manually sort-of mark the tail and 'cdr' as mutable.
<lechner>Hi, should this part of the documentation read error: undeclared namespace: `ns2' instead of error: undeclared namespace: `bar'
<antipode>Going by ",expand", it produces 'cons', it doesn't use any 'quote' but instead 'cons' (and hence, mutable)
<antipode>Alternatively, maybe a variant 'mutable-quasiquote' of 'quasiquote'
<ArneBab>antipode: that looks like it works, but it’s a horrible hack and depends on internals that could change from version to version
<ArneBab>antipode: still: thank you for the hint!
<ArneBab>antipode: that just saved me from adding mutability-adding everywhere …