worldofpeace_ changed the topic of #nixos-dev to: #nixos-dev NixOS Development (#nixos for questions) | NixOS stable: 20.03 ✨ https://discourse.nixos.org/t/nixos-20-03-release/6785 | https://hydra.nixos.org/jobset/nixos/trunk-combined https://channels.nix.gsc.io/graph.html | https://r13y.com | 19.09 RMs: disasm, sphalerite; 20.03: worldofpeace, disasm | https://logs.nix.samueldr.com/nixos-dev
alp has quit [Ping timeout: 272 seconds]
drakonis has joined #nixos-dev
drakonis2 has joined #nixos-dev
drakonis_ has quit [Ping timeout: 265 seconds]
drakonis has quit [Ping timeout: 260 seconds]
teto has quit [Ping timeout: 246 seconds]
drakonis_ has joined #nixos-dev
drakonis2 has quit [Ping timeout: 272 seconds]
<drakonis1> isnt it common knowledge that alpine sees large usage among docker circles due to its container size being very slim?
<drakonis1> both from a memory and storage standpoint?
<gchristensen> yes
<gchristensen> well
<gchristensen> storage at least
<drakonis1> it defaults to musl
<gchristensen> right
<drakonis1> not particularly relevant
<drakonis1> its musl and busybox
<gchristensen> with nix's layering and buildLayeredImage, I think the benefits of musl become less clear
<drakonis1> perhaps
<drakonis1> its benefits are different from that of which alpine seeks
<drakonis1> or of glibc's
<gchristensen> sure
<gchristensen> but why container people care about musl or alpine is perhaps not sorelated to the motivations of musl or alpine
<drakonis1> yes
<drakonis1> certainly
cptchaos83 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
cptchaos83 has joined #nixos-dev
eyJhb has quit [Quit: Clever message]
Valodim has quit [Quit: ZNC 1.8.0 - https://znc.in]
eyJhb has joined #nixos-dev
eyJhb has quit [Changing host]
eyJhb has joined #nixos-dev
Valodim has joined #nixos-dev
lejonet has quit [Ping timeout: 260 seconds]
lejonet has joined #nixos-dev
justanotheruser has quit [Quit: WeeChat 2.7.1]
justanotheruser has joined #nixos-dev
orivej has quit [Ping timeout: 256 seconds]
drakonis1 has quit [Quit: WeeChat 2.8]
alp has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-dev
alp has quit [Ping timeout: 272 seconds]
<Profpatsch> not to speak about the fact that big parts of nixpkgs can be linked statically against musl anyway
<Profpatsch> pkgsStatic
<ehmry> if the nixos test framework was rewritten from scratch today, would it look different?
* ehmry is asking for a friend
orivej has joined #nixos-dev
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-dev
teto has joined #nixos-dev
__monty__ has joined #nixos-dev
<Valodim[m]> It probably doesn't matter. What made nixos so great is the serendipitous outcome to have gathered a critical mass community :)
<manveru> ehmry: i thought it was rewritten in python recently?
<manveru> though it doesn't look much different... i preferred the perl one :P
<LnL> yeah, not sure what the motivation for that was
<ehmry> I saw I talk by the person that did, I think it was that more people know python than perl
<manveru> i think to get rid of perl dependencies, since we already use python in the minimal closure or something
<ehmry> well perl is down there pretty deep
<manveru> yeah, but not a whole lot is left in the nix(os) utils
<manveru> if any...
<ehmry> I'm not complaining about the tests, I have a much worse test framework that I either rewrite or ditch for the nixos tests somehow
<ehmry> nevermind anyway, I can deal with this later
<manveru> i just hope they don't rewrite them in C++ like nixos-options... i keep getting coredumps from that since :|
<LnL> hmm, wasn't the user stuf also rewritten recenlty?
<adisbladis> manveru: I _really_ wish we could rewrite those utils sooner rather than later
<adisbladis> Actually perl is a pretty big chunk of closure for the minimal installer
<adisbladis> Especially when you start considering perl modules that in many cases are baked into python
<ehmry> I think the perl gets rewritten to C++ for performance reasons, and then the C++ gets rewritten to rust because then it wouldn't be C++
averell has joined #nixos-dev
<adisbladis> ehmry: I don't see anyone rewriting switch-to-configuration.pl or update-users-groups.pl in c++
<ehmry> well that, no
<manveru> command-not-found could also be a bash script...
<Mic92> the command-not-found version found in nix-index is written in bash.
<Mic92> We might switch to that.
<LnL> yeah, if channels are removed at some point the current approach won't work anyway
<manveru> yeah... i removed all my channels and it broke :P
<manveru> so i keep the nixos channel around just for this tool
<Profpatsch> Should rewrite everything to either Python or perl to have a consistent setup
<Profpatsch> And people prefer python, so let’s get rid of perl
<Profpatsch> Their power is very similar, so better to only have one for less overhead
<Profpatsch> doesn’t really matter which
<Profpatsch> Guix doesn’t have this problem scnr
<adisbladis> They have entirely new problems :P
<LnL> the consistency is nice but I feel like it makes it a lot harder for newcomers to contribute
<xfix> in theory, switch-to-configuration.pl could be rewritten to C++ or whatever, but I don't think anyone would want to actually do that
<Profpatsch> LnL: You mean only having to know one language instead of two very similar ones makes it *harder*?
<Profpatsch> That’s an interesting view.
<LnL> given that nix isn't a language everybody knows, yes
<ehmry> Profpatsch: remember, you are the one mixing dhall and nix :p
<LnL> I'm referring to the mix of languages in nixpkgs compared to doing everything in a dsl
<LnL> not perl vs python
<xfix> i personally don't see Perl being required for NixOS to be an issue, sure, it uses some space, but likely Perl would be installed by something else anyway
<Profpatsch> LnL: Ah, okay.
<Profpatsch> Well, that wasn’t the point of the discussion
<Profpatsch> so
<adisbladis> xfix: My problem is that it ends up in the minimal installer and that I as a nixpkgs contributor have to know multiple languages to hack on the OS tooling
<Profpatsch> Guix makes distinction even more difficult than nix, because it uses guile for configuration *and* at build time *and* at runtime
<adisbladis> By my rough guesstimate Perl adds another 150M
<adisbladis> (not just perl, including libraries pulled in by the scripts)
<xfix> i don't think most contributors have to understand how switch-to-configuration.pl works, but... 150MB is kinda a lot
<Profpatsch> xfix: Minimal closures for non-maximal applications (a full NixOS user system with desktop env *is* a maximal application) are useful on their own right
<Profpatsch> e.g. for minimizing deployment times
<Profpatsch> My server application might not have anything that uses perl, just some static haskell binary and a minima nixos colsure
<Profpatsch> So I don’t want to transfer 150MB to my production server every time I update.
<ehmry> i think perl is bigger that
<Profpatsch> Especially if I don’t have access to Gigabit
<ehmry> well I think it depends if its split output or not
<adisbladis> ehmry: Perl itself is ~90M
<adisbladis> But as soon as you start pulling in libraries things snowball
<xfix> 30MB of that is glibc, so Perl is more like 50MB
<xfix> i don't think realistically we will ever get rid of glibc
<Valodim> wasn't command-not-found rewritten in rust? what's not to like? :)
<manveru> Valodim: where did you get that info?
<xfix> although i find it interesting that 10MB of Perl is pretty much for CJK encoding support
<xfix> but likely nothing we can do about that
<manveru> xfix: same with ruby... iconv is pretty massive
<xfix> like, i would be surprised if NixOS actually cared about legacy CJK encodings (for me, anything non-Unicode is legacy), but it's here whatever you want it or not
<aanderse> xfix (@xfix:xfix.pw): I'm under the impression many of those legacy encodings are still in common use in some parts of Asia (though i don't know for sure)
<xfix> i don't disagree
<manveru> hm, actually encodings only make up about 4MB of ruby now, i thought it was much bigger...
<xfix> however, NixOS scripts shouldn't need those, but the unfortunate part is that they are here whatever they are needed or not
<aanderse> right, i understand
<{^_^}> #88517 (by Mic92, 1 week ago, open): command-not-found: rewrite in Rust
<manveru> o.O
<xfix> i know that Shift-JIS is very common in Japan still, but it's still a lot of space used for encodings if the only use of Perl is for NixOS scripts
<manveru> that seems a bit overkill, but ok...
<aanderse> xfix (@xfix:xfix.pw): I've never even thought about it but if i have Japanese in filenames on my nixos pc what encoding are they in? assuming utf8...
<xfix> likely UTF-8, but Linux doesn't enforce any particular encoding, it's just bytes
<manveru> i had to host samba in japan... you get all kinds of fun encodings :)
<manveru> not even gonna go into emails
<xfix> and yeah, i mentioned that glibc is 30MB, about 24MB of that is due to encodings, of course, nothing really we can do about that, but be annoyed about duplication of encoding handling everywhere
<Profpatsch> We are missing the mark in this discussion anyway
<Profpatsch> perl vs python is about reducing overhead of things people need to know to contribute
<Profpatsch> they are similar, so this overhead is unnecessary
<Profpatsch> thus: let’s get rid of one in favor of the other
<Profpatsch> people time is much more valuable than machine timen
<Profpatsch> -n
<xfix> i personally don't think that's an issue, a contributor doesn't need to know how `switch-to-configuration.pl` works to contribute to nixpkgs
<Profpatsch> “you don’t need to know how this part works, just accept it or learn a new language”
<Profpatsch> “this is for the elite of people who have enough time to study programming languages in their free time”
<Profpatsch> “only super nerds allowed here for no deeper reason than that the author felt like using a different language here”
<Profpatsch> “tooling is only good for python sorry, doesn’t make sense to make it good for perl which is only 20% of the code”
<manveru> Profpatsch: nixos-options is now C++, and it looks like command-not-found will be Rust...
<manveru> i know neither Python, C++, nor Rust well enough to contribute much
<Profpatsch> manveru: that’s the same discussion for non-scripting languages.
<xfix> similarly, if you don't want to change Pantheon update scripts (written in Elixir), you don't really need to know Elixir
<xfix> well, unless you want to change switch-to-configuration.pl, you don't really need to understand what it's doing
<Profpatsch> I am in favor for aiming towards moving everything to stable rust, away from C++/Haskell/Javascript
<Profpatsch> xfix: I believe I made a good case for why “you don’t have to understand what X is doing” is not a good philosophy to have.
<Profpatsch> I will not go into this any further.
<xfix> i don't think it's a reasonable expectation for anyone contributing to nixpkgs to understand everything in nixpkgs
<manveru> i don't think anyone expected that ever
<xfix> if a maintainer of a package wanted to write their update scripts in Brainfuck, their choice
<manveru> i just pray that there won't be even more C++
<manveru> Rust at least can give you stack traces when it fails...
<Profpatsch> xfix: you just steelmanned my argument
<Profpatsch> I thank you *draws hat*
<Profpatsch> manveru: I was pretty amazed when I noticed that the rust allocator can give you useful hints when it would just segfault in C
<Profpatsch> Or idk if it’s the allocator, but there was a helpful error message of what went wrong with some raw pointer stuff when C would just print segfault or something
<manveru> yep
<manveru> my coredumpctl always overflows...
<xfix> but okay, let me try a more reasonable argument, switch-to-configuration.pl is part of a system that you don't need to understand how it exactly works when dealing with other components
<xfix> similarly with glibc (written in C) which is too a part of a system you don't need to understand how it exactly works when dealing with other components
<xfix> yes, switch-to-configuration.pl is more NixOS specific than glibc, but contributors usually won't need to read source code of either
<xfix> <Profpatsch "manveru: I was pretty amazed whe"> yeah, every time Rust allocates memory, it checks whether it was successful, and if it wasn't, it calls OOM handler
<xfix> but that's really it, Rust by default uses system allocator, in the past it has used jemalloc, but that's not the case anymore
<manveru> for me it's mostly about debuggability as sysadmin, and debugging segfaults in e.g. nix itself is at least a magnitude harder than debugging backtraces from switch-to-configuration... ideally we'd just use safe rust for everything so i don't get either :)
<manveru> wishful thinking, but one can dream :D
<xfix> i wonder how practical rust will be for NixOS stuff, i would love to see Rust being used more in NixOS
<xfix> but at the same time, mrustc bootstrap takes forever: https://github.com/NixOS/nixpkgs/pull/85542
<{^_^}> #85542 (by ProgVal, 6 weeks ago, open): rust: bootstrap from source
<manveru> given that you now need to compile rust for nix anyway, i don't think we should waste that dependency
<xfix> oh, Rust is now required for Nix? cool
<Valodim> RIIR all da way
<manveru> xfix: i think the downloading part is now written in rust for better concurrency
<LnL> is that going to stay with the release?
<LnL> was some discussion about that at some point but don't remember what the conclusion was
<xfix> likely mrustc bootstrap isn't that big of an issue, as long you download from cache
<LnL> also yeah rust is compiled so the build closure matters less for runtime stuff
<Valodim> rust for sure catches more people than perl these days :)
<JJJollyjim> rust catches me, perl catches me out
<JJJollyjim> especially when i try to do string comparison
orivej_ has joined #nixos-dev
orivej has quit [Ping timeout: 265 seconds]
Jackneilll has quit [Read error: Connection reset by peer]
Jackneill has joined #nixos-dev
greizgh has quit [Quit: greizgh]
greizgh has joined #nixos-dev
drakonis_ has quit [Read error: Connection reset by peer]
greizgh has quit [Client Quit]
drakonis has joined #nixos-dev
greizgh has joined #nixos-dev
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 265 seconds]
greizgh has quit [Quit: greizgh]
greizgh has joined #nixos-dev
greizgh has quit [Client Quit]
greizgh has joined #nixos-dev
Jackneill has quit [Ping timeout: 260 seconds]
teto has quit [Ping timeout: 246 seconds]
Jackneill has joined #nixos-dev
teto has joined #nixos-dev
orivej_ has quit [Ping timeout: 260 seconds]
orivej has joined #nixos-dev
Jackneill has quit [Ping timeout: 272 seconds]
drakonis has joined #nixos-dev
drakonis_ has quit [Read error: Connection reset by peer]
drakonis1 has joined #nixos-dev
drakonis has quit [Ping timeout: 265 seconds]
Jackneill has joined #nixos-dev
drakonis has joined #nixos-dev
drakonis_ has joined #nixos-dev
drakonis1 has quit [Ping timeout: 256 seconds]
teto has quit [Ping timeout: 256 seconds]
drakonis has quit [Quit: WeeChat 2.8]
drakonis has joined #nixos-dev
teto has joined #nixos-dev
<manveru> hmm, the closure of `nix flake check` is kinda weird...
<manveru> that's all in the /nix/store within the derivation
<manveru> that's the derivation
<manveru> why do i have qemu or curl in there?
teto has quit [Quit: WeeChat 2.8]
<manveru> this is the derivation itself, i don't see any inputs besides busybox https://www.irccloud.com/pastebin/cEdtmHz8/drv.json
<manveru> `nix why-depends` says the check.drv doesn't depend on the qemu drv as well
Bunogi has quit [Quit: The Lounge - https://thelounge.chat]
Bunogi has joined #nixos-dev
<abathur> I stumbled into a timewaster today and trying to sort it out turned up something a little odd; not sure if it's reportably so...
<abathur> travis-ci build broke w/ unknown hash algo on what was just a merge separated by a few days from last run on branch; clever pointed out a new SRI hash as likely cause since travis builds are still on Nix 2.0.4 (released this day, 2018)
<LnL> are there sri hashes in nixpkgs?
<abathur> I cloned nixpkgs, diffed the successful/failed releases for uses of `\bhash\b =` and found several; I think pip is the cause (only one I noticed in the output for my successful build)
<abathur> LnL: heh heh! so I found the pip change commit https://github.com/NixOS/nixpkgs/commit/193cdc77703f1635b3fb55f80086eb0211499def and the hash is now `hash = "sha256:0s9z72cpa15p2bp7zq1lid8k2ykrznfzjwpq5f41v3f30faraxg7";`
<abathur> but I didn't think colon was a valid SRI separator, and I guess it isn't, but it's supported as a legacy Nix format
<abathur> so I got even more curious and ran `git grep "sha256-" -- "*.nix" | wc -l` and did the same for colon; haven't audited them all yet but 87 matches for "sha256:" and 38 matches for "sha256-"
__monty__ has quit [Quit: leaving]
<abathur> yeah, I saw that while I was trying to figure out wtf is going on
<LnL> should be disallowed IMHO
<LnL> unless minver.nix is bumped that is
<cole-h> SRI hashes in nixpkgs? +1.
<abathur> those aren't all legit matches, making better grep
<abathur> so 8 `hash = "sha256-...", 10 more `sha256 = "sha256-..." (not sure what the status of this is? is this intended front-running?)
<abathur> also not sure about the status of the : form, I see 15 `hash = "sha256:..."` and 19 `sha256 = "sha256:..."`
<abathur> also for metadata fun, of the 1300 commits I was looking at to find my culprit, there were 8 new `hash = "sha256:..." forms, 1 new `sha256 = "sha256-..."`, and 1 new `hash = "sha256-"`
<abathur> which is this window from roughly may 22-29 https://github.com/NixOS/nixpkgs/compare/571212eb839d482992adb05479b86eeb6a9c7b2f...b27a19d5bf799f581a8afc2b554f178e58c1f524, not that the compare is useful
<abathur> LnL cole-h I take it this is worth a report? @ nix? nixpkgs? anywhere else?
<emily> one problem is that recent nix prints out sri hashes, so it's kind of annoying for tofu
<emily> (maybe recent = nixFlakes? but I think maybe nixUnstable too... I don't remember about stable nix)
<LnL> I know, that's why I made that pr
<qyliss> pretty sure stable nix doesn't do that
<emily> ah I missed the Nix PR
<abathur> so, eh? big deal, little deal? open an issue on nixpkgs but just mention the nix PR LnL opened? aggressive mentions or let the system do its thing?
<abathur> don't want to whisper if it's a problem, but don't want to go sing it from the rooftops if it's minor
<LnL> dunno
drakonis_ has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-dev
drakonis_ has quit [Ping timeout: 272 seconds]