Live data from Hacker News

93% of Paint Splatters Are Valid Perl Programs

colinm.org

41–50 of 135 posts

Re: 93% of Paint Splatters Are Valid Perl Programs

#41
post #25
post #19

Earlier quoted context omitted.

It's trying to divide "Illegal division by zero at /" by "tmp/quine.pl line 1." and "tmp/quine.pl line 1." evaluates to 0?

Or "quine.pl line 1." Evaluates to 0? Or should that be 0.0???

Yeah, I think it's both divisions. Both 'perl -e "in /tmp"' and 'perl -e "tmp/quine"' result in the same division-by-zero error.

Re: 93% of Paint Splatters Are Valid Perl Programs

#42
post #10

I love this footnote so much: > This feature does enable a neat quine: the Perl program “Illegal division by zero at /tmp/quine.pl line 1.”, when saved in the appropriate location, outputs “Illegal division by zero at /tmp/quine.pl line 1.” The reason for this behavior is left as an exercise for the reader.

     $ perl -MO=Deparse -e "Illegal division by zero at /tmp/quine.pl line 1."
    'division'->Illegal('zero'->by('at' / 'tmp' / 'quine' . line'->pl(1)));
     -e syntax OK

Re: 93% of Paint Splatters Are Valid Perl Programs

#43
post #8

Earlier quoted context omitted.

Yeah... Ruby's very nice and feels Perl-ish sometimes.

That's intentional. https://www.ruby-lang.org/en/about/ "Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) ..."

The name "Ruby" is also a play on "Perl" ("pearl").

Re: 93% of Paint Splatters Are Valid Perl Programs

#44
Quite against my better judgment, I've made the transition from Perl-hater to Perl- er... -tolerator.

I found myself arguing yesterday with another person in the team about the proper use of Perl references, which I cursed and spat on for 2 days when I first had to use them.

I once read that my current position mirrors that of most Perl users.

(my boss has a self-confessed "irrational" hatred of Python because of semantic whitespace. Which is ironic, because they're the one who pushed for using YAML, which also relies on semantic whitespace (at least in the way we use it))

Re: 93% of Paint Splatters Are Valid Perl Programs

#47
post #13

I miss Perl. Why did PHP win again, in the late 90s? (though I'm mostly Python these days and shan't complain, there was a good 10 year stretch of PHP there I'm not proud of).

Because for anything you wanted to do there were 6 different ways to do it in Perl, making it rather hard to learn Perl. Perl also looks like line noise, which makes it hard to read. PHP also won because you can take a .html file add and it's a valid PHP program. Perl was harder.

It only looks like line noise if you make it look like line noise.

Re: 93% of Paint Splatters Are Valid Perl Programs

#49
post #39
post #36

Because of the frequency I see undecipherable strings like this in actual Perl code, I don't like Perl the programming language. However, I love Perl the project. Take a look at the config file for Perl and how many systems and architectures it accommodates: https://github.com/Perl/perl5/blob/blead/Configure It's clearly such an incredible labor of love by Larry Wall et al. that I'm sad for them it isn't more popular…

Perl gives you as much rope as you want to hang yourself. If you can develop a style, and try to avoid being too clever, it can be just as readable as any other language.

The best languages sacrifice readability the least for a given amount of cleverness.

Re: 93% of Paint Splatters Are Valid Perl Programs

#50
post #33

Earlier quoted context omitted.

The parent nailed it. It's easy to complain about PHP from various standpoints both pragmatic and PL-centric, but it has an amazing superpower which might be summed as "serverless for the web, v0".

No deployment setup will ever match the pure joy of dragging a .php file into WinFTP, watching the little blue progress bar, and refreshing your browser.

[deleted]
Post reply on HN