IRC channel logs
2023-01-24.log
back to list of logs
<mirai>is there any service that can track branches/issues/patches and check if it's still conflict-free to merge with the intended branch? <lechner>rekado / also, have you been getting my emails? (i worry primarily about deliverability, since i operate my own mail server <lechner>goggles-bot also uses the system guile <lechner>apteryx / i now install my script as a guile module and link it into /bin. can i still wrap that script? <lechner>anyone who knows a way to package a simple Guile script, please share! <bjc>i don't have access to my guix box rn, so i can't test it myself, but for simple scripts i think you should be able to use ‘extra-special-file’ to stick them in /bin <lechner>bjc / okay, thanks! i'll have a look around. <bjc>if you mean actually package it, if you have a channel set up you might get away with ‘copy-files-build-system’ <lechner>i don't; i just use plain text files in guix deploy or submit them to guix-patches <lechner>Hi, should guix shell -f guix.scm rebuild whenever guix.scm has changed? <bjc>what's -f do? but in general, i think rebuilds are only triggered if the derivation changes <lechner>well, guix build -f guix.scm rebuilds without --check. does that not mean that the derivation did change? <bjc>it shouldn't change it, since the test results don't alter the contents of the installed package <bjc>from the check phase of the package build <bjc>i mean, they *might*, if they drop files in the output, but in general they shouldn't <lechner>my package does not have a 'check phase <bjc>oh, ‘-f’ is for custom packages without a channel <bjc>it doesn't seem to affect --check at all <bjc>which i was mistaken about: --check is for testing environment variable clobbers <bjc>that won't affect the derivation <apteryx>lechner: yes you can; you should be able to use wrap-program to do so <apteryx>and then you won't need to propagate inputs (unless your package is also intended to be used as a library) <lechner>apteryx / thanks! do i have to add all cumulative prerequisites to the GUILE PATHS? <elb>`guix shell --container --no-cwd` is really a glorious thing <elb>guix gc: freed 1,532.37897 MiBs <-- this choice of units and precision is also great <Nathan-web>When using `(inherit ...)` in a `(package ...)` will `#:make-flags` over-write the inherited flags, or append? <Nathan-web>And, if it is overwrite, how could I append instead? <Nathan-web>Or, really, how do I keep `arguments` exactly the same as the the package I'm inheriting from, except append a make flag? <mroh>Nathan-web: for an example, take a look at "guix edit emacs-next-pgtk" that modifies the configure-flags of the inherited package (emacs-next). You can do the same with make-flags. <mroh>or hplip-minimal which deletes a configure-flag and appends another. <Nathan-web>Hah, just as I thought I was getting close with chatgpt explaining `package-mapping`! I'm trying substitue-keyword-arguments from the emacs example now, but I get `error: make-flags: unbound variable`. <Nathan-web>What module would that be in? (In general, I have trouble figuring out which modules to include) <Nathan-web>Running `c++` on any file containing `#include <string>` gives me a lot of errors similar to: `~/include/c++/type_traits:2597:8: error: expected ';' after struct <Nathan-web> { } _GLIBCXX17_DEPRECATED_SUGGEST("std::invoke_result");` and `~/.guix-profile/include/c++/bits/allocator.h:94:28: error: expected ';' after using declaration <Nathan-web> using is_always_equal`, which means I cannot compile a number of things. <Nathan-web>Any ideas on what might be wrong? I'd expect that this must be an issue with my install because otherwise I think I'd see other reports about something like this, but I'm not a c++ programmer so I have no idea what is causing this. <rekado>Nathan-web: are you using the gcc-toolchain package? <rekado>that’s a pretty recent GCC which defaults to more recent C++ standards <rekado>you may want to use an older gcc-toolchain or explicitly request an older standard <rekado>everyone, what are your thoughts on using package transformations in package definitions? <Nathan-web>file $(which c++) -> ~/.guix-profile/bin/c++: symbolic link to /gnu/store/2ggfdjdzvmjxnh8vzr5bavz8c1fbdyk2-clang-toolchain-15.0.6/bin/c++ <rekado>Nathan-web: oh, clang. No idea then. <rekado>I have a package here that needs an older biopython, but its inputs may have been built with the latest biopython. <Nathan-web>Any reason I shouldn't switch? I feel like I installed it for a reason but I can't remember why now. <rekado>so I’m thinking about using a package transformation <lembrun[m]>anyone knows how to pretty print a record with all of itf field in the guix repl ? <civodul>lembrun[m]: hi! there's nothing that would do that out of the box, but you could use record-type-fields and record-accessor to iterate over the fields and print their value <normeo>i want to understand, are guix service declarations supposed to cover the entire configuration language of a given package? what happens if they don't? <Kabouik> Is anyone using R on Linux with a tiling window manager like Sway/i3/xmonad/etc.? <grtcdr>Hey y'all, I'm trying to install Eclipse's JDT Language Server, but I can't find the relevant package - Eclipse JDT Core is packaged however. <grtcdr>I should mention that my Guix experience is very limited, I tried to define my own eclipse-java-jdt-ls module and failed quite badly. <lembrun[m]><jpoiret> "lembrun: there's probably a..." <- also happens with 5.15.89, I'm out of ideas <lembrun[m]>* of ideas, I'll try with another thinkpad this evening <GChriss>I'm getting the following error on a new Guix install: <GChriss>guix pull: error: libxml2-parent-pointers.patch: patch not found <GChriss>Appears when 'guix pull' is run by the user or root, also appears when any packages are attempt to install <GChriss>Removing '.cache' directory doesn't help. Any ideas? <GChriss>the patch itself is in the guix store as well as '.cache/guix/checkouts' <antipode>GChriss: Sounds like the 'guix pull is not concurrency-safe and should use worktrees' bug. <antipode>Proposed work-around: delete ~/.cache, switch to the previous generation (guix pull --rollback) and "guix pull" <GChriss>"guix pull: error: profile '/var/guix/profiles/per-user/gchriss/current-guix' does not exist" <GChriss>Same error message on roll-back as root <antipode>(I have been assuming that the original /run/current-system/profile/bin/guix was non-broken, in which case you could do /run/current-system/profile/bin/guix pull) <apteryx>probably a lot of bugs to iron out, but: file /gnu/store/dcfxzla705xam9bd42b627fsb77wfmc9-hello-rpm-pack.rpm says: RPM v3.0 bin i386/x86_64 <apteryx>so at least the lead section is okay ^^' <GChriss>antipode : as user: /run/current-system/profile/bin/guix <mirai>tldr, I'm changing and=> to return an empty list instead of #f when it fails <antipode>A reported bug I can't find the report of. <surpador>Hey Guix- I'm packaging a Perl script. If I don't make Perl a propagated input, I have to set the INC search path manually. Many of the required modules are transitive dependencies, so it seems like setting the search path manually would be difficlt. I don't want to pollute the user profile, but when Perl is propagated, the path is set right. Is there a standard solution to this? <sneek>luis-felipe, you have 1 message! <sneek>luis-felipe, mfiano says: I'll try again. I may have just tried it on a random broken commit. <luis-felipe>surpador: I had to wrap a script recently myself to avoid propagating software that is not supposed to be propagated. <surpador>luis-felipe: could you send me an example? The ones I can find look very manual and difficult, I might be misunderstanding the process <luis-felipe>surpador: See the wrap-program part in that package definition. <surpador>Thanks, I'll give it a look and see if I can get it working! <luis-felipe>Question: is there any way to make "guix build MY_PACKAGE" rebuild the package so that I can make sure all phases are run and actually work? <luis-felipe>(I mean, make it rebuild the package without having to modify the package definition) <surpador>I'd appreciate that too, I've been manually GCing the build outputs <apteryx>luis-felipe: yes, --no-grafts --check <devmsv>Hi, can anyone help me to package company npm project in guix? I'm using npm-build-system but stuck at 'npm ERR! code ENOTCACHED \n npm ERR! request to https://registry.npmjs.org/@fastify%2fcompress failed: cache mode is 'only-if-cached' but no cached response is available.'' <devmsv>of course the package is under node_modules so it shouldn't download anything... <devmsv>needless to say I know almost nothing about node and I'm still learning guix <apteryx>npm is probably not a good fit to get an introduction to guix; little is already packaged and there are known dependency cycles which will be hard to tackle <apteryx>but you are welcome to dive in and help change that if you have the motivation! <devmsv>apteryx: isn't node-build-system just running npm install ? at least I think I could made a package that way even if it is not pure guix package <Maya[m]1>@devmsv no, you can’t download anything inside a build <lechner>Hi, does anyone have a packaging example for a simple Guile script? Please share. Thanks! <mirai>lechner: did you take a look at the guile modules? <mirai>or grep for things that indicate guile scripts <lechner>mirai / yes, i had a look around guile-xyz.scm but would appreciate additional pointers <lechner>perhaps some parallels to python packaging would help me understand the mechanics better (even though i personally never use python). in particular, i wonder if there is mechanism in the Guile build system that propagates additions to GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH and, in case there isn't, if such a facility should exist in order to avoid propagating inputs <lechner>sorry about the name. it's intended to lower the creative threshold for something better than guix-helper-bot, which will otherwise be reinstated as soon as i package the Guile script for it <mirai>how can I debug an error of this form <mirai>guix build: error: #<procedure 7f8ed8447f40 at gnu/services/audio.scm:330:4 (expr)>: invalid G-expression input <mirai>there's no G-Expression there <lechner>tricon / i can recommend jimmy john's or potbelly's <lechner>mirai / does that line number even exist? <mirai>I suspect its macromagic at work <lechner>mirai / can you post the full error message with adjacent line references, please? <lechner>luis-felipe / thank you! I will look into wrapping also. <tricon>lechner: Good calls. Funny: I actually live in Jimmy's town (his house is just a few minutes from me). He sold that franchise for $1 billion. Crazy. <lechner>i don't know. those are some good sandwiches for good value <tricon>They are! I really liked the crunchy sammich they had recently. <mirai>guix build: error: #<procedure 7f4a05a5cf40 at gnu/services/audio.scm:330:4 (expr)>: invalid G-expression input <mirai>the procedure itself works fine with the REPL <lechner>tricon / jj's is my first stop whenever i'm in the midwest <lechner>then either the inputs are different, or the error is elsewhere <mirai>but that's because the Gexp isnt being built yet <PotentialUser-19>I have a question but it relates to how Guix handles the thing that is OT, basically will Guix stop me from using NF software if I need it? <lechner>PotentialUser-19 / no, we only try to stop you from needing it <PotentialUser-19>Great love that. And coming from a NixOS background, does Guix give similar OS configuration capabilities? <tricon>lechner: If you're ever in the Champaign-Urbana/Central IL region, let me know, and I'll buy. <PotentialUser-19>Does linux-libre conflict with kernel hardening patches much (like is there a linux-libre-hardened)? Asking on the assumption hurd isn't quite ready for prime time. <lechner>tricon / unfortunately, it's usually chicago, but i have been wanting to visit U-C ever since the internet browser was invented there. (didn't someone ask a question about building mosaic for guix a few weeks ago?) anywhy, this is such friendly channel, i cannot believe it. thanks so much! <tricon>lechner: Of course! Building Mosaic for Guix... now that would be a fun project. <PotentialUser-19>Okay last annoying question, is there a procedure to install it on an M1 chip? My next machine won't be a mac but this one is. <jpoiret>not sure we have support for M1, isn't asahi linux basically the only distro with such support? <PotentialUser-19>*sorta? NixOS works on Asahi because you can basically jury rig it to use the asahi patches. <jpoiret>well, you could also do that on Guix, but I personally haven't seen anyone do that <mirai>is '(foo . (1 2 3)) = '(foo (1 2 3)) <lechner>no. the latter has a '() a level higher <ieure>Correct, the former is a single cons cell, the latter is two cons cells. <unmatched-paren>'(foo (1 2 3)) is (cons 'foo (cons (cons 1 (cons 2 (cons 3 '()))) '()) <unmatched-paren>or: '(foo . (1 . (2 . (3 . ())))) versus '(foo . ((1 . (2 . (3 . ()))) . ())) <mirai>see if you can make sense of this <lechner>i think that's because the argument in 4 is part of a list <lechner>so the serialized value is also encapsulated by a list <lechner>sometimes it's good to take a walk away from the computer. how is the weather outside? <mirai>just some silly mistakes elsewhere <lechner>Hi, what is the meaning of 'prefix' in a package definition, please? <lechner>unmatched-paren / anywhere in guile-xyz.scm <lechner>unmatched-paren / how am i supposed to use wrap-program without 'assoc-ref inputs ...' please? <lechner>wrap a guile script with its runtime prerequisites <unmatched-paren>ah, and you want to do (string-append (assoc-ref inputs "foo") "/lib/guile/" version "/site-ccache") ettc? <unmatched-paren>you just replace the assoc-ref with #$(this-package-input "guile-loopdeloop") <unmatched-paren>it's basically the same as just doing #$guile-loopdeloop, except it takes input transformations into account, iiuc <lechner>apteryx / when using wrap-program on a link into the Guile site directory, the wrapper carries the hashbang "#!#f'. (it also creates a copy of the executable.) are you sure wrap-program can be used on links? <lechner>if not, do i have to precompile Guile scripts manually? <unmatched-paren>should be (wrap-program "/gnu/store/.../bin/guix-helper-bot"), methinks <mirai>the naptcha and co. bindings don't seem to be used anywhere? <lechner>they will be, and 'bin' includes #$output <lechner>that type of post has been called a rite of passage <jpoiret>I could possibly contribute to the monad explanation part <jpoiret>"so a monad is just a monoidal object in the monoidal category of endofunctors" <lechner>isn't scheme's 'begin' a monad sequencer for beginners? <jpoiret>no, there's nothing monadic about begin <jpoiret>you don't have bind, and it has effects <unmatched-paren>jpoiret: i have written some things about guix's monads specifically <unmatched-paren>anyway, what i want to know right now is, is this first paragraph too silly or okay? <jpoiret>especially in scheme, where we do have effects and no type system, the pros don't seem obvious at first <jpoiret>well, no static type system I should say <jpoiret>I personally think that it could be good to not mention, even through jokes, that monads are a complex thing <jpoiret>I don't want to be the mood-killer but it's probably best to also avoid medical-adjacent vocabulary as well, and "Warning:" might still be a bit too offputting for some. Maybe something a bit more tame, something like "Monads (of course we were going to talk about them)"? <jpoiret>i know the temptation to say "please don't run away" is strong but i don't think it has ever elicited a positive response from the uninitiated unfortunately <jpoiret>(i may have done the same in the past as well) <jpoiret>but the same can be said for things like "monads are actually very easy, look!", imo it's best not to alter the reader's expectations in any way :) <unmatched-paren>Regarding the capitalisation of "What is a Monad?", that's how English titles usually work. <jpoiret>oh you're right, i always get confused about those <bjc>monads are very easy the same way running is very easy: after you've done it a lot, it's not so hard anymore. but if you haven't done it at all, it looks impossible <bjc>so, yeah, i also hate the "look how simple it is" approach <unmatched-paren>jpoiret: Eh, it's fine. English has all sorts of nonsense, and yet you and many others here are indistinguishable from native speakers most of the time :) <jpoiret>if something that the infamous "monads are like burritos" blog post alongside all the "no, monads are not like burritos" counter posts taught me, it's that explaining monads is not a solved problem :) <bjc>it definitely is not. my only advice to everyone is "you get used to after a while", and even then i'm not so sure… <lembrun[m]>Monads are monoid (objects) in the (monoidal) category of endofunctors (which is monoidal with respect to functor composition). <unmatched-paren>Given that I don't understand very much in that statement at all, i'm not sure i'm qualified to be writing a blog post about monads. <jpoiret>unmatched-paren: heh, that's the category theorist's explanation, not that (immidiately) useful from a pure programmer's perspective <unmatched-paren>jpoiret: i think part of the problem might be that guix doesn't implement that many monads <jpoiret>yea, and since there's no type system it's harder to just say "oh I have something of type A → M B" <jpoiret>also, for a tutorial, I think it's mistaken to use programming names like "Maybe A", "List A", but rather plain descriptions like "either an error or something in A" and "zero or more things of A" <unmatched-paren>so, i have no idea how to start, which is why this has taken so long :( <bjc>good posts and explainers on these topics have already been waiting years. a little more time won't hurt anyone =) <jpoiret>yeah, probably doing a review of most good (and also not so good) monad tutorials out there could be a good starting point <tricon>lembrun[m]: that title made me LOL. <unmatched-paren>lembrun[m]: problem is, you can't really progressively explain guix monads like that <jpoiret>i mean, the other usual monads shouldn't be too hard to implement, right? <unmatched-paren>right, but we'd need to say something like "okay paste this into the repl before continuing: (define-monad ...) (define-monad ...)" <bjc>maybe it'd be better to come at it from the problem guix is trying to solve with the store monad, and how monads solve it? <bjc>ultimately, guix is trying to be a pure functional package manager (for handwavey reasons), but it still needs to compose packages together to build a distribution <bjc>which leads you pretty directly to needing a monad for the store <bjc>or, at least, that's my understanding of it <jpoiret>the store monad is basically just threading the store connection around instead of keeping it in every function's argument list <bjc>for managing state, it would be tough not to use a monad, because its hard to compose ad-hoc solutions to the problem <jpoiret>you'd be surprised at how much state there is in Guix though :) there are a lot of guile parameters, eg %current-system or %current-target-system <jpoiret>which is a source of problems: because there's no clear monadic interface, you don't know whether something you're calling actually relies on some state or not, otherwise you'd have to "run" the monad <Maya[m]1>bjc: well monads are only a great way to compose pure functions with effects, as guile is not a pure language and guix is pure only externally it doesnt matter that much <bjc>i should say it's hard to manage state in a pure functional environment without monads ;) <bjc>guix the programming environment is definitely not pure functions =) <Maya[m]1>well im writing a pure language with effects, and it is possible, but monads abstract the horror of composing a string of lambdas that need to pass a continuation with each other <bjc>ACTION . o O (let's port guix to haskell!) <bjc>just wrap haskell in parens. problem solved! <jpoiret>you forgot the meta-programming part though <Maya[m]1>bjc: hey you are talking about my language pretty much haha <jpoiret>meta-programming in strongly typed languages is hard <Maya[m]1>lembrun[m]: yeah kinda! but more lispy, also with the full algebraic type system <Maya[m]1>a lot inspired by typed-scheme and clojure <ham5urg>I have a remote machine running some Ubuntu crap. I want to reboot with the guix iso file but can't alter the machines boot method. Is it possible to "hot-boot" the iso-file right from the HD in a magical way? <Maya[m]1>ham5urg: you can install guix alongside apt though! <jpoiret>but, you can use a live system to install guix on it <Maya[m]1>lembrun[m]: yeah prolog is cool! but it is really hard once you start with cuting branches, as you need to think like the resolution algorythm <ham5urg>Maybe I can get to GRUB and boot it from there. <jpoiret>I'd suggest installing guix on ubuntu and using that to install guix system, that's what I did for my laptop <Maya[m]1>ham5urg: if you can boot to grub, you can manually boot anything from the shell <apteryx>lechner: it has to be used on the actual program I guess <ham5urg>I went through the gui-installation-process and after the vnc-console (a remote machine) shows two lines, the first is "sheperd: Service guix-daemon has been stopped." and the second is "sheperd: Service guix-daemon has been started.". It seems to me that the machine hangs. Or is it just slow? The webpanel of the hoster shows a 100% CPU and traffic and some mem-usage. It looks like it is installing but can't see any <rekado>for days now I’ve been tweaking java packages in an attempt to increase the default JDK version <rekado>I think what I really need is to section the graph and then build all the stuff close to the root with JDK 8, and all the stuff above a certain cutoff with the latest JDK <rekado>do we have a way to render a graph for all packages by build system? <PotentialUser-22>Hi, what is the difference in capabilities between guix and guix system?