Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on There’s more than one way to write an IP address. Parent comment
Here's a JS version:
> const ip2dec = ip => ip.split(".").reverse().reduce((acc, n, i) => acc + (parseInt(n) * (2 ** (i * 8))), 0) > ip2dec("192.168.0.1") 3232235521 > ip2dec("192.168.1.1") 3232235777 > ip2dec("0xDE.0xAD.0xBE.0xEF") 3735928559
There are no comments on this comment yet.
Here's a JS version: