| 29 Jul 2022 |
Alyssa Ross | because derivation takes an argv | 16:12:33 |
infinisil | Yeah I was interested in it because of that too | 16:12:54 |
Alyssa Ross | In fact, here's a ready-made proof of concept: https://puck.moe/up/gulit-gukib.nix.txt | 16:13:50 |
Alyssa Ross | (courtesy of Puck) | 16:14:21 |
Alyssa Ross | cc profpatsch also | 16:14:45 |
infinisil | What is the context for that file? What is <z> on the NIX_PATH? | 16:15:38 |
Alyssa Ross | a standard library of sorts | 16:15:54 |
infinisil | Alyssa Ross: Any link to that? | 16:16:41 |
profpatsch | qyliss: yeah, execline is the way to go for that | 16:17:34 |
profpatsch | unless there’s a tight loop, then the exec() overhead will dominate | 16:17:50 |
Alyssa Ross | infinisil: I think she doesn't want to share the whole thing yet | 16:17:49 |
profpatsch | but didn’t they make an effort to remove any forks from stdenv, because it was getting too slow? | 16:18:30 |
infinisil | Oh yeah.. | 16:18:52 |
Alyssa Ross | profpatsch: it depends what you're spawning | 16:19:27 |
profpatsch | my trick is to use small rust tools for stuff that uses tight loops, but ofc that’s not super helpful for stdenv itself :P | 16:19:37 |
Alyssa Ross | there's also some real low hanging fruit to improve our spawn times | 16:19:37 |
Alyssa Ross | (searching rpath is slow) | 16:19:55 |
profpatsch | qyliss: you mean absolute library paths in the ELF binaries? | 16:19:57 |
profpatsch | answer was there 2 seconds before the question are you psychic | 16:20:20 |
Alyssa Ross | (any easy way to get around that would just be to have execline statically linked, there are more complicated ways we could make it better for dynamically linked executables) | 16:21:51 |
infinisil | Is argv size a problem btw? | 16:22:38 |
infinisil | Answered by https://www.skarnet.org/software/execline/grammar.html | 16:23:00 |
infinisil |
Unix systems have a size limit for argv+envp, but it is high. POSIX states that this limit must not be inferior to 4 KB - and most simple scripts are smaller than that. Modern systems have a much higher limit: for instance, it is 64 KB on FreeBSD-4.6, and 128 KB on Linux.
| 16:23:04 |
Alyssa Ross | you can also just exec execlineb again if you need to do more | 16:24:01 |
infinisil | Though if we ported the bash of nixpkgs to execline we might hit those limits.. | 16:24:02 |
Alyssa Ross | (with a file) | 16:24:05 |
infinisil | Ah true | 16:24:16 |
infinisil | Alyssa Ross: Can you briefly mention why execline would be good as a replacement for bash in nixpkgs? What are the benefits? | 16:25:58 |
infinisil | (I think that's what you're thinking of right, using it as a replacement for bash?) | 16:26:31 |
Alyssa Ross | Yes, it would work quite well as a bash replacement | 16:26:54 |