Re: [Jruby-devel] Getting started as a JRuby developer
I agree with Charles suggestion. In the mean time, do you have specific areas of interest? On Tuesday 03 January 2006 12:52 pm, Zane Rockenbaugh wrote: > I'm in the same boat. > > Z > > John Wells wrote: > > Guys, > > > > I'd like to start helping JRuby out, but can't find any good "Getting > > Started" docs for potential JRuby developers. Have any been written, and > > if not, would any of you consider doing so? > > > > Thanks! > > > > John > > > > > > > > --- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > files for problems? Stop! Download the new AJAX search engine that > > makes searching your log files as easy as surfing the web. DOWNLOAD > > SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] DSymbolNode not a ListNode?
One thing that would be VERY useful to a number of people, is if each Node implementation contained a standardized comment describing what it really represents (unless you want to rename then to be clearer, though I still suspect that would not be enough unless you're very familiar with the ruby-syntax terminalogy). Included in this comment would be a code fragement showing the 'boundaries' of the node. I know this is a lot of work, but perhaps it can be done a little bit at a time. David On Wednesday 04 January 2006 10:28 pm, Charles O Nutter wrote: > No, that mostly explains it...I wasn't quite sure what the > relationship between these two were, especially since the logic around > evaluating them is nearly identical. It probably doesn't make any > difference if it's a listnode or not, if it doesn't gain anything in > the process. > > - Charlie > > On 1/4/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote: > > On Wed, 04 Jan 2006, Charles O Nutter defenestrated me: > > > Why? > > > > I am trying to understand the why of your question. A DSymbolNode > > is just a SymbolNode which contains a DStrNode. The result of evaling > > the DStrNode will be a symbol. Are you thinking we can make a > > DSymbolNode a ListNode (like DStrNode) and then change the grammar to put > > the chunks of what would be in the DStrNode into the DSymbolNode instead. > > This would require the visitor for DSymbol to use the same logic as a > > DStringNode. > > > > Is this what you are thinking? > > > > -Tom > > > > -- > > + http://www.tc.umn.edu/~enebo + mailto:[EMAIL PROTECTED] + > > > > | Thomas E Enebo, Protagonist | "Luck favors the prepared| > > | > > | | mind." -Louis Pasteur | > > > > --- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > files for problems? Stop! Download the new AJAX search engine that > > makes searching your log files as easy as surfing the web. DOWNLOAD > > SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id865&op=Click > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Synchronization bug
This is just a comment, to say we still have some type of synchronization bug (I think). We get an intermittent failure parsing XML (the SAME xml) during our tests. Since the bug seems to happen much more frequently on hyper-threaded systems, I assume it's a synchronization bug, though I'm not really aware of any "extra thread" that are running. I've been trying to work on this a bit lately, but haven't yet gotten anywhere. If I narrow it down to a small test case, I'll share it. David --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Synchronization bug
On Thursday 19 January 2006 12:42, Charles O Nutter wrote: > Can you toss over the error next time you see it? REXML::ParseException: attempted adding second root element to document /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:85:in `parse' /usr/lib/ruby/1.8/rexml/document.rb:176:in `build' /usr/lib/ruby/1.8/rexml/document.rb:45:in `initialize' enttek/jruby/cinematic/database.rb:14:in `new' enttek/jruby/cinematic/database.rb:14:in `initialize' enttek/jruby/cinematic/database.rb:77:in `new' enttek/jruby/cinematic/database.rb:77:in `metaData' enttek/jruby/cinematic/database.rb:83:in `clean' setup/SimpleHomeOfficeFixture.rb:14:in `setupSimpleHomeOffice' C:\data\workspace\RubyTest\src\acceptanceTests\webservices\backoffice\Purcha seTicketsRestTest.rb:32:in `setup' We've gotten this numerous times parsing different XML files, but also numerous times parsing the same one. > This could be that > JVM issue I was seeing. It went away now, but I've got no guarantees > it won't come back, and it certainly behaved like a threading issue > even though there was only a single thread running. > > At any rate, I'll keep an eye out for any thread-like failures. > > - Charlie > > On 1/19/06, David Corbin <[EMAIL PROTECTED]> wrote: > > This is just a comment, to say we still have some type of synchronization > > bug (I think). We get an intermittent failure parsing XML (the SAME xml) > > during our tests. Since the bug seems to happen much more frequently on > > hyper-threaded systems, I assume it's a synchronization bug, though I'm > > not really aware of any "extra thread" that are running. > > > > I've been trying to work on this a bit lately, but haven't yet gotten > > anywhere. If I narrow it down to a small test case, I'll share it. > > > > David > > > > > > --- > > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > > files for problems? Stop! Download the new AJAX search engine that > > makes searching your log files as easy as surfing the web. DOWNLOAD > > SPLUNK! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Synchronization bug
On Friday 20 January 2006 12:27 pm, Galarneau, Neil wrote: > I'm just kibitzing from the sidelines here, but for situations like this > it might be nice to see all java thread stacks. > > This is now possible in java 1.5 by calling Thread.getAllStackTraces(). > This call could be done reflectively so as to not make a dependency on > 1.5 > Thanks for the pointer. I'm not sure of the best way for me to leverage it, but it's good to know about. David --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Regression Bug
Here's a wierd regression bug, causing REXML to give false errors. As near as I can tell, it worked fine in 0.8.2. Please note, that if the XML parsing is done without the Unit-test, it works fine. In fact, if you parse it once before the unit test, and once during, it works fine. This doesn't seem like my synchronization bug, as it's too consistent, but it is blocking me from pursuing that one. David xmlTestBug.rb Description: application/ruby
Re: [Jruby-devel] Re: Patch: fix for module/class operators (<=>, <, >=, etc)
The trick to learn (which I'm still working on), is to not put the addressee in when you start the message :) On Sunday 22 January 2006 23:49, Charles O Nutter wrote: > I hate when I do that. Patch attached. > > On 1/22/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > > This fix allows the module/class comparison operators to work like > > they're supposed to: returning nil when two compared classes are on > > different branches of the hierarchy. I found this issue running C > > ruby's test_const. It runs 100% now. > > > > I'm still not happy with the way it's doing the comparison (checking > > for == in the method lists has always been and still is an UGLY hack) > > but I didn't address that in this patch. > > > > Patch was made against cnutter_work1, but should apply fine to HEAD. > > Please confirm. > > > > - Charlie --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Regression Bug
Then it's probably my fault, but why would being inside a test matter? I'll try to look at in more detail tonight... David On Sunday 22 January 2006 17:20, Charles O Nutter wrote: > Looks like it may be a regression in regexp or something. The attached > script illustrates how a regexp in > lib/ruby/1.8/rexml/parser/baseparser.rb, the TAG_MATCH regexp, is > building incorrectly in JRuby, resulting in a bad match. Run in both > JRuby and Ruby to compare. > > The "Ruby version" and "JRuby version" were retrieved by dumping the > TAG_MATCH regexp at line 334 in baseparser.rb. The "hidden" backtrace > is: > C:\Jrubywork\jruby\lib\ruby\1.8\rexml\parsers\baseparser.rb:369:in `pull' > C:\Jrubywork\jruby\lib\ruby\1.8\rexml\parsers\treeparser.rb:21:in `parse' > C:\Jrubywork\jruby\lib\ruby\1.8\rexml\document.rb:176:in `build' > C:\Jrubywork\jruby\lib\ruby\1.8\rexml\document.rb:45:in `initialize' > C:\Home\xmlTestBug.rb:13:in `new' > C:\Home\xmlTestBug.rb:13:in `testXml' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testcase.rb:70:in `send' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testcase.rb:70:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `each' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:33:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:32:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnermediator.rb:46:in > `each' C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\testsuite.rb:33:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnermediator.rb:46:in > `run_suite' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\console\testrunner.rb:65:in > `start_mediator' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\console\testrunner.rb:39:in > `start' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\ui\testrunnerutilities.rb:27:in > `run' C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\autorunner.rb:194:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit\autorunner.rb:14:in `run' > C:\Jrubywork\jruby\lib\ruby\1.8\test\unit.rb:285 > > I'm no regexp master, but I'll keep poking around. > > - Charlie > > On 1/22/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > > Confirmed, it does appear to work fine in 0.8.2 and does not > > now...I'll have a looksee! > > > > - Charlie > > > > On 1/22/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > Here's a wierd regression bug, causing REXML to give false errors. As > > > near as I can tell, it worked fine in 0.8.2. > > > > > > Please note, that if the XML parsing is done without the Unit-test, it > > > works fine. In fact, if you parse it once before the unit test, and > > > once during, it works fine. > > > > > > This doesn't seem like my synchronization bug, as it's too consistent, > > > but it is blocking me from pursuing that one. > > > > > > David --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Classpath loading of files patch...
Well, for one, because the ruby configuration stuff (RbConfig ?) needs to report on where the libraries are. David On Sunday 22 January 2006 15:29, Charles O Nutter wrote: > That would explain why it was working for me...the first thing I run > in my JRuby command prompt sessions is a script that primes JRUBY_HOME > to the project I'm working on. > > To be honest, it would seem the most logical way to avoid this would > be to NOT require jruby.home be set to anything during normal > execution; it should be used only in the startup scripts to set up > paths and classpaths, in my opinion, and this is perfectly in line > with how other languages do things. You wanna load a file, you're > golden as long as it's in your classpath (or you specify a valid > filesystem path). I think that behavior would solve all issues. > > It would seem to make sense, too, since everything necessary to run > JRuby should be in the classpath, added to the classpath by the exec > script, or in the JRuby jar. I can think of no reason why jruby.home > should be a requirement after startup. > > - Charlie > > On 1/22/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote: > > I was trying to get 'require "erb"' to work within a ruby script > > loaded from a Servlet. I came to the realization that because > > the system property jruby.home was not set, we were not defining > > any of our usual path directories for finding modules. > > > > This patch just makes jruby.home a '.' if it is not set. This > > makes all the paths get set up so that require erb works etc... > > Is this a good idea though? Anyone have thoughts? One reason > > I ran into this is BSF does not require that jruby.home be set. > > Of course I could manually set it to '.', but then anyone using > > BSF would have to basically do this everytime. People who try > > and embed directly will have to do something like this too. > > > > My other thought is perhaps we should treat jarPaths as only > > a special concept? Actually perhaps that "jar:" processing in > > findFile is meant for this purpose? > > > > -Tom > > > > -- > > + http://www.tc.umn.edu/~enebo + mailto:[EMAIL PROTECTED] + > > > > | Thomas E Enebo, Protagonist | "Luck favors the prepared| > > | > > | | mind." -Louis Pasteur | > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Re: Patch: fix for module/class operators (<=>, <, >=, etc)
> nit: > > if (a) > return > else if (b) > return > else > return > > Should lop off the else: > > if (a) > return > else if (b) > return > > return Should lop off ALL the elses. if (a) return if (b) return return > > Other than that it looks good... > > -Tom --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Classpath loading of files patch...
On Monday 23 January 2006 09:50 am, Charles O Nutter wrote: > That's true, but where should that location be when deployed as just a > jar file inside Tomcat, for example? It seems we shouldn't have to > have that set to something on the filesystem for things to work, or > we'll have trouble with a lot of deployment scenarios. I strongly suspect that ruby gems is dependent on it for installing stuff. But beyond that, I don't have an answer. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Patch: jruby.lib should NOT be ".", RubyGems install success!
On Tuesday 24 January 2006 11:07 am, Charles O Nutter wrote: > That is the same point I have gotten it to. I needed to move yaml.rb > somewhere so it would load rather than Ruby 1.8's yaml.rb (which tries > to load syck). So I'm at the same point you got to. I did need the > SmartFile patch because of stupid windows backslashes; you probably > avoided those issues by running under Linux. > > I also *almost* got rails "generate" command to run completely. There > was a minor fix required to regexp, and then the next stumbling block > is an interpreter bug somewhere I need to hunt down. But it's close. What was the fix to regex? > > David, if you're out there...what approach did you take to getting > Rails up? I'm following a fairly stock approach, trying to fix as I > go. Well, I never really got rails "up". I got past the syck problem, because I included the pure-ruby yaml.rb that someone had. It's committed, and I thought it would load "naturally", but apparently not. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Classpath loading of files patch...
On Wednesday 25 January 2006 09:47 pm, Thomas E Enebo wrote: > > On 1/25/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote: > > > So it sounds like we should add the ability to specify a > > > "classpath-only" directory specifier so we can allow people to set up > > > these embedded environments better. > > Anyone have ideas on how we should specific classpath-only paths? > This is asking about syntax and how we do it internally...I am not > coming up with anything good. $LOAD_PATH=[] I'd really like a better understanding of what you mean when you say "classpath only path". David --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Patch: Escaped octal in regexp needs a zero
On Thursday 26 January 2006 12:27 am, Charles O Nutter wrote: > This fix adds a zero to everything that matches \[1-7][1-7]+ in a > regular expression, which should all be escaped octal values. I think > this gets around the issue David mentioned whereby we might > accidentally add a zero to backrefs. > > Committed to cnutter_work1 already...necessary for Rails. > I couldn't apply the patch directly, as it is missing "OCTAL_THREE_DIGIT_PATTERN". But even applying the patch by hand, it didn't seem to help things. Not sure why yet. > - Charlie David --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Suggestion for an ENV implementation
On Thursday 02 February 2006 05:36 pm, Tim Azzopardi wrote: > While testing the AntBuilder stuff, I found that ENV['RUBY_HOME'] is nil in > jruby but works in cruby. (There is only one environment variable that > works in jruby which is HOME because of a specific bit of code.) > > I had a go at fixing this initially using System.getenv() which returned a > hashmap of all the envonment variables. This was great until I realized it > was a Java5 feature. > > Having googled around a bit, I see that everyone has the same problem and > that pre java5 you need to drop out to the OS with > Runtime.getRuntime().exec("env"|"set") and parse the output. > > So I am happy to give this Runtime.exec("env"|"set") technique a go, if one > of you core jruby guys thinks its the right direction to go in. > ___Is_the_right_direction___? If not, I'll just drop it. > I think it's a reasonable direction, but I encourage you to reflectively call System.getEnv if you ARE on Java5. That is, have two ENV "loaders", and choose which one based on Java version. > If it is the right direction to go in, then I see a couple of basic ways to > implement: > > (a) from scratch, copy and or get inspiration from what look like many > "public domain" Runtime.exec solutions such as > http://www.rgagnon.com/javadetails/java-0150.html > > (b) Put ant.jar on the jruby classpath and call org.apacheExecute > getProcEnvironment() (which is a comprehensive Runtime..exec solution too). > > (c) Get inspiration from org.apache...Execute. (Presumably can't be copied > to jruby because of ASL2 license? Sigh... > Definately (a). Also, you should be sure to do this only once, and cache the results. And watch out for synchronization issues. > Aside number 1: > I can see that there is potential conflict/confusion between the > linux:env/windows:set namespace and the java System.getProperty() > namespace. Maybe the two namespaces can simply be combined in the ruby ENV > hash? Maybe a seperate jrurby specific global is required for the java > System.getProperty() namespace: ENV_JAVA or ENV_JRUBY or something. The two spaces should remain seperate entirely, if possible. > Aside number 2: > I wasn't intending to do anything about either of these comments in the > code related to the ENV global : > // TODO: ENV Not really a RubyHash (but close) > // TODO: ENV Should not copy system props, but should reference them > instead This seems like a seperate issue. Well, the second one will "go away", I think, won't it? > And finally, sorry if this an annoying low priority distraction from the > hard core stuff going on at the moment. It all needs to be done... > > Cheers all > Tim > > > > > > > > --- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] NPE problem
Charles - The merge of your branch "ignored" the class I had previously extracted for translating Ruby regexs to Java regexs. I've attempted to a) correct that part, and b) get that "octal" bug working again, but now I'm getting an NPE deep in the heart of interpertation. Could you try the attached patch, and see if you can figure it out? Thanks. David ### Eclipse Workspace Patch 1.0 #P jruby Index: src/org/jruby/RubyRegexp.java === RCS file: /cvsroot/jruby/jruby/src/org/jruby/RubyRegexp.java,v retrieving revision 1.36 diff -u -r1.36 RubyRegexp.java --- src/org/jruby/RubyRegexp.java 2 Feb 2006 19:51:49 - 1.36 +++ src/org/jruby/RubyRegexp.java 4 Feb 2006 13:14:31 - @@ -47,11 +47,9 @@ * @author amoore */ public class RubyRegexp extends RubyObject implements ReOptions { -private static final Pattern COMMENT_PATTERN = Pattern.compile("\\(\\?#[^)]*\\)"); -private static final Pattern HEX_SINGLE_DIGIT_PATTERN = Pattern.compile("x(\\p{XDigit})(?!\\p{XDigit})"); -private static final Pattern OCTAL_SINGLE_DIGIT_PATTERN = Pattern.compile("([0-7])(?![0-7])"); -private static final Pattern OCTAL_MISSING_ZERO_PATTERN = Pattern.compile("([1-7][0-7]+)"); -/** Class which represents the multibyte character set code. +private static final RegexpTranslator REGEXP_TRANSLATOR = new RegexpTranslator(); + + /** Class which represents the multibyte character set code. * (should be an enum in Java 5.0). * * Warning: THIS IS NOT REALLY SUPPORTED BY JRUBY. @@ -140,21 +138,7 @@ } public void initialize(String regex, int options) { - int flags = Pattern.MULTILINE; -if ((options & RE_OPTION_IGNORECASE) > 0) { -flags |= Pattern.CASE_INSENSITIVE; -} -if ((options & RE_OPTION_EXTENDED) > 0) { - flags |= Pattern.COMMENTS; -} -if ((options & RE_OPTION_MULTILINE) > 0) { - flags |= Pattern.DOTALL; -} -regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); -regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll(""+"x0$1"); -regex = OCTAL_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll(""+"0$1"); -regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll(""+"0$1"); -pattern = Pattern.compile(regex, flags | this.code.flags()); +pattern = REGEXP_TRANSLATOR.translate(regex, options, code.flags()); } public static String quote(String orig) { Index: src/org/jruby/RegexpTranslator.java === RCS file: /cvsroot/jruby/jruby/src/org/jruby/RegexpTranslator.java,v retrieving revision 1.1 diff -u -r1.1 RegexpTranslator.java --- src/org/jruby/RegexpTranslator.java 23 Dec 2005 16:23:20 - 1.1 +++ src/org/jruby/RegexpTranslator.java 4 Feb 2006 13:14:31 - @@ -13,9 +13,9 @@ private static final Pattern SPACE_IN_CHARACTER_CLASS_PATTERN = Pattern.compile("(\\[[^]]*) (.*?])"); private static final Pattern COMMENT_PATTERN = Pattern.compile("\\(\\?#[^)]*\\)"); private static final Pattern HEX_SINGLE_DIGIT_PATTERN = Pattern.compile("x(\\p{XDigit})(?!\\p{XDigit})"); -private static final Pattern OCTAL_SINGLE_DIGIT_PATTERN = Pattern.compile("([0-7])(?![0-7])"); private static final Pattern OCTAL_THREE_DIGIT_PATTERN = Pattern.compile("([1-3][0-7]{2})"); - +private static final Pattern OCTAL_MISSING_ZERO_PATTERN = Pattern.compile("([1-7][0-7]{1,2})"); + public Pattern translate(String regex, int options, int javaRegexFlags) { javaRegexFlags |= translateFlags(options); regex = translatePattern(regex, (javaRegexFlags & Pattern.COMMENTS) != 0); @@ -25,12 +25,13 @@ String translatePattern(String regex, boolean commentsAllowed) { regex = COMMENT_PATTERN.matcher(regex).replaceAll(""); regex = HEX_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll(""+"x0$1"); - regex = OCTAL_SINGLE_DIGIT_PATTERN.matcher(regex).replaceAll(""+"0$1"); regex = OCTAL_THREE_DIGIT_PATTERN.matcher(regex).replaceAll(""+"0$1"); + regex = OCTAL_MISSING_ZERO_PATTERN.matcher(regex).replaceAll(""+"0$1"); if (commentsAllowed) { regex = SPACE_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1x20$2"); regex = SHARP_IN_CHARACTER_CLASS_PATTERN.matcher(regex).replaceAll("$1x23$2"); } + return regex; } Index: xmlTestBug.rb === RCS file: xmlTestBug.rb diff -N xmlTestBug.rb --- /dev/null 1 Jan 1970 00:00:00 - +++ xmlTestBug.rb 1 Jan 1970 00:00:00 - @@ -0,0 +1,20 @@ +require 'test/unit' +require 'rexml/document' + +SQL_TAG = < + +SQL +XML_FILE = < +#{SQL_TAG} + +END_OF_FILE + +class AdjustTicketsRestTest < Test::Unit::TestCase + def testXml +doc = REXML::Document.new(XML_FILE) + end + +end +
[Jruby-devel] Early termination
I've got an some unit tests that "terminate before getting started", but only in HEAD (not in 0.8.2). I see no sign that the tests are running at all. There is no output of any type. I've tried to narrow it down, but it gets kind of deep in the interpreter. Any suggestions on how to narrow this down would be appreciated. David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Need for an IRB that works
On Thursday 09 February 2006 11:11 pm, Thomas E Enebo wrote: > IRB known problems: > readline -- Perhaps we can make empty terminal or make irb use > Swing/AWT (and make a GUI-based readline) > binding -- you have a patch which may be good enough here? > trap -- no way to interrupt SIGINT without taking down system. Perhaps > a GUI-based irb is not so bad after all.. You can install a hook in java that catches CTRL-C (isn't that what SIGINT is?). The exact bits of how to do it escape me, but it's in java.lang, possibly System. > > sample/eval.rb is a super poor mans irb also. > > I also got debug.rb to run by commenting out the trap (we may need > to stub this one out since it appears in most interactive ruby scripts). > --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Early termination- HEAD regression
On Saturday 25 February 2006 06:10, David Corbin wrote: > I've got an some unit tests that "terminate before getting started", but > only in HEAD (not in 0.8.2). I see no sign that the tests are running at > all. There is no output of any type. I've tried to narrow it down, but it > gets kind of deep in the interpreter. > The following yields really different results between 0.8.2 and HEAD. 0.8.2 is consistent with C ruby. --start-- require 'rational' puts $! --end-- --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Early termination- HEAD regression
Sorry if this shows up twice. On Saturday 25 February 2006 06:10, David Corbin wrote: > I've got an some unit tests that "terminate before getting started", but > only in HEAD (not in 0.8.2). I see no sign that the tests are running at > all. There is no output of any type. I've tried to narrow it down, but it > gets kind of deep in the interpreter. > I've narrowed it down to this. The following yields really different results between 0.8.2 and HEAD. 0.8.2 is consistent with C ruby. --start-- require 'rational' puts $! --end-- --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] another Head regression
Here's another one. This one *looks* like you can simplify it further, but I haven't been able to. --begin-- require 'test/unit' module ModA def methodA $stderr.puts "It Works!" end end module ModB include ModA def methodB methodA end end module ModC include ModB def methodC methodB end end class DTest < Test::Unit::TestCase include ModC def testD methodC end end --end-- --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression
I'll give our "stuff" another go tomorrow... On Monday 27 February 2006 01:23 pm, Charles O Nutter wrote: > Fixed! The wrapper for includes, IncludedModuleWrapper, was never > updated when I fixed the module include ordering, so it was still > expecting superclasses to be included below it rather than above it. I > updated it to do things the correct way and it works right now. I also > added a test case based on yours below. > > On 2/26/06, David Corbin <[EMAIL PROTECTED]> wrote: > > Here's another one. This one *looks* like you can simplify it further, > > but I haven't been able to. > > > > --begin-- > > require 'test/unit' > > > > module ModA > > def methodA > > $stderr.puts "It Works!" > > end > > end > > > > module ModB > > include ModA > > > > def methodB > > methodA > > end > > end > > > > module ModC > > include ModB > > > > def methodC > > methodB > > end > > end > > > > class DTest < Test::Unit::TestCase > > > > include ModC > > > > def testD > > methodC > > end > > > > end > > > > > > --end-- > > > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com > > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression
Well, things are better, but still not right. I've getting numerous different failures now. I'll have to spend some time paring it down to a reasonable example of the different failures... David On Monday 27 February 2006 06:45 pm, David Corbin wrote: > I'll give our "stuff" another go tomorrow... > > On Monday 27 February 2006 01:23 pm, Charles O Nutter wrote: > > Fixed! The wrapper for includes, IncludedModuleWrapper, was never > > updated when I fixed the module include ordering, so it was still > > expecting superclasses to be included below it rather than above it. I > > updated it to do things the correct way and it works right now. I also > > added a test case based on yours below. > > > > On 2/26/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > Here's another one. This one *looks* like you can simplify it further, > > > but I haven't been able to. > > > > > > --begin-- > > > require 'test/unit' > > > > > > module ModA > > > def methodA > > > $stderr.puts "It Works!" > > > end > > > end > > > > > > module ModB > > > include ModA > > > > > > def methodB > > > methodA > > > end > > > end > > > > > > module ModC > > > include ModB > > > > > > def methodC > > > methodB > > > end > > > end > > > > > > class DTest < Test::Unit::TestCase > > > > > > include ModC > > > > > > def testD > > > methodC > > > end > > > > > > end > > > > > > > > > --end-- > > > > > > > > > --- > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > language that extends applications into web and mobile media. Attend > > > the live webcast and join the prime developer group breaking into this > > > new coding territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=12164 > > >2 ___ > > > Jruby-devel mailing list > > > Jruby-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > -- > > Charles Oliver Nutter @ headius.blogspot.com > > JRuby Developer @ jruby.sourceforge.net > > Application Architect @ www.ventera.com > > > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression
On Tuesday 28 February 2006 10:39 am, Thomas E Enebo wrote: > Thanks for digging in DavidYou are a life saver and you definitely > raise our quality bar higher.. Glad to contribute. Wish I had more time, so this wasn't always at the last minute. > .Hopefully, we get enough coverage this > time around that the 0.8.3 cycle does not cause as many regressions. Heh. Right. Let's hope so, but both know this is a very complex beast. > > -Tom > > On Tue, 28 Feb 2006, David Corbin defenestrated me: > > Well, things are better, but still not right. I've getting numerous > > different failures now. I'll have to spend some time paring it down to a > > reasonable example of the different failures... --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] IRB is now working
Great work. I notice (in your blog) that the prompt is "verbose, and javaish". We should fix this too. I'll take a look at 'jirb' this weekend. David On Friday 03 March 2006 12:47 am, Charles O Nutter wrote: > So yeah, I posted to my blog about this today, but we have finally > gotten IRB working in JRuby. Today I put in one last fix, fired it up, > and whammo, it was working. It currently has to run in --single-irb > mode, but I've been able to test most of the typical IRB nuggets and > they all work just great. I'm really excited about this. Check out my > blog at http://headius.blogspot.com if you're interested in more > details and a bunch of examples. > > I just used IRB a moment ago to test another bugfix I'm working on. Tres > sweet. > > Anyway, I added "jirb" and "jirb.bat" to jruby/bin so if jruby.sh and > jruby.bat are in your path, so shall be the JRuby-aware irb startup > scripts. It's a good day to be alive. > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com > > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression
Here's another one that's similar to the last one. Note, the include "Test::Unit::Assertions" is key to creating the problem. The net-effect of this is that the Assertions have been included twice, since they're already in TestCase. I'm not able to access CVS, so this is not quite a test against HEAD. David ---cut--- require 'test/unit' module BarMessage class Message def initialize key end end end module BarMod include BarMessage include Test::Unit::Assertions end class FooTest < Test::Unit::TestCase include BarMod def testFoo Message.new('foo') end end ---end--- Not sure what's going on, by emails from my office seem to be "really slow" to get to their list. On Tuesday 28 February 2006 02:50 am, David Corbin wrote: > Well, things are better, but still not right. I've getting numerous > different failures now. I'll have to spend some time paring it down to a > reasonable example of the different failures... > > David > > On Monday 27 February 2006 06:45 pm, David Corbin wrote: > > I'll give our "stuff" another go tomorrow... > > > > On Monday 27 February 2006 01:23 pm, Charles O Nutter wrote: > > > Fixed! The wrapper for includes, IncludedModuleWrapper, was never > > > updated when I fixed the module include ordering, so it was still > > > expecting superclasses to be included below it rather than above it. I > > > updated it to do things the correct way and it works right now. I also > > > added a test case based on yours below. > > > > > > On 2/26/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > > Here's another one. This one *looks* like you can simplify it > > > > further, but I haven't been able to. > > > > > > > > --begin-- > > > > require 'test/unit' > > > > > > > > module ModA > > > > def methodA > > > > $stderr.puts "It Works!" > > > > end > > > > end > > > > > > > > module ModB > > > > include ModA > > > > > > > > def methodB > > > > methodA > > > > end > > > > end > > > > > > > > module ModC > > > > include ModB > > > > > > > > def methodC > > > > methodB > > > > end > > > > end > > > > > > > > class DTest < Test::Unit::TestCase > > > > > > > > include ModC > > > > > > > > def testD > > > > methodC > > > > end > > > > > > > > end > > > > > > > > > > > > --end-- > > > > > > > > > > > > --- > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > > language that extends applications into web and mobile media. Attend > > > > the live webcast and join the prime developer group breaking into > > > > this new coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121 > > > >64 2 ___ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > -- > > > Charles Oliver Nutter @ headius.blogspot.com > > > JRuby Developer @ jruby.sourceforge.net > > > Application Architect @ www.ventera.com > > > > > > > > > --- > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > language that extends applications into web and mobile media. Attend > > > the live webcast and join the prime developer group breaking into this > > > new coding territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > > ___ > > > Jruby-devel mailing list > > > Jruby-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group brea
Re: [Jruby-devel] another Head regression
Here's another one that's similar to the last one. Note, the include "Test::Unit::Assertions" is key to creating the problem. The net-effect of this is that the Assertions have been included twice, since they're already in TestCase. I'm not able to access CVS, so this is not quite a test against HEAD. David ---cut--- require 'test/unit' module BarMessage class Message def initialize key end end end module BarMod include BarMessage include Test::Unit::Assertions end class FooTest < Test::Unit::TestCase include BarMod def testFoo Message.new('foo') end end ---end--- On Tuesday 28 February 2006 02:50, David Corbin wrote: > Well, things are better, but still not right. I've getting numerous > different failures now. I'll have to spend some time paring it down to a > reasonable example of the different failures... > > David > > On Monday 27 February 2006 06:45 pm, David Corbin wrote: > > I'll give our "stuff" another go tomorrow... > > > > On Monday 27 February 2006 01:23 pm, Charles O Nutter wrote: > > > Fixed! The wrapper for includes, IncludedModuleWrapper, was never > > > updated when I fixed the module include ordering, so it was still > > > expecting superclasses to be included below it rather than above it. I > > > updated it to do things the correct way and it works right now. I also > > > added a test case based on yours below. > > > > > > On 2/26/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > > Here's another one. This one *looks* like you can simplify it > > > > further, but I haven't been able to. > > > > > > > > --begin-- > > > > require 'test/unit' > > > > > > > > module ModA > > > > def methodA > > > > $stderr.puts "It Works!" > > > > end > > > > end > > > > > > > > module ModB > > > > include ModA > > > > > > > > def methodB > > > > methodA > > > > end > > > > end > > > > > > > > module ModC > > > > include ModB > > > > > > > > def methodC > > > > methodB > > > > end > > > > end > > > > > > > > class DTest < Test::Unit::TestCase > > > > > > > > include ModC > > > > > > > > def testD > > > > methodC > > > > end > > > > > > > > end > > > > > > > > > > > > --end-- > > > > > > > > > > > > --- > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > > language that extends applications into web and mobile media. Attend > > > > the live webcast and join the prime developer group breaking into > > > > this new coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121 > > > >64 2 ___ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > -- > > > Charles Oliver Nutter @ headius.blogspot.com > > > JRuby Developer @ jruby.sourceforge.net > > > Application Architect @ www.ventera.com > > > > > > > > > --- > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > language that extends applications into web and mobile media. Attend > > > the live webcast and join the prime developer group breaking into this > > > new coding territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 > > > ___ > > > Jruby-devel mailing list > > > Jruby-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&am
Re: [Jruby-devel] another Head regression
Here's #4. --cut--- require 'rexml/document' XML = <<-EOF EOF doc = REXML::Document.new(XML) REXML::XPath.match(doc, "/foo//@uri").first.to_s --end-- On Monday 06 March 2006 12:46 pm, Charles O Nutter wrote: > Fixity fixed! When I modified the includeModule code to recursively > include other modules (allowing modules to be searched in correct > order), there was one other change I should have made. When including > before, it iteratively included all parents. In addition to screwing > up the order, this allowed it to check each incoming module against > already-included modules to avoid an overlap. > > The code that prevented double-included remained after the recursive > version, even though it was now inappropriate to check all of a > module's includes for overlap. As a result, when class FooTest tried > to include BarMod, BarMod's includes were searched for overlaps. > Finding Assertions in BarMod and knowing that FooTest had already > included Assertions, the include was canceled, and BarMod was not > included into FooTest. > > The fix was to only check the immediate module for overlap, and not > all its includes (since they would be checked during the recursion). > Easy! > > This obviously could break a number of things, since anywhere a module > was included from multiple places it would cause some of those places > to be busticated. > > Give this a try and let us know. It's in HEAD now. > > On 3/5/06, David Corbin <[EMAIL PROTECTED]> wrote: > > Here's another one that's similar to the last one. Note, the include > > "Test::Unit::Assertions" is key to creating the problem. The net-effect > > of this is that the Assertions have been included twice, since they're > > already in TestCase. > > > > I'm not able to access CVS, so this is not quite a test against HEAD. > > > > David > > ---cut--- > > require 'test/unit' > > > > module BarMessage > > class Message > > def initialize key > > end > > end > > end > > module BarMod > > include BarMessage > > include Test::Unit::Assertions > > end > > > > class FooTest < Test::Unit::TestCase > > > > include BarMod > > > > def testFoo > > Message.new('foo') > > end > > > > end > > ---end--- > > > > Not sure what's going on, by emails from my office seem to be "really > > slow" to get to their list. > > > > On Tuesday 28 February 2006 02:50 am, David Corbin wrote: > > > Well, things are better, but still not right. I've getting numerous > > > different failures now. I'll have to spend some time paring it down to > > > a reasonable example of the different failures... > > > > > > David > > > > > > On Monday 27 February 2006 06:45 pm, David Corbin wrote: > > > > I'll give our "stuff" another go tomorrow... > > > > > > > > On Monday 27 February 2006 01:23 pm, Charles O Nutter wrote: > > > > > Fixed! The wrapper for includes, IncludedModuleWrapper, was never > > > > > updated when I fixed the module include ordering, so it was still > > > > > expecting superclasses to be included below it rather than above > > > > > it. I updated it to do things the correct way and it works right > > > > > now. I also added a test case based on yours below. > > > > > > > > > > On 2/26/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > > > > Here's another one. This one *looks* like you can simplify it > > > > > > further, but I haven't been able to. > > > > > > > > > > > > --begin-- > > > > > > require 'test/unit' > > > > > > > > > > > > module ModA > > > > > > def methodA > > > > > > $stderr.puts "It Works!" > > > > > > end > > > > > > end > > > > > > > > > > > > module ModB > > > > > > include ModA > > > > > > > > > > > > def methodB > > > > > > methodA > > > > > > end > > > > > > end > > > > > > > > > > > > module ModC > > > > > > include ModB > > > > > > > > > > > > def methodC > > > > > >
Re: [Jruby-devel] another Head regression(#5)
---begin--- XML = 'xyz' def fooMethod XML = foo.bar end ---end--- this one is for Tom. A NullPointerException while parsing this. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression
On Monday 06 March 2006 09:00 pm, Charles O Nutter wrote: > That one doesn't blow up for me...should it? > It does for me: /usr/lib/ruby/1.8/rexml/xpath_parser.rb:20:in `method_missing': undefined method `dclone' for "":String (NoMethodError) from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:20:in `dclone' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:481:in `each' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:21:in `dclone' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:481:in `d_o_s' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:469:in `each_index' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:485:in `d_o_s' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:469:in `descendant_or_self' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:314:in `expr' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:125:in `match' from /usr/lib/ruby/1.8/rexml/xpath_parser.rb:56:in `parse' from /usr/lib/ruby/1.8/rexml/xpath.rb:63:in `match' from /home/dcorbin/eclipse/primary/RubyTest/src/acceptanceTests/AcceptanceTestSuite.rb:10 I suppose it's possible that it's not a *true* regression, and that it's a failure introduce by the Ruby 1.8.4 std libraries. Which version of Ruby do you use? David > On 3/6/06, David Corbin <[EMAIL PROTECTED]> wrote: > > Here's #4. > > --cut--- > > require 'rexml/document' > > > > XML = <<-EOF > > > > > > > > EOF > > > > doc = REXML::Document.new(XML) > > REXML::XPath.match(doc, "/foo//@uri").first.to_s > > --end-- > > > > On Monday 06 March 2006 12:46 pm, Charles O Nutter wrote: > > > Fixity fixed! When I modified the includeModule code to recursively > > > include other modules (allowing modules to be searched in correct > > > order), there was one other change I should have made. When including > > > before, it iteratively included all parents. In addition to screwing > > > up the order, this allowed it to check each incoming module against > > > already-included modules to avoid an overlap. > > > > > > The code that prevented double-included remained after the recursive > > > version, even though it was now inappropriate to check all of a > > > module's includes for overlap. As a result, when class FooTest tried > > > to include BarMod, BarMod's includes were searched for overlaps. > > > Finding Assertions in BarMod and knowing that FooTest had already > > > included Assertions, the include was canceled, and BarMod was not > > > included into FooTest. > > > > > > The fix was to only check the immediate module for overlap, and not > > > all its includes (since they would be checked during the recursion). > > > Easy! > > > > > > This obviously could break a number of things, since anywhere a module > > > was included from multiple places it would cause some of those places > > > to be busticated. > > > > > > Give this a try and let us know. It's in HEAD now. > > > > > > On 3/5/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > > Here's another one that's similar to the last one. Note, the include > > > > "Test::Unit::Assertions" is key to creating the problem. The > > > > net-effect of this is that the Assertions have been included twice, > > > > since they're already in TestCase. > > > > > > > > I'm not able to access CVS, so this is not quite a test against HEAD. > > > > > > > > David > > > > ---cut--- > > > > require 'test/unit' > > > > > > > > module BarMessage > > > > class Message > > > > def initialize key > > > > end > > > > end > > > > end > > > > module BarMod > > > > include BarMessage > > > > include Test::Unit::Assertions > > > > end > > > > > > > > class FooTest < Test::Unit::TestCase > > > > > > > > include BarMod > > > > > > > > def testFoo > > > > Message.new('foo') > > > > end > > > > > > > > end > > > > ---end--- > > > > > > > > Not sure what's going on, by emails from my office seem to be "really > > > > slow" to get to their list. > > > > > > > > On Tuesday 28 February 2006 02:50 a
Re: [Jruby-devel] another Head regression (#6)
I'm getting this after my java code throws an exception. I haven't got it boiled down to Ia simple demo, but I thought this might help in the mean time NativeException: java.lang.NullPointerException: null org.jruby.evaluator.EvaluationState$ExceptionRethrower.execute(EvaluationState.java:249) org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:211) org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:335) org.jruby.RubyObject.eval(RubyObject.java:427) org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:109) org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51) org.jruby.RubyObject.callMethod(RubyObject.java:351) org.jruby.RubyObject.callMethod(RubyObject.java:314) org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:1028) --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
Digging in the problem is that the EvaluateState#currentException is null, and the "ExceptionRethrower" tries to throw a null. I've not been able to produce a small test-case yet, so I was wonderinf if anyone could give some pointers about what to look at in the debugger. I'm trying to call a java class, but I think somewhere in the JRuby code an exception is happening, that is being "mis-handled" by the new interpeter. Tips? David On Tuesday 07 March 2006 08:42 am, David Corbin wrote: > I'm getting this after my java code throws an exception. I haven't got it > boiled down to Ia simple demo, but I thought this might help in the mean > time > > > NativeException: java.lang.NullPointerException: null > > org.jruby.evaluator.EvaluationState$ExceptionRethrower.execute(EvaluationSt >ate.java:249) > org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:211) > org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:335) > org.jruby.RubyObject.eval(RubyObject.java:427) > > org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod >.java:109) > > org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java: >51) org.jruby.RubyObject.callMethod(RubyObject.java:351) > org.jruby.RubyObject.callMethod(RubyObject.java:314) > > org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisito >r.java:1028) > > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
On Wednesday 08 March 2006 14:18, Charles O Nutter wrote: > Ok, it looks like some of the "branch-only" changes I started making to the > evaluator are also required for HEAD to work 100% with the new exception > subsystem. I merged the appropriate changes to HEAD. I would wager this > will fix your issue, but give it a quick run and let me know what you see. How much did I win in the wager? :) Sorry, no joy. Same problem. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
I understand. I've narrowed it down some, but have a ways to go. Unfortunately, so far, my working is dependent on our Java code, which makes it that much more annoying. David On Thursday 09 March 2006 12:21, Charles O Nutter wrote: > Ok ok, I'll check again. If you can narrow it down at all it would be > great...I believe I can fix it for you, but having a test case to commit > would make me feel better about it. > > On 3/8/06, David Corbin <[EMAIL PROTECTED]> wrote: > > On Wednesday 08 March 2006 14:18, Charles O Nutter wrote: > > > Ok, it looks like some of the "branch-only" changes I started making to > > > > the > > > > > evaluator are also required for HEAD to work 100% with the new > > > exception subsystem. I merged the appropriate changes to HEAD. I would > > > wager this will fix your issue, but give it a quick run and let me know > > > what you > > > > see. > > > > > > How much did I win in the wager? :) Sorry, no joy. Same problem. > > > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
On Thursday 09 March 2006 02:09 pm, Charles O Nutter wrote: > The fix is in! I am still working on designing good test cases for it, > however. Let me know how it goes. Still no luck. And unfortunately, I can't work on it this weekend due to networking problems. But I'll continue to try to shrink my test case to something shippable on Monday. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
Finally! This shows the NPE. Sorry it took so long, but I had a lot of Java code in the original failure, and it took me a while to figure out what was really causing the issue. cut require 'test/unit' class ContextStack def inContext &proc begin proc.call ensure end end end class Foo def foo "" end end class FooTest < Test::Unit::TestCase def testX ContextStack.new.inContext do return Foo.new.foo end end end ---end > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
On Monday 13 March 2006 10:22 pm, Charles O Nutter wrote: > Try it now; it was almost the same issue that was causing some other > flow-control stuff to blow up. I believe it is occurring when you have a > return cross frame boundaries, as with a block call that does return and > runs in a different EvalState. I'm continuing to isolate it to a specific > case that doesn't require Test::Unit to fail. > > Your case runs now. We're getting there! > That fixes that problem for sure. I'm having other problems, but I'm not sure if it's JRuby or something internal in our application/configuration. I'll let you know when I do. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#6)
On Tuesday 14 March 2006 08:04 pm, Charles O Nutter wrote: Still not there yet. I've got a java proxy that is getting an "Wrong # of arguments". I'll dig into it David > Ok, I'll be watching for it! > > On 3/14/06, David Corbin <[EMAIL PROTECTED]> wrote: > > On Monday 13 March 2006 10:22 pm, Charles O Nutter wrote: > > > Try it now; it was almost the same issue that was causing some other > > > flow-control stuff to blow up. I believe it is occurring when you have > > > a return cross frame boundaries, as with a block call that does return > > > and runs in a different EvalState. I'm continuing to isolate it to a > > > > specific > > > > > case that doesn't require Test::Unit to fail. > > > > > > Your case runs now. We're getting there! > > > > That fixes that problem for sure. I'm having other problems, but I'm not > > sure > > if it's JRuby or something internal in our > > application/configuration. I'll > > let you know when I do. > > > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#7)
The arity for list.add is coming from ModA#add, without any real reason to be. I'm not sure if this is "special case for the 'default' object", or not. ---cut require 'java' include_class 'java.util.ArrayList' module ModA def add a,b,c end end include ModB list = ArrayList.new list.add "Foo" ---end--- On Tuesday 14 March 2006 03:04 pm, David Corbin wrote: > On Tuesday 14 March 2006 08:04 pm, Charles O Nutter wrote: > Still not there yet. I've got a java proxy that is getting an "Wrong # of > arguments". I'll dig into it > > David > > > Ok, I'll be watching for it! > > > > On 3/14/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > On Monday 13 March 2006 10:22 pm, Charles O Nutter wrote: > > > > Try it now; it was almost the same issue that was causing some other > > > > flow-control stuff to blow up. I believe it is occurring when you > > > > have a return cross frame boundaries, as with a block call that does > > > > return and runs in a different EvalState. I'm continuing to isolate > > > > it to a > > > > > > specific > > > > > > > case that doesn't require Test::Unit to fail. > > > > > > > > Your case runs now. We're getting there! > > > > > > That fixes that problem for sure. I'm having other problems, but I'm > > > not sure > > > if it's JRuby or something internal in our > > > application/configuration. I'll > > > let you know when I do. > > > > > > > > > --- > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > language > > > that extends applications into web and mobile media. Attend the live > > > webcast > > > and join the prime developer group breaking into this new coding > > > territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=12164 > > >2 ___ > > > Jruby-devel mailing list > > > Jruby-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > -- > > Charles Oliver Nutter @ headius.blogspot.com > > JRuby Developer @ jruby.sourceforge.net > > Application Architect @ www.ventera.com > > --- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#7)
First, I notice that there is a "typo" in the demo. The "include ModB" should be "include ModA". On Tuesday 14 March 2006 11:56 pm, Charles O Nutter wrote: > Ahh, here's my theory, based on a quick look. > > It's because of the lazy loading of methods!!! Huzzah! I knew this one > would come around to bite us eventually. I can easily believe that one. > Because we rely on method_missing to trigger Java methods to be loaded, if > Object has a method that we want to use in an included Java class, we'll > never reach it. We will search all the way to the top of the JavaProxy's > hierarchy and eventually find the real method before we ever trigger > method_missing. But why should defining a mehod "at the outside a class", affect the Object class? > > SO. We need to fix it. The solution Tom and I kicked around was to take the > list of methods from the Java class and load some faux methods into the > list, so that "methods" returns an appropriate list and so that we don't > depend on method_missing tricks. When we do actually call those methods, > we'll prime them then. > > Until then I'm not sure there's an easy fix... > > - Charlie > > On 3/14/06, David Corbin <[EMAIL PROTECTED]> wrote: > > The arity for list.add is coming from ModA#add, without any real reason > > to be. > > I'm not sure if this is "special case for the 'default' object", or not. > > > > ---cut > > require 'java' > > include_class 'java.util.ArrayList' > > > > module ModA > > > > def add a,b,c > > end > > > > end > > > > include ModB > > > > list = ArrayList.new > > list.add "Foo" > > ---end--- > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#7)
On Wednesday 15 March 2006 08:58 am, Thomas E Enebo wrote: > Ding! Any object that already exists in Ruby will get called > before a method_missing. I am thinking about options. Yours is > probably a pretty decent one... I still don't understand. Can you respond to my earlier response? > > David, change your code to use << instead of add for right now to > keep moving through any regressions... I'll see if I can adapt. The original problem is not with ArrayList. > > -Tom > > On Tue, 14 Mar 2006, Charles O Nutter defenestrated me: > >Ahh, here's my theory, based on a quick look. > >It's because of the lazy loading of methods!!! Huzzah! I knew this one > >would come around to bite us eventually. > >Because we rely on method_missing to trigger Java methods to be > >loaded, if Object has a method that we want to use in an included Java > >class, we'll never reach it. We will search all the way to the top of > >the JavaProxy's hierarchy and eventually find the real method before > >we ever trigger method_missing. > >SO. We need to fix it. The solution Tom and I kicked around was to > >take the list of methods from the Java class and load some faux > >methods into the list, so that "methods" returns an appropriate list > >and so that we don't depend on method_missing tricks. When we do > > actually call those methods, we'll prime them then. > >Until then I'm not sure there's an easy fix... > >- Charlie > > > >On 3/14/06, David Corbin <[EMAIL PROTECTED] > wrote: > > > > The arity for list.add is coming from ModA#add, without any real > > reason to be. > > I'm not sure if this is "special case for the 'default' object", or > > not. > > ---cut > > require 'java' > > include_class 'java.util.ArrayList' > > module ModA > > def add a,b,c > > end > > end > > include ModB > > list = ArrayList.new > > list.add "Foo" > > ---end--- > > > >-- > >Charles Oliver Nutter @ [2]headius.blogspot.com > >JRuby Developer @ [3]jruby.sourceforge.net > >Application Architect @ [4]www.ventera.com > > > > References > > > >1. mailto:[EMAIL PROTECTED] > >2. http://headius.blogspot.com/ > >3. http://jruby.sourceforge.net/ > >4. http://www.ventera.com/ --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] another Head regression (#7)
On Wednesday 15 March 2006 09:02 pm, Charles O Nutter wrote: > including a module at the root level actually ends up including it into > Object, because all code runs within the context of a global Object > instance. Are you describing jruby , or ruby (or both). It makes no sense to me why including something in one instance would be like including it the class that instance was created from. > Calling include at root is actually like calling the private > "include" method on the Object class, adding that module's capabilities to > all Object instances. My book (pickaxe2) doesn't list "include" as a method for Object. > Until there's a fix, you can work around it in a couple ways: > > 1. Don't define an add that gets included into the root object > 2. Call add before including that add definition (which will cause it to be > loaded for ArrayList and cached) > 3. Don't use add to add to the ArrayList I'm concerned that this behavior is going to impact a measurable chunk of our code. It certainly reveals a 'danger' in programming at the 'root' level that I've never heard about before (independent of the current bug). David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Head regression #8
This might be related to #7, but I don't think so. (And yes, it is stupid, but it's much more complex than this in our code). ---cut--- require 'java' include_class 'java.util.ArrayList' include_class 'java.util.ArrayList' ---end--- --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Head regression #8
On Thursday 16 March 2006 11:17 am, Charles O Nutter wrote: > I suppose it's good to see that we're entering the realm not of > regressions, but of oddities in new functionality. This issue and the > lazy-loading methods issue are not really regressions in my mind, but newer > areas needing improvement or refinement. I think it's a valid distinction > between that and breaking interpreter-level items that should continue to > work today, since these areas are still someone fluid. They're not interpreter regressions, but they are regressions. Code that works in 082 doesn't work now. That's a regression. Now, it's possible for some regression (like the one below), an argument can be made that the original behavior was faulty, but that's definately not the case in #7. > > Long story short, I think it's a positive sign that we've gotten through > many interpreter issues. Thanks so much for your help, David. > > On 3/16/06, Thomas E Enebo <[EMAIL PROTECTED]> wrote: > > On Thu, 16 Mar 2006, David Corbin defenestrated me: > > > This might be related to #7, but I don't think so. (And yes, it is > > > > stupid, but > > > > > it's much more complex than this in our code). > > > > > > ---cut--- > > > require 'java' > > > include_class 'java.util.ArrayList' > > > include_class 'java.util.ArrayList' > > > ---end--- > > > > I made a change about a month ago, which now throws an exception > > (do not have jruby source handy right now and I cannot quite rememebr > > what I called it) when you include_class on top of a constant which > > already exists. > > > > This change was in reaction to someone doing an include class when > > there was already a constant of the same name. We need to provide some > > way to know include_class failed. > > > > I think I can fix this bug by seeing if we already defined the same proxy > > and then see if the conflict is that proxy...In which case, we should > > just return without error since it is just carrying out the spirit > > of the function: ArrayList is included into the current scope. I will > > fix this evening. > > > > -Tom > > > > -- > > + http://www.tc.umn.edu/~enebo + mailto:[EMAIL PROTECTED] + > > > > | Thomas E Enebo, Protagonist | "Luck favors the prepared| > > | > > | | mind." -Louis Pasteur | > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the live > > webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Some small ActiveRecord progress
On Monday 20 March 2006 03:16 pm, Charles O Nutter wrote: > It's been a to-do for a while to get Date and friends mapping to > equivalents in Ruby automatically. It will require some changes to the Java > integration layer, but I don't expect those changes will be very difficult. > I'll take a look at it and see if anything can be done quickly to get it > basically working. It would be really nice if we could make this user-extensible. That is, something where any user can provide automatic Java-Ruby-Java mappings. David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Regression #7 Fixed. No more lazy eval
On Monday 20 March 2006 10:22 am, Thomas E Enebo wrote: > I committed a fix this morning which fixes this example. > > The fix removes lazy evaluation and moves instance method creation > for proxies into Java (from Ruby in javasupport.rb). In fact instance > method calls to java from ruby are now even a bit faster than before.. > > Let me know if this causes problems. It does. I'm getting this where we try to call printWriter.print() from jruby. NoMethodError: private method 'print' called for [EMAIL PROTECTED]:PrintWriter I *think* it should be calling the String version, and I cannot find a private print method on PrintWriter. I'll work on creating the "simple test case". In the mean time, can you point me at where the new java code is? It might be easier to understand the problem in the debugger. David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Regression #7 Fixed. No more lazy eval
Who new it would be so simple :) On Monday 20 March 2006 09:00 pm, Thomas E Enebo wrote: > I am on it: > > require 'java' > > include_class 'java.io.PrintWriter' > include_class 'java.lang.System' > > p = PrintWriter.new(System.out) > p.print "HEH" > p.close > > On Mon, 20 Mar 2006, David Corbin defenestrated me: > > On Monday 20 March 2006 10:22 am, Thomas E Enebo wrote: > > > I committed a fix this morning which fixes this example. > > > > > > The fix removes lazy evaluation and moves instance method creation > > > for proxies into Java (from Ruby in javasupport.rb). In fact instance > > > method calls to java from ruby are now even a bit faster than before.. > > > > > > Let me know if this causes problems. > > > > It does. I'm getting this where we try to call printWriter.print() from > > jruby. > > > > NoMethodError: private method 'print' called for > > [EMAIL PROTECTED]:PrintWriter > > > > > > I *think* it should be calling the String version, and I cannot find a > > private print method on PrintWriter. I'll work on creating the "simple > > test case". > > > > In the mean time, can you point me at where the new java code is? It > > might be easier to understand the problem in the debugger. > > > > David > > > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Regression #7 Fixed. No more lazy eval
That works well where I had spotted the breakage. I'm now check our other bits and parts. On Monday 20 March 2006 21:09, Thomas E Enebo wrote: > Fixed. At least this case is. I was not overriding any Ruby functions > which already existed. 'print' was one of those. I removed this > restriction with exception of 'class', which java support reqiures. > I suspect there is more and will continue looking, but I wanted to > give you something to work with. > > -Tom > > On Mon, 20 Mar 2006, David Corbin defenestrated me: > > Who new it would be so simple :) > > > > On Monday 20 March 2006 09:00 pm, Thomas E Enebo wrote: > > > I am on it: > > > > > > require 'java' > > > > > > include_class 'java.io.PrintWriter' > > > include_class 'java.lang.System' > > > > > > p = PrintWriter.new(System.out) > > > p.print "HEH" > > > p.close > > > > > > On Mon, 20 Mar 2006, David Corbin defenestrated me: > > > > On Monday 20 March 2006 10:22 am, Thomas E Enebo wrote: > > > > > I committed a fix this morning which fixes this example. > > > > > > > > > > The fix removes lazy evaluation and moves instance method creation > > > > > for proxies into Java (from Ruby in javasupport.rb). In fact > > > > > instance method calls to java from ruby are now even a bit faster > > > > > than before.. > > > > > > > > > > Let me know if this causes problems. > > > > > > > > It does. I'm getting this where we try to call printWriter.print() > > > > from jruby. > > > > > > > > NoMethodError: private method 'print' called for > > > > [EMAIL PROTECTED]:PrintWriter > > > > > > > > > > > > I *think* it should be calling the String version, and I cannot find > > > > a private print method on PrintWriter. I'll work on creating the > > > > "simple test case". > > > > > > > > In the mean time, can you point me at where the new java code is? It > > > > might be easier to understand the problem in the debugger. > > > > > > > > David > > > > > > > > > > > > --- > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > > language that extends applications into web and mobile media. Attend > > > > the live webcast and join the prime developer group breaking into > > > > this new coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121 > > > >642 ___ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Regression #7 Fixed. No more lazy eval
Well, we're backed to where I'd gotten to before, which is going to take some time to narrow down. I'm getting an "not found exception" out of some of our java code, that I'm not getting with 0.8.2. David On Monday 20 March 2006 21:09, Thomas E Enebo wrote: > Fixed. At least this case is. I was not overriding any Ruby functions > which already existed. 'print' was one of those. I removed this > restriction with exception of 'class', which java support reqiures. > I suspect there is more and will continue looking, but I wanted to > give you something to work with. > > -Tom > > On Mon, 20 Mar 2006, David Corbin defenestrated me: > > Who new it would be so simple :) > > > > On Monday 20 March 2006 09:00 pm, Thomas E Enebo wrote: > > > I am on it: > > > > > > require 'java' > > > > > > include_class 'java.io.PrintWriter' > > > include_class 'java.lang.System' > > > > > > p = PrintWriter.new(System.out) > > > p.print "HEH" > > > p.close > > > > > > On Mon, 20 Mar 2006, David Corbin defenestrated me: > > > > On Monday 20 March 2006 10:22 am, Thomas E Enebo wrote: > > > > > I committed a fix this morning which fixes this example. > > > > > > > > > > The fix removes lazy evaluation and moves instance method creation > > > > > for proxies into Java (from Ruby in javasupport.rb). In fact > > > > > instance method calls to java from ruby are now even a bit faster > > > > > than before.. > > > > > > > > > > Let me know if this causes problems. > > > > > > > > It does. I'm getting this where we try to call printWriter.print() > > > > from jruby. > > > > > > > > NoMethodError: private method 'print' called for > > > > [EMAIL PROTECTED]:PrintWriter > > > > > > > > > > > > I *think* it should be calling the String version, and I cannot find > > > > a private print method on PrintWriter. I'll work on creating the > > > > "simple test case". > > > > > > > > In the mean time, can you point me at where the new java code is? It > > > > might be easier to understand the problem in the debugger. > > > > > > > > David > > > > > > > > > > > > --- > > > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > > > language that extends applications into web and mobile media. Attend > > > > the live webcast and join the prime developer group breaking into > > > > this new coding territory! > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121 > > > >642 ___ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > --- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language that extends applications into web and mobile media. Attend the > > live webcast and join the prime developer group breaking into this new > > coding territory! > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > > ___ > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] socket status
On Wednesday 22 March 2006 23:32, Evan wrote: > What's the status of socket support? > > My poking indicates that although "accept" appears to work, send and recv > (and anything else I try) don't. I've been trying to hack some support in > via stuff like > > OldTCPSocket = TCPSocket > > class NewTCPSocket < OldTCPSocket > ... > end > > TCPSocket = NewTCPSocket > > but this seems to blow up. Rather than continue on this route, I'd like > to try and just build support into JRuby provided that doesn't turn out to > be a bigger pain than rewriting all the Ruby stuff I already wrote in Java > (I doubt it will be). I'd like to know: > > 1) What exactly is the state of sockets in JRuby? We have 'basic' TCP socket support. The automated tests contain an 'echo server' and a client that tests it. I don't believe anyone is really using it thought. > 2) What is the delta from where they need to be? I'm not sure I understand the question. Only a small portion of the Socket family is implemented, and even those are only implemented at the 'barest' level. > 3) What seem to be the issues holding back full support? Lack of man power. You may have solved this one. > 4) Does any later (CVS) version make a difference? Not to my knowledge. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] socket status
On Thursday 23 March 2006 10:25 am, Evan wrote: > David Corbin wrote: > >> 2) What is the delta from where they need to be? > > > > I'm not sure I understand the question. Only a small portion of the > > Socket > > family is implemented, and even those are only implemented at the > > 'barest' > > level. > > I guess I mean, does anyone have some list of what exactly "barest" and > "basic" and all these other vague terms mean? ;-) What works and what > doesn't? Well, pretty much that I wrote just enough to create the echo client and server. Look at socket.rb, and RubyBasicSocket.java --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Regressions? Nah.
I'm pleased to say things are looking very good. I'm getting two failures in our test suite, but I'm reasonably sure they're not regressions. One is a legitmate failure, I think, and the other is long-standing intermittent problem that seems to be threading related. So, go release something. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Regressions? Nah!
As near as I can tell, HEAD now works as well as 082 does. I've got a couple of tests that are failing, but they're equal-opportunity failures. :) Sorry it's taken so long to work through everything... David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Profiler opinions
I probably did. It's QUITE flexible, but out of the box it can provide an nice tree of calls with execution times and hot-spot identification. FYI, our biggest performance complaint *appears* to be startup. It's quiet possible that it's because we include so many java classes, but we have what appear to be really slow startup times. David On Wednesday 29 March 2006 09:48, Thomas E Enebo wrote: > This seems to be the right time to mutate the thread into a favorite > java profiler threadAnyone have any recommendations? I think last > time David mentioned JRat. > > -Tom > > On Tue, 28 Mar 2006, Charles O Nutter defenestrated me: > >This is an experimental patch to remove the creation of > >"InstructionBundle" objects for each node encountered in the AST. The > >InstructionBundle was originally added to support the iterative > >algorithm for handling branch events like next, break, rescue, and so > >on. An InstructionBundle is created each time a node is encountered, > >and holds the node, the instruction to execute against it, and a > >number of flags indicating whether this node should be the target of > >one of those interpreter events. > >The idea behind this patch was to start narrowing down exactly where > >our biggest interpreter performance issues come from. One possible > >cause for things running a bit slower in recent months was obviously > >the creation of all those InstructionBundle objects. However, removing > >their creation and going back to two separate stacks for instructions > >and nodes (instruction contexts) actually caused it to slow down more > >than it sped up...by about 10% in one algorithm I ran. This would > >indicate that the extra overhead of managing a second stack for every > >Ruby method invocation is a greater cost than creating many > >InstructionBundle instances managed in a single stack. > >This continues to point toward the benefits a compiler or a > >"pre-evaluator" would give us. By either compiling the Ruby code down > >to static lists of instructions we would eliminate the current > >"instruction stack" model completely, lowering the per-node overhead > >in the interpreter. We would also have the option of potentially > >combining multiple instructions into a single interpreter loop. > >Anyway, the patch is attached for your edification. It's not something > >I'm planning to commit, but it is demonstrative anyway. > >-- > >Charles Oliver Nutter @ [1]headius.blogspot.com > >JRuby Developer @ [2]jruby.sourceforge.net > >Application Architect @ [3]www.ventera.com > > > > References > > > >1. http://headius.blogspot.com/ > >2. http://jruby.sourceforge.net/ > >3. http://www.ventera.com/ --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] java Date to ruby Time
On Thursday 30 March 2006 12:58 am, Charles O Nutter wrote: > Tom and I talked about this a bit...I think it's perfectly valid to have > Date and ruby's Time be interchangeable. I can appreciate the > backward-compatibility thing, but there's not so many people out there > using this that making Date methods return Time would be a serious problem > (methinks). However, maybe it would make sense to have a subclass of Time > that still exposes Date's methods? > I'd definately be concerned about converting java.util.Date to Time automatically. If you wanted to do anything, it should be to DateTime. I *think* Time is 'kind of deprecated'. David --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] ruby_case for Java camelCase methods
On Wednesday 29 March 2006 03:15 pm, Charles O Nutter wrote: > I just committed a change to create additional ruby_case aliases for all > camelCase Java methods in included classes. For example, an included > java.lang.String (as JString) has methods like: > > sub_sequence > compare_to > equals_ignore_case > > We may or may not want to provide a flag to turn this off, since it does > add quite a few aliases. I think it looks pretty cool though, and I'd like > to have it on by default. How nice is: > What's the performance impact? --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] ruby_case for Java camelCase methods
On Thursday 30 March 2006 10:21 pm, Charles O Nutter wrote: > That's a possibility. > > def method_missing(sym, *args) > camel = to_camel(sym) > super unless respond_to?(camel) return super unless respond_to? camel > send(camel, *args) > end > I'm sure that's what you meant :) > On 3/30/06, Nick Sieger <[EMAIL PROTECTED]> wrote: > > On 3/30/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > > > I personally think the ruby_case makes Java integrated code look a lot > > > nicer, but I am bothered by the namespace pollution and by having two > > > of so many methods. > > > > A new thought (to me), don't know if this has been mentioned before -- > > could you add some special logic in a method_missing method somewhere > > along the method resolution chain that does this lazily, so the methods > > don't appear there at all? > > > > /Nick > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] ruby_case for Java camelCase methods
On Friday 31 March 2006 08:52 am, Thomas E Enebo wrote: >This is prone to the same problem that took us away > from lazy instantiation in the first place. Namely, if > you define a method in Kernel or Object matching the camel > case name that you are hoping will be lazily created, then > method_missing will not be called. > >Perhaps, this is ok for camel case methods? David, you ran > into this...Perhaps you can weigh in about likelyhood? If there > can be no such sollision, then this solution will not work... I think you're right. lazy initialization is frought with peril :) I'd suggest, that it be disabled by default, but overridable by a "global" variable applied at time of 'include_class'.Then, we can have file 'ruby_cased_java' that looks liked this: Java.enable_ruby_case require 'java' Voila. The best of all worlds. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] RubyGems stopgap.
On Friday 07 April 2006 10:55 am, Thomas E Enebo wrote: > On Fri, 07 Apr 2006, Ola Bini defenestrated me: > > Hi. > > > > Well, as you can see, this part has nothing to do with Syck either. It is > > not the speed of YAML-parsing that's the issue (at least not yet... =), > > but the speed of this particular > > code fragment. > > Bummer, I was hoping the each in yaml_spec was one culprit. I realize > now that it is just a gigantic mult-line string. No yaml at all. > > > So, to recap, the method reduce_spec is in remote_installer.rb in > > RubyGems, and it's not a YAML-issue yet. Probably it's a combination of > > many regexps and substitutions that's doing it slow. > > Those regexps should not be slow in Java since they are all rooted > to front and back of line. Also they all are only working on a single > line at a time. Though I think we are constantly reconstructing them > and maybe that is the slow part? We are, and it might be the problem. Java compilation of regexs is not well optimized. But even worse, for every regex we get, we apply about 6 more regexes to 'translate' it to Java be compatible. I did once try to cache them, but it's not as simple to get right as you'd like it to be. > I will take a look this weekend a bit too just to get a handle on this. > This particular code seems pretty isolated (as in it could make a good > test case on a large data set -- good benchmark perhaps?). > > -Tom --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] RubyGems stopgap.
On Friday 07 April 2006 10:59 am, Ola Bini wrote: > Hi > > Yes, that's actually a pretty good idea, to use it as a test case. > Just try to scramble up a few K's or M's of data and run through it and see > what happens. > > As for creating it all the time... Are we using Java regexps for this, btw? > If we are, then it would make sense to compile a regexp the first time you > find it and and then save > it around somewhere for a while. Probably a space-limited Map with the > regexp-string itself as key would probably do it. Not a very big thing to > implement either, probably. As I mentioned in my reply to Tom, I looked at cache them. What I want to do, is cache in the regex node, but you have to watch out for regex's that do variable substitution. And you have to be sure to include the 'flags' in the 'regex identity'. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby.org
On Thursday 13 April 2006 08:21 pm, John Wells wrote: > Charles O Nutter wrote: > > Btw, curious...where are you going if not SF? I don't think it's final, but Codehaus was suggested. Tom and Charles are so busying working to get ready for JavaOne any real work towards it (like evaluations) have been postponed. And thanks for the donation --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby on Rails
On Thursday 13 April 2006 07:06 pm, Charles O Nutter wrote: > I know that perhaps some of you don't read my blog (for shame!) so I'll > make a little announcement here too. > > Last night I successfully got Rails to handle a request running under > JRuby. There were only a few additional fixes and tweaks necessary to make > it work, along with wiring it up as a CGI (yeah, it's slow). Could we implement a FastCGI 'server' in Java or Ruby? Should we? --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Nightly build/test cycle for JRuby
On Saturday 22 April 2006 02:58 am, Charles O Nutter wrote: > I have set up a nightly build to run on headius.com. I will also be > arranging a nightly test cycle to be emailed...somewhere. At any rate, > it's currently running 'ant test' and the results are in the nightly > build archive as build-output.log. I'll add in rubicon and other test > suites later on, as time permits. > > This is being built and tested in Linux using a 1.4 JDK. If you see > any errors about X libraries missing, just ignore them. I'm fixing > that as we speak, hopefully to be complete tonight (I removed X from > my server, because nothing used it...then along comes JRuby exercising > AWT classes...). > > http://www.headius.com/jruby/nightly > > Ignore anything that's there right now, I'm still testing a bit. The > nightly should run around 3-4AM every night when the CVS update > happens. If you're interested, I've actually got one that runs "all the time" (every time it sees a CVS commit), but only mails on failures. I've just been mailing it to myself, but I could send it somewhere else if you want. OTOH, I don't expect to do any more with it (than 'ant test'), so if you see an expansion the what it does, I could send you my script. David --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Making connections at JavaOne
On Thursday 04 May 2006 07:31 pm, Charles O Nutter wrote: > As most of you know, Tom and I will be presenting at JavaOne in San > Francisco May 16-19. We would really like to hook up with users and > contributors to JRuby, so I'm kicking off this discussion by posting a > little bit about my schedule...hopefully we'll all be able to work > something out. Sorry, I won't be attending (no real desire, other than to meet you folks). But if you're ever in Atlanta... --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] include_class
On Wednesday 10 May 2006 02:38 am, Charles O Nutter wrote: > Can anyone remember why we decided to use include_class instead of > import? It suddenly occurred to me today that import is both shorter > and more precise, since we're really importing a Java class into the > current namespace. I suspect it was to be kind of like 'include Module', but I don't know why we would want that. > > There's probably a snowball's chance in hell we'll change it now, of > course We could make import an alias for it. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] include_class
On Wednesday 10 May 2006 07:14 am, David Corbin wrote: > On Wednesday 10 May 2006 02:38 am, Charles O Nutter wrote: > > Can anyone remember why we decided to use include_class instead of > > import? It suddenly occurred to me today that import is both shorter > > and more precise, since we're really importing a Java class into the > > current namespace. > > I suspect it was to be kind of like 'include Module', but I don't know why > we would want that. > On further reflection, it may be because we cannot import a package ("foo.*") and thus creates less confusion. > > There's probably a snowball's chance in hell we'll change it now, of > > course > > We could make import an alias for it. > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] include_class
That example looks very flawed to me. It's assuming there's local file system involved in holding the classes. Not only that, but you can have classes in one package available from multiple different class loaders On Wednesday 10 May 2006 06:47 pm, Charles O Nutter wrote: > As an aside, here's an interesting code snippit for loading all > classes in a given package. Basically, you just ask the classloader > for a resource for the package, and then iterate over contents. Might > be a good way to make import "foo.*" work as expected. > > http://www.jonpeck.com/forum/viewtopic.php?t=88 > > On 5/10/06, Charles O Nutter <[EMAIL PROTECTED]> wrote: > > I wouldn't mind an alias, and we could probably jury-rig import > > "foo.*" to work at least as poorly as the old method of including a > > package. > > > > - Charlie > > > > On 5/10/06, David Corbin <[EMAIL PROTECTED]> wrote: > > > On Wednesday 10 May 2006 07:14 am, David Corbin wrote: > > > > On Wednesday 10 May 2006 02:38 am, Charles O Nutter wrote: > > > > > Can anyone remember why we decided to use include_class instead of > > > > > import? It suddenly occurred to me today that import is both > > > > > shorter and more precise, since we're really importing a Java class > > > > > into the current namespace. > > > > > > > > I suspect it was to be kind of like 'include Module', but I don't > > > > know why we would want that. > > > > > > On further reflection, it may be because we cannot import a package > > > ("foo.*") and thus creates less confusion. > > > > > > > > There's probably a snowball's chance in hell we'll change it now, > > > > > of course > > > > > > > > We could make import an alias for it. > > > > > > > > > > > > --- > > > > Using Tomcat but need to do more? Need to support web services, > > > > security? Get stuff done quickly with pre-integrated technology to > > > > make your job easier Download IBM WebSphere Application Server > > > > v.1.0.1 based on Apache Geronimo > > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121 > > > >642 ___ > > > > Jruby-devel mailing list > > > > Jruby-devel@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > > > --- > > > Using Tomcat but need to do more? Need to support web services, > > > security? Get stuff done quickly with pre-integrated technology to make > > > your job easier Download IBM WebSphere Application Server v.1.0.1 based > > > on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=12164 > > >2 ___ > > > Jruby-devel mailing list > > > Jruby-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > > > -- > > Charles Oliver Nutter @ headius.blogspot.com > > JRuby Developer @ jruby.sourceforge.net > > Application Architect @ www.ventera.com > > -- > Charles Oliver Nutter @ headius.blogspot.com > JRuby Developer @ jruby.sourceforge.net > Application Architect @ www.ventera.com > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] include_class
On Wednesday 10 May 2006 08:26 pm, Charles O Nutter wrote: > - In most cases, there will be a local filesystem involved 1) I have definate plans to try an applet 2) classes in jar files are not in the local filesystem. > - We only look in one classloader even now, which should delegate to > classloaders higher in the hierarchy anyway. Plus, we only need names > of classes. > - We can fall back on the "slow" way if anything fails. 'slow' way? --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] JRuby from BSF, and exceptions
I'm playing around with call JRuby from Java. I've noticed that when the Ruby code has an exception (sucn as a syntax problem) I get a BSFException, but none of the "useful stuff" I normally get when I run a ruby script. Is this intentional? David --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Dynamic proxies, Java interfaces, "initialize"
I ran across a problem today. I was implementing a Java interface in Ruby. The interface had an method "initialize(...)" defined in it. This creates a quandry, of course, because the initialize method is used during construction. I'm not sure what the right solution for JRuby is. Ideas? I suspect you could write a ruby implementation that implmented initialize "smartly enough" to double as a ruby initialize, and as the interface implementation but you shouldn't have to. David --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] JRuby applet
Well, I've spent a good chunk of the day working with JRuby applets. It is easy to write an applet, and have it run in the AppletViewer. Running it in a real browser, however, hits security problems one after another. I had to add 6 system properties to the java.policy file (4 for JRuby, 2 for BSF, though maybe 1 of the BSF one is a JRuby bug), and then it started trying to look at the disk to load files. It seems to me there would be a fair amount of work to JRuby to make it run in a secure sandbox. I *assume* that if the applet were signed, it would continue running OK, but I I'm going to sign it, I'll just do a WebStart application. Anyway, just an update. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby applet
On Monday 22 May 2006 09:41 am, Thomas E Enebo wrote: > Thanks for the update...David, can you mail me the properties? "org.apache.bsf.serverLaunch"* "user.dir" "user.home" "java.class.path"* "jruby.lib" "jruby.home" The two marked with a * are in BSF, but the java.class.path could probably be fixed in JRubyEngine. > Also send any any other thoughts on security/configuration of the runtime. > I am going to try and rearrange some stuff to make the BSF/JSR223 > integration a bit easier on the brain. > I haven't really figured out how it ought to work/configured. Perhaps the code could "test" and see if it appears to be in a "sandbox", and then switch itself to a "secure mode". Not even sure what that means. David --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby applet
On Monday 22 May 2006 05:14 pm, Charles O Nutter wrote: > This comes back again to JRuby's startup being modelled on a > filesystem-based distribution when we really want to move toward a binary > jarred up distribution. It's a bit silly to have to set filesystem paths to > use JRuby, and it would be impossible once we start deploying multiple > independent JRuby instances in the same VM. > Yep. > For the applet stuff, as Tom mentions in another post, it may be easier to > go directly to our upcoming "all-in-one" class that provides BSF-less > embedding. Then any security issues introduced by BSF can be avoided. I'm all for that. I even tried "calling Main#main" to invoke it, and that could be made to work fine for an applet, I think if we fixed "all the other problems". David --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Questions about some AST nodes
On Wednesday 24 May 2006 06:45 pm, Mirko Stocker wrote: > Hi! > > I'm currently implementing a visitor which creates sourcecode from the > jruby-ast (we need this for our refactorings). I've implemented most nodes, > but I'm stuck with some. I would be very glad if someone could give me some > code with the following nodes: > I'm not *sure* of any of these, but you can give them a try. These are just educated guesses. > - MatchNode print 'x' if (/pattern/) > - Match2Node print 'x' if $y =~ /pattern/ > - OpAsgnNode "x = 7" > - OptNNode > - PostExeNode > - SplatNode a,b,c = *[1,2,3] > - SValueNode > - ArgsCatNode > - BlockPassNode > - DSymbolNode > - FlipNode > > Thanks > > Mirko Stocker --- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Questions about some AST nodes
On Thursday 25 May 2006 02:49 am, Mirko Stocker wrote: > On Thursday 25 May 2006 02:03, David Corbin wrote: > > > > - OpAsgnNode > > > > "x = 7" > How about oneo of these: "x += 7" or "class Foo; X=7; end" > And this is just a LocalAsgnNode. > > > > - SplatNode > > > > a,b,c = *[1,2,3] > > That worked, too. And one more thing about ruby I didn't know.. > > So that leaves me with those nodes: > > - Match2Node > - OpAsgnNode > - OptNNode > - PostExeNode > - SValueNode > - ArgsCatNode > - BlockPassNode > - DSymbolNode > - FlipNode I'm sure Tom will chime with answer for the others. --- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] ObjectSpace, again.
On Monday 05 June 2006 11:20 am, Charles O Nutter wrote: > I tried a very naive version of this, just to demonstrate the performance > gain. > > First off, if you never call cleanup during add, the size of the list will > quickly grow to consume all memory. The objects the weakrefs point at will > be collected, but the weakrefs themselves will not. Some cleanup is > necessary during add, though it could probably only be run every N calls to > add. > > If we ignore this, however, and increase the heap size to allow the list to > grow, the performance gains moving to a list are still nowhere near > eliminating OS entirely: > > For test: 1_000_000.times { } > normal run, 512M, OS as-is: 17.3s > sync ArrayList, 512M, OS saves weakrefs: 16.4s > sync ArrayList, 512M, OS saves objects: 22s > unsync ArrayList, 512M, OS saves weakrefs: 16.2s > unsync ArrayList pre-alloc 5M entries, 512M, OS saves weakrefs: 14.8s > normal run, 512M, OS disabled: 7s > > So what does this tell us? > > First off, maintaining any sort of list is bad...ArrayList or otherwise. > Even if we throw out things we need, like cleaning the list, and make the > list huge to begin with, it's still over 2x as slow as not maintaining a > list in the first place. > > Second, maintaining weakrefs is actually cheaper than maintaining the > objects, probably because most of them are immediately collected in this > contrived example. > > Third, it seems that nothing we do is going to reduce the cost of OS to an > unnoticeable level. Look at it logically: > > Object Creation Without OS: > - instantiate object (cheap) > - set RubyClass (cheap if we reference builtin classes directly) > - set tainting (cheap) > > Object Creation With OS: > - all of the above plus... > - list maintenance (potentially very expensive for a set or growing > arraylist) > - hashing (if using a set) (very expensive) > - WeakRef creation (cheap) > - cleanup (expensive) > > Even if we eliminate cleanup and hashing, we're still instantiating twice > as many objects and maintaining a list. > > At this point, my vote goes to OS being disabled by default, with a flag to > turn it on. I'm sorry, but you must be joking. It's an integral part of what Ruby is. Just about everyone that uses Test::Unit uses it for sure (even if they don't kinow it), and who knows what other packages need it. I don't have any specific answers for how to improve performance, but I don't think a switch is good one. ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby Ast
> My only other thought is you could create a visitor which walks all the > ASTs you want to potentially refactor and then build your own set of > references so you can ask a question like getAstNode(ClassName, MethodName) > or getAstNode(ClassName) and get back what you want. My first example > shows that this may not give back exactly what you want since you may > have multiple versions of intialize for a particular class (as an example). And RDT actually does this already. Take a look at SymbolIndex (I think that's what it's called. He simply (hah:) needs to marry AST information into the index. > > -Tom ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Some collections additions.
On Wednesday 14 June 2006 09:07, Ola Bini wrote: > Hi, > > I've spent some time today using JRuby to inspect data I get back from > EJB's, and I soon got mad about having to use get(0) or iterator.next to > get at elements. > > So, the attached patch makes it possible to use [] and []= for Maps and > Lists, and makes <<, + and - available for all Collection's. For me, this > makes Java integration MUCH more useable. > > Regards > Ola Bini I thought we already had this support, as well as them being Enumerables ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] A strategy for Mongrel.
What am I missing? HTTP parsing is trivial? I can't imagine why generated code is need, or that it could be a signifcant factor in performance. On Monday 19 June 2006 04:00, Ola Bini wrote: > Hi, > > I've been peeking at Mongrel again, trying to figure out the best way to do > this. There are 3 parts of the C library in http11: the ternary search > tree, the generated http parser and the C ruby-code to bind these together > into the classes Mongrel::HttpParser and Mongrel::URIClassifier. > Now, the TST is no problem to port, it's max 2 hours work. The same goes > for the C code for knitting everything together; not many hours work. The > problem has been the generated parser. I have examined the output from it, > and it's really not that advanced. Of course, a hand crafted parser might > work, but on the other hand we can actually use Zed's Ragel-definitions and > a BNF-to-Java tool to create a good parser based on that information. This > seems like the right way to go for me. I won't have any time to do it the > next week, though, so if someone has any free time, please go ahead! =) > > Regards > Ola Bini > > > > > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] A strategy for Mongrel.
On Monday 19 June 2006 07:24 am, Ola Bini wrote: > Actually, I'm not sure that performance is the big issue in HTTP parsing, > but google for a few interviews with Zed, and you will notice immediatly > that he talks much about the security in a parser generated from a formal > description instead of hand crafted code. According to him, it seems his > parser even stop some attacks that Apache HTTPD let's through... Well, that makes some sense, but I'd think that would not be a big issue in something like Ruby (as compared to C, land of buffer overruns). David ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Disrepency with lineendings.
On Monday 26 June 2006 08:37, Thomas E Enebo wrote: > I have been using Java5 mostly. I sometimes pop back and run with > Java 1.4.2 to make sure things still work but I haven't done that with > a rails app). I guess this could explain things pretty well. > > Unless we can find quick resolution, we may just say do not run > rails on webrick with anything less than Java5. > But don't forget, many appservers in the field are still behind the times, and require 1.4.x. For Rails, this might be important... David Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] id as a property
We have numerous objects that have a getId() method on them. in 0.8.2, foo.id and foo.getId were not the same (presumably because ruby's Object#id was already defined). In 0.8.3 they *are* the same. Was this an intentional change or an accidental one? David Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Codehaus Move: Subversion Import
On Monday 03 July 2006 17:58, Charles O Nutter wrote: Sourceforge isn't going to go away anytime soon, right? I think trunk would be fine. I'd consider keeping an archive copy of the CVS repository around anyway. > I'd like input from the peanut gallery. > > FYI, for those of you using Eclipse, I would strongly recommend the > Subversive SVN plugin over Subclipse; every time I've tried to use > Subclipse for anything nontrivial it blows up or just behaves terribly. > Subversive has only misbehaved once, and I haven't been able to reproduce > it. It also by default enforces and enhances the "standard" SVN layout of > /trunk, /branches, and /tags. I argued in vain with the Subclipse guys for > such a feature and they didn't see its merits. So be it. > I'll second the recomendation for Subversive over Subclipse. Neither is perfect, but Subversive seems more stable to me, and the community seems much better to me. > Subversive is available from polarion.com. Actually, I think i'ts polarion.org (though they're the same company). David Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Codehaus Move: Subversion Import
On Monday 03 July 2006 20:30, Charles O Nutter wrote: > On 7/3/06, David Corbin <[EMAIL PROTECTED]> wrote: > Sourceforge will always be there, as far as I understand it. We'll put > links all over to point at the new location, but the "pre-codehaus" JRuby > world will exist there, intact. Right. But I still think a copy of the tarball should be somewhere else. You never know if SourceForge might have some 'unexpected challenges". > So that's two votes for TRUNK only. > > I'll second the recomendation for Subversive over Subclipse. Neither is > > > perfect, but Subversive seems more stable to me, and the community seems > > much > > better to me. > > I don't know what's up with Subclipse. It's been around forever and they > don't seem to get it. Subversive is exactly what I tried to get the > Subclipse guys to do, but they seem intent on making a mediocre > general-purpose SVN client--rather than a really good Eclipse Team plugin. > That's very perceptive of you. I was actually told on the mailing list once that the real reason the plugin was being done was to have adequate support for integrating with refactoring. I asked about wanting some feature (not humongously difficult I suspect) and 'they' actually said that it was very unlikely, because it was easy enough to do in TortiseSVN. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] JRuby in Codehaus SVN
On Thursday 06 July 2006 19:54, Charles O Nutter wrote: > JRuby has been migrated to the Codehaus Subversion server. You can reach it > here: > > http://svn.codehaus.org/jruby > > We will no longer be committing to or patching against the SF.net CVS > repository. Maybe I'm blind, but I don't see where one register a userId for codehaus. David Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
[Jruby-devel] Speculate with me
We have a "whole bunch" (~75) of tests written in JRuby that test portions of our J2EE app which runs on JBoss and WebLogic (simultaneously). Most of these take the form of testing our ReST API. We get intermittent failures out of these. Nearly always, the failure seems to have to do with XML parsing (REXML). REXML failures tend to come in a one of several different ways. Two of the most common are an error saying you can only have one root node, or that some XPath is not present (even though it is). I've seen a few other REXML problems, but those are two I really remember. The frequency of failure seems to vary by machine. The machines that have the most problems seem to be our fastest (2.7Ghz) and hyper-threaded. On my 2 Ghz machine I see 1-3 with almost every test run. On one guy's 1.7 Ghz laptop, he rarely sees them. I generally have to run our whole suite to see the failures, but they guys with the fastest machines usually can get it with just one test case. I am *VERY* confident this not a problem in our app, but instead a problem in JRuby. I've reachd me tolerance for it and would like to find it. It is in 0.8.2, 0.8.3 and 0.9.0 (and may be more frequent in 0.9.0). Running the suite on my system takes over 10 minutes, and it fails in many different locations in different ways (and REXML is not simple to debug in Ruby, let alone in Java). So, the question is, what *might* be happening here to cause this? Is there a specific area of JRuby that I might want to look at. For sometime I've thought the hyperthreading indicated a synchronization problem. However, we do not have multiple JRuby threads going ( debugged with breakpoints on have Thread#start call). We are acting as a client to WebLogic and JBoss, and WebLogic does start up 10-15 threads, but none of that code *should* be affecting JRuby. But given the different frequencies where seeing it on non-hyper-threaded systems, I wonder if it is not some how related to 'pure speed". We have one place where we put in a sleep and that seems to reduce the frequency of failure in that specific location. I'm not sure how a speed could matter here, but it seems to be common problem. Please, share your thoughts with me. Ask all the questions you like. David Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me
On Friday 07 July 2006 05:33, Ola Bini wrote: > Hi David. > > These errors seem very much like the strange things seen sometime when > parsing the gemspec. (There was some mail about this last week on the > list), where it sometimes fails in VERY strange ways. To me it looks > like the error show up when JRuby are handling very much Ruby data at > the same time and somehow gets confused about the type and identity of > objects. > > I've seen this when parsing the gemspec with all three different YAML > systems JRuby has had and other people have seen it too. The typical > symptom is that the parsing ends with some error when it tries to apply > a method on something that is an array, or a string, but should be a > Gem-object. > Our failures are invariably about XML parsing, and there's no indication that it is getting "type confused". However, it very well may have to do with the overall volume of data (tests). > Regards > Ola Bini > > > We have a "whole bunch" (~75) of tests written in JRuby that test > > portions of > > our J2EE app which runs on JBoss and WebLogic (simultaneously). > > Most of > > these take the form of testing our ReST API. > > > > We get intermittent failures out of these. Nearly always, the > > failure seems > > to have to do with XML parsing (REXML). REXML failures tend to > > come in a one > > of several different ways. Two of the most common are an error > > saying you > > can only have one root node, or that some XPath is not present > > (even though > > it is). I've seen a few other REXML problems, but those are two I > > really > > remember. > > > > The frequency of failure seems to vary by machine. The machines > > that have the > > most problems seem to be our fastest (2.7Ghz) and hyper-threaded. > > On my 2 Ghz machine I see 1-3 with almost every test run. On one > > guy's 1.7 > > Ghz laptop, he rarely sees them. > > > > I generally have to run our whole suite to see the failures, but > > they guys > > with the fastest machines usually can get it with just one test case. > > > > I am *VERY* confident this not a problem in our app, but instead a > > problem in > > JRuby. I've reachd me tolerance for it and would like to find it. > > It is in > > 0.8.2, 0.8.3 and 0.9.0 (and may be more frequent in 0.9.0). > > > > Running the suite on my system takes over 10 minutes, and it fails > > in many > > different locations in different ways (and REXML is not simple to > > debug in > > Ruby, let alone in Java). So, the question is, what *might* be > > happening > > here to cause this? Is there a specific area of JRuby that I might > > want to > > look at. > > > > For sometime I've thought the hyperthreading indicated a > > synchronization > > problem. However, we do not have multiple JRuby threads going ( > > debugged > > with breakpoints on have Thread#start call). We are acting as a > > client to > > WebLogic and JBoss, and WebLogic does start up 10-15 threads, but > > none of > > that code *should* be affecting JRuby. > > > > But given the different frequencies where seeing it on non-hyper- > > threaded > > systems, I wonder if it is not some how related to 'pure speed". > > We have one > > place where we put in a sleep and that seems to reduce the > > frequency of > > failure in that specific location. I'm not sure how a speed could > > matter > > here, but it seems to be common problem. > > > > Please, share your thoughts with me. Ask all the questions you like. > > > > David > > > > Using Tomcat but need to do more? Need to support web services, > > security?Get stuff done quickly with pre-integrated technology to > > make your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > > Geronimohttp://sel.as- > > us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_ >__ > > > Jruby-devel mailing list > > Jruby-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jruby-devel > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Jruby-devel mailing list > Jruby-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jruby-devel Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me
On Friday 07 July 2006 11:18, Charles O Nutter wrote: > I can appreciate your frustration. > > It's very possible that one of the Ruby libraries involved IS actually > spinning up threads. For a long time we thought there was no threading > going on during gem installs; then we found that goofy timeout library that > spawns a thread for every 1024-byte read. It's possible that somewhere, for > some reason, one of the libraries being invoked uses some of Ruby's > "lightweight threads" to move the parsing process along. > In JRuby, aren't Ruby's lightweight threads really Java native threads? If so, then that is not the cause. I debugged it with a breakpoint on have call to Thread#start, and got no hits. AND, I watched the threads in the debug view. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me
On Friday 07 July 2006 11:39, Charles O Nutter wrote: > There does appear to be a bug with how variables accessed in threads are > scoped. It could be a threading issue or it could be a parsing issue; but > the following should print "1": > > a = nil > Thread.new { a = 1 } > p a You don't know that. It's possible the print statement is executed before the a=1 runs. To be sure, you'd need this: a = nil t= Thread.new { a = 1 } t.join p a Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me
On Friday 07 July 2006 12:02, Charles O Nutter wrote: > Well, keep in mind that there's also Thread.new, and if a class extends > Thread the methods may trace differently. > But that still invokes java.lang.Thread.start (which is what I meant abou the breakpoint). > The only other possibility I could think of is an issue with the JVM. Have > you compared JVM versions to see if you get the errors more or less often? > There have been a few peculiar bugs that appeared to be JVM-related under > 1.4. They have come and gone for some time; I have not been able to > reproduce them under either 1.4 or 1.5 recently. No, that's something I have not done, but will try this weekend. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Comparison of reflected versus direct invocation
> Anyone care to comment? I wouldn't mind speeding up Java-native method > invocations by a factor of ten, even if it did mean a bunch of extra > classes. We could even selectively "directify" methods, like do everything > in Kernel and Object and specific methods elsewhere. I wouldn't even worry about the number classes. Each class is going to be relatively small. It might be a nuisance from a JRuby coder's perspective, but I think the memory hit would be insignificant. David - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] An experiment in compilation
On Monday 10 July 2006 13:21, Charles O Nutter wrote: > On 7/10/06, Nick Sieger <[EMAIL PROTECTED]> wrote: > > It's a good bump, but like you say, still slow. Where do you suspect > > we're losing so much performance? String manipulation and unnecessary > > object creation? > > Aside from the gross overhead of interpretation (which we'll never be able > to eliminate without a compiler) it's most likely the high amount of > per-method object churn and dispatch logic. > > - Multiple transient collections allocated for every method hit Allocate? yikes. That's odd sounding. > - Lots of collection overhead Should some collections be arrays? \ - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me [test]
Well, I've got a pseudo test case for this. On my system, with JRuby 0.9.0 (well, technically it's HEAD from SourceForge), this fails on about 4 out of 5 executions. Of course, it fails differently each time. It has yet to fail in 68 executions with C Ruby. I encourage anyone that wants to look at this, to write a shell script that just runs it repeatedly. David ---cut--- require 'rexml/document' require 'test/unit' class ErraticRestTest < Test::Unit::TestCase TEST_XML = <<-EOF EOF def testErraticBehavior 1000.times{|count| document = REXML::Document.new(TEST_XML) raise "HACK[A#{count}]" if 1 != document.get_elements('/sites/[EMAIL PROTECTED]').size begin raise "HACK[C#{count}" if !REXML::XPath.match(document, '/sites/[EMAIL PROTECTED]/@href') rescue => e p e raise "HACK[B#{count}]" end } end end ---end--- - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] Speculate with me [test]
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 `testErraticBehavior' Yes, but I seem to get it more. Tell me a bit about your system. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] An experiment in compilation
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 bouncing back and forth between C and Java a lot the past > week...my nomenclature shows it. Well, it wasn't the terminology, it was the concept that there are multiple transient collections for every method call. (call being how I interpreted 'hit'). - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] pseudo-bytecode and more compiler discussion
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 one. It's not hard to do. It's very hard to do well (efficiently). - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] [Jruby-user] JRuby compiler
On Saturday 15 July 2006 18:06, Charles O Nutter wrote: > Unlike Java, where you have to spit out a whole class at once, Ruby really > just consists of "method bags". A given class is little more than pointers > to code that understand how to manipulate that class's instance's state and > call other methods. I love this view of Ruby. > The compiler I'm working on at present is a full-on Java bytecode compiler > using ASM. An AST visitor traverses the tree and generates Java bytecodes > for each type of node. The resulting code looks, in general, like what we > implement for builtin methods written in Java by hand. There will be a > large number of methods that should be 100% compilable by this compiler, > and by compiling they'll escape all the overhead of interpretation. > However, I don't yet have a good strategy for instantiating blocks, since > in Java no method's code can access the state of another method's code. > This compiler is also fairly dependent on the current method-call and > variable-scoping semantics, which are slated for redesign. Think anonymous classes. Of course, these are not REALLY accessing the state, but they create the illusion, and if they can do it, you can do it. David - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel
Re: [Jruby-devel] [Jruby-user] JRuby compiler
On Saturday 15 July 2006 23:01, Paul Hammant wrote: > Well this is a well understood rule with applet for sure (and some of > the J2EE containers / web containers). > > A sandboxed applet may not (its veto'd) create a classloader. All its > classes must come with it from the server. It was a speculative rule > to prevent hacking ( I guess ). Now the applet security model is > very good. One could assume a new rule for applets would be > perfectly kosher: > >Sandboxed applets may create classloaders, but the classes > contained therein are given the same rights as those that were > shipped from the web server - the sandbox rules The above two paragraphs seem contradictory to me. The first paragraph just tells me we would need server component to generate the classes for us. :) - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel