September 2009 Archives

I just made perl panic

| 3 Comments | No TrackBacks

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 影片

| No Comments | No TrackBacks

Making hacks file scoped like pragmas

| No Comments | No TrackBacks

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.)

1L of tea

| No Comments | No TrackBacks

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.

optree hacking in the YAPC::Asia hackthon

| No Comments | No TrackBacks

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.

"Learning from Ruby" slide online

| No Comments | No TrackBacks

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

YAPC Channel on Vimeo

| 1 Comment | No TrackBacks

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.

東京的咖啡店

| No Comments | No TrackBacks

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

台中市的咖啡店

| No Comments | No TrackBacks

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