jasongrossman has quit [Read error: Connection reset by peer]
jasongrossman has joined #nixos-chat
iqubic has joined #nixos-chat
drakonis has joined #nixos-chat
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 272 seconds]
lassulus_ is now known as lassulus
pie__ has joined #nixos-chat
pie___ has quit [Ping timeout: 272 seconds]
endformationage has joined #nixos-chat
drakonis has quit [Quit: WeeChat 2.3]
<elvishjerricco>
TIL Nix doesn't actually implement the maximal laziness paper. That's sad. Why is that?
<clever>
before, { args }: { args2 }: let foo = constExpr; in ...
<clever>
after, { args }: let foo = constExpr; in { args2 }: ...
<clever>
elvishjerricco: just making this small change in nix-tools, has reduced the memory usage of release.nix by 2gig
<elvishjerricco>
clever: Must because Nix lacks maximal sharing :P
<clever>
i think the problem, is that functions (and the entire AST) is a tree of Expr objects
<clever>
and that Expr returns a Value (which can be a lazy thunk, that runs an Expr)
<clever>
but, when you eval that lazy Value, it only mutates the Value, and not the Expr it came from
<clever>
so when you run the same constant-expr twice, you get different Value's
<clever>
i think to fix that, we need 2 changes to nix
<elvishjerricco>
Yea I've been poking around the Nix evaluation code for a minute. I'm not horribly surprised it's not extremely fast. It lacks lots of what Haskell does for speed, and doesn't have the maximal laziness I thought it had to make up for it.
<clever>
first, detect when an expression is pure, (can be tricky?), and then store the result of an Expr inside itself?
<clever>
another thing to note, is that an attrset, is a list of key/value pairs, and the keys must all be known
<clever>
so you cant get lazyness in keys when you { key1 = foo; "${computeKey2}" = bar; }
<elvishjerricco>
Even "impure" expressions should do that. Nix is much more pure if you pretend all readFile calls of the same path return the same data for a given session
<clever>
what i mean by pure, is the scope chain
<clever>
f = x: x * y
<clever>
this is not "pure" and depends on what scope it gets ran in
<elvishjerricco>
Oh. You mean no free variables?
<clever>
although, the y cant ever change...
<elvishjerricco>
I.E. combinatorial?
<clever>
it depends on the scope its parsed/defined within
<elvishjerricco>
Combinators*
<clever>
and when you call f from different places, it always uses the y from where f was defined
<clever>
not where f was called from
<clever>
let me check some source...
<elvishjerricco>
Yea there's a whole other theory accompanying lambda calculus about when you limit functions to only using their arguments
<clever>
so that will do a lookup of __mul in the current scope, and force it to be non-lazy, then COPY it from whereverit was found (so __mul only gets ran once, if it was lazy)
<clever>
so now, on line 1044, vFun is a tPrimOp (which contains a c++ function pointer)
<clever>
ahhhh!, maybeThunk is a function, that either turns an Expr into a thunk (laziness), or just runs the Expr!
<clever>
elvishjerricco: this is likely where maximal laziness can be impacted
<clever>
in this case, the 5 is an ExprInt, which bypasses thunk creation, and it increments nrAvoided
<infinisil>
They mention something about "Award-Winning Middle-Out Compression"
<infinisil>
"After shattering the theoretical limit of compression at TechCrunch Disrupt, we’re now able to transport even the most complex data files across our network within seconds."
<infinisil>
Um okay
<ldlework>
those data files are so complex!
<infinisil>
Imagine they used /dev/urandom to test their compression algorithm, concluding that theirs is the best, because all others take longer than their own
<gchristensen>
infinisil: how about my reply there
<infinisil>
Savage!
<infinisil>
Feels a bit like cheating though, I think haskellPackages are included there as well, and some other big package sets
<gchristensen>
it isn't cheating
<gchristensen>
they're available and packaged, how is that cheating :P
<infinisil>
haskellPackages at least don't all build, because it's just packaged automatically
<gchristensen>
sure
<infinisil>
But I guess packaged doesn't mean can't break :)
<gchristensen>
I think the meme of no adoption is worth fighting
<infinisil>
But then again, programming language packages is usually not what non-devs are interested in. Maybe a differentiation between dev packages and non-dev packages wouldn't be too bad
<infinisil>
gchristensen: Yeah that definitely
<gchristensen>
even still we build like 20k things for darwin / linux
<gchristensen>
(each)
<manveru>
damn, my psu got really loud with some ticking noise from the fan :(
<joepie91>
this is a recall of like, bath aroma fizzy things
<joepie91>
that were made to look like cupcakes
<joepie91>
because, in a twist that nobody expected, kids like to eat things that look like cupcakes
<gchristensen>
n!
* joepie91
facedesks
<gchristensen>
they look delicious!
<joepie91>
yes and they are very toxic lol
<joepie91>
idiots...
<joepie91>
oh apparently this type isn't toxic, it can just cause choking
<joepie91>
'just'
<joepie91>
I don't understand how at no point in the entire process from design to sales to packaging to shipping, nobody thought "hey uh maybe this isn't a great idea?"
<infinisil>
joepie91: A combination of stupid people is always a joy..
<MichaelRaskin>
I would assume that if bath aroma were also toxic, that would be a next level of facepalm
<joepie91>
shipped as multiple separate layers, that you can rearrange and turn around to modify the properties and firmness of the mattress; for each side individually for the 2-person mattresses
<joepie91>
never seen that before :P
<joepie91>
can't find a lot of trustworthy reviews about it though, but the ones I can find are positive...
<gchristensen>
want an invite to lobsters so you can post it?: )
<joepie91>
gchristensen: I have a lobsters account, but I'm currently mentally focused elsewhere and don't want to shift my attention :P
<joepie91>
first motivated day in a long while
<gchristensen>
I hear that
<infinisil>
gchristensen: Yeah I just saw that too
<infinisil>
Some points that should go in: pinning nixpkgs, using older versions without problems, reproducible, multiple different versions at the same time possible
jackdk has joined #nixos-chat
<infinisil>
I guess I'll give it a go, I'll keep it short though
<gchristensen>
yeah, over do-it and it sort of turns people off
<infinisil>
I'm gonna try to find a really old nixpkgs version that can build emacs to tell how good it's reproducibility and support for older versions is is lol
<infinisil>
s/is//
<gchristensen>
make sure to note *why* it is valuable to be able to do that (ie: old projects, or across multiple computers)
<infinisil>
As in "Great support for old versions, hell I can build an emacs from 200X!"
<jackdk>
hope that works. emacs moves on geological timescales.
<infinisil>
Turns out bisection over 170k commits takes quite a while..
<andi->
I always wonder why all the npm people accept npm -g while working on multiple projects.. That sort of thing is a prime example when working with different projects and having conflicting tooling
<joepie91>
andi-: the common recommendation is actually to install every tool locally into the project, the problem is that a lot of people come from eg. Python and assume that global tool installations are therefore also the correct option in JS
<joepie91>
(there are more issues like that, like the never-ending onslaught of people coming in asking for a "Rails-like framework in JS", sometimes *very* insistently)
<andi->
I come from Python and it was never right IMO.. That's why you start each project with pyvenv/pip/..
<joepie91>
andi-: Python is just one of the examples :)
<joepie91>
things are system-global in most languages
<joepie91>
and people bring those assumptions with them...
<andi->
I guess arguing with people in here what the correct way is is kinda pointless, most of us probably agree :)
<clever>
that searches for bootcode.bin, loads it into the L2 cache, and runs it
<clever>
that powers up dram, searches for start.elf, and runs it
<clever>
and then start.elf loads linux into ram, and powers on the ARM
<clever>
so you must use the VC4 cores (and currently, the foundation blob) to even boot linux
<clever>
and that blob is responsible for dealing with hdmi output, and various power management things
<infinisil>
Wait, I bet that commit just isn't cached
<gchristensen>
$ time cp /hydra-dump-2019-02-02.pg_dump /zfs/gzip-9/
<gchristensen>
real26m26.732s
<colemickens>
infinisil: this is tangential question sort of but are nixpkgs builds often called reproducible or repeatable? I thought only some packages are truly reproducible byte-for-byte, or maybe my understanding is wrong
<gchristensen>
very much of nixos is byte-for-byte reproducible, but you're right
<infinisil>
colemickens: I think they're still reproducible, just not byte-for-byte
<infinisil>
I guess it's not "truly" reproducible
<clever>
infinisil: there is also the nasty problem of upstream deleting source tarballs on us
<gchristensen>
good thing we mirror almost all ofthem
<infinisil>
Yeah
<colemickens>
clever: I think I kind of knew there was a blob involved in boot, but I'm guessing here... that blob is also used (or another blob, etc) is then used to talk over this physical camera interface and in newer revisions, they've made the physical camera link, firmware, utilize a pair of extra crypto chips nefariously.
Synthetica has joined #nixos-chat
<MichaelRaskin>
It still would be nice to be able to have fetchTarball and fetchVCS as alternative ways of obtaining the same source
<clever>
colemickens: the blob has always been involved in the camera
<clever>
colemickens: the GPU blob implements a fairly fancy AV pipeline, that lets you interconnect modules that do hardware encode/decode, muxing/demuxing, video/audio playback/capture, and more
<colemickens>
infinisil: yeah, wasn't trying to nitpick, was more curious if there was a set of terminology that I should use to distinguish. I think "content addressable" is used sometimes?
<colemickens>
clever: oh, doh, it seems obvious now... thanks
<clever>
colemickens: so you can just use that pipeline to do: camera->hardware_h264->muxer, and you get a fully formed .mp4 stream out of the GPU
<clever>
the linux "drivers" generally have zero clue how to actually control the hardware
<clever>
they just talk to the blob over an inter-cpu channel
<clever>
and since all cores share ram, it can trivially write to buffers the other core owns
<clever>
the VC4 side also lacks an MMU, so it runs a realtime os called threadx
<clever>
and funnily enough, the ARM side has 2 MMU's
<clever>
there is an extra MMU between "arm physical address" and "real physical"
<clever>
so you can entirely ban linux from reading certain regions of ram
<clever>
which would be of use to protect hdmi encryption keys and gpu firmware, if this was on a more strict device
<clever>
i was using that to implement my own proper drivers for the V3D core (the QPU and stuff)
<infinisil>
gchristensen: I'm also adding "- Customize builds easily. Useful for using forks of projects, using alternate dependencies, or changing configure flags."
<gchristensen>
neat
<infinisil>
Because homebrew apparently just removed all sorts of customization lol
<clever>
infinisil: this guy managed to steal commit access :P
<infinisil>
Should I also point out that nixpkgs doesn't have as good support for macOS as it has for Linux?
<infinisil>
clever: Yeah saw that xD
<jasongrossman>
Has someone added the point that Nix is cross-platform? That was a VERY big selling point for me. (I no longer use anything except NixOS, but I didn't know when I started with it that that would be the case.)
<jasongrossman>
I've already made that point on the Hacker News thread on the same topic.
<infinisil>
jasongrossman: Is that a selling point for homebrew users?
<clever>
jasongrossman: i once wrote a nixos module to boot with an iscsi rootfs, on the rpi
<clever>
jasongrossman: and i later just shoved that module into an x86 laptop, and it just worked
<clever>
jasongrossman: at one point, i even had an SD card, that booted on both the rpi and x86-64, with a single rootfs, and a single configuration.nix
* colemickens
has read some of those gists
<jasongrossman>
infinisil: Sure. I was exclusively a Mac user at the time I was most worried about this.
<jasongrossman>
clever: AWesome!
<jasongrossman>
infinisil: It wouldn't be an issue for someone who's exclusively a Mac user and planning to always remain that way, but if you exclude the non-programmers who aren't using homebrew anyway then there will be plenty of Mac users who don't want to restrict themselves to Macs forever.
<infinisil>
jasongrossman: Not sure what you're trying to say, I think I'll not mention the not-as-good mac support for now, it's not too bad anyways
<jasongrossman>
I'm trying to say "Nix is cross-platform".