Hacker News new | ask | show | jobs
by tomjakubowski 2544 days ago
An IP address like 127.0.0.1 is an integer, written in an odd base 256 notation! What I think you mean is that it's easier to increment an integer written in conventional base 10, because people are used to working with numbers like that.
1 comments

I'm imagining magmastonealex found it useful for things like working with each of 10.0.0.0/16 without having to manage the digits of those base-256 numbers:

  for (var i = 0; i < 2 ** 16; i++) {
    work("10.0." + i);
  }
as opposed to

  for (var i = 0; i < 2 ** 16; i++) {
    work("10.0." + i / 256 + "." + i % 256);
  }