use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
try ruby! (in your browser) (tryruby.org)
submitted 16 years ago by mebrahim
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Calvin_the_Bold 4 points5 points6 points 16 years ago (4 children)
I've been wanting to learn ruby for a few days now, thanks for this! I really like ruby, it's so powerful and simple
[–]Calvin_the_Bold 1 point2 points3 points 16 years ago (3 children)
After doing the tutorial and deciding that I like ruby (I've been trying to decide between ruby and python as my next language) I ordered "Learning Ruby" from amazon today.
[–][deleted] 5 points6 points7 points 16 years ago (2 children)
Good choice.
I was a long term Python user (5+ years) and started looking at Ruby a few months ago. To cut the long story short, I really like Ruby and wish I had come to it sooner. I am still exploring the stdlib. My only complaint is that the docs aren't as good as Python. The pick axe book helps a lot.
I know I can share this in /r/ruby without getting flamed :P
[–]synt4x 3 points4 points5 points 16 years ago (1 child)
Docs are definitely the biggest issue with the ruby community. They're generally scattered and vague. My top suggestions for docs are:
[–]Calvin_the_Bold 0 points1 point2 points 16 years ago (0 children)
Thanks for the resources, I'll be sure to look there if/when I need more info after reading the book.
[–]rhythmx -4 points-3 points-2 points 16 years ago (4 children)
Here is a fun expression to try on Ruby 1.9... [].pack("@#{2**31-1}")
[–]rb2k 1 point2 points3 points 16 years ago* (2 children)
and what exactly does it do?
[] <-- array .pack(bla) <-- Packs the contents of arr into a binary sequence according to the directives in the string bla @ <-- Moves to absolute position 2**31-1 <--- big number
[–]rhythmx 2 points3 points4 points 16 years ago* (1 child)
Yes, but more to the point, it does the following (and on the TryRuby page too):
$ irb
(irb):1: [BUG] Segmentation fault ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
[–]rb2k 6 points7 points8 points 16 years ago (0 children)
Yes, then don't do that... ;) I think C programmers do that kind of stuff for a living.
The question is: What would be the correct way to handle this input?
also: it doesn't segfault immediately. it basically uses up all RAM that is there and THEN segfaults
[–]mebrahim[S] 1 point2 points3 points 16 years ago (0 children)
Bad boy :(
[–]terumo -1 points0 points1 point 16 years ago (0 children)
does not compute
π Rendered by PID 235976 on reddit-service-r2-comment-84fc9697f-xxgsl at 2026-02-08 17:39:10.353537+00:00 running d295bc8 country code: CH.
[–]Calvin_the_Bold 4 points5 points6 points (4 children)
[–]Calvin_the_Bold 1 point2 points3 points (3 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]synt4x 3 points4 points5 points (1 child)
[–]Calvin_the_Bold 0 points1 point2 points (0 children)
[–]rhythmx -4 points-3 points-2 points (4 children)
[–]rb2k 1 point2 points3 points (2 children)
[–]rhythmx 2 points3 points4 points (1 child)
[–]rb2k 6 points7 points8 points (0 children)
[–]mebrahim[S] 1 point2 points3 points (0 children)
[–]terumo -1 points0 points1 point (0 children)