Re:Adapting Plan 9's listen to GNU Guix
by PeterWhittaker on Tuesday October 15, 2024 @01:35PM
(#41850962)
Honesty, that’s trivial to parse, even if you don’t want to use or don’t have regex available: In C, e.g., just treat the name as a string and walk backwards from the last character until you find a non-digit; adjust for indexing, and you now know where the protocol ends and port begins.
[ Parent
| on HN ]
That explicitly wouldn't work in the example you're responding to
Re:Adapting Plan 9's listen to GNU Guix
by dpassens on Tuesday October 15, 2024 @02:04PM
(#41851266)
I believe GP meant that you can't have protocols containing numbers, using rot13 as the example protocol on port 76. Though, as msk-lywenn said, rot13 isn't a real protocol, which don't really have numbers in their names.