Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Can Perl do anything Java can do?

by cavac (Parson)
on Jul 19, 2017 at 11:34 UTC ( [id://1195440]=note: print w/replies, xml ) Need Help??


in reply to Can Perl do anything Java can do?

In simple words: Yes, Perl is Turing complete, therefore it can, given enough resources, do what every other Turing complete language or computer can do.

But you may find it a bit hard to write programs in Perl that are as clunky, memory hungry and slow as your typical Java program.(*)

(*) Sorry, couldn't resist that one...

"For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."

Replies are listed 'Best First'.
Re^2: Can Perl do anything Java can do?
by Theodore (Friar) on Jul 20, 2017 at 10:00 UTC
    Did anyone ever tried writing a JVM using Perl? That would be fun, for various values of "fun". :-P

      I don't think anyone did the full on thing. But i found a few interesting dists on CPAN:

      So it turns out, you actually can do in Perl everything you can do in Java, because you can just load the Java code into the perl interpreter.

      "For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."
Re^2: Can Perl do anything Java can do?
by stonecolddevin (Parson) on Jul 19, 2017 at 18:18 UTC

    What is so slow about the modern JVM?

    Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

      What is so slow about the modern JVM?

      Erm... its slowness? - Back in the 90s of the past century, at a customers site we replaced two blue closet-sized boxes proudly carrying three letters with a small pizza box running HP-UX which did all the work and cycles to spare. My workstation at that time was a SPARCstation ELC with 50MHz CPU clock and 48MB RAM. I had perl 4 patchlevel 36 on it, and later the first instance of perl5.

      Today I am carrying a so-called SmartPhone with me which in terms of CPU speed and memory could replace 14 of those pizza boxes. Alas, although it runs a Linux kernel and sports a (presumably) modern JVM, opening my phone rolodex (its Java) sometimes takes about 10 times the time to be responsive compared to the rolodex application I developed on my ancient ELC with perl. That's incredibly slow. Java is, more than anything else, bloat.

      perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

        This seems like a really poor analogy, it's all anecdotal. On top of that, Android isn't really a pillar of JVM accomplishment. It's well know that it's bloated and a nightmare to work with on the dev side, which inevitably percolates up to the user experience.

        What kind of Java code are you looking at that's "bloated"? Java has improved tremendously in the past 5-10 years in all aspects. There are plenty of things people can bitch about but overall, it's a clean, solid platform to develop on.

        Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195440]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-19 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found