Developer Creates An Experimental Perl 5 To Java Compiler (perl.org)
An anonymous reader writes:
Saturday night saw the announcement of an experimental Perl 5 to Java compiler. "This is the first release," posted developer FlÃvio S. Glock -- after 100 weeks of development. "Note that you don't need to compile a Java file. Perlito5 now compiles the Perl code to JVM bytecode in memory and executes it." He describes the compiler as "a work-in-progress" that "provides an impressive coverage of Perl features, but it will not run most existing Perl programs due to platform differences."
no pun intended :p
Never antropomorphize computers, they do not like that
Well, that's one way to make Perl even more unreadable. :P
Love sees no species.
Perl 5 must be godawful if you need to compile it to Java.
It isn't compiled to Java. It is compiled to JVM bytecode. Perl compilers have been done before, so the only new thing here is the backend target ... and that he claims to support "eval" without an embedded interpreter. I don't see how that is possible, and he should get a Turing award if he actually accomplished that.
I'm not sure if there's a practical point to this. Perl is going to be at least as widely supported as Java, so it's not a question of availability. And the dev makes no claims regarding speed... actually the dev makes no claims whatsoever, other than "here it is" and "most perl scripts won't work". If speed were actually the goal, I don't think Java byte code would be the target.
From the standpoint of being a cool nerd project, though - most definitely. This does seem like a throwback to the "news for nerds" catch phrase.
#DeleteChrome
The unpalatable compiling to the unspeakable.
Compiler for Bash Scripts to Visual Basic.
Because it's the most used language! And does everything perfectly fine! And has tons of SDK support!
Because you need 'enterprise' and 'synergy' to win at Corporate Buzzword Bingo.
This is my signature. There are many like it, but this one is mine.
It's honestly pretty pathetic. There are things to like in all the top languages. Java 8 with Spring/Hibernate is easy enough to use.
But naturally, people hate what isn't super niche.
potentially causing irreparable farm??? Editors, please!!
Larry Wall made Java Perl Lingo (JPL, named after Larry's previous employer) around the release of Perl 5. O'Reilly first tried to sell it as a commercial software in the Perl Resource Kit, but eventually made it open source http://www.oreilly.com/pub/pr/... in a "dumpware" sort of mode. It eventually became incompatible with newer Perl and Java releases and I want to say it was abandoned, but that is pretending people used it.
Don't bet on it. It's usually familiarity that breeds the greatest contempt.
Probably merging projects in different laguages on the JVM. Also if you are sandboxed to just the JVM, running Perl5 without hitting metal is neat. I dunno for sure, but this could conceivably play a part in helping Perl6's Inline::Perl5 perform on rakudo-jvm.
Someone had to do it.
... it wants its two hottest languages back.
You're mistaken. He didn't write a Python to Java compiler. Seriously: Python is a language for anal retentive assholes by anal retentive assholes. It doesn't trust its own users and it attempts to solve the "bad code" problem by throwing a shit ton of documentation acting as a Code Nazi. You can just hear the authors of this shit saying, "Auchtung! You vill code dis vay!" Meanwhile, it forgets that shitty developers don't read that kind of documentation, does nothing to stop them from continuing to write functions that go on for pages, and as a result solves nothing.
more words more words more words
That is what the world really needs.
Considering how long Perl 5 existed before this happened, I'm fairly sure you don't need to do anything of the sort.
I wasn't aware that Perl still existed until last year. I thought it disappeared in the aftermath of the dot com bust.
you don't need an embeded interpreter.. you are already "interpreting it" to jvm
/. is written in perl ...
Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
Why are you so proud of your own ignorance, creimer?
Perl is a language that I heard about, never used and don't know anyone who had used it.
I have programmed but I wouldn't call myself a programmer. I don't deserve to use the title. I haven't earned the right, no have I the experience, to use that title.
So, pardon my ignorance, but could you explain why, in layman's terms, anyone would want to do this?
/. is written in perl ...
That would explain why /. haven't been updated in 20 years.
I have programmed but I wouldn't call myself a programmer. I don't deserve to use the title. I haven't earned the right, no have I the experience, to use that title.
So, pardon my ignorance, but could you explain why, in layman's terms, anyone would want to do this?
For shits and giggles. Or to say that you can.
Other than that....I can think of no serious reason to do this.
you don't need an embeded interpreter.. you are already "interpreting it" to jvm
Languages like Java and C can be compiled into a fixed stream of bytecode or machine instructions. Perl, like Lisp and Javascript, doesn't work that way. These languages can assemble snippets of their own source code at run time, and then interpret and run them on the fly. This is very common in Lisp, and runtime evaluation happens in most Lisp programs. In Javascript, runtime evaluation is considered to be bad style, and many bug detectors like "JSHint" will complain about it. Perl is in between. Most Perl programs don't do it, but it is fairly common, and most perl hackers will be familiar with it.
[...] the group of people you spend your time with is not slashdotters.
Funny you should mention that... none of my coworkers have ever heard of Slashdot. Seems like Slashdot is a leftover relic of the dot com bust.
What I find disappointing is that it only converts Perl 5 to JVM bytecode. All the cool kids are using Perl 6!
"FlÃvio"? His name is Flávio.
2017. And people still have websites which can't process UTF-8 properly. Jesus.
SoylentNews is forked off Slash and supports UTF-8.
The downside is that SoylentNews doesn't include 5000 external JavaScript resources as a modern site should.
The whole point in JIT compilation is that it compiles "Just In Time", that is, just in time to execute - to do something like eval you merely JIT the section of script you want to eval when you eval it.
I'm a little out of date on Java, it's been a while, but alternatively if it supports something like .NET's DLR you simply generate expression trees for execution at runtime and execute those.
Depending on semantics, you may wish to call these options "interpreters", and I've got some sympathy for that argument given that the boundary between interpreted and JIT'd languages has become ever more blurred - C#'s DLR, HHVM for PHP, and V8 for JavaScript all make the distinction ever less simple. But this really proves the point - the idea of implementing something like eval in a JIT'd language isn't new, because that's exactly what happens for existing classically interpreted languages like JavaScript that are now more commonly JIT compiled.
And now you have two problems...
All the cool kids are using Perl 6!
When is Perl 6 supposed to come out? ;)
While it may work and all... why? Why translate Perl that will run, runs well, doesn't have any of the problems of Java... why move it into java?
Someone after a rube goldberg award?
Perl is a language that I heard about, never used and don't know anyone who had used it.
You should look up Mark Zuckerberg. You never heard of him I guess, but he's very social and has lots of friends. He runs a little site I like to call the facebook.
Also, there is an old software project called "Slash". It was written in Perl, but probably ran on websites you never used or heard of.
Personally, I'd find a Java-to-Perl converter more useful. Lots of good dev environments for Java, not so much for Perl.
You should look up Mark Zuckerberg.
The greatest PHP programmer that ever lived. I just got finished reading "Chaos Monkeys: Obscene Fortune and Random Failure in Silicon Valley" by Antonio Garcia Martinez. The author sold his company and engineers to Twitter and joined Facebook in a three-way deal. He complained about using PHP for the frontend at Facebook. You would think a Harvard-educated programmer would use a better language for his webpages than PHP. I'm not going to knocked him for using PHP as it was part of the LAMP stack.