Re: [MacRuby-devel] Getting a pointer to a boxed type

2010-12-01 Thread Laurent Sansonetti
Hi Mark, I think the following would work: value = valueOfAttribute attribute point_ptr = Pointer.new(CGPoint.type) AXValueGetValue( value, KAXValueCGPointType, point_ptr ) point = point_ptr[0] Basically, you want to pass a pointer to a CGPoint to the API. Laure

[MacRuby-devel] Getting a pointer to a boxed type

2010-12-01 Thread Mark Rada
Hi, With the recent closing of ticket #1002 I have been trying to take a bunch of Objective-C code and write it in MacRuby. One problem that I have run into is with the AXValueGetValue() function in AXValue.h. The last argument to the function is supposed to be the address of a structure to po

Re: [MacRuby-devel] Compile target

2010-12-01 Thread Laurent Sansonetti
Hi Robert, Sounds like a good enhancement, could you file a ticket? Laurent On Dec 1, 2010, at 11:15 AM, Robert Rice wrote: > Hi MacRuby devotees: > > Would it be possible to configure XCODE and macruby_deploy to produce the > compiled output in a separate folder and not delete the .rb source

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Jordan K. Hubbard
On Dec 1, 2010, at 3:50 PM, Laurent Sansonetti wrote: > Before: > > $ time /usr/local/bin/macruby -e "text=File.read('/tmp/foo.txt'); > freq=Hash.new(0); text.scan(/\w+/) {}" > > real 0m2.430s > user 0m1.628s > sys 0m1.030s > > After :) > > $ time ./miniruby -e "text=File.read('/tmp/foo.

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Laurent Sansonetti
Hi Yasu, It's committed to trunk, it should be available in tonight's nightly build, so feel free to grab it :) http://www.macruby.org/files/nightlies. It will also be in the upcoming 0.8 release. I see your ticket about the look-ahead regexp bug, I will have a look later today. Thanks for rep

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Yasu Imao
Hi Laurent, This is great! I think I read in the discussion of StringScanner performance about object allocation (though I didn't understand what exactly was happening behind the scene), so I guessed it was about 'using block' with regular expression match data. For a word frequency count f

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Laurent Sansonetti
I spoke too fast, having a second look I found that it was possible to make the Match strings point to a unique object. I committed this optimization in r4964 and verified that no regression is introduced. Before: $ time /usr/local/bin/macruby -e "text=File.read('/tmp/foo.txt'); freq=Hash.new(

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Laurent Sansonetti
Hi Yasu, I ran your tests in Shark. Tests 1 and 3 are significantly slower because #scan and #gsub are called with a block, which means MacRuby has to create a new Match object for every yield, to conform to the Ruby specs. Each Match object contains a copy of the original string. MacRuby has

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Laurent Sansonetti
On Dec 1, 2010, at 2:20 PM, Jordan K. Hubbard wrote: > > On Dec 1, 2010, at 2:15 PM, Laurent Sansonetti wrote: > >>> http://swtch.com/~rsc/regexp/regexp1.html >> >> MacRuby is using ICU. I'm not aware of ICU's internals, but I suspect the >> performance issue is probably elsewhere here, given

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Jordan K. Hubbard
On Dec 1, 2010, at 2:15 PM, Laurent Sansonetti wrote: >> http://swtch.com/~rsc/regexp/regexp1.html > > MacRuby is using ICU. I'm not aware of ICU's internals, but I suspect the > performance issue is probably elsewhere here, given the huge difference > against 1.8. It would be instructive to

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Laurent Sansonetti
Hi, On Dec 1, 2010, at 12:59 PM, Perry E. Metzger wrote: > On Thu, 2 Dec 2010 02:46:07 +0900 Yasu Imao > wrote: >> Hello, >> >> I'm rewriting an app for text analysis in MacRuby, which I >> originally wrote in RubyCocoa. But I encountered a serious >> performance issue in MacRuby, which is rel

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread Henry Maddocks
On 1/12/2010, at 10:45 PM, denny trebbin wrote: > I switched from Java to Ruby and thanks to MacRuby I tried Xcode but hell I > can understand how people are able to write code with Xcode ;-) > Anyways anything is better then SVN "Don't show me your tools, show me what you made with them"

Re: [MacRuby-devel] Regular expression related performance

2010-12-01 Thread Perry E. Metzger
On Thu, 2 Dec 2010 02:46:07 +0900 Yasu Imao wrote: > Hello, > > I'm rewriting an app for text analysis in MacRuby, which I > originally wrote in RubyCocoa. But I encountered a serious > performance issue in MacRuby, which is related to processing text > using regular expressions. Is MacRuby usi

[MacRuby-devel] Compile target

2010-12-01 Thread Robert Rice
Hi MacRuby devotees: Would it be possible to configure XCODE and macruby_deploy to produce the compiled output in a separate folder and not delete the .rb source files? The .rbo files should be given the same time stamp as the .rb file so that recompiling could be optimized to only the files th

[MacRuby-devel] Regular expression related performance

2010-12-01 Thread Yasu Imao
Hello, I'm rewriting an app for text analysis in MacRuby, which I originally wrote in RubyCocoa. But I encountered a serious performance issue in MacRuby, which is related to processing text using regular expressions. I'm wondering if this will be taken care of in the near future (or already

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread Matt Massicotte
The voice of reason - thanks Matt. Matt On Dec 1, 2010, at 7:29 AM, Matt Aimonetti wrote: > Come on people svn isn't that bad, most of us used it for years and might > still use it ;) > However, if you are a git addict, you have 3 options: > * use the github mirror (we'll do the svn patching o

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread Matt Aimonetti
Come on people svn isn't that bad, most of us used it for years and might still use it ;) However, if you are a git addict, you have 3 options: * use the github mirror (we'll do the svn patching ourselves) * use the macosforge git repo (same as github) * use gitsvn Also, while you are reflecting

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread Eloy Duran
If you’d prefer to work against the https://github.com/MacRuby/MacRuby mirror, then by all means please do. I'll take pull requests, and others will probably to, but it would be a good idea to send links to these requests in the IRC channel too, as I *think* the emails will go to a black hole. How

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread russell muetzelfeldt
> From: Caio Chassot > On 2010-12-01, at 07:45 , denny trebbin wrote: >> >> GitHub or BitBucket (I love Mercurial, its pretty much easier then Git, IMO) >> doesn't really matter but I think a switch to almost newer source control >> system will stop by the use of Xcode. Because Xcode is crappy

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread Caio Chassot
On 2010-12-01, at 07:45 , denny trebbin wrote: > > GitHub or BitBucket (I love Mercurial, its pretty much easier then Git, IMO) > doesn't really matter but I think a switch to almost newer source control > system will stop by the use of Xcode. Because Xcode is crappy and supports > not distribu

Re: [MacRuby-devel] converging for 1.0

2010-12-01 Thread denny trebbin
GitHub or BitBucket (I love Mercurial, its pretty much easier then Git, IMO) doesn't really matter but I think a switch to almost newer source control system will stop by the use of Xcode. Because Xcode is crappy and supports not distributed source control system.I switched from Java to Ruby and