gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
jess has quit [Quit: K-Lined]
jess has joined #nixos-chat
rajivr has joined #nixos-chat
<Church-> Oh summer of nix looks neat
<Church-> Alas day job
spudly- has joined #nixos-chat
spudly has quit [Ping timeout: 260 seconds]
spudly- is now known as spudly
<pie_> oh this is interesting
<pie_> gchristensen: ever heard of autoexpect?
waleee-cl has quit [Quit: Connection closed for inactivity]
c4rc4s has joined #nixos-chat
ldlework has joined #nixos-chat
lunc has quit [Ping timeout: 252 seconds]
dotdotok has quit [Ping timeout: 268 seconds]
endformationage has quit [Ping timeout: 268 seconds]
<ashkitten> woo i can connect to my irc server and send ping commands
<pie_> i should have written down my neat typos now i forgot all of them
<pie_> latest: nix-hell
<pie_> ashkitten: yay \o/
<pie_> heh
<pie_> why isnt that bundled as an easteregg with the system
<pie_> $ nix-shell -p nix-hell
<pie_> error: undefined variable 'nix-hell' at (string):1:94
<pie_> damnit
cole-h has quit [Ping timeout: 265 seconds]
srk has joined #nixos-chat
linear_cannon has joined #nixos-chat
<ashkitten> the library i was using to parse and build irc messages was awful
<ashkitten> so i grabbed a different one and rewrote my code around it
<ashkitten> much better
linear_cannon is now known as ky0ko
<eyJhb> So, htop reports that the program that uses the most CPU is htop at 0.7, the rest is 0. But still all my cores are at 35
<eyJhb> -45% used (four cores)
<Ke> F2 and display and hide kernel threads
<eyJhb> Ke: It went down again. I think it was a unclean shutdown + ZFS doing some stuff behind the scenes to recover
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-chat
srk has quit [Quit: ZNC 1.8.2 - https://znc.in]
srk has joined #nixos-chat
__monty__ has joined #nixos-chat
ottidmes has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
ottidmes has joined #nixos-chat
dotdotok has joined #nixos-chat
waleee-cl has joined #nixos-chat
<gchristensen> pretty cool that for $9/mo you can get a 3 node cluster paying full price on AWS
<pie_> ok so to be fair the thing works from the same directory, just probably not in the way youd think
<pie_> you dont need to set the interpreter but only because it tries to call shell.nix by default im pretty sure
<pie_> if you name it anything else or do anything else nothing will work
<pie_> ok so not quite, things will work, but only as long as youre in the same dir. - and I cant figure out from the source even why passing -p doesnt preempt the shell.nix file existence check even though it's the opposite branch, but I guess I have to stare at it more
<pie_> ok i guess i must have been crossing some streams, -p unscrews things a little
<pie_> gchristensen: eyJhb: i bring ye cursed incantations:
<pie_> #! nix-shell -i "bash -c 'set -x; function f(){ fr=$(realpath \"$1\"); dir=$(dirname \"$fr\"); fname=$(basename \"$fr\"); shift; pushd \"$dir\"; nix-shell -v \"$fname\" \"$@\"; }; f \"$@\"' -- " -v -p hello
<gchristensen> wtf
<pie_> which is what breaks the relative paths
<pie_> the heuristic for shebangs is "is the first argument an executable that starts with a shebang" https://github.com/NixOS/nix/blob/8803753666023882515404177b08f3f8bdad52a0/src/nix-build/nix-build.cc#L106
<pie_> so we pass -v as the first argument to the exec-ed nix shell, as a no-op, to make it not infrec
<pie_> this makes the file-to-interpret not the first argument
<pie_> since it uses exec (?), the `bash -c 'function f() {}; f $@' -- ` pattern lets us do some stuff while reusing the arguments passed at the end
<pie_> -- makes the rest of the args be arguments to the script
<pie_> i think thats everything
<pie_> here's the set output: https://bpa.st/MH3Q
<sterni> pie_++
<{^_^}> pie_'s karma got increased to 19
<sterni> pie_: but what if I told you that the following works under a specific condition https://paste.textboard.org/71226c4a
<sterni> pie_: if the “script” nix expression is named something containing nix-shell it works lol
<sterni> I suspect that nix-shell checks if argv[0] doesn't contain nix-shell to check if it is running in interpreter or normal mode
<sterni> I'm not even joking
<sterni> > ./test-nix-shell.nix
<{^_^}> /var/lib/nixbot/state/nixpkgs/test-nix-shell.nix
<sterni> [nix-shell:~]$
<sterni> it also works if you call it shell.nix apparently
<sterni> but not if it is called anything else
<pie_> sterni: check the source i linked
<pie_> sterni: it checked if the first argument is an executable file with a shebang
<pie_> if it is it drops the first and then does some stuff and then execs itself at some point
<pie_> or wait, did i misunderstand what you man?
<pie_> mean
<sterni> std::regex_search(argv[1], std::regex("nix-shell")
<sterni> it checks if the first argument is called nix-shell
<sterni> so the heuristic is skipped if you call your file something which contains nix-shell
<pie_> yeah but thats to differentiate nix-shell and nix-build since theyre the same executable
<pie_> oh
<pie_> reeeealy
<sterni> argv[1] !!
<sterni> I'm not quite sure why that check exists to be honest
<pie_> sterni: probablz because exec or -a (from exec -a) is argv[0] when it calls itself
<pie_> so its stopping an infrec
<pie_> but imnot actually sure
<sterni> pie_: lol no that is a porting mistake actually
<sterni> I think??
<sterni> in the old perl script it checked argv[0]
<pie_> i'unno
<sterni> compare line 48 in nix-build.in
<sterni> and line 101 in nix-build.cc
<sterni> or is the prel ARGV variable cursed
<sterni> okay it's no mistake
<sterni> perl ARGV is cursed
<gchristensen> \
<pie_> sterni: also i didnt follow what you were trying to show me with https://paste.textboard.org/71226c4a
<sterni> I thought that was what you were trying to get to work roughly
<sterni> and that works without the cursed bash line if you call the file something with the substring nix-shell
<pie_> how does that even work
<pie_> sterni: downside is the shebang doesnt get processed
<pie_> sterni: also do you have a discourse @
cole-h has joined #nixos-chat
<pie_> also might be possible to remove the function, that was something i needed for some other thing but maybe not here
endformationage has joined #nixos-chat
supersandro2000 has quit [Remote host closed the connection]
supersandro2000 has joined #nixos-chat
<bqv> eyJhb: hey, you had a way of building the onlinego apk on nixos, mind walking me through how someday?
<bqv> I think I wanna hack on it
<bqv> But trying to build android projects is the most painful thing I've experienced
<pie_> sterni: so apparently its sufficient to disable the heuristic, and like this you can have your shebang and eat it too #! nix-shell -i "nix-shell -v" -p ""
cole-h has quit [Ping timeout: 260 seconds]
AkechiShiro has quit [Quit: WeeChat 2.9]
evanjs has quit [Quit: ZNC 1.8.2 - https://znc.in]
evanjs has joined #nixos-chat
evanjs has quit [Remote host closed the connection]
evanjs has joined #nixos-chat
AkechiShiro has joined #nixos-chat
tomberek has quit [Quit: Connection closed]
<sterni> pie_: @ sternenseemann
<eyJhb> bqv: I have none of the stuff for it anymore, but sure I can try!
<eyJhb> I actually want to make a "new" way of fetching all the dependencies etc.
<eyJhb> Because I am not a fan of the current one, where it works 70% of the time
vulpine has quit [Ping timeout: 276 seconds]
nckx is now known as jorts
sparogy has quit [Quit: ZNC 1.8.2 - https://znc.in]
sparogy has joined #nixos-chat
srk has quit [Ping timeout: 260 seconds]
ky0ko has quit [Quit: Leaving]
__monty__ has quit [Quit: leaving]
<eyJhb> gchristensen: How do you handle the UIDs on activation? Just make a static user instead ?
<gchristensen> any service which has state retained between boots gets statically assigned UIDs
<infinisil> Damn, I'm realizing that we're probably one of the last generations to have to work
<pie_> thats either overoptimistic or sufficiently pessimistic
<infinisil> Hehe
<infinisil> In say 100 years, I expect at least current first-world countries to be UBI based
<pie_> i never was much good at predicting the future
<MichaelRaskin> infinisil: not UBS?
<pie_> to borrow from the rationalists, how much are you willing to bet? :P
<pie_> USB?
<infinisil> UBS is a bank in switzerland I think
<infinisil> Guess you don't mean that though
<MichaelRaskin> pie_: to borrow from economists, how are you going to settle a bet about a time we are all dead?
<pie_> flip it three times
<MichaelRaskin> infinisil: Universal basic services more than income
<infinisil> Ah yeah, or that
<MichaelRaskin> I guess depending on details of the definition, Scandinavian social policy for citizens might or might not count as not strictly having to work
<samueldr> uh, no english reference (in a quick search) to this
<pie_> society of losers? :P
<MichaelRaskin> No, of leisure
<samueldr> loisirs ~= leisure
<pie_> x)
<pie_> now i know
<samueldr> oh, this reminded me of a linguistic nugget I thought of yesterday
<samueldr> (unrelated)
<samueldr> you know how words have "genders" in french, e.g. "une table", rather than "un table"
<samueldr> well, it's the word and not the concept here that has the gender
<MichaelRaskin> Speaking of 100-year predictions, there were prediction of < 30 hour work-week in all first world countries by now a hundred years ago
<samueldr> MichaelRaskin: yeah, basically what "société des loisirs" thought it would be, too
<MichaelRaskin> And they basically fail on policy problems, not on feasibility
<samueldr> and see, a vacuum cleaner (a "hoover" for UK peeps), is both "un aspirateur" and "une balayeuse" here
<hodapp> these are things I don't see happening in the US without a huge fight
<hodapp> a fight full of every single tired cliche, probably turned to memes nowadays
<MichaelRaskin> It looks like EU could actually supply its own agriculture and manufacturing needs
<samueldr> and the cursed part: loosely translated, "un aspirateur" is "a sucker", and "une balayeuse" is "a broomer"!
<hodapp> ok broomer
<samueldr> that was my second thought!
<pie_> xD
<samueldr> my bed time undirect thoughts thought about all that that way
<samueldr> how when you think about it in english it feels so cursed
<hodapp> I liked "Bullshit Jobs" by David Graeber, which was a pretty lengthy look at the concept and fetishization of "work" in the US
<MichaelRaskin> In russian vacuum cleaner is quite literaly dust sucker (but not in a way where sucker can be separated)
<samueldr> yeah, I believe in making sure no one has to get a job... in reducin the job market by adding automation and similar things
<samueldr> I can't comprehend people saying "what about the lost jobs" when talking about self-service checkout tills (the concept)
<samueldr> it should instead be: what can we do, like that, that reduces the "unneeded" jobs?
<MichaelRaskin> It _might_ be structuraly smoother to start enforcing minimum wage / maximum workweek strengthening
<samueldr> sure, "what can we do" includes first steps!
<hodapp> it's easy to comprehend when you consider how many are saying it from the context of 'everyone needs to have a job to have needs met'
<samueldr> unemployment shouldn't be a metric we try to keep low
<samueldr> hodapp: yeah exactly
<MichaelRaskin> Depends
<samueldr> it should be about _desire_ for jobs, more than basically "is everyone checked out in a job"
<MichaelRaskin> It is fine to say «OK. _underemployment_ will be regulated by making what is currently available — enough job to make ends meet»
<samueldr> (and availability of jobs)
<hodapp> in the US, availability of jobs is typically assumed infinite
<hodapp> and anyone's failure to find a job is pretty much always put onto the individual
lunc has joined #nixos-chat
<MichaelRaskin> Sure, when cryptocalvinists run economic policy it's a separate kind of disaster
<hodapp> they run economic policy, but also, they're answering to people who in vast majority are far more worried that someone receives something good they did not "deserve" or "earn", than that 100 times as many people fail to receive something they do
<hodapp> hence Reagan and his "welfare queen" speech, and so forth
<MichaelRaskin> But even speaking of EU — I believe one could balance-wise have EU supply its own consimption with nobody really needing a job, sure, but restructuring of social decision making needed for that makes 1917 revolution in Russia look outright a series of structurally irrelevant coups
<MichaelRaskin> hodapp: Yes, having a totalitarian sect at 15% of population size is bad, sure
<hodapp> those with the view I cited make up more than 15%
<hodapp> now, they'd gladly accept such welfare themselves
<MichaelRaskin> Nah, it's more the system where you cannot separate those who actually hold those views from those who end up in a block with them
<hodapp> but the idea of 'handouts' is a massive shibboleth to them
<hodapp> oh, yes, our 'authoritarians who think they are against authoritarianism' are a separate (depressing) issue
<MichaelRaskin> I think these people manage to run the show on both sides from time to time?
<hodapp> authoritarians in the US are pretty much all on one side
<hodapp> Bob Altemeyer has some good books here
<MichaelRaskin> Given that Wikipedia specifically classifies his work as work on RWA, should it be evidence that there are _no_ left-wing authoritarians?
<MichaelRaskin> I guess they do not get uninterrupted free reign, though.
<hodapp> more than none, but left-wing authoritarian is much more rare
<MichaelRaskin> Yeah, it's true that they are more visible than numerous, sure
<hodapp> but I think part of the point of his work is that there is something in the psychology and the language of the right wing that tends to tie it with authoritarianism
<MichaelRaskin> Isn't it just that law-and-order rhethoric ended up being _currently_ in the RW basket?
<hodapp> it doesn't seem to be incidental
<samueldr> they started producing a software-locked version of their car so it sells just under a limit for a government incentive
<MichaelRaskin> hodapp: looking from outside at how the trainwreck of coalitional politics played out in the 20th century, I would nto overestimate how coalitions need to make sense except short-term business sense
<hodapp> the GOP right now is trying to pretend they are simultaneously "pro-business", populist, religious-right, and whatever the fuck Q-Anon is
<MichaelRaskin> Is it even more mess than Dixiecrat+New England coalition?
<hodapp> it's about as much of a mess as it can be
<MichaelRaskin> I guess it helps that US «pro-business» and «religious-right» both means «Calvinist who does not explicitly mention Calvin»
<MichaelRaskin> Didn't you call as much of a mess as a two-party system can be Civil War?
<MichaelRaskin> Funny how the space things accidentally or intentionally associated with 2021-04-12 are all eventually not on the exact date
<{^_^}> tweag/nickel#330 (by yannham, 3 weeks ago, open): [RFC]Overriding
<drakonis> oh ho ho
<drakonis> strong urge to begin learning nickel
<MichaelRaskin> Oh the polite fiction about flexible configuration languages not needing to be OK-ish generic data crunching languages
<drakonis> is this the python moment where people will build a bunch of bindings and make nickel into a data crunching language?
<hodapp> am I the lone holdout here who is basically okay with XML
<drakonis> ewwww
<samueldr> every tool has its uses
<drakonis> indeed it does
<hodapp> I deal with a lotta JSON and YAML day-to-day...
<drakonis> xml is just a bit too... fat i'd say
<hodapp> pfffft
<drakonis> it is merely serviceable
<drakonis> relevant goal
<drakonis> convince the haskell community to use nickel instead of nix and dhall
<hodapp> hmmm
<hodapp> and the rest of Nix/NixOS?
<drakonis> it'll be part of nix already
<drakonis> both languages will be available
<drakonis> as well as a parser i think?
<colemickens> drakonis: did something happen or are you just hyping on nickel again (no shade, I was the other night too, it seems like it's taking shape)
<drakonis> the readme explains the migration path
<hodapp> can we find a way to kill Zig while we're at it?
<hodapp> I don't actually have a cogent explanation that anything is wrong with Zig, it just annoys me when HN gushes over it all the time
<drakonis> oh, its just a rfc for overrrides that tries to avoid repeating any mistakes from previous languages
<drakonis> not much right now
<samueldr> drakonis: I don't see any migration path about "nick in Nix"
<drakonis> one sec
<samueldr> oops, nick in Nix lol, nickel obviously
<hodapp> o_O
<samueldr> it's quoting Nix as an inspiration, and a "use case", where "use case" is more about what it could be used to, not a plan or anything
<drakonis> hmm
<drakonis> let me see, i recall reading that there was a goal to have them both side to side as a migration path for a while
<samueldr> because otherwise we'd have to assume it's going to be in Kubernetes and Bazel too :)
<hodapp> k8s makes me gag
<hodapp> so does bazel
<hodapp> I once had to handle both at once *and* tensorflow
<samueldr> is tensorflow named after tension headaches?
<drakonis> probably
<hodapp> may as well be
<hodapp> Google broke their own Go bindings to TensorFlow (dog food^2 = -dog food?) and so I had to use 3rd party bindings which worked only on a specific version of TensorFlow Lite... which required me te build from source, which required some specific version of bazel
<hodapp> which I had to also build from source
<drakonis> hmm, yeah i dont think i can find it right now
<drakonis> ah well
<drakonis> anyways, what i meant as migration path, is that nickel and nix would be available for nix
supersandro2000 is now known as Guest68734
Guest68734 has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
<drakonis> but i dont know if i misread something or not
supersandro2000 has joined #nixos-chat
cole-h has joined #nixos-chat