Live data from Hacker News

93% of Paint Splatters Are Valid Perl Programs

colinm.org

101–110 of 135 posts

Re: 93% of Paint Splatters Are Valid Perl Programs

#101
post #48

I like Perl. It is magic.

It's by far my preferred method of turning thoughts into code quickly, though I don't know what that says about my thoughts.

The free form nature is amazing to spec out an idea and see what happens. Where it falls short for me is static analysis - a simple question like 'if we change this module, how many scripts will be affected?' is very difficult or impossible to answer due to the number of ways you can abuse Perl. Though in most cases, we get by.

Re: 93% of Paint Splatters Are Valid Perl Programs

#102

I recently wrote a little program that will create a Markov Chain from on our perl codebase, generate a few sentences and check against `perl -c`. It takes less than 10 attempts to generate a bunch of lines of [very funny] valid Perl code.

I was too scared to run randomly generated perl-code. But I did have some fun fuzzing awk/gawk a while back.

https://blog.steve.fi/if_line_noise_is_a_program__all_fuzzer...

Re: 93% of Paint Splatters Are Valid Perl Programs

#103
post #62

Earlier quoted context omitted.

Perl6 was a reaction to Perl's loss of mindshare, not its cause. One can speculate what might have happened if focus had been put on evolving Perl5, or getting Rakudo production-ready as-is instead of going through yet another round of 'tinkering' (eg making the compiler backend-independent, the New Object Model refactor, creation of MoarVM, the Great List Refactor, ...) - however my crystal ball seems to be broken a…

> The design process for Perl 6 began in 2000 I don’t remember Perl losing mindshare around that time; quite the opposite.

Just one anecdote: https://www.perlmonks.org/index.pl?node_id=1225020

Re: 93% of Paint Splatters Are Valid Perl Programs

#104
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.

The part that left my office in stitches: > (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.)

Knowing Larry, I believe he is currently working on a patch.

Re: 93% of Paint Splatters Are Valid Perl Programs

#105
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…

Larry Wall is a wonderful human.

Re: 93% of Paint Splatters Are Valid Perl Programs

#106
post #56
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…

While some people tend to say Perl was chosen by the young bioinformatics community because of it's excel in text processing, I think Perl was just the go-to scripting language in the late 90s. In my field (numerical relativity), Perl was also the go-to language in the early days. People then moved on to Python because of the numpy/scipy ecosystem which allowed to combine Perl-like scripts with Matlab/Fortran like po…

Perl was being used in bioinformatics in the early 1990s - definitely before the "late 90s". Perl was becoming the go-to language in Unix fields in early 1990s, and bioinformatics comes out of that Unix tradition. (See also my comment at https://news.ycombinator.com/item?id=11381917 .)

There's no reason to guess which factors contributed to Perl's uptake in the young bioinformatics community. Text processing is only one of six reasons Lincoln Stein listed in 1996 in "How Perl Saved the Human Genome Project". See https://web.stanford.edu/class/gene211/handouts/How_Perl_HGP...

Re: 93% of Paint Splatters Are Valid Perl Programs

#107

Earlier quoted context omitted.

> The design process for Perl 6 began in 2000 I don’t remember Perl losing mindshare around that time; quite the opposite.

Perl6 wasn't _released_ until 2016, though.

You mean, 1.0 of the spec was released then. Don't pretend it wasn't perfectly possible to write and run useful Perl6 programs for a good ten years prior.

https://en.wikipedia.org/wiki/Pugs_(programming)

https://github.com/viklund/november/

Re: 93% of Paint Splatters Are Valid Perl Programs

#108
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.

And then someone else tries to read your code. One of the things I love about ruby dev is its not about providing 10000 ways to do the same thing but about making sure that given a simple problem, every developer will solve it in pretty much the same way.

Re: 93% of Paint Splatters Are Valid Perl Programs

#109

Earlier quoted context omitted.

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

Or the best give you all the flexibility you could ever need and allow you the freedom to write readable and maintainable code or use all the features to write an insanely terse oneliner that can do the job quickly and be thrown out.

Except, of course, they are rarely thrown out :)

Re: 93% of Paint Splatters Are Valid Perl Programs

#110
No way. I've been known to joke to people around me for a decade that 90% of speech bubbles of cursing comic characters contained valid Perl code. I don't believe someone actually set out to prove it (or something very similar at least). Things like these are why I love HN.
Post reply on HN