Hacker Newsnew | past | comments | ask | show | jobs | submit | kidmin's commentslogin

snprintf(buf, bufsize, "%*s", padwidth, str)?


Some minor/trivial corrections:

- gTLD stands for "generic TLD"[1], not a short form of global, comes from their "generic" usage. Both two categories of TLDs are in the domain namespace which is globally resolvable.

- Almost all of two-letter ASCII ccTLDs reflect the ISO country codes, from ISO 3166-1 alpha-2, but there are a few exceptions: the United Kingdom (GB) has ".uk"[2], Ascension Island (now part of SH) has ".ac", etc. (Yes, there are more non-ASCII ccTLDs: .新加坡, .УКР, etc.)

If you want to briefly take a look at how TLD registries structure their second/third level such as "k12.or.us" or "chiyoda.tokyo.jp", see "ICANN DOMAINS" section of the public suffix list[3] (note: it is not complete)

[1] https://icannwiki.org/Generic_Top-level_Domain

[2] https://cddo.blog.gov.uk/2022/11/15/is-it-time-to-retire-the...

[3] https://publicsuffix.org/


In Japan the PM's office once considered to block online piracy websites[1] with DNS in 2018. Japanese tech community fought against it[2][3][4] and it wasn't implemented.

The telco authority currently considers to block online casino websites[5] (gambling is illegal in Japan).

[1] https://www.kantei.go.jp/jp/singi/titeki2/tyousakai/kensho_h... [2] https://www.nic.ad.jp/ja/topics/2018/20180625-01.html [3] https://www.wide.ad.jp/News/2018/20180912.html [4] https://www.nic.ad.jp/ja/materials/iw/2018/proceedings/d3/d3... [5] https://www.soumu.go.jp/main_sosiki/kenkyu/online_casino/ind...



There is an enterprise-grade project written in Java: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...


Came here to point this out haha.


Actually the root is a null (empty) label rather than "."; dots are delimiters of labels, there is an empty label after "." in FQDNs. See RFC 1034 Section 3.1.


Having all addresses be rooted in an untypeable null isn’t much better.


It is not null, it's an empty string.


You should read the referenced RFC, it’s right there.

“””Because all domain names end at the root, which has a null string for a label…”””


"null string" or "nil string" or "empty string" are all the same thing.

IDK why we're even talking about this though.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: