Nix NodeJS | 209 Members | |
| 59 Servers |
| Sender | Message | Time |
|---|---|---|
| 17 Nov 2023 | ||
| i think https://devenv.sh/ is probably the better choice | 18:32:49 | |
| * You might want to look at arion, https://docs.hercules-ci.com/arion/ | 18:33:13 | |
| https://numtide.github.io/devshell/ too | 18:40:55 | |
| I love devenv. It helps you get started, making the learning curve to nix much more bearable | 19:33:01 | |
| 18 Nov 2023 | ||
| I also managed to solve https://github.com/nix-community/npmlock2nix/issues/86 with some clever setup hook machinery | 03:49:54 | |
| Took some inspiration from how home-manager deals with unmanaged/managed files | 03:51:11 | |
| https://github.com/adisbladis/buildNodeModules/blob/master/hooks/node-modules-hook.js#L49 | 03:51:29 | |
So now I can use npm as a locker, and Nix builds everything in node_modules <3 | 03:51:52 | |
| And the shell hook takes care of keeping symlinks up to date | 03:52:08 | |
| Created a readme at https://github.com/adisbladis/buildNodeModules | 04:16:34 | |
| I converted
| 10:01:22 | |
| Are the results in any way surprising? The cputime looks a bit too small to be used for reliable measurements without perf counters | 10:41:33 | |
| Not surprising to me. I was expecting it to be a bit faster and use less memory I'm not overly concerned with exact wall time, I'm OK concluding it's a bit faster and leave it at that. | 11:11:13 | |
| A concern that often comes up when when talking about lock file parsing in nixpkgs performance. I wanted to have ballpark numbers to refer to. | 11:12:52 | |
| Ah, okay. Thank you for sharing | 11:13:31 | |
In reply to @adis:blad.isYou know that I nerdsnipped @tomberek on adding the parsing built-in based on a EBNF grammar (a packrat parser) | 11:48:39 | |
| He got OK speed I think | 11:48:46 | |
| But he uncovered a quadratic issue with Nix strings | 11:48:54 | |
| Because substr is linear all the time as strings in Nix doesn't really know their own length | 11:49:14 | |
| Huh | 11:49:28 | |
In reply to @raitobezarius:matrix.orgThat would be cool to have. | 11:50:50 | |
| But for this case you really don't need fancy parsing, you just need json | 11:51:00 | |
| But gigabyte/s JSON parsing:> | 12:00:28 | |
| Idk how fast is our JSON library | 12:00:43 | |
| Fatet than our nix parser :p | 12:06:05 | |
| * Faster than our nix parser :p | 12:08:01 | |
| After some further refactoring:
| 13:24:25 | |
| I mainly did it for improved UX, but that was a sweet bonus. | 13:24:56 | |
It looks much more similar to fetchNpmDeps in usage now | 13:29:54 | |
| 19 Nov 2023 | ||
| 11:02:39 | ||