|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
[ANN] ruby2java 0.0.1 Releasedruby2java version 0.0.1 has been released!
* <http://kenai.com/projects/ruby2java/pages/Home> The Ruby2Java compiler inspects the *runtime* definition of classes to produce a normal-looking Java class. All metaprogrammed methods are reflected on the Java class, as are runtime modifications to those methods. Changes: ### 0.0.1 / 2009-05-20 * First experimental version * Basic compilation of a Ruby class to a Java class * public instance and static methods and public constructors * interface implementation * package specification * basic method annotations * <http://kenai.com/projects/ruby2java/pages/Home> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedAnd close on its heels is 0.0.2, which actually specifies the bitescript
dependency! Sigh. Charles Oliver Nutter wrote: > ruby2java version 0.0.1 has been released! > > * <http://kenai.com/projects/ruby2java/pages/Home> > > The Ruby2Java compiler inspects the *runtime* definition of classes > to produce a normal-looking Java class. All metaprogrammed methods > are reflected on the Java class, as are runtime modifications to > those methods. > > Changes: > > ### 0.0.1 / 2009-05-20 > > * First experimental version > * Basic compilation of a Ruby class to a Java class > * public instance and static methods and public constructors > * interface implementation > * package specification > * basic method annotations > > * <http://kenai.com/projects/ruby2java/pages/Home> > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedOn Friday 22 May 2009, Charles Oliver Nutter wrote:
> ruby2java version 0.0.1 has been released! > > * <http://kenai.com/projects/ruby2java/pages/Home> > > The Ruby2Java compiler inspects the *runtime* definition of classes > to produce a normal-looking Java class. All metaprogrammed methods > are reflected on the Java class, as are runtime modifications to > those methods. Will Ruby2Java eventually be used by JRuby to compile ruby scripts to class files like jython? The reason I am asking is that I can get the python stack traces as part of the Java stacktrace in Jython, but not (yet) in JRuby. Lothar --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedLothar Werzinger wrote:
> On Friday 22 May 2009, Charles Oliver Nutter wrote: >> ruby2java version 0.0.1 has been released! >> >> * <http://kenai.com/projects/ruby2java/pages/Home> >> >> The Ruby2Java compiler inspects the *runtime* definition of classes >> to produce a normal-looking Java class. All metaprogrammed methods >> are reflected on the Java class, as are runtime modifications to >> those methods. > > Will Ruby2Java eventually be used by JRuby to compile ruby scripts to class > files like jython? > > The reason I am asking is that I can get the python stack traces as part of > the Java stacktrace in Jython, but not (yet) in JRuby. Actually you can get Ruby in the Java trace if you have JRuby compile everything to bytecode up front (-X+C flag) and tell it to produce "raw" stack traces (-J-Djruby.backtrace.style=raw). The reason you don't normally see it is because we have an interpreter and Jython doesn't. Ruby2Java is intended to allow easier integration with Java libraries and frameworks that require a "real" Java class, such as any frameworks that use annotations or reflection. - Charlie --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedOn Friday 22 May 2009, Charles Oliver Nutter wrote:
> Lothar Werzinger wrote: > > On Friday 22 May 2009, Charles Oliver Nutter wrote: > >> ruby2java version 0.0.1 has been released! > >> > >> * <http://kenai.com/projects/ruby2java/pages/Home> > >> > >> The Ruby2Java compiler inspects the *runtime* definition of classes > >> to produce a normal-looking Java class. All metaprogrammed methods > >> are reflected on the Java class, as are runtime modifications to > >> those methods. > > > > Will Ruby2Java eventually be used by JRuby to compile ruby scripts to > > class files like jython? > > > > The reason I am asking is that I can get the python stack traces as part > > of the Java stacktrace in Jython, but not (yet) in JRuby. > > Actually you can get Ruby in the Java trace if you have JRuby compile > everything to bytecode up front (-X+C flag) and tell it to produce "raw" > stack traces (-J-Djruby.backtrace.style=raw). The reason you don't > normally see it is because we have an interpreter and Jython doesn't. I use JRuby via the JSR223 Java scripting API. How would I get JRuby to compile everything to bytecode and provide me with the "raw" stack traces in that environment? I assume I would need to set a Java system property "jruby.backtrace.style" to "raw" for the stack traces, but how to tell JRuby to generate class files for the ruby scripts? > Ruby2Java is intended to allow easier integration with Java libraries > and frameworks that require a "real" Java class, such as any frameworks > that use annotations or reflection. > - Charlie Lothar --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedLothar Werzinger wrote:
> I use JRuby via the JSR223 Java scripting API. How would I get JRuby to > compile everything to bytecode and provide me with the "raw" stack traces in > that environment? > > I assume I would need to set a Java system property "jruby.backtrace.style" > to "raw" for the stack traces, but how to tell JRuby to generate class files > for the ruby scripts? The property for "forced" compilation (-X+C) is jruby.compile.mode=FORCE, and it will cause any required files to be compiled before running. So you could precompile scripts using jrubyc, or require them all in with "forced" compilation to get the effect you're looking for (eval'ed code does not compile even with compile.mode=force). We're interested in making this a simpler and possibly default way to run in the future. Would that be appealing to you? - Charlie --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: [ANN] ruby2java 0.0.1 ReleasedHi,
On Sun, May 24, 2009 at 3:53 PM, Charles Oliver Nutter <charles.nutter@...> wrote: > Lothar Werzinger wrote: >> >> I use JRuby via the JSR223 Java scripting API. How would I get JRuby to >> compile everything to bytecode and provide me with the "raw" stack traces in >> that environment? >> >> I assume I would need to set a Java system property >> "jruby.backtrace.style" to "raw" for the stack traces, but how to tell JRuby >> to generate class files for the ruby scripts? > > The property for "forced" compilation (-X+C) is jruby.compile.mode=FORCE, > and it will cause any required files to be compiled before running. > > So you could precompile scripts using jrubyc, or require them all in with > "forced" compilation to get the effect you're looking for (eval'ed code does > not compile even with compile.mode=force). > > We're interested in making this a simpler and possibly default way to run in > the future. Would that be appealing to you? I just implemented this script compilation feature to the ongoing JRuby embed API(http://kenai.com/projects/jruby-embed), and tested by using testString.rb (http://kenai.com/projects/jruby-embed/sources/sources/content/test/org/jruby/embed/CompileTest.java?rev=4030a03623df54a7b00255dd9b70373a430f3454). This "forced" compilation mode is much faster than no compilation, but not so fast compared with JIT mode. When the script was parsed and evaluated once, CompileMode.FORCE mode was the fastest. However, after parsing, when I evaluated the script ten times (I mean, parse once, eval many times), CompileMode.JIT mode was sometimes the fastest as in below. once 10 times No compilation/No JIT 640 ms 749 ms CompileMode.JIT 263 ms 425 ms CompileMode.FORCE 185 ms 435 ms (JRuby 1.3.0RC2) Is this an expected result? -Yoko > > - Charlie > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |