Re: [Jruby-devel] Ruby in a jar

2006-07-11 Thread Charles O Nutter
On 7/12/06, Evan Buswell <[EMAIL PROTECTED]> wrote: I have been running my bsf-called script and a bunch of includes in ajar for quite some time, so at least for specific applications thisseems to work fine.That's good to hear. I know the code is in there, but I haven't ever tried to exercise it la

Re: [Jruby-devel] Ruby in a jar

2006-07-11 Thread Evan Buswell
I have been running my bsf-called script and a bunch of includes in a jar for quite some time, so at least for specific applications this seems to work fine. bsf calls init.rb, which adds "./lib" to the include path. I throw all library files my application uses (found via some recursive grep mag

[Jruby-devel] Fwd: [jira] Created: (JRUBY-5) Maven 2 POM

2006-07-11 Thread Nick Sieger
Here's a POM for Maven 2, commit when you have a chance.../Nick-- Forwarded message --From: Nick Sieger (JIRA) < [EMAIL PROTECTED]>Date: Jul 11, 2006 11:47 PMSubject: [jira] Created: (JRUBY-5) Maven 2 POMTo: [EMAIL PROTECTED]Maven 2 POM--- Key: JRUBY-5 URL:

[Jruby-devel] CRef versus parentStack (getRubyClass)

2006-07-11 Thread Thomas E Enebo
I tried to eliminate getRubyClass() from ThreadContext tonight. It almost worked. The single point of failure seems to be in block behavior. Consider: module Foo; end Foo.module_eval { # (Ruby) Defined within Foo def abc; end # (Ruby) Defined within Object XYZ = 10 } p defined? XYZ

[Jruby-devel] Strscan patch

2006-07-11 Thread Nawrocke Kelly
Here is the patch for StringScanner written in java. It passes all of the existing tests in the testStringScan.rb file and also the new ones I added to exercise some added functionality that didn't exist in the ruby implementation (mainly search_full and scan_full). The modifications made

Re: [Jruby-devel] Added very minor bug JRUBY-4 to codehaus

2006-07-11 Thread Thomas E Enebo
On Tue, 11 Jul 2006, Tim Azzopardi defenestrated me: > > I seem to have permission to add bugs on codehaus. (I have a very old codehaus > account). Hope thats ok? That should be fine. > I have a working fix which I am tidying up before submitting. Cool. Email it to list or attach it to the j

[Jruby-devel] Added very minor bug JRUBY-4 to codehaus

2006-07-11 Thread Tim Azzopardi
I seem to have permission to add bugs on codehaus. (I have a very old codehaus account). Hope thats ok? http://jira.codehaus.org/browse/JRUBY-4 "RubyHash entrySet().iterator().next() failure [fix pending]" Its an old s/f bug that I posted 6 months ago http://sourceforge.net/tracker/index.php?fu

Re: [Jruby-devel] pseudo-bytecode and more compiler discussion

2006-07-11 Thread David Corbin
On Tuesday 11 July 2006 10:54, Charles O Nutter wrote: > > Please keep it going! :) I'm learning this stuff as I go anyway...I've > never written a compiler or taken a course in same (but it doesn't seem to > be as hard as it's made out to be). I took the class, and I think we wrote a teeny-tiny o

Re: [Jruby-devel] Ruby in a jar

2006-07-11 Thread Charles O Nutter
Actually it's worth mentioning that if you don't need any of Ruby's own .rb files (shipped in 0.9.0 but not jarred) the lone jruby.jar file works just fine as a bare Ruby interpreter (think Ruby without any of the aforementioned .rb files but with all of Java present). That's probably enough for fo

Re: [Jruby-devel] Ruby in a jar

2006-07-11 Thread Peter K Chan
I agree that the Maven build file would be great. I remember trying to cook up a pom.xml for JRuby 0.8.3, but I don't remember why I didn't finish it. :p FYI, you can use the install feature of maven to manually inject the JAR into your location repository: mvn install:install-file -Dfile=lib/j

Re: [Jruby-devel] Ruby in a jar

2006-07-11 Thread Charles O Nutter
I'd love to be able to do this, and yes we've talked about this as the ultimate goal. JRuby in a Jar, JRuby + Rails + JMongrel + your app in a Jar, Rake in a Jar, and so on. These are the holy grails.HOWEVER Ruby's libraries suffer from one major flaw: they frequently expect that all .rb files are

[Jruby-devel] Ruby in a jar

2006-07-11 Thread Nick Sieger
Have you guys lent any thoughts to having a distro of JRuby that amounts to the entire thing in a .jar?  Will it "just work" to build an uber-jar that contains *.rb files as resources in the jar, that would make usage in embedding applications easier? Also, it would be nice to get a copy of jruby.j

[Jruby-devel] Getting Rails to run in a JEE servlet container

2006-07-11 Thread Tadatoshi Takahashi
Hi, I'm excited to know that 0.9.1 will have a feature of running Rails in a JEE servlet container. Configuring web server is the only thing that is preventing me from fully benefiting from Convention over Configuration using Rails. Being a long time Java developer, I'm more familiar with servlet

Re: [Jruby-devel] An experiment in compilation

2006-07-11 Thread Thomas E Enebo
On Mon, 10 Jul 2006, Peter Rodgers defenestrated me: > > FYI we integrated JRuby 0.9.0 last week. Its working great and > complements the existing choices we offer. We haven't issued a public > release yet but I know some of our customers are excited about the > possibility of using Ruby on N

Re: [Jruby-devel] pseudo-bytecode and more compiler discussion

2006-07-11 Thread Nick Sieger
On 7/11/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: Been thinking through compilation a bit more. Here's a little pseudo-bytecode for the fib function.def fib: arity 1    PUSH local var 2    PUSH literal 2    CALL '<' arity 1    JMP_FALSE to XX     PUSH local var 2    RETURNXX: PUSH local var

Re: [Jruby-devel] pseudo-bytecode and more compiler discussion

2006-07-11 Thread Charles O Nutter
On 7/11/06, Nick Sieger <[EMAIL PROTECTED]> wrote: Is FCALL supposed to be "call with self as receiver"?  The JVM requires you to push "this" before every invocation -- or are you just doing this for a condensed pseodo-bytecode? This is really meant as a pseudo-Ruby-bytecode, to help settle my unde

Re: [Jruby-devel] pseudo-bytecode and more compiler discussion

2006-07-11 Thread Charles O Nutter
Yeah, I have heard a bit about his wilder ideas. I would be very surprised to see them in Java 7, but they'd sure make Java a perfect platform for languages like Ruby. I think we can come up with some creative workarounds until then, however. On 7/11/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote:  

Re: [Jruby-devel] pseudo-bytecode and more compiler discussion

2006-07-11 Thread Thomas E Enebo
On Tue, 11 Jul 2006, Charles O Nutter defenestrated me: > >Been thinking through compilation a bit more. Here's a little >pseudo-bytecode for the fib function. >def fib: arity 1 >PUSH local var 2 >PUSH literal 2 >CALL '<' arity 1 >JMP_FALSE to XX >

Re: [Jruby-devel] An experiment in compilation

2006-07-11 Thread David Corbin
On Tuesday 11 July 2006 00:06, Charles O Nutter wrote: > On 7/10/06, David Corbin <[EMAIL PROTECTED]> wrote: > > On Monday 10 July 2006 13:21, Charles O Nutter wrote: > > > - Multiple transient collections allocated for every method hit > > > > Allocate? yikes. That's odd sounding. > > Yeah, I'm

Re: [Jruby-devel] Speculate with me [test]

2006-07-11 Thread David Corbin
On Tuesday 11 July 2006 00:34, Charles O Nutter wrote: > I ran 50 runs and got the following once. Look like what you're talking > about? > > 1) Error: > testErraticBehavior(ErraticRestTest): > RuntimeError: HACK[A822] > rexml_bug.rb:15:in `testErraticBehavior' > rexml_bug.rb:22:in `testE

Re: [Jruby-devel] An experiment in compilation

2006-07-11 Thread Peter Rodgers
> > beanshell5.308 > groovy3.081 > javascript 0.185 > python0.402 > ruby18.657 > java 0.001 > > > > Good lord, what's wrong with Groovy? We're only six times slower in pure > interpreted mode (with a LOT of overhead and cruft and few > optimizations) and they'r