MESSAGE
DATE | 2014-08-30 |
FROM | Ruben Safir
|
SUBJECT | Re: [NYLXS - HANGOUT] Ruby groups
|
On 08/29/2014 10:43 PM, Ron Guerin wrote: > - Ron > The way I'm seeing Rails spoken of lately, it has become the dreaded "legacy software". Ruby on the other hand, is in some very hot things like Puppet and Chef.
I'm looking over the into of the textbook Programming Ruby 1.9 for which I have an ebook for. right away, aside from the boosterism, the language has some interesting features and syntax troubles. Lets see my first program is
#!/usr/bin/ruby -w
puts "Whatever nonsense" puts "It is now #{Time.now}"
That is indeed a #{} interpolation
Program 2
#!/usr/bin/ruby # def say_goodnight(name) result = "Good night, " + name return result end
def say_goodnight_title(name) result = "Good night sir #{name.capitalize} \n" return result end
# Time for bed... puts say_goodnight("John-Boy") puts say_goodnight("Mary-Ellen") puts say_goodnight("Talyah") puts say_goodnight("Talyah").length puts say_goodnight("Talyah").index("T") puts say_goodnight_title("dovid shimon safir")
No brackets. The brackets are def/end for some things at least.
Should we start a workgroup? I have classes at this point on Tuesday, Wed and Thursday Nights
I'd like to also study linear algrabra. I have a few textbooks. It is important for comp.sci and not part of my program.
Ruben
|
|