7 ms·
One of the things I like about Mojolicious (a pretty full-featured async web framework in Perl in an incredibly small amount of code) is that it has a Lite vari
by SwellJoe 9y ago
One of the things I like about Mojolicious (a pretty full-featured async web framework in Perl in an incredibly small amount of code) is that it has a Lite variant, which allows building your whole app (routes, app functions, helper functions, models, data, etc.) in a single file. Once you've gotten it off the ground and the one small file starts to become one big file and it starts feeling hairy, you switch to the full version, and break out all the pieces into the usual directory layout (which can be done mostly automatically).
With regard to Wapp and some of the comments here disparaging Tcl...I've often said Tcl gets much more hate than it deserves. For a lot of tasks, it's fine. I wouldn't pick it for anything, but I understand why some folks still do. And, I did build my current companies first website with Tcl (OpenACS+AOLServer) more than a decade ago. It was more enjoyable to work with than all of the PHP CMS-based sites I've built for the company since then. I wouldn't rule it out, if there were some project I wanted to use that happened to be written in Tcl.
- nopacience 9y agoMojolicious is fantastic! A plus is that its complete and has zero dependencies on other modules. So its very quick to install. It is good to see mojolicious be mentioned here at HN. Mojolicious::Lite docs http://mojolicious.org/perldoc/Mojolicious/Lite#SYNOPSIS http://mojolicious.org/perldoc/Mojolicious/Lite#SYNOPSIS
- giancarlostoro 9y agoI've not tried Perl since, but when I did it was the only web framework I ever tried and it was pretty nice.
- f055 9y agoMojolicious is beyond fantastic! I have a hard time touching anything else, as every step of the way I think "damn this could have been so much easier with mojo..."
- smrtinsert 9y agoI miss my aolserver days. It ns_put itself into my heart perfectly.
- 0xdeadbeefbabe 9y agoSo do I, and I'm not afraid of upvar anymore.
- pbreit 9y agoHere’s the python entrant. A pleasure to work with. https://bottlepy.org https://bottlepy.org
- tootie 9y agoI used to love Perl until the world told me to stop because the syntax was too noisy. Now I'm embedding JavaScript expressions in CSS in JSX in ES6 and being told this is an evolved state.
- SwellJoe 9y agoAgreed. Of all the things one could complain about in Perl, "noisy" syntax is among the dumbest and most superficial (but, among the most common). An informed rant about Perl might include these two function calls behaving differently and one almost certainly containing a bug, because function arguments are always a list: some_function(@an_array, $a_scalar); some_function2($a_scalar, @an_array); Assume some_function receives @new_array and $new_scalar, and vice versa for some_function2. This trips up literally every new Perl developer (our UI guy, who is mostly a PHP and JS dev, ran into it just a few weeks ago). Lack of function signatures is another good complaint about Perl. It's still not realistic to use them in code that ships for old Perl versions (like for deployment on leading server distributions). There are others, but, yeah. I also hate how simplistic criticism of Perl is these days. It's knee jerk and poorly-informed in most cases. That doesn't mean I'm recommending Perl for everyone, or that I'd pick it for every new project, just that I wish the dialog around it weren't so stupid so much of the time.
- lizmat 9y agoFWIW, in Perl 6, gradual type checking and function signatures do exist, and parameter flattening is only applied if the signature calls for it. sub foo(@array,$scalar) { } foo( 42, [1,2,3] ); # compile time error Signatures are also first class citizens in Perl 6: check out https://docs.perl6.org/type/Signature https://docs.perl6.org/type/Signature for more information.
- petre 9y agoI was excited about Perl6 until I ran a prime number crunching benchmark which ran slower than everything else. I'll stick with Perl5 or move to Ruby. We too use Mojolicious and are very happy with it.