HackerTrans
TopNewTrendsCommentsPastAskShowJobs

johnnny

no profile record

comments

johnnny
·il y a 3 ans·discuss
t's a limitation imposed by the ping programme itself, it'll refuse to use very short intervals if you're not root. This is documented in the man page. Or, use the source, Luke:

https://github.com/apple-oss-distributions/network_cmds/blob...

  case 'i':  /* wait between sending packets */
   t = strtod(optarg, &ep) * 1000.0;
   if (*ep || ep == optarg || t > (double)INT_MAX)
    errx(EX_USAGE, "invalid timing interval: `%s'",
        optarg);
   options |= F_INTERVAL;
   interval = (int)t;
   if (uid && interval < 100) {
    errno = EPERM;
    err(EX_NOPERM, "-i interval too short");
   }
   break;
And if you keep looking, Apple's version of ping keeps track of the number of sent and received probes, but does not keep track of the largest difference between the sequence nubmer of sent and received probes, so it will not print the same "pipe" value as the iputils version of ping (ie. the version you typically get in Linux).
johnnny
·il y a 3 ans·discuss
Try::

  $ dpkg -S /bin/ping
  iputils-ping: /bin/ping
  $ grep 'downloaded from' /usr/share/doc/iputils-ping/copyright
  It was downloaded from https://github.com/iputils/iputils
  $ git clone https://github.com/iputils/iputils
  ...
  $ cd iputils/ping
Then a bit of looking around shows that in acknowledge() (an inline helper defined in ping.h), pipesize records the largest difference between the sequence number of the (last) outbound probe and than the sequence number of the inbound probe we're receiving. That function is called from gather_statistics() (for the happy path) and in a couple of other locations when receiving an ICMP error.
johnnny
·il y a 3 ans·discuss
They went rouge? As opposed to putting on mascara?
johnnny
·il y a 3 ans·discuss
Using DHCP, the same tool that can configure any client computer with addresses and gateways, meaning you hopefully secure that already.

Some switches give you tools to mark a few physical ports as "truster", allowing DHCP OFFER from those; and drop (or ever shutdown the port!) when such a packet is received on an untrusted port.
johnnny
·il y a 3 ans·discuss
Where did you get the idea that anybody on the Internet can?

The first step to network booting (PXE or UEFI boot) requires DHCP, which means a DHCP server or relay on your local broadcast domain (switched LAN, and I'm sure there are extensions for boot-over-WIFI somewhere).

Sure your computer could fetch the boot image over the Internet, if you're okay with involving the unreliability of the Internet in your boot process, but that'd require explicit configuration on your DHCP server.
johnnny
·il y a 3 ans·discuss
I work in networking, not particularly close to the hardware. I have colleagues who manipulate IP addresses by looking at the string representation of the address, splitting on the `.`, casting each part back to an integer, etc. Their code breaks as soon as we use a netmask other that /24 or (shock, horror!) we run in an IPv6 environments.
johnnny
·il y a 3 ans·discuss
Databases too have indexes! Almost as if that makes it easier to search for both machines and humans!
johnnny
·il y a 3 ans·discuss
TCP tries really hard to avoid fragmentation, by setting the DF flag and reducing the MSS when it sees a PTB error.

Of course that sometimes fails, so if you still have TCP fragmented segments, the next best thing is to filter by source/destination address, saving to a PCAP file, then run tshark on that file with the "-2" flag which does packet reassembly.

(I don't know if tshark can be made to do on-the-fly reassembly, that would require keeping a buffer of un-reassembled fragments until the rest of the packets are seen.)
johnnny
·il y a 3 ans·discuss
Are they 100% wool?

Wooly jumpers, especially when made of fragile merino wool, remain usable for much longer when they are made of a mix that includes plastic fibers (maybe 75% merino, 25% polyester).
johnnny
·il y a 3 ans·discuss
If you allow infinitely long descriptions, then I don't know what's the score. In the case of "descriptions" that amount to (potentially infinite) decimal expansions, I think an argument akin to Cantor's diagonal will show that you can't possibly describe all real numbers (or all numbers between 0 and 1), but I'm not confident I can assert this to be true.
johnnny
·il y a 3 ans·discuss
> But that set must have a member whose value is closest to zero

This is not true for real numbers with the usual "less-than" relation. In fact, considering real numbers, no open subset of R admits a lower member.

According to Zorn's lemma, there exist some order relation where your assertion is true, but I seem to remember from my math course a few (!) years ago that Zorn's lemma is equivalent to the axiom of choice.
johnnny
·il y a 3 ans·discuss
The set of numbers that can be written with a finite number of 0-9 digits is countable. That set is called the decimal numbers, and is a subset of the rational numbers which itself is countable too.
johnnny
·il y a 3 ans·discuss
As fro your further edit: assuming √2 is rational, then the set of ~~rational~~ integers {q: q√2 ∈ ℤ} does not admit a minimum, indeed it contains arbitrarily small numbers, so we can't pick k the smallest member of that set.
johnnny
·il y a 3 ans·discuss
k * √2 is an integer, and k is an integer, by construction of K and the initial assumption that K is not empty.

Therefore their difference k * √2 - k = k * (√2 - 1) is an integer.
johnnny
·il y a 3 ans·discuss
I have heard of an anecdote that in some company, can't remember which, when meeting to take a decision, they would have people speak up in order of seniority, from the most junior to the most senior in the room. That way they could avoid the problem you're describing: you don't risk contradicting someone preceived as more experienced, or worse, your boss.

I found that an elegant solution, at least in abstract, I've never actually see it in practical use.
johnnny
·il y a 3 ans·discuss
I'll repeat myself: it's very obvious in context that they meant the positive solution of xˆ2 = 2.

My definition of the square root is as follows: the square root of a positive real number x is the positive number, noted √x, such that (√x) ^ 2 = x. To make this a useable definition, we need to prove that equation has a solution (using the fact the function t -> t^2 is zero for t=0, diverges to +inf when t -> +inf, and is continuous between the two) and that solution is unique (using the fact the same function is strictly increasing).

Do you have any other definition of √x?
johnnny
·il y a 3 ans·discuss
It's very obvious in context that they meant the positive solution of xˆ2 = 2.

My definition of the square root is as follows: the square root of a positive real number x is the positive number, noted √x, such that (√x) ^ 2 = x. To make this a useable definition, we need to prove that equation has a solution (using the fact the function t -> t^2 is zero for t=0, diverges to +inf when t -> +inf, and is continuous between the two) and that solution is unique (using the fact the same function is strictly increasing).

Do you have any other definition of √x?