タグ

ブックマーク / blog.64p.org (39)

  • なんてこった…CPANモジュールをnode.jsで動かしてしまうライブラリ「node-perl」 - tokuhirom's blog

    https://github.com/tokuhirom/node-perl/ ここ最近、プログラミング言語同士の壁が徐々に破壊されている気がします。あるプログラミング言語上で別なプログラミング言語を動くようにしたり、置き換えてしまったりするような類です。今回はその一つ、CPAN moduleをnode.js上で動かすという、かなり無茶な気がしなくもない、そんなソフトウェアnode-perlを紹介します。 var Perl = require('../index.js').Perl; var perl = new Perl(); perl.use('LWP::UserAgent'); var ua = perl.getClass('LWP::UserAgent').new(); var res = ua.get('http://mixi.jp/'); console.log(res.as_

    kdaiba
    kdaiba 2012/08/29
    すばらしい才能の無駄遣い
  • Fukuoka.pm に参加してきます - tokuhirom's blog

    http://atnd.org/events/16157 諸事情により来月は暇な時間がおおいのでJPAの支援をうけて Fukuoka.pm に参加してきます。 いまのところ、「dotcloud みたいな環境を sakura vps に自前でつくってみるテスト」というはなしをしてみようかなとおもっています。

    kdaiba
    kdaiba 2011/05/31
    とっても興味ある話だなー
  • Perl5 works on browser! - tokuhirom's blog

    I hacked jslinux, so I injected Perl5 binary to jslinux!! You can run Perl5 on browser!!!!!!!!!!!!!!!!!!!!!11111 Modify root.bin with CocProxyThis is a note for hacking jslinux. Very easy. https://gist.github.com/978211 use microperl;Perl5 provides micro version of perl. I used it. You should modify the Makefile.micro file for static linking, change the following line. -LIBS = -lm +LIBS = -lm -sta

    kdaiba
    kdaiba 2011/05/19
    microperlを活用してる事例って初めて見たな,そういえば
  • Newmo を dotcloud にうつした記録 - tokuhirom's blog

    mysql をつかう際には DBD::mysql への依存を Makefile.PL にかけばすぐにつかえるようになる。create table するときに charset=utf8 を明示的に指定しないと latin1 になるので注意。 smtp の設定を各インスタンスにたいしておこなう場合、service の deploy 時にしか設定はおこなえないので、あとから設定しなおす場合には destroy+deploy するべしとのこと(miyagawaさんじょうほう) cron の設定は、postinstall script でおこなうのが簡単。まあ以下のようなかんじで処理している。 #!/bin/sh crontab - < crontab echo installed crontabcrontab ファイルの中身は以下のようにしている。PATH とかの指定は shell でつかっている

    kdaiba
    kdaiba 2011/05/09
    移行方法
  • Perl5 によるメール送信 - 実践的な Email::Sender の利用方法 - tokuhirom's blog

    Perl5 では、E-mail の送信をするためのモジュールが多数 CPAN にアップロードされているが、現在もっともまじめにメンテされていて質がよいのは Email::Sender らしい。 Email::Sender は登場当初はドキュメントもなさすぎるしつかいものにならなかったが、現在ではだいぶマシになっている。Moose 依存が気にならないケースでは、実用としてつかっても問題ないとおもう。 iso-2022-jp の日語のメールを送るには、以下のようにすればよい。 use 5.12.1; use utf8; use Email::Sender::Simple qw(sendmail); use Email::Simple; use Email::Simple::Creator; use Data::Recursive::Encode; use Encode; # e-mail o

    kdaiba
    kdaiba 2010/07/20
    Gmailに送信したい場合にはEmail::Sender::Transport::SMTP::TLSがよい,と
  • 自分のサーバの性能を知っておく - tokuhirom's blog

    http://github.com/kazuho/manymanythreads ↑kazuhoさんがCで書いたエコーサーバーと、そのベンチマークツールによって、自分のサーバでどんぐらいのQPSがでるのかがわかる。 たとえば自分のマシン(SC440)だと ./testechoclient -c 1 -n 1000000 -f -p 5050で、 77906.624081 reqs./sec. (1000000 in 12.835879 seconds)ぐらいでる。 一番単純なエコーサーバーをうごかしたときの性能を把握しておくことによって、どのぐらいの速度がでてしかるべきなのかが把握できるようになるという。 【追記】 ここで知った echo server の限界性能をもとに、その後、自分がなにかサーバ等を書いた場合に最適化したらどのぐらいの速度がでるかを予測できる(経験が必要だとおもうけど)

    kdaiba
    kdaiba 2009/10/01
    比較しやすくなるな
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/09/18
    うへ
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/08/09
    どっかで使うだろうな
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/08/06
    わかりやすい
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/07/13
    AnyEvent::IRC
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/07/13
    IKC的な事ができるとは!
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/07/10
    もしかしてIKCも簡単に修正できるのかな
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2009/03/21
    正規表現ライブラリ
  • Dan the API shell 書いた - tokuhirom's blog

    http://gist.github.com/77254 Dan さんの perl eval API が便利だとおもった。どんなコードが実行できるのかためしたかったので、shell っぽく eval することにした。 Term::ReadLine で shell っぽく入力させて、URI::Escape でエスケープして、LWP::UserAgentAPI になげて JSON.pm で eval させてるだけ。 以下は実行例 dan> use XML::LibXML; Warning: XML::LibXML compiled against libxml2 20703, but runtime libxml2 is older 20702 dan> unpack 'p', 0xdeadbeef; dan> print "$ENV{SERVER_ADMIN}\n"; <ちょ、メアドみ

    kdaiba
    kdaiba 2009/03/11
    このやり方は何か使えないかな
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/12/08
    面白い
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/11/29
    軽いOpenIDモジュール
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/11/12
    MENTA使い方
  • MENTA というウェブアプリケーションフレームワークをかいてみた - TokuLog 改めB日記

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/11/12
    キャラクターはキタロウの親父に違いない
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/11/07
    ちょっと試してみようかな
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    kdaiba
    kdaiba 2008/10/26
    これはありがたい