IRC channel logs

2023-07-13.log

back to list of logs

<Guest28>In Bash I could do someting like for res in 22 32 64 do ... done.  How would I do that in Guile Scheme? Basically need to move icons to have the correct path for them.
<RavenJoad>Guest28: (for-each (lambda (args) (do-things)) '(22 32 64)), if you want to run the function over the list only for side-effects. (guile) List Mapping
<Guest28>Thanks
<juliana[m]>inquiry: to what group must my user account belong to prevent needing to enter my password in order to connect to a wifi network?
<Guest28>Hmm '("22" "32" ...) says Wrong type to apply: #t
<nckx>What's the complete form?
<Guest28>RavenJoad answers but do-things is (invoke "mv" (string-append #$output "..." arg "..."))
<Guest28>basically the files are called product_logo_32.png and I need to loop over to create the icon dir.
<nckx>Did you wrap it in a lambda? That is, not doing the equivalent of (for-each (invoke …) '("22" "32" …))?
<nckx>Because that passes the *result* of (invoke …) as the first argument to for-each, which could be #t.
<Guest28>Wait, I just share the code, I wonder if I could use install-file anyways, but without creating the last dir
<nckx>I have to leave, but that sounds likely.
<nckx>Anyway, ‘(lamba (a) (invoke "mv" (string-append #$output "/foo/" a ".png") …))’ or so.
<nckx>Night!
<Guest28>Good Night
<Guest28> https://paste.debian.net/1285737/
<Guest28>install-file would make it really clean but last parameter is sadly a directory
<Guest28>Okay it works now, needed to remove a pair parenthesis
<nckx>ACTION now has very clean teeth.
<nckx>Great, now replace (invoke …) with (copy-file …) 😉
<bjc>i would like to buy your teeth
<nckx>In short, (invoke some-coreutil something) is never right or necessary or good.
<nckx>bjc: Weird, your the second one to ask me that, but the first one paid up. PM me in a decade or two.
<nckx>ACTION → 😴💤 now.
<Guest28>But what if I don't want to have duplicates, or is that just the way it is meant to be?
<ecraven>hello ;) is there a way to run firefox (or some other browser) in a container in guix, and give it access to only *one* subdirectory in my normal home directory? (and ideally do the same for a bunch of other applications too, but *different* subdirectories)?
<ChocolettePalett>ecraven: I am not a GNU/Guix expert, but I would use "guix shell --container" to achieve this. In theory you can change directory to your dedicated browser directory and start shell from it like this:... (full message at <https://libera.ems.host/_matrix/media/v3/download/libera.chat/2474b043fd43ad367db7bc0bab68c604a723b011>)
<ecraven>ChocolettePalett: thank you!
<ecraven>this should work on foreign guix (non guix-sd) too, right?
<distopico>ecraven: here a talk about container running tor browser https://video.fosdem.org/2023/D.minimalistic/guixfhs.webm, but limit the application acces to just some folder I guess not
<distopico>Yes containers works in non guixsd as well
<Martin[m]>Hello how to reproduce the results of this build https://ci.guix.gnu.org/build/1563387/details or any other binary from the official cuirass farm ?
<jpoiret>Martin[m]: I believe `guix system image -t iso9660 gnu/system/install.scm` is the command, if you're in a Guix checkout
<Martin[m]>I've tried it already with 'guix time-machine --commit=3b524cde7115a6e89a438c1fd230093e6f30442f -- system image -t iso9660 gnu/system/install.scm' on two different machines that produce reproducible '/gnu/store/hkxzyvx67sjxq86lrx4z7cnf7f66pgpa-image.iso' but its different then the cuirass build, why is that?
<cnx>hello guix, may i have some attention on the patch set adding the senpai irc client? https://issues.guix.gnu.org/64222
<civodul>Hello Guix!
<civodul>i wonder what it would take to use Xapian to automatically add "Issue XYZ referred to this" links in mumi
<nckx>sneek: Later tell Guest28: Well, my main point was to avoid INVOKE, but you probably want RENAME. Whatever subtle constraints you have, I'm sure there's a procedure to match!
<sneek>Got it.
<nckx>sneek: botsnacks.
<nckx>sneek: botsnack?
<sneek>:)
<nckx>Diet sneek.
<civodul>hey ho!
<civodul>cbaines: we're getting "failed to process revision" quite frequently lately, as discussed in https://issues.guix.gnu.org/64197
<civodul>i'm not sure what to do about that
<civodul>looks scary, but OTOH i've only seen it on qa.guix so far so i remain hopeful
<civodul>i'm not sure what can be done
<civodul>esp., as a reviewer, i'm tempted to just skip patch series that happen to exhibit the problem
<civodul>but it's not great because there's a risk we'll never process them
<civodul>so... looking for suggestions :-)
<pjals>By the way, why have many packages such as dolphin-emu been having build failures? There's been more packages having them but that's the one I can remember.
<lilyp>pjals: http://ci.guix.gnu.org/build/1558965/log/raw
<ecraven>hm.. I've installed glibc-locales, I've set GUIX_LOCPATH, but I *still* get the "hint" about installing it?
<civodul>ecraven: hi! this could happen if you install, say, glibc-locales@2.35, but you're running a binary linked against glibc@2.33
<lilyp>also happens at least once when you do a glibc update and is usually nothing to worry about
<ecraven>hm.. so I've done guix install guix, is that the right way to get a new (foreign) guix?
<zamfofex>I think you should have used ‘guix pull’ instead.
<ecraven>I've done that too
<ecraven>doing it again now ;)
<zamfofex>I don’t think ‘guix install guix’ is ever right. (And it is only allowed for the purposes of ‘guix shell -D’.)
<ecraven>ah, for some reason *now* it upgrades glibc-locales from 2.33 to 2.35.. why didn't it install that version right away?
<zamfofex>You can undo ‘guix install guix’ with ‘guix remove guix’ (otherwise, it’ll probably be preferred over the correct Guix binary from ‘guix pull’).
<ecraven>zamfofex: thanks
<ecraven>hm.. how do I get icecat working in a container?
<ecraven>(from inside a container to my local X server)
<ecraven>do I need to share /tmp/.X11-unix into the container?
<zamfofex>Yes. Maybe something like in this blog post would be helpful: <https://guix.gnu.org/blog/2023/the-filesystem-hierarchy-standard-comes-to-guix-containers/>
<ecraven>thanks!
<mirai>is it possible to specify which guix commit to use within the config.scm to be used with "guix system vm config.scm" ?
<zamfofex>ecraven: (I know you don’t need the FHS option like the post talks about, but it should have an example of what is needed to run a graphical program in a container.)
<zamfofex>mirai: I’m not sure, but have you considered using ‘guix time-machine’ for it?
<mirai>I'm planning on writing some very specific system/integration tests and being able to specify the commit in file would be a boon for reporting discrepancies
<ecraven>this is perfect: guix shell --container --network icecat --preserve='^DISPLAY$' --preserve='^XAUTHORITY$' --expose=$XAUTHORITY --expose=/sys/dev --expose=/sys/devices --expose=/dev/dri
<ecraven>thank you very much.. this is very inconvenient, if guix can do this, I seriously need to consider using it for just about anything :P :D
<ecraven>there's no performance effect on running this, right? it's just kernel namespaces?
<zamfofex>Yes, I think so!
<abrenon>hi guix
<zamfofex>Hello! 👋
<abrenon>I have been having this weird errors since a couple months when I try and compile some small haskell programs
<abrenon>ld complains about not finding "-lrt"
<abrenon>but librt.a is part of glibc which is in my development environment
<abrenon>so I wonder what I'm doing wrong, I'm pretty sure it used to work before GHC 9.*
<zamfofex>abrenon: See https://logs.guix.gnu.org/guix/2023-06-15.log#102433
<abrenon>^^ how funny ! looks like I found just the right person
<abrenon>thank you !
<abrenon>ok so lemme get this right, you updated glibc but that somehow removed librt from the package ?
<abrenon>so is that a matter of :static or not ? some people are also mentioning gcc-toolchain, I'm sorry for the question but I don't have a clear view of what each package is supposed to do
<abrenon>(gcc-toolchain is also in my environment, of course — otherwise ghc wouldn't be able to compile my script — but not its :static output)
<zamfofex>abrenon: glibc decided to move some libraries into ‘libc’ itself (such that e.g. ‘-ldl’ and ‘-lrt’ aren’t needed anymore), but introduced a set of empty ‘.a’ files so builds wouldn’t break (linking with ‘-ldl’ is now redundant but works). But by default, the Guix package assumed ‘.a’ files were meant to be sent to the ‘static’ output rather than the default ‘out’ output.
<zamfofex>I had to explicitly mark some of these ‘.a’ files to put them in ‘out’ too, but I forgot to list ‘librt.a’.
<abrenon>ok, so if I add the :static outputs it will work ?
<abrenon>but it does !
<abrenon>magic ! : )
<abrenon>thanks !!
<zamfofex>It will try to use all of the static libc libraries (rather than the dynamic libraries) which might cause some kind of trouble.
<zamfofex>But I’m glad it seems to have worked well enough for you!
<zamfofex>Or rather “rather than the shared libraries“”.
<abrenon>ah, so it wouldn't work in all situations ?
<zamfofex>I remember it not working at some point when trying to build a Haskell program myself, at least! 😅
<abrenon>darn : /
<abrenon>well, hope it will keep working for me
<abrenon>but I never had any trouble when building proper guix packages out of full-fledged cabal projects
<abrenon>so I was wondering what the haskell-build-system put in its environment that made it work
<zamfofex>abrenon: Seems like the current workaround is to indeed install ‘gcc-toolchain:static’ or ‘glibc:static’, see: https://issues.guix.gnu.org/63258
<abrenon>it doesn't explain why it didn't work for you at some point but if that's the recommended fix, I'll keep doing that
<abrenon>thanks for all the explanations !
<abrenon>I'm still very shaky on these matters and never sure what is happening
<ecraven>hm.. how do I tell guix shell --container to mount cwd as the *homedir*?
<nckx>(Don't forget to guix remove guix.)
<vagrantc>ecraven: rough guess ... but maybe something like: guix shell --container --share=$(pwd)=/home/SOMEUSER ...
<nckx>ecraven: --share=$PWD=$HOME ?
<nckx>Yep, that worked.
<vagrantc>oh, even simplererer
<nckx>But probably a BaShIsM like all nice things.
<nckx>Yours ain't.
<vagrantc>pretty sure it'd work in fish
<vagrantc>guix shell is one of the most amazing features of guix ... that i barely use
<vagrantc>guess the same is true of rollbacks
<jpoiret>just pushed and the remote git complained about gc, could anyone take a look?
<mirai>nckx: better quote that
<mirai>otherwise a stray space will mess things up
<janneke>jpoiret: \o/
<jpoiret>can't wait for the moment everything breaks down :p
<janneke>hehe
<ecraven>nckx: thanks!
<ecraven>does nix also have all these cool features?
<bjc>jpoiret: you pushed to hurd-team?
<geri>hey, could someone help me debug this? https://0x0.st/HjQu.scm
<geri>also mistake - it's not supposed to be dunstrc but a script but that doesn't matter
<geri>if you write it out manually it finds the file just fine
<jpoiret>bjc: to master
<jpoiret>there are still some patches remaining on hurd-team though
<rekado>jpoiret: isn’t this something the savannah admins would need to do for us?
<jpoiret>rekado: ah, you're right
<jpoiret>for a sec i thought someone would need to login to berlin 🙄
<jpoiret>today is the day i get some sleep
<geri>enjoy the night? :D
<mirai>geri: I'd use something like basename
<mirai>instead of the string-split you have there
<geri>mirai: the problem is that local-file cannot resolve path if it's in a macro
<geri>though that does make it neater, thank)
<rekado>does someone have an eye on matplotlib?
<rekado>we’re at 3.5.2, but 3.7 is the current stable release
<rekado>PurpleSym: I guess the scope for python-team is a little too big.
<rekado>we need an update of matplotlib and pygments (https://issues.guix.gnu.org/64503)
<nckx>mirai: You split unix with spaces, you get to keep both pieces.
<geri>Xe: are you the author of "How Nix and NixOS Get So Close to Perfect"
<Xe>yes
<geri>i watched it before getting into nix and now got here, good vid
<geri>)
<Xe>ah, I don't personally like guix that much (mostly due to it being a GNU project and tangential association with the toe cheese god), I mostly idle in here
<geri>i enjoy both, switched cause having home manager built in was cool + expressive language is more enjoyable to configure things in
<mirai>of the many (better) qualities that you could have used, I find it extremely disappointing that you had to fixate on the blunders instead
<geri>guix gives me the same vibes emacs does - it's super fun to play with
<mirai>must someone be born a saint and commit no faux-pas?
<geri>as if that's possible
<Xe>mirai: that and the GNU only stance that breaks my wifi card driver has just frankly made me not interested
<Xe>/shrug
<geri>i just compiled my kernel, though i see why someone might not be interested in that
<mirai>nonfree (soft|firm)ware is an injustice and GNU's (FSF?) stance is to oppose this encroachment of nonfree software components
<mirai>given the GNU/FSF mission which is inherently political in nature there's really not much that can be done here
<lilyp>I mean, gentoo folks have been compiling their kernels for well over ten years – if you really need to, by all means go ahead, but don't ask us for guidance.
<mirai>it would simply be inconsistent to “strive for a free software world” and “free software but with a dash of nonfree in it”
<mirai>and this isn't some GNU/FSF specific “fever”, substitute “free software” with some other concept (capital punishment?) and “GNU/FSF” with $YOUR_ACRONYM_HERE
<jpoiret>step 1) get a random user out of their lurking place. step 2) engage in online typing competitions
<geri>now i feel like a bad person :(
<Guest28>test
<sneek>Welcome back Guest28, you have 1 message!
<sneek>Guest28, nckx says: Well, my main point was to avoid INVOKE, but you probably want RENAME. Whatever subtle constraints you have, I'm sure there's a procedure to match!
<Guest28>Oh wow, the bot can handle Guests names correctly
<jpoiret>i feel like people should respect the tension between usability and ideals more. Not to say Guix should change its stance on what can be included, but maybe having a knee-jerk reaction to the age-old wifi problem is a bit much as well
<Guest28>nckx: https://guix.gnu.org/manual/en/html_node/Build-Utilities.html there is no such procedure called rename.  Where did you find it? (haven't tested it yet btw)
<mirai>tbh, I think the articles <https://www.gnu.org/philosophy/essays-and-articles.html#principles> should be read more often
<mirai>This one in particular <https://www.gnu.org/philosophy/saying-no-even-once.html>
<geri>lilyp: basically said exactly what i meant to say
<nckx>Guest28: RENAME-FILE. It's part of Guile.
<geri>fsf can't really take away your freedom to hurt yourself
<Guest28>nckx: Does it also create dirs if needed?
<nckx>Nein. That's why install-file exists, but yes, it sure made a Choice about not including the destination basename.
<mirai>there's some pervasive misconceptions about GNU (even among FSF/GNU enthusiasts!) that could be cleared up with just a bit of reading
<kiwibytes>Hi there! Has anyone maybe some experience with installing guix on a Fujitsu Futro S920?
<geri>mirai: misconceptions like what?
<Guest28>nckx: Ah okay thanks.  Well, I am going to update my code to replace invoke with rename-file to the it the right way.
<lilyp>geri for your local-file issues, if you are still trying to debug them, the thing you're writing looks extremely cursed. Is there any reason you can't use (program-file ...)?
<mirai>geri: first paragraph of the second link I posted
<Guest28>nckx: to do it the right way*
<lilyp>I think you're reading too much into that.
<lilyp>Or maybe not, depending on whom you address it to – if you mean FSF/GNU enthusiasts, though, I think they are already well aware of this.
<geri>lilyp: it's probably because i still don't understand how it works
<lilyp>It's rather that at some point you get exhausted hearing the same thing over and over.
<lilyp>geri: What exactly are you trying to achieve? Perhaps this is an X/Y problem.
<RavenJoad>Guest28: Your last question about copying the file rather than moving it: If you are copying from the source to the output directory, then copying should be fine. Once the build is completed, the original source is no longer needed and is eligible for removal through GC.
<geri>basically i was trying to "install" gui scripts only if gui file is sourced, it works and i wanted to reduce boilerplate w/ a macro but it behaves really not how i expect it to
<geri>i create packages out of local-files and just append them to home-environment's packages
<Guest28>RavenJoad: In my case it is internally, that would mean duplicate files in the package.  This kinda annoys me although it is only some bytes.
<geri>it could be because syntax and macros don't interact together in a way i expect, cause my macro experience is w/ elisp and cl
<nckx>The source you're moving from isn't the one in the story anyway. It's a copy.
<nckx>Sigh. Store.
<lilyp>"I create packages out of local-files" – already cursed if you're doing this for more than a few files; look into version control if that's the case.
<RavenJoad>Guest28: If the file needs to be in multiple locations, perhaps a symlink? But I believe the store is automatically optimized using hard links anyways.
<reily>I'm having some troubles using TRAMP in emacs to connect to a non-guix system. I am able to use TRAMP to open and edit files, but running commands in eshell results in the error "sh: cd: /some/dir/: No such file or directory." (where /some/dir/ is a directory that absolutely exists on the remote system). After this, the eshell prompt changes to the value of tramp-end-of-output until exit is run. This does not happen when using
<reily>eshell-builtin commands, or when using shell-mode. Has anyone else encountered this?
<geri>i have a grand dream of having everything managed by guix in the end B)
<kiwibytes>My second install ended once again at building some XDG-Desktop data in /gnu/store...
<kiwibytes>Should i try another desktop system?
<lilyp>you mean "ended" as in completed or as in failed?
<nckx>Can you share the full build log or at least error message somewhere? (Not pasted directly in the channel.)
<Guest28>RavenJoad:  They are in /lib/some/other/dir/ and need to go to /share/icons/hicolor/and/so/on
<mirai>geri: I'm finding myself in a similar situation (packages out of local files as a workaround since the files are to be sourced by bittorrent or some protocol other than the traditional HTTP)
<kiwibytes>I don't know. I would be complicated... I have connection to it...
<lilyp>geri: for the record, what does the non-macro'd working code look like?
<mirai>haven't figured it out yet tho
<Guest28>reily: Several months ago, some users reported the same issues.  Though, I personally never had an issue with that.  Do you may use an old version of Guix and which Emacs do you use?
<reily>Guest28: My guix is up to date and I use emacs-pgtk-next
<geri>(utils/define-script "script" "./files/script")
<nckx>Guest28: The build system could have a (say) ICON_DIR=/foo option, if you're not sick of this yet.
<RavenJoad>Guest28: If /lib/... is from the source, then a copy/install-file to the destination is enough. If the files need to be in both locations, then a copy and let Guix optimize it automatically.
<Guest28>reily: Ah okay.  I am using 28.2.  I can't really help you but may check the logs and issues.  I remember that in the past several people had issues with it on IRC
<nckx>ACTION disagrees with the latter.
<lilyp>reily: could you dig into tramp via edebug and see what command actually gets executed on the remote?
<lilyp>geri: why would you expand one line into several ones?
<geri>oh wait, sorry
<geri>(utils/define-script "script" (local-file "./files/script"))
<geri>also didn't get the question lilyp
<kiwibytes>I have NO connection to it.^ I just sended a dump of the errors. I try another desktop system...
<geri>also is it just me or are relative paths a pain in guile?
<lilyp>geri: to repeat the question, can you post the macro code vs. the manually expanded one "side by side" so that we can get expected behaviour?
<reily>lilyp: This is what tramp-debug shows: https://paste.debian.net/1285797/
<lilyp>well no, but actually yes – relative paths are cursed in and of themselves, because they're context-dependant
<geri>i actually used macroexpand and tree-il->scheme and it returned the same expression as the working one
<kiwibytes>Could it be a problem, that i have a "Advanced Micro Device, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics]"?
<nckx>geri: They are no more or less a pain than in any other language. Might be Guix.
<lilyp>reily: exec\ \"\$\@\" .. /usr/bin/ls – whut?
<lilyp>kiwibytes well, your system does have graphics at all, so that's good, but I'd try the bare-bones setup first and then go from there
<geri>except now it doesn't, huh
<geri>lemme add some context to the file
<lilyp>having a working base is preferable to rerunning install over and over
<lilyp>geri: tree-il->scheme is a false oracle sometimes
<RavenJoad>Speaking of the installer, I noticed a "bug" in the Guix installer when I installed on my "desktop" a while back. It mistook a management NIC as one providing an Internet connection.
<geri>i really miss macroexpand-1 from cl rn
<geri>should i send expansion w/o tree-il conversion?
<lilyp>I want the manually expanded code, that is what you want it to mean.
<lilyp>not what it actually does, i can expand that in my own guile
<geri>well, that's the working code ofc :D
<reily>lilyp: A lot of the junk seems to come from having emacs-eat enabled. Disabling that results in this: https://paste.debian.net/1285799/
<lilyp>and this ls succeeds or not?
<geri> https://0x0.st/HjQk.scm
<geri>hope it's better
<kiwibytes>lilyp: Do you mean without a desktop environment, just the shell?
<lilyp>geri: try (define-syntax-rule (utils/script src) (utils/define-script (basename src) (local-file src)))
<lilyp>yes, there is a bare bones template in gnu/system/examples/bare-bones.tmpl – the file name might be different on the installation disk
<geri>okay that works xd
<geri>any idea why define-macro didn't?
<kiwibytes>I just started it once again with the i3 windows manager. If it doesn't work again, i will try it without the graphic installer...
<lilyp>because quasiquote is not that great for code staging, actually
<geri>code staging?
<lilyp>fancy schmancy word for "executing code later"
<geri>i don't know many other ways to store code as data xd
<geri>
<lilyp>I don't think you need to do so here, anyway. Just use a syntax rule and be done with it.
<geri>here maybe not, but for wahtever ideas i have after this it might be useful
<geri>i really gotta go research syntax rules some more tho
<kiwibytes>It crashed agyin... DAMN!!!
<geri>:(
<reily>lilyp: I just spent a long time working my way down the edebug callstack for sending a command, to find out at the end its just running make-process, and appears to be doing so correctly. make-process is a C function, so I cant really get any more insight into whats going on until it resurfaces in the tramp logs. Any advice?
<reily>Update, it looks like TRAMP is trying to run the command on the local host instead of the remote, as making the corresponding directory on the local machine results in "/usr/bin/ls: No such file or directory." Again, this file exists at this location on the remote, just not the local host. Any idea why eshell and tramp only have this behavior when connnecting to a non-guix host? Everything works fine when connecting to another guix
<reily>machine
<gabber>i'm running into this nasty message: https://paste.debian.net/1285805/ am I doing it wrong or does Houston have a problem?
<rekado>to work around it remove bordeaux.guix.gnu.org from the substitute servers
<rekado>(I don’t know why the error pops up)
<gabber>there's no way to do that ad-hoc, right? so i'll have to `guix pull roll-back && sudo guix system reconfigure config.scm && guix pull && sudo guix system reconfigure` ?
<nckx>guix system foo --substitute-urls=https://ci.guix.gnu.org
<nckx>The problem appears to be that bordeaux is still serving a stale narinfo to a file it doesn't have: https://bordeaux.guix.gnu.org/zzbb0whz7ihpzbg1zlz8h1gdjcglqlfk.narinfo
<nckx>ACTION away.
<gabber>thanks you two!
<lilyp>sneek later tell reily our emacs ships with some workaround to fix tramp as the receiving end but I don't have the means to debug it as sending end, sadly
<sneek>Will do.