タグ

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

  • Java 8 Date and Time API の実践的なチートシートできたよ~ - tokuhirom's blog

    Java8 を使いこなそうとすると、やはり Date and Time API も使いこなす必要がでてくる。 我々 Perl 畑出身の人間からすると、Perl の世界では DateTime/Time::Piece というモジュールが一般的に日付の計算に使われており、iandeth.さんのブログエントリがチートシートとしてよく知られている。このいつも見慣れたエントリの体裁で、一般的な日時の操作を実用的に教えてくれるエントリが欲しくて書いた。 junit のテストケースとして書いてあるので、適当にコピペして QuickJUnit で動作確認するとよい(assertはしてないけど)。 なにかあれば教えていただけるとありがたいです。

  • 日ごとの CPAN module アップロード数を可視化してみた - tokuhirom's blog

    日ごとの CPAN モジュールのアップロード数をHRForecastで可視化してみた。 感覚値としては5年ぐらい前より増えてる感じなんだけど、まあ実際そういう感じですね。

  • LTをはじめてやる君へ - tokuhirom's blog

    LT というのは メインのトークは大変なので、簡単に発表できる場をもうけよう5分なのですべっても大丈夫マイナーなネタをしゃべってもゆるされるようになんか一発ネタとかも発表できる場をもうけようなどの目的をもって設置されるものです。それほど気負う必要はないし、その日のうちに思いついてやったりする場合もあります(とくに海外では、飛び込みはあたりまえにあるといいます)。 ただ、一方で5分と話す時間がみじかくなっているので、話しなれていない場合には 自己紹介は手短にスライドの文字は大きくゆっくりしゃべるよく練習するの4点に気をつけましょう。 発表になれてない人ほど自己紹介を長くしがちですが、聴衆はあなたの生い立ちに興味はありません。名前、所属程度をいえば十分です。発表が、あなたのバックグラウンドをしらないと伝わらないものならば、かるく説明する必要はありますが、それでも30秒程度におさめる方がいいでし

  • node.js で人気のあるライブラリ10選 - tokuhirom's blog

    node.js というか npm で依存されているライブラリの上位10個ぐらいがどういうものがはいっているのかをまとめます! 具体的には serach.npmjs.org の Most depends on にのっているリストに註釈をつけただけです! http://search.npmjs.org/ 1位 underscore.js 392個http://search.npmjs.org/#/underscore クライアントサイド JS で人気のたかいユーティリティーライブラリの underscore.js が堂々の第1位。 クライアントサイドでつかってるからそのままつかってる人が多いのかな、とおもっています。

  • Plack-0.9945 で任意の CGI スクリプトを実行可能になっていた件 - tokuhirom's blog

    http://search.cpan.org/~miyagawa/Plack-0.9945/ これまで Plack には Plack::App::CGIBin というモジュールが付属していたが、これは Perl script の実行しかサポートしていなかった。 しかし、Plack 0.9945 をつかと、任意の CGI script を実行可能となっている。 plackup -MPlack::App::CGIBin -e 'Plack::App::CGIBin->new(root => "./")->to_app' -p 9099 などとすると、 #!/usr/bin/python # -*- coding: utf-8 -*- print "Content-Type: text/plain" print print "hello world." のような、普通の cgi スクリプトを実行

  • Sledge の PSGI 対応についておもいをはせた - tokuhirom's blog

    Sledge のよさのひとつは、非常に枯れているところなのであるが、一方でアクティブなメンテナがおらず、PSGI ブームなどにものっているのかのっていないのかわからないし、テストスイートはたぶん誰もうごかしていない。 で、しょうがないので、テストコードの修正を2箇所いれて、パスするようにするパッチをおいておいた。 http://github.com/tokuhirom/Sledge/commits/master あと、PSGI 対応は、こういう形がいいとおもう(upload まわりとか動作確認すらしてないけど)。 http://github.com/tokuhirom/Sledge/tree/feature-psgi 2010年代に mod_perl1.3 にしか対応してなくて云々というブログエントリーがでてるのは悲しいので、こういう方向で誰か作業してリリースしたらいいとおもう。 つまり、

  • Perl5 のバージョンごとの使い分け - tokuhirom's blog

    5.6以前現状、CPAN モジュールにおいて5.6系に対するサポートは、toolchain 系をのぞいてほとんどおこなわれていません。 そもそも 5.6 系は誰もメンテしていないので、5.6 をコンパイルするのがまずむずかしいですw で、レガシーシステムにおいてはまだのこるとおもいますが、新規にえらぶ必要はありませんね。あたりまえながら。 5.8系5.8系は非常に安定しておりまして、一番安定しているのはたしかです。バグなどが含まれている可能性がいちばん低いかとおもいます。 5.8系を新規のシステムで利用する場合には 5.8.9 をつかうのがよろしいでしょう。 5.10系5.10.0 にはわりと致命的なメモリリークやSEGVをひきおこすバグがありますので、つかわない方がいいです。 5.10系をつかう場合にはかならず 5.10.1 以後をご利用ください。 5.10系以後を現在新規に採用するメリ

  • Perl 5.13.2 がもたらした package NAMESPACE BLOCK 構文があたえるもの - tokuhirom's blog

    開発版の Perl 5.13.2 がリリースされたが、5.13.2 の目玉はなんといっても package NAMESPACE BLOCK 構文だろう。 use 5.13.2; use warnings; package Point { use Moose; has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); __PACKAGE__->meta->make_immutable; no Moose; }; のように、パッケージを宣言することができるようになった。 この構文は非常に大きい変化をもたらす。 1 ファイルに複数のクラスを書くことが苦でなくなる。package NAME BOCK 構文を利用する場合、BLOCK の中はインデントすることになるため、複数パッケージを1つのファイルにか

  • モダンな Perl の開発環境の構築方法 - tokuhirom's blog

    一般的な OSX 環境および Linux 環境における、モダンな Perl 開発環境の構築方法についてまとめてみたよ。 perlbrew のインストールperlbrew をつかうことにより、簡単に最新版の Perl5 を利用することができるようになる。 perlbrew をいれる。% curl -L http://xrl.us/perlbrew | perl - install % ~/perl5/perlbrew/bin/perlbrew init ~/.bashrc (または ~/.zshrc)に source ~/perl5/perlbrew/etc/bashrc を追記。あたらしいシェルをたちあげる。最新版の perl をインストールする。% perlbrew install perl-5.12.1 % perlbrew switch perl-5.12.1 ここまできたら、she

  • 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

  • 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

  • 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

  • C++ で Perl 拡張を書くためのモジュールを書いた - 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

  • 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

  • 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

  • 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

  • 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

    igaiga07
    igaiga07 2009/03/12
    git+local::lib
  • 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

  • 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

  • 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