Re: [MacRuby-devel] The "right" way to use gems

2009-04-17 Thread Guillaume BELLEGUIC
in a hotcocoa project i have unpack gem in a vendor/gems directory then i use them as simple library not as gems. i use this script to load them at boot time : Dir.glob(File.expand_path("#{NSBundle.mainBundle.resourcePath}/vendor/ gems/*", __FILE__)).each do |gem| $:.unshift File.join(gem,

[MacRuby-devel] The "right" way to use gems

2009-04-17 Thread Alex Vollmer
One question I have is what the proper expectations are for using Ruby gems within a Macruby application. For example, I wanted to use the HTTParty gem for some web service processing since it provides a nice, succinct interface. However the gem won't load in MacRuby because of an issue wit

Re: [MacRuby-devel] Questions about Threads

2009-04-17 Thread Laurent Sansonetti
Hi Alex, On Apr 17, 2009, at 8:27 PM, Alex Vollmer wrote: Hi folks, Could someone shed a little light on how threads work in MacRuby? For example, if I do this: Thread.new do 10.times do puts "Hi" sleep 2 end end Does this run as a NSThread instance? Also does the MacRuby runtime

Re: [MacRuby-devel] Mixing Objective-C and Ruby classes

2009-04-17 Thread Laurent Sansonetti
Hi Victor, On Apr 16, 2009, at 4:23 AM, macruby-de...@principia.info wrote: Hi, I'm new both to this list and to MacRuby. Let this message serve as an introduction. I have some questions that have not seen answered either in the docs or in the list archives. I have been known to miss t

[MacRuby-devel] Questions about Threads

2009-04-17 Thread Alex Vollmer
Hi folks, Could someone shed a little light on how threads work in MacRuby? For example, if I do this: Thread.new do 10.times do puts "Hi" sleep 2 end end Does this run as a NSThread instance? Also does the MacRuby runtime have the Global Interpreter Lock or are MacRuby threads

Re: [MacRuby-devel] strings to yaml

2009-04-17 Thread John Shea
Hi Eloy, I was doing: "#{field.stringValue}".to_yaml which in 6 months time i will be scratching my head wondering why - so your suggestions are very helpful - thanks! Cheers, J On Apr 17, 2009, at 15:31 , Eloy Duran wrote: Hey John, I think we'll need to move the to_yaml definition for

Re: [MacRuby-devel] strings to yaml

2009-04-17 Thread Eloy Duran
Hey John, I think we'll need to move the to_yaml definition for String into NSString in the MacRuby case. I tried to do that as an example [1], but it seems that NSString completely breaks after opening the class, but this is probably just a bug in 0.4: "--- foo\n" "--- !str:NSString foo\

[MacRuby-devel] strings to yaml

2009-04-17 Thread John Shea
Hello everyone, I notice that NSMutableString nicely turns into a plain string when you #to_yaml it. Thats great since plays nicely with other ruby code. NSString however becomes "!str:NSString" - is that by design? It would not matter to me except that #stringValue from NSTe

Re: [MacRuby-devel] Mixing Objective-C and Ruby classes

2009-04-17 Thread John Shea
Hello Victor, I see that there is not much action on the list at the moment - so I will reply - the heavyweights do eventually drop by - but they are very busy so it is a bit sporadic (unless its just my gmail playing up again). I haven't actually tried 2 and 3 on your list since I am try