Archive for November, 2006

FTOP

Posted on Tuesday, November 28th, 2006 at 3:36 am

I want to design a programming paradigm that focus on fairy tale. Should I call it, FTOP Fairy tale oriented programming language. Why ? because most of the fairy tales are happy ending, so my programming paradigm should allow or force the programmer to be happier when they finish their job.

In my idea, a program should be the hybrid between pure OOP and prototype-based programming (e.g. wolf eat: girl.prototype(size=small, hat.type=hood, hat.color=red)) plus some indent-forced style of evil Python . This should allow to reuse a fairy tale. I mean, fox is mostly a bad guy, we should reuse them, right.

the program may be started and ended using tags like this

once upon a time

happily ever after

Well, let’s try a short program then, let’s use this tale

tale name: "Little Red Ridding Hood"
once_upon_a_time: {
   little_red_ridding = human clone:
                              prototype: {sex = woman,
                                          age = girl,
                                          size = little,
                                          living_place = country|village,
                                          appearance = prettiest}.
   mother = human clone:
                  prototype: {sex = woman,
                              age = adult,
                              mother_of = little_red_ridding,
                              living_place = little_red_ridding.living_place}.
   grandmother = human clone:
                       prototype: {sex = woman,
                                   age = old,
                                   mother_of = mother}.
   little_red_ridding_hood = cloth clone:
                                   prototype: {type = hood,
                                               color = red}.
   little_red_ridding prototype: {hat = little_red_ridding_hood}.
   cakes = food clone:
                prototype: {type = cake}.
   mother made: cakes
          said: "Go, my dear, and see how your grandmother is  doing,
                 for I hear she has been very ill. Take her a cake,
                 and this little pot of butter."
          to: little_red_ridding.
   grandmother prototype: {living_place = other_village}.
   little_red_ridding go: grandmother.living_place.
   wolf = animal clone:
                 prototype: {type = wolf}.
   little_red_ridding met: wolf.
   woodcutters =  human clone: many
                        prototype: {sex = man,
                                    age = adult}.
   wolf wanted: (eat: girl)
        but: (cannot because: woodcutters location: nearby)
        said: "where she was going"
        to: little_red_ridding.
   little_red_ridding know: !(talk: wolf)
                      said: "I am going to see my grandmother
                             and carry  her a cake and a little pot
                             of butter from  my mother."
                      to: wolf.
   wolf said: "Does she live far off?"
        to: little_red_ridding.
   little_red_ridding said: {"Oh I say,", "it is beyond that mill you see 
                              there, at the first house in the village."}
                      to: wolf.
   wolf said: {"Well,", "and I'll go and see her too. I'll go this way
                and go you that, and we shall see who will be there first."}
        to: little_red_ridding.
   wolf ran: fast
        gathered: nuts
        ran: (after: butterflies)
        gathered: (bouquets of:  flowers clone: many
                                         prototype: {size = little}).
    wolf knocked: grandmother.house.
    grandmother said: "Who's there?"
                to: wolf.
    wolf counterfeit: little_red_ridding.voice
           said: {"Your grandchild, Little Red Riding Hood,",
                  "who has brought you a cake and a little pot of butter
                   sent you by mother."}
           to: grandmother.
   grandmother prototype: {status = ill}
               said: "Pull the bobbin, and the latch will go up."
               to: wolf.
   wolf pulled: bobbin
        opened: door
        ate: grandmother
        shut: door
        get_into: bed.
   little_red_ridding knocked: door.
   wolf said: "Who's there?"
        to: little_red_ridding.
   little_red_ridding heard: wolf.voice
                      afraid: wolf.voice
                      believed: (grandmother cold: hoarse:)
                      said: "It is your grandchild Little Red Riding  Hood,
                             who has brought you a cake and a little pot of 
                             butter mother sends you."
                      to: wolf.
   wolf cried:
        soften: wolf.voice
        said: "Pull the bobbin, and the latch will go up."
        to: little_red_ridding.
   little_red_ridding pulled: bobbin
                      opened: door.
   wolf saw: (little_red_ridding came:)
        said: "Put the cake and the little pot of butter upon
               the stool, and come get into bed with me."
        to: little_red_ridding
        hide: (bedclothes under:).
   little_red_ridding took_off: her.cloth
                      moved_to: bed
                      amazed:
                      saw: (grandmother.nightClothes)
                      said: "Grandmother, what big arms you have!"
                      to: wolf.
   wolf said: "All the better to hug you with, my dear."
        to: little_red_ridding.
   little_red_ridding said: "Grandmother, what big legs you have!"
                      to: wolf.
   wolf said: "All the better to run with, my child."
        to: little_red_ridding.
   little_red_ridding said: "Grandmother, what big ears you have!"
                      to: wolf.
   wolf said: "All the better to hear with, my child."
        to: little_red_ridding.
   little_red_ridding said: "Grandmother, what big eyes you have!"
                      to: wolf.
   wolf said: "All the better to see with, my child."
        to: little_red_ridding.
   little_red_ridding said: "Grandmother, what big teeth you have got!"
                      to: wolf.
   wolf said: "All the better to eat you up with."
        to: little_red_ridding
        ate: little_red_ridding.
} happily_ever_after:

Errr well, it’s not happy ending, I should put grammatical error around here. Anyway, you got the idea 😀

I’ll try to show you another program later, maybe … snow white.

อย่างน้อยที่สุด – at least..

Posted on Monday, November 27th, 2006 at 1:28 pm

How many roads must a man walk down
Before you call him a man?

Blowin’ in the Wind: Bob Dylan [video from youtube]

I’m in love with Pen-eak’s works when I watched “Last Life in the Universe“. I will not express my opinion about the movie here, because this blog entry is not about the movie. When I heard that there is a book which concludes some interview with Pen-eak, and the writer is Worpoj Panpong, I deadly want to read it. So, I bought it and asked a sister of mine to ship it from Bangkok, of course, I asked her to read it also, and she likes it.

Who is Pen-eak ? I believe the easiest way to answer this question is to watch his movies. Of course, I don’t know him personally, but from his interview, his personality which is expressed in the book is very similar with his movie. I didn’t say that he’s perfect or his movies are perfect. There’s many down-side of his life and also some holes in his movies. But, well, as we know, human are imperfect. The different between human and computer is our imperfection. The different between real life and story in movie is also the imperfection of our life. His life is also.

The point is, he accepts his imperfection and lives with it peacefully. Sometime, we know that we’ve problem or short coming in our life, but we just don’t accept it. We should not seek for a perfect life; instead, we should seek a way to live with our life, even it’s imperfect.

Life is a long journey and it’s shorter than we thought. When you found an imperfection in your life, sometime, fix it, sometime, accept it and live with it.

backyard

Posted on Sunday, November 12th, 2006 at 11:27 am

312182128

wowww

Posted on Saturday, November 4th, 2006 at 9:04 am

312182128

from here

30% off -_-””

Posted on Friday, November 3rd, 2006 at 3:46 am

George Orwell’s 1984

Alexandre Dumas, The Three Musketters

Gabriel Garc?a M?rquez’s One Hundred Years of Solitude