[MacRuby-devel] Fibers and Enumerators

easco easco at mac.com
Wed Aug 11 15:23:39 PDT 2010


Because of the way MacRuby is implemented, fibers would need to unwind the stack most of the time you switch continuations, which has poor runtime performance. We will eventually implement continuations which can serve to implement fibers at some point (which is what MRI does I believe), but I wouldn't recommend to use them for anything significant because of the performance impact.

My concern for the feature is focused not so much on the performance impact of using it, as it focuses on the fact that Fibers have been added to the 1.9.x language. They appear to be an important part of the External Enumerators feature and that feature seems to have a lot of people very excited.

Any external libraries that make use of Fibers or External Enumerators stand a good chance of not working in MacRuby. In that case MacRuby becomes "Mac-MostOfRuby" which makes it harder to adopt... etc.  I'd rather that didn't happen.

I personally believe the GCD model is much more appealing to achieve multitasking, especially now that we enter the multicore age.

With all due respect to Shakespeare, however, there are more types of multitasking than are dreamt of in GCD's philosophy.

Having said that, though, I really love GCD.  I'd really love to use GCD. I really, really, really ENVY folks that can rely on GCD and (C-language) blocks to help them solve their problems.

As for myself, I've never had the luxury of working on a system where I can count on GCD being available. The last time I did desktop development we were supporting systems back to Leopard.  About the time GCD was announced, I switched to the iOS realm and to this day my code has to support operating systems back to iPhone OS 3.1.3.

I look forward to the day I can throw some blocks around in Objective-C, but (sadly) that day is not today. :-(

My true concern is the marginalization of MacRuby. Ruby developers have to be concerned not only with portability to old operating systems, but portability across operating systems. That MacRuby can rely on GCD is really great for MacRuby but does nothing whatsoever for Ruby at large.

I've worked my way up through the days of System 6 through to Mac OS X, I've seen the Macintosh platform marginalized entirely too often because developers in the wider world have to cater to the Least Common Denominator of technology... invariably it was an LCD that the Mac didn't implement because the platform had a better solution.  

I'd hate to see that happen to MacRuby as well.

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20100811/ac582909/attachment.html>


More information about the MacRuby-devel mailing list