

RubyMotion Goes 2.0 And Gets OSX Support, Templates and Plugins - jballanc
http://blog.rubymotion.com/post/49943751398/rubymotion-goes-2-0-and-gets-osx-support-templates-and

======
gnufied
This is excellent news. I purchased RubyMotion when it came out and largely
didn't use it for awhile. Since last 3 months our company which is entirely
made of Rails/JS guys have been building small apps using RubyMotion.

I didn't know they were working on OSX support. But this is huge for me, back
on GNU/Linux GUI programming using dynamic languages is easy. py-gtk/ruby-
gnome2 bindings really work well and It is incredibly awesome that you can
build small utils for yourself in a afternoon using py-gtk/ruby-gnome2.
Ability to do the same for OSX is exciting!

------
coherentpony
I'm not sure I understand this. Is RubyMotion just a set of wrappers around
Objective-C classes to allow you to develop applications in Ruby? If so, why?
Is the point to allow Rubyists that don't want to learn Objective-C to develop
applications in Ruby?

~~~
jballanc
RubyMotion is not a wrapper. It is an implementation of Ruby on the Obj-C
runtime. This means that a RubyMotion object _is_ an Obj-C object (for
comparison, a Ruby object in MRI is just a C struct). So why would you want to
use RubyMotion? Well...

* Obj-C, from the very start, was implemented as a strict superset of C. This means that every valid bit of C code _must also be valid Obj-C_. This places some rather sever limitations on the Obj-C syntax. Ruby does not have this limitation, and neither does RubyMotion. So one reason you might use RubyMotion is to get a cleaner syntax that does the same thing as Obj-C.

* The Obj-C runtime is very dynamic. You can create classes on the fly, add methods to them at runtime, move methods around between objects, and create methods dynamically. The Obj-C _language_ makes it nearly impossible to take advantage of any of these features of the Obj-C _runtime_. So another reason you might use RubyMotion is to get the most out of the Obj-C runtime.

~~~
sandoze
Bullet #2 is so very very wrong. Nice try. I can't speak to the first bullet.

~~~
ics
Please elaborate; I have only minimal experience with ObjC and do not use Ruby
in the context of native development, so any well-described counterpoints
would be much appreciated.

Edit: I obv. didn't write your parent comment. What I meant was that I'm sure
others in my position, having read your parent, would appreciate more
elaboration from you as well. :)

~~~
sandoze
Sorry, you're right. It was an off the cuff rebuttal with no substance. Added
to the parent comment.

------
relix
That's awesome. I recently tried to get into MacRuby development, but there's
a serious dearth out there of resources (for the beginner), and I had to guess
on how to do a lot of things.

Hopefully the RubyMotion support will be better!

------
gfodor
Beyond the OSX support the weakref support is very welcome!

~~~
hboon
WeakRef still doesn't zero out collected references, so
<https://github.com/farcaller/motion-memorymanagement> (based on mikeash's
MAZeroingWeakRef) is still the better alternative.

------
mark_l_watson
Please pardon an off topic question: is the compiled code from RubyMotion
similar to Objective-C compiled code? (Within a factor of 2 or 3 in speed?)
Thanks.

~~~
jballanc
In the large majority of cases, compiled RubyMotion is indistinguishable from
Obj-C, both in terms of speed and size.

------
scorpion032
I am very keen to know what Apple thinks about RubyMotion. It seems like a
fine tool; but it's not typical Apple to allow external commercial vendor to
influence it's core development environment.

Anyone from Apple, or anyone that gained the sense in events like WWDC, care
to share?

~~~
cpr
Apple made it clear a few years back that any language that compiles to
"normal" binaries is fine, after (at first) being completely restrictive about
the tools you could use.

Their major remaining rule is that you can't build environments that download
code from the internet and run it. (Except for Javascript, and you have to use
JavaScriptCore (Apple-supplied) for that.)

------
chrisdevereux
Anyone had experience incrementally adopting rubymotion in a larger
objective-c project? The languages obviously match up pretty well, I'm
thinking more about toolchains, etc.

Would love to play with this but am fairly invested in a big obj-c thing right
now.

~~~
colinta
I haven't done a larger project, but I did port a small project by starting
with just the AppDelegate. It was easier to first turn the xcode project/obj-c
code into a library, and compile it as such. The classes "just worked", and
with all the nibs in resources/ those loaded, too!

I translated the models into Ruby, and pulled those out of the xcode lib.
Eventually the entire codebase was converted (except the nibs).

------
mamcx
How I wish something like this exist for python..

~~~
srik
PySide isn't half as bad as you might remember. And yes, kivy is pretty
respectable and only getting better. They did win a little grant too recently.

------
derengel
Is there a way to play with it for people who can't still afford it?

------
pjmlp
It would be nice to have it in other platforms, anyway it quite nice to have
the option to natively compile Ruby code.

------
DigitalJack
Can RubyMotion work with GNUStep?

~~~
colinta
I doubt this has ever been tried, but I seriously doubt it... the compiler
does a lot of work looking at the Cocoa frameworks to build the bridgesupport
files. Are GNUStep frameworks built the same way?

------
Raticide
Looks awesome. I just wish it was free and open.

------
cnp
SO rad!

------
mattetti
And here is how MacRuby developers were lied to and the RubyMotion project
made the choice to not contribute back but instead to focus on keeping
innovation proprietary.

[https://lists.macosforge.org/pipermail/macruby-
devel/2012-Ap...](https://lists.macosforge.org/pipermail/macruby-
devel/2012-April/008702.html)

It's quite a sad day to think that Apple invested on MacRuby and kept it open
source... and RubyMotion chose another route even for OS X dev.

~~~
alloy
[Disclaimer: MacRuby core member here.]

I agree, it’s too bad that people can’t just work for free as much as they
would like on the stuff they love.

Now it is true that Laurent _himself_ has not touched the repo since that
email you linked to, but you know just as well as me that Watson has been
doing maintenance work on MacRuby while on the payroll of RubyMotion
(HipByte). His latest commit was 15 days ago and here’s a generalised diff of
all the work done since the email:
[https://github.com/MacRuby/MacRuby/compare/94c90b351c18ce1f5...](https://github.com/MacRuby/MacRuby/compare/94c90b351c18ce1f59a3add8b525baf466e4dace...3f0dd69a4cc16a6fc7f7f00b6a1dc370d2fad80f).

This is what people with limited time resources do, they delegate.

To conclude, when you’re out to paint someone black, you really should be more
specific. As it stands, there are no lies in that email, which means that you
are the one that is not telling the truth. I’m not sure why you want to spread
FUD, but it’s quite obvious and really does not make you look professional.

PS: Whatever Apple chose or chooses to do has absolutely no relevancy to this
at all. The moment they released it as Open-Source, they effectively said that
people can do what they want as long as they follow the license.

~~~
mattetti
Alloy my point was not about maintenance but the fact that MacRuby relies on
the ObjC GC which is now deprecated. In this email thread Laurent acknowledge
the need to switch to static compilation and that he has a working branch he
will soon merge.

This is exactly what RubyMotion just released and I'm saddened that it was not
contributed back as promised.

It's as simple as that.

~~~
coldtea
Well, spoking of broken promises and people abandoning things, didn't you
write a book on MacRuby and a couple of articles touting it, and then
abandoned the project for greener pastures (Ruby, Go and such)?

What about the folks that bought into the book and MacRuby, thinking that it
was a viable project, and then see you, one of the (few) main contributors
abandon it -- and long before today's release of RubyMotion.

