Hacker News new | ask | show | jobs
by eriknstr 3368 days ago
>the colon is an important delimiting character, which makes having hex coded value ambiguous as well

In IPv6 or in Red, you mean?

In IPv6 the colons are there for convenience only, with the rule being that leading zeros can be omitted and that two or more consecutive groups of all zeros can be replaced with ::. You can only have one instance of :: otherwise it would be ambiguous.

For example, the IPv6 address ::1 is actually 0000:0000:0000:0000:0000:0000:0000:0001.

Likewise, 2a03:2880:fffe:c:face:b00c:0:35 is actually 2a03:2880:fffe:000c:face:b00c:0000:0035.

Once an IPv6 address has been expanded to it's full non-abbreviated form you can safely strip it of colons and use the resulting hexadecimal value to uniquely represent that address.

If you were talking about colons in Red and not in IPv6, disregard what I said.

1 comments

I meant if we try to add a literal ipv6 form to Red, but thanks for the info!