
A letter to my daughter, Augusta, in ruby - pacbard
http://jpfuentes2.tumblr.com/post/39935683274/a-letter-to-my-daughter-augusta-in-ruby
======
sutro
I once wrote a letter to my son in C++.

We don't talk anymore.

~~~
alexkus
and you got divorce papers from your wife written in Objective-C ? (Or maybe
Go?)

~~~
codygman
Ick, comparing Objective-C to Go?

~~~
alexkus
No, it was a (poor) pun on the language names...

------
shmerl
Reminds me of this obfuscated C classic: <http://www.ioccc.org/1990/westley.c>

If you want to compile it, replace each "1s" with "is" in the code and compile
for example like this:

gcc -Dis=1 westley.c -o westley

(or just put is=1; in the beginning with the same substitutions).

Normal compilers don't like 1s notation for short. Then run the result with
some integer parameter ;)

------
gesman
Here's a bit shorter version of this amazing letter:

puts 'Augusta, we <3 you!'

~~~
DanWaterworth
Here's a shorter version of love.rb:

    
    
        class Augusta; end
    
        def a_letter(*args, &blk)
          puts 'Augusta, we <3 you!'
        end

~~~
matthuggins
Not quite, you'll run into various class/modules/methods not found.

~~~
DanWaterworth
Try it.

------
emillon
That's cute, but most of the "magic" is hidden behind the require line. That's
somewhat breaking the rules I think (compare that to Perl poetry such as the
Black Perl).

------
minikomi
Nice! Reminds me of judofyr's "On Camping vs Sinatra"

<http://timelessrepo.com/on-camping-vs-sinatra>

~~~
judofyr
I was about to say that it reminds me of the Haiku's I've been collecting:

<http://timelessrepo.com/haiku>

Or Tribute (that I wrote):

<http://timelessrepo.com/tribute>

------
liberatus
Yeah but the maintenance overhead on such complexity... Just wait till the
teenage years!

Nah, given the design decisions inspiring this codebase, I don't have any
reason to believe your daughter will have any challenge extending and reusing
its functionality once she's grown up. ;-)

------
kachhalimbu
I'm tempted to fork this, change name to my daughter's name and frame it or
make a Tee. Not sure if the author would think of it as disrespectful.

~~~
devopstom
Hey, it's Open Source, right? LICENSE seems to confirm this.

------
smegel
That guy who said Javascript is the new Perl has been proven wrong.

~~~
nwmcsween
This has nothing to due with obfuscation but the malleability of ruby itself,
read the required file he made a DSL.

------
mattyod
A little more flippant but I wrote this version of Goldilocks in JavaScript a
little while back: <https://gist.github.com/3755270>

~~~
draegtun
Nice. It inspired me to spend some free time I had today doing same thing in
perl 5 & 6 - <https://gist.github.com/4542918>

------
cupcake-unicorn
Blah, this is not a good way to get back into Ruby. I get that most of it is
just fluff, but can anyone break it down a little? Really stretching the
syntax.

~~~
jpfuentes2
Are there specific pieces you don't understand? Or would you want a
walkthrough?

~~~
cupcake-unicorn
Just kind of a walk-through. I think part of it is that I can't fully force
myself to read it as code when it's written poetically like that, so even
syntax conventions I fully get are causing my eyes to glaze over.

------
Shank
I really love how the second to last line rhymes in such a way that, when read
with the semicolon out loud, produces a neat sound to it.

"Until infinity ends do; Forever end."

------
sethbannon
Code as poetry. Are there any other examples of this?

~~~
reaclmbs
Black perl - originally by Larry Wall & updated for Perl 5 by Ovid
(<http://www.perlmonks.org/?node_id=17000>)

    
    
            BEFOREHAND: close door, each window & exit; wait until time.
    	     open spellbook, study, select it, confess, tell, deny;
    	write it, print the hex while each watches,
    	     reverse "its length", write again;
    	     kill spiders, pop them, chop, split, kill them.
    	          unlink arms, shift, wait & listen (listening, wait),
    	sort the flock (then, warn "the goats". kill "the sheep");
    	     kill them, dump qualms, shift moralities,
    	     values aside, each one;
    	          die sheep, die, reverse system
    	          you accept (reject, respect);
    	next step,
    	     kill next sacrifice, each sacrifice,
    	     wait, redo ritual until "all the spirits are pleased";
    	     do it ("as they say").
    	do it(*everyone***must***participate***in***forbidden**s*e*x*).
    	return last victim; package body;
    	     exit crypt (time, times & "half a time") & close it,
    	     select (quickly) & warn next victim;
    	AFTERWORDS: tell nobody.
    	     wait, wait until time;
    	     wait until next year, next decade;
    	          sleep, sleep, die yourself and
    	          rest at last

~~~
draegtun
Some extra references:

\- Black Perl updated for Perl 5 - <http://www.perlmonks.org/?node_id=237465>

\- Black Perl Revisited - <http://www.perlmonks.org/?node_id=578707>

\- <http://en.wikipedia.org/wiki/Black_Perl>

------
Skoofoo
Very touching :)

------
nicholasspencer
This is great! Proof that code is art.

~~~
jpfuentes2
That's what I going for. I tagged it as "Code as Art." I initially dubbed it a
poem but decided it read more like a letter, instead. Personally, I think it
qualifies as code prose.

------
EGreg
The thing is, these things are supposed to be personal. But someone can fork
it.

------
xyproto
16 months before finding time for programming again. Sounds about right.

~~~
jpfuentes2
Hahaha. Kids will do that to you.

------
yeison
I had to upgrade to ruby 1.9 in order to run it. Very beautiful, btw.

------
kelvin0
Wow it never ceases to amaze me the things that headline in HN. As much as I
understand the love for one's child(ren), I am a bit disappointed to go on a
site called 'Hacker News' to see this type of irrelevant posting.

~~~
jpfuentes2
You may consider reading up on the Hacker way:

A hacker is a person that loves to program, or someone who enjoys playful
cleverness, or a combination of the two.[3] The act of engaging in activities
(such as programming or other media[4]) in a spirit of playfulness and
exploration is termed hacking. However the defining characteristic of a hacker
is not the activities performed themselves (e.g. programming), but the manner
in which it is done: Hacking entails some form of excellence, for example
exploring the limits of what is possible[5], thereby doing something exciting
and meaningful.

<http://en.wikipedia.org/wiki/Hacker_(programmer_subculture)>

------
tzaman
This is the most emotional script ever I have ever seen :)

------
phodo
LoL (Lines of Love) is inversely proportional to LoC

------
so898
Seems like the daughter will become a programmer.

~~~
shellehs
at least know how to read ruby source code

------
haven
Love it! <3

------
powerfulninja
Beautiful

------
knwang
amazing!

------
ragsagar
nice

