[MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-
 Enumerable#p_findall is a mistake of Enumerable#p_find_all.

 And p_find_all causes an error when following scripts are executed. This
 script described in README.rdoc.
 {{{
 $ cat p_find_all.rb
 require 'dispatch'

 (0..4).p_find_all { |i| i.odd?} # => {3, 1}
 }}}

 {{{
 $ macruby p_find_all.rb
 
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:44:in
 `p_each:': undefined local variable or method `size' for 0..4:Range
 (NameError)
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:85:in
 `p_find_all'
 from /Users/watson/tmp/p_find_all.rb:1:in `'
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by watson1...@…):

 p_map causes a similar error.
 {{{
 $ cat p_map.rb
 require 'dispatch'

 p (0..4).p_map { |i| 10**i } # => [1, 1000, 10, 100, 1]
 }}}

 {{{
 $ macruby p_map.rb
 
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:50:in
 `p_each_with_index:': undefined local variable or method `size' for
 0..4:Range (NameError)
 from
 
/Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:57:in
 `p_map'
 from /Users/watson/tmp/p_map.rb:1:in `'
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by ca...@…):

 As a workaround for now you can use {{{ Range#to_a }}} to convert it to an
 {{{ Array }}} before calling {{{ p_map }}}

 {{{
 $ cat p_map_to_a.rb
 require 'dispatch'

 p (0..4).to_a.p_map { |i| 10**i }
 }}}

 {{{
 $ macruby p_map_to_a.rb
 [1, 10, 100, 1000, 1]
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by watson1...@…):

 p_findall is written by explaining Enumerable#p_find in README.rdoc.

 And a execution result doesn't become it according to a explanation.

 {{{
 $ cat p_find.rb
 require 'dispatch'

 p (0..4).p_find { |i| i.odd?} # => 1
 }}}

 {{{
 $ macruby p_find.rb
 nil
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by watson1...@…):

 And a execution result of p_mapreduce doesn't become it according to a
 explanation.

 {{{
 $ cat p_mapreduce.rb
 require 'dispatch'

 p (0..4).p_mapreduce([], :concat) { |i| [10**i] } # => [1, 1000, 10, 100,
 1]
 }}}

 {{{
 $ macruby p_mapreduce.rb
 nil
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #376: The second 'pointer' of a double pointer type is ignored

2010-06-12 Thread MacRuby
#376: The second 'pointer' of a double pointer type is ignored
-+--
 Reporter:  m...@…   |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:   
Component:  MacRuby  |Keywords:   
-+--

Comment(by m...@…):

 I'm still unclear as to how one calls NewMusicPlayer in MacRuby.  I just
 reran the test code under MacRuby 4215 and a freshly created bridge
 support file via
 {{{
 gen_bridge_metadata -f /System/Library/Frameworks/AudioToolbox.framework
 -o AudioToolbox.bridgesupport
 }}}
 and got the same results.  If gen_bridge_metadata doesn't generate the
 information on how {OpaqueMusicPlayer} is defined, then do I need manually
 add it to the bridgesupport file?  If so, what text needs to be added so
 the pointer is properly recognized?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] MacRuby PrefPane

2010-06-12 Thread Michael Jackson
Looks great. Thanks again. I'll give it a shot this weekend.

--
Michael Jackson
http://mjijackson.com
@mjijackson



On Sat, Jun 12, 2010 at 12:55 AM, Matt Aimonetti
 wrote:
> I added to trunk the PrefPane template we worked on but I did take the time
> to update the nightly installer. In the meantime, please give:
> http://dl.dropbox.com/u/163257/MacRuby%20PrefPane%20Template.pkg  a try.
>
> Or you can clone the git repo and copy the template to your Xcode templates.
>
> Let me know if something doesn't work for you.
>
> - Matt
>
> On Fri, Jun 11, 2010 at 7:32 AM, Michael Jackson 
> wrote:
>>
>> Thank you! And don't worry about the delay for the World Cup. I'll be
>> glued to the TV as well, so I won't be getting much work done either.
>> ;)
>>
>> --
>> Michael Jackson
>> http://mjijackson.com
>> @mjijackson
>>
>>
>>
>> On Thu, Jun 10, 2010 at 11:33 PM, Matt Aimonetti
>>  wrote:
>> > Hi MJ,
>> >
>> > I'll try to get that done for you ASAP, but with the world cup starting
>> > tomorrow, ASAP might mean a few days from now ;)
>> >
>> > - Matt
>> >
>> >
>> > On Thu, Jun 10, 2010 at 5:22 PM, Michael Jackson 
>> > wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I've been trying to set up a preference pane in MacRuby this
>> >> afternoon, but I'm not sure the right way to go about it. In Cocoa
>> >> it's easy because there's a "preference pane bundle" project type in
>> >> the new project dialog box in Xcode. So what I did was I created a new
>> >> preference pane project in Cocoa and a new MacRuby app and then tried
>> >> to make the MacRuby app look as much like the Cocoa prefpane as I
>> >> could (by editing the Info.plist file, adding the
>> >> PreferencePanes.framework to the project, etc.)
>> >>
>> >> The one problem I have at this point (there are probably more than
>> >> one, but...) is that I don't have a prefpane bundle under my targets.
>> >> I just have the App, Unit Tests, Compile, and Embed targets. I don't
>> >> know what to do at this point. I have a feeling that there should be
>> >> an easier way to do all of this, but I don't know how.
>> >>
>> >> Any suggestions would be greatly appreciated. Perhaps someone has a
>> >> MacRuby prefpane bundle they're willing to share?
>> >>
>> >> Thanks,
>> >>
>> >> Michael
>> >>
>> >> --
>> >> Michael Jackson
>> >> http://mjijackson.com
>> >> @mjijackson
>> >> ___
>> >> MacRuby-devel mailing list
>> >> [email protected]
>> >> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> >
>> >
>> > ___
>> > MacRuby-devel mailing list
>> > [email protected]
>> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> >
>> >
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by ernest.prabha...@…):

 My apologies.  Alas, I'm on vacation for the next week. Feel free to patch
 it yourself if you have time, else I'll look at it when I get back.
 -- Ernie P.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #746: Net::HTTP assertion failed

2010-06-12 Thread MacRuby
#746: Net::HTTP assertion failed
-+--
 Reporter:  mattaimone...@…  |   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  blocker  |   Milestone:  MacRuby 0.7  
Component:  MacRuby  |Keywords:   
-+--
 {{{
 require 'net/http'
 require 'uri'

 url_string = "http://www.macruby.org/";
 url = URI.parse(url_string)
 feed_uri =  url.query ? "#{url.path}?#{url.query}" : url.path
 req = Net::HTTP.start(url.host, url.port) {|http| http.get(feed_uri) }
 puts req.body
 }}}

 output:
 {{{
 Assertion failed: (IS_BSTR(str)), function rb_bstr_length, file string.c,
 line 5948.
 Abort trap
 }}}

 backtrace:
 {{{
 Application Specific Information:
 objc[89184]: garbage collection is ON
 Assertion failed: (IS_BSTR(str)), function rb_bstr_length, file string.c,
 line 5948.


 Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
 0   libSystem.B.dylib   0x7fff858d0886 __kill + 10
 1   libSystem.B.dylib   0x7fff85970eae abort + 83
 2   libSystem.B.dylib   0x7fff8595def0
 __pthread_markcancel + 0
 3   libmacruby.dylib0x0001000cd871 rb_bstr_length
 + 97
 4   zlib.bundle 0x0001037183e9
 gzfile_read_more + 105
 5   zlib.bundle 0x000103718588 gzfile_read_all
 + 40
 6   zlib.bundle 0x00010371ac78
 rb_gzreader_read + 152
 7   libmacruby.dylib0x000100149439 rb_vm_dispatch
 + 6841
 8   http.rbo0x00010170787b vm_dispatch +
 491
 9   http.rbo0x00010171aec1
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope63 + 1585
 10  libmacruby.dylib0x00010014bf47
 rb_vm_yield_args + 1879
 11  http.rbo0x00010171dc4d
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope86 + 93
 12  libmacruby.dylib0x00010014bf63
 rb_vm_yield_args + 1907
 13  http.rbo0x00010172bc05
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope252 + 181
 14  libmacruby.dylib0x000100149355 rb_vm_dispatch
 + 6613
 15  http.rbo0x00010170787b vm_dispatch +
 491
 16  http.rbo0x00010171d930
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope85 + 1344
 17  libmacruby.dylib0x00010014937b rb_vm_dispatch
 + 6651
 18  http.rbo0x00010170787b vm_dispatch +
 491
 19  http.rbo0x00010171d087
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope83 + 1031
 20  libmacruby.dylib0x000100149355 rb_vm_dispatch
 + 6613
 21  http.rbo0x00010170787b vm_dispatch +
 491
 22  http.rbo0x00010171a2bb
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope61 + 939
 23  libmacruby.dylib0x00010014932c rb_vm_dispatch
 + 6572
 24  ??? 0x000100e7fb4d 0 + 4310170445
 25  ??? 0x000100e9864f 0 + 4310271567
 26  libmacruby.dylib0x00010014bf47
 rb_vm_yield_args + 1879
 27  http.rbo0x000101717ab8
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope37 + 456
 28  libmacruby.dylib0x000100149396 rb_vm_dispatch
 + 6678
 29  http.rbo0x00010170787b vm_dispatch +
 491
 30  http.rbo0x000101715fbf
 MREP_C93CBD3F4CFA4D1494649C026569930E_ruby_scope23 + 2239
 31  libmacruby.dylib0x000100149355 rb_vm_dispatch
 + 6613
 32  ??? 0x000100e7fb4d 0 + 4310170445
 33  ??? 0x000100e7f411 0 + 4310168593
 34  libmacruby.dylib0x000100156618 rb_vm_run + 488
 35  libmacruby.dylib0x000100049e90 ruby_run_node +
 80
 36  macruby 0x00010d28 main + 152
 37  macruby 0x00010c88 start + 52

 Thread 1:  Dispatch queue: com.apple.libdispatch-manager
 0   libSystem.B.dylib   0x7fff8589b4ea kevent + 10
 1   libSystem.B.dylib   0x7fff8589d3bd
 _dispatch_mgr_invoke + 154
 2   libSystem.B.dylib   0x7fff8589d094
 _dispatch_queue_invoke + 185
 3   libSystem.B.dylib   0x7fff8589cbbe
 _dispatch_worker_thread2 + 252
 4   libSystem.B.dylib   0x7fff8589c4e8
 _pthread_wqthread + 353
 5   libSystem.B.dylib   0x7fff8589c385 start

Re: [MacRuby-devel] [MacRuby] #745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And p_find_all causes an error.

2010-06-12 Thread MacRuby
#745: README.rdoc has mistake in "Enumerable#p_findall" on "lib/dispach". And
p_find_all causes an error.
--+-
 Reporter:  watson1...@…  |   Owner:  lsansone...@…
 Type:  defect|  Status:  new  
 Priority:  blocker   |   Milestone:   
Component:  MacRuby   |Keywords:   
--+-

Comment(by watson1...@…):

 I have not understood whether a explanation of "Caveat: Local Variables"
 is correct.

 {{{
 $ cat gcd.rb
 require 'dispatch'

 n = 0
 job = Dispatch::Job.new { n += 42 }
 job.join
 p n # => 0
 }}}

 {{{
 $ macruby gcd.rb
 42
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] macgem & macrake take so much time to start ??

2010-06-12 Thread niedhui
Hi
   I'm trying macrub & hotcocoa these days, and have a question, when i try 
macgem list  or macrake (after `hotcocoa hello`),it take so much time to get a 
response,it just hang there ,and after almost a minute i see the `Hello from 
HotCocoa` window

what's my problem ??

I'm using macruby 0.6 and SL 10.6.2
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel