Re: [MacRuby-devel] MacRuby questions
On Thursday, June 21, 2012 at 5:46 PM, Kevin Walzer wrote: > Hello all, > > Hi! and Welcome! > I had a few questions about MacRuby and its differences from standard > C-Ruby: > > 1. Is MacRuby mature enough to function as a drop-in replacement for > standard Ruby? Are there significant gaps in functionality? > Specifically, does ffi work? (I tried to run a "hello world" ruby-tk app > using the ffi and ffi-tk gems, but MacRuby just segfaulted with an error > code of 11.) > > The answer to this question is slightly complicated: * MacRuby passes ~90% of the rubyspec. * The only "significant" gap, to the best of my knowledge, is Fibers. That said, there is a rather clever implementation of Fibers on top of GCD from alskip (https://github.com/alskipp/MacrubyFibers), which I've been meaning to integrate. * There are still issues running Rails, so if you want to use that as a benchmark, MacRuby is "not quite there yet" As for FFI, it does not work. Part of the reason is that we had been waiting for the API to settle (early on there were various competing ideas of how Ruby FFI should work). Presently, it is probably as settled as it will get, so it would be good to look into an implementation. > 2. Is it possible to have a command-line toolchain/workflow for > development and deployment of MacRuby apps, or is heavy use of Xcode > required? > > A command-line only workflow is definitely possible. I have used such a workflow in the past. Depending on what you are attempting to do, it may involve xcbuild, so you would still need Xcode installed, but compilation and linking can all be done without Xcode. That said, many people have found Xcode helpful when designing UIs. We could probably do a better job of providing a way to make UIs without Xcode. > I like the fact that MacRuby would make AppleScript support for my app > easy, and the macruby_deploy tool seems to be what's missing from > standard Ruby--gathering all bits and libs into an app bundle, running > install_name_tool where necessary, etc. The segfault with ffi-tk, > however, has me concerned (this particular lib has been advertised to > work with any and all Ruby implementations including JRuby). > > Until FFI is more fleshed out, you might also try using the Tk.framework in MacRuby. You should be able to use it similarly to how you might use it from Obj-C (though, I am wholly unfamiliar with Tk). You can load the framework in MacRuby by using the "framework" command: > framework "Tk" The framework will be loaded using the BridgeSupport definition file, which is a kind of FFI. If you run into any problems, be sure to let us know. Cheers, Josh ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] Greetings MacRuby Dev
On Saturday, June 30, 2012 at 11:11 AM, Jonathan Silverman wrote: > Hi My Name is Jonathan (JSILVER) Siilverman > > What is your status? I would like to help you. Also, I seek > information on Sandboxing MacRuby apps for Mountain Lion and beyond. > > I want to help with MacRuby's success, because it is obviously not dead. > > MacRuby knights, what say you? Hi Jonathan! The current status is that we are looking firmly in the direction of declaring a 1.0, but that means fixing a number of bugs first. As for Mountain Lion, I think there are some interesting discussions we can have around MacRuby apps running in ML and Sandboxing, but unfortunately it's a bit difficult to do so in a public forum (such as this one) considering the NDA you would've had to sign to currently have access to ML. Right now the best thing you can do is use MacRuby, report bugs with MacRuby, help with the Wiki, and maybe even try your hand at fixing a bug or two in MacRuby. Thanks for the interest! and cheers! - Josh ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Re: [MacRuby-devel] LLVM 3.1 Support
Hey John, Just took a look, and you've certainly made more progress than myself! (My branch is/was at https://github.com/jballanc/MacRuby/tree/llvm-3.0). I saw that you just have a commit on the master branch, though. It would be best if you created a new branch in your personal MacRuby fork for the llvm work. If you do that, then I can work with you (send pull requests to your branch) to work out the remaining issues, and finally you can send a pull request from your llvm-3.1 branch to the main MacRuby repo. Cheers, Josh On Friday, June 29, 2012 at 7:52 PM, John Harrison wrote: > I have started a fork on at https://github.com/ashgti/MacRuby that compiles > and runs with llvm 3.1 and clang support. Everything is currently building > and running, but its failing some of the spec tests. I just wanted to post > this here in case anyone was interested in trying it out or helping with any > of the failing specs. The major differences are the introduction of the > ArrayRef<> from the llvm (it wraps std::vector and C style arrays), the new > exception handling system, clang support and removing const from a few data > types because the llvm api's changed. I still need to clean up the commit a > bit, but feel free to try it out and let me know if anyone has any issues. > > -- > John Harrison > > > ___ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org (mailto:MacRuby-devel@lists.macosforge.org) > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > > ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
[MacRuby-devel] $stderr in MacRuby
I've added a logging window to an application, and I would like to display any errors in there too. So far I have done this: class NonStderr def write( error_string ) $log_view.insertText(error_string) end end Then, in applicationDidFinishLaunching(aNotif) I put this: $stderr = NonStderr.new $stderr.write "test test test" # appears in my log window cause_an_exception() # does not appear in the log window I saw an old ticket about MacRuby not writing errors to stderr, http://lists.macosforge.org/pipermail/macruby-tickets/2012-February/002686.html , but this is on the old system so I'm not sure. Does anyone know how to do this in MacRuby? Thanks. -- Stephen Horne ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel