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