infinisil changed the topic of #nix-lang to: Channel for discussing Nix as a language - https://nixos.org/nix/manual/#chap-writing-nix-expressions - Logs: https://logs.nix.samueldr.com/nix-lang/
nf has quit [Quit: Fairfarren.]
awaxa has quit [Ping timeout: 246 seconds]
nf has joined #nix-lang
kalbasit[m] has quit [Ping timeout: 246 seconds]
awaxa has joined #nix-lang
kalbasit[m] has joined #nix-lang
ris has quit [Ping timeout: 245 seconds]
rajivr has joined #nix-lang
mvnetbiz_ has quit [Ping timeout: 240 seconds]
awaxa has quit [Ping timeout: 240 seconds]
kalbasit[m] has quit [Ping timeout: 240 seconds]
colemickens has quit [Ping timeout: 240 seconds]
globin_ has quit [Ping timeout: 240 seconds]
globin_ has joined #nix-lang
puckipedia has joined #nix-lang
puck has quit [Ping timeout: 260 seconds]
puckipedia is now known as puck
Dotz0cat has quit [Ping timeout: 240 seconds]
Dotz0cat has joined #nix-lang
awaxa has joined #nix-lang
mvnetbiz_ has joined #nix-lang
kalbasit[m] has joined #nix-lang
colemickens has joined #nix-lang
mvnetbiz_2 has joined #nix-lang
mvnetbiz_29 has joined #nix-lang
mvnetbiz_2 has quit [Ping timeout: 260 seconds]
mvnetbiz_29 is now known as mvnetbiz_2
mvnetbiz_28 has joined #nix-lang
mvnetbiz_2 has quit [Ping timeout: 245 seconds]
mvnetbiz_28 is now known as mvnetbiz_2
__monty__ has joined #nix-lang
<sterni> infinisil: wait does builtins.seq also forceValue the right value?
<infinisil> If `builtins.seq a b` is evaluated (aka forced), it evaluates first a, then b
<sterni> a yeah, of course, seq only forceValues anyways
<sterni> seems like having arbitrarily large nested attribute sets is no go pretty much even if you track the size and use foldl'
<sterni> waaiiiit
<sterni> the stack overflow is caused by nix-instantiate I think
<sterni> I can deepSeq the structure with no problem
<sterni> but when I print it using instantiate it causes a stack overflow
<infinisil> sterni: Yeah, that sounds like a stack overflow from a too nested structure
<sterni> if you just deepSeq it, it will go further, but there are limits
<sterni> so you _can_ have constant time append, but only up to a certain point
<sterni> you can nest like 130000 attribute sets inside each other before it starts breaking no matter what it seems
<sterni> which is more than enough for any intended use of nix :p
<infinisil> sterni: Oh I think it's possible to use foldl' to strictly unroll potentially huge cons sets
<infinisil> Like the { head = ..; tail = { head = ..; tail = ..; }; } structure
<infinisil> That iteratively calls a transformation on a value until a condition holds
<infinisil> Without overflowing the stack
<sterni> infinisil: yep, that's right, there is only a point in structure size where builtins.deepSeq will overflow the stack
<sterni> infinisil: I dabbled a bit with constant time append, but with having only single elements creating a list / accessing elements just becomes unbearably slow https://gist.github.com/sternenseemann/00ab9c381e28cb2acb4e20a781731eed
rajivr has quit [Quit: Connection closed for inactivity]
ris has joined #nix-lang
ris has quit [Ping timeout: 260 seconds]
ris has joined #nix-lang
nf has quit [Quit: Fairfarren.]
nf has joined #nix-lang
<puck> > builtins.genList (a: a) 4294967298
<{^_^}> error: out of memory
<puck> aww, sad
<puck> output is [ null null <SEGFAULT>
<puck> err, [ 0 1 <SEGFAULT>, but yknow the deal
__monty__ has quit [Quit: leaving]