Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

The State of Ruby VMs — Ruby Renaissance 89

igrigorik writes "In the short span of just a couple of years, the Ruby VM space has evolved to more than just a handful of choices: MRI, JRuby, IronRuby, MacRuby, Rubinius, MagLev, REE and BlueRuby. Four of these VMs will hit 1.0 status in the upcoming year and will open up entirely new possibilities for the language — Mac apps via MacRuby, Ruby in the browser via Silverlight, object persistence via Smalltalk VM, and so forth. This article takes a detailed look at the past year, the progress of each project, and where the community is heading. It's an exciting time to be a Rubyist."
This discussion has been archived. No new comments can be posted.

The State of Ruby VMs — Ruby Renaissance

Comments Filter:
  • Re:Ruby Javascript (Score:2, Informative)

    by korney ( 1469497 ) on Sunday November 22, 2009 @12:14PM (#30193976)
    That's unlikely to happen. RJS with Rails is a nice alternative though.
  • Re:Ruby at a sight (Score:4, Informative)

    by Fred_A ( 10934 ) <fred@NOspam.fredshome.org> on Sunday November 22, 2009 @12:29PM (#30194110) Homepage

    What are the pluses/minuses of Ruby compared to Python?

    Short version : Same Same but different.

  • Re:Ruby at a sight (Score:5, Informative)

    by RAMMS+EIN ( 578166 ) on Sunday November 22, 2009 @01:06PM (#30194448) Homepage Journal

    ``I've gotten to use Python in the last couple of years - it's concise, expressive, whole lot less verbose (compared to Java, C)''

    On those issues, Ruby isn't very different. In fact, I think the reason there are so many heated debates about which of Ruby and Python is better is exactly because, all things said and done, the differences don't matter that much and your preference is largely a matter of taste.

    ``but bit problematic when trying for tighter design with bigger scopes.''

    Ruby borrows features from other great languages like Lisp and Smalltalk, which allow it to more naturally express paradigms other than imperative, and classes-and-methods. On the other hand, there is something to be said for Python's "one way to do it", as well.

    Comparing Ruby and Python, I find that Python programs tend to have cleaner syntax (fewer hieroglyphs in the code) whereas Ruby programs tend to have cleaner structure (program more closely expresses what is being done because the language is multi-paradigm).

    For programming in the large, both languages have about the same advantages and disadvantages: you have metaprogramming, which is a big plus, but no static checking, which is a minus. Personally, I feel like metaprogramming is an integral part of Ruby programming, whereas, in Python, it runs contrary to the spirit of "one way to do it", but Python does support metaprogramming and plenty of people are putting it to good use.

    ``What are the pluses/minuses of Ruby compared to Python? Has it dumped all its Perlism now? (I looked at Ruby briefly years back).''

    Ruby definitely hasn't dumped its Perlisms. That's both a blessing and a curse: on the one hand, it allows for ugly programs, on the other hand, sometimes it's useful to say in a few hieroglyphs what would otherwise require lots of boilerplate code. Again, taste plays a role, but I must note that many languages that forgo Perlisms usually end up adopting regular expressions anyway, only with less power and more leaning toothpick syndrome. Given the choice, I'd rather have first-class regular expressions like Perl, even though they are the worst offenders in making Perl code look like line noise.

    Basically, if you like Python for its purity, you'll probably detest Ruby. It's messy. But if you like Python for its expressive power, you may like Ruby because it offers you more of that. If you like Python but want static typing, don't bother with Ruby, because it won't give you that. You might be better off trying OCaml, Haskell, or Common Lisp (with appropriate compiler) in that case. If you're looking for speed, those are better options, too.

  • Re:Ruby at a sight (Score:4, Informative)

    by ultrabot ( 200914 ) on Sunday November 22, 2009 @01:21PM (#30194588)

    In fact, I think the reason there are so many heated debates about which of Ruby and Python is better is exactly because, all things said and done, the differences don't matter that much and your preference is largely a matter of taste.

    Indeed. It probably won't make much sense to switch from ruby to python or python to ruby, unless you get paid to do that.

  • Re:Ruby at a sight (Score:4, Informative)

    by Megaweapon ( 25185 ) on Sunday November 22, 2009 @04:28PM (#30196024) Homepage

    A lot of mindshare and goodwill, centering on the Ruby on Rails framework.

    Nothing against Rails, but there's a lot more to Ruby and the Ruby community than that one web framework.

  • by Anonymous Coward on Sunday November 22, 2009 @05:21PM (#30196402)

    This is an exciting time not only for Ruby, but for other dynamic languages as well, especially javascript and python.
    For example python has a number of different implementations on the works that are starting to show good results in performance improvements.
    Pypy (python in python) is already able to generate very fast numerical code, its JIT is making progress at good pace since the last months, and a new release is expected for the end of January.
    Unladen Swallow is a Google sponsored project which aims to speed up the current cpython implementation, by implementing a jit with llvm, amongst other modifications. Their goal is to speed up current applications used by google in a relatively short time (they don't want to mantain a python implementation forever, this is an incremental improvement of cpython), and they concentrate in web applications that use c extensions.
    Psyco, which is an extension module which speeds up python by a large margin and has been around for some years, has been revamped to version 2 and shows significant improvements as well.
    We can also mention Ironpython, the implementation of python in .NET which opened the door to IronRuby.
    And there are many other minor efforts and one-guy projects that may give us surprises in the near future. For example CrossTwine linker (for python and ruby), Hotpython ( a new virtual machine built from the ground up to be fast), etc, etc...

    As for javascript, those who thought it would be a dead language by now were plainly wrong. Google's V8 is a success and runs code at holy crap speed. Safari's Nitro followed suite.

  • Re:Ruby at a sight (Score:2, Informative)

    by robbrit ( 1408421 ) on Sunday November 22, 2009 @10:39PM (#30198674) Homepage
    pygame [pygame.org] comes to mind.
  • Re:no cardinal? (Score:2, Informative)

    by chromatic ( 9471 ) on Monday November 23, 2009 @12:48AM (#30199442) Homepage

    Let's translate that....

    The dominant meaning of "translate" used by native English speakers generally implies some non-zero amount of veracity.

    Cardinal [github.com] hasn't had much activity in the last couple of months because there have been only a couple of people working on it lately, and one of them started a new job at the end of September.

    Even so, it exists, it passes tests, and it can interoperate in the same Parrot process with Perl 6 and Perl 5 code. (I suspect it can work with other Parrot-hosted languages as well, but I haven't tried.)

  • Re:Ruby at a sight (Score:3, Informative)

    by DragonWriter ( 970822 ) on Monday November 23, 2009 @03:47PM (#30205152)

    Pervasively object-oriented, with anonymous classes, metaclasses and proper private methods. However, if your keyboard doesn't have a period, you could be convinced it pervasively functional, since it has 1st-class blocks, closures and continuations.

    Continuations have been removed from the core of Ruby, though they remain a library feature available with the main Ruby 1.9 implementation. They were removed for a number of reasons -- one is that no one was using them directly in production code (in part, that was a result of the fact that the pre-1.9 implementation was horrendously inefficient and produced memory leaks), and other features that they were in theory useful for (and the one thing in the standard library that leveraged them) were replaced with a more limited, tightly focussed coroutine feature (Fibers).

    With the cleaned-up continuation implementation in 1.9, if enough of the alternative interpreters do implement them as well (I think its on the plans for some, though not JRuby, the main alternative) and they get much use, I can see them working back into the language core.

E = MC ** 2 +- 3db

Working...