!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

236 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture52 Servers

Load older messages


SenderMessageTime
29 Jul 2022
@qyliss:fairydust.spaceAlyssa Ross because derivation takes an argv 16:12:33
@infinisil:matrix.orginfinisilYeah I was interested in it because of that too16:12:54
@qyliss:fairydust.spaceAlyssa RossIn fact, here's a ready-made proof of concept: https://puck.moe/up/gulit-gukib.nix.txt16:13:50
@qyliss:fairydust.spaceAlyssa Ross(courtesy of Puck)16:14:21
@qyliss:fairydust.spaceAlyssa Rosscc profpatsch also16:14:45
@infinisil:matrix.orginfinisilWhat is the context for that file? What is <z> on the NIX_PATH?16:15:38
@qyliss:fairydust.spaceAlyssa Rossa standard library of sorts16:15:54
@infinisil:matrix.orginfinisil Alyssa Ross: Any link to that? 16:16:41
@profpatsch:augsburg.oneprofpatschqyliss: yeah, execline is the way to go for that16:17:34
@profpatsch:augsburg.oneprofpatschunless there’s a tight loop, then the exec() overhead will dominate16:17:50
@qyliss:fairydust.spaceAlyssa Rossinfinisil: I think she doesn't want to share the whole thing yet 16:17:49
@profpatsch:augsburg.oneprofpatschbut didn’t they make an effort to remove any forks from stdenv, because it was getting too slow?16:18:30
@infinisil:matrix.orginfinisilOh yeah..16:18:52
@qyliss:fairydust.spaceAlyssa Rossprofpatsch: it depends what you're spawning16:19:27
@profpatsch:augsburg.oneprofpatschmy trick is to use small rust tools for stuff that uses tight loops, but ofc that’s not super helpful for stdenv itself :P16:19:37
@qyliss:fairydust.spaceAlyssa Rossthere's also some real low hanging fruit to improve our spawn times16:19:37
@qyliss:fairydust.spaceAlyssa Ross(searching rpath is slow)16:19:55
@profpatsch:augsburg.oneprofpatschqyliss: you mean absolute library paths in the ELF binaries?16:19:57
@profpatsch:augsburg.oneprofpatschanswer was there 2 seconds before the question are you psychic16:20:20
@qyliss:fairydust.spaceAlyssa 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:matrix.orginfinisilIs argv size a problem btw?16:22:38
@infinisil:matrix.orginfinisilAnswered by https://www.skarnet.org/software/execline/grammar.html16:23:00
@infinisil:matrix.orginfinisil

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
@qyliss:fairydust.spaceAlyssa Rossyou can also just exec execlineb again if you need to do more16:24:01
@infinisil:matrix.orginfinisilThough if we ported the bash of nixpkgs to execline we might hit those limits..16:24:02
@qyliss:fairydust.spaceAlyssa Ross(with a file)16:24:05
@infinisil:matrix.orginfinisilAh true16:24:16
@infinisil:matrix.orginfinisil 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:matrix.orginfinisil(I think that's what you're thinking of right, using it as a replacement for bash?)16:26:31
@qyliss:fairydust.spaceAlyssa RossYes, it would work quite well as a bash replacement16:26:54

Show newer messages


Back to Room ListRoom Version: 9