Wednesday, November 10, 2010

Linux Meets ee cummings

These are the sorts of things that I find entertaining. I had to make a file for a coding class and then sort it in various ways. Here's what I got:

Original:
I thank you God
for most this amazing day
for the leaping greenly
spirits of trees
and the blue true dream of sky
and for everything
which is natural
which is infinite
which is yes
which is yes
I who have died am alive again today.

Sorted:
I thank you God
I who have died am alive again today.
and for everything
and the blue true dream of sky
for most this amazing day
for the leaping greenly
spirits of trees
which is infinite
which is natural
which is yes
which is yes


Reverse Sorted:
which is yes
which is yes
which is natural
which is infinite
spirits of trees
for the leaping greenly
for most this amazing day
and the blue true dream of sky
and for everything
I who have died am alive again today.
I thank you God


Comparing Sorted and Reverse Sorted:

I thank you God
for most this amazing day
for the leaping greenly
spirits of trees
and the blue true dream of sky
and for everything
which is natural
which is infinite
   which is yes
   which is yes
I who have died am alive again today.
  which is natural
  which is infinite
  spirits of trees
  for the leaping greenly
  for most this amazing day
  and the blue true dream of sky
  and for everything
  I who have died am alive again today.
  I thank you God

"Diff"-ing Sorted and Reverse Sorted:
1,3c1,4
< I thank you God
< for most this amazing day
< for the leaping greenly ---
> which is yes
> which is yes
> which is natural
> which is infinite
4a6,7
> for the leaping greenly
> for most this amazing day
7,10d9
< which is natural
< which is infinite
< which is yes
< which is yes 11a11
> I thank you God

No comments:

Post a Comment