Thread: Ruby

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912

    Ruby

    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).

  2. #2
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    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.
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    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.

  4. #4
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    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.

  5. #5
    the Great ElastoManiac's Avatar
    Join Date
    Nov 2005
    Location
    Republika Srpska - Balkan
    Posts
    377
    Well you could use it for fun, nothing more...
    lu lu lu I've got some apples lu lu lu You've got some too lu lu lu Let's make some applesauce Take off our clothes and lu lu lu

  6. #6
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    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
    moo.fx
    Behaviour
    Markdown

    Quote Originally Posted by ElastoManiac
    Well you could use it for fun, nothing more...
    Listen to me: you are dum. ok
    Last edited by Mad_guy; 12-24-2005 at 05:33 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  7. #7
    Registered User
    Join Date
    Jul 2004
    Posts
    68
    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.

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    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.

  9. #9
    Registered User
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    64
    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:
    Code:
    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.

  10. #10
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    Oh I hadn't looked at SciTE yet - but it was in the package. Nice editor, for a lot of languages!

  11. #11
    Registered User
    Join Date
    Jun 2005
    Location
    Stockholm, Sweden
    Posts
    64
    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 which works very well.

  12. #12
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    Quote Originally Posted by gsoft
    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.

    Quote Originally Posted by sean_mackrory
    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.
    Last edited by Mad_guy; 12-25-2005 at 09:44 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  13. #13
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Hey mad guy heres an idea. Go run into a wall and shutup.
    Woop?

  14. #14
    Disrupting the universe Mad_guy's Avatar
    Join Date
    Jun 2005
    Posts
    258
    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. 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 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.


    Quote Originally Posted by prog-bman
    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.
    Last edited by Mad_guy; 12-25-2005 at 09:42 PM.
    operating systems: mac os 10.6, debian 5.0, windows 7
    editor: back to emacs because it's more awesomer!!
    version control: git

    website: http://0xff.ath.cx/~as/

  15. #15
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    btw.
    Woop?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. The value of learning a new programming language
    By h3ro in forum General Discussions
    Replies: 21
    Last Post: 06-13-2009, 01:48 AM
  2. Ruby for game programming
    By CChakra in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-14-2008, 01:15 PM
  3. Ruby programming language
    By t3chn0n3rd in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 02-11-2008, 10:25 PM
  4. Ruby
    By MethodMan in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-11-2002, 04:51 PM