June 14, 2007

Glitchr: Glitches the Web

Glithr

Yesterday, I hacked up a website, Glitchr, which is heavily inspired by youpy's great work, GlitchMonkey. It aimes to let people know fun of glitched things easier without installing greasemonkey script.

A glitch is a short-lived fault in a system. The term is particularly common in the computing and electronics industries, and in circuit bending, as well as among players of video games, although it is applied to all types of systems including human organizations and nature. The term derives from the German glitschen, meaning 'to slip.'

Source: Glitch - Wikipedia, the free encyclopedia

As the entry from Wikipedia says, glitch is a word which originally come from electronics industries terms, but it's also a name of a genre in some kind of arts, music, movie, image, and so on. Speaking about music, I really love Oval, who compose songs filled with glitched noises, nevertheless, they're really melodious and beautiful.

Glitchr is a website which glitches images in webpages, and of course, you can also specify the image by its URL on the Net. Anyway, seeing is believing. I'll show you some examples (by specifing an image).

Original image

Glitchedr image

It's interesting!

Surely, it's totally useless. But usefulness doesn't matter for arts at all, you know ;)

WebService::Hatena::Graph version 0.06 released

Today, I released the new version of WebService::Hatena::Graph along with some updates of Hatena::Graph API. It's become totally new, adding several features, getting graph data and setting/getting configurations.

The feature to set new graph data has been offered since the API was released, but the method to enable users to do so is now renamed to postdata() from post() to distingish posting some graph data , postdata(), from posting some configs, post_config().

Here's a usage of this module:

use WebService::Hatena::Graph;

my $graph = WebService::Hatena::Graph->new(
    username => $username,
    password => $password,
);

# set data to the specified graph
$graph->post_data(
    graphname => $graphname,
    date      => $date,
    value     => $value,
);

# retrieve graph data
my $graph_data = $graph->get_data(
    graphname  => $graphname,
    username   => $username,
);

# set config
$graph->post_data(
    graphname      => $graphname,
    graphcolor     => $graphcolor,
    graphtype      => $graphtype,
    status         => $status,
    allowuser      => $allowuser,
    allowgrouplist => $allowgrouplist,
    stack          => $stack,
    reverse        => $reverse,
    formula        => $formula,
    maxy           => $maxy,
    miny           => $miny,
    showdata       => $showdata,
    nolabel        => $nolabel,
    userline       => $userline,
    userlinecolor  => $userlinecolor,
    comment        => $comment,
);

# retrieve config
my $graph_config = $graph->get_config( graphname => $graphname );

Enjoy!

May 19, 2007

Twitter to say farewell

Steven D. Levitt, well-known in Japan for the book, "Freakonomics" ("ヤバい経済学" in Japanese), expects the Internet to be of great help for fighting pandemic.

What can we do to fight global pandemics? The single most powerful tool we have is probably the internet. Pandemics tend to start in remote locations. What we need is a way to extract the information from those places quickly to get a head start on keeping the epidemic tamed. The formal networks like the CDC do not seem to work all that well.

Freakonomics Blog ? Fight Global Pandemics (Or At Least Find a Good Excuse When You’re Playing Hooky)

Great. I totally agree with it. And he describes Whoissick.org which allows people to post about their sickness, to search with zip code, to view on a map, etc. It looks very cool and really useful. But he also says:

I doubt, however, that I would want to bother to go tell Whoissick.org that I feel awful. Certainly if I was about to die from the bird flu, it would not be top of mind.

Certainly ;)

In the meanwhile, I've been really addicted to Twitter these days, where people only reply to the question, "What are you doing?".

I think that it must be tough for us to post about our sickness to such sites as Whoissick.org, when we're suffering from disease. It's just a little overreact.

But I'm sure that Twitter enables us to do so easily due to its simplicity and diversity of accessibility. Actually, when people get ill, they're twittering, "got a headache", "feel so bad", "I seem to catch a cold" or so. We may be twittering at that time we're about to dying.

"Folks! I'm about to die. Good-bye!"

No kidding.

May 17, 2007

WebService::Timelog released

These days, so many start-ups which have an intention of following Twitter's success have come out one after another. I think it's absolutely ridiculous that most of them stupid enough not to offer diverse way to access their services except Web forms, for instance, accessibility via open API, IM, cell-phone, and so on.

Timelog is one of such sites, but it wisely started providing API which allows its users to access most functions and data on it easily. Really great! As soon as I heard the news, I went straight to work on writing a perl interface to it. Then, I hacked it up as WebService::Timelog, and uploaded it to CPAN.

Here's a simple usage of this module. For more details, consult the documentation on CPAN and the official documentation of Timelog API. Enjoy!

use WebService::Timelog;

my $timelog = WebService::Timelog->new(
    username => $username,
    password => $password,
);

# update status
$timelog->new_msg(text => $text);

# or you can do so like this
$timelog->update($text);

# retrieve public messages
my $public_messages  = $timelog->public_msg(cnt => $count, since => $since);

# retrieve friends' messages
my $friends_messages = $timelog->friends_msg(cnt => $count, since => $since);

# retrieve direct messages
my $direct_messages  = $timelog->direct_msg(cnt => $count);

# retrieve some information on you
my $me               = $timelog->show();

# retrieve some informtion on your friends
my $friends          = $timelog->friends(cnt => $count);

May 7, 2007

Acme::MorningMusume version 0.10 released

I've shipped a new version of Acme::MorningMusume. It's an update along with that Hitomi Yoshizawa graduated from モーニング娘。 on May 6.

As I wrote here before, I'm hardly interested in モーニング娘。 now. I love ℃-ute and Berryz工房!!! I have to say モーニング娘。 now doesn't matter at all.

Origins of Domain Names of Mine

It seems that blogging about origins of domain names is in fashion among Japanese bloggers, which was suggested by kaminogoya-san at this entry: "ドメイン名の由来を書いてみる - 2xup.org". I'll also take after them to catch up.

I run some domain names for several websites.

kentarok.org is for some kind of personal things like blog, code repository, repository viewer and task management tool, and some documents (it's now empty, though...). As you easily recognize, it was named after my own name, Kentaro Kuribayashi.

antipop.gs, which is obsolete but will still work until next year or so, was replaced by kentarok.org described above. It was the first domain name I took. The story about the domain name is too long to tell whole of it, so I'll explain it as shortly as I can.

When I took a procedure for connecting to the Internet for the first time and was needed to choose some phrase for my e-mail account name, I hadn't thought about it at all. Since no good idea came out to me then, I took a name from a Hip Hop group called Antipop Consortium. I was just listening to their music then. So, I started using the name, antipop, in various occasion: domain name, IDs for some websites, etc.

simpleandclean.jp was named after a song of Hikaru Utada, "Simple and Clean", which is English version of "光", but not literally. I'm an enthusiastic fan of her, and love the song the most of her works. simpleandclean.jp now hosts only some experimental things of mine so far, I'll offer something usefull things there.

I have also much more domain names except them. There may be a chance to write about them some time or other.

April 25, 2007

Alternative usage of Twitter

Twitter not only is a site where we replay to the question, "What are you doing?", but also can be an alternative way of informing and reminding us of anything like news, weather forecast, blog posts which gathers many attentions, TODOs, and so on.

For instance, there's a tweet which broadcasts weather forecast of Tokyo area in Japan to its followers.

Sorry to say, since I'm not live in Tokyo or near there but Amami Island, Kagoshima, forecast of Tokyo area is entirely useless for me. So, I made my version of it:

Also, I made another tweets which convey QotD, Question of the Day, from Vox, really fascinating blogging tool offered by Six Apart, to Twitter.

They just only fetch QotD from Vox and dump it onto Twitter, but QotD is suitable also for such sites as Twitter, so it's worth the trial to do it, I think.

Acknowledgements:

Template::Plugin::Shorten version 0.01 released

The initial version of Template::Plugin::Shorten is now on CPAN. It works as a Template::Toolkit plugin, which filters URLs to shorten or lengthen using URL shortening sites like TinyURL.com.

I made it so that I could neatly write a template for a Plagger plugin, P::P::Publish::Twitter, which now supports templatization using TT. I'm afraid that it may cause some problems in other contexts.

Here's a usage of this module:

# Load this plugin
[% USE Shorten %]

# Shortening URLs
[% FILTER shorten_url %]
  <a href="http://search.cpan.org/">search.cpan.org</a>
[% END %]

# or

[% text | shorten_url %]

# Lengthening URLs
[% FILTER lengthen_url %]
  <a href="http://tinyurl.com/37rwu">search.cpan.org</a>
[% END %]

# or

[% text | lengthen_url %]

April 19, 2007

Commands Execution History

Here's the history of the commands I executed from someday in this year to today.

$ ruby -pe 'gsub(/^.+;| .+$/,"")' .zhistory | sort | uniq -c | sort -r | head -30
    880 sudo
    831 svk
    473 ls
    369 cd
    217 rm
    199 perl
    195 svn
    121 apt-cache
    117 mv
    106 wget
    101 chmod
    100 mkdir
     84 perldoc
     79 cp
     76 cat
     60 '
     52
     49 vi
     44 href
     34 tar
     34 less
     32 ps
     30 echo
     29 ruby
     29 ln
     27 locate
     24 jed
     23 kill
     22 screen
     22 lv

April 16, 2007

IRC2Twitter Gateway Apps

Do you enjoy twittering? How do you play with Twitter? The best way I think is to post statuses via IRC. You may wonder how you can do it. Don't worry! Many people help you with their excellent tools.

Yappo and typester hacked up Perl scripts which work as a gateway and connect IRC to Twitter. To make it, the former implements POE::Component::Client::Twitter and the latter uses POE::Component::Jabber. If you're a Ruby guy, you might want to use tig.rb (twitter irc gareway) written by cho45. Super cool!

By the way, I use TwitterIrcGateway habitually. Today, I found there was Linux version of it (using Mono)! I went straight to test it and confirmed that it worked well in my environment, debian GNU/Linux (sid). According to mayuki, the author of TwitterIrcGateway, as it includes also Mono itself, we don't need to install it for ourselves in advance. Really great!

I wrote an init script like this:

$ cat /etc/init.d/TwitterIrcGateway
#!/bin/sh

NAME="TwitterIrcGateway"
DIR="/path/to/TwitterIrcGateway/"
OPT="--port=6669 --interval=60 --resolve-tinyurl=true --encoding=iso-2022-jp --ignore-watch-error=true --enable-drop-protection=true"
KILL="/usr/bin/killall"

case "$1" in
    start)
        echo -n "Starting $NAME..."
        cd ${DIR} && ./${NAME} ${OPT} 2> /dev/null &
        echo "."
        ;;
    stop)
        echo -n "Stopping $NAME... "
        ${KILL} $NAME
        ;;
    *)
        echo "Usage: /etc/init.d/$NAME {start|stop}"
        exit 1
        ;;
esac

exit 0