Perl 5.20 Released, and Mojolicious 5.0: the Very Modern Perl Web Framework
Kvorg writes: "Back in 2012 Slashdot noticed how at the time of Perl 5.16, the modern Perl projects, including Mojolicious, formed a new and expanding movement of a Perl Renaissance. With the release of Perl 5.20 and Mojolicious 5.0, the Modern Perl Renaissance is ever more striking. Faster, neater, sharper with its asynchronous APIs, Mojolicious is extremely flexible with its advanced request routing, plugin system, perl templating and hook API. Its adherence to the modern interfaces and standards and its implementation of advanced features in support tools, DOM and CSS selectors makes it easy to program with.
Mojolicious, with its philosophy of optimized code-generation (think metaprogramming), enabled-by-default support for encodings and UTF-8, zero dependency deployment with wide support for existing CPAN packages, zero downtime restarts and fully tested implementations, reminds us of how fun and flexible programming in scripting languages used to be. Of course, integrated documentation and a very supportive bundled development server don't hurt, either. The new Perl release with new postfix dereference syntax, subroutine signatures, new slice syntax and numerous optimizations makes it all even more fun."
Mojolicious, with its philosophy of optimized code-generation (think metaprogramming), enabled-by-default support for encodings and UTF-8, zero dependency deployment with wide support for existing CPAN packages, zero downtime restarts and fully tested implementations, reminds us of how fun and flexible programming in scripting languages used to be. Of course, integrated documentation and a very supportive bundled development server don't hurt, either. The new Perl release with new postfix dereference syntax, subroutine signatures, new slice syntax and numerous optimizations makes it all even more fun."
I kept thinking "I am the very model of a modern Major Perl Framework..."
Quo usque tandem abutere, Nimbus, patientia nostra?
I don't much care about what a lot of people think about it, I love Perl and still use it daily in my job. I've dabbled in PHP and the various frameworks it supports but I always find myself returning to Perl/CGI/DBI. But this sounds like something I have been waiting for. It's really nice to see some new stuff coming out for Perl 5 as I simply can't seem to wrap my head around Perl 6. This is great news for old dogs!
Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
People still trotting out that tired meme? Color me surprised.
People still use BASH (and yes, it's still hella usable if the task is simple).
If the tool fits and does the job, use it.
Quo usque tandem abutere, Nimbus, patientia nostra?
Maybe one day even Slashdot will get UTF-8 support.
One day.
Any decade now.
The thing that I have always loved about perl is the "there's more than one way to do it" philosophy. Perl lets me do whatever the fuck I want. If I am doing a project for my own enjoyment then I will do whatever I want that gets the job done the fastest. Yes maybe this makes it a bad language for large groups and production applications where programmers need to have restraints in order for the group to work harmoniously. But I am an adult and I don't want to be told what is right or wrong way to do something in my home.
...the Next Great Web Language ends up being PERL? Yes, please.
It has a lot going for it, especially if a project like this makes it as approachable as PHP for web application development.
Serious question, though: other than it being old, are there any problems that keep it from being viable as a modern web application platform?
http://handsonaswegrow.com/wp-...
Not exactly, but I like the picture.
I disagree, but perhaps that is because I learned how to program by learning Perl. I've written huge projects in Python, C++, Java, and JavaScript, and I still prefer Perl for my daily problems (but then, I also actually like C++, so it is possible that I am irreparably damaged). I have had no problem moving to other languages, I even like what they offer (even Java).
Python's idea of the ternary operator, now that's weird. STRING.join( ITERABLE ), that's weird (though the only obvious solution because of how Python is). `string + number = string concatenation`, that's weird. There's weirdness all around!
The problem isn't that perl is old. The problem is that perl reads (and writes) like encrypted sanskrit...
I really wish people would stop saying this. It's certainly possible to write horribly obfuscated Perl, deliberately or otherwise, just as it's possible to write C, or Python, or anything else in a nearly unreadable way. I'll grant that Perl maybe allows you to get away with a bit more.
However, it's just about as easy to write clean, maintainable Perl as it is in any other language. Follow good coding practices and you'll have clean code, code badly and it'll be a train wreck regardless of language.
Shell has marginally better whipituptitude, until you want
1) Arrays
2) Deep string operations
3) Documents
(though, side note, I'm working on a project to make (3) easier to handle because it comes up so often, and there's jq already)
Given I'll make more that $200K programming Perl this year, no that was not my first reflex...
My first reflex on seeing this on Slashdot was, "I probably shouldn't read the article because its going to be filled with the same tired, ignorant Perl hate. And then I'm going to waste time trying to respond to it."
You don't have to use Perl if you don't want to. Why isn't that enough? Why do you feel entitled to dump your FUD on my community? Perl isn't the most popular choice but there's a lot of us making a decent living at it, so please if you don't get it, or you don't like it, unless you have a grudge with Perl that hasn't already been mentioned 100K times what's the point of saying anything at all?
Peace, or Not?
To expound on this point a bit deeper:
While one can write horrible code (without trying too hard) in any language (even python!), there *is* a rational reason that Perl tends to fare worse in this regard on average.
The reason is that, as compared to almost every other programming language out there, Perl was designed by a Linguist (as in, human languages) with an explicit goal of being very expressive. In many other languages, there's one canonical way to do a given thing, and then perhaps a few other ugly, horrible, slow, round-about ways to accomplish the same thing different, but most of the time everyone hones in on the same approximate language patterns.
Perl, on the other hand, was explicitly designed such that there are often many wildly varying different ways to accomplish the same goal, allowing for a great freedom of expression and stylistic choice. Over the years this theme has extended throughout the Perl ecosphere, well beyond the syntactic features of the core language itself, to the point that just about any programming style or paradigm can be wrought within Perl easily. Do you like C++-style multiple inheritance? Or maybe something more like Traits/Roles and object method invocation via message passing? How about functional style lamba stuff? Meta-object programming? Threads (of a few kinds), Processes, eventloops (of many kinds)? Declarative programming (with or without OO)? DSLs? How many flavors of templating do you want? Just about any real or academic-toy knob you can think of to twist which would affect how programming languages work probably already exists within Perl at this point. In this way it's almost like a modern LISP, but with a much larger standard library of language tools built on top, and fewer parentheses.
So you throw 50 "professional" programmers in a room with a Perl interpreter and ask them to solve the same high-level problem and you'll probably get 45 completely shitty implementations, 3 decent ones, and two brilliant ones. But not a single one of those 50 implementations will resemble the others much.
In the hands of a real artist, Perl is a very powerful tool for writing beautiful software, and it gives said artist the freedom to solve problems using the paradigms and syntactic styles that best match the problem domain without ever leaving the world of Perl. In the hands of a novice, however, it's way too much expressive freedom, and leads to basically-trashy, horrible code. Perl is programming without lane markers, seat belts, or brakes. There's nothing standing in the way of greatness, and nothing standing in the way of being a complete idiot, either.
Unfortunately, most programmers in the world aren't artists. They lack the innate skill, the drive and determination, or even the desire to become an artist. They're just doing a job and collecting a paycheck. Python is a great tool for these people, and Perl is not.
Perl Festivity Level 1: Developers and users have gathered to nibble hors d'oeuvres and chat amiably with each other about the Modern Perl Renaissance. With every sip of their drinks Perl seems ever more striking. Some are gathered around the upright piano improvising songs that proclaim how it is faster, neater, and sharper than ever before with its asynchronous APIs.
Perl Festivity Level 2: Everyone is talking loudly -- sometimes to each other, and sometimes to nobody at all. Perl seems even better. Perl Monks are patiently explaining syntax and style to potted plants and other nearby objects. Around the piano people are feeling fun and flexible, just as programming in scripting languages used to be. Someone is crooning a bawdy ballad where a couple of inexperienced DOM and CSS selectors encounter a very supportive bundled development server.
Perl Festivity Level 3: Monks are arguing violently and defrocking one another over nested do...until loops that bail on exceptions. People are gulping down other peoples' drinks, placing hors d'oeuvres in the upright piano to see what happens when the little hammers strike as everyone bawls "Got my Mojolicious workin' ... but it don't work on Python!" They have lost count of their drinks, and the world is harmonious with blissful adherence to modern interfaces and standards.
Perl Festivity Level 4: All the guests, hors d'oeuvres smeared all over their naked bodies are performing a ritual dance around a burning heap of tables and chairs in celebration of postfix dereference syntax, subroutine signatures, new slice syntax and numerous optimizations. The piano is missing.
~~ with apology and deference to Dave Barry
<blink>down the rabbit hole</blink>