!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

417 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.140 Servers

Load older messages


SenderMessageTime
21 Nov 2025
@raitobezarius:matrix.orgraitobezariusUnnamed pairs21:08:07
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)I did research a bit the distribution of list sizes when evaling nixpkgs. Small lists are quite often used, but lists just pale in comparison with attrsets overall21:17:12
@mzero:matrix.orgmzeroname value pairs are so common because of listToAttrs, etc, I wonder if a pair type would actually make a significant perf difference21:19:00
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)A more generic approach could be to have "attrset shapes". Very similar to how v8 optimizes classes with the same layout21:20:09
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Then names wouldn't need to be stored in the attribute set and function calls could reuse the same memory and not copy anything to a new Env. (I and Robert Hensing discussed this a bit at some point)21:21:57
@qyriad:katesiria.orgQyriad
In reply to @xokdvium:matrix.org
A more generic approach could be to have "attrset shapes". Very similar to how v8 optimizes classes with the same layout
benefits of a JIT especially
21:22:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Not exactly tho. jit/memory layout are tangential somewhat21:22:32
@qyriad:katesiria.orgQyriad yeah but you can optimize hot shapes  21:22:56
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) Yeah. I think python has slots for this kind of thing 21:23:13
@xokdvium:matrix.orgSergei Zimmerman (xokdvium) * Yeah. I think python has __slots__ for this kind of thing 21:23:28
@mzero:matrix.orgmzerodo you have something I could read about that? I'm curious how it would work.21:25:02
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Probably staring at prior art in V8? I haven't done that myself, but I'd be curious how they do tracing to find hot shapes21:26:04
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)All of those optimizations are pretty inaccessible without tracing infra :(21:27:26
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)But tracing attrset shapes doesn't exactly depend on function call tracing. Computing a shape fingerprint and having a small hashmap of that could give a rough picture of the frequency.21:29:23
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)So maybe only do this for attrsets smaller than N, compute a hash of symbol table ids, store it a fixed-sized map and count frequency that way. This shouldn't have much of an overhead21:30:50
@Ericson2314:matrix.orgJohn Ericsonyeah that is in a bitrotted PR21:39:29
16 May 2024
@aciceri:nixos.devzrsk joined the room.13:54:49
@samrose:matrix.orgsamrose
In reply to @lunaphied:lunaphied.me
I think there were a few CLs on the Gerrit but nothing being actively worked
The other thing that I could do if it helps is test things and try to find bugs. I did do some C++ work in the past, but may lack the time to do it justice here at least for about 30 days or so
15:55:29
@qyriad:katesiria.orgQyriadwe are not in any rush 🙂17:20:53
@samrose:matrix.orgsamroseWould it help to also test out the existing Lix code and try to find issues/bugs etc?17:23:21
@qyriad:katesiria.orgQyriadabsolutely17:23:41
@samrose:matrix.orgsamrose
  • how do people feel about the existing test suite that comes along with nix source code or Lix?
17:23:48
@qyriad:katesiria.orgQyriadit's pitiful17:24:10
@samrose:matrix.orgsamroseheh 17:24:16
@raitobezarius:matrix.orgraitobezariusexpanding it is cool17:24:23
@raitobezarius:matrix.orgraitobezariuswriting new tests for builtins which are not tested17:24:30
@raitobezarius:matrix.orgraitobezariusnew test behaviors, etc.17:24:32
@qyriad:katesiria.orgQyriad we have three flavors of test:
  1. gtest (offer only available in libexpr and libutil)

  2. bash script

  3. virtual machine


the vast, vast majority of testing is in the "bash script" flavor and it is a mess
17:25:01
@samrose:matrix.orgsamroseI was just going to ask on the "functional" tests: do we still like using bash there?17:25:56
@samrose:matrix.orgsamrosethe last time that I worked on a major nix related cli project that used bash, or bats for testing, over time it became rather kind of hard to maintain17:26:42

Show newer messages


Back to Room ListRoom Version: 10