3 ms·
Names of all things shall conform to [a-zA-Z][0-9a-zA-Z]* lest one anger the old gods.
by JonChesterfield 2y ago
Names of all things shall conform to [a-zA-Z][0-9a-zA-Z]* lest one anger the old gods.
- deleted 2y ago[deleted]
- vsnf 2y agoSaid in jest, but unironically good advice unless you fully own the environment.
- mikl 2y agoMore like [a-z][0-9a-z]* if you really want to be sure, nothing like inconsistent case sensitivity to ruin your day.
- deleted 2y ago[deleted]
- raverbashing 2y agoMore like [a-zA-Z][0-9a-zA-Z-]*[0-9a-zA-Z]
- valenterry 2y agoI'd rather see underscore as standard than hyphen. Underscore to me is a space that is not a space because a space might be a problem or misleading. Hyphens on the other hand are more complicated and have various different meanings. Just my 2 cents.
- amelius 2y agoYes, and also word-completion in various editors (e.g. Vim) does not work with hyphens.
- larsnystrom 2y agoThis is the correct answer, according to standards. See https://en.wikipedia.org/wiki/Hostname https://en.wikipedia.org/wiki/Hostname
- Joker_vD 2y agoI refute thee. My nickname of choice has underscore in it, or at least a minus/hyphen. At the very worst, I'll settle on a period or a space, but some punctuation mark has to be there.
- Tijdreiziger 2y ago何?
- nabla9 2y agoxn--vqq
- knome 2y agolookup "punycode". that symbol would be "xn--vqq" in DNS.
- g15jv2dp 2y agoThe dashes are not matched by the regex.
- knome 2y agoedit: I felt something was off and doublechecked, I had misremembered the rule on dashes, and consecutive dashes in urls is apparently fine, and will depend on the registrar allowing them or no ================================= yes, non-punycode domains may not start or end with dashes and must not have consecutive dashes the consecutive dashes in punycode were done on purpose so that the new internationalizing punycode domains couldn't conflict with any existing domain.
- Tijdreiziger 2y agoAh, but the assertion was ‘names of all things’, a considerably larger set than ‘DNS names’.
- deleted 2y ago[deleted]
- astral_drama 2y agoOnce you get with the new gods, it can feel limiting and antiquated to go back. But you might smile and feel a little nostalgic seeing an old timer plowing data in the modern era, just be careful not to spook him with any of your new runes.
- twic 2y agoThat * seems extremely optimistic.