Nix Package Manager development | 872 Members | |
| For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here. | 182 Servers |
| Sender | Message | Time |
|---|---|---|
| 16 Aug 2025 | ||
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 | |