Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

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:
  • Ruby at a sight (Score:2, Interesting)

    by oldhack ( 1037484 ) on Sunday November 22, 2009 @12:19PM (#30194026)

    I've gotten to use Python in the last couple of years - it's concise, expressive, whole lot less verbose (compared to Java, C) but bit problematic when trying for tighter design with bigger scopes.

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

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

    by iluvcapra ( 782887 ) on Sunday November 22, 2009 @01:20PM (#30194580)
    On Ruby's side:
    • 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.
    • A very loose syntax, with no syntactic whitespace.
    • A lot of mindshare and goodwill, centering on the Ruby on Rails framework.


    • Interpreter has been too damn slow for too long, but as you see here they're working on it.
    • it has a big learning curve for Python people. It's very different.
  • Re:Ruby Javascript (Score:5, Interesting)

    by caseih ( 160668 ) on Sunday November 22, 2009 @01:25PM (#30194622)

    Truly spoken like someone who doesn't know appear to know anything about Javascript, and has never programmed anything significant in it. Or Ruby either for that matter. If you do, you should have backed up your comments with real evidence and experience rather than just a few silly expletives.

    How does Ruby retain Perl's syntax but not the semantics? Sounds like you're making this up. Have you ever coded anything significant in Ruby? I don't care for Ruby's syntax either (the ability to call functions with () means you can pass functions around as parameters), but that doesn't make Ruby any less powerful as a full OOP, dynamic language.

    As for Javascript, try using it for something significant sometime. Write a firefox plugin or something. Javascript is here to stay and is the mainstay of client-end user interface code. Javascript is an extremely powerful and dynamic language, akin to smalltalk in it's power and flexibility. Javascript uses a prototype-based style of OOP that takes some getting used to but is very powerful indeed. Even better Javascript has functional and lisp-like qualities to it. Javascript has its warts. Some of them are apparent if you've ever used Gnome Seed with GTK binding, from what I've read.

    Despite all this I'd rather use python in the browser to script DOM objects, but ahh well. I'm also bitter that epiphany dropped Python in favor of Javascript for writing Epiphany plugins. Sigh.

  • Re:Ruby Javascript (Score:2, Interesting)

    by mythz ( 857024 ) on Sunday November 22, 2009 @04:04PM (#30195806)

    Sounds like the start of a Ruby fanboi crowd right here on /.

    Javascript is a powerful functional protyped-based language that is just as powerful as any other dynamic language. Libraries like jQuery show just how powerful and expressive the language can be while applications like google maps, gmail, etc show how capable the language is.

    It gets most of its negative sentiment from devs who don't understand it fully to appreciate its strengths. I would suggest using the resources on [] to learn some advanced techniques.

    For anyone who's interested I have a Class.js as described on my blog [] that simplifies using OOP in Javascript.

  • Re:Ruby Javascript (Score:5, Interesting)

    by Serious Callers Only ( 1022605 ) on Sunday November 22, 2009 @04:54PM (#30196232)

    Faggot, I've had the misfortune of using both JavaScript and Ruby (for web development and scripting) more than you likely ever have, and ever will.

    Or perhaps you're just some internet blowhard [] who likes to play to the peanut gallery? As you demonstrate very little in the way of knowledge in your posts, we'll never know. Your silly pronouncements of superiority in spite of very little knowledge of your interlocutor certainly make this a distinct possibility.

    Have you looked at the syntax of Perl and Ruby? The vast similarities should be pretty clear to everyone but the stupidest of mental retards...then fuck off. You'll need to use both Ruby and Perl to experience Ruby's weak semantics compared to Perl.

    You claimed that Ruby kept most of the syntax of Perl, but not the 'semantics' whatever that means in this context. Care to explain what you think it means, because you haven't so far?

    I've used both, and there are similarities, but there are also many significant differences. The object system in Ruby is far less a tacked on afterthought, you don't have to declare variables with a prefix so there is less line noise, everything is an object, nicer blocks, etc. There is also quite a tradition of choosing the way which seems least surprising and sticking to it, as opposed to 'There is more than one way to do it' in Perl - that means radically different library classes.

    The syntax of Ruby encourages legibility but keeps most of the shortcuts (in regexp for example) of Perl, while avoiding the horrific write-once possibilities of Perl which you seem to be so proud of (i.e. stuff can be done in fraction of a line of code); just because it can be done in half a line doesn't mean it should.

    There is a spectrum from code which is far too verbose to code which is far too succinct (i.e. unintelligible even to the creator after a certain period), and I'd say Perl can be pushed too far to the succinct side, but that's personal preference really. It's quite possible to write good Perl code, but that doesn't make it the be all and end all of scripting languages, indeed several other languages are now more suitable for scripting if you prefer an object-oriented approach.

    While I must agree with the sentiment that people who cheerlead for a certain language as radically different from all others need an education in the history and diversity of computer languages, to claim that Ruby is a bad copy of Perl without qualifying the statement betrays your lack of knowledge of the language, nothing more.

  • Re:Ruby at a sight (Score:1, Interesting)

    by Anonymous Coward on Sunday November 22, 2009 @08:43PM (#30197888)

    It'd be good if you'd actually been familiar with Python before comparing the two.

    Pervasively object-oriented

    Like Python.

    with anonymous classes

    This is convenient, but it's nothing more than a convenience, and not one you have to use often.


    Like Python.

    and proper private methods.

    Many Python programmers would probably consider this a bug, not a feature.

    1st-class blocks

    Here's something that's an actual, genuine advantage, and that I wish Python had.


    Like Python.


    This is another actual advantage, except one that's going to be used only rarely and has massive potential for making your code mostly impossible for humans to comprehend.

    A very loose syntax, with no syntactic whitespace.

    Again, a bug, not a feature.

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

    Python has a lot of mindshare and goodwill too. Understandably, though, it is not centered on RoR.

    it has a big learning curve for Python people. It's very different.

    No, it's very similar. The biggest differences are in syntax, not semantics.

    tl;dr most of your 'advantages' are either in Python too or for most Python programmers not advantages at all, and Ruby is overall not nearly as different as you seem to believe it is.

  • Re:no cardinal? (Score:1, Interesting)

    by Anonymous Coward on Sunday November 22, 2009 @11:32PM (#30199032)

    Let's translate that for everyone who doesn't speak the same language of bullshit that the Parroters all speak:

    "Cardinal is a dead project. You can find old, shitty code for it, but don't expect it to compile or do anything useful. Even a illiterate Republican from Arkansas could make a helpful contribution to this project."

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

    by RAMMS+EIN ( 578166 ) on Monday November 23, 2009 @04:03PM (#30205282) Homepage Journal

    ``You have heard of the concept of functional programming, have you? If functions are first-class citizens in data-type world, there is no separation between functions and data (or algorithms and data structures) anymore. So there is no point in a word like "metaprogramming". What those languages support, is metaprogramming.''

    Not quite. Metaprogramming [] is programs operating on programs. In that sense, there isn't actually a real need for a language to specifically support metaprogramming, because you can always have one program generate the source code for another program.

    The thing that metaprogramming lets you do is basically to build your own programming language. This is nothing new; in fact, the first compiler is an example of that.

    Now, languages differ in their support for metaprogramming in a single program. Some, like old versions of COBOL, don't allow any of it at all: everything you want your program to do has to be spelled out in the primitives the language provides. Most languages offer at least the ability to define ones own functions as an abstraction mechanism. It's debatable whether that counts as creating a new language, though, and most people I know would agree that it's not.

    Beyond functions, there are various mechanisms that allow more powerful abstractions. Function pointers (like C has) are one. Functions as first-class values (which you mention) are even more powerful. Indeed, using first-class functions, you can basically pass around pieces of behavior, which allows very powerful composition and abstraction. It _almost_ allows you to create your own control structures, and in many cases, the results are good enough that people don't feel the need to go any further.

    Another abstraction mechanism, and one that allows you to do metaprogramming, is macros such as those found in Common Lisp. These allow one to, basically, run a transformer function for certain patterns in the source code. The transformer function takes program code as input and produces program code as output, which is then used instead of the original code. The power of this lies mostly in the fact that you can define a macro for patterns that would occur often in your program, and let the macro write your code for you. Programs writing programs. Build your own language _inside_ the language you already have.

    Yet another construct is letting a running program change its own structure. This is something you can do in Ruby, where you can add and remove methods and variables at run time.

    Finally, there are some languages where the actual language implementation is available to and can be modified by your program. Taken to the extreme, this would allow your program to modify everything from how it is read to how it is translated to code to be executed.

    Long story short: metaprogramming goes far beyond what functions as first-class values gives you. Does that mean that the things you can do with first-class functions aren't metaprogramming? That's a matter of definition, but I would say that "What those languages support, is metaprogramming" and "there is no point in a word like "metaprogramming"" is a bit of a mischaracterization.

Mediocrity finds safety in standardization. -- Frederick Crane