nandi/frqpublic Fork 0
484abf8
Commits
Clone
git clone https://git.rickub.com/nandi/frq.git
git clone ssh://git@rickub.com/nandi/frq.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Read a handle the same way in both regex engines

`(?i)` is an inline flag Dart's RegExp does not have, and it does not ignore
it — it rejects the whole pattern with "FormatException: Invalid group". The
pattern is built at the first call, which is `frq.profile/actor` on the first
message the server sends, so the Flutter build died on connect rather than on
anything a screen could show. The desktop never saw it: jolt's reader takes
the flag.

The classes are spelled out instead of flagged. Both engines read that the
same way, which is what `common/` requires of anything in it — the file is
the one copy and the compilers are not the same compiler.

Checked equivalent against the old pattern over handles, mixed case, the
leading and trailing hyphen cases, and a bare nick.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
nandi committed 2026-09-12T07:05:11-07:00 Browse files
484abf8 parent: a839373
modified common/frq/profile.cljc +6 -1
@@ -38,7 +38,12 @@
3838 ;; A handle is a domain: labels joined by dots, ending in something alphabetic.
3939 ;; An IRC nick cannot be one by accident `sleek5209` and `eve` are not.
4040 (def ^:private handle-pattern
41- #"(?i)^[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)*\.[a-z]{2,}$")
41+ ;; Spelled out rather than `(?i)`: Dart's RegExp has no inline flag syntax
42+ ;; and rejects the whole pattern with "FormatException: Invalid group" — at
43+ ;; the moment the first message arrives, which is a crash on connect rather
44+ ;; than anything you see when the screen is drawn. This file is `common/`, so
45+ ;; it has to be a pattern both engines read the same way.
46+ #"^[A-Za-z0-9][A-Za-z0-9-]*(\.[A-Za-z0-9][A-Za-z0-9-]*)*\.[A-Za-z]{2,}$")
4247
4348 (defn handle?
4449 "Whether this nick is an AT Protocol handle, and so worth a lookup."
@@ -38,7 +38,12 @@
38 ;; A handle is a domain: labels joined by dots, ending in something alphabetic.38 ;; A handle is a domain: labels joined by dots, ending in something alphabetic.
39 ;; An IRC nick cannot be one by accident `sleek5209` and `eve` are not.39 ;; An IRC nick cannot be one by accident `sleek5209` and `eve` are not.
40 (def ^:private handle-pattern40 (def ^:private handle-pattern
41- #"(?i)^[a-z0-9][a-z0-9-]*(\.[a-z0-9][a-z0-9-]*)*\.[a-z]{2,}$")41+ ;; Spelled out rather than `(?i)`: Dart's RegExp has no inline flag syntax
42+ ;; and rejects the whole pattern with "FormatException: Invalid group" — at
43+ ;; the moment the first message arrives, which is a crash on connect rather
44+ ;; than anything you see when the screen is drawn. This file is `common/`, so
45+ ;; it has to be a pattern both engines read the same way.
46+ #"^[A-Za-z0-9][A-Za-z0-9-]*(\.[A-Za-z0-9][A-Za-z0-9-]*)*\.[A-Za-z]{2,}$")
42 47
43 (defn handle?48 (defn handle?
44 "Whether this nick is an AT Protocol handle, and so worth a lookup."49 "Whether this nick is an AT Protocol handle, and so worth a lookup."