PDA

View Full Version : Ruby



sean
12-24-2005, 03:58 PM
My brother-in-law got me hooked on Ruby - seems like a pretty fun language (though I probably wouldn't use it for much more than recreational programming). I was just curious about who here has tried Ruby and what there experiences were (specifically with using FreeRIDE).

Dae
12-24-2005, 04:13 PM
What got you hooked? I skipped through a tutorial and it looks a lot like Java with different syntax.

Something about a not having a semicolon ending statements bothers me deeply.

sean
12-24-2005, 04:18 PM
It's just a very intuitive syntax. It's slower than molasses (FreeRIDE is the IDE disributed for Windows and is written in Ruby - SOO SLOOW), but just for fun little programs I think it's perfect.

The semi-colon thing is more a matter of style, I think. You just have to make sure you only put one statement per line, and for readable code, that's a good idea anyway.

edit: The other thing I like about it is that it's completely object-oriented, but you don't need to write out a class definition and all the over header just to print something to the screen - everything expands as you need it.

Dante Shamest
12-24-2005, 04:42 PM
I think it's found a niche for certain web applications. It is quite slow, because there's alot of runtime syntactic trickery going on. It's a great scripting language, but I wouldn't use it for pure desktop programs.

ElastoManiac
12-24-2005, 04:54 PM
Well you could use it for fun, nothing more...

Mad_guy
12-24-2005, 05:29 PM
Try Ruby on Rails. It's the best thing ever, I swear to you. You'll probably never want to try another web scripting language ever. It's faster, funner, easier, and the applications pay off a lot more in the long run when using Rails.

OTHER TECHNOLOGIES I SUGGEST YOU TRY OUT WITH RAILS:
Prototype.js (http://prototype.conio.net/)
moo.fx (http://moofx.mad4milk.net/)
Behaviour (http://bennolan.com/behaviour/)
Markdown (http://daringfireball.net/projects/markdown/)


Well you could use it for fun, nothing more...
Listen to me: you are dum. ok

gsoft
12-24-2005, 06:17 PM
Listen to me: you are dum. ok
Do you mean dum as in acronym?
DUM - Database Upgrade Manual
DUM - Desktop Unified Messaging

Im sure there is more but thats all I got. Or do you mean dum as in dumb, if so Id suggest making sure you do a spell check before posting.

sean
12-24-2005, 10:22 PM
Listen to me: you are dum. ok

Usually the drop in performance when using a high-level language is negligible but this is pathetic. Visual Studio.NET 2003 takes about the same amount of time to load as FreeRIDE. I'm still going to use it for recreational programming, but you'll wanna be wary of the word, "dum" in this case.

kungtotte
12-25-2005, 05:17 AM
Ruby is slow. Very slow.

They are working on Ruby 2.0 which will include a bytecode compiler. The development release is currently boasting a 30-40% increase in performance over the 1.8x series of Ruby. According to what I hear anyway, I'll wait until 2.0 is released before I make any comparison.

I use Ruby as much as I possibly can, but I'm also a realist.
Ruby is too slow for a lot of things, but it's fast enough for a lot of things. I use it because it has fewer hoops to jump through to get the job done.

Also, with regards to semicolons: Use them if it makes you feel happy. The following is all valid Ruby syntax:


def some_method(foo)
temp = foo * 3
puts temp / 3
end

def some_semicolon_method(bar)
temp = bar * 3;
puts temp / 3;
end


Also, I suggest using something other than FreeRIDE. I use SciTE and it works perfect.

sean
12-25-2005, 09:23 AM
Oh I hadn't looked at SciTE yet - but it was in the package. Nice editor, for a lot of languages!

kungtotte
12-25-2005, 11:58 AM
Yeah, and it works very well cross-platform. I use it on both Windows and Linux (my primary platforms), and it works the same way on both. Which is a big plus!

I do advice you to download a newer build from http://www.scintilla.org/SciTE.html however. If I recall correctly the one in the Ruby installer is quite old.

I use a CVS Build (http://amip.tools-for.net/SciTE-CVS.exe) which works very well.

Mad_guy
12-25-2005, 01:19 PM
Im sure there is more but thats all I got. Or do you mean dum as in dumb, if so Id suggest making sure you do a spell check before posting.
Yes, because as we all know there is not any possible way that a person could have misspelled such a word on purpose. Obviously, I need someone of such superior intelligence and as pedantic as you to point such a thing out. I am shocked and in awe at the sight of your MIGHTY spelling powers.


Usually the drop in performance when using a high-level language is negligible but this is pathetic. Visual Studio.NET 2003 takes about the same amount of time to load as FreeRIDE. I'm still going to use it for recreational programming, but you'll wanna be wary of the word, "dum" in this case.
You can honestly say whatever you want about it - but Rails is a great framework, and very powerful. I suggest you try it out sometime.

prog-bman
12-25-2005, 02:09 PM
Hey mad guy heres an idea. Go run into a wall and shutup.

Mad_guy
12-25-2005, 02:46 PM
I forgot one thing - the Rails framework (and ruby itself) is really gaining steam right now, so it'd probably be good to give it a good shot, even if you don't like it or it's slow, Ruby books this year alone shot up 1552% in sales. (http://radar.oreilly.com/archives/2005/12/ruby_book_sales_surpass_python.html) Chances are, if the Ruby 2.0 release comes with a decent speed increase, we can probably expect to see Ruby (and rails as well) become quite a bit more popular than it is right now (it's happening already judging on how high the book sales have gone.) You can ignore ruby entirely for development of all kinds if you want, and that's fine. I'm suggesting you give it a shot for web, because it has become quite good at that.

As for speed - which is obviously the big issue here -, well, I never focus on speed when looking at a programming language, mainly because when you think about it there's almost no such thing as a fast language really. It all depends on the parser or how well the compiler can optimize your workings, because some languages have quite a bit more overhead than others (take for example, VB, it's a pretty high level language, the compiler for it has an awful lot of overhead to go through before it outputs the executable, which isn't guaranteed to be of super mega high quality, Delphi is just as simple and powerful of a language, but the compiler is quite fast and quite powerful producing high quality executables.) Even the lowest level languages can seem slow depending on the circumstances of your environment (you can't just say 'Program X written in C will work very very fast and get done in about 10 minutes' because it depends on your environment and what's running, too many variables to factor in.) Although it is quite noticable, Ruby is very slow compared to other languages, maybe if Ruby supports C built extentions now or sometime in the near future (never looked into it) someone can build an equivilant of the Python Psyco (http://psyco.sourceforge.net) module ;>

Plus I like to focus more on what I need or should use (i.e. language) rather than what I might prefer to work with. Sometimes C might be better to work with, sometimes Python, sometimes Perl, sometimes Java, maybe Delphi, you get my point.



Hey mad guy heres an idea. Go run into a wall and shutup.
Clearly, I am outmatched and must listen to you, the greatest arbiter in the known galaxy.

prog-bman
12-25-2005, 03:04 PM
:D btw.

Mad_guy
12-25-2005, 03:05 PM
:D btw.
<3 2u2

cboard_member
12-26-2005, 04:50 AM
I first tried Ruby last year (even bought a book, "pickaxe"!) and thought it was ok. The heavily OO approach was the main attraction for me. Didn't really find anything to complain about. I like the super-free style layout options, like being able to leave out ';' at the end of the lines amongst other things.

I haven't really used it for very much; just had a fiddle with it when I was looking for another language to learn. Actually I haven't used it since I last had Fedora installed.

New years resolution: Learn a new language, preferable Simula, Smalltalk, Eiffel or Ada (properly, I started to a couple of times but...).

adrianxw
12-26-2005, 05:02 PM
>>> Something about a not having a semicolon ending statements bothers me deeply.

Odd isn't it. I worked with Fortran for many years, and when I was introduced to C, thought how odd it was that the compiler needed to be told where the line ended, and could not work it out for itself. Made the language appear "weak".

ElastoManiac
12-27-2005, 10:11 AM
I like ";", makes the code look more complicated to beginners. hahaha
especialy at the end of class or struct.