[MacRuby-devel] wrapping iokit

2011-01-17 Thread Joel Reymont
Has anyone tried wrapping user-land IOKit, e.g. #include #include #include #include I'd love to use MacRuby to prototype user-land USB drivers. --- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ___ MacRuby-devel m

[MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Alan Skipp
Hi, Is there any way to inform an Objective-C class of the existence of a ruby class so that instances can be created in Objective-C code? Currently I am doing the following: [[MacRuby sharedRuntime] evaluateString:[NSString stringWithFormat:@"RubyClass.new('%@')", arg]]; If I'm adding quite a

Re: [MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Eloy Durán
After the Ruby code that defines the class has been evaled, you should be able to do the following: Class rubyClass = NSClassFromString(@"RubyClass"); id rubyObject = [[rubyClass alloc] init]; On Jan 17, 2011, at 2:05 PM, Alan Skipp wrote: > Hi, > Is there any way to inform an Objective-C class

Re: [MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Alan Skipp
Brilliant suggestion Eloy, much appreciated. There's a noticeable improvement in speed using this technique. In the method which added ruby objects to an array, 77% of the time was spent on initialising the objects, that's now down to 35%. Alan On 17 Jan 2011, at 13:32, Eloy Durán wrote: > Aft

Re: [MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Eloy Duran
You're welcome Alan :) Hmm, I wonder if this big impact is because of skipping evaling everytime, which iirc is the only thing that evaluateString does, or something else is happening... Have you also tried doing [rubyClass new] instead of alloc init? I thought they should do the same. On 17 j

[MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Matt Aimonetti
O'Reilly is running a special today and my MacRuby: Definitive Guide - Early Release - ebook (PDF, mobi & ePub) is for sale for only $15.99 with the following code: DDMRD http://oreil.ly/eij2QS The book is also available in HTML format for free. If you've enjoyed the free version, please consi

Re: [MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Alan Skipp
Hi Eloy, The way I'm initializing the ruby objects is with a custom class method as they must be intialized with arguments. For example, here is the macruby class method: def self.initWithPath(path, isActive:active) new(path, active) end Which means that in Objective-C I'm using the som

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Joel Reymont
Bought the book although I barely browsed the free HTML version. I figure it's a worthwhile investment, seeing how my livelihood depends on MacRuby now :-). On Jan 17, 2011, at 6:34 PM, Matt Aimonetti wrote: > O'Reilly is running a special today and my MacRuby: Definitive Guide - Early > Rele

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Matt Aimonetti
Thanks for your support. Let me know if you are stumbling upon things that you would like to see covered but are missing from the TOC. Also, what are you building with MacRuby? - Matt Sent from my iPhone On Jan 17, 2011, at 11:14, Joel Reymont wrote: > Bought the book although I barely brows

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Daniel Lopes
Awesome, I just bought my copy :) On 17/01/2011, at 17:54, Matt Aimonetti wrote: > Thanks for your support. Let me know if you are stumbling upon things that > you would like to see covered but are missing from the TOC. > > Also, what are you building with MacRuby? > > - Matt > > Sent from m

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Patrick Bennett
Sorry to hijack a bit, but since you're here Matt... :) Are there any plans to cover HotCocoa? Patrick On 1/17/2011 2:54 PM, Matt Aimonetti wrote: Thanks for your support. Let me know if you are stumbling upon things that you would like to see covered but are missing from the TOC. Also, wh

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Buddy Lindsey, Jr.
I bought my copy, and it was my first business expense, of my recently formed company. Now I can read it on my kindle too while I am away from my computer. Thanks. --- Buddy Lindsey http://www.buddylindsey.com http://www.twitter.com/buddylindsey On Mon, Jan 17, 2011 at 2:10 PM, Patrick Bennett

[MacRuby-devel] what are you building with macruby?

2011-01-17 Thread Joel Reymont
On Jan 17, 2011, at 7:54 PM, Matt Aimonetti wrote: > Also, what are you building with MacRuby? Since Matt asked... - A trading platform. - A protocol reverse-engineering interface to my USB hardware bus analyzer. - User-space interface for a consumer electronics device that uses MacFUSE provi

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Matt Aimonetti
Hey Patrick, unless someone picks up the project and actively work on it, I don't think I will cover it. HotCocoa is an interesting proof of concept and Rich Kilmer proved that there is a market for such a tool but unfortunately there is nobody willing to maintain the project and push it a bit f

Re: [MacRuby-devel] what are you building with macruby?

2011-01-17 Thread Matt Aimonetti
Wow this is awesome! We are working on redesigning the MacRuby website and I'd like to feature MacRuby apps on the homepage, so make sure to let us know when you release your apps. Anyone else building awesome MacRuby apps? Care to share? - Matt Sent from my iPhone On Jan 17, 2011, at 12:06,

Re: [MacRuby-devel] what are you building with macruby?

2011-01-17 Thread Buddy Lindsey, Jr.
I am working on translation software. Nothing as cool as NLP and CAT, but it will help you to manage what you are in the process of translating since it is a LOT of data at times to handle. For the moment that is it. Buddy --- Buddy Lindsey http://www.buddylindsey.com http://www.twitter.com/buddyl

[MacRuby-devel] IDE and TextEditor

2011-01-17 Thread Daniel Lopes
Hello everybody, I'm spending more and more time with macruby but I'm not very happy with XCode yet. The IDE is pretty good but I didn't found a good theme that colorizes Ruby syntax in the right way. I don't consider TextMate and Vim because for frameworks like Cocoa I think autocomplete and i

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Patrick Bennett
Ok, makes sense. I wasn't aware that HotCocoa was basically a 'stale' project. On 1/17/2011 3:16 PM, Matt Aimonetti wrote: Hey Patrick, unless someone picks up the project and actively work on it, I don't think I will cover it. HotCocoa is an interesting proof of concept and Rich Kilmer prove

Re: [MacRuby-devel] what are you building with macruby?

2011-01-17 Thread Daniel Lopes
I'm working on Taks Manager that we plan to release in alpha in 1 or 2 months. When we finish I will send an email here. On 17/01/2011, at 18:19, Matt Aimonetti wrote: > Wow this is awesome! > We are working on redesigning the MacRuby website and I'd like to feature > MacRuby apps on the homepa

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Robert Love
I'm old fashioned--I've already ordered the paper version and am awaiting shipping. Am I the last person who still likes printed books? On Jan 17, 2011, at 12:34 PM, Matt Aimonetti wrote: > O'Reilly is running a special today and my MacRuby: Definitive Guide - Early > Release - ebook (PDF,

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread denny trebbin
Hi, no you are not the last "offline" reader. i like to get some paper in my hands too. and paper is hdd crash aware ;-) --- Robert Love schrieb am Mo, 17.1.2011: Von: Robert Love Betreff: Re: [MacRuby-devel] MacRuby Book discount An: "MacRuby development discussions." Datum: Montag, 17. Janua

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Matt Aimonetti
BTW if you want to pre order the print version Amazon sells it for the cheapest price I saw so far: http://amzn.to/ghy1sZ Note however that the book won't be shipped until this summer since I still need to finish writing it and I'm also waiting for Xcode 4 and maybe MacRuby 1.0. - Matt On Mon, Ja

[MacRuby-devel] Desperately Seeking MacRuby Talks (was [ANN] Red Dirt RubyConf 2011 CFP]

2011-01-17 Thread Joseph Anthony Pasquale Holsten
Hello everyone! Red Dirt's got a track exclusively dedicated a track to Ruby implementations this year and I was hoping people would submit some a proposals about MacRuby. There's already a couple good ones up now: http://reddirtrubyconf.com/presentations/gui-programming-with-macruby htt

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Robert Love
On Jan 17, 2011, at 3:10 PM, Matt Aimonetti wrote: > BTW if you want to pre order the print version Amazon sells it for the > cheapest price I saw so far: http://amzn.to/ghy1sZ > Note however that the book won't be shipped until this summer since I still > need to finish writing it and I'm also

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Matt Aimonetti
Now you understand why O'Reilly ok'd an early release of the electronic version :) - Matt On Mon, Jan 17, 2011 at 1:25 PM, Robert Love wrote: > > On Jan 17, 2011, at 3:10 PM, Matt Aimonetti wrote: > > BTW if you want to pre order the print version Amazon sells it for the > cheapest price I saw s

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Chuck Remes
On Jan 17, 2011, at 6:18 AM, Joel Reymont wrote: > Has anyone tried wrapping user-land IOKit, e.g. > > #include > #include > #include > #include > > I'd love to use MacRuby to prototype user-land USB drivers. +1 This would be way cool... cr __

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Joel Reymont
On Jan 17, 2011, at 9:42 PM, Chuck Remes wrote: >> I'd love to use MacRuby to prototype user-land USB drivers. > > +1 > > This would be way cool... The problem here is that you cannot just run gen_bridge_metadata on IOKit.framework. You need to selectively include or exclude a bunch of sub

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Laurent Sansonetti
Hi Joel, IOKit.framework should be wrapped in the latest BridgeSupport preview release. If you install it, you should be able to talk to the IOKit APIs from MacRuby, in theory. In practice, I don't think anyone ever tried that yet, so you may hit bugs :) Let us know if you find something wrong

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Joel Reymont
On Jan 17, 2011, at 9:48 PM, Laurent Sansonetti wrote: > IOKit.framework should be wrapped in the latest BridgeSupport preview release. Is this V2? > If you install it, you should be able to talk to the IOKit APIs from MacRuby, > in theory. Where is the bridge support file? --- http://wagerl

Re: [MacRuby-devel] Creating ruby objects in Objective-C

2011-01-17 Thread Laurent Sansonetti
Hi Alan, When performing Ruby selectors on Ruby objects from Objective-C, the performRubySelector: method should be used instead of performSelector:, because it takes care of special Ruby semantics such as splat or default arguments. [RubyClass performRubySelector:@selector(new:) withAr

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Joel Reymont
On Jan 17, 2011, at 9:48 PM, Laurent Sansonetti wrote: > IOKit.framework should be wrapped in the latest BridgeSupport preview > release. If you install it, you should be able to talk to the IOKit APIs from > MacRuby, in theory. Doesn't seem to work! macirb irb(main):001:0> framework 'IOKit'

Re: [MacRuby-devel] wrapping iokit

2011-01-17 Thread Laurent Sansonetti
Looks like I talked too fast, there isn't any BridgeSupport file for IOKit, even in Preview 2. I will look into it, as I'm planning to roll out a new version soon. Laurent On Jan 17, 2011, at 1:53 PM, Joel Reymont wrote: > > On Jan 17, 2011, at 9:48 PM, Laurent Sansonetti wrote: > >> IOKit.f

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Laurent Sansonetti
I also only read printed books, as my eye sight is too bad to read books on screens :) I can't wait to buy a copy of Matt's book in the local bookstore, what a milestone it will be! Laurent On Jan 17, 2011, at 1:01 PM, Robert Love wrote: > I'm old fashioned--I've already ordered the paper ver

Re: [MacRuby-devel] IDE and TextEditor

2011-01-17 Thread Travis Kay
I use a combination of XCode, RubyMine and TextMate. XCode I use mostly for interface builder and wiring up UI and MacRuby specific things. RubyMine I use for general library development of gems and larger bodies of code or frameworks TextMate I use mostly for code snippets, evaluating framework

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Travis Kay
Thanks for posting this, I just picked up a copy. Now lets see who publishes first MacRuby: Definitive Guide or MacRuby in Action ;) -Travis On Mon, Jan 17, 2011 at 11:34 AM, Matt Aimonetti wrote: > O'Reilly is running a special today and my MacRuby: Definitive Guide - Early > Release - ebook (P

Re: [MacRuby-devel] MacRuby Book discount

2011-01-17 Thread Travis Kay
I'm happy to wait for it if coverage of MacRuby 1.0 and XCode 4.0 is on the table =) -Travis On 2011-01-17, at 2:34 PM, Matt Aimonetti wrote: > Now you understand why O'Reilly ok'd an early release of the electronic > version :) > > - Matt > > On Mon, Jan 17, 2011 at 1:25 PM, Robert Love wr

Re: [MacRuby-devel] IDE and TextEditor

2011-01-17 Thread denny trebbin
I use XCode only for the build process to create the .app. Interface Builder for the design and linking objects. With one exception I use RubyMine for the whole rest of Mac development. Actually RubyMine doesn't support MacRubys 'framework' concept yet, so I rarely need to use XCode for Mac spec