March 2008

RE: Haiku.rb

Here’s the follow-up I promised you, but before we begin I would like show you The First Poem Written for Computers:

<>!*''#
^"`$$-
!*=@$_
%*<>~4
&[]../
|{,,SYSTEM HALTED  

For you somewhat cybernetically challenged, it goes something like this (using the proper cyber-names):

Waka waka bang splat tick tick hash,
Caret quote back-tick dollar dollar dash,
Bang splat equal at dollar under-score,
Percent splat waka waka tilde number four,
Ampersand bracket bracket dot dot slash,
Vertical-bar curly-bracket comma comma CRASH   

A bit about falling (by evan)

Evan Short posted a nice one. It’s not exactly a haiku, but that’s the most awesome thing I’ve seen in this second1:

#- - - - - - - - - - - - - -#
#                           #
#    a bit about falling    #
#       by: evan            #
#                           #
#- - - - - - - - - - - - - -#

# first of all:
def it_is_ok
#   ok?
          "ok."
end

# but:
#   when a thing
def   hits_the_ground_from the_height
#       if we can assume that the
            remaining_energy = the_height

#   then we can say 
      if remaining_energy
          that_the "thing uses some of the #{remaining_energy} to bounce"
#            and
            rises_to the_next_peak_from(the_height)

      else
#     the thing just
      rests
#     and that is the
      end # of it
end

# it should be noted that:

#    in order to determine the
def    the_next_peak_from the_old_height;
         unless the_old_height < 0.01
#           we assume that
       new_height = the_old_height * 0.5
         else
#          the thing is no longer bouncing
#             percievable to this observer, anyway...
  end
end

# also, 
#    when a thing
#      is dropped
def     from a_height # it 
              hits_the_ground_from a_height
end

# likewise,
#    when a thing
def   rises_to a_new_height
#       then it will fall
          from a_new_height

end

#                 but...
# and most importantly.
#           when the time is just right,
#        the thing just
def          rests;
                  and_we_know it_is_ok
                 
                      #the
                       end

#----------------------------------------------#

                        alias :and_we_know :puts
                        alias :that_the    :puts 

Here it is!

herval posted a nice one:

question = !!(:to_be or not :to_be)  

And I like how smackywentz defines Ruby on Rails:

class RubyOnRails
  has_many :features, :through => :bugs
end ##Haiku model

That’s all‽

I have to say I’m quite disappointed. Yes, I’m very happy for 41 up-votes2, but I thought our community was creative. Maybe we just like reading the haiku, not creating them…

Anyway: I’ve enjoyed these two posts a lot. These small Ruby-snippets really touches my soul. Let me end this post with the haiku that started it all:

      "eyes".scan /the_darkness/
catch( :in_the_wind ) { ?a.round; "breath" \
        or "a".slice /of_moon/ }