in reply to Anyone interested in coding a _real_ Perl OS?
I'd never heard of JNode. Having read the Wikipedia entry and scoured the official website, I understood what it was -- a bootable OS, with command line, filesystem(s), tcpip stack and optional 2D windowing, written entirely in Java except for a nano-kernel written in assembler -- but was left wondering why it was written. Beyond, because they can.
Eventually I discovered one possible reason. For virtualised web-server environments ("the cloud"), there is a certain utility in having VM that contains just enough facilities to support web applications. Especially if it is written (almost) entirely in the language of choice for those applications. (Assuming you like Java). VM instances can be lighter, and come with the required language support already loaded at start up.
Reading between the lines of your initial post elsewhere, your motivation seems to be that you like that idea, but you don't like Java. Hence, you'd like to do the same thing in Perl.
However, given that it took the JNode author 15 years and 3 major iterations to get to a working and suitably performant solution, if you are hoping to use this for real work any time soon, you will have your work cut out. And remember, in parallel to the original author and his team, Sun used hundreds of programmers and millions, if not billions of dollars developing the JVM, runtime libraries, JIT technology etc. that underpins the JNode environment. Perl has no such deep pocketed white knight. Even interpreted Java runs many times faster than interpreted Perl, and JNode uses on-the-fly compilation exclusively. There is no such technology available for Perl.
If you are really serious about having a bootable Perl VM -- and I can see how this might be desirable in a cloudy, webby, mobile appy developer environment -- then I'd suggest that your best bet would be to utilise as much of the existing technology and lessons learned from the JNode project as possible.
It would surely be a whole lot easier to write a Perl interpreter that compiled to Java bytecode, than to start from scratch. A "JPerl" project has already existed for a couple of years and seemed to make some good early progress. (Though finding more/current information on it defeated my quick efforts.)
It seems to me that starting with PPI and converting that to Java wouldn't be beyond the realms of realistic possibility. And, at least for Pure Perl code, having a perl.jar that can be loaded into a JNode VM that takes perl source and generates Java bytecode would be a fast path to achieving your goal. And once you have the ability to write Pure Perl on top of the JVM, converting/re-writing many of the core/important XS modules on CPAN to be thin wrappers over the huge codebase of Java libraries ought to be really quite easy.
Of course, to write it would require you to bite the bullet of writing Java code initially to get things up and running, and that is what you want to avoid in the first place. But in the long term, having a Perl interpreter that sat on top of the now very highly developed and blazingly fast JVM technology would be a darn good thing for Perl anyway.
From my perspective, having Perl syntax sitting on top of JVM technology seems like a fresh start made in heaven.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Anyone interested in coding a _real_ Perl OS?
by spx2 (Deacon) on Jul 10, 2011 at 11:28 UTC | |
by BrowserUk (Patriarch) on Jul 10, 2011 at 18:02 UTC | |
|
Re^2: Anyone interested in coding a _real_ Perl OS?
by dosadi (Initiate) on Aug 06, 2011 at 06:21 UTC | |
by BrowserUk (Patriarch) on Aug 06, 2011 at 11:57 UTC |