Frozen Perl and Genetic Algorithms + Floating Point Tests

scrottie on 2010-02-08T20:55:11

My Frozen Perl Lightning Talk was on the topic of large legacy codebases, sort of. Specifically, it was on how to continue to grow them without having to look at them. A more serious talk might follow on this one -- one that involves useful code visualization and inspection. It's a topic that's been on my mind for a long time and one that my friends and I often discuss.

I monkey patched Test::Harness to accept floating point values for test results rather than merely "ok" and "not ok" and then used that as a fitness test for a genetic algorithm combined with a Markvo chains chatter box trained from Perl sourcecode. It kept alive and to bread permutations of the Markov-chains generated code that did better on the tests.

It was part political commentary -- "Perl programmers pioneered building massive unmaintainable codebases and it's Perl programmers who will take it to the next level!". Also with my monkey patching and the genetic algorithm's mucking about in the Markov Chains' package, I was showing off _hackish_ styled code. In what I consider good Perl spirit, interesting modules were wired together in interesting ways.

The first thing people heard during the day was that you shouldn't use anonymous subroutines (!!) or vi or emacs but instead use an IDE (!!). This was from a presentation done in Keynote with Comic Sans. The last thing they heard during the day was "experiment, have fun, explore".

I'm tired of the message at these sorts of things being "Perl is dangerous and has lots of sharp pointy bits that'll put your eye out... we don't want Perl to get any more of a bad rep so stay on the trail and keep your arms in the bus". Fuck that. There are precious few "at your own risk" languages. Assembly is one of them. C++ can be. Ruby hackers indulge playfulness in its place.

I keep telling people that if Perl turns its back on hackery, it'll lose that ecosystem *and* it still won't break into Java's and Python's. It'll wind up without a user base at all. Computer companies, languages, automobiles -- any product at all -- that's unclear on its identity winds up with no user base. Perl programmers need to know that Perl came out of sed, awk, BASIC-PLUS, and a pile of other languages, and that the sharp edges exist for a reason, and a lot of parts of Perl don't make sense in the context of yet-another-C-like-language.

Also, FYI... I've been writing a lot on http://scrottie.livejournal.com lately, including stuff that I should probably put or copy here. And there's me on Twitter too.

Oh yeah... the code is at http://slowass.net/user/scott/tmp/Test-Float-0.1.tar.gz and in http://slowass.net/user/scott/tmp/Test-Float-0.1/

-scott


Pointy bits

Aristotle on 2010-02-10T22:13:35

I’m tired of the message at these sorts of things being “Perl is dangerous and has lots of sharp pointy bits that’ll put your eye out… we don’t want Perl to get any more of a bad rep so stay on the trail and keep your arms in the bus”.

I find Perl is somewhat awkwardly shaped with regard to its pointy bits. It would be nice if many of them were easier to avoid. It would also be nice if it actually had more pointy bits – in some ways I find it distinctly lacking. I was very glad to find Parse::Perl recently f.ex., which has scratched an itch I have had for a very very long time.