Twitter Updates

    follow me on Twitter

    Saturday, August 15, 2009

    Melancholy, Vacant Hope

    Crossing the bridge I feel... oh
    If only I were to drift
    Along the thread of blue and green
    In a boat and leave


    But... oh woe
    I am dragged to enter, enter an Emerald City
    Where people at their zenith play games with pen, paper and people
    Drilling into their minds theory separated from reality
    As zealots docile devour their textbooks


    That we may someday ride the hot air balloon
    That brings us to the clouds of success
    That we may return to
    That carefree life of our childhood


    That is all hot air

    Friday, August 14, 2009

    Perl Hello script


    #! /usr/bin/env perl

    use strict;
    use warnings;

    print "Hello World!\n";
    my $string = "Cloud";
    my $number = 9;
    my $lil_float = 2e-12;
    print '"$string $number": ', "$string $number\n";
    print '$lil_float: ', $lil_float, "\n";
    print '$lil_float+1: ', $lil_float+1, "\n";
    my @books = ( "Pride and Prejudice",
    "Bambi: Eine Lebensgeschichte aus dem Walde",
    "To Kill a Mockingbird",
    "The Adventures of Huckleberry Finn",
    "Oliver Twist",
    "Middlemarch",
    "Le Petit Prince"
    );
    my %auth_book = ( 'Austen' => "Pride and Prejudice",
    'Salten' => "Bambi: Eine Lebensgeschichte aus dem Walde",
    'Lee' => "To Kill a Mockingbird",
    'Twain' => "The Adventures of Huckleberry Finn",
    'Dickens' => "Oliver Twist",
    'Eliot' => "Middlemarch",
    'Saint Expuery' => "Le Petit Prince"
    );
    my $bk_ref_ref = [ \@books, \%auth_book ];
    print '@books: ', @books,"\n";
    print '%auth_book: ', %auth_book,"\n";
    print '"@books": ', "@books\n";
    print '"%auth_book": ', "%auth_book\n";
    print '"@books[2,3]": ', "@books[2,3]\n";
    print '"@auth_book{\'Saint Expuery\', \'Lee\'}": ',
    "@auth_book{'Saint Expuery', 'Lee'}\n";
    print '$bk_ref_ref: ', "$bk_ref_ref\n";
    print '"@$bk_ref_ref": ', "@$bk_ref_ref\n";
    print '"@{@$bk_ref_ref[0]}": ', "@{@$bk_ref_ref[0]}\n";
    print '"$bk_ref_ref->[0]->[0]": ', "$bk_ref_ref->[0]->[0]\n";
    print '"@{$$bk_ref_ref[1]}{\'Eliot\', \'Twain\'}": ',
    "@{$$bk_ref_ref[1]}{'Eliot','Twain'}\n";

    Perl Quick Reference

    There is one here

    Friday, July 3, 2009

    Life and NetHack

    I guess that likening living to NetHack is what people call the "ultimate-geekery" think to do. But this philosophical thought came to me as while I was lying on my bed, motor skills clumsy as an infant, desire to move that of an elderly, arm over a pillow over my face in an attempt to shield my fragile eyes and even more delicate, groggy mind from the washed-out colors of the morning. That ain't exactly compelling. Enough of my physical state of being then.

    Now, as to my mental state of being, I was doing what I loved best when unable to move. Making weird connections. Y'know, some scientists (psychologists? Behaviorists?) theorize that when people dream, they are making connections between their experiences, running through the branching film roll of scenarios that we call our intellect. Cool, then. But weirdly, I was thinking about how I really wanted some sincere friends who were constantly available. I was feeling bitter.

    On to NetHack. In life, you start off an infant, unfamiliar with the world; in NetHack, it's the same; you start off knowing the ? button; you later discover the yubnhjkl, q for quaff, the #force and #loot, ^D for kick, e for eat, put, wear, pay shopkeeper, wield, &c.

    You start off with nothing. Not even the knowledge of now to navigate your world, let along survive the obstacles and denizens lurking within. All you have are your friends to teach you the controls, or the in-game manual that will be able to teach you the basics of the game; the advanced stuff you'll still have to learn yourself or through discussion. Think parents.

    As you progress, you come across items that you may benefit you, or that may harm you. Each item has a special method of effect, that may be good in some situations, bad in others and without effect in still more. Think of your opportunities in life. You can try them out blindly, but that will lead you to disaster. You can wait till some time later to try them, but your limited luggage means that you will have to leave some of them behind.

    As you descend, the creatures get stronger. You can stay behind and venture slowly, but your character's Hunger dictates that you try to kill as many monsters as possible. Curiosity leads you out to try new things, but you notice that what curiosity leads you to do ultimately benefits you.

    As you play the game, and die several times, you learn new paradigms, and you hear of paradigms in discussions. In this way, the knowledge you acquire is like the knowledge and advice around you in. Some are useful, some are malicious, some are dumb. But in NetHack you can learn through repetition, while in life you can only learn from the failed attempts of others.

    And, what differentiates NetHack from contemporary games is that hoarding is not good in NetHack. Crises come fast and brutal, and that is when your best items will save you. Crises aren't epic or anything. Usually, a crisis is a dumb accident that would have been prevented if you were more careful, or did your research. And sometimes, they can't be prevented at all. And usually, they take either your soul, or some of the most ingenious thinking you've ever done, along with some of your most precious items. There is hardly a way to solve a crisis simply by waiting it out or just using your sword. There's nothing epic to anything to be proud about it. Your precious items are useless without an accident that requires their use. But without preparation, you are dead.

    Dead.

    Saturday, June 20, 2009

    notice


    PERSONS attempting to find a motive in this narrative will be prosecuted; persons attempting to find a moral in it will be banished; persons attempting to find a plot in it will be shot.

    SHACKS

    I'm thinking of founding a club/association. It will be callled SHACKS.

    SHACKS stands for Singapore Hackers' Association for Computing Knowledge: SHACKS.

    Now, this SHACKS at the end stands for something else. It stands for Singapore Hackers' Association for Cultural Knowledge: SHACKS.

    Now, this SHACKS at the end stands for something else. It stands for Suzumiya Haruhi's Association for Contemporary Kids: SHACKS.

    Now, this SHACKS at the end stands for something else. It stands for Singapore Hackers' Association for Computing Knowledge: SHACKS.

    Now, SHACKS has goals.
    1. To accumulate a library of literary classics, cultural tomes, papers and textbooks. No droll and boring stuff allowed. Computer manuals have a priority.
    2. To fund laptops for all the members. Members must strictly use Linux, preferably Debian. Excessive use of Windows will not be tolerated. People who evangalize Windows will be banned. Minor usage of Windows for gaming purposes is acceptable, but chronic gamers will be expelled. Homebrew gaming is encouraged. Commercial games are to be hated. Games with interesting and innovative marketing strategies like Guild Wars are an exception.
    3. To have a community where members discuss and give each other presentations on topics relevant to the contemporary hacker. Namely, Intellectual Property, Self-organization & Self-teaching, Programming, Computer Science, Applicatons of Computer Science, Linguistics, Languages, and the History of Cultures. Once again, presentations about Droll and Boring are banned.
    4. To encourage people to stop debating endlessly on the ethics of helping people and Just Fucking Contribute.
    5. To have a pyramid model of proselytizers to conquer the world for SHACKS.

    Friday, June 19, 2009

    Perl and Python: Warhammer 40,000: Dawn of War analogy

    • Perl: The Orks. There's More Than One Way To Do Something. Insanely buffed infantry and head-scratching kludged-together technology salvaged from shell-scripting, awk, C and sed. An extremely idiomatic tribe. There're the Sluggas, the Shootas, the Stormboyz, the Tankbustaz and what have you in one swarm of green. And they don't get along well together.
    • Python: The Imperial Guard. The one obvious way of doing things. Heavy Artillery built on the workhorse Guardsman-Commissar-Grenade Launchers (i.e. tuples, lists).
    • I'll write about Lisp once I try it out. I'll probably parallel it to the Eldars
    Even in practice. Perl is fine for small projects and scripts, while Python manages to perform for greater projects despite its awfully slow interpretation. (Think Guardsmen in early game.)