gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<colemickens> I must be lucky :)
pie__ has quit [Read error: Connection reset by peer]
pie__ has joined #nixos-chat
<gchristensen> pretty nuts you can get a 16 core 3.4ghz cpu for $600 these days.
<ldlework> what
<ldlework> that is nuts
<gchristensen> https://www.newegg.com/Product/Product.aspx?Item=N82E16819113541 32c, 4.2ghz (boost) at $1,700 -- incredible this even exists
<samueldr> 1399,99, with 550$ rebate at newegg.ca, 849.99CAD; current exchange rate from USD to CAD is 599.99 -> 797.72 CAD
* samueldr cries
<samueldr> (1399.99 is for the 599.99 item linked previously, same newegg item ID)
<gchristensen> send me 599usd and I'll mail it to you? :P
<samueldr> haha, nah, the computer I have is plenty fine for a while still
<samueldr> though I'm 99% sure it's the newegg.ca site doing a "fake sale"
<gchristensen> almost disappointingly, same. the computer I built in 2010 just won't quit.
<samueldr> annoyingly, can't figure out how to force a timeout with hydra :/
<samueldr> (with a way-too-barebones project)
<ottidmes> gchristensen: I am in a similar situation, but with a computer from 2009, although the PSU did die on me recently (became unstable), after overclocking and cheap second-hand RAM, I have no reason to buy a new one
<samueldr> took 20s, all timeouts are 10s (those hardcoded, and meta), and database shows timeout: 10 for the build, and the build took 20s :/
<gchristensen> you could "fix" the db to make it time out?
<samueldr> I can modify the status, but I would have liked to see it fail :/
<gchristensen> put an infinity sleep in there?
<samueldr> the default timeout is 10h!
<gchristensen> make it not 10h? :)
<samueldr> I did, 10s!
<gchristensen> ottidmes: nice... though a bit annoying since I am envious of these high cpu counts.
<samueldr> I can't find anywhere where timeout is set, and the db does say the build's timeout should be 10s :/
<samueldr> anywhere else where timeout is set*
<gchristensen> is it nix's timeout?
<samueldr> I'm not sure which one causes "Timed out" (status 7) in hydra
<gchristensen> samueldr: looks like Nix's timeout does it
<samueldr> I'm a bit fuzzy as to how to relate this to hydra
<gchristensen> Nix exits code 101 if the buildtimes out
<gchristensen> looks like the build-remote part of the queue runner detects the 101 and converts it to a TimedOut status.
<samueldr> hmm, I see, but how does it configure nix's timeout?
<gchristensen> frankly, maybe it doesn't
<samueldr> would *that* timeout be an overload of the status 7, where there's a timeout configurable in nix, and there's another in hydra?
<gchristensen> ah it does for sure
<samueldr> looking at man nix-build, timeout is both a configuration setting and a flag, but the flag isn't passed (AFAICT) by hydra
<samueldr> hmmm
<samueldr> mayb I have some idea
<samueldr> maxsilent is something found near timeout in build-remote.cc
* samueldr checks what it means, and why I would want 120 minutes of maxSilent
<gchristensen> though, not sure that applies since hydra runs over root and may skip the daemon
<samueldr> I really think it's the maxsilent thing, since there was nothing logged yet (really basic derivation, not even stdenv.mkderivation)
<samueldr> well, if it's "maxilent" it doesn't mean what I thought
<ldlework> I have this shell.nix, https://gist.github.com/dustinlacewell/78184f23cae50f709e921de6c308a6b9 how would I go about adding the Perkeep library? https://perkeep.org/code
<samueldr> gchristensen: oh, I understand what masilent is, now
<samueldr> it's not initial silence, but a span of time of silence at any time AFAICT
<samueldr> maxsilent*
<gchristensen> ah, yeah
<ldlework> Anyone actually doing AOC2018?
averell has quit [Remote host closed the connection]
averell has joined #nixos-chat
<ottidmes> I might have done something stupid, but I made a wrapper for xargs, such that it also works with shell functions :P
<infinisil> ldlework: I intend to yeah :)
<ldlework> infinisil: in haskell?
<infinisil> Probably
<ldlework> lame
<infinisil> Well I don't have time or motivation to learn anything else
<infinisil> Mainly motivation though lol
<ldlework> laaaaaame
<ldlework> hehe, is this working?
<ottidmes> do it in bash :P
<ldlework> no, don't
<ottidmes> no, if I were to do it, it would be Rust
<ldlework> i am actually considering golang, just because employers always seem to want it
<ldlework> and i'm not gonna write any of my own projects in golang, so maybe aoc is suitable as an intro heh
<infinisil> Laaame, there's nothing interesting to learn on goland
<infinisil> golang
<ottidmes> exactly
<ldlework> uh you don't have to tell me
<ldlework> i hate golang - learned it years ago but really dislike certain things about it
<ldlework> i do like csp and interfaces but that's all i can really say positive about it
<ottidmes> it does not match my way of approaching programming
<ldlework> i'm just going to be looking for work soon and python market is tainted by golang quite substantially
<ldlework> i do sre and docker and k8s for some reason cause many other things to be golang and companies to inexplicably introduce golang internally
<ldlework> perkeep library is golang...
<ldlework> lol
<ldlework> ottidmes: what languages do you prefer
<ldlework> that match your approach
<samueldr> laaaaaaame, do it in nix
<ottidmes> ldlework: Haskell and TypeScript are my languages of choice right now
<ldlework> i like TS
<infinisil> samueldr: Hehe, that might be something
<ldlework> i worry i wouldn't like haskell because i mostly like doing things involving IO
<ldlework> which is probably ignorant but hey
<emily> haskell is pretty good at IO
<Ralith> haskell is outstanding at IO
<Ralith> mainly because it can actually express it, rather than just letting it happen on the side
<samueldr> bash is wonderful at I/O, it even has redirection built-in!
* samueldr ducks
<ottidmes> samueldr: I would agree with you if it was not for the wording :P "wonderful" yeah... right
<samueldr> well
<samueldr> it makes you wonder
<ottidmes> lol
<emily> Ralith: my dues have lapsed, "pretty good" is all you're getting these days :p
<ldlework> samueldr: xD
<ldlework> anyone got a shell.nix suitable for having a go at AOC challenges with?
etu has quit [Ping timeout: 250 seconds]
<samueldr> stdenv has bash
<ldlework> samueldr: heh i meant with haskell
<samueldr> be careful what you ask for :) you might get exactly what you ask
<samueldr> monkey paw and all :)
<ldlework> well it's almost day 2
etu has joined #nixos-chat
ottidmes has quit [Ping timeout: 246 seconds]
endformationage has joined #nixos-chat
<infinisil> Just finished day one of aoc in haskell https://github.com/Infinisil/aoc18/tree/master/aoc1 :)
<infinisil> ldlework: Feel free to look at the nix files ^^
<infinisil> I'm using such a setup with all my Haskell projects
metastance has joined #nixos-chat
endformationage has quit [Quit: WeeChat 2.3]
<ldlework> infinisil: how did you generate such a project in the first place
<ldlework> given that it isn't just one file
<infinisil> ldlework: Well originally with cabal init, but I removed everything I didn't want from that and added what I needed
<ldlework> infinisil: ok
<ldlework> how to build?
<infinisil> ldlework: How to build what?
<ldlework> a given day
<ldlework> and run it
<infinisil> Ah, cd into it and nix-build or nix-shell --run "cabal build"
<infinisil> Hmm wait, cabal isnt' there :/
<infinisil> Ah no it works
<elvishjerricco> How do you all share your nixops state files with team members? Do you just keep them on bastion servers or something?
<ldlework> i wish i had a job where that was a concern :)
<ldlework> infinisil:
<ldlework> ./aoc1
<ldlework> aoc1: /home/ldlework/.cabal/share/x86_64-linux-ghc-8.4.4/aoc1-0.1.0.0/input: openFile: does not exist (No such file or directory)
<ldlework> why is it looking there?
<ldlework> well cabal run works
* ldlework shrugs
<infinisil> ldlework: Ah yeah
<infinisil> It needs a `cabal configure --datadir . --datasubdir .`
<infinisil> Not sure if there's a better way (other than cabal new-build, which just works)
<infinisil> ldlework: So `nix-shell --run "cabal new-run"` should just work
<ldlework> it does
<ldlework> I hear Haskell From First Principles is good yes?
<infinisil> No idea
<elvishjerricco> ldlework: Haskell From First Principles is *fine*. It's too long winded, but it does explain things well
<ldlework> what's better
<elvishjerricco> I've heard the wiki book is surprisingly useful. And I've heard excellent things about Graham Hutton's Programming in Haskell
metastance has quit [Quit: WeeChat 1.4]
ottidmes has joined #nixos-chat
jasongrossman has joined #nixos-chat
metastance has joined #nixos-chat
pie___ has joined #nixos-chat
pie__ has quit [Ping timeout: 268 seconds]
metastance has quit [Quit: WeeChat 2.3]
__monty__ has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
jasongrossman has joined #nixos-chat
pie__ has joined #nixos-chat
pie___ has quit [Ping timeout: 268 seconds]
endformationage has joined #nixos-chat
<samueldr> anyone has experience into somehow making block devices (e.g. /dev/sd*) use "predictable" names, like the network devices; or in another way, maybe list known devices (those internals) using other names so any additional devices (e.g. usb) always starts at /dev/sda?
<samueldr> I kinda hate how I always need to double and triple check I'm not `dd`ing to an internal drive
<samueldr> (the goal is to get rid of /dev/sdX for internal drives, mainly)
<__monty__> samueldr: Afaik UUIDs are predictable.
<samueldr> yeah, predictable isn't the right term here
<samueldr> I was making a comparison to the network interface names
<__monty__> /dev/target/by-UUID/ for example.
<samueldr> but what I really want is my static devices NOT to be /dev/sdX
<sphalerite> samueldr: get an nvme device ;P
<samueldr> I'm already using /dev/disks/by-whatever
<samueldr> sphalerite: >:(
<samueldr> won't help with the disks array I have :)
<samueldr> I'm thinking some udev magic should work there
<samueldr> the goal is to make any "/dev/sd*" a foreign disk
<samueldr> (and yes I'm fine with manually listing the devices to be blacklisted from being /dev/sd*)
<sphalerite> samueldr: looks like you can match on the WWID in a udev rule, then set NAME based on that
<samueldr> yep
<sphalerite> I did udevadm info -a /dev/nvme0n1 and got amongst other things ATTR{wwid}=="eui.002538baxxxxxxxx"
<samueldr> and I'm fine with listing all my fixed disks, since I already list them to mount them in my configuration :)
<sphalerite> oooh maybe you could also match on ATTR{removable} so you don't nede to list them at all
<samueldr> not really, but might be useful for other things
<samueldr> in my use case, an added disk, but not yet listed is still foreign :)
<samueldr> though it would be nice to drop all /dev/sd* and do something like /dev/disks/removable1p1
emily has quit [Ping timeout: 252 seconds]
emily has joined #nixos-chat
pie___ has joined #nixos-chat
pie__ has quit [Remote host closed the connection]
metastance has joined #nixos-chat
hedning has quit [Ping timeout: 246 seconds]
metastance has quit [Quit: WeeChat 1.4]
mdash has joined #nixos-chat
jackdk has joined #nixos-chat
<infinisil> I just wrote a super inefficient program to generate a specific random file (for advent of code day 2) with Haskell
<infinisil> I'm letting it generate a 1million line file now
<infinisil> It's been running for like 10 minutes now
<infinisil> Memory usage: 13GB
<jasongrossman> infinisil: I can lend you some memory if you like.
<infinisil> That would be great xD
<infinisil> AH it's done now
<jasongrossman> I'll post it.
<jasongrossman> Oh, too late. I posted it.
<ottidmes> lol, if you search advent of code, I get recommended searches of 2017, 2019, 2016, 2015, ehh...
<infinisil> I've done the first 2 days already, but now I want to make my solution so fast that it can find the solution for a 1'000'000 line input fast
<infinisil> in reasonable time*
<infinisil> It's not looking good as of yet, been running for 8 minutes now..
<ottidmes> infinisil: yeah, the website itself defaults to that, was just funny to me that those were the results, you would expect the term 2018 to be the most popular term after advent of code
<infinisil> I see, yeah