September 2009 Archives

September 23, 2009

I just made perl panic

Not sure why but try runing this code:

#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;

my $add3 = sub { $_ + 3 };
say map $add3 (1..30);

I see this panic message:

panic: ck_grep at /tmp/p.pl line 7.

One funny thing is, there no grep in there.

I’m not sure if I should use map function this way, but apparently I can’t. To use named sub-routine as the first argument to map I’ll have to say:

map { add3 } (1..30);

Where add3 is defined like this:

sub add3 { $_ + 3 }

Also, this causes syntax error:

map \&add3 (1..30);

sigh

一些我愛看的 Perl 影片

September 21, 2009

Making hacks file scoped like pragmas

The B::Hooks::OP::Check-based hacks are global, which means that they effect all code being used. For crazy hacks like PerlX::Range, it’s better to make it localized like strict. Here’s how I make it so (briefly.)

Continue reading Making hacks file scoped like pragmas.

September 18, 2009

1L of tea

The second hot day after traveling back from Japan, I bought 1 big cup of tea from this tea shop 囍茶 in my neighborhood.

囍茶

It’s one litter of ice tea with an iPod Touch:

1L of tea, with iPod touch

And now with the Macbook Air:

1L of tea, with MacBook air

It costs only 20 NTD (0.6 USD / 56 JPY), it makes the Macbook Air looks much smaller, and it cools me, and the whole room down.

Awesome.

September 13, 2009

optree hacking in the YAPC::Asia hackthon

In the YAPC::Asia Hackthon, done a really awesome hacks on PerlX::Range module with flora — We re-implement it with XS approach so it works more robust.

Continue reading optree hacking in the YAPC::Asia hackthon.

September 11, 2009

"Learning from Ruby" slide online

Quick notes here that I just uploaded my “Learning from Ruby” slide to slideshare at here: http://www.slideshare.net/gugod/learning-from-ruby-yapc-asia

September 7, 2009

YAPC Channel on Vimeo

I’ve created this YAPC Channel on Vimeo, currently it contains the (badly recorded) video files from our local YAPC::Tiny event, but if there are more videos about YAPC from all over the world that would like to go in there, I’d love to help. If you need moderator access to this channel (so that you can put your videos in there), please send me an mail.

ps. I found vimeo really generously provide 500mb upload per week, and they do not have time length limit per video, unlike youtube. It looks like it’s a much better choice then youtube in my case.

September 6, 2009

東京的咖啡店

東京市,連鎖店大店小店都很多。稍微記一下有些去過的地點,以及一些想去的地點。

Continue reading 東京的咖啡店.

September 1, 2009

台中市的咖啡店

台中市的咖啡店,老闆們有上 plurk / twitter 的比率真高。