 So, before I start, I just want to show you what happens when you work too much on Mac Ruby. You get a little one in your head. I was also told that you guys should be moved by looking at a baby, and whatever you present you will actually enjoy. So, no phonies, but you get a nice baby girl. Alright, so, Mac Ruby. Before we talk about Mac Ruby, I will introduce myself, because you don't know me. So, my name is Matt M&A. During the day, I work on video games. I'm a video game developer, and at night I hack on different projects, and I work on Mac Ruby and other Ruby projects. It's just kind of interesting, because most people do the other way. They work on Ruby during the day, or play video games during the night, but that's the way I live. I'm part of the Mac Ruby team. We have a bunch of people. Not everybody works at Apple, but the lead, Laurent Sansonetti, actually works for Apple full-time, and he's part of the OS team. I'm also the author of the ORI Mac Ruby book, which is not yet published, but the book is open-licensed, and you can actually read it online, you can read the drafts, and you can make comments, and you can help me with the content. Actually, I believe Mac Ruby is currently the open source book with the most comments, so I really want to thank everybody who's been helping me with my bad English grammar, and suggesting different things. So that's about it for me. So let's talk about Mac Ruby, because that's probably why you're here. So to understand Mac Ruby, you need to understand that Mac Ruby is an implementation of the Ruby language on top of the Objective-C runtime. The goal is to target Ruby 1.9, and the idea is that Apple wanted to abandon Ruby implementation to target the Cocoa environment. So Mac Ruby is 1.9, OPPATI 1.9, and you can run C extensions. If you look at Ruby 1.9, Ruby 1.9 looks a bit like that. You have a parser, and you have the VM YAR. There's a runtime and a GC, and then you have built-in classes and standard libraries. In Mac Ruby, we kept the same parser. We replaced YAR by a mix I'm going to talk about quickly later on. Then we used the Objective-C runtime with the Objective-C garbage collector. We kept the Ruby 1.9 standard library, and we have built-in classes, and we use core foundation on top of that. So if you compare both of them, you can see things change a little bit, but it's not too far away. On the bottom left, you can see, instead of YAR, we're using LVM, an wonderful rock store, and that allows us to do a lot of things. So LVM gives us the opportunity to do just-in-time compilation. So for those who cannot be familiar with how that works, here's a small explanation. We transform the abstract syntax tree into an LVM intermediate representation. So once we have that, we can optimize it, and we can compile it to machine code, and we can execute it. The advantage of doing that is we get really good performance for algorithmic operations. But on top of the just-in-time compilation, what you can do is you can do ahead-of-time compilation, and now that gets interesting, because what you can do is before you run your code, you can compile your code, and you can use a command line, and compile the code before you run it. And what happens is at the end of the process, you get an object file that you can run directly. The main, two main advantages for doing that is, first, the boot time will be faster, because you don't need to do the digit. And the other aspect of it is people cannot look at your source code. Two things that are pretty important when you write this application, because you don't want people to go or just even understand what you're doing in some cases. Another big aspect of Mac Ruby is that there's no real interpreter lock. What that means, concretely, is that's how we run Mac Ruby. Each thread runs inside its own VM, and the VMs are lock-less and re-insurance, and the code will take care of the potential locks that need to happen. Each thread are native physics threads, and the GC itself runs in its own thread. The GC is a multi-threaded generation on GC, which means that it's not a stop-the-world, so when the GC runs, your program doesn't stop, none of your threads will stop. Another advantage that you're getting from using the Objective C runtime on top of the GC is the native access to Cocoa. And I'm going to show you some examples of that, but that's really the real reason why Apple invested and still invests in Mac Ruby is so you can write Cocoa applications in Ruby. You also have access directly to Objective C and C, so you can call functions and method director. So, now that I show that, I want to explain when you do not want to use Mac Ruby, because first, Mac Ruby is not for everybody, and the first obvious one is if you don't have a Mac, do not use Mac Ruby. So people always ask me, how can I compile Mac Ruby on Linux? Right now, you cannot. There's no reason why somebody cannot port it. Everything is open source, you can do it, but I don't think any of us working on Mac Ruby will do it, and I really doubt Apple would be interested in doing that. The other aspect is, well, if you do Linux, that's the other thing. Obviously, you're not going to use Mac Ruby because it's not going to run on your Linux box, so don't try. The other thing is if you don't want to run something new. For me, Mac Ruby really was a way of hacking on a project in Apple, and it still is, and if you're interested in doing that, I think Mac Ruby is a great project to look into. If you want to create apps and make money, that's also a good reason to use it, but I think the main challenge for people is to learn something new, because you have to understand and learn a bit more about Cocoa and how to use new concepts, and it's basically not real. It's something different using Ruby. That was a quick presentation of Mac Ruby. I want now to talk about what's new since last time. Last year, Laurence did a presentation, and she showed where we were at, and we actually changed a lot of things. We made a lot of progress since last year, and I want to go a bit in depth and show you some of the details, and I will try to not be boring. The first thing is that Apple gave the seal of Apple to Mac Ruby, and now it is officially stable with development for Cocoa. That's a big one for us. A lot of people have already been working on apps. Hampton Capital is sending this screenshot of an app he's working on right now. It's a DNA sequencing. Hampton Capital is the guy who's been here in Hamel on a lot of cool projects. He wrote a DNA sequencing app, and he's still working on it, and his husband is a biotech guy, and basically this app lets you connect to different databases around the world and get into some DNA sequencing. There's the People Open project. There are a bunch of projects out there, and I know that also integral have already pushed their first app to the Mac Apple store. There's a lot of cool stuff going on. Mac Ruby is really stable now at this point, so you can go ahead. There are still bugs. Don't expect to not find bugs, except as soon as possible. New Big One is the head of time compilation. We were almost there last year, but now it's really stable. We've been using it for a lot of projects. I want to show you how that works and why it's a big deal. I'm just going to take the first example of my book, which is just a simple Halo World example. This is the Ruby file. I'm not going to go through the code with you. I just want to show you how that works and show you the end result. You have this Ruby file, which is a Ruby file you press on it, and it changes the bottom to say Halo World, and then there's a voice using the Mac voice that was the Halo World. It's something very simple, just to understand a different concept. The way you will compile it is by just calling the compiler on the file and saying you want a macro file, a macro file, and a clean demo. We're verifying that the file is a little proper executable file. Everything works fine, and the end result is that. Let me actually show you the code, so you believe me, it works. I need to switch to hearing. We have hearing as a folder. I already just run the comment quickly, so we have the demo file. I'm just going to open the demo file and verify the sound works. That starts the application. Here is our small application here, and I will press the button. Halo Ruby. There you go. This is the application ever. This is just a few lines of code, but I was able to compile it, and you have the file right there. I'm going to show you. It's just not lined in here. There you go. What you can also do, which is interesting with the compiler, is you can take a bunch of files that can be used. If you have a bunch of Ruby files, you can put them together, and then when you compile another file that has dependency on them, you can actually use this share library to get this dynamic library. It's something pretty practical when you end up sharing code between different projects. The new other feature we have is a debugger, which if you ever use Macro B at the beginning, it's a silent detector, so people don't understand the reference for us to bet for you. We have a bunch of characters from a very famous sci-fi TV show, and we have this crappy detector that I wrote because I might be silent, and we have a silent question mark method, and it would always return flaws. So when we run the code, what will happen is that now everybody will be seen as not a silent. If you watch the show, you know that SIG is actually silent, and if you haven't watched the show, I'm sorry, you know SIG is not silent. So we have a bug in our code, a very simple bug. So what we can do is we can call the debugger, and the way that works is you just say Macro BD, you put the name of the file, and it starts the debugger, it goes into the first line, and you get a comment height. It goes into the breakpoint in the file-siling-detector.rb line 8, and I will actually add a condition. I only want to break on the breakpoint if the character variable is equal to 6. So once we do that, which is okay, continue, run the program, the program goes until it finds the condition, stops at the condition, gives me the prompt, and I can verify by printing and evaluating the value of character, and it tells me, okay, it's 6. So we are at the right place, where we want it to be. We call the method on it, it's silent, question mark character, and we see it's false. Well, we know that's where the bug is, so we just confirm the bug. So to fix it, we can actually, at a run time, rewrite the method, and say that's silent character, and now we say, basically, we're not really fixing it, we're just pretending that if it's 6, we did live bug fixing, and we can keep on running the code, and now it finds that 6 inside. There you go. So that was a debugger. The other big thing, and this is a bit of a complex topic, so I'll try to make it as simple as I can, but in Snow Leopard, Apple released something called Grand Central Dispatch, which is built on top of Live Dispatch, and Live Dispatch is an open source library at this point, and it's been ported to BSD, and I think all the distributions are looking into it. Let me explain a bit more about it. The problem I'm trying to solve is that when you have to program with Reds, it can be somewhat complicated. So I hear people saying, you know with Reds, it's awful, it's so hard, and nobody can do it. It's not that bad. Let's be honest, it's not that bad, but it can be challenging. Especially when you write desktop applications, you cannot have any blocking operations, because if you block your main run loop, you get this pizza of debt on the Mac that's been like that, and that's because something has been blocked. The other issue with Reds is that you as a developer have to deal with this, and the system can get overwhelmed if it has too many Reds. You need to know exactly how many Reds you need to run based on the system load, and that gets really challenging. So what happened is, Apple said, well, we're going to give Reds to the developers and they'll do all the work. So you're going to just pass a block and do the job. So in Ruby currently, this is how it works. If you have a thread, the thread gets locked. So every single thread will be locked and cannot talk to the same data at the same time. So the problem with this is that it can't be sealed. So if you have multiple threads, you have to wait until they all get scheduled. The other big issue is that to get full concurrency, the only way to really do that is to have multiple processes. And even though that works, I don't think it's a very elegant solution to have to run multiple processes to get full concurrency and use all the cores on the machine. The big advantage, though, is that it gets data integrated because now you cannot have two threads talking to the same data at the same time and you cannot corrupt data. So that's actually a big advantage, because you can see extensions that could potentially not be thread-safe. But if you remember what I said earlier, macropy does not have a global VM log. So what that means is that the way we work is every single thread runs inside its own VM, which is a lock-less enemy entrance and talked to the core. The problem we are having is that even though it's really nice, so you really get the concurrency, you see how to deal with threads and still pain in the butt. So, libdispatch, that's the library I told you about at Apple Road, to handle these use cases. This is the small wrapper we have around libdispatch, and you can require a dispatch and you can create what we call a job. And the job is not like a thread. You need to see it as as a job. I'm sorry, it's hard to explain, but just pretend you understand what I'm saying would be good. It's a great job and you don't really know what it is, but it's a job, so imagine you have this job and you give it a block, and it's okay, go and exit this block, and then you call your job and it's okay, give me the value, give me the result of the block. In this case, what happens is that it's going to block and wait for the result, so the rest of the code cannot exit you. It's a very synchronous way of approaching It's interesting, but it's not very valuable. What's more interesting is to use this different approach which will use a block and whenever the job is done with the job you gave it to, it will dispatch the block and execute it asynchronously. So now that becomes more interesting because you can do an ideal call, for instance, where you can do a very slow operation and just have a block that will take care of the result whenever it's available. But wait, there's actually more to that. What you can do is you can create your job and you can actually send a bunch of blocks to it, a bunch of operations to it and you just send as many as you want. And that's where leave dispatch is really interesting because you don't really know how many threads you need to run this code. You might need three threads, but maybe your system is overwhelmed, you can only use one thread and leave dispatch to do it itself for you. You don't need to deal with that, you don't need to know how many threads are used, you don't need to do any of that, you just send the blocks and you get the returns back. So here what we do is we send three operations, then we join the block, we join the job, which would just wait until everybody is done and then you have access to all the results for the operations. So it's a nice wrapper API around leave dispatch. There's also another way of approaching it is because every single invariable Ruby could be dispatched in parallel if you want it. So we added a small extension where you can say do each or whatever invariable methods you have and do it in parallel for me. So now if you have to calculate this we need to find a pair for a gig. Now if you have 150 gigs you don't want to start 150 threads and leave dispatch will take care of that for you. So you have time and we have most of the invariable methods that are available to run in parallel. So the only problem is if you remember again I was telling you that MacroBit doesn't have a global VM lock. So what does it mean? It means that you could potentially corrupt your data if you're not careful. And this is where there's another feature of leave dispatch which is instead of using the concurrent fuse which is a default you can use serial fuse. And serial fuse is a lock use synchronization and what they allow you to do is to use the actor thread diagram and create a hash in this case we create a proxy object and say in our job we have a synchronized object which is a hash which is called scores and for every single user we're going to create a new job that we're going to send well we're actually going to create a new block that we're going to send to the job and we're going to do some calculation and we're going to modify our hash and the way that works is you get now a lock it's not a lock, it's actually a queue at the proxy object level so you don't get any lock and everybody will go and modify the object in a very safe way and at the end you can actually get your object, the proxy object and look at it and introspect it and do what you need to do on it so now we're getting a nice safe proxy object and when you work on desktops you actually want to use all the cores of the machine and you might want to do some complicated desktop processing and using libdispatch again and using the nice wrapper you can make these things much easier than usual the other new feature we have is control tower and control tower is a web server that we announced last year but it was not released that we had to go through the entire Apple process before it gets released which takes forever and it's a simple web server for rack apps which uses gcd so you can actually embed that in your app if you want to serve requests from your app or if you want to run a server on a mac mini, why not what's interesting with this concept, firstly it was a nice proof of concept for gcd, we were able to show how a simple web server can be written in ruby using gcd and the other aspect of it is for people who want to embed from peer to peer or just serve web application on a network or features like that it's a gem that you can actually go to github and have a look at this and even just learn how gcd is using this code the other aspect is we have a new dispatcher it's just safer and uses a cache it's not very important basically we clean up the internal we also have to switch from onigurama and the reason why we did that is because onigurama is not thread safe and because we are thread safe, it was causing some issues for the point I explained earlier so we had to switch to ICU there's no difference for the end user just to let you know we also worked on we rewrote some of the classes of string and hash where we retem to get more storage foundation to get better performance we have now support for cblocks so that's something very interesting if you've used objctc and coco since it's not an effort a lot of different APIs require you to use a cblock and it basically looks like ruby you just pass the block and the block gets used until recently we were not supporting that now you can just use the same method as you would do in coco and use a ruby block and everything works fine this feature actually requires a day to bridge support yes another new feature is sandboxing and I believe Aaron Aaron are you here? I believe Aaron ported that to other rubies but the way it works is you can sandbox your application and it uses the OS 10 feature which allows you to block access to some underlying features so in this example here we create a sandbox and we put our application and we say that the application cannot use intranet and then we try to use open URI to access the microd website and when we do that it will raise an exception telling us that connect is not allowed by default you have 5 profiles so you can make your application a bit safer which is really good for you end users so if you don't need to write to this for instance you can allow to only write to temporary files you can block from the network and you have a lot of cool features you might not care too much about that right now but as people are going to use your application and you want to make them safer and prove that to them it might be a nice feature to use the next big thing it's not really macrod specific it's the new Mac App Store and the Mac App Store is actually very interesting because it allows you to have great exposure and exposure for developers is a big deal especially if you work on a desktop environment if you try to write a desktop app and you try to sell your app it's really really challenging because you need to have people to know about you and they need to go on your website and try to pay with PayPal and it might be someone else and I mean it gets really complicated while the App Store really proves with the iPhone that people love the user experience and they really want to go and find application and what you want is users find your application so to improve the user experience and to make yourself more available you can use the App Store and Mac Ruby can be used for that you can compile your application so nobody is too used to it because you can submit already your application and whenever it's available people will be able to find it and it's especially interesting for people and I think most people here have been working on web apps well I spent a lot of time and money on the web app I'm not going to rewrite all my app for the desktop and this is where you need to think different and you need to actually reinvent the desktop application experience there's no reason why you cannot use WebKit within your application and some native commercials and mix things together so even though your website is available online people can go there now they can have a button on the desktop they can click on it, they can do backups they can get notification there are a lot of cool features you can do so I'm going to show you an example of WebKit later on once we switch to the example part to talk actually we're there already so what can we do with Mac Ruby? the first thing is I realize a lot of people don't know about that but when you install Mac Ruby and actually if you don't install Mac Ruby expert you will find a bunch of examples on your computer and with Mac Ruby we have a new folder so if you go on your Mac and you type slash jiggle, first slash examples that should be a bunch of Ruby examples and slash Mac Ruby would give you more Mac Ruby specific examples when we have a bunch of apps you can compile and we have a bunch of scripts so what can you do with Mac Ruby? alright first demo I need to volunteer Rich Kilmer everybody I need that carry microphones around so speech recognizer this is a very simple example all the examples were written in less than an hour they were really quick and dirty I'm trying to find the application so I already compiled the app so we don't have to waste time on that I'm starting the application it's a very simple application I'll show you the cut in a minute this is the voice recognizer on screen you can see the different comments we have a bunch of names of Ruby's and I'm going to ask Chad if you can use the, sorry, Rich use the comment so you will say show and the name of the person in the list and if things work properly we should see a picture of the person you're calling do I have to say it with a French accent? I'm not sure show chat show chat you can plug it in show chat no show chat show chat show chat as you can see it's working very well show chat this is really disturbing well maybe it's the name just show yourself show sensitivity show sensitivity open nose show chat show him show max okay just want to make sure that works okay show Aaron it's okay show Aaron show Aaron there you go here's the French accent show Lea show Lea there you go show Rich show Rich perfect it looks like we found a political orientation there so it doesn't seem to work I think it speaks because of the noise it worked very well at home when I was alone and here we can also switch photos I had it back up in case it was not working so actually we have a photo of chat I'm going to show you right now there you go so for this application just to show you how hard it was let me just open the source code do I actually have time to show you the source code? yeah alright I'll show you the source code it will be available online so let me open this this file there you go so this is to create a menu and then we do is when the application so the way it works is you have these callbacks so when things happen it will call the method if it's defined in this case when the application is done launching it will send a notification and this is when I create a menu I set up the recognizer and I put the page in front to set up the recognizer I just needed to say okay speech recognizer what's that I'm looking on my screen and it looks great but what was I here did it begin up maybe a bit more so I'm just setting the NS speech recognizer which is a framework from Coco and I set a bunch of comments here I just have the names of everybody and I put a delegate so whenever the comment is triggered it would call itself and I started listening and then the callback here is called speech recognizer and I would get the comment that was sent and then I could call my memo if you're called show portrait and the show portrait here just gets the image based on the name of the comment and display it on the screen I implemented that at home I have a Mac mini on my TV and I just say open skype and open flex and you know do stop and it's very simple to do I end up killing in my TV because you cannot recognize my accent and we all have fun actually we give up using it it's still very cool and you should really use this every day so that was the first demo let's look at the second demo we have co-location so a lot of people don't realize that but on the Mac you actually have co-location you don't need to have an iPhone and I asked on Twitter and asked people what they wanted me to do with co-location for the demo for RubyConf and people told me I wanted to use GoVala I actually don't use GoVala but I looked at the API and it looked pretty simple did I compile it? I'll just provide you a preview so people that I showed you the code the only thing you do is when you initialize the class I create a new object which is an instance of a CL location manager and I create a callback that will be called whenever that happens and I start my location manager and I stop it once I receive the callback so let me compile the application it's very very poorly written code because I didn't use it in dispatch so the first thing happening is that the application will ask you are you okay to share with others your location in this case I will say okay and what will happen is that oh I'm not online that's why so let me turn on the code I should have thought about that I should also really rescue the error you don't want to see that in a real app so we should be back online let's try are you not video? so the app restarts you want to share I say yes, there you go so I found my location here it sees where I'm at and it found this video in case I was moving and in the background it found all the different GoVala location around me and I can see there's a bunch of all that's checked in here and 65 checked in for 50 users so I can just click on it and it will open in the browser eventually I should go to the page very simple application there was just a few lines of code if internet is fast enough we'll be able to see the location there you go to show you the code I'm not going to go into any details but you just need to read the documentation this works and I have a small controller here and what I do is I say when the application is done I launch it, you start the location manager and I pass the block and the block will basically find the different spots and put them in the table and the table I added a few methods when you click on it it goes to the URL that we got from the JSON so we just parse the JSON response and that was it so you can use core location to see the user used up from the web and using that location next example address book I'm not going to run this one I'm just going to show it to you because it takes a little while because of internet I wrote a small application which lets me find all my followers on Twitter and put them in my address book so there's this button here it's totally useless I agree and I click on this button and it goes and called the Twitter API and finds all the people created Twitter group because I don't want to pull with my real contacts and put all the information out to people so I can find them and if you open my address book you can see I have this Twitter account and you can see all the people were parsed and they would add it I have the photo, the link and the description so now if I'm looking and that was very simple to do so you have integration with iTunes with address book with most applications the calendar most applications on the map you can actually call them directly from that movie and interact with them so it allows you to do a lot of interesting things what's the next one string tokenizer this one I actually don't I'll just show it to you this is just a small example to show you all the new C functions that are available from the OS in foundation you have a lot of different calls that are available in C classes and here in this case what I do is I reopen the string class and I define a new methodical language and I hold this long function C method function and I pass it the string itself and I create a wrench and I run it at zero and go all the way at the end of the string and when I call this function it returns the string and I can see automatically the language being used so here we have an array of strings in different languages do you guys recognize the languages what's the first one French, second one English, wow, good third one I heard different things well we'll see Apple would tell it in a second next one Italian Arabic and the last one Japanese good let's see if my FBI agrees with you and the result when you run the code is actually French, English, Spanish Italian, Arabic and Japanese you can see that Arabic is at the beginning of the center of the string because it's right and left so if you start digging into the Cocoa API and all the functions given by a foundation and everything else you actually end up with a lot of cool features of stuff you cannot do on the web right now that you can have on the desktop app and you can actually mix the web app with the desktop features so the last demo I'm actually worried about this demo because it's a bit complicated but I wanted to show you something cool because I realized if you want to give a good talk you need to show something different and I give myself a little challenge I tried to use a PS3 controller look it through Mac Ruby and use Webkey to display a canvas and using Javascript and Mac Ruby and my controller to change the display so hopefully things are going to work it's just a simple script but you never know so I'm just going to start it what should I verify yep, one kind of connected so I found my PS3 controller and you can see on screen actually the two thumb so I'm moving the thumb and actually I can press the thumb buttons and it works and you can see on the left and the right the location of these these buttons and I can use the station buttons and move them up and down and you can see the locks on the bottom press bottom left change the button and all the buttons are mapped and I can even so you can imagine what you can do by controlling the browser so I'll show you quickly the code it's just HTML and Javascript for the view and Mac Ruby is taking care of all the blue term information and sends messages through Webkey which takes this information and sends Javascript to the display and moves all the objects so let me quit by pressing start and yeah, everything works fine actually it's great so let's look at the source code it's not a product, it's not the next code I just did that here, so we have the file what I have to do what I have to work is I have to use what we call I have to create a framework for the PS3 controller so I took the drivers and I wrapped them in Objective-C actually it was already a wrapper I didn't have to do anything the reason why what's on my guide is so that you guys are just easy to use and I think you can see functions everywhere then I require the webkit framework and I create this delegate that creates a new PS3 controller and the delegate itself the callback directly to itself I wrapped a little bit the Javascript evaluations so from a Mac to V you can talk directly to webkit and you can send object or methods to executive coding the browser so you basically get the callback all the connection is received when the player connects and when you press the triangle button you can do that and I'm sending I do the GFJS call I do the logic in my JS file and the view is a simple view which uses raffle.js and jQuery and I have a bit of CSS and that's about it a very simple example showing the power of Mac to be through hardware and software so there you go for the demo you can get more information you can actually download right now the latest version which is 071 you just need to double click there will be no conflict with the current movie you can also use rvm if you prefer and if you have any questions, if you want to share with me what you've been working on if you have questions about the app store or anything like that you can contact me I think I left about 5 minutes for questions so let's go ahead and answer questions so the question is it was a really great presentation thank you very much so the question is when are we going to see Mac Ruby on the iPhone I cannot talk for Apple technically there's no reason why you cannot do it we basically need Apple to finish doing it or we need somebody else to do it technically there's no reason why you cannot do it so I don't really have an answer when maybe not soon what about garbage collection so what about garbage collection so there's a lot of garbage collection on the iPhone which is the main reason why Mac Ruby currently doesn't work on it there's no reason why you cannot have a garbage collection in your framework so that's not really a problem you can also have Mac Ruby use these and retain so technically that's not really a challenge absolutely yes Mac Ruby is fully open source you have access to all the so the question first was can anybody go to Switzerland to make it work on the iPhone and Dr. Nick was asking can I show you how to do it right now yes so you totally are able to do that it doesn't mean that Apple will let you submit your apps but there's no reason why they will not at the same time so will they nope probably not because it gets combined how long does it take to show it I've probably 15 minutes I'll just do it now but I mean the real point should you answer your question answering it I think the main point of Mac Ruby is to go on the desktop to be really fully proved on the desktop before we can move to the iPhone and iOS and other platform I don't know really what Apple wants to do with it but we first need to get one other app we need to be really solid with the desktop we have the app store right now there's a lot of stuff we still need to iron out we need to get feedback we have about 90% compatibility with the Ruby spec we need to go up to 100 I mean there are a lot of things that need to happen I don't think the iPhone is the main target so that's not a question but he was saying if you work on if you work on the iPhone you are more than over well you're welcome to talk to Apple there's a question over there do you know if there are any plans to include it I'm asked if I know if the next version of the OS will include Mac Ruby that's where this question comes it depends what scripted language OSA with OSA currently OSA is not supported you are scripting bridge which is how you can talk to iTunes and on my blog I have an example where in the morning I just basically play music and iTunes get started by Mac Ruby and just play smooth music to work me up and my baby so you can talk to iTunes but OSA which is one another it was supported it was written by Laurent for Ruby itself so I'm almost sure it's going to happen for Mac Ruby it's in the plan yeah two questions why use Mac Ruby over a guest to see would you lose? why use Mac Ruby instead of Objective C you do whatever you want my friend there is no specific reason what I would tell you why I would act for Mac Ruby because I think the syntax is nicer in Ruby than some of the libraries that already exist you don't have to have headers and an implementation file performance wise it's pretty close and you can actually mix and match what I didn't show is that Mac Ruby is a framework so if you already have an Objective C project you can actually use the Mac Ruby framework and have some features written in Ruby running at the same time as the one in Objective C and you can actually talk in between each other so if you like Objective C and you are happy with it what do you think about it? what's the question? I've heard of you and do I know what it is and do I like it? I really like Mac Ruby question under there no I'm not going to share it to you what's that the question? yes I'm sorry you can send an email to Steve Jobs and ask him if he can show you I did not say it's trivial you don't quote me properly here I say it's doable to do there's no reason why technically you cannot do it there's a big difference between the two so if there is no we don't have a look up on Mac Ruby's schedule we can meet anywhere if you guys want to someone just suggested a time on the mailing list when is it and what time is it? I'll be there it was 1pm tomorrow 1pm tomorrow in the ballroom so yes and I'll be there and I cannot show you how that took over isn't that right? it's not over by then but maybe they're fine we can talk at the thread and you can find me if you have any questions come and find me we find one more question do we have time Chad? more questions? yes so I've been using Mac Ruby to test very good question so the question is gentleman is using Mac Ruby to test code are you testing Objective C code or Mac Ruby code? Objective C code Objective C code with Mac Ruby and it's asking if there is plan for better testing Ryan Davis is working Ryan is actually working on a mini test extension for Mac Ruby he already has that working but he wanted more feedback he wants to get people to tell him exactly what's needed we also support bacon but we recommend you use mini test because that's what's coming with Ruby we also need to get more feedback because that's kind of a new area like how do you test a desktop app with Objective C so yes there is a lot of interest a lot of people are actually using Mac Ruby to test Objective C which is probably what you're doing and we still need to do some more any other questions? yes, Camille? I'm not sure I understood your accent Camille can you repeat the question in French for me please how do you recompile? so I didn't show it to you so Dr. Nick will be happy he actually knows that already so when you're in Xcode you can choose different targets and one of them is to compile and the other one is to embed so the only thing you need to do is to repress the button and it will create the compiled version you can also use the command line if you want to but if you look at the targets here it's a bit tiny but it's just calling a shell script it's a bit tiny I don't think I can make it much so it's basically just calling Mac Ruby Deploy Compile so it's really easy to recompile in development usually you don't compile you stay in JIT until you come to a point where you like it, you compile it then you can benchmark it, you can use GNU the GDB debugger and you can use Dtrace to see what's going on in your app any other questions? yes are people writing gems that are Mac Ruby specific? and is there a way to segregate them from other gems? so the question is do people write Mac Ruby specific gems and how do you know the difference so I personally did write some Mac Ruby specific gems and I need to talk about how to make Mac Ruby gems specifically not to the platform you're on but to the Ruby you're on what you can do is when you load the gem you can say Ruby version itself and if it's not Mac Ruby you can write an exception people have been using Deployer and Isolate Successful in their app so I think there's just we need to talk about Ruby gems how to make it more specific to the different movies I think that's it, thank you very much