2013年03月11日18:15 カテゴリTipsLightweight Languages ついに顕在化しはじめたArrayリスク JavaScript: The Definitive Guide (Kindle ed.) David Flanagan [邦訳:JavaScript 第6版] 以下のようにした理由は、実はJavaScriptのArrayが配列ではないことに起因します。 404 Blog Not Found:Algorithm - Ruby 2.0 や Haskell の遅延リストを JavaScript で これに対して、List.Lazyではmapやfilterを関数合成で実現しています。JavaScriptのArrayが、(整数個のデータ構造が順序よくならんだ古典的な意味での)配列でないことは、以下のように確認できます。 JavaScript var ary = ne
言語女子会: undefとnullは両方必要?、言語女子会2: varは必要?/privateがない?の続編です。 Rubyに恋愛相談 Python: 最近悩んでるのよね… Ruby: んー、何に? Python: 自分はどんな人が好きなのかなぁ…とか… Ruby: あー、そんなの簡単よ!一緒にいて楽しいことよ! *1 Python: そんなの誰とだって仲良くなったら楽しいんだから差別化にならないじゃん Ruby: そうとは限らないわよ、たとえば、あっ… C: ごめーん、会議が長引いちゃって遅れちゃった!(髪の毛ファサーっ) Python: ああ…なるほど… C C: 何の話?え、恋愛に悩んでる?そんなの簡単よ。卓越性よ。 Python: 卓越性?? C: そうよ。なんらかの分野で「わたしが一番」という状況を作ることよ。そうすれば男の側からいくらでも寄ってくるわ。 Python: なるほど
言語女子会: undefとnullは両方必要?の続編です。 varは必要なの? とあるプログラミング言語が集う女子会にて: Python: JavaScriptちゃんってさ、なんでvarだらけなの? JavaScript: えっ、変? Python: varなんかいらなくない?私ぜんぜん持ってないよ? JavaScript: えー、じゃあ変数をどうやって宣言するの? Python: 宣言っていうか…「x = 1」みたいな代入文があれば変数xが必要なのって自明じゃない?宣言とか必要? Ruby: 必要ないよね。っていうか変数宣言とか古臭くない? JavaScript: そうかなー。 Python: 少しダサイかも。ほら断舎離ブームだし要らないものは捨てなきゃ! JavaScript: 要らないかなぁ、変数宣言。Pythonちゃんは関数がネストしているときに外側のスコープの変数に代入するのって
Twitterのタイムラインが面白すぎて、ついうっかり言語を擬人化して脳内で言語女子会なるものを開いてしまいました。なお、登場人物と実在の人物は1対1に対応しません。 undefinedとnullの両方必要なの? とあるプログラミング言語が集う女子会にて: Perl: そういえばさ、なんでJavaScriptちゃんってundefinedとnullの両方もってるの? JavaScript: えっ、未定義の変数にアクセスした時undefined返したいじゃない? Python: 例外投げて死ねばいいじゃん Ruby: 例外投げて死ねばいいよね Python & Ruby: ねー♡ Java: いやそこは参照型ならnull、数値型なら0で初期化すべきでしょ C: これだから最近の若い子は…初期化にだってコストが掛かるんだからね!デフォルトで初期化するなんて無駄遣いよ!必要な人だけが責任をもって初
2009年03月21日06:30 カテゴリLightweight Languages Ajax - Lightweight Languages を実行するAPI 今度はPerlだけではありません。 Perl だけではなく.... #!/usr/bin/perl warn time, "\n"; print ''.localtime; PHP も(誰だ、私がPHPを嫌いって言ってるのは:).... #!/usr/bin/php <?php echo date('r') ?> Python に... #!/usr/bin/python import datetime print datetime.datetime.now() Ruby に... #!/usr/bin/ruby puts Time.new Scheme (gauche) に... #!/usr/bin/gosh (use srf
2010年09月03日05:30 カテゴリLightweight LanguagesMath Algorithm - 0と1を次々と返す簡単なお仕事 ごもっとも。 0と1を次々返す方法 - a2c.get.diary TrueだったらFalseで、FalseだったらTrueにしたい。 なんかそんなことそこかしこで必要で、その為の便利なものが あるのかなぁと思ったんだけど無いぽい Closure 本来は一番おすすめなのだが… JavaScript ()が煩わしいが、perlやrubyよりは自然。 #!/usr/bin/js var flipflop = function(p){ p = !p; return function(){ return p = !p; }; }; var fl = flipflop(); console.log(fl()); console.log(fl()); c
古いエントリーなのですが、まだ時折検索エンジン経由?でいらっしゃる方がいるみたいなので追記 Titanium Desktopは今はTideSDKと変わってオープンソースプロジェクトになっています。 いいたい事を先に。 Ruby,Python,PHP,JavaScriptやってる人でデスクトップアプリ作成に興味ある人は Appcelerator Titanium Desktop さわってみるといいと思います。OS X, Windows,Linuxとマルチプラットフォームなデスクトップアプリをhtml,JavaScript,Ruby,Python等の慣れ親しんだ技術で簡単に作成、公開することができます。 予想以上にブクマされてるみたいなので、Titanium Desktopの特徴を箇条書きですが追加しておきます。 一言で言えばJavaScriptで記述するAdobe AIRのようなRIAフレー
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く