Hacker News new | ask | show | jobs
by joel_perl_prog 4399 days ago
Definitely. And as I have lamented in several places online, as well as verbally in discussions about it, I really love Perl, the language, despite its warts. (For example, I view the slurpy subroutine argument style to be an advantage, if used correctly, rather than a wart; that said, having the option of formal parameters would be nice...)

I think we are well past the point now where the language itself is no longer the center of the discussion. Or should not be. What we have is a single back end that's difficult to work on, and which can only target one platform. It's compiled C. Naturally, that's not so bad, as we see Perl is everywhere that Linux is. Which is ... basically everywhere.

But how about a Perl 5 interpreter for the JVM? How about a Perl 5 to Javascript compiler (sort of like Clojurescript)? Or just any other target you can imagine. I really feel like the difficulty of working on the Perl 5 internals limits the language--and ultimately, will kill it.

"Kill it," of course, is a relative term. Perl 5 will most likely never truly die. Indeed, I'm writing (what I think is pretty cool) Perl 5 code right at this moment, and putting it on Github and CPAN.

But in terms of attracting new blood, new developers, young teams of vocal and enthusiastic programmers... I just don't see that happening. To me, it's a great sadness. I have yet to find another language that I love as much as Perl (and I wouldn't mind doing so, at this point).

3 comments

I like Perl 6 (P6). I would like Perl 5 folk pondering P5's internals or its future to properly investigate and understand P6's role.

> how about a Perl 5 interpreter for the JVM?

In the opening few minutes of Patrick Michaud's 2013 video "Perl on the JVM", he notes that Jesse Vincent suggested "Perl 6 is Perl's best (only?) hope for running on JVM/.NET".

https://www.youtube.com/watch?v=XgPh5Li3k4g

Have you read about FROGGS' v5?

http://usev5.wordpress.com/2014/05/26/here-implement-labels-...

> I really feel like the difficulty of working on the Perl 5 internals limits the language--and ultimately, will kill it.

There's been a serious effort to clean up the internals in recent years. But yeah, part of the point of P6 was to develop much better internals.

Rakudo and the NQP compiler toolchain are not only well designed but also almost entirely written in P6 code. (Counting NQP as P6.)

> attracting new blood, new developers, young teams of vocal and enthusiastic programmers... I just don't see that happening.

Even in the face of its disastrous reputation, P6 still manages to attract new blood. Aiui the guy who writes the P6 weekly news (http://p6weekly.wordpress.com/) contributed to the Python core before getting in to P6. This year I've seen smart kids visit #perl6 for the first time, chat knowledgeably about a lisp or ML, and start to contribute. Some well known P5 folk such as Nicholas Clark (one of the few folk ever paid by TPF to hack on the P5 internals) and lizmat have fully turned their focus toward P6 in the last year or so.

> I have yet to find another language that I love as much as Perl (and I wouldn't mind doing so, at this point).

What about hanging out on #perl6 for a while (prime time is about 8am thru 8pm EST, 7 days a week) to chat with folk and see what there is to see?

https://kiwiirc.com/client/irc.freenode.net/perl6

Thank you. That's a really informative and inspiring reply.
I hope I'm being helpful. There's definitely a glass half full / half empty dilemma with talking about P6.

Let me now include a standard caveat list I created last year in an attempt to ensure balance in the force:

"Perl 6 is not remotely as usable and useful as Perl 5; it has dozens of users, not millions; it is 100-1000x slower than Perl 5 for a lot of stuff; the P6 documentation is immature and incomplete; the spec has not reached 6.0.0; the Rakudo compiler has not fully implemented what's already in the spec; most of the concurrency and parallel implementation has only just begun; P6 can not currently use CPAN modules; Perl 6 has syntax and semantics that are not backwards compatible with Perl 5; Perl 6 culture is -Ofun which some think is incompatible with getting things done; some folk think that Perl 6 code looks like line noise... In summary, there are infinitely many things wrong with P6."

I hope that hasn't brought you down to earth with too big a bump.

Regarding the "Perl 5 interpreter for the JVM": See rakudo-jvm.

It can run perl5 and perl6 code, and has proper threading support, but the perl5 backend is still in development.

Regarding the "Perl 5 to Javascript compiler": See perlito

perlcc, the static C compiler is very stable and used in production.

Try Scala. It's a very expressive language that does not sacrifice on power (JVM/type safety).

As a long time professional Perl programmer, I've given up on it. The heartache it has caused on enterprise teams I've been on is not worth the rise in blood pressure. And I'm starting to think that it is inefficient in its yield per unit of effort ratio. Writing good, scalable, clean, modern Perl requires so much couching and qualifying. My teammates couldn't even write good Perl. And so despite my want of evangelizing it, pitching to younger programmers is probably not useful/efficient.

But no, I'm not bitter. =)

> Try Scala.

Aiui folk who love Perl tend to have a natural affinity for Scala. Stevan Little (the Moose and P5 MOP guy) chose Scala for Moe and I'm pretty sure he enjoyed it.

I'm in to P6. ionforce, please indulge/educate me:

> {Scala|P6 is} a very expressive language that does not sacrifice on power (JVM/type safety).

I hope you see where I'm coming from and are willing to play ball. :)

First and foremost, P6 is incomplete, immature, slow, etc. and almost no one is using it to do anything serious. Aiui Scala is used in a wide range of production settings. This is likely the end of any comparison for most folk.

Scala runs on the JVM. Aiui there's no attempt or intent to run it on anything else. Rakudo (P6) runs on the JVM. It also runs on other VMs including MoarVM. See http://moarvm.org

Scala can "seamlessly" call Java code and vice-versa. Rakudo/JVM can call Java code, but it's currently ugly looking. Java code should be able to call P6 code using Rakudo/JVM but the necessary work isn't complete.

Aiui Scala has solid concurrency and parallelism features. P6 has a good story regarding the language's design as it relates to concurrency and parallelism, but implementation only began last year. See http://jnthn.net/papers/2014-nlpw-reactive.pdf for some of the best Rakudo currently has to offer concurrency-wise.

Scala does type inferencing and you can add explicit types. Its type hierarchy is Java's. P6 also does type inferencing with optional explicit types. But it's type hierarchy is not the same as Java's.

Scala has traits, pattern matching, and higher order functions. So does Rakudo.

> But no, I'm not bitter. =)

Of course not. There's more than one way to do it. :)