Re: It's so easy to become complacent.
by FreeBeerReekingMonk (Deacon) on Feb 22, 2016 at 18:24 UTC
|
Well, ever sinds CGI-BIN was deprecated in favor of other methods, like node.js (mojolicious is too hard to write) the winds in the perl-sails have dwindled officially.
As the starting-to-learn-programming language is anything but perl (python, java, etc) there is little influx of new people.
Perl is not the only taking a hit. There are internet stories out there about critical stuff is maintained by lone wolves (I tip my hat to them) and a single death would kill maintenance.
I feel that the ratio of users (consumers) is too high compared to the amount of admins (tinkerers).
Perl5? It will not sink. It is designed to float, barely above the waves. And like the relation between C and C++ (two different, incompatible, languages)... so shall it have its own twin... consider matching a dot . and any character \.
Depressing? Nah... it's like an aged wine. Enjoy the tranquility.
disclosure: I still use perl4 (as it is embedded in a monitoring software I use). At work we still use 5.6, 5.8 at most. And most new syntax stuff is incomplete anyway.
| [reply] |
|
|
I have to ask, why do you perceive mojolicious hard to write? We deploy mojolicious web apps here at $work for loads of things, from a customer monitoring system to custom api's for things like GIS systems. I always smile when i get a new project that i get to use mojolicious.
Just curious about your opinions/experiences is all
| [reply] |
|
|
Hmm... I will have to be frank here: I am biased.
There might be a little truth to the fact that Dancer is marked Beginner and five star documentation, while Mojolicious is marked as Intermediate and has four stars of documentation.
Dancer v/s Mojolicious
At this point, there are enough docs and plugins for all that you would want and you just bring them together like ingredients for a cake... urr... starting to talk like a Mojolician...
Maybe I was put off by exactly that video that is still around:
https://vimeo.com/40579180
While frameworks like Starman is much more serious, and once hearing their strong points... appealed more to me.
But it is more the fact that I got it immediately with node.js and Dancer, vs having to really trial-and-error my way around mojolicious. (but like I said, the point is moot now, as the docs of all webplatforms I talked about are topnotch)
And maybe... a preference for the . instead of the fat comma:
# extract title from template (in a beginner's tutorial!)
my $title = $c->ua->get($msg)->res->dom->at('title')->text;
Finally, there was some PM talk about the same here:
Mojolicious vs Dancer (security-wise)?
I hope to find some time to jump into Dancer2... maybe the summervacation... | [reply] [d/l] [select] |
|
|
Re: It's so easy to become complacent.
by perlfan (Parson) on Feb 22, 2016 at 21:45 UTC
|
I know that it is not always possible to $WORK with Perl, and you highlight why.
The only thing I don't use Perl for is when I want to do real threading, in this case I use a scripting language called Qore. On the surface it is very much like Perl, but like what you say about Lua - the sharp corners and really nice things Perl has are missing. | [reply] |
|
|
| [reply] |
|
|
| [reply] |
Re: It's so easy to become complacent.
by Anonymous Monk on Feb 25, 2016 at 03:10 UTC
|
Are you talking about this:
$ python -c 'print("START"); print(x + y)'
START
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'x' is not defined
$ perl -E 'use strict; say "START"; say $x + $y'
Global symbol "$x" requires explicit package name (did you forget to d
+eclare "my $x"?) at -e line 1.
Global symbol "$y" requires explicit package name (did you forget to d
+eclare "my $y"?) at -e line 1.
Execution of -e aborted due to compilation errors.
Now, this is Python and not Lua and maybe Python does have some 'strict' mode hidden somewhere... but I think it doesn't and it's pretty gross that it actually executes some code (print("START")) before crashing. I take it Lua also doesn't the equivalent of 'strict "vars"'.
Which makes the current state of the community all the more depressing.
Well, OTOH, I heard Lua has sane and simple C API, while Perl has XS... nothing is perfect. | [reply] [d/l] [select] |
|
|
bah, variables are just one of so many things!!!
$ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; f00()'
runtime!
Undefined subroutine &main::f00 called at -e line 1.
Though I have to admit that not being able to declare variables explicitly (and as result, their scope) is for me one of the mayor Python issues.
| [reply] [d/l] |
|
|
That's why I like to omit the parentheses whenever possible:
$ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; foo'
runtime!
hello
$ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; f00'
Bareword "f00" not allowed while "strict subs" in use at -e line 1.
Execution of -e aborted due to compilation errors.
| [reply] [d/l] |
|
|
perl -E 'BEGIN { say "uh-uh" } use strict; say "START"; say $x + $y'
| [reply] [d/l] |
|
|
Is that supposed to be a counterexample or what?..
| [reply] |
|
|
|
|