CPAN is quite large at 4.9GB (BACKPAN, which holds everything ever uploaded to CPAN is even larger, at 11GB). This is why we have CPAN::Mini, which creates a minimal mirror of CPAN ("It contains only those files needed to install the newest version of every distribution") which comes in at a very reasonable 872MB. The first time you run it, it takes a while, but updates run pretty quickly. search.
[This post is literate Haskell, get the source here]When working with sorted lists you often come to the point where you want to combine two or more of them. This merge procedure forms the heart of merge sort it works something like:merge [1,3,4,5] [2,3,4] = [1,2,3,3,4,4,5] This merge function is not in the Haskell standard library, and even if there were, it might not be very useful.The problem i
Application performance is no longer a free lunch, and with current hardware trends of cores-for-the-chores, the search is on for the programming model that will make your application scale out over all the processing units that you have. Java 5 and Java 6 have given us the goodness of java.util.concurrent, and if all things go well, we will have Fork/Join (FJ) as part of Java 7. All of these are
Saturday, August 2, 2008 A New Paradigm - Haskell and HAppS About a month ago I began work on a location based social network called Spoht. I wanted an opportunity to build something outside of work, and a chance to build something on a platform and framework which I don't typically use. So, I set off by putting together a LAMP platform (Debian, Apache2, MySQL, PHP) and got to work. A few quic
cut は Scheme でプログラミングする上で頻出するマクロだが、先日述べた様にネストした内側にスロットを入れられないといった制約もある。 実装の困難さや、利用の際にミスを誘発しやすくなるといったデメリットを考慮したのだろうけども、それよりも「どういう仕様にするのが自然なのか」を確定するのが難しいという理由が最も大きいと思う。 ネストした内側までスロットを入れられるのならば cut 自体をネストした場合にはどうなるべきなのかとか、内側で <> という名前を導入してたらそれより下の <> はスロットとみなさないようにするのがいいとか、そしたら一貫性に欠けるとか、そういうことである。 そんなことを考えていると、以下のような記事を見掛けた。 Gaucheで、 (map (lambda (x) (* x x)) '(1 2 3)) をcutを使うなら、どう書けばいいんだろう。 cut内で特定の
前の記事 (id:SaitoAtsushi:20080810:1218355014) では引数を複数回使う機能を持った cut について考察した。 それについて参考になる文章を shiro さんから紹介してもらったので、ここにメモしておく。 http://srfi.schemers.org/srfi-26/mail-archive/msg00018.html http://srfi.schemers.org/srfi-26/mail-archive/msg00020.html 私は英語があまりわからないのでかなりおおざっぱな理解ではあるけれども、番号による参照は混乱しやすいので変数に適切な名前を付けるべきというのが提案者の主張のようだ。 実際に cut は充分に便利であるし、 cut では機能不足と思うようなものは cut でやるべきことではないのだろう。 と、まあ考察はここまでにして、ス
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
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
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
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
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
前は王道だったあの書き方も最近ではこうかな、というもの集です。 一般編 oldtype としたものもたいていは動きますし、環境の都合や軽量だなどの理由で普通に使われたりもします。そのへん勘違いなきよう。 CPANモジュールの検索 自動リダイレクトされるので知ってると思いますが。 oldtype: search.cpan.org modern: MetaCPAN CPANモジュールインストール oldtype: perl -MCPAN -e shell modern: cpan post modern: cpanm Module OR マッパー oldtype: Class::DBI, DBIx::Skinny modern: DBIx::Class, Data::ObjectDriver, Teng, Aniki テンプレートエンジン oldtype: HTML::Template, Te
LDR から Google Reader へ移行して半年くらいが経ちました。 とにかく英語版じゃないといろいろな機能を堪能できないので英語版で使いましょう。 メリット 友人とフィードをシェアできる Google Reader 内のはてブみたいな Notes 機能がある スター機能が付けられる(s) キーバインディングに慣れればさくさくよめる(vi キーバインド) Google のアカウントと統一されている フォルダ事、タグ事に RSS を公開できるので簡単に興味のある記事だけを公開できる Notes 機能を使って公開/非公開のメモを作成できる(これ素晴らしい RSS だけではなく Shared Items だけのページを公開できる(本名が出るけど iPhone に対応 フィード個々にタグを付けられる(t) LDR みたいに何人が読んでいます機能がある(id:htb さんに教わりました) フ
ストーリー by soara 2008年08月15日 7時25分 IP unreachableの場所が多いから? 部門より 本家/.の記事より。 米国通信業労働組合(CWA:Communication Workers of America)のレポート(PDF)によると、2008年の米国のインターネット接続速度はダウンロードの中央値が2.3Mbps、アップロードの中央値は435Kbpsとなっており、2007年調査時のダウンロード速度1.9Mbps、アップロード速度371Kbpsと比べて僅かにしか伸びていないことが明らかになった。このままのペースでは日本のスピード(同レポートによるとダウンロード速度の中央値は63Mbps)に追いつくには100年以上かかると指摘している。 なお、CWAはインターネットの可能性は接続速度次第であり、米国経済の成長や暮らしの向上に高速インターネットは不可欠として、
gen_server や gen_fsm 等が保持する State を、サーバ停止せずに(正確には suspend するけど)入れ替える方法のメモ。 OTP から逸脱している感があるけれど、Release Handling は無視の方向で(w; ちなみに、下記の内容を試す際は、こちら をどうぞ。 まずは、下記のようなテスト用の gen_server を準備。 -module(code_change_test). -behaviour(gen_server). -export([start/0, stop/0]). -export([state/0]). -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3 ]). start() -> gen_server:star
例えばネストされたリストを作成する場合、 List<List<String>> nested = new ArrayList<List<String>>(); List<String> list1 = new ArrayList<String>(); list1.add( "a" ); list1.add( "b" ); list1.add( "c" ); nested.add(list1); List<String> list2 = new ArrayList<String>(); list2.add( "d" ); list2.add( "e" ); nested.add(list2); List<String> list3 = new ArrayList<String>(); list3.add( "f" ); list3.add( "g" ); nested.add(list3);
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く