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 影片
- Larry Wall YAPC::Asia 2008, A Standard That Is Meant To Be Broken, 本当に!
- Larry Wall speaks at Google
- Pudge, Perl, in a Nutshell Pudge (slashdot 創辨人之一) 自彈自唱的 Perl 歌
- OSCON 2008: Damian Conway, Thoughtstream: “Temporally Quaquaversal Virtual Nanomachine Programming In Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces…Made Easy!” Damian Conway 的演講總是超棒的。這年的主題是:在 Perl 程式中使用正子變數!這部真是百看不厭。
- OSCON 2008: Paul Fenwick, Perl Training Australia: “An Illustrated History of Failure” Paul Fenwick 是很棒的 Perl 課程講師,在 OSCON 2008 上了堂歷史課,講軟/硬體的 bug 所造成的財務損失。跟 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.)
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:
And now with the 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.
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.


