Post One: It Begins
Given that I use a Mac, Ruby is included at shipping. To access it, simply open Terminal and type "irb", without the quotes.
Ruby is an object-oriented, general-purpose language, which was made by Yukihiro Matsumoto in 1993. Matsumoto was dissatisfied with the object-oriented languages of the day, which he either considered flawed, like Perl, or not true object-oriented languages, like Python.
I learned about Ruby some time ago, but I did not realize its utility until the Health IT conference/lecture/thing, where many of the professionals who spoke said they used Ruby. After this, I went to Wikipedia and then Ruby-Lang.org, which told me everything I wanted to know.
Anyways, at first glance, Ruby seems quite like Python in structure. The first Terminal shell reacts in much the same way, although there are some immediate differences such as the syntax and the fact that the values are also returned -- and things like "puts()" (the same as "print()" in Python and "System.out.println()" in Java) return not only the printed line but also a "=> nil".
And as such, here's the famous "Hello World" in Ruby form:
The first command does not print "Hello World", but merely returns the value. The purpose was to demonstrate what a return looks like. The second command prints "Hello World" -- notice the lack of quotation marks and the return of nil.
So onward into the mystical world of Ruby, where I shall be uploading both on a rigid schedule and whenever the mood strikes me!
See you sometime before the fifth,
Jamie
Anyways, at first glance, Ruby seems quite like Python in structure. The first Terminal shell reacts in much the same way, although there are some immediate differences such as the syntax and the fact that the values are also returned -- and things like "puts()" (the same as "print()" in Python and "System.out.println()" in Java) return not only the printed line but also a "=> nil".
And as such, here's the famous "Hello World" in Ruby form:
The first command does not print "Hello World", but merely returns the value. The purpose was to demonstrate what a return looks like. The second command prints "Hello World" -- notice the lack of quotation marks and the return of nil.
So onward into the mystical world of Ruby, where I shall be uploading both on a rigid schedule and whenever the mood strikes me!
See you sometime before the fifth,
Jamie