Sender | Message | Time |
---|---|---|
16 Aug 2025 | ||
oops | 04:54:20 | |
In reply to @connorbaker:matrix.orgIFAIK there isn’t a lot of tooling for this. Boehm has some stuff to collect stats, but other than that I imagine you’d have to write custom tools for that. | 06:57:23 | |
I’ll post a small reproducer tomorrow of unexpected behavior I’m seeing with respect to the GC not freeing memory when I think it should be able to; I’d love to hear people’s thoughts on what could be causing it! | 06:59:36 | |
Thank you for the PR shrinking the Value struct by the way, that was great! | 07:00:55 | |
In reply to @connorbaker:matrix.org That would be great to see. Honestly it’d be nice to actually hunker down and write the tooling that we need for GC debugging/visualization. Hit me up if you would like to work on that. How’s the Immer thing going btw? | 07:06:35 | |
In reply to @fzakaria:one.ems.hostTry raise(SIGTRAP); inside gtest | 12:12:05 | |
Or this https://github.com/nemequ/portable-snippets/blob/master/debug-trap/debug-trap.h | 12:13:10 | |
I've got a file
I ran nix eval by way of
and kept lowering the maximum GC size until it would OOM with a One thing which could be tested is to create a large expression in the same fashion, without using | 19:01:26 | |
I would also like such tooling, but I really don't like reading or writing C/C++ :( I've only ever read/written C/C++ in anger and I very much consider myself incompetent with C/C++ I haven't looked at or touched the Immer stuff in a long while; the biggest road blocks I saw to moving forward with it were:
I think 1. was being looked at by the author of Immer, not sure whether they ever got the chance to get into it; 2. and 5. should happen regardless as a code/project hygiene thing. Fundamentally I still think it's important we look at the data structures Nix offers, the ways in which those data structures are most commonly used, and implementations that make those operations fast :l | 19:20:50 | |
Well going by how lambda calculus is evaluated in general. The import will be evaluated anew for each N. So what id try is wrapping the genList with a map seq to force evaluation of each thunk explicitly and see if that helps | 19:32:44 | |
But tbh i have no clue how nix evals, im going by how GHC does things, kinda. Just my first idea when i read your message | 19:34:27 | |
There’s an import cache | 22:44:45 | |
In reply to @connorbaker:matrix.orgThe import is cached, but the function call is not. | 22:47:40 | |
Also IIRC using JSON output forces everything | 22:52:32 | |
Any ideas if the value storing the result of import applied to the path would be cached, or if the use of import is unrelated to what’s happening here, memory usage wise | 22:53:57 | |
you're instantiating numClosures Nixpkgs and none of them are garbage | 22:58:26 | |
17 Aug 2025 | ||
It's my understanding that all of them should be garbage, because the only value retained from the instantiation is forced with deepSeq and should hold no references to that instantiation of Nixpkgs (though I suppose since it's a string with context it could hold references that way?). Put another way, is it possible there are still live references to those instances of Nixpkgs, or something about their instantiation is keeping them around? | 05:21:43 | |
hmm. maybe you are right. well, I don't think deepSeq is doing anything there since strings are atomic afaik | 05:22:31 | |
so each thunk will keep around a reference until it is forced at least | 05:22:52 | |
but then the instantiation is in the thunk so… eh | 05:23:02 | |
deepSeq is not sufficient to drop all closures, as functions (lambdas) are normal form, but also have closures, much like thunks. You'd have to drop all functions (if any exist in your result, idk) | 18:54:59 | |
.drvPath shouldn't contain any functions I hope | 18:55:58 | |
It won't even run it though; using CLIon's gtest runner -- do you have it working? | 20:22:30 | |
I was looking today at https://github.com/jart/json.cpp -- vs nlohman | 20:23:42 | |
the JSON library is extremely load-bearing for evaluation semantics, please don't switch it out without a very thorough test suite and fuzzing; the switch to nlohmann_json in 2.4 already produced a lot of eval changes | 20:30:05 | |
Just sharing it; I sponsor jart via GitHub (I wish a larger amount) so I try to follow up on the work she does. -- I really like all the work she does + I find her code outstanding. | 20:32:43 | |
Also let's first handle the TOML fiasco | 20:40:26 | |
I did my best :D | 20:41:03 | |
was that solvable ? I thought it's just not because of the spec | 20:41:06 | |
it was solved by fixing the TOML spec violation in Nixpkgs | 20:41:30 |