Before we learn what we&#x2019;re learning, let&#x2019;s learn it first.
If you google &#x201C;Perl 6 Logo&#x201D;, you get this picture. Ruby is so awesome that people once think that we don&#x2019;t need Perl 6 anymore.
I want to start by telling you my learnings from the language aspect
by Simon Cozens.
After seeing rubyisms, I asked my self a question:
Can Perl programs have the same look and feel of Ruby programs?
There are several good parts of Ruby that I like...
The self keyword &#x2013; It doesn&#x2019;t always mean &#x201C;the current object&#x201D; like in java.
Those baz in there refers to different baz method.
The &#x2018;yield&#x2019; there means to invoke call the given block as a method.
One good use: Markaby
Another one Hot cocoa.
Ruby primitive data types are all Objects
It requires the statements to be written nicely, but it&#x2019;s nice not having to write semicolons sometimes.
Now you can define a class with keyword &#x201C;class&#x201D;
and define instance methods with keyword &#x201C;def&#x201D;
plus function prototype
See also that module
Export &#x201C;Array&#x201D; method as the constructor of Rubyish::Array.
boolean keywords returns the singleton object of their classes
Ruby hash has a lovely way to lazily initialize its content.
We have Memoize instead of being Lazy. But it doesn&#x2019;t read nicely.
And it doesn&#x2019;t happen automagically.
You might notice that the &#x201C;Hash&#x201D; returns a hash ref but not a hash. This is required because the it&#x2019;s a reference to a tied hash. So the magic under the table, is to use tie.
Let&#x2019;s write more crazy stuffs for this namespace.
Hey! It&#x2019;s a Web-two-point-o-ey resource allocation exchange website!
Volunteer added good styles
Being a website that helps people in such a tragedy, the website should...
The whole points for such website
Now it&#x2019;s over and the website basically shutdown...
I looked back and thought..
They see a problem/requirement and they uses the technologies they familiar with.
Heroku is so convenient and cheap for RoR deployment. This makes me, as a Perl programmer for year, really jealous.
So by the end of this talk, I conclude..
Learning From Ruby (Yapc Asia)
Kang-min Liu <firstname.lastname@example.org>