News for hackers. Stuff that matters.
Re:There’s more than one way to write an IP address by jolmg on Tuesday July 09, 2019 @12:14PM (#20393329)
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);
  }

There are no comments on this comment yet.