Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-13 Thread Charles O Nutter
This has been committed. The Main/CommandlineParser changes were helpful getting Rails to work correctly, and the in-process script stuff will be very useful when we start running more and more Rakefiles. Thanks Marc! On 4/6/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: Updated again:- Modified t

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
True dat..and I'd say Sun is certainly doing right by me in the performance department when it comes to 1.6:C:\jrubywork\shootout\bench\binarytrees>set JAVA_HOME=C:\j2sdk1.5.0_06C:\jrubywork\shootout\bench\binarytrees>jruby binarytrees.ruby 11stretch tree of depth 12 check: -14096 tree

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Kelly Nawrocke
Well sun's fix for that is making low-contention locks fast and by grouping together multiple calls to the same object in one syncrhonized block (instead of multiple).  i guess in mustang they will be able to remove synchronization if the compiler can prove that the Object in question is local to a

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
It's a minor thing. I wish there was an unsynchronized Stack impl in core Java, but alas...On 4/6/06, Marc Hadley < [EMAIL PROTECTED]> wrote:On Apr 5, 2006, at 8:14 PM, Charles O Nutter wrote: >> - I'll be replacing Vector and Stack with ArrayList and> UnsynchronizedStack; we don't ever have more t

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
On 4/6/06, Marc Hadley <[EMAIL PROTECTED]> wrote: I just did a cvs update -d but I don't see a project.xml... Netbeansdoes a decent job of integrating with an existing ant-based project,on my machine I just used the wizard and then added a new target fordebugging purposes. I think NetBeans puts it

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Marc Hadley
On Apr 5, 2006, at 8:14 PM, Charles O Nutter wrote: - I'll be replacing Vector and Stack with ArrayList and UnsynchronizedStack; we don't ever have more than one thread accessing the given vars, and moving to unsynchronized collections has given us a speed boost in many other areas. OK,

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Marc Hadley
On Apr 5, 2006, at 8:01 PM, Charles O Nutter wrote: I saw it was a NetBeans patch, so I did what I'd been intending to do for a while: make JRuby work as a project in NetBeans too. I just committed project.xml, so it should be working correctly. I'm pretty new to NetBeans, however, so if yo

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
Updated again:- Modified to use an inner class instead of anon, so that...- Result of executing script in-process is now saved and set/returned as appropriate for $? and result of Kernel#system callRunning Rake with this currently *does* launch scripts in process (yay!) but fails deeper in due to s

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
I suppose I could have just made these changes before sending the last patch...This updated version propagates the incoming streams through the interpreter, so that for MVM if you pass in in, out, and err they'll actually be used in that VM as Ruby's stdin, stdout, and stderr streams. With this add

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
Here's the first iteration of cleanup for Main and CommandlineParser (with Marc's Kernel changes included). I didn't make any severe structural changes, which will take more work. However, I did:- Make main() instantiate a Main instance, which now has appropriate instance vars - Modify it to only S

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-06 Thread Charles O Nutter
Ugh. Main and CommandlineParser need some serious work for MVM to work correctly.First, they use System.exit everywhere. Error in command line params? System.exit. Unknown argument? System.exit. Error during execution ( i.e. nonzero process result)? System.exit. Double-plus ungood.Second, they use

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-05 Thread Charles O Nutter
Here's an updated, cleaned up patch that should apply correctly in NetBeans and in Eclipse (I'm not sure why NetBeans patches are not udiff, since it seems able to apply them just fine).Changes:- There was a rogue System.out.println in there for debugging- Vector and Stack are now List and Unsynch

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-05 Thread Charles O Nutter
Comments:- I'll be replacing Vector and Stack with ArrayList and UnsynchronizedStack; we don't ever have more than one thread accessing the given vars, and moving to unsynchronized collections has given us a speed boost in many other areas. - The System.setOut stuff is definitely problematic, espec

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-05 Thread Charles O Nutter
I saw it was a NetBeans patch, so I did what I'd been intending to do for a while: make JRuby work as a project in NetBeans too. I just committed project.xml, so it should be working correctly. I'm pretty new to NetBeans, however, so if you (Marc) or someone else more familiar could have a look, I'

Re: [Jruby-devel] Updated patch for Kernel#system and Kernel#backquote

2006-04-05 Thread Charles O Nutter
Ahh, one other detail: please use unified diff for your patches. It came through ok this time, so I should be able to apply it anyway.On 4/5/06, Marc Hadley <[EMAIL PROTECTED]> wrote:I tracked down the shell wildcard problem with my original patch and also tidied things up a bit and fixed a couple