gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<{^_^}> stedolan/jq#491 (by pkoppstein, 4 years ago, open): Enhancement request: integrated package manager
<infinisil> I didn't know jq was *that* serious about becoming a programming language
<simpson> infinisil: You haven't written a jq module yet? It's pretty fun: https://github.com/MostAwesomeDude/klesi/blob/master/cat.jq
<infinisil> Why not use a proper language though?
<infinisil> I guess if all you need is json processing jq is best fit.. But it screams of type unsafety and hard-to-debugness
<samueldr> :/
<samueldr> I thought for a moment there was another jq
<infinisil> There's so many languages
harrow has quit [*.net *.split]
harrow has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 240 seconds]
lassulus_ is now known as lassulus
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
jtojnar has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
kisik21 has joined #nixos-chat
<sphalerite> Heh, still getting annual birthday messages from the ubuntu forums that I haven't been on in years
<LnL> :p
__Sander__ has joined #nixos-chat
<manveru> well, there's yq :)
<srhb> And jl..
<MichaelRaskin> Is jl separate from JuliaLang?
<srhb> MichaelRaskin: It's like jq but with lambdas, hence the l
<MichaelRaskin> Oh
<sphalerite> Anybody able to tell what I did wrong in the translation of this assembly code to Haskell? o:) https://gist.github.com/lheckemann/1a36d656965edee1639abd752087da83
obadz has quit [Quit: WeeChat 2.1]
obadz has joined #nixos-chat
ma27 has quit [Quit: WeeChat 2.2]
ma27 has joined #nixos-chat
<andi-> sphalerite: convert back to assembly and diff? ;)
<zimbatm> manveru: nice, I hope that pnp gets adopted
<sphalerite> andi-: convert how? :)
<andi-> s/convert/compile/
<zimbatm> if that gets widespread usage it's going to remove all of our pains with node packaging
<manveru> zimbatm: was fun that they're also against the post install hooks :)
<manveru> hopefully that'll help a bit too
<zimbatm> yeah that's the main issue. and also reaching out to other modules at runtime
<zimbatm> manveru: I wonder if some of the lessons apply to ruby
<andi-> sphalerite: aren't you forgetting the shift before the loop condition?
<zimbatm> I wonder what is the overhead of bundler + looking up in all the GEM_PATHS
<zimbatm> if we had a single GEM_PATH with a symlink tree to all the gems it might be faster
<manveru> well, require still walks all over $:
<zimbatm> or introduce a resolver that enforces `require "gem_name/anything.rb"`
<sphalerite> andi-: the .&. is for determining the carry flag and the shift itself is in both branches of the if
<zimbatm> yeah but $: can be reduced to a single entry
<andi-> sphalerite: ok well then I don't see a difference, /me being not a haskell person
<manveru> remember the days when you had to `gem "foo"; require "foo/bar"`?
<sphalerite> andi-: and as for compiling, well, there are lots of different ways of compiling the same thing…
<sphalerite> andi-: I did actually try that, but the code was just completely different
<zimbatm> heh yeah :)
<manveru> and for a long time i actually managed RUBYLIB myself for each project
<zimbatm> require is implemented in C so it's going to be hard to change it's behaviour
<sphalerite> andi-: oooooh I think I got the condition the wrong way round!
<sphalerite> andi-: YES! IT WORKS :D
<sphalerite> andi-: thanks for the rubber-ducking!
<zimbatm> manveru: that was my main reason to write direnv, so I could set the RUBYLIB per project
<zimbatm> soon after it changed to GEM_PATH because of rails making it too difficult to use without bundler
<zimbatm> s/bundler/rubygems/
<manveru> yeah
<zimbatm> well now it's also bundler
<zimbatm> we're 3 levels deep
<manveru> i still don't get why people dislike require_relative inside gems :P
<manveru> makes things so much faster
<manveru> anw, i was thinking about providing a different way to require dependencies which uses nix only
<zimbatm> RUBYLIB=/nix/store/symlink-tree ?
<manveru> pretty much
<zimbatm> it would require a lot of changes, similar to deprecating npm postinstall
<manveru> i still think the hardest part is the dependency resolution
<manveru> when you decide what's compatible with what
<manveru> not sure about the proper name for this :)
<zimbatm> that would re-use the rubygems constraint solver isn't it?
<manveru> i think so
<zimbatm> we want: (1) rubygems.org API, ideally augmented with sha256 for everything
<manveru> they already have the hashes, right?
<zimbatm> (2) `require "rubygems"` should never be used, unless you want to interact with rubygems.org
<zimbatm> they added them?
<zimbatm> haven't touched ruby for so long now
<manveru> :)
<zimbatm> except "irb" :)
<andi-> sphalerite: yw :)
<manveru> i don't do much ruby these days, mostly hacking on other peoples rails projects...
<manveru> otherwise i'm using go, crystal, or elm or crystal
<manveru> -or crystal
<manveru> uhm, and mint
<zimbatm> mint is a PL?
<zimbatm> ok
<manveru> it's basically a DSL for typed react
<zimbatm> the past month I mainly wrote terraform, nix and bash code
<zimbatm> bash is my most fluent language at this point, not sure if that's a good thing or not :p
<manveru> lol
<manveru> know the feeling :P
<manveru> i'm still wondering about terraform
<manveru> do you use that instead of nixops?
<manveru> looked around a bit, but didn't really find any examples of how to use nix and terraform
<manveru> and given that i don't know anything about terraform, the few snippets i found weren't very explanatory :|
<zimbatm> at the moment the best approach is to use https://github.com/tweag/terraform-provider-nixos which spits out nix code that you can then use with nixops
<MichaelRaskin> .~
<zimbatm> nixops is then only used to provision the machines, terraform takes care of all the cloud resources
<zimbatm> the nixops state doesn't have to be kept around if the nixos config includes your ssh keys
<zimbatm> and the terraform state can be synched in a remote store automatically
<zimbatm> the main downside is that you have to remember to run nixops after terraform
<manveru> that sounds nice :)
<manveru> i found so many bugs trying to deploy to s3 with nixops...
<srhb> I've been planning to try this out for a long time too.
<srhb> The state problem with NixOps is real....
<srhb> I really want to get rid of the mandatory "deployer" machine.
<manveru> jup
<srhb> My main hacks have mainly been copy-closure and dealing with activation manually
<srhb> But then there's zero provisioning...
<manveru> i wrote my minimal nixops clone for that too :)
<srhb> Which I mind less because I think the black-box approach to provisioning that NixOps uses is terrying...
<srhb> manveru: Yeah, I know of like seven official of those, and a ton of internal ones as well
<srhb> Everyone does it. :P
<manveru> :D
<srhb> I wonder how many forks of "eval-machines.nix" is out there...
<srhb> er, eval-machine.nix I think
<manveru> i don't even do that much
<manveru> just nixos-rebuild with --build-host/--target-host
<manveru> although i find --build-host doesn't work usually, still builds locally
<manveru> so it's not exactly scalable
<manveru> on my DSL connection anyway
<zimbatm> I think eval-machine.nix should be moved to nixpkgs, pkgs.mkNixOS { configuration = [...
<zimbatm> there a PR on nixops to support remote states
<manveru> does anyone ever merge nixops PRs?
<sphalerite> clever, ldlework, any other reverse engineers: I'm getting the sneaking suspicion that dynamically linked software is easier to reverse, generally speaking. Would you agree?
<zimbatm> it depends if the stars are aligned properly
<manveru> it seems terribly unmaintained for such a popular project :|
<sphalerite> zimbatm: wouldn't that require keeping the nixpkgs fixpoint around so that config.nixpkgs.overlays can be applied correctly?
<manveru> probably because it tries to do too much and is impossible to test properly
<sphalerite> zimbatm: or reimporting nixpkgs I suppose
<sphalerite> but yeah in principle I'm all for that!
<zimbatm> sphalerite: yes that's the main issue, configuring nixpkgs overrides in nixos would be problematic
<srhb> manveru: I think the greatest suggestion in there for a while has been splitting out all provisioning to something like (or exactly) the terraform provider.
<srhb> manveru: And I think that would help on the PR situation a lot...
<manveru> well, i can give it a shot :)
<manveru> wanted to learn terraform anyway
<zimbatm> once pkgs.mkNixOS is introduced then the nixpkgs fix point could be resolved first
<srhb> zimbatm: mkNixOS?
<zimbatm> srhb: we were talking of moving "eval-machines.nix" to pkgs/top-level/all-packages.nix
<zimbatm> anyways it's just an idea at this point
<srhb> Ah, I see.
<srhb> That would be nice.
<zimbatm> nixos-rebuild could be extended with another heuristic: if /etc/nixos/default.nix exists then it would just nix-build that
<zimbatm> it would be cool if building the nixos system was just a normal nix-build + invoking switch-to-configuration
<manveru> been looking for eval-machines.nix all over, do you mean eval-machine-info.nix?
<manveru> but that doesn't seem very useful...
<manveru> i mean... looking at nixos-rebuild, it's literally doing a nix-build and switch-to-configuration...
<srhb> manveru: Yes, that one
<srhb> manveru: It's basically the entire heart of NixOps
<srhb> Particularly the phasing.
<srhb> Most NixOps clones I've seen essentially rip out most of that and reuse it.
<manveru> ok
<manveru> then i guess mine isn't a clone
<srhb> Well I'm sure there's other ways to do it :)
<srhb> Ah, yes, okay.
<srhb> You ripped out the "network" concept as well
<manveru> yeah, i guess that might be useful to have...
<sphalerite> clever: you were right, reverse engineering is fun :p
jtojnar has joined #nixos-chat
<sphalerite> clever: but it looks like it's not something I can do from linux, since it needs to run in real mode to call BIOS services
<sphalerite> clever: so I think the best I can do is a grub module or something for it? x)
<clever> sphalerite: possibly
<clever> sphalerite: let me get the next itp
<clever> sphalerite: grub modules are just .o files that havent been linked
<clever> there is a string in the .moddeps section, that defines other modules it depends on
<clever> and then if you #include the grub headers, you can link to functions at load time, and call grub utils
<sphalerite> clever: it seems it can actually be called from protected mode too after all
<sphalerite> clever: through the "BIOS32 Service Directory"
<clever> ah
<sphalerite> " For GRUB 2, the licence is required to be GPL otherwise it will not be loaded" lol
<clever> :D
<sphalerite> but why? Shouldn't a user be able to link it against code under any licence of their choice?
jtojnar has quit [Ping timeout: 252 seconds]
<manveru> ,
<{^_^}> All commands: -A IFD NUR arm ask bootfull callPackage channels cloudfront context dnw error escape" escape'' escape-special fancy-uninstall github hardware haskell help home-manager howoldis library logs nix-env-r nix-info nix-repl nixGL nixcon nixeval nixlang++ nixpkgsVersion not-os notfound outPath overlay paste pills pinning pr profiling proot pure-eval python qt releasenotes replaceModule runtimeDeps stateVersion stuck thesis timer todeclarative
jtojnar has joined #nixos-chat
<sphalerite> \o/ my experimentation with the BIOS interface has claimed its first victim
<samueldr> your sanity?
<sphalerite> samueldr: no, one of the machines has gone dead
<samueldr> that's where the fun starts :)
<sphalerite> I hope it's temporary
<sphalerite> But I've lost network connectivity and it doesn't respond to wake-on-lan
<sphalerite> so I'll need to check on it physically
<sphalerite> but hey, 7 of them are still alive!
<samueldr> *oblivious boss mode* but why didn't you virtualise it in the cloud instead?
<sphalerite> because desktop machines can't be virtualised :D
<sphalerite> thin clients are machines too!
<sphalerite> samueldr: these experiments are key to our manageability strategy. Configuring the machines' BIOS settings remotely allows us to reduce resource expenditures on on-premises service engineer calls
<sphalerite> how does that sound?
<samueldr> I didn't know for sure, but I was sure it was something along the lines
<samueldr> (I was joking with the cloud thing)
<samueldr> if only everything was coreboot able
<sphalerite> just playing along :D
<sphalerite> these machines *are* corebootable apparently
<sphalerite> I don't have the kit for flashing them though
<samueldr> weren't they off by a couple numbers?
<samueldr> aww, too bad
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-chat
<MichaelRaskin> > how does that sound?
<{^_^}> error: syntax error, unexpected ')', expecting ID or OR_KW or DOLLAR_CURLY or '"', at (string):194:1
<MichaelRaskin> Sounds like automation removing medium-skill jobs, obviously.
__Sander__ has quit [Quit: Konversation terminated!]
<manveru> zimbatm: any reason why the terraform-provider-nixos isn't in terraform-full?
<manveru> trying to figure out what overrides this thing needs to add that plugin... seems like there's no documentation or example anywhere :|
<manveru> `terraform_0_11-full = terraform_0_11.withPlugins lib.attrValues` makes no sense to me :P
<sphalerite> manveru: it's a function that takes the attrset of available plugins and returns a list of plugins
<sphalerite> manveru: lib.attrValues returns a list containing *all* of them
<manveru> ah
<sphalerite> it is a bit confusing!
<manveru> so like `terraform.withPlugins (plugins: [ plugins.aws terraform-provider-nixos ])`
<manveru> thanks :)
<manveru> now i just need to figure out how to get this nixos and aws provider to work together
<manveru> can't really set an ip if i have none yet...
<manveru> ah, found it
<manveru> don't think nixops can handle elastic ips that way...
<elvishjerricco> Nix's source is surprisingly pleasant. I was expecting it to be horrible to get through just because C++ has always led to nonsense for me, but this was really nicely architected and easy to follow. There's a couple uses of, like, global variables and stuff that I don't care for, but it wasn't too bad to figure out.
<sphalerite> elvishjerricco: agreed! nix is the most digestible C++ code I've worked with
<joepie91> there's a few layers of indirection that are difficult to follow given C++' lack of follow-the-references ability (yay lack of modules...), but other than that I've found it pretty easy to understand too
<manveru> god... AWS IAM doesn't support ed25519 keys yet...
<joepie91> elvishjerricco: another surprisingly good codebase is that of OpenTTD
<joepie91> it has some, uh, warts (like string-concat'ing HTTP requests...) but architecturally it's surprisingly easy to follow
<sphalerite> I replaced the battery in my 3-year-old phone today
<sphalerite> the original one was still pretty good, lasting 2 days on a good run
<sphalerite> I wonder how well it will do with a new battery :D
<zimbatm> manveru: no reason in particular. usually things aren't added unless they have a release
jtojnar has quit [Ping timeout: 252 seconds]
jtojnar has joined #nixos-chat
<manveru> zimbatm: you know how to get terraform to add my public ssh key?
<manveru> ah, got it :)
<manveru> damn rubber duck
<zimbatm> you're welcome :)
<manveru> i think i finally got everything right... let's hope :D
<manveru> it's just a shame about ed25519, but i only need RSA for the initial deploy?
<manveru> also wonder who's making the AMIs
jtojnar has quit [Ping timeout: 252 seconds]
jtojnar has joined #nixos-chat
pie_ has quit [Remote host closed the connection]
pie_ has joined #nixos-chat
jtojnar has quit [Ping timeout: 240 seconds]
kisik21 has quit [Ping timeout: 240 seconds]
tertl3 has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
<joepie91> is there such a thing as NixOS workshops/trainings?
<joepie91> the kind you might be sent to on your employer's dime
<ldlework> joepie91: you can come visit me in Iowa, i charge $2400 dollars a day but that includes continental breakfast and an air matress so
<joepie91> lol
<joepie91> asking for a friend
<andi-> 2399! And I might make a proper "bed" (wooden sticks) available!
<ldlework> hmm 2398 and I'll throw in my autograph
<andi-> 2400 and I will print a certificate with whatever you want on it.
<ldlework> 2401 and I'll let you design and print your own certificate on your own computer when you return home!
<andi-> this certification market is really competitive...
<simpson> $2400, but if you get a few more people to buy in then I'll throw a convention.
<ldlework> heh
<andi-> NixOS Certified rebuilder Level1 - has executed `nixos-rebuild switch` at least a few times including with `--help`
pie__ has joined #nixos-chat
pie_ has quit [Remote host closed the connection]