!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

204 Members
47 Servers

Load older messages


SenderMessageTime
5 Jun 2026
@hsjobeki:matrix.orghsjobeki * Maybe we should continue on the records. They are basically done, i clarified the remaining design questions with roberth. So if anyone would be willing to sit down ^^ llakala :D 15:42:27
@llakala:matrix.orgllakalai can take a review of the PR if you'd like15:42:46
@mattsturg:matrix.orgMatt Sturgeon Sorry I've been letting that PR stall. I haven't looked closely at hsjobeki 's changes to it, but would be willing to pencil in some time if we have a clear direction now. 15:43:08
@hsjobeki:matrix.orghsjobeki And i forgot to push the latest changes as well ^^ :D15:43:35
@hsjobeki:matrix.orghsjobekiMade a mess locally, and never cleaned it up for a commit15:43:56
@llakala:matrix.orgllakalalet me know if/when you get a chance to push15:58:55
@mattsturg:matrix.orgMatt Sturgeon Is this a bug in mkRemovedOptionModule or a deliberate limitation?
The apply and assertion error messages both use the raw unprefixed option loc passed to the function for error messages, instead of using the actual opt.loc.
17:12:17
@mattsturg:matrix.orgMatt Sturgeon * Is this a bug in mkRemovedOptionModule or a deliberate limitation? (extra context)
The apply and assertion error messages both use the raw unprefixed option loc passed to the function for error messages, instead of using the actual opt.loc.
17:13:25
@mattsturg:matrix.orgMatt SturgeonRedacted or Malformed Event17:23:08
@llakala:matrix.orgllakala took a look for fun at the implementation and found that it used concatMapAttrs, which i looked into and found to be dreadfully slow, running a // b on every single element. put up an issue on that here 18:50:40
@llakala:matrix.orgllakalathis is probably my record for largest speedup in a lib function18:51:03
@hsjobeki:matrix.orghsjobekiIn fact we wanted to implement it as a builtin so we avoid this mess altogether 19:50:50
@hsjobeki:matrix.orghsjobekiI think I used zipAttrsWith if I remember correctly. I'll probably take a look tomorrow 19:52:19
@hsjobeki:matrix.orghsjobekiSee: https://github.com/NixOS/nix/pull/13986 19:53:47
@hsjobeki:matrix.orghsjobekiTo many things to do ^^19:53:57
@mattsturg:matrix.orgMatt Sturgeonhttps://github.com/NixOS/nixpkgs/pull/52855620:17:06
@hsjobeki:matrix.orghsjobekiWe can also save on lexical scope: https://github.com/NixOS/nixpkgs/pull/52856320:27:44
@hsjobeki:matrix.orghsjobekiwith lib; with types; is used in a lot of files.20:28:16
@hsjobeki:matrix.orghsjobeki * broad with lib; with types; is used in a lot of files. 20:28:40
@hsjobeki:matrix.orghsjobeki I really want to forbid the with statement :/ 20:29:22
6 Jun 2026
@maxisthespy:matrix.orgMaxisthespyWhat profiling tool is this01:39:43
@llakala:matrix.orgllakalaNIX_SHOW_STATS=104:37:29
@llakala:matrix.orgllakala

compared via this jq script i wrote

def prettify: {
  "attrset": {
    "lookups": .nrLookups,
    "merges": .nrOpUpdates,
    "mergeCopies": .nrOpUpdateValuesCopied
  },
  "list": {
    "concats": .list.concats,
  },
  "parser": {
    expressions: .nrExprs
  },
  "memory": {
    "envs": .envs.bytes,
    "list": .list.bytes,
    "sets": .sets.bytes,
    "symbols": .symbols.bytes,
    "values": .values.bytes,
    "total": .envs.bytes + .list.bytes + .sets.bytes + .symbols.bytes + .values.bytes
  },
  "speed": {
    "primops": .nrPrimOpCalls,
    "functionCalls": .nrFunctionCalls,
    "thunksMade": .nrThunks,
    "thunksAvoided": .nrAvoided,
  }
};

def display_number:
if . == 0 then
  null
else
  if . > 0 then
    "+" + (. | tostring) + "%"
  else
    (. | tostring) + "%"
  end
end;

def percentage(places):
  # Round to the nearest n decimal places (after the decimal place)
  . * pow(10; places + 2) | round / pow(10; places) | tostring;

def display_percentage:
  if . == 0 then
    null
  else
    if . > 0 then
      "+" + (. | percentage(2)) + "%"
    else
      (. | percentage(2)) + "%"
    end
  end;


[(.[] | prettify)] as [$stats_before, $stats_after] |
reduce ($stats_before | paths(numbers)) as $path (
  $stats_after;
    setpath(
      $path;
      getpath($path) as $after |
      ($stats_before | getpath($path)) as $before |
      if $before == 0 then
        false
      else
        (($after - $before) / $before) | display_percentage
      end
    )
)
04:38:08
@worldsgonemad:matrix.orgWorldsGoneMad joined the room.19:53:22
7 Jun 2026
@likiusinik:matrix.orgLikius Inik joined the room.05:17:04
8 Jun 2026
@nbp:mozilla.orgnbp I guess we could fix listOf by checking if the elemType may contain any submodule, and use the elemType.check then. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. 13:00:41
@nbp:mozilla.orgnbp * I guess we could fix listOf by skipping if the elemType may contain any submodule, and use the elemType.check then. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. 13:00:53
@nbp:mozilla.orgnbp * I guess we could fix listOf by skipping if the elemType may contain any submodule, and use the elemType.check otherwise. However, we should make sure the error message does not add more confusion. Such as complaining that this is not an enumerated value, while we expect a list of enumerated values. 13:01:05
@johnny:yatrix.orgJohnny joined the room.22:31:59
9 Jun 2026
@aurelivia:matrix.orgaurelivia joined the room.16:07:54

Show newer messages


Back to Room ListRoom Version: 10