logoalt Hacker News

zenincognito • yesterday at 10:38 PM • 5 replies • view on HN

The actual paper is also highly entertaining - https://www.mcmillen.dev/sigbovik/2019.pdf


Replies

heresie-dabord • today at 2:16 AM

From the paper:

"An interesting thing about these images is that they’re not particularly Perl-specific; for example, the program shown in Figure −3 also evaluates as the number −3 in Python (and presumably several other programming languages.)"

We live in the age of Python, which I use every day. But I still also use Perl when it's the better tool for the job. And it often is!

Amorymeltzer • yesterday at 10:55 PM

In particular, I like "Figure − 3. − 3 ." as a good little easter egg.

0xbadcafebee • today at 12:11 AM

  The remainder of the valid Perl programs are mostly valid due to a Perl
  language feature that is not commonly present in most programming languages.
  Namely, Perl has a feature called “unquoted strings”, in which a sequence
  of alphanumeric characters by itself is parsed as though it were a quoted string.
  As an example, Figure 5 is read by OCR as the text ME, which evaluates to the
  string “ME” even though the ME isn’t quoted. This would result in a syntax
  error in most other programming languages.

  (To be fair to Perl, when perl is run with the -w flag to enable warnings, it does
  helpfully inform the user that at some point in the future, the Perl developers
  will most likely pick gggijgziifiiffif as a new reserved word:
      Unquoted string "gggijgziifiiffif" may clash
      with future reserved word at - line 1.)
➕ show 1 reply
comboy • today at 8:25 AM

For those who do not enjoy reading scientific papers this one is worth reading.