!9IQChSjwSHXPPWTa:lix.systems

Lix

1107 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-rooms297 Servers

Load older messages


SenderMessageTime
11 Dec 2025
@charles:computer.surgeryCharlesin other languages though function names, class/struct/enum/type names, variable names, etc are all identifiers21:23:19
@helle:tacobelllabs.nethelle (just a stray cat girl)and this can go as simple as "well, Python has like at least 3 string formatting mini languages, of which 2 are relevant to this day"21:23:22
@commentator2.0:elia.gardenRutile (Commentator2.0) feel free to pingI'd just explain it as "has to be a letter at first, then any amount of word characters (letter or digit) and might include a hyphen; everything else requires wrapping in an ident string. 21:23:29
@helle:tacobelllabs.nethelle (just a stray cat girl)like that one gave us no end of headaches21:23:32
@charles:computer.surgeryCharlesvariable names are a subset of identifiers21:23:53
@helle:tacobelllabs.nethelle (just a stray cat girl)(we TA'ed at uni extensively and cowrote some courses)21:24:08
@charles:computer.surgeryCharlesnix doesn't have functions distinct from variables or types though so in nix's case the sets are equal21:24:09
@rosssmyth:matrix.orgrosssmythhorrifying 21:25:19
@charles:computer.surgeryCharlesyeah lol i'm very surprised that works21:25:42
@helle:tacobelllabs.nethelle (just a stray cat girl)check the Nix iceberg for more horrors21:25:45
@charles:computer.surgeryCharlesi would explain it as XID_Start followed by zero or more XID_Continue because that's what it is, and you don't need to explain what those are because explaining that is unicode's job21:27:15
@charles:computer.surgeryCharlesfor example https://doc.rust-lang.org/reference/identifiers.html#grammar-IDENTIFIER21:27:38
@charles:computer.surgeryCharles* for example https://doc.rust-lang.org/reference/identifiers.html21:27:50
@commentator2.0:elia.gardenRutile (Commentator2.0) feel free to ping
In reply to @charles:computer.surgery
i would explain it as XID_Start followed by zero or more XID_Continue because that's what it is, and you don't need to explain what those are because explaining that is unicode's job
Something something consecutive hyphens
21:28:03
@helle:tacobelllabs.nethelle (just a stray cat girl)I mean...... for a first year compsci student with the two classes I just mentioned, :P that is the level a lot of people starting out with any new language actually would have roughly, even if they are super skilled in say PHP21:28:07
@charles:computer.surgeryCharlesthe motivation is to ban those from what i'm calling literal identifiers21:28:35
@charles:computer.surgeryCharlesthat's the entire point21:28:51
@rosssmyth:matrix.orgrosssmythNix is an immutable lang so there are no "variables", as nothing can ever change. For functional languages you usually call things "[let] bindings," as it is bound to a specific value, and will never change (unless you shadow the binding). 21:28:52
@rosssmyth:matrix.orgrosssmyth * Nix is an immutable lang so there are no "variables", as nothing can ever change. For functional languages you usually call things "[let] bindings," as it is bound to a specific value, and will never change (unless you shadow the binding). Even then you aren't changing the binding itself as once you go back to the original scope, it will still be bound to the original value. 21:29:33
@charles:computer.surgeryCharlesyeah but "binding" is too scary of a word so people don't say that, they just say "variable" because that's more commonly understood21:29:34
@charles:computer.surgeryCharlesthe rust book for example used to use "binding" because it's correct but then switched to calling everything "variables" to be understandable21:29:56
@helle:tacobelllabs.nethelle (just a stray cat girl)yep, lies to children21:30:00
@helle:tacobelllabs.nethelle (just a stray cat girl)or in this case, lies to people who don't do programming language design or analysis or, etc21:30:26
@rosssmyth:matrix.orgrosssmythBasically just for people who don't usually sit in functional programming world21:31:00
@rosssmyth:matrix.orgrosssmythwhich is fine21:31:07
@helle:tacobelllabs.nethelle (just a stray cat girl)(something something we made a mistake by using =, give me :=)21:31:10
@helle:tacobelllabs.nethelle (just a stray cat girl)or who don't work with the design of programming languages in general (because every modern optimised language ends up being that in the end)21:31:41
@rosssmyth:matrix.orgrosssmythMy overall biggest complaint with the nix lang is that lists should be separated with commas so that spaces are not quite as overloaded21:32:35
@helle:tacobelllabs.nethelle (just a stray cat girl).... yes21:32:42
@helle:tacobelllabs.nethelle (just a stray cat girl)also so operator binding doesn't require as many braces or pipes21:33:22

Show newer messages


Back to Room ListRoom Version: 10