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/
Synthetica has quit [Quit: Connection closed for inactivity]
ddellacosta has joined #nix-lang
<infinisil> Hmm, can Nix have memory leaks?
<infinisil> Because memory leaks almost don't make any sense for a program that doesn't continuously run
<infinisil> But even then you can still have them
<infinisil> And the only other purely functional lazy language I know (Haskell) has problems with leaks
<infinisil> So maybe Nix could have problems too
<pie__> infinisil, you seem to be using a mismatched definition of memory leak
<infinisil> ?
<pie__> kind of just thinking aloud. are you talking about stuff like idk evaluating an infinite list, or accidentally queueing up thunks
<pie__> i think i heard a specific scenario where the latter is common
<pie__> but i cant remember the details
<pie__> so i guess the question is whether you can accumulate thunks?
<pie__> haskell but this looks pretty good, i should read it later http://blog.ezyang.com/2011/05/anatomy-of-a-thunk-leak/
<samueldr> infinisil: the current implementation relies on a GC which might have issues with heap fragmentation (though unverified)
<samueldr> so, not sure it has the traditional leaks, it shouldn't from what I've been told, but there might be issues with memory use
<infinisil> samueldr: Even with a GC memory leaks can happen, as seen from Haskell
<infinisil> Hm
<infinisil> Or not?
<samueldr> yeah, definitely
<samueldr> I htink?
<samueldr> there is this branch that changes how allocations are done https://github.com/NixOS/nix/tree/precise-gc
<samueldr> oh, and ftr, when I say "might have issues with heap fragmentation", I'm talking about Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
<pie__> im pretty sure what i described is completely orthogonal to GC
<samueldr> plausible
<pie__> in what i described the objects are definitely not in the "expireable" category, they still have references
<samueldr> and I was saying it in an orthogonal fashion
<pie__> ok
<samueldr> if you were to observe memory use
<infinisil> pie__: That's a nice blog post, I'll have to read through it more carefully some time
<pie__> infinisil, seems like googling haskell thunk leak is entirely sufficient to get plenty of good resutls
ddellacosta has quit [Ping timeout: 272 seconds]
__monty__ has joined #nix-lang
ddellacosta has joined #nix-lang
pie__ has quit [Ping timeout: 246 seconds]
__monty__ has quit [Quit: rebootying]
__monty__ has joined #nix-lang
pie_ has joined #nix-lang
__monty__ has quit [Quit: leaving]
ddellacosta has quit [Ping timeout: 246 seconds]