!9IQChSjwSHXPPWTa:lix.systems

Lix

1102 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
15 Nov 2025
@k900:0upti.meK900 @aloisw has horror stories if you want 18:31:34
@aloisw:julia0815.dealoisw The "horror stories" I found are mostly about finding a library that actually works. 18:34:24
@aloisw:julia0815.dealoisw Yes, such a library exists (TRE with proper configuration), but never got around to rejecting its extensions. 18:35:00
@aloisw:julia0815.dealoisw Regex literals are also something that looks more related to URL literals than to regex implementations, and maybe it suffices to say that the former were thrown out some time ago. 18:35:47
@k900:0upti.meK900Actually now that I think about it18:36:14
@k900:0upti.meK900 What would a regex literal even do 18:36:19
@k900:0upti.meK900Like would it have function semantics?18:36:25
@k900:0upti.meK900 So /foo/ bar desugars to builtins.match "foo" bar? 18:36:42
@aloisw:julia0815.dealoisw no, it would just be another way of writing a string to confuse users 18:36:49
@347online:matrix.orgKatieOh that's an interesting thought18:36:50
@k900:0upti.meK900Cause I kinda hate that18:36:52
@522_:catgirl.cloud522 it/its ⛯ΘΔi assume url literals were at least checked for validity?18:37:15
@k900:0upti.meK900Not really18:37:23
@k900:0upti.meK900And "validity" for URLs is a very nebulous concept anyway18:37:32
@aloisw:julia0815.dealoisw
nix-repl> /foo/ bar
error: path has a trailing slash
       at «string»:1:6:
            1| /foo/ bar
             |      ^

surprisingly enough that syntax is free

18:37:36
@522_:catgirl.cloud522 it/its ⛯ΘΔ /foo[/ should fail to evaluate, at least 18:37:40
@k900:0upti.meK900Most things you would not expect to be valid URLs actually are18:37:41
@347online:matrix.orgKatie...this is roughly what I imagined, but you do make a good point 😅18:37:44
@aftix:matrix.orgaftix you can write regex in '' to avoid double backslashing already? 18:37:54
@k900:0upti.meK900Yeah I think the question here really is, what kind of semantics do you want18:38:07
@k900:0upti.meK900And also why18:38:09
@aloisw:julia0815.dealoisw Well it's pretty much exactly what happened with URL literals, I didn't make it up from scratch. 18:38:27
@k900:0upti.meK900Because the concept of naked function shaped literals gives me an ick18:38:28
@k900:0upti.meK900Not to mention you'd probably have to do cursed things with operator precedence to make it make any level of sense18:38:56
@522_:catgirl.cloud522 it/its ⛯ΘΔthat and you might want to do things that aren't just matching, so it does need to be more powerful than just a function18:39:00
@k900:0upti.meK900 Well it would return whatever the fuck builtins.match returns already 18:39:30
@522_:catgirl.cloud522 it/its ⛯ΘΔoh does match allow capture groups18:39:43
@k900:0upti.meK900Yes18:40:06
@aftix:matrix.orgaftixin JS, the regex syntax creates a RegExp object, but in nix regexes are just strings anyways18:40:09
@k900:0upti.meK900In an exceptionally cursed way18:40:09

Show newer messages


Back to Room ListRoom Version: 10