Oh yes, I've used inline Java. It does<br><div><br>1) A fork/exec to compile the java code<br>2) A fork/exec to run the compiled code<br>3) Creates a pipe to send/receive arguments/return values<br><br>So you need javac in your path, as well as java.
<br>And it adds IPC overhead.<br><br>It does work, though and I've pushed a lot of data<br>around with it. It does have some concurrency<br>issues.<br></div><div><span class="sg"><br>JD</span></div><div><span class="e" id="q_10d3dc74be6fc9e9_2">
<br><br><div><span class="gmail_quote">On 8/23/06, <b class="gmail_sendername">
Jay Scherrer</b> <<a href="mailto:jay@scherrer.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jay@scherrer.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
JD Brennan wrote:<br>> Is there a JScript.net? or JavaScript.net? Translating<br>> Perl to JavaScript should be fairly straight-forward and<br>> then I could run Perl scripts in the JVM with Rhino or<br>> in the CLR (if there's a JavaScript for .NET)
<br>><br>> JD<br>><br>> On 8/23/06, *JD Brennan* <<a href="mailto:jazzdev@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">jazzdev@gmail.com</a><br>> <mailto:<a href="mailto:jazzdev@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
jazzdev@gmail.com</a>>> wrote:<br>><br>
> Yes, there a number of languages you can use that<br>> will run in a JVM. Jython, J/Ruby, Rhino (JavaScript),<br>> and JScheme are just the ones I know a bit about.<br>> I'm not sure that Sun did anything to encourage this
<br>> besides publishing the spec for the JVM. But that's<br>> getting off topic for this list.<br>><br>> I can think of 3 ways to approach this problem:<br>><br>> 1) Write a Perl interpreter in C#
<br>> 2) Write a translator from Perl to C#<br>> 3) Write a translator (compiler) from Perl to CLR byte codes<br>><br>> 2 might be interesting since you could write it in Perl.<br>> Jython and JScheme use approach 1. JScheme also
<br>> does 3. And, of course, if you do 2 you get a way to<br>> do 3 also, though it'll have the performance and<br>> debugging drawbacks that the old C-front version of C++<br>> had back in the day.
<br>><br>> JD<br>><br>> On 8/23/06, * David S. Patterson* <<a href="mailto:david.s.patterson@usa.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">david.s.patterson@usa.net
</a><br>> <mailto:<a href="mailto:david.s.patterson@usa.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
david.s.patterson@usa.net</a>>> wrote:<br>><br>><br>> I imagine writing a language translation layer for perl on top<br>> of JVM would be a major, major project. I'm sure a worthy<br>> one, but since I don't program in Java I'll just have to let
<br>> it go by. By the way, has this been done for any other<br>> language? I think the java people may feel like that since<br>> they're already giving you platform independance, if you want
<br>> to use the JVM just use it via Java.<br>><br>> But I do an awful lot of work in C# on the .NET platform, yet<br>> I still miss the convenience of the perl syntax and language<br>
> constructs.
<br>><br>> Also I'm impressed with the facilities and even coaching MS<br>> has provided for those that want to instantiate a new language<br>> binding on top of the CLI. That's why, I'm sure, the Python
<br>> people were able to succeed.<br>><br>> Most recently, the Monad group has made progress and has<br>> released Windows Power Shell<br>> <a href="http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx</a><br>> which is a new way of lashing together .NET CLR objects to do<br>> useful work using this new shell scripting language.<br>><br>
> But for me, I'm more interested in perl as a programming<br>> language, because it is so expressive (you get a lot of bang<br>> for each line of code you write) and it is precisely this
<br>
> linking and pipelining behavior that seems like would be a<br>> good fit on top of the .NET API.<br>><br>> Just my three cents...<br>><br>><br>><br>> _____________________________________________________________
<br>> Seattle Perl Users Group Mailing List<br>> POST TO: <a href="mailto:spug-list@pm.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">spug-list@pm.org</a> <mailto:<a href="mailto:spug-list@pm.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
spug-list@pm.org</a>><br>> SUBSCRIPTION:
<a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.pm.org/mailman/listinfo/spug-list</a><br>> MEETINGS: 3rd Tuesdays<br>> WEB PAGE:
<a href="http://seattleperl.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://seattleperl.org/
</a><br>><br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _____________________________________________________________<br>> Seattle Perl Users Group Mailing List
<br>> POST TO: <a href="mailto:spug-list@pm.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">spug-list@pm.org</a><br>> SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.pm.org/mailman/listinfo/spug-list</a><br>> MEETINGS: 3rd Tuesdays
<br>> WEB PAGE: <a href="http://seattleperl.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://seattleperl.org/</a><br>Have you tried <a href="http://inline.pm" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
inline.pm</a>? Perl's language interpretor. Does C, Java,<br>C++, plus the kitchen sink.<br>
How about:<br>use Inline Java => 'DATA';<br><br> # Perl code goes here ...<br><br> __DATA__<br> __Java__<br> /* Java code goes here ... */<br><br><br>:-)<br>Strait from: Brian Ingerson <<a href="mailto:INGY@cpan.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
INGY@cpan.org</a>>.<br><br>Jay Scherrer<br></blockquote></div><br>
</span></div>