Re: Version 0.02 of perljvm (B::JVM::Jasmin) has been released.

[email protected] ("Bradley M. Kuhn") Wed, 15 Dec 1999 00:17:07 -0500
Newsgroups perl.jpl
Message-ID <[email protected]>
Larry Wall wrote:
> Bradley M. Kuhn writes:
> : I encourage folks interested in Java and Perl integration to download it and
> : take a look.  Only a small subset of Perl is currently supported, but I am
> : working full-time on the project now.  So, expect releases frequently and
> : features to come somewhat quickly.  Contributions from others are welcome
> : too, of course!
 
> Way cool!

Not so cool yet. :(

Technically, 0.02 doesn't even have Turing-completeness for Perl on the JVM.
However, things are starting to move quickly.

> I bet there's a big bunch of people who would rather write Java servlets
> in Perl.

Actually, I must embarrassingly admit that I am not really sure what a
"servlet" *is*.  I have guessed from the name that it something to do with
small server-side applications.  Since I have heard it used in reference to
the WWW most of the time, I am guessing these are tiny servers that folks
make a browser connect to.

I guess what I am saying that my understanding of "servlets" is that there
is no reason someone couldn't get the functionality that servlets get with
Perl code today.  Can someone explain to me better what a servlet is, so
that I can better understand why they must be written in Java?

> Not to mention applets...

This is definitely something that I would like to see supported!  To get
there, we'll need to support an equivalent of JPL::Class that is specific
for the JVM port.  In essence, we'll need to translate the calls to
JPL::Class into native calls to the appropriate Java objects, instead of
using the C JNI hooks that JPL currently does.

This should be too hard, once lots of infrastructure is built.
 
> If there's ways to tweak Perl such that it makes great gains on the JVM
> side, lemme know.  I imagine you could do some nice things with "int"
> declarations, for instance.

That's probably true.  What is currently done is that Scalar is a Java class
that acts like a Perl Scalar.  It wraps internal representations that morph
into each other (i.e., things that are akin to SvPVNV's, SvPV's, etc. in the
perl source).  If we knew something were to be an SvIV, we could optimize,
although I don't know for sure how much it would buy us.....

But, this is largely an academic discussion until a much larger subset of
Perl is running on the JVM.

>  Also, it'll be interesting to see how the upcoming "just do the right
> thing" semantics for Unicode plays under the JVM.  (I think it'll make
> things easier, at least until someone says "use bytes".)

Exactly correct, I believe.  Right now, A Scalar's string value is a native
Java string.  This is well wrapped and can be changed later to something
more complex if need be.


-- 
         -  [email protected]  -  Bradley M. Kuhn  -  [email protected]  -
                          http://www.ebb.org/bkuhn
signature.asc (application/pgp-signature, 232 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4VyRT53XjJNtBs4cRARKbAKDNGQCWW9RULJYA8A1CEVMulj1eTwCffVsG
+Cxfo2MzYGAVHObbKxhOCF8=
=ALEk
-----END PGP SIGNATURE-----