By Ovid
on May 24, 2012 9:59 PM
First, here's a one-liner:
perl -de 'BEGIN {@DB::typeahead=("V ::","q")};1'
If you have a sense of what might be happening, you're probably an experienced Perl user. If you can accurately describe what's happening, you're an advanced user. If you can completely describe the output before you see it, you need psychiatric help.
By Ovid
on May 7, 2012 8:20 PM
In Chapter 3 of my book, I mentioned offhand that sometimes you expect the number 5, but you get 4.99999999998 instead. I sort of punted on the explanation because it seemed to be a touch of a distraction. Naturally, chromatic called me on that and suggested I explain a bit more. As part of my explanation, I wrote a sample program that would print out the fractions used to build the mantissa of a number. For example, .75 is 1/2 + 1/4.