Ruby versus .Net? If Languages (and IDE's) were Vehicles... what would you be driving?
  
Ruby: Racing BicycleI'd describe Ruby as a racing bicycle. Highly maneuvrable, stylish, quick to launch etc. Yet not the greatest top speed, and some potential safety issues, due to the lack of compile-time type-checking. It's got its pros and its cons. .Net: Motor HomeDot Net is a house on freakin wheels. Has everything built in, good on the open road. But takes a while to get it started, less manuevrable in traffic and sometimes hard to park. In the context of this metaphor you see how ridiculous this question is: "What feature can we add to .net to give it a ruby-like appeal?" Or the metaphorical equivalent: "What feature can I add to my motor home to make it more like a bicycle?" You don't really choose between these two things. You use the right vehicle for the job. Some morons would insist on using the same type of vehicle in every scenario. Be they bike bigots, MotorHome bigots, or anywhere in between. Wait: but what about Ruby on rails? Ruby on Rails: Jet BicycleI picture a jet pack on a bicyclist's back. And i quickly found just such an image! I chose thise over a motorcycle because i figured that RoR doesn't fundamentally alter Ruby -- it changes the way it's used.
You know, at this point the metaphor is just ridiculous and I'm close to just deleting this whole entry. The jet pack implies more danger -- but the auto generated unit tests of RoR increase the safety, not the danger. If I upset some RoR fanboys, then all the better I guess. Those guys are so touchy. Go cry emo kid!
Image credits:
Side note: I actually spelt maneuvrable right without any help from the google spell check! Very proud right here ;-).
'Douglas Stockwell' on Thu, 19 Oct 2006 02:58:40 GMT, sez: And there's nothing stopping us from adding a bike rack to the motor home: http://plas.fit.qut.edu.au/Ruby.NET/
'lb' on Thu, 19 Oct 2006 03:09:00 GMT, sez: or better yet -- a rack of bike racks! RubyClr, Ruby.Net and IronRuby for starters.
Also in the script world, we throw on
IronPython, Powershell....
'Anonynmous Coward' on Thu, 19 Oct 2006 06:49:48 GMT, sez: In which scenario is .net the solution and ruby isn't? The only one coming to my mind is distributing closed source/binaries.
'lb' on Thu, 19 Oct 2006 07:16:14 GMT, sez: >In which scenario is .net the solution
>and ruby isn't?
when processor cycles matter a lot more than developer happiness.
i don't think i'm revealing any secrets here when i say that ruby's 'top speed' is slower than .net's 'top speed', just like the motor home versus the bicycle. But for maneuvrability on the fly the ruby/bicycle is faster.
'"Close Ruby Encounters of the .Net Kind"' on Thu, 19 Oct 2006 07:18:25 GMT, sez: (quote)
'Queensland University of Technology Professor John Gough, who is leading the Ruby.NET implementation, said, "Ruby implementations are slow, even compared to other scripting languages. This is the price that is paid for the extremely dynamic semantics of the object type system, and the brute force approach to implementation by a tree-walking interpreter. The language has gained a popular following because of its expressivity, not its runtime performance."'
'A.Coward 2' on Thu, 19 Oct 2006 07:31:43 GMT, sez: Bullshit. Ruby is exaqctly as fast as .Net. .net is compiled into byteccode and run from there -- Ruby uses type inferencing and is interpereted they are the same speed -- but ruby is better in every conceivable way:
more expressive in its language -- you use the language of thought itself!! script blocks and hashes too -- and better libraries.
add in ruby on rails and you need never go back to your motorhome!!
'paul stovell' on Thu, 19 Oct 2006 07:51:18 GMT, sez: If ruby is a bicycle and has some safety problems, surely strapping a rocket on your back makes it even worse!
RoR is volatile!
'lb' on Thu, 19 Oct 2006 09:25:45 GMT, sez: @paul:
yeh, a metaphor is like a fish in a tree.
nonsense.
'Kev' on Thu, 19 Oct 2006 10:35:00 GMT, sez: FAO: 'A.Coward 2'
"Bullshit. Ruby is " ...now now....lets not get into a pointless religious war over my language is better than yours...but...
.NET CLR languages are compiled into IL which is then JIT compiled to native code at runtime or upfront using NGen.
I'm sorry to disappoint but interpreted Ruby *is* much slower than JIT compiled code.
As far as the Ruby libraries go, I think you really need to dig through the Framework and you'll find that it's as comprehensive and rich as the Ruby Standard Libary.
That said, as a .NET dev, Ruby on Rails has piqued my interest and I think it's going to be a hit. What needs to happen is getting the IDE/Debug environment polished to the point where my productivity is as good as that with the MS tools.
So far I've tried Arachno and RadRails but the hoops and incantations to get it to hang together nicely just get in the way at the moment.
Kev
'SimonH' on Thu, 19 Oct 2006 11:11:13 GMT, sez: You could add a motor home with a carbon fibre uni-cycle rack: F#. An "everything-including-the-kitchen-sink" framework and a language which, while nippy and expressive, when you're learning it, is like knitting fog. And juggling. The same time.
'SimonH' on Thu, 19 Oct 2006 11:14:30 GMT, sez: There's also that "space-age" concept car from the 1950 Geneva motor show: Lisp. It's been the Next Big Thing[tm] for 50 years, but no one you speak to knows where the door handles are.
'http://' on Thu, 19 Oct 2006 13:46:34 GMT, sez: At the moment I seem to spend half my time writing goes-a-bit-faster stuff in C# using VS2005 and the other half hacking at Ruby scripts in whatever comes to hand. I enjoy both activities, honest!
I do wish I could use the expressiveness of Ruby within the .NET framework more easily and with more runtime speed, though: there's stuff that's much more easily written in Ruby but it's waaay too slow.
So I'm playing with the www.sapphiresteel.com beta (full-on Ruby editing in the VS IDE with syntax colouring, intellisense and Rails support, amongst other features) and looking forward to the Ruby.Net compiler getting to the same level as IronPython, at which point we should be able to work with Ruby in pretty much the same way as we might with C# or VB. Add in some of the cool dynamic stuff that's supposed to be coming in the next CLR and things get really interesting.
'Justice~!' on Thu, 19 Oct 2006 15:10:57 GMT, sez: Man, your experiences w/ Sapphire Steel sound so much more positive than my own. I found it a little bit clunky and I definitely didn't see much evidence of Intellisense. For syntax highlighting I can get the same thing out of Notepad++!
Each to their own I suppose!
My explorations with Ruby, though they are infantile first steps, really have me impressed as to its power and versatility. I'm not ready to start tearing my clothes, writing poetry and talking about free love all the time but it definitely has opened my eyes.
'Anonynmous Coward' on Thu, 19 Oct 2006 16:42:06 GMT, sez: If you need performance you can always write the bottlenecks in C or even in CLR (see RubyCLR) and interface these with Ruby. I even do my windows/forms programming in ruby.
Speaking of .net, I once wrote a simple application in C# that sits in tray and checks some web service every half an hour or so. The memory footprint was like 10 Megabytes.
'WaterBreath' on Thu, 19 Oct 2006 19:48:59 GMT, sez: @SimonH:
There are plenty of people who know and can use LISP. The question is whether they can use it for anything really truly useful to the average Joe.
So I think a better analogy may be that LISP is an awesome car in a world without roads or mechanics. It's a great invention, but it's a pain in the butt to use because there's nearly no support infrastructure, and frankly there are some places it just won't go.
'jekke' on Fri, 20 Oct 2006 15:28:49 GMT, sez: A guy on a bicycle with a jetpack would never be able to stay upright. It would be like pedaling full speed down a steep hill with no brakes. You'd be fine for about three seconds, then you'd hit a pebble or some tiny imperfection in the road and you'd go flying ass-over-teakettle like the apocryphal Mustang driver who slapped a JATO on his roof. By the time you got to the bottom of the hill, you'd be a big pile of hamburger wrapped in the fused frame of your precious racing bike. If you're lucky, the guy in the motor home might stop, turn off the jetpack, and try to salvage the mess you made. But, if I'm the one driving, I'm more likely to keep going, pointing and laughing the whole way.
'Michael Leung' on Tue, 24 Oct 2006 15:57:23 GMT, sez: Now, I didn't read every comment, so someone might have already mentioned what I am about to say. If that is the case, I apologize for my laziness.
Coming over to Ruby and Rails developement from .NET, I would certainly agree that .NET is faster. That's more or less undeniable.
However, there are projects in the works (YARV for one http://www.atdot.net/yarv/) that aim to recitfy this fact.
I agree with Leon when he basically states (in not so many words), that you have to choose the right tool for the job. If you client is dead set on a Windows Based smart client, chances are you're not going to use Ruby.
Good post Leon.
(comments closed due to spam, damn)
|