!9IQChSjwSHXPPWTa:lix.systems

Lix

1086 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms294 Servers

Load older messages


SenderMessageTime
25 Oct 2025
@llakala:matrix.orgllakalamy biggest issue was fixed recently, which i'm thankful for15:31:04
@llakala:matrix.orgllakala(strings with comments for injections don't get indented anymore15:31:19
@llakala:matrix.orgllakala* (strings with comments for injections don't get indented anymore)15:31:24
@aftix:matrix.orgaftixI use alejandra15:31:24
@llakala:matrix.orgllakalai can't deal with alejandra not putting spaces around list elements15:31:56
@aftix:matrix.orgaftixwdym? like between the first/last element and the brackets?15:33:30
@llakala:matrix.orgllakala

before:

{
  x = [ 1 ];
}

after:

{
  x = [1];
}

15:34:38
@saiko:knifepoint.netKatalin 🔪that’s how lists are formatted pretty much in every other language though, I prefer that style. however I don’t like it not putting spaces inside {} haha15:48:45
@piegames:flausch.socialpiegamesyou can't reasonably have that in Nix, unfortunately18:04:18
@saiko:knifepoint.netKatalin 🔪 oh? why not? 18:05:54
@saiko:knifepoint.netKatalin 🔪 part of the parser design that makes this not work? apparently the parser is pretty cursed 18:06:54
@piegames:flausch.socialpiegameshttps://github.com/NixOS/rfcs/pull/148#issuecomment-321817736418:08:03
@piegames:flausch.socialpiegamesI think that can't work because functions don't have a dedicated start token, but not sure18:10:30
@saiko:knifepoint.netKatalin 🔪 riiiight. 18:15:26
@piegames:flausch.socialpiegames I'm a bit wary of that, because in function chains you can do h . g . f a equivalently as h $ g $ f a, which doesn't matter too much in Haskell, but in Nix the former would lead to much worse error messages in case of type errors 18:15:29
@saiko:knifepoint.netKatalin 🔪 that sucks :( 18:15:32
@emilazy:matrix.orgemily this seems resolvable, right? f <| x: … is never valid syntax, so there is no ambiguity, even without changing the precedence 18:16:51
@emilazy:matrix.orgemily(but maybe annoying to make happen)18:16:54
@emilazy:matrix.orgemily or do you just mean that |> and <| would become less symmetric? 18:17:16
@saiko:knifepoint.netKatalin 🔪 oh yeah, true. this is a different situation, because the one in your comment is actually valid right now 18:17:54
@piegames:flausch.socialpiegames that precise special case would work, but how does the rule generalize? How should f <| x: g <| h parse? 19:04:23
@emilazy:matrix.orgemily surely f (x: (g h)), since you certainly want to be able to use <| inside function bodies 19:09:27
@emilazy:matrix.orgemily same as f $ \x -> g $ h in Haskell 19:09:37
@emilazy:matrix.orgemily I mean… it can't be anything else unless you want <| to be left-associative 19:09:51
@piegames:flausch.socialpiegamesngl this feels wrong19:29:16
@emilazy:matrix.orgemily
thingy = callbackFn $ \result ->
  if cond result then
    123
  else
    f $ result
19:29:56
@emilazy:matrix.orgemilywould be pretty surprising for this to parse any other way19:30:06
@emilazy:matrix.orgemily (unless f $ g $ x parsed as (f g) x in general) 19:30:18
@piegames:flausch.socialpiegames and how does & work there in Haskell? 19:42:22
@emilazy:matrix.orgemily same way, nothing inside \x -> … ever escapes, pretty much the same as in Nix 19:45:47

Show newer messages


Back to Room ListRoom Version: 10