http://www.kt.rim.or.jp/~kbk/zakkicho/index.html - 11/24/09 06:00:46 - 10/07/08 13:59:44
2009年11月23日
・ファイターズ中田 なんかあの走塁でずいぶん叩かれてますね。
・
まつもとさんの retweet で知ったのですが Twitter / Yukihiro Matsumoto: RT @timbray: URGENT: Anyon ...RT @timbray: URGENT: Anyone reading this in Tokyo, please check http://apachenews.org/ Suicide-prevention in order?という情報がありまして、 問題のページ Apache News Online には I WILL COMMIT SUICIDE で始まるなんとも穏やかでない文章が。 その後なにも情報が入ってこなかったので気になっていたのですが (とはいえ面識もない方なので自分はどうにもできなかったのですけど)、 夜になって reddit にスレッドが立っているのに気がつきました。 He will commit suicide? : programming スレッドを追いかけてみるとdiminoten comments on He will commit suicide? BAM, Reddit to the rescue (emphasis mine) Could not COMMIT SUICIDE Dear the readers of Apachenews.org. I am open to network with all professionals across various disciplines as it is my strong belief that we are all citizens of the world and we can all learn/gain from each other in a mutually beneficial manner. Every new person met has the potential to be a true #MASTER MIND#, you will only discover this by getting out and interacting. Please relieve that I, Tetsuya Kitahata, could not do the suicide because of the lack of money for alcohol. So many responses were there that I received. Thank you to ALL. Yours, -- Tetsuya Kitahata -- mailto:kitahata@99.alumni.u-tokyo.ac.jp -- http://www.linkedin.com/in/tetsuya Huge props to all who sent emails, maybe you saved his life.という記述が。一安心。ということでいいのでしょうか。
スレ立てるまでもない質問はここで 102匹目 208 デフォルトの名無しさん [sage] 2009/11/22(日) 23:08:47 ID: Be: プログラミング言語にハッシュというデータ型がありますよね。rubyとかで{var=>value, hoge=>foo}のように表す型。 これってハッシュ関数(メッセージダイジェスト)のハッシュという言葉と関係あるんですか? 英語表記も両方Hashのようですが。 209 デフォルトの名無しさん [sage] 2009/11/22(日) 23:14:15 ID: Be: データ型のハッシュは、ハッシュテーブルの略です 210 デフォルトの名無しさん [] 2009/11/22(日) 23:14:36 ID: Be: 関係ある。 valueとfooを結び付けると検索するときvalueがどこにあるのか探すのが大変なので valueをハッシュ関数で潰した値とfooを結び付ける。 211 デフォルトの名無しさん [sage] 2009/11/22(日) 23:21:02 ID: Be: >> "hello".hash => 706225659 というハッシュ値が使われてる 212 208 [sage] 2009/11/22(日) 23:27:41 ID: Be: ありがとうございます。 >>209 なるほどハッシュテーブルの略でしたか。 >>210 >>211 う~ん難しい… {"hello"=>value}というデータがある時に、 内部では706225659というアドレスに変換してそのアドレスにvalueが格納されるという感じでしょうか? 213 デフォルトの名無しさん [] 2009/11/22(日) 23:32:08 ID: Be: >>212 706225659をそのまま使うわけじゃなくmod 256とかするだろうけど。 214 デフォルトの名無しさん [sage] 2009/11/22(日) 23:32:11 ID: Be: アドレス? 215 デフォルトの名無しさん [] 2009/11/22(日) 23:34:29 ID: Be: ハッシュテーブルが分かってるのに、なんで後半の質問が出てくるんだろう。。 216 デフォルトの名無しさん [sage] 2009/11/22(日) 23:34:40 ID: Be: ハッシュテーブルを知らんのかな? 217 デフォルトの名無しさん [sage] 2009/11/22(日) 23:34:50 ID: Be: 情報処理の免許を持ってない奴はプログラムしてはいけないと思うんだ 基本的な事すらできてないからいちいち人に聞かなきゃいけない 218 デフォルトの名無しさん [] 2009/11/22(日) 23:36:06 ID: Be: 免許利権 219 デフォルトの名無しさん [sage] 2009/11/22(日) 23:40:34 ID: Be: ひがむなよwww 220 デフォルトの名無しさん [sage] 2009/11/22(日) 23:41:57 ID: Be: ドカタに免許なんていらないだろ 221 212 [sage] 2009/11/22(日) 23:42:33 ID: Be: ハッシュテーブルの意味をちゃんと理解できてなかったみたいです。 ちゃんと勉強しないと駄目ですね…出直してきます 224 デフォルトの名無しさん [sage] 2009/11/22(日) 23:45:07 ID: Be: wikiいわく ハッシュテーブルはキーをもとに生成されたハッシュ値を添え字とした配列である。 だそうだ 225 デフォルトの名無しさん [sage] 2009/11/22(日) 23:48:47 ID: Be: その実装の話だろ 228 デフォルトの名無しさん [sage] 2009/11/23(月) 00:19:12 ID: Be: >>220 でもなあ。 本物の土方さんの監督には資格必要じゃなかったっけ。 この業界にもいるんじゃないかなと切に思ってみたり。 229 デフォルトの名無しさん [sage] 2009/11/23(月) 00:21:59 ID: Be: 監督じゃなくてもユンボだのトラックだの玉がけだの、ドカタは資格のかたまりだよ バイトしたからわかる 230 デフォルトの名無しさん [sage] 2009/11/23(月) 00:24:24 ID: Be: ActiveReportsFor.NETの使い方はここで質問しても大丈夫ですか? 231 デフォルトの名無しさん [sage] 2009/11/23(月) 00:26:01 ID: Be: せめて使ってる言語のスレで聞けば? 232 デフォルトの名無しさん [sage] 2009/11/23(月) 00:27:07 ID: Be: なるほど。ありがとうございます。 233 デフォルトの名無しさん [sage] 2009/11/23(月) 00:35:20 ID: Be: 本物の土方=命に関わる業務 234 デフォルトの名無しさん [sage] 2009/11/23(月) 04:50:35 ID: Be: ハッシュよりもハシシ。 235 デフォルトの名無しさん [sage] 2009/11/23(月) 07:05:19 ID: Be: >>221 言語のハッシュ型の方が、焦点のボケた思いつきっぽい部分があって、 あなたのせいではないかも知れませんよ。 236 デフォルトの名無しさん [sage] 2009/11/23(月) 10:10:01 ID: Be: >>200 これはまた… 20年くらい前のクソゲーが大量生産されそうな見た目だな。C++0x 7 551 デフォルトの名無しさん [sage] 2009/11/23(月) 07:44:03 ID: Be: 混乱の元になるのに、そもそも、 なんでわざわざ既に別の意味で使われてる&に、 参照の意味を持たせたのだろうか? 552 デフォルトの名無しさん [sage] 2009/11/23(月) 07:50:00 ID: Be: タイプコンストラクタと演算子は混同しえないから 553 デフォルトの名無しさん [sage] 2009/11/23(月) 10:56:35 ID: Be: それで混乱するような奴はどっちにしろまともに使いこなせない言語だからいいんじゃね 554 デフォルトの名無しさん [] 2009/11/23(月) 11:06:44 ID: Be: 禿が考えてたのは、もともとこんな発想だろ void a(int*); a(&b); ↓ void a(int&); a(b); つまりアドレス演算子を関数側でつけるってこと 既に別の意味といえば & ならビット AND にも使われているわけで そんなの気にしだしたらきりがない 555 デフォルトの名無しさん [sage] 2009/11/23(月) 11:09:00 ID: Be: *だって別の意味に… 556 デフォルトの名無しさん [sage] 2009/11/23(月) 11:12:27 ID: Be: 別の意味を考えて赤面する美少女中学生 557 デフォルトの名無しさん [sage] 2009/11/23(月) 11:30:45 ID: Be: いやいやそういう意味じゃないって!使ってない記号といったら $ とか @ 位だからなあ。
【初心者歓迎】C/C++室 Ver.69【環境依存OK】 963 デフォルトの名無しさん [sage] 2009/11/20(金) 21:00:34 ID: Be: 関数の戻り値は、通常 値渡しですが 100Mほどのデータをもつクラスでも値渡しになりますか。 (値渡しのコストを下げるために) もし100Mがポインタに入っていて、 auto変数でリターンするとデストラクタが働いてメモリは解放されてしまいますが newで確保した物をリターンすると、それは解放できなくなりますか。 964 デフォルトの名無しさん [sage] 2009/11/20(金) 21:03:27 ID: Be: 戻り値にクラスを持ってこずに引数を参照渡しにすればいいのですが 変数を用意する事無しに、リターンがクラスになっていると便利なことがあるんです。 965 デフォルトの名無しさん [sage] 2009/11/20(金) 21:27:13 ID: Be: 戻り値がクラスというのは意味不明。 オブジェクトを返すとして、たとえば、 LARGE func() { return * new LARGE; } というのは結局コピーしてるし、メモリが回収不能になるので、絶対にだめ。 LARGE & func( LARGE & inout ) { //LARGEを使った処理。 return inout; } として、外で大きなデータを用意してやるか、 funcで全く新しいオブジェクトを作成したいと言うなら、newしてポインタを返せばよい。 966 デフォルトの名無しさん [sage] 2009/11/20(金) 21:38:14 ID: Be: >>965 Qtでこんな関数をオーバーロードしろって言われてるんだけど、 何を返せばいいの? QSize sizeHint(引数略) { return ? } 967 デフォルトの名無しさん [sage] 2009/11/20(金) 22:05:09 ID: Be: QSizeオブジェクトでいいと思うよ。 968 デフォルトの名無しさん [sage] 2009/11/20(金) 22:16:32 ID: Be: え? でも>>965・・・ 969 デフォルトの名無しさん [sage] 2009/11/20(金) 22:18:16 ID: Be: QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const あとこんなのもあるんですが・・・ 970 デフォルトの名無しさん [sage] 2009/11/20(金) 22:20:50 ID: Be: QSizeオブジェクトを返すことが、ライブラリによって強制されてるんだから、従えよ。 971 デフォルトの名無しさん [sage] 2009/11/20(金) 22:21:12 ID: Be: お前が何を聞きたいのかわからない 972 デフォルトの名無しさん [sage] 2009/11/20(金) 22:23:15 ID: Be: > というのは結局コピーしてるし、メモリが回収不能になるので、絶対にだめ。 ってかいてるじゃないですか 973 デフォルトの名無しさん [sage] 2009/11/20(金) 22:23:59 ID: Be: QSizeって大きくないでしょ。(というか100Mというサイズはどこから) 値で返しても何も問題ないじゃん。 974 デフォルトの名無しさん [sage] 2009/11/20(金) 22:40:44 ID: Be: それ以前に QSize sizeHint(引数略) をオーバーロードするのに、 戻り値を参照やポインタにはできんだろ。 オーバーロードのルールを思い出すのだ。 975 デフォルトの名無しさん [sage] 2009/11/20(金) 22:42:16 ID: Be: いや、戻り値を変えられないのはオーバーライドじゃろ。 976 デフォルトの名無しさん [sage] 2009/11/20(金) 22:47:28 ID: Be: たまにいるよね(値|参照)(返し|渡し)の違いがわからない人って まあわからないようなレベルでできることなんて高が知れてるから分かるまで値返しでいいんじゃないかな■_ どこもきびしいなあ
reddit から。
A programmers salary : programming I'm currently studying a software engineering degree at university. I am wondering who here has a job in the programming industry? What do you? Was it hard to get there? How much do you (sic) earn?Programming salaries vary heavily across regions. You are looking at about 70k-100k in northwest (think Seattle), $100k+ in the bay area and NY (Cost of living negates it), and as low as $30-$50k in heart land. Getting a job is pretty easy at most companies, your first job will probably be through a consulting company, they basically buy and sell bodies to companies that need programmers, but don't understand how to do things right. These companies are NOT picky, and if you have a pulse and know how to boot your computer you can get in. Don't expect to be working on anything cool. Most programming jobs are mundane automation, working with service platforms, or building reporting systems.Graduated with BS in CS from an un-prestigious school and only slightly above average grades. My entry level in 98 was about $40K (salaried) with a very small company I had interned at for several previous summers. After the Dot.Com implosion, I contracted through a company sporadically for a number of years with about the same or a little more income, but at hourly rates. For the last half decade at a very large corp, I've gone up quite a bit more. This is in a major metro area in the Pacific Northwest.They would have been 2 years ago. Globalization is really hurting salary right now.Yep, I'm seeing contracts around Portland that pay $30/hour for dev work and recently saw a QA contract that was paying $15/hour - this is without benefits. $30/hour was about what was being paid during 2002 when things were quite bad so we're back there minus the inflation that's occurred since then.以下たくさん。
■_ 予告編
Guido ぱぱとは別の意味で訳すのに大苦戦。 たぶん、shibuya.lisp#4 で竹内先生が言及していた文書ってこれのことだと思うのだけど。
LISP History "Early LISP History (1956-1959) by Herbert Stoyan University of Erlangen-N"urnberg Lehrstuhl f"ur K"unstiche Intelligenz Am Weichselgarten 7, D-91058 Erlangen Germany ABSTRACT This paper describes the development of LISP from McCarthy's first research in the topic of programming languages for AI until the stage when the LISP1 implementation had developed into a serious program (May 1959). We show the steps that led to LISP and the various proposals for LISP interpreters (between November 1958 and May 1959). The paper contains some correcting details of our book (32). 本論文では、McCarthy の first reseach から1959年5月に LISP1 serious program として実装 されるまでのLISP の開発について説明し、1958年11月から1959年5月までの間の LISPへ至るス テップとLISP インタープリターに対する様々な提案をお見せします。 The paper contains some correcting details of our book (32). INTRODUCTION LISP is understood as the model of a functional programming language today. There are people who believe that there once was a clean "pure" language design in the functional direction which was comprised by AI-programmers in search of efficiency. This view does not take into account, that around the end of the fifties, nobody, including McCarthy himself, seriously based his programming on the concept of mathematical function. It is quite certain that McCarthy for a long time associated programming with the design of stepwise executed "algorithms". LISP は今日、関数型プログラミング言語のモデルとして理解されています。AI-programmers in search of efficiency によって comprised されたfunctional direction における clean で “pure” な言語のデザインが存在していたと信じている人たちがいます数学的な関数のコンセ プトにきちんと基づいたものである、彼のプログラミングについての視点 (view) は 1950年代 の終わりの時点では McCarthy 自身も含めて誰からも評価されませんでした。 It is quite certain that McCarthy for a long time associated programming with the design of stepwise executed "algorithms".■_ 本日の巡回から
- Twitter / 菊次郎52歳: Scheme インタプリタ多すぎだろと思う。結局はプ ...
- Twitter / 菊次郎52歳: C++ はね、クラスと名前空間を使わなければ、大抵の ...
- Twitter / Yukihiro Matsumoto: 2011にはJRubyのバージョンが1.9を越える件 ...
- Twitter / polestar23: そこまでwwww RT @epics_jp: 近所の ...
- Twitter / Yugui (Yuki Sonoda): RubyConfに参加して思ったRubyKaigiへ ...
- Twitter / 千利休: 万事何事も続けていれば無駄を見つけてうるさく感じるものです
- Neko operator - YamaKenZ の日記
- くらま事故で社民党と労働組合が海上自衛隊に理不尽な謝罪要求 : 週刊オブイェクト
- Twitter / eitantan: A bad workman always blame ...
- Twitter / どうでもいいや: どうでもいいアニメ「ムダヅモ無き改革」一行情報。鳩ポ ...
- 帰国しました - 私の二次記憶
日本に帰ってくると、周りの人がみなツンケンしているのを感じます。- FacebookはiPhoneと戦うデベロッパを支援すべきだ–そのほうが長期的には断然有利だよ
- アップルの成功の10年をふりかえる « maclalala:link
- 航空自衛隊の次期戦闘機はF-35ライトニングⅡ : 週刊オブイェクト
- Hexenkessel - 日本の企業がFacebookを作れただろうか。どれだけ人材がいて資本があってもFacebookができる...
- Hexenkessel - 「はやぶさ」は火星の方角にいます。兵庫県明石市における、24日午前3時の火星の位置です。火星の少し西側...
- 全自動バリバリやめて!マシーン (笑) #mtm04 on Twitpic
すばらしい。見に行けばよかったw- Twitter / wtnabe: zakkicho は twitter まで拾うように ...
- 数あるブログの一つ(タイトル未定)
windowsでgo言語環境構築
おおっ- Twitter / DenialofSociality: 空白のスタイルの論争のことをspace warsって ...
- Hexenkessel - 「地球シミュレータ」は何が凄かったのか
でもそれでベクトル型の技術は散逸して廃れちゃうけどそれでいいの? ってことだ。今回はスパコンをネタにしてるけど、これは宇宙開発とかバイオとか他の科学技術分野でも同じ。- OCRの認識率が低いのですがお金を払わなければいけないのでしょうか -OKWave
- 職人芸の世界 - Basic
- A First Guide to PostScript
- Gauche | Get Gauche at SourceForge.net
■_ 空白重要
昨日書いた、ソースコードの読みやすさに空白が云々ですが お二人から情報をいただきまして判明しました。
ソースコードのコメントよりも空白行のほうが理解を助けるという研究結果:森崎修司の「どうやってはかるの?」:ITmedia オルタナティブ・ブログ 経由で、
Learning a Metric for Code Readability In this paper, we explore the concept of code readability and investigate its relation to software quality. With data collected from 120 human annotators, we derive associations between a simple set of local code features and human notions of readability. Using those features, we construct an automated readability measure and show that it can be 80% effective, and better than a human on average, at predicting readability judgments. Furthermore, we show that this metric correlates strongly with three measures of software quality: code changes, automated defect reports, and defect log messages. We measure these correlations on over 2.2 million lines of code, as well as longitudinally, over many releases of select projects. Finally, we discuss the implications of this study on programming language design and engineering practice. For example, our data suggests that comments, in of themselves, are less important than simple blank lines to local judgments of readability.全体は、右のほうにあるリンクからたどって 19ドル払わないと読めないようですね。 まあそのくらいならいいかなあ。
2009年11月22日
・ビジョナリー・カンパニー 図書館で借りて読んだんですが微妙… どこかでほめてた記事を見て借りたと思うんですけどなんというか。 ビジョナリー・カンパニーとして挙げられているのにウォルマートやモトローラがあるんですが、 本が出版された(1994年頃?)時点はともかく今現在はどうかというと、うーん。 モトローラのところで「アップルにMPUが採用されて云々」という一文があったりするのが 経過した時間を感じさせるなあと。
・Twitter / いーぐるとまと: そういえば昨日の話では Lisp は関数型じゃないし ... → Twitter / いーぐるとまと: C++ ですかね
・ URLを見失っちゃったんですが、 数日前にソースコードの読みやすさに空白や空行がかなり影響しているという レポートがあったんですよね。もうちょっと詳しく読もうと思ってたのに。えぐ。
・ 一週間くらいについったでつぶやいたんですが、8bit マイコン時代のとある本を探しています。 とはいってもタイトルも出版社も著者すら覚えていないという(苦笑) ただ、Z-80をターゲットにしたコンパイラーの本で、割と厚めのボリュームだったてのは覚えてます。 これまた名前を覚えていないのですが、オリジナルの言語を実装していてほぼ全編実装技術の 詳細の説明だったような記憶が。 国会図書館にでも行くか。
■_ 本日のム板から
マ板の方は生々しすぎたりしてちょっとというのがあったり。
推薦図書/必読書のためのスレッド 52 930 デフォルトの名無しさん [sage] 2009/11/21(土) 22:30:03 ID: Be: 雑誌じゃないけど、DDJのアルゴリズムセットCDROMは新しいの出るのかな… Introduction to Algorithmsだけ新しくなんないかな 931 デフォルトの名無しさん [sage] 2009/11/21(土) 23:46:39 ID: Be: ちょま,結婚すると技術書まで邪魔扱いで捨てられるのか!!!女こえええ 932 デフォルトの名無しさん [sage] 2009/11/22(日) 00:15:59 ID: Be: bitのバックナンバーを捨ててから、教授の様子がおかしい 933 デフォルトの名無しさん [] 2009/11/22(日) 00:19:10 ID: Be: テクノポリスのバックナンバーを拾ってから、ティッシュの減りが早い 934 デフォルトの名無しさん [sage] 2009/11/22(日) 00:27:31 ID: Be: お前らもいずれ動物本捨てられて代わりに虚ろな顔で毎週末動物園に通うようになるんだよ 935 デフォルトの名無しさん [sage] 2009/11/22(日) 00:36:47 ID: Be: 升席もありえるな 936 デフォルトの名無しさん [sage] 2009/11/22(日) 00:37:54 ID: Be: なんか流れがおかしい 937 デフォルトの名無しさん [sage] 2009/11/22(日) 00:44:58 ID: Be: このスレではおかしいのがデフォルト 938 デフォルトの名無しさん [sage] 2009/11/22(日) 05:14:59 ID: Be: >>931 2次元 3次元 │ │ │ 告白 │ ┌─┴─┐ │ 失敗 成功 │ │ ┌─┴─┐ │ │ 破局 結婚 │ │ │ ┌─┴─┐ │ │ │ 搾取 子供誕生 │ │ │ │ ┌─┴─┐ │ │ │ │ 邪魔者化 離婚 │ │ │ │ │ │ │ │ ↓ ↓ │ 慰謝料・養育費 │ └→生き地獄.←┴───┘ │ │ │ │ ↓ 天国なんという流れかw
■_
スレッドのタイトルが気になったので中身を確認したらなんのことはなかったり。
Microsoft decided C is deprecated : programming Microsoft decided C is deprecated (self.programming) (this is all quite old, as it started with MS Visual Studio 2005 but I'm starting to experience it now, and would like to see users opinions and how they've been dealing with this) My older C++ code which included well known C functions such as strcpy, fopen, fscanf, scanf, fdopen, etc. are now deprecated by Microsoft and their use issues a warning. But their MS-only replacements are in fact potentially as insecure as the old ones. What do you do with this situations? (replace the calls with whatever_s making the code non portable, disable warnings, defining MS suggested symbols such as _CRT_SECURE_NO_DEPRECATE which have no effect here, ...)fopen_s や fscanf_s はまあちょっと微妙ではあるけれども、strcpy/strcat/strncpy を 使うのを止めましょうというのは賛成したいところ。 ただまあスレッドのコメントにもあるんですが、 「わかっている」人はきちんと領域のサイズなんかは考えて組んでいるから余計なお世話だろう というのはその通りなんですよね。Urlich とかもそうだったかな。 特にセキュリティがらみのバグでバッファオーバーフローが原因でというのは割りとよく目にする と思うんですが、その内、str* が絡んでいるというのはどのくらいあるんでしょうね。 特に商用のプロプラなプロダクトでの数字を知りたいけど無理だろうなあ。
■_ みねこあさんからお手紙着いた(違います)
つれづれ - みねこあ 2009-11-21 ■つれづれ その132 C++の参照の話が予想に反してホッテントリで、ちょっと驚いています。最初、喩え話が過ぎて 「これはひどい」祭りが起きたんだと思ってビビりました。(きむら(K)さんとかに怒られたか!? とか思ったり) わたしは小心者なので先にいいわけしてしまいます。あれは単なる比喩と捉えた方が良くって、 特に C++ の参照としてはいまいち正しくはないです。いやあむしろ、あの風船のたとえは面白いという意見を見かけたですよ。 それはわたしも同じです。
その137 わかったり聞いたりわからなかったりするはなし。 わたしも新人のとき先輩に「わからないところを何で聞きに来ないっ!」と怒られたことがあり ますが、「何処が解らないのか解らないんですっ!」と逆ギレ(?)して答えた思い出があります。 ・・これはこれで、どうなんでしょ。まあいろいろありますわな>訊きにいかない/こない
その142 true tears のBlu-ray ですが、どうしましょう、と悩んでおります。 ごらんのとおり、わたくし true tears が大好きです。(ちなみにわたくし乃絵派ですの) 普段だったら絶対買ってたのですが、この不景気で収入は激減ですし、ボーナスも絶望的ですし、 貯金を切り崩して買うしか手がない状況です。 本当にどうしたものかしら。うーむ。逃すと再販はないでしょうしねえ。
■_
これ、前のバージョン読んで感心したんだけど(十年前だったのか。途中まで訳したんだよな)、 バージョンアップしたのですね。 でもさっきアクセスしたら、new: と slide: のアドレスはなにもないような? tar 玉は拾えるようですが。
Journal of rurban (7989) Back in 1998 Gisle Aas prepared a graphical overview of all the major internal perl structures, as described in perlguts.pod However this all changed with 5.10, and since nobody else did it and I helps me immensely to work on the compiler, I updated illguts ("illustrated guts") to the current perl state. old: http://cpansearch.perl.org/src/GAAS/illguts-0.09/index.html new: http://rurban.xarch.at/software/perl/illguts-0.10/ slides: http://rurban.xarch.at/software/perl/illguts-0.10/slides/ tardist: http://rurban.xarch.at/software/perl/illguts-0.10.tar.gz I asked Gisle for co-maint so that I can upload it to CPAN soon.- Twitter / shino [ bizmode]: 円錐の体積が円柱の1/3である理由を、140文字以内 ...
- Twitter / 菊次郎52歳: ET 2009 では、組み込み業界の高齢化を実感でき ...
- Hexenkessel - 「地球シミュレータ」は何が凄かったのか
金とモノをぶち込めば世界一になるってのは土建屋の発想でありコンピュータ・エンジニアの発想ではない。- Hexenkessel - 「地球シミュレータ」は何が凄かったのか
- ウォルマート - Wikipedia
- 日刊ベリタ : 記事 : 【IPSコラム】高利益のからくり ウォルマート商法の倫理を問う マーク・ソマー
- 『化物語』・『ひだまりスケッチ』・『GA 芸術科アートデザインクラス』――2009年夏期新作アニメに関する討議1 - 反=アニメ批評
- セブンイレブン限定「ガンダムマスコットストラップ」: コンビニ発見伝通常通るルートにセブンイレブンないんだよなあ。近くにないわけではないんだけど。
- Twitter / やのつとむ: あと、日本ではオブジェクト指向は未だに「受け入れられ ...
- Twitter / _ko1: Tokyo.rb みたいなの,誰か作ってくれないかな
- APRESS.COM : Pro Scala: Monadic Design Patterns for the Web : 9781430228448
- car/cdr - skobayasの日記
car/cdrと言われてもねぇ。(しかも、「かー」とか「くだー」とか。SCEの前の社長じゃないんだから)- □■PC-88スレッド!■□
- 昔の 8-bit OS (Apple,Commodore など) トピックのプロジェクト一覧 - ソフトウェアダウンロードマップ - SourceForge.JP
- 昔の 8-bit OS (Apple,Commodore など) - スラッシュドット・ジャパン
- SjASMPlus - Z80 Assembly Cross-Compiler プロジェクト トップページ - SourceForge.JP
- Books for PC-8801
- Twitter / Yukihiro Matsumoto: 他人のブログへのコメントで行われる議論をトラックする ...
- 揺動散逸日記 C++ template metaprogrammingでサンクができていることを確認。
- 心を亡くすと書いて忙しい - sodiumイオンにっき(2009-11-09)
- タスクリストの“常連さん”をやっつけろ! - *ListFreakみみいてー
- Using a Proof Assistant to Teach Programming Language Foundations (注: pdf)
- Apple's Mistake : programming
■_ あれ
GlobalAlloc とか obsolete でなかったっけ?
移動可能メモリ -OKWave GlobalAlloc関数を調べていたんですが、GlobalLockしてメモリを固定するといっているのですが、 その意味がピンときません。 GMEM_MOVEABLEで移動可能メモリの割り当てを行うようなんですが、 アドレスが移動するってどういうことなんでしょう? 固定メモリと移動可能メモリの違いってなんでしょうか?3.1 の時点ですでに GlobalAlloc →GlobalLock/Unlock とかってあまり意味なかったものなあ (LockしっぱなしでOK)。
2009年11月21日
「素数の音楽」があんなに厚い本だとは思わなかった ○| ̄|_ 「論理学をつくる」は大型本だったし。
Haskellナイト 店員さんの髪の長い方のおねーちゃんが以下略
明倫館書店で掘り出し物発見。 この調子で「物まね鳥をまねる」でもでてこないかなあ
■_ 今日のム板から
Goネタはまとめるのが面倒だ。 まあ発表直後に比べればだいぶ落ち着いてるけど。
Lisp Scheme Part28 489 デフォルトの名無しさん [sage] 2009/11/21(土) 00:15:01 ID: Be: lispを覚えてマクロ使いこなしても、俺の仕事は他人の作ったVBとかのクソコードのデバッグだけなんだよなぁ このスレの先輩諸氏はプログラマーらしい仕事に就けているんだろうか 490 デフォルトの名無しさん [sage] 2009/11/21(土) 00:51:58 ID: Be: SICPを少しずつかたづけてるオレだが 仕事ではexcelとaccessのVBAマクロ作ってる そんなもんだ 491 デフォルトの名無しさん [sage] 2009/11/21(土) 05:44:01 ID: Be: 先輩諸氏がヘボばかりだったから 世の中にLispの仕事がないんだよ 492 デフォルトの名無しさん [sage] 2009/11/21(土) 07:26:31 ID: Be: 嫌ならやめろ 493 デフォルトの名無しさん [sage] 2009/11/21(土) 08:08:29 ID: Be: 使いたきゃ使えばいいじゃん 言語指定の仕事をもらってくる方が悪い 494 デフォルトの名無しさん [sage] 2009/11/21(土) 08:29:18 ID: Be: 世の中そういう仕事しかないよ 495 デフォルトの名無しさん [sage] 2009/11/21(土) 08:34:20 ID: Be: レンズ研磨で生計を立てつつ哲学をしたスピノザのように、 植木職人で生計を立てつつLisp道を究める求道者がいてもいいのではないか。 496 デフォルトの名無しさん [sage] 2009/11/21(土) 08:42:28 ID: Be: そういう人間しかいないだろ Lispやっている奴は 497 デフォルトの名無しさん [sage] 2009/11/21(土) 08:49:13 ID: Be: >>496 そういう人間の方が真っ当だろう。 嫌嫌、VBやって文句言っているよりはいいはずだ。 498 デフォルトの名無しさん [sage] 2009/11/21(土) 08:50:05 ID: Be: 現実がわかってないな 会社に入ったら命令されたことをやるしかないんだよ 499 デフォルトの名無しさん [sage] 2009/11/21(土) 08:56:34 ID: Be: と言うか、業務用として流行ってないところが魅力的なんだろ、LISPは。 趣味の言語だからこそ高尚に感じられるw。 500 デフォルトの名無しさん [sage] 2009/11/21(土) 09:03:59 ID: Be: LISPでVBコード吐かせればいいだろ 501 デフォルトの名無しさん [sage] 2009/11/21(土) 09:05:38 ID: Be: マクロを使っただけでいんちき扱いされる世の中で そんなことが許されるわけないだろ 502 デフォルトの名無しさん [sage] 2009/11/21(土) 09:05:54 ID: Be: そこまでやったらVB直接書くほうが楽だろ 503 デフォルトの名無しさん [sage] 2009/11/21(土) 09:08:17 ID: Be: 問題はreadableなコードを吐いてくれないこと 504 デフォルトの名無しさん [sage] 2009/11/21(土) 09:23:12 ID: Be: >>500 黒田さんもそんなようなことをやったって記事を読んだような。 Scheme->C の変換器を使って顧客に見つからないようにやったけど、 結局、見つかってしまったのだとか。 505 デフォルトの名無しさん [sage] 2009/11/21(土) 09:28:36 ID: Be: 1度の失敗だけで挫けたらダメ! 506 デフォルトの名無しさん [sage] 2009/11/21(土) 09:33:26 ID: Be: 勝手にメンテナンス不能なコード作ったら 顧客も怒るだろ 507 デフォルトの名無しさん [sage] 2009/11/21(土) 09:34:23 ID: Be: >>498 それは低学歴だけw 510 デフォルトの名無しさん [sage] 2009/11/21(土) 09:47:33 ID: Be: >>507 高学歴なら会社に入ったらLispがかけると思ったら大間違いだよ 511 デフォルトの名無しさん [sage] 2009/11/21(土) 10:09:32 ID: Be: 再帰ですら理解不能な連中にプログラムなんて簡単とか、 プログラマーなんて不要とか言われると我慢ならん 513 デフォルトの名無しさん [sage] 2009/11/21(土) 10:30:06 ID: Be: >>511 その辺の連中のやってるプログラミングは単なるパズルだしな。 ピースを誰が作ってるか、というところまでは想像できないんだろうな。推薦図書/必読書のためのスレッド 52 907 デフォルトの名無しさん [sage] 2009/11/20(金) 15:30:24 ID: Be: ニート趣味プログラマーなのですが、コードコンプリートは上下巻ともに買ったほうがいいでしょうか? 908 デフォルトの名無しさん [] 2009/11/20(金) 15:31:29 ID: Be: はい。 909 デフォルトの名無しさん [sage] 2009/11/20(金) 15:39:37 ID: Be: >>907 はっきり言って金と時間の無駄です。 914 デフォルトの名無しさん [sage] 2009/11/20(金) 18:57:43 ID: Be: 上だけ買って読み終わったら下を買うことにして結局下を買わずに一生を終えればいい 916 デフォルトの名無しさん [sage] 2009/11/20(金) 20:27:29 ID: Be: 俺が持ってるコードコンプリートって一冊組なんだよな・・・ 達人プログラマーもみんなが言ってるヤツと違うみたいな感じ 917 デフォルトの名無しさん [sage] 2009/11/20(金) 21:28:22 ID: Be: 俺のコードコンプリートも分冊されてない。しかも英語で書かれてる。 918 デフォルトの名無しさん [sage] 2009/11/20(金) 21:28:29 ID: Be: 達人は両方買ったけど、コードコンプリートってあれ以外あったっけ? 920 デフォルトの名無しさん [sage] 2009/11/20(金) 22:18:25 ID: Be: 古いのなんじゃね? 921 デフォルトの名無しさん [sage] 2009/11/20(金) 23:21:59 ID: Be: >>920 古いんだよw 今見たら94年の初版だった 923 デフォルトの名無しさん [sage] 2009/11/21(土) 08:53:53 ID: Be: >914 俺、これ読み終わったら下巻を買って彼女と結婚するんだ。 924 デフォルトの名無しさん [sage] 2009/11/21(土) 13:30:47 ID: Be: 結婚したら本なんて買えなくなるからな 毎月増える本に、冷たい目をされるんだぜ わかってて結婚したんじゃないのかよ… 925 デフォルトの名無しさん [sage] 2009/11/21(土) 14:26:01 ID: Be: 独身でよかった… オライリーの一人図書館を作る予定w 926 デフォルトの名無しさん [sage] 2009/11/21(土) 14:54:05 ID: Be: 雑誌バックナンバーを捨ててから、夫の様子がおかしい 927 デフォルトの名無しさん [sage] 2009/11/21(土) 18:30:37 ID: Be: 雑誌バックナンバーならDVDとかで手に入りそうだから全く問題ないな。 どうせ必要なのは雑誌の一部だ。 場所取らないし、検索とかが便利になるし、むしろ買う口実に… 928 デフォルトの名無しさん [sage] 2009/11/21(土) 21:10:24 ID: Be: まるまるCマガジンを捨ててから、夫の様子がおかしい 929 デフォルトの名無しさん [sage] 2009/11/21(土) 21:35:03 ID: Be: なんてことしやがるんだ・・・まるまるCマガジンって、pdf化したのを納めたDVD のやつだよね。 創刊号から最終号まで収めたという。 そして気の毒な924。
■_
あとでよむ
SCG: PyGirl: Generating Whole-System VMs from High-Level Prototypes using PyPy PyGirl: Generating Whole-System VMs from High-Level Prototypes using PyPy Camillo Bruni and Toon Verwaest. PyGirl: Generating Whole-System VMs from High-Level Prototypes using PyPy. In Objects, Components, Models and Patterns, Proceedings of TOOLS Europe 2009, LNBIP 33 p. 328—347, Springer-Verlag, 2009. Details. Abstract Virtual machines (VMs) emulating hardware devices are generally implemented in low-level languages for performance reasons. This results in unmaintainable systems that are difficult to understand. In this paper we report on our experience using the PyPy toolchain to improve the portability and reduce the complexity of whole-system VM implementations. As a case study we implement a VM prototype for a Nintendo Game Boy, called PyGirl, in which the high-level model is separated from low-level VM implementation issues. We shed light on the process of refactoring from a low-level VM implementation in Java to a high-level model in RPython. We show that our whole-system VM written with PyPy is significantly less complex than standard implementations, without substantial loss in performance. http://scg.unibe.ch/archive/papers/Brun09cPyGirl.pdf
- 心が震える漫画やアニメのセリフ:ハムスター速報
- Blog Bros. 探査機はやぶさにおける、日本技術者の変態力
「カプセルには(たとえサンプルが入っていなくても)夢が入ってる」と言うコメントがよかった- Twitter / yhara: 日本語の「面白い」はFUNもINTERESTINGも ...
- Twitter / eitantan: A little learning is a dan ...
- 猫は、ストーブに密集・接近しすぎ。焦げてる:ハムスター速報
- 「パソコン進化したなー」って画像:ハムスター速報
- 心が震える漫画やアニメのセリフ:ハムスター速報
- プログラマが越えないといけない壁 『僕はバカなんじゃないか?』の壁::レビログ
- 結局自分が何になりたいのかよく分からない: Sub) どこ見りゃあええねん! コンチクショウ!!
- 帯がネコミミな「月詠 -MOON PHASE-」廉価版DVD-BOX :おた☆スケ -おたくのスケジュール帳-
- Twitter / tnozaki: 誰かSQLプログラミング診断室とか書かないかなー
- Twitter / tnozaki: @nalsh あの本の最長不到関数の章みたいに、アフ ...
- Twitter / 成瀬: @tnozaki まぁ、とりあえず書名は「アカデミー ...
- makotow@tumblr, Coders at Work で C++ はどのように語られていたか、という話題。ほとんどの...
- Twitter / Tajima: 2007年のIT事情 RT システムが汎用機でできて ...
- とある科学の超電磁砲 OPの演出の解説 一貫性のある正負の方向 - karimikarimi
- Twitter / 成瀬: Rubyと結構違うもんだなぁ RT @kosaki5 ...
- MagLev's maglev at master - GitHub
- 【本田雅一の週刊モバイル通信】 Microsoftが過小評価されるもっともな理由
- Hexenkessel - 多くの Lisper は Haskeller に憧れているから(要出典)、Haskeller...
- Ovid at blog.perls.org: Why blogs.perl.org?
- Hexenkessel - 「オープンソース好きでプログラミングに携わっている者だろうが、生活のためにコードを書いている者だろうが...
- 論理などなくてもプログラムは組める -- Baldanders.info
- 論理療法による3分間セラピーの6ステップ - *ListFreak
- Twitter / Kazuhiro NISHIYAMA: 謎のワンライナーをメモ: ruby-1.9.1 -r ...
- Perl6がリリースされてもPerl5は衰退していかないということを伝えたい - Perl入門~サンプルコードによるPerl入門~
- Perl5.11.2 の Perl_keyword_plugin ハックがまじアツイゼ!の巻。 - TokuLog 改めB日記
■_ なんつーか
訳しててなんじゃこらという印象ががががが。 コメントでも散々言われてるっぽいですが。
Why learning Haskell/Python makes you a worse programmer « All Unkept Why learning Haskell/Python makes you a worse programmer Haskell や Python を学ぶことがなぜあなたを劣ったプログラマーにしてしまうのか I've found, contrary to what you sometimes read, that learning Python and Haskell has not improved my programming using other languages. Haskell in particular, being so different from imperative languages, is supposed to give new insights into programming that will help you even when you are not using the language. My current experience doesn't exactly tally with this, and here is why: あなたが時折り見かけることとは逆に、Python や Haskell を学んでも他の言語を使ったわたし のプログラミングを改良したりはしないということにわたしは気がつきました。特に Haskell は命令型言語とはとてもかけ離れているので、たとえそれを使ったことがなかったとしてもあな たを助けてくれるであろうプログラミングに対する新しい insights を提供してくれると考えら れています。 わたしの current experience は doesn't exactly tally with this, 以下にその理由を挙げます: 1. Demotivation. (やる気を失わせる) I find I think in Python, and even in Haskell to some extent, even though I have used Haskell very little. I constantly find myself wanting to use idioms from these languages, or noticing how much less code I'd be able to write if I was using one of these languages (which, although very different from each other, are both much more powerful than the language I use at work, C#). It's very common for me to notice that using either of these languages I could decrease a chunk of code by a factor of 2-5, and not rare to see a factor of 10-20 in certain parts of the code base. わたしは自分が Python と、ほとんど使ったことがないので制限はありましたが Haskell です ら考えていることに気がつきました。わたしは、Haskell や Pyhtonにあったようなイディオムを 使ってみたいとか、あるいは仮にそれらの言語を使ったときに自分がどのくらい少ないコードで それを書けるのか認識したいと常に思っていました (これら二つの言語はかなり違ったものでは ありますが、どちらもわたしが使っている言語である C# と比較するととても強力なものです)。 It's very common for me to notice that それはわたしにはとても当たり前のことで 認識するための using either of these languages I could decrease a chunk of code by a factor of 2-5, Python や Haskellといったわたしが chunk of code を decrease できる and not rare to see a factor of 10-20 in certain parts of the code base. ほとんど見られない Further, my experience with Haskell means that I now see potential bugs everywhere in imperative code. Before, I was fairly well aware of the problems that stateful programming and side-effects can cause, having dealt with many scores of bugs related directly to this, and spent countless hours debugging these problems. But without any alternative, I guess I had just lived with it. Now I know there are other ways of doing these things, I find it difficult to be satisfied with any of the code I write. I am constantly aware that I am writing traps that other people are likely to fall in. さらに言えば、わたしの Haskell の経験は命令型コードの部分のいたるところで潜在的なバグを 見つけさせることに繋がりました。以前は、 stateful programming と副作用が引き起こす可能 性があり、それに直接関係する数多くのバグを扱ってそれらの問題をデバッグするのに countless hours を費やされるという問題に注意していました。けれども何の代替案もないので あれば、わたしはそれと共に生きていただろうと思います。今わたしはこれらのことがらを行う のに別のやり方があるということを知り、わたしの書いたどんなコードでも満足するのは難しい ことを理解しました。他の人が嵌り易い自分がトラップを書いてしまうことをわたしは常に気を つけています I also find C# code very ugly compared to both Python and Haskell. On the visual level, the mandatory use of braces everywhere (OK, they're not mandatory everywhere but are enforced by coding standards with good reason) makes code contain a lot of line noise and empty space, and combined with the verbosity of the libraries and type declarations etc, you find that a page of C# hardly does anything. I'm also thinking of beauty on the mathematical level, C# is a grubby mud hut compared to the breathtaking, elegant tower that is Haskell. わたしは C# で書いたコードが Python や Haskellで書いたそれに比べるととても ugly なことに も気がつきました。visual なレベルでは、あらゆるところで強制される (mandatory) ブレース (ああ、たしかにあらゆるところでは強制 (mandatory) されはしないかもしれませんが、good reason つきのコーディング規約で enforce はされますよね) は行ノイズと空スペースを抱え、verbosity of the libraries (ライブラリの冗長さ) と型宣言などとが合体したコードを作り出します。わたしは また、数学のレベルで美しさについて考えるのですが、息を呑むほどの elegant tower である Haskell と比較するとC# は grubby で泥でできた小屋です The net result of these things is to make me very depressed and demoralised. I feel like a human compiler, translating the Haskell or Python in my head into a language which is a whole level lower. these things の net result はわたしをとても落胆させ、やる気を失わせるものでした。 わたしは自分の脳内に浮かんだ Haskell や Python のコードを水準の低い言語に変換する人間 コンパイラーのようなものだと感じたのです。 2. Using functional style obfuscates your code when using other languages. 関数型のスタイルを使うことで他の言語を使うときにあなたのコードが読みにくいものになってしまう C# has begun to get some features that are more friendly to functional style programming. So, the other day, when faced with a very common situation I tried a functional solution. I have a list of Foo objects, each having a Description() method that returns a string. I need to concatenate all the non-empty descriptions, inserting newlines between them. C# はより関数スタイルのプログラミングがやりやすいようないくつかの機能を取り入れ始めました。 ですから、先日わたしが非常に良くあるシチュエーションに直面したときにわたしは関数的ソリュー ション (functional solution) に挑戦したのです。Foo というオブジェクトのリストがあって、それ ぞれが文字列を返す Description() というメソッドを持っていました。そして空ではない description の全てを間に改行を挟んで連結する必要がありました。 The code I wanted to write was this Python code: わたしが書きたかったコードはPython での以下のようなコードです: "\n".join(foo.description() for foo in mylist if foo.description() != "") Or this Haskell: Haskell ではこうです: concat $ List.intersperse "\n" $ filter (/= "") $ map description mylist Using generics from C# 2.0 and the methods they contain, the best I got was: C# 2.0 以降で使えるジェネリクスをメソッドで使うとすると string.Join("\n", mylist.ConvertAll<string>( delegate(Foo foo) { return foo.Description(); }).FindAll( delegate(string x) { return x != ""; }).ToArray()); If I had been starting with a different data structure, the C# version would have been even worse -- and C# seems to have hundreds of different collection classes, used inconsistently in the .NET libraries. Also I should point out that if you write any methods that accept 'delegates' (the nearest thing to first class functions) you have to declare the function signature for them separately if one doesn't exist already (or if you don't know where to find one that already exists), further adding to the bloat of any functional style code. もしわたしが別のデータ構造で始めたとしたならば、C# は .NET ライブラリの中で一貫性なく 使われている異なるコレクションクラスを数百も持っているように思われるので、C# バージョ ンはより劣ったものになってしまうでしょう。同様に、'delegates' (first class functions に最も近い何か) を受け付けるなんらかのメソッドを書くならば、そのメソッドが既出でない場 合 (もしくはどこにあるのかわからない場合) には関数のシグネチャ (function signature) を 分割して宣言する必要があって、すべての関数的な形式のコードに追加して膨張させてしまいま す。 There are some big problems with the C# version. The first is that there is very little reduction in size versus the imperative style code, if any. Compare to the tedious loop I would have written otherwise: C# バージョンには大きな問題が幾つかあります。第一に、命令型スタイルのコードに比べて大きさ の減少が、あったとしてもとても小さいということです。わたしが別に書いた tedious loop と比 較してみましょう string retval = ""; foreach (Foo foo in mylist) { string desc = foo.description(); if (desc != "") { if (retval != "") retval += "\n"; retval += desc; } } There isn't much in it. Second, it took me longer to write. I had to do some experimenting to see how much type information I had to add to get it to compile (e.g. adding an explicit cast for the delegate turned out not to be necessary, but I did have to specify ConvertAll<string> instead of ConvertAll). 第二に、それはわたしにとって書くのに長すぎるのです。わたしは以前、コンパイルのために 取得し追加しなければならなかった型情報がどのくらいなのかを確認するためのちょっとした 実験をする必要がありました (e.g. delegate に対する明確なキャストの追加は必要なくなりましたが、ConvertAll の代わ りに ConvertAll<string> と指定しなければなりませんでした)。 Finally, there is the problem that this code will get me into trouble with my colleagues. Why am I writing such complex code -- using such advanced features as anonymous delegates -- when a simple loop would have sufficed? I actually left my functional version in, but was so embarrassed about it I had to add a brief explanatory note. 最後がこのようなコードには同僚に対するトラブルを引き起こすという問題があるということです。 なぜわたしは単純なループでも十分なときにも anonymous delegates (無名デリゲート) のような 高度な機能を使ってこんなに複雑なコードを書いているのでしょうか? 実際にわたしが関数的なも のを書いたときには同僚がそれに困惑してしまうので、説明のための文章を追加しなければなりま せんでした。 The fact is that functional idioms work badly in languages that don't have syntactic support for them. Java, from what I know, would have been much worse. C# suffers in that although some features that enable more functional programming have arrived in C# 2.0 (along with various other language improvements), huge chunks of .NET libraries have not been updated to take advantage of them, and our own code certainly hasn't. 現実には関数型的なイディオムは、構文的にそれをサポートしていない言語では悪い方向に働き ます。わたしの知っているところでは Java がかなりひどくなっています。C# は 2.0 になって、 より関数型プログラミングを可能にするいくつかの機能を (その他の言語の改良と一緒に)サポー トしてはいますが、.NET ライブラリの巨大な chunks はまだその利点を活かすように更新されて はいないし、わたしたち自身のコードもそうなっていないのです。 It might be argued that you can still use the principles of functional programming (no side effects, functions depend only on their inputs etc) and get benefits that way, even if you can't use the idioms. In reality, libraries and frameworks designed for imperative languages just don't work like that. ASP.NET is an especially bad example. You develop controls by inheriting from Control and then overriding various methods. Most of these methods have no return value and no inputs, and work solely by mutating the state of the object (or other objects). They are then called by the framework in a somewhat subtle and complex order (yes, it is a nightmare to debug). あなたがたとえイディオムを使えなかったとしても関数型言語の原則 (副作用がなく、入力の みに依存する関数など) を使うことができて、それによる利益を得られるという主張があるか もしれません。実際には、ライブラリやフレームワークは命令型言語向けに設計されているの で関数型言語的には動作しないのです。ASP.NET は特に悪い例です。あなたは Control から 継承しておいてから様々なメソッドをオーバーライドしてコントロールを開発します。このよ うな手法 (methods) の大半は return value も input もなく、そのメソッドを抱えているオ ブジェクトの(もしくは他のオブジェクトの)状態を変更することにより単独で動作します。そ うしたコントロールはその後、とてもわかりにくく複雑な順序(そう、それはデバッグ時の悪夢 です)でフレームワークから呼び出されます。 In fact, applying the principles of functional programming would lead me to use only static methods (no instance methods) as much as possible, avoiding anything that mutates states (or even has the possibility of mutating state). I would use a few ubiquitous, 'dumb' datatypes, and keep algorithms separate from them. This flies in the face of the teachings, or at least the practices, of the main programming paradigm popular today, OOP. I can't apply what I think are good principles for writing code without rejecting the very paradigm of the language and libraries I am surrounded with. It's fairly hopeless. 現実として、関数型プログラミングの原則を適用することはわたしに可能な限り (インスタンス メソッドではなく) スタティックメソッドだけを使うようにさせ、状態を変更するあらゆることを 排除 (or even has the possibility of mutating state) するようにさせました。 I would use a few ubiquitous, 'dumb' datatypes, and keep algorithms separate from them. これは今日ポピュラーな主流のプログラミングについてのパラダイムである OOP の教え、すくな くとも practices とは反しています。コードを書くための良い原則であるとわたしが考えている ものを、わたしを囲んでいる言語やライブラリの very paradigm を reject することなしに わたしは適用することができませんでした。それはとても希望のないことなのです。 So, learning Python and Haskell has demoralised me and encouraged me to write code that is bizarre and difficult to understand, and, in the context of an OOP code base, provides little benefit over imperative programming. I have no doubt that in general I am a better programmer for learning these languages, but in my current situation, I am not a better software developer -- my productivity has in fact nose-dived. When I get frustrated with the C# code I write, I then go and write it again in Haskell and Python, to demonstrate to myself how much better they are, which is a pointless exercise that only demotivates me further. ですから Python や Haskell を学ぶことはわたしを demoralised (やる気を挫く、混乱する) させ、奇妙で理解しにくいコードを書かせるようにしてしまったのです。そして OOP コードベ ースの文脈では、命令型プログラミング (imperative programming) に対してはわずかな利益し か与えられません。わたしは自分が、一般論として Haskell や Python のような言語を学ぶ better プログラマーであるということに疑いを持っていません。しかし私が現在置かれている 状況においてはわたしは better software developer ではありません。-- my productivity has in fact nose-dived.わたしの productivity は nose-dived してしまいました。わたしが 自分の書いた C#のコードに不満を覚えていたとき、わたしはそれを、自分のやる気を無くすた めだけの pointless exercise として自分自身にそれらの言語がいかに素晴らしいかを demonstrate するためにHaskell や Python で書き直してみました。 The moral of the story: don't bother improving yourself, unless you have the freedom to improve your environment accordingly. That's rather depressing. Can anyone put a better spin on this and cheer me up? The moral of the story: 自分の置かれている環境を accordingly に improve できる 自由をあなたが手に入れるまでは あなた自身を improving させることに飽きてはいけません それはとてもがっかりさせられることです。 Can anyone put a better spin on this and cheer me up? Update: I probably should have made it more obvious for some people that the title of the post is not entirely serious, and mainly I'm just griping. 更新: I probably should have made it more obvious for some people that the title of the post is not entirely serious, and mainly I'm just griping.
2009年11月20日
・Haskellな夜 ということでいってまいりました。Haskellナイト。 アクセスマップを見ていて気がついたんですが、 お台場ガンダムのあった潮風公園からも割と近いっちゃあ近い位置だったんですね。 アクセスマップ TOKYO CULTURE CULTURE:@nifty
まとめを書いている余裕がナッシング。
すぺさるどりんくその1
すぺさるどりんくその2
座談会の参加者の方々。
Programming in Haskell の著者からのメッセージ。 来年4月に来日の予定があるとか (それにあわせてまたなにかイベントをやるかも?)。 会場の参加者対して「Haskellで練習問題以上のものを作ったことのある人?」 向井さん Haskell一時期使ってたけど飽きた? RWH 日本語になるだけでも価値がある 720ページで3800円。あまりない値段付け 原書は50ドルくらい? タイムインターメディアに感謝 原著者に50箇所間違いを指摘した (反応はすぐに返ってくることも時間がかかることも) 掲載されているプログラムはそのまま実行できるはず ただし本で想定しているのが GHC 6.8.3、現行の最新が 6.10.4 なのでコンパイルエラーになるものが 316ページ 366ページ 世界で一番わかりにくい再帰の説明 筆者が複数のせいか記述がころころ変わったりすることも 末尾再帰 Programming in Haskell 10%ルールで輪講しました 訳したら大学で使ってもらえるかも 「またHaskell本か」(RWHもオライリー→オーム社) RWHの値段の情報が流れてきて再考 かなりがんばりました 通常なら考えられない値段 720ページ以上の内容が詰まってます キーボードに刻印されていない記号使ってます 13章がわからないという声が 「RWHは好きなところを好きな順序で」 「Programming in Haskellは頭から順に」 Arc Challenge Lisp 関数合成 setq なしでプログラムを組めるのか? モナド なぜモナドは難しいのか 暗闇の中 群盲象を撫でる >>= は 理解不能な概念を放っておけない
座談会で cut-sea さんが、Programming in Hsakell の原書の値段を見たら 一万円超えていてびっくりしたという話をされたんですけど、それって ハードカバーのやつじゃないかなあ(ジュンク堂にずっと置いてあるしw)。 ペーパーバックのほうは一万円超えたことはないと思うけど。
■_
関数型プログラミング言語Haskell Part11 228 デフォルトの名無しさん [sage] 2009/11/18(水) 05:09:15 ID: Be: Cで書かれたHaskellの1000行程度の小さい処理系ってないのか 無いなら作る魂発揮できれば良いんだけど 229 デフォルトの名無しさん [sage] 2009/11/18(水) 07:57:41 ID: Be: schemeでも2000行程は掛かるから、 演算子が色々あるhaskellはその十数倍は見積もらないと。 haskellの最小コア命令セットってどうなるんだろ? schemeだとapply evalに、if set! define lambda beginだったか。(マクロもあるけど) 230 デフォルトの名無しさん [sage] 2009/11/18(水) 08:34:14 ID: Be: >>228 Haskellの教育向け実装処理系であるGoferはいかが? ソースの合計行数(wc -l *.[chy])は、27110行だった。 作者によるユーザガイドと実装に関する論文も公開されている(ただし英語)。 231 デフォルトの名無しさん [sage] 2009/11/18(水) 12:17:32 ID: Be: >>228 作れるの? 235 デフォルトの名無しさん [sage] 2009/11/18(水) 16:38:15 ID: Be: いっそhaskell--とか言うサブセットでも定義して実装するとか なんか色々なものがclassで実装出来そうな気がする つまり標準的な仕様から除外出来そうな。互換性には目を瞑るって事で 236 デフォルトの名無しさん [sage] 2009/11/18(水) 17:42:21 ID: Be: >>235 良く分からんけどがんばれC で書くというのはまあ大変だろうけど、「最小限の実装」ってどのくらいで 実装できるもんなんだろう(「最小」の定義があれか)。
■_ FizzBuzz ともなど
http://debasishg.blogspot.com/2009/01/fizzbuzz-and-state-monad.html Ruminations of a Programmer: Fizzbuzz and the State Monad Fizzbuzz and the State Monad When I want to learn something I tend to look for examples that articulate the theme of the problem directly instead of making it accidentally complex. Simple examples make things easier, and I was searching for such an exmaple for understanding the State Monad in Haskell. わたしが何かを学びたいと望んだときに単純な例はものごとを易しくするので、わたしは Haskell の State Monad を理解するためのそういった例を探そうと思いました。 The State monad is useful for modeling computations in Haskell that maintain state, the bread and butter of programming in an imperative language. Haskell tutorials for beginners teach us how to pass on the old value of the state with each call of the function, and then extract the new state from the result. Commonly referred to as "threading the state through the computation", this strategy works, but tedius .. and Haskellers will consider this .. boilerplate. State モナドは Haskell で命令型言語でのプログラミングのパンとバター (the bread and butter)である「状態」を取り扱うような modeling computations に有用です。ビギナー向けの Haskell チュートリアルは関数の呼出しごとに state の古い値をどのように渡すかそして新し い state をその結果から extract するのかを教えています。この strategy works は一般に "threading the state through the computation",とされていますが、tedius (tedious 退屈?) であり、Haskell 使いはこれを boilerplate と見なすのです。 the bread and butter: 非常に重要なこと、もの。飯の種。 boilerplate: 良くあるパターンの文。とか。 The State monad raises the level of abstraction and decouples the state management from the computation itself. I am not going to write yet another tutorial on monads. Instead I would like to share the example problem which made me understand the State monad quite beautifully. State モナドは抽象化のレベルを引き上げ (raises the level of abstraction)、computation そのものから状態管理を分離します。わたしはモナドについてのyet another なチュートリアル を書こうとは思っていません。その代わりに、わたしに State モナドをとても美しく理解させ た問題の例を共有したいと考えているのです。 It is fizzbuzz !! Fizzbuzz has been solved in a multitude of languages of various paradigms. The basic problem that fizzbuzz solves is simple enough to be moulded into demonstrating various idioms of a programming language. Not all of them are efficient or elegant enough, but serves well articulating the idiom in hand - you don't have to stretch yourselves to comprehend the problem that you are trying to solve. You can focus on the solution itself right from the word go. Even Haskell has quite a few solutions to the fizzbuzz problem, but I could not find one that makes use of the State monad. The solution below generates the whole fizzbuzz sequence as a side-effect using monads. This is not the most elegant of solutions for fizzbuzz, does not work for infinite sequences, but I found it quite simple and useful in understanding the State monad in Haskell .. それが fizzbuzz です!! fizzbuzz が解決した基本的な問題とは、プログラミング言語の様々な イディオムをデモンストレーションするための型として十分すぎるほど単純なものです。そのす べてが十分に効率的 (efficient) でエレガント (elegant) というわけではありませんがbut serves well articulating the idiom in hand -あなたが解こうとしている問題を compprehend するために自分自身を stretch する必要はありません。You can focus on the solution itself right from the word go. Haskell でさえ fizzbuzz 問題を解く方法はいくつもありま すが、わたしは State モナドを使ったものを見つけることができませんでした。以下に挙げた 解法では fizzbuzz sequence 全体を藻などを使った副作用として生成しています。これは fizzbuzz の解法としては most elegant なものではありませんしinfinite seqences にも対応 していませんが、わたしが Haskell の State モナドを理解するのにとてもシンプルで有用なも のでした。 Without further ado .. import Monad import Control.Monad.State -- the entire fizzbuzz list is prepared as a side-effect -- collect prepares the list as the State -- mapM strips the values part run_fizzbuzz :: [Integer] -> [[Char]] run_fizzbuzz list = state where (_, state) = runState (do mapM_ collect list) [] collect :: Integer -> State [[Char]] () -- gets the old state and cons s the new collect n = do f <- get put ((fizzbuzz n):f) fizzbuzz :: Integer -> [Char] fizzbuzz n | n `rem` 3 == 0 && n `rem` 5 == 0 = "fizzbuzz" | n `rem` 3 == 0 = "fizz" | n `rem` 5 == 0 = "buzz" | otherwise = show n main :: IO () main = do putStr $ show $ reverse $ run_fizzbuzz [1..100] Posted by Debasish at 1/18/2009 07:52:00 PM■_
- nothingmuch's perl blog: Functional programming and unreasonable expectations
- C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 8 of 13 | Going Deep | Channel 9
- The future of Python 2.x and 3.x : programming
- clojureの日本語の情報源に必要なものは? - Lisp log - cadr group
- yanok.net
- PerlIOのレイヤについてまとめてみた - ぱせらんメモ
- Twitter / ゆーき: 「/usr/binに [ っていう変なファイルがあっ ...
- Twitter / camlspotter: 1x年前、Turbo C のヘルプが無かったら今こう ...
- Twitter / Keigo IMAI: コンパイラの警告とリンカの警告を区別できない学生をわ ...
- Twitter / Keigo IMAI: そもそもリンカを意識しなくてよい言語やツールが多いか ...
- Twitter / めるぽん: これは広めておこう。 RT @zakkas783: ...
- Twitter / zak: 昨日も思ったのだが"C++闇の軍団"はいい人ばかりだ ...
- 美しいソースとは? -OKWave
- 新劇場版:序と破で24ヶ月分になっているロッテリアの「ヱヴァンゲリヲン2010カレンダー」を買ってみた - GIGAZINE
- Hexenkessel - ソフト開発企業に所属するプログラマが十年一日のように「個別案件」を相手にしているというのは、マイケル・...
- HaskellNightいってきた - takkan_mのNo planな日常
- Lispの良さがわからないという人たちへ - 八発白中
2009年11月19日
お台場で僕と握手!
・だる 東スポの記事によるとダルビッシュの故障はかなり重傷で、 来シーズンの前半も出場があぶないとかなんとか。
・うっちートレード志願 これも東スポから。もっとも昨日のだけど。 放っておいても来年FAの権利が(多分)得られますが、 年俸交渉で提示された金額が納得いかなかったとか何とか。 まあ選手と球団と両方に言い分はあるだろうけど、 「絶対額」として出せる金額はあまり高くないんじゃないかな。 観客動員はアレだし、TV放送で放映権料なんかもほとんどないだろうし、 一応親会社のTBSは以下略だし。 まあ、「親会社」からの金でどうにかなってる球団経営は変だと思うけどね。
■_ Perl 6
もうよくわからんw http://blog.perlassociation.org/2009/11/perl5-and-perl6.html http://www.shadowcat.co.uk/blog/matt-s-trout/f_ck-perl-6/ http://use.perl.org/~masak/journal/39912
Perl5 and Perl6 - Japan Perl Association運営ブログ 最近CatalystやDBIx::Classで有名なMatt Trout氏とPerl6の開発者の1人であるCarl Masak氏が IRCでPerl5とPerl6の関係性について色々議論した結果基本的な合意が見られたようで、相次い でブログをアップしています。 これまでPerl5コミュニティからは「まだまだ実用段階じゃないのにPerl6なんて大々的に言って いるものだからPerl5のネガティブキャンペーンになってしまっている」、Perl6コミュニティか らは「なんで開発途上のソフトウェアにこんなにいちゃもんをつけられなければいけないんだ」 というような声があがってきていましたが、これは単純にブランディング的、マーケティング的 な袖の掛け違いであることが書かれています。 彼らのブログに大きな結論としては、 「Perl6はPerl5とは同じPerlという大家族の一員ではあるが、同じ血統ではない」 ということが強く全面に押し出されています。また、このような話し合いがもたれた結果、 perl6.orgのサイト上でも「次世代のPerl」という表現が削除されたそうです。 Perl6がPerl1~5までの哲学や思想を受け継いだものであることは間違いありませんし、 Perl"6"という名前も今後変更する予定はないということですが、かといってPerl6は Perl5が突然Perl5に取って代わる事はありえません。 Perl5自体は現在開発者の若返りが多少起こりつつありますが、Perl6や他のLL言語からどんどん 良いところを盗みつつ、独自の開発がどんどん進んでいっています。Perl5の現在の利用状況も こちらのブログで「絶好調であり、これまでよりもいっそう活発になっている」との報告もあり ます。 Perl6が出たらPerl5はお払い箱になる、という考えだったひとはひとまずそれを忘れて、Perl5 シリーズを再評価してみるのもいいかもしれません。Journal of masak (6289) People's minds weave stories. Stories weave people's minds. My mind is pretty tied to the Perl 6 story nowadays, and I haven't minded the Perl 5 story much. Until this week, that is. Last Sunday, I backlogged over a discussion of someone coming in from #perl asking people on #perl6 why Perl 6 claimed to be Perl when it clearly isn't. My resulting blog post basically asked the #perl people to stop telling outsiders biased things. (略) Then I learned a bunch of interesting things about the Perl 5 story, things which I would probably have figured out by myself sooner, had I not been so influenced by the Perl 6 story already. Here I make a partly vain attempt to summarize the Perl 5 take on Perl 6: * There's Perl 5, and it's pretty awesome. It's fast, well-tested, and has the CPAN, which rocks. People who weave the Perl 5 story are generally not sitting around waiting for Perl 6, nor are they particularly interested in making it arrive sooner. * From the outside, and generalizing, Perl 6 looks like a big failure. It hasn't "arrived" yet, and in the process it has generated massive amounts of bad PR for itself and for Perl in general. Parts of the bad PR come from not arriving yet, parts of it come from the version thing. * The version thing, in essence, is this: 6 is larger than 5. Everyone knows what this means; releases with bigger version numbers (especially major ones) are better than, and are meant to replace, releases with smaller version numbers. Perl 5 replaced Perl 4, which replaced Perl 3, etc. Perl 6 lambdacamels don't think much about this, but Perl 5 folks fielding questions from outsiders about Perl 6 sure do. * To make matters worse, those Perl 6 people are actually encouraging the delusion that Perl 6 is replacing Perl 5. They have early alpha releases out, and they're making statements about Perl 6 being the "next version of Perl", as if they were standing there with the finished product already. * When people try what the Perl 6 people have, the find it slow, buggy, and in almost total lack of library. If these people are outsiders, they might well associate those bad things with "Perl", and never get to trying out Perl 5, the "real" Perl. (略) Perl 5 and Perl 6 are two languages in the Perl family, but of different lineages. It won't entirely remove the damage that the "6 > 5" phenomenon causes the Perl 5 crowd, but it will at least mitigate it. Also it shows some serious good will from the Perl 6 side. What we do not want is a conflict, where the Perl 5 community feels the need to assert itself against the impostor Perl 6, which threatens it simply by being Perl 6. "Rewrite" does not mean "overwrite". Perl 5 isn't going away anytime soon. This is actually something we say on the channel a lot, but it hasn't been evident in our PR. The Perl 6 community is taking steps to rectify that. Where the perl6.org page used to say "Perl 6, the next major version of the Perl programming language", it now says "Perl 6, the spunky little sister of Perl 5. Like her world-famous big sister, Perl 6 intends to carry forward the high ideals of the Perl community." With this re-wording, things are suddenly much more on equal grounds. While I'm posting this, mst++ has made a blog post in his inimitable style over at his blog, where he defends the Perl 6 story to his peers. I've read it, and while it does contain the usual amount of four-letter words, it also makes points very similar to this post's, but in a sort of mirror-like Perl 5 universe. Understanding needs to flow in from both sides in this matter. You should read it, too. In an ideal world, we will have Perl 5 and a mature Perl 6 existing side by side, not feeling threatened by each other, and competing on cool tech. The Perl 5 and Perl 6 communities could recognize each other's Perl version as Perl, go to the same conferences (as we do already), and feel confident about the other group's assertions of superiority, because they're so clearly misguided, while still perfectly fine individuals, of course. Let's try to steer in that direction, and not towards mutual assured destruction. That's just mad.ちょっと頭に血が上り気味の方も。
F-ck Perl 6 Yes, This Is A Rant. You were warned. Tue, 17 November 2009 22:26 Alright, so, with a bit of luck and a following wind the title of this post is going to have segregated my audience into a number of sub-sets: (1) The people who're seriously into their Perl 5 and want to hear about me having a good rant about the useless science project that's screwed over our marketing for years and still can't manage to produce a release that anybody can use for anything sensible and smile safe in the knowledge that Perl 6 people just Don't Fucking Get It. (2) The people who're seriously into their Perl 6 and want to see what the hell this delusional arrogant fucktard is on about so they can check off all the stupid mistakes I make and the inconsistencies and the unfair jibes when Rakudo Star is turning up soon and nobody ever said this was ready yet so why are you being such a bitch about the fact it isn't and smile safe in the knowledge that Perl 5 people just Don't Fucking Get It. (3) The people who're seriously into either and just went "oh for fuck's sake, look, even MORE stupid infighting" and clicked somewhere else in disgust. So, given those distributions, there's a reasonable chance that you're in group (1) or group (2) - the group (3) people have already gone. And that's fine. I wasn't talking to them. (略) Here's what we need to say, and it's really fucking simple.Perl 5 and Perl 6 are two different languages. Perl 5 and Perl 6 are both part of the Perl family. Perl 5 has a website at http://www.perl.org/ because it was once the only one. Perl 6 has a website at http://www.perl6.org/ because it started out with Perl 5 already existing.Then, assuming you're like me, you say: And I use, and love, and intend to continue using Perl 5. That's it. Here, I turned it into a rant-free link for you. That's fucking it. Now move on. You're a Perl 5 guy, right? So fuck Perl 6. Fuck python. Fuck ruby. Fuck PHP in the eye with a rusty nail. Let's actually move the fuck on and talk about why we love Perl 5, why we keep using it even if people seem to declare it dead every so often (just like C, and UNIX, and everything else I care about in production, but anyway), why we're excited about it and all the awesome new things that are happening. And let's celebrate the things we stole from Perl 6, like half the syntax for MooseX::Declare. And let's celebrate the things we stole from python, like the C3 method resolution order. And let's celebrate the things we're experimenting with stealing from ruby, like PerlX::MethodCallWithBlock. And let's celebrate not stealing anything from PHP ... except that I wish we could steal their ease of deployment, but I'll wax lyrical (or scatalogical) on that one another time. Some people may remember an article by Steve Yegge where he said - (略)Perl5 and Perl6 - TokuLog 改めB日記 ■Perl5 and Perl6CommentsAdd Star http://blog.perlassociation.org/2009/11/perl5-and-perl6.html まあ、なんだかんだで、Perl5 に対する投資が Perl6 があるというおかげで阻害されてきた部 分はあるので、よい傾向じゃないかとおもいます。 俺は、昨年だかの YAPC の後の飲み会で Larry が「Perl6 はリリースできてもできなくてもど っちでもええんや」といってたのを聞いてたので、その時点で諦めてたけどね!なんと?! >どっちでも
■_ Cに参照渡し (call by refernce) はないんだがなあ
C言語なら俺に聞け(入門篇) Part 55 965 デフォルトの名無しさん [sage] 2009/11/19(木) 16:05:06 ID: Be: C言語で、引数 char *bufを書き換えるにはどうするんですか。 f( char* &buf) だと出来ますけど 966 デフォルトの名無しさん [sage] 2009/11/19(木) 16:07:34 ID: Be: DLLなどで、char *buf; int size; f(buf, &size);で値を受け取る場合があると思うのですが。 これは参照使うんですか。 C言語のDLLで参照は使えるんですか。 967 デフォルトの名無しさん [sage] 2009/11/19(木) 16:10:29 ID: Be: 参照を使ったDLLの関数は、純粋なCコンパイラで動作するのかが知りたいです。 968 デフォルトの名無しさん [sage] 2009/11/19(木) 16:25:12 ID: Be: 調べたところDLLにすると、 ポインタ値渡しが、ポインタ参照渡しに自動で変換されるようですね。 確実かはわからないのですが。 969 デフォルトの名無しさん [sage] 2009/11/19(木) 16:28:30 ID: Be: >>965 戻り値を使え。 char *buf; buf = f(buf); 970 デフォルトの名無しさん [sage] 2009/11/19(木) 16:31:12 ID: Be: 何でもかんでも参照渡しばっかりで 戻り値を単なる成否チェックにしか使ってないの見るとイラっとくるよな。 971 デフォルトの名無しさん [sage] 2009/11/19(木) 16:37:33 ID: Be: DLLでやってた方法は、 char *in , *out; int insz, outsz; f(in , insz, out, outsz);という値渡しでした。 だから>>968は間違えました。 >>969 その方法でサイズを取得したい場合は構造体にすればいいと思いますが C言語から参照を使ったDLLは使えないんですか。 これがしりたいです。 972 デフォルトの名無しさん [sage] 2009/11/19(木) 16:40:09 ID: Be: 安全の為には、構造体の戻り値にすればいいのですが、 異なる戻り値の関数毎に構造体を定義しないといけないのが不便なのですが。 973 デフォルトの名無しさん [sage] 2009/11/19(木) 16:43:40 ID: Be: もうちょっとまとめて書けよ。 どれとどれが同じ人の書き込みなんだ? 974 デフォルトの名無しさん [sage] 2009/11/19(木) 16:48:06 ID: Be: >>970 C に参照なんざないのに、その辺の用語も怪しいのが 質問乱発してるのはもっとイラっとする。 975 デフォルトの名無しさん [sage] 2009/11/19(木) 16:54:05 ID: Be: mov ax,1000 mov bx,[ax] これがポインタや参照の正体だろ 976 デフォルトの名無しさん [sage] 2009/11/19(木) 16:54:43 ID: Be: >>974 参照を使ったC++で作ったDLLはC言語で動作するのかしりたいんです。 977 デフォルトの名無しさん [sage] 2009/11/19(木) 16:55:12 ID: Be: 以下の○に0個以上2個以下の文字を入れてちょ ○○渡し:その変数の複製を参考資料の形で渡すこと。変数を 呼び出し先が変更しても、呼び出し元の変数には影響が出ない。 ○渡し:その変数の価値、すなわちその変数そのものを呼び出し先に 変更することを許可する形式で渡すこと 978 デフォルトの名無しさん [sage] 2009/11/19(木) 16:55:40 ID: Be: >>976 めんどくさいから、動作しないことにしておけ。 979 デフォルトの名無しさん [sage] 2009/11/19(木) 17:01:04 ID: Be: >>976 大抵は動くだろうが、何の保証もない以上 やってみろ、としか言えない。 980 デフォルトの名無しさん [sage] 2009/11/19(木) 17:01:12 ID: Be: 出来ないなら、コンパイル時にエラーになるんじゃ 981 デフォルトの名無しさん [] 2009/11/19(木) 17:04:17 ID: Be: 他言語との互換性でいちいちエラーにされてたら通るコードも通らんわ 982 デフォルトの名無しさん [sage] 2009/11/19(木) 17:04:44 ID: Be: 通常のC/C++環境には無いWindows特有の引数評価順序指示 C++の特徴の重複名称の改竄 この難所?をクリアすればC++でもDLLファイルは作れる。 がこれは完全にWinAPIスレの話題じゃないかと 983 デフォルトの名無しさん [sage] 2009/11/19(木) 17:05:21 ID: Be: >>975 型のサイズに対してよきにはからってくれる機構の部分が… ある場合では mov bl,[ax] 別の場合では mov bx,[ax] mov cx,[ax+2] 984 デフォルトの名無しさん [sage] 2009/11/19(木) 17:09:20 ID: Be: >>977 逆じゃね? 985 デフォルトの名無しさん [sage] 2009/11/19(木) 17:15:20 ID: Be: >>980 DLL のエントリが実際にどういう引数をとるかなど コンパイラの知ったこっちゃない。 プロトタイプに「ポインタである」と書かれていれば、その通りに呼び出す。 986 デフォルトの名無しさん [sage] 2009/11/19(木) 17:19:02 ID: Be: >>984 造語ってみた 複製渡し 即渡し 即値じゃ リテラルしか取らない意味になっちゃうからなぁ… 987 デフォルトの名無しさん [sage] 2009/11/19(木) 17:19:17 ID: Be: void func(int& param) 988 デフォルトの名無しさん [sage] 2009/11/19(木) 17:50:39 ID: Be: 混乱するんで次の言い方を推奨(但し自己責任で使用) 参照値複製渡し==>参照値をつまり複製を渡す 変数内部名称渡し==>変数そのものを渡す Cは基本的に参照値複製渡し C++で変数内部名称渡しが解禁された。 989 デフォルトの名無しさん [sage] 2009/11/19(木) 17:52:49 ID: Be: lccというcコンパイラで実験してみたところ 参照渡しは出来なかった。 >>985 参照渡しなのにヘッダは値渡しで書いたら無理でした。 でもLCCが参照に対応してて&をいれたら動作したけど。 参照非対応、参照対応のどちらのコンパイラでも動作させるのは無理かも。 990 デフォルトの名無しさん [sage] 2009/11/19(木) 17:57:07 ID: Be: >>989 Cでも記号&は変数に対するアドレス値変換演算子として定義されているお C++での参照変数型であることを宣言する型接尾修飾子&とは 違うんで混同しないやうに 991 デフォルトの名無しさん [sage] 2009/11/19(木) 17:57:54 ID: Be: プロトタイプ宣言せんでDLLの関数呼び出したりするのか 992 デフォルトの名無しさん [] 2009/11/19(木) 18:04:05 ID: Be: >>991 スレ違いになるので詳細は説明せんが もろにそういうのがある 993 989 [sage] 2009/11/19(木) 18:05:41 ID: Be: これだとLCC C++非対応コンパイラで動作するけど、参照削ると動かん だから>>985の説は間違えてる。 //main.cpp #include <windows.h> extern "C" int WINAPI add(int &x,int &y){ int z; z=x;x=y;y=z; z=x+y; return z; } //main.def LIBRARY DLL EXPORTS add //test.c #include<stdio.h> #include<windows.h> typedef int (WINAPI *fnc)(int&, int&); main(){ HINSTANCE hd = LoadLibrary("dll.DLL"); fnc add = (fnc)GetProcAddress(hd,"add"); int a,b; a=5; b=4; printf("a+b=%d a=%d b=%d\n", add(a,b), a, b); getchar(); } 994 デフォルトの名無しさん [sage] 2009/11/19(木) 18:07:52 ID: Be: どのCコンパイラでも、fnc(int&);というのは通るんですか? 995 デフォルトの名無しさん [sage] 2009/11/19(木) 18:09:56 ID: Be: >>993 >typedef int (WINAPI *fnc)(int&, int&); だからこれ参照渡しだっつの阿呆。 996 デフォルトの名無しさん [sage] 2009/11/19(木) 18:12:50 ID: Be: 利用側 typedef int (WINAPI *fnc)(int*, int*); で宣言 add(&a, &b); で実際に呼び出す これ以外の文法は Cの範疇外じゃないの? 997 デフォルトの名無しさん [sage] 2009/11/19(木) 18:23:34 ID: Be: >>993 何、その独自変態拡張? 998 デフォルトの名無しさん [sage] 2009/11/19(木) 18:28:49 ID: Be: C++において記号&は2通りの意味で使われる。一つはCと互換。 もう一つはC++独自の拡張(ただし、ある程度は混同できる) Cでは一通りの意味しかない。 999 999 [sage] 2009/11/19(木) 18:32:15 ID: Be: 999 1000 デフォルトの名無しさん [sage] 2009/11/19(木) 18:39:56 ID: Be: 1000です続きw
C言語なら俺に聞け(入門編)Part 56 2 デフォルトの名無しさん [] 2009/11/19(木) 18:47:37 ID: Be: 一見正しいように見えて間違っているもの 「関数に引導を渡すにはどうすればいいのですか」 デバッグは大抵こんなもんである。 3 デフォルトの名無しさん [sage] 2009/11/19(木) 19:06:59 ID: Be: 参照渡しの続きをお願いします 4 デフォルトの名無しさん [sage] 2009/11/19(木) 19:12:38 ID: Be: Cでは値渡し使えない。さらにポインタが使えなければ関数に自分の 変数を変えてもらうような処理フローが使えない。ただそれだけ。 6 デフォルトの名無しさん [sage] 2009/11/19(木) 19:14:02 ID: Be: >>4 Cでは値渡ししか使えない の間違い■_ 本日の巡回から
- 痛電車なうなうなう - gotoken(gotoken)まだ旧塗装の編成にもめぐりあってない…
- JAXA|小惑星探査機「はやぶさ」の帰還運用の再開について
- List::MoreUtilsのuniq関数の実装が変わってた件 - Unknown::Programming
新uniq関数では、なにやら「1」のリファレンスを取ってmap中にdefinedでチェックしたり色々処理が増えてます。- 少年コンパイラ、成年コンパイラ | Happy My Life
クヌースの定義としては、”再帰、ローカル変数無し”で、シンプルにコードが書けるかどうかで、コンパイラの成熟度を少年期と成年期に区別したようだ。- SQLの正しい書き方 -OKWave
- ASCII.jp:モバイル端末「NetWalker」に電子辞書モデル登場
- DECのPDP-8 - パソコン創世記
- いま使うべき、学ぶべき.NETテクノロジはどれ? - @IT
- Ohmsha 『The R Tips 第2版 データ解析環境Rの基本技・グラフィックス活用集』
- 「Gumblar」リローデッド - 世界のセキュリティ・ラボから:ITpro
- 第33回 転職で迷ったら「キャリアの棚卸し」を - ITエンジニアのココロとカラダの相談室:selfup
- [Web 2.0 Expo]「無益なクラウド間戦争は止めインターネットの原点に回帰せよ」---O'Reilly氏基調講演:ITpro
- IBM,オフィス・スイート「Lotus Symphony」のポータブル版を提供 - ニュース:ITpro
- [ET2009]Androidベースのカーナビ・システム,開発期間はなんと4カ月程度 - ニュース:ITpro
- 『HyperCard』の再来? RunRev が新製品を発表 - japan.internet.com Webテクノロジー
- なぜ新人は聞きに来ないのか? - teruyastarはかく語りき→コメント欄
- iPhone 3Gはジョブズの敗北宣言 (池田信夫 blog) - ヲハニュース
- var/タワゴト(2009-07-27)
魔法遣いに魔法を使わせすぎてはいけない。MPが足りなくなると、魔法遣いはぶっ倒れてそのまま入院する。- 1.5 医療ミスは人間関係の破綻から生じる
- 連載:こちらなにわ電機 総務課 第138回 - @IT情報マネジメント
- 世界の「5台」のコンピュータの中身
つまり、ワトソン・シニアの発言は、当時としてはことさら突飛な発言ではなかったはずである。- Big Sky :: 僕は死にません!
良い子は真似しちゃ駄目よ。- 仕事中に問い掛けるべき8つの問い - *ListFreak
- 遠藤諭の東京カレー日記: 若松通商のヒミツ
若松通商と看板にあるんですけど、これは秋葉原ではないんです。- lua-users wiki: Lua Directory
- PC版大運動会のCGをすべて見たいです。 -OKWave
- ファイル書き込む文字化け -OKWave
2009年11月18日
・土木の日 だったそうです。
・ぼっと ついったのbotですがいろいろあるんですね。 ということで 後藤喜一 (taichoh_bot) on Twitter この方をフォローしてみたり。 Twitterのアニメ・ゲームなどのキャラクターbotまとめ - Twiwiki::TwitterまとめWikiサービス んー。
・縦読み天地珍: つらつらぐさ 以前、わたしは英語圏の人は本屋なり、図書館の書架や棚に並べられた本の背表紙を見るときに 首を傾けないでもタイトルを認識できるのだろうか不思議に思っていたことがありました。 自分は傾けないと読みづらかったですし。 で、出張でアメリカに行ったときに、現地の書店に行ってみて納得しました(以下略)
■_ Parrot
あーなんか一ヶ月たつのが早い。 もう月例リリースか。
Parrot 1.8.0 "Zygodactyly" Released! - nntp.perl.org On behalf of the Parrot team, I'm proud to announce Parrot 1.8.0 "Zygodactyly". (略) Parrot 1.8.0 News: - Functionality + The FileHandle PMC now exposes the exit code of child process that was run as pipe. + Experimental support for overriding VTABLE invoke in PIR objects was added. + The method 'type' was added to the PackfileAnnotations PMC. + The internals of the parrot calling conventions, PCC, were reworked. All call paths now use a CallSignature object for passing arguments and return values. + The new API-function 'Parrot_ext_call' was added for calling into C-land. + The fixed-size allocator was improved. + The files installed by 'make install-dev' are now covered by 'make install' as well. + The experimental ops 'fetch' and 'vivify' were added. + The -I option to the command 'parrot' now prepends items to the search path. + The Context struct was substituted with auto attributes (context_auto_attrs branch). + Use the osname determined in auto::arch in subsequent configuration steps (convert_OSNAME branch). + Eliminated dependence on Perl 5 '%Config' in auto::format (auto_format_no_Config branch). + MultiSub PMCs now stringify to the name of their first candidate, instead of the number of candidates. + The platform detection at the start of the configuration process was improved. + The 'lineof' method on CodeString objects now precomputes line number information to be more efficient on variable-width encoded strings. + P6object now supports .WHO and .WHERE methods on protoobjects. (略) Many thanks to all our contributors for making this possible, and our sponsors for supporting this project. Our next scheduled release is December 15th 2009. Enjoy!ビルド環境壊しちゃったから(ICUやら必要だし)、もう一回作らないといけないのだけど めんどいなあ。はう。
■_ セキュアコーディング
お、これは。なんか期待しちゃうぞ。
脆弱性体質の改善 ――C/C++セキュアコーディング入門(1):CodeZine はじめに 皆さんこんにちは。JPCERTコーディネーションセンターという組織でセキュアコーディングに 関する取り組みに携わる筆者らが、これからこの連載を担当させていただくことになりました。 どうぞよろしくお願いします。なお、JPCERTコーディネーションセンターは、情報セキュリティ インシデントへの対応支援や、ソフトウエアの脆弱性(いわゆるセキュリティホール)に関する 製品開発者間における公開日の調整や関連情報の公開なども行っています。 この連載では、バッファーオーバーフロー等の脆弱性をうっかり作り込んでしまったがために、 数千万円ものコストをかけて、ユーザに告知し、製品を回収して、工場でファームウェアをアッ プデートする事態に陥ったり、あるいは脆弱性を放置してユーザを危険にさらし、それが明るみ に出て「世間を騒がす」ことになったりしなくても済むように、そもそもの製品開発時からセキ ュアなプログラムを書くために必要なノウハウをお伝えする予定です。そんな「悲劇」が自分の 身に降りかからないとも限らない、ということを実感していただければ幸いです。 本連載のベースになっているのは、当組織も参加しているプロジェクトが公開している「CERT C セキュアコーディングスタンダード」(以下、CERT C)というドキュメントです。CERT Cは、 米国カーネギーメロン大学SEI/CERTのスタッフを中心に世界中のCのプロフェッショナルが作成 したCのコーディング規約集で、wikiを使って作成されており、現在もなお更新され続けていま す。 数あるコーディング規約の中でCERT Cが特徴的なのは、セキュリティの観点から、どのような コーディングが脆弱性を作り込んでしまうのかをまとめているという点にあります。バグがプロ グラムの不具合につながるのに対し、脆弱性には単なる不具合にとどまらず、外部の攻撃者が脆 弱性を突いてユーザを危険にさらすリスクがあります。実際に脆弱なコードの多くは、「よくあ るコーディングエラー」が原因で作り込まれています。そのようなコーディングエラーを特定し、 正しくコーディングする方法をまとめたものが CERT C のルールとレコメンデーションという形 で提供されています。 言語仕様が落とし穴になる (略) 次回以降の本連載の構成は、14のカテゴリーに分類された CERT Cのルールから、ポインタ演 算、動的メモリ管理、文字列操作、型変換などのトピックを選んで解説しつつ、セキュアコーデ ィングに活用できるツールの紹介やセキュアなプログラム開発全般の話題も折り混ぜていく予定 です。お楽しみに。まあ本も出てるけど(最近日本語訳も出ました)、こういうのがあってもいいと思う。
■_ うーむ
知恵袋あたりでありそうな話だけど。
How can I go from noob programmer to Ruby web app developer in a month? : ruby heya I have some basic understanding of HTML, PHP and CSS... I wouldn't call myself a programmer, and I haven't done a degree in compsci. However I'm planning to create a web app within the next month or two and hope to get to the point sometime in the future where I can program any kind of web app prototype. Any idea/links/tips on how I can learn and put together a web app in Ruby within a month? cheers EDIT: Wow, thanks for the responses all... much appreciated :)いくつもコメントが付いてますがその中からひとつ。
I have a basic understanding of how to open tins of beans, make toast, and prepare microwave popcorn. I wouldn't call myself a gourmand, and I haven't done any chef training. However, I'm planning to open my own restaurant within the next month or two, and hope to win a Michelin Star sometime in the future. Any ideas/links/tips on how I can make a complete asshat of myself in public? Yes, web application development is a skill that may be learned and developed: just like gourmet cooking, public speaking, or sword swallowing. But although Ruby is a comparatively friendly language, there is almost nothing inherent in its design that will save you from having to make informed decisions about the design and architecture of an application. Let me save you some time: this is not something you will get from a book, because the books people will tell you to read will teach you how to implement, not how to think for yourself. Rails won't save you from having to know how to optimise your database queries, or load-balance your servers. Rails won't teach you how to write a web application any more than a fancy spatula will teach you how to make a better omelette. Yes, you can be a self-taught web developer. But be prepared for a fuckload of work, failure, and repetition. Be prepared to spend entire days hunting down a simple typo. Be humble, be patient, learn from your mistakes, read everything you can. Exercise your lateral thinking skills, because the first way you think to do something is almost never the right way, and you have to train yourself to think through several alternatives before you touch a keyboard. Draw diagrams. Write notes. Think analogously. Yes, you can build a web application in a month. But don't expect anybody to pay for it, or use it, or even see it. Be ready to throw everything away at the end of the month except what you've learned about yourself and your own process.きびしーw
■_ ばんぺいくん
珠玉のプログラミングは旧版(タイトル違いますが)含めて持っているはずなんだけど どこへ行ったのやら。
13 章「探索」 - 珠玉のプログラミング(Programming Pearls) - ひげぽん OSとか作っちゃうかMona- 13.6.7 nullの部分を番兵に置き換える。メリットあるの?二分木でばんぺいくん使ったらどうかって話ですよね。
sentinel.value = search_value; p = root; while (p-> != seach_value) if (p-> > seach_value) p = p->right; else p = p>left; return p == &sentinel ? FOUND : NOTFOUND;なかんじですか。確かに線形リストみたいにきれいにループ本体の条件判定が 消えないですからねえ。
■_ 上下関係とかあるのか?
from ム板。
【Perl,PHP】LLバトルロワイヤル7【Ruby,Python】 887 デフォルトの名無しさん [sage] 2009/11/18(水) 00:12:24 ID: Be: 小、中規模のWebアプリをいくつか作らなければならないが、 同僚がどうしてもPerlが良いという。 Perl - 枯れてて信頼性がある Java - 信頼性がない Python - 知らん Ruby - 論外 PHP - Perlの子分だから、まぁ許せる という事だそうなのだが、どうも今更PerlでWebは俺は抵抗を感じる。 上記の理由にも非常に違和感を感じるが、どう理論立てて反論していいか解らん・・・。 漠然と、Perlは書き捨てのスクリプトなら書きやすいとは思うが、 それ以外に向いてると思えない。 Perl以外を推めるのに、どう説得すれば良いと思います? 888 デフォルトの名無しさん [sage] 2009/11/18(水) 00:30:44 ID: Be: PerlにあってJavaにない信頼性って何ものなんだろう。 ウェブアプリを作るにあたって、Catalystなりのフレームワークを使うなら別にいいのでは。 オレオレフレームワークや素のCGIで作る気なら、その後の保守に困るだろうね。 その同僚がずっと面倒みるならいいけど。 889 887 [sage] 2009/11/18(水) 00:45:29 ID: Be: そうなんです、それ(信頼性)が説明できなくて・・・。 Catalystも、例えばRailsと比較して、書かなくてもいいことを書かせてる、 と思えてしまい、あまり好きではないです(これは完全に自分の好みですが)。 もっとも、Catalystを使う事すら視野に入れてないようでしたが。 890 デフォルトの名無しさん [sage] 2009/11/18(水) 01:58:32 ID: Be: 同僚は根拠出してきてないんでしょ 議論にならんじゃん 891 デフォルトの名無しさん [sage] 2009/11/18(水) 02:31:15 ID: Be: PHPはCの子分ではあってもPerlの子分ではありません。 どっちかと言うとRubyのほうがPerlの子分と言えるでしょう 892 デフォルトの名無しさん [sage] 2009/11/18(水) 02:38:19 ID: Be: 結局まともな言語が一つもないって事でおk? 今ここで挙げられた欠点を補うようなそれなりの言語作れば決定打になるんじゃね。 893 デフォルトの名無しさん [sage] 2009/11/18(水) 03:09:27 ID: Be: Luaこそ至高。Lua以外のLLは勉強しなくて良い 894 デフォルトの名無しさん [sage] 2009/11/18(水) 04:38:55 ID: Be: >>891 部分的に文法は似てるとはいえCとは全く異質のものじゃない? Perlのモジュールだったから子分って表現したんだろうと思うけど。 895 デフォルトの名無しさん [sage] 2009/11/18(水) 12:34:09 ID: Be: まー、その中ならPHPかなー。 入社1年目の人にみっちり教えたら書けるようになったし。 897 デフォルトの名無しさん [sage] 2009/11/18(水) 19:18:57 ID: Be: >>890 それはどっちとものようだが。w 一方はぜひPerlと主張し、他方はなんか 違和感があるからと言い訳を探す。 この争いだったら、ぜひと言ってるほうが 勝つべき。 899 デフォルトの名無しさん [sage] 2009/11/18(水) 19:50:18 ID: Be: >>887 まず、そこに挙げられている言語なら、どれも十分枯れている。 どの言語でも、枯れたバージョンと枯れてないバージョンがあり、枯れたバージョンを使うならどれも同じぐらい枯れている。 もちろん枯れてないバージョンを使えばバグにぶつかる可能性が高いのも、どの言語でも同じ。 たとえばPythonは2.5系と2.6系はどちらも枯れている。3.xは枯れてない。 PHPは(私見だが)5.2.11は十分枯れている。5.3はまだ枯れてない。 Rubyは、1.8.6はすごく枯れている。1.8.7も十分。1.9はまだ。 JavaはJava5とJava6は十分枯れている。Javaが枯れてないというなら、その根拠を示すよう、その同僚とやらに聞いてみろ。 大事なのは枯れているバージョンを使うことであって、言語じゃない。 あと、枯れ具合を気にするべきは言語じゃないくて、フレームワークやライブラリのほう。 かりに「枯れているから」という理由でPerlを選んだとしても、Moose使ったら意味がない。 また言語のバグよりもフレームワークのバグの方がずっと多いので、 フレームワークの枯れ具合を気にしてないのに言語の枯れ具合を気にするのは、はっきりいってバカ。 まとめ: ・枯れているバージョンを使えば、どの言語でも十分枯れているし信頼性はある。 ・気にすべきはフレームワークの枯れ具合であって、言語のではない。 ・・・とりあえず、これで言語を選ぶ理由として「枯れ具合」を持ち出すのは止めさせられるだろう。 900 デフォルトの名無しさん [sage] 2009/11/18(水) 20:33:33 ID: Be: >>894 それ言うとPHPer(笑)がファビョるよね。 RubyやPythonが問題外なのは当然であり格下のPerlがルーツなのは 自尊心が傷つくらしい。 901 デフォルトの名無しさん [sage] 2009/11/18(水) 21:26:40 ID: Be: >>887 Ruby論外っていうPerl使いは、大抵、Rubyを使ったことない奴。ちゃんと調べたこともない。 簡単。お子様仕様。お遊び。とか勝手にイメージ持ってたりしてる。 Rubyが流行った理由がRailsだから、簡単というのは合ってはいるんだが、 Perl使いも結局、RailsインスパイアなCatalyst使うわけで。 902 887 [sage] 2009/11/18(水) 22:04:20 ID: Be: 様々な意見、ありがとうございます。とても参考になります。 違和感がある、と言ったのは、特にJavaが信頼性がなくて、 Perlが信頼性があるとの意見です。 Javaは基幹系に使われてるのは見聞きますが、Perlで、というのは聞いたことがないですし。 PerlはMoose使わないとまともにClassっぽいものも書けないし。 枯れを気にするよりも、自分のプログラム技術の方を心配しろとも思ってます。 Perlは単純に今の時代のWeb作成には、多言語に比べ劣っている、 というのが、私のPerlを回避したい理由です。 実は同僚と言っても、かなり年上で反論し難いので自分の意見が言えなかったことも ありますが、明日、意見交換会を行うので、勇気出したいと思います。 PHPは学びやすい言語で、私もそれなりに好きなんですけども、 ところどころ、致命的に好きになれない部分もあるので、 Ruby、Javaを押したいと思っています。 Pythonも個人的には気になりますが、名前が(うちでは)あまりにも知られていないので・・・。 Rubyをなぜかすごい嫌ってるんですよね・・・。なんでだろ・・・。 903 デフォルトの名無しさん [sage] 2009/11/18(水) 22:13:21 ID: Be: >>902 いや、まあ、ここだけでもつっこんでみるけど > Rubyをなぜかすごい嫌ってるんですよね・・・。なんでだろ・・・。 自分のレスを3回くらい読み直して、嫌らしいところが全くないって断言できるんなら、 あんたにはそれは一生わからんだろうと。 Perl使いでRubyを嫌ってる人間のほとんどは、言語そのものを嫌ってるわけじゃなかろうと思う。 > PerlはMoose使わないとまともにClassっぽいものも書けないし。 「まともにClassっぽいものを書けな」きゃそれでだめってのも能力の幅的にどうかという見方も あるっちゃあるだろうしなあ、とも思った。 904 デフォルトの名無しさん [sage] 2009/11/18(水) 22:13:25 ID: Be: LLには信仰心の問題もあるからな でもJavaをweb用途に使うことの善し悪しは別として、 信頼性がないとかいいきっちゃう人の言うことには耳を貸したくないね。 金が掛かるとかならまあわからんでもないけどw 905 デフォルトの名無しさん [sage] 2009/11/18(水) 22:15:03 ID: Be: rubyは僕みたいな糞でも使える神言語 906 デフォルトの名無しさん [sage] 2009/11/18(水) 22:19:44 ID: Be: 俺も糞だけどPythonのほうが使いやすかったな 907 デフォルトの名無しさん [sage] 2009/11/18(水) 22:28:38 ID: Be: >>898 それがどうかしましたか? >>902 あなたの意見を総合的にまとめると Ruby より Python を使った方が良いと思う 908 887 [sage] 2009/11/18(水) 22:40:38 ID: Be: 同僚がRubyをすごい嫌ってることと、自分が嫌らしい人間だということの 関連性が解りませんが、Perlは自分もリアルタイムで使ってますので、 嫌いではありません。 それでも、Catalystを使うのと、Railsを使うのではRailsを使う方が、 コードの書きやすや、見やすさから良いと思いました。 Classっぽいものを書けない、というのは一例です。 ここがダメ、あそこがダメ、と書いても冗長かと思いましたので。 当然、Ruby含め、他の言語も一長一短で、Perlの事だけ悪く言ったと思われたなら、 申し訳ないです、すみません。 912 デフォルトの名無しさん [sage] 2009/11/18(水) 22:51:13 ID: Be: >>908 その上司は Ruby を嫌ってるんじゃなくて お前を嫌ってるんじゃないのか? w 913 887 [sage] 2009/11/18(水) 22:54:22 ID: Be: >>912 それはあ・・・、いや、実はもう一人Java派の同僚と その人が揉めてまして・・・。 その時自分は日和って、「自分は何でもいいです」というコウモリ君になりました。 914 デフォルトの名無しさん [sage] 2009/11/18(水) 23:01:28 ID: Be: Java厨はすっこんでろ。スレ違い 915 デフォルトの名無しさん [sage] 2009/11/18(水) 23:10:00 ID: Be: 質問を勝手に自分の理解できる範囲の問題に解釈し直すのはいくない 916 デフォルトの名無しさん [sage] 2009/11/18(水) 23:13:35 ID: Be: >>913 同僚A=Perl派-(もめてる)-Java派=同僚B 質問者=観戦者=Ruby派 ってところか 参戦するつもりが無いならRubyはあきらめろw 917 デフォルトの名無しさん [sage] 2009/11/18(水) 23:16:40 ID: Be: もうJavaでいいな。Perlの人はその会社では辛そうか 会社ってのは人が作るもんで、むしろJavaとPerlのエキスパートという ニッチで頑張ってもらいたいもんだができるかな 918 デフォルトの名無しさん [sage] 2009/11/18(水) 23:18:02 ID: Be: 所詮、雇い主との相性 919 デフォルトの名無しさん [sage] 2009/11/18(水) 23:28:33 ID: Be: JRubyで丸く収まるんじゃね? 920 デフォルトの名無しさん [sage] 2009/11/18(水) 23:34:42 ID: Be: なんという落としどころw Perl野郎全敗なだけじゃないか。納得しそうで怖いわw
- コメント: マイクロソフト、Windows 7 ユーティリティの GPL コード使用を認め、謝罪 - スラッシュドット・ジャパン
- コメント: インテル、4004 ファミリの詳細情報の公開を許諾 - スラッシュドット・ジャパン
- Twitter / いーぐるとまと: iter に対して jter, kter は新鮮だ…
- ToHeart2 シルファ 宮川Ver. 完成品フィギュア[クレイズ]《予約商品冬月発売》22%オフあみあみ本店
- ToHeart2 シルファ 前田Ver. 完成品フィギュア[クレイズ]《予約商品春月発売》22%オフあみあみ本店
- Twitter / 菊次郎52歳: 今日の会話例 「これ、うちの新人。」 「KMC さん ...|
- ハッカー道場 - masayangの日記(ピスト通勤他
- Amazon.co.jp: C言語によるオブジェクト指向プログラミング入門: 坂井 弘亮: 本
最強の“秘術”ここに一挙公開!!組込みソフトウェア/自作OS開発/ゲームプログラミング/etc.に「これができれば!?」という潜在ニーズは計り知れないでしょう。 実例と豊富なサンプルによる丁寧で詳しい解説により、脱入門プログラマからこの道十数年のベテランまで、C言語をさらに使いこなしたい人に最適の1冊です。
ほう。
大型本: 328ページ 出版社: 翔泳社 (2009/12/15) 発売日: 2009/12/15
C言語 デバッグ完全解説 の人なのか。- C言語 デバッグ完全解説
- true tears ブルーレイBOX 2000セット予約キタ━━━━━━(゚∀゚)━━━━━━ !!!!!:【2ch】ニュー速VIPブログ(`・ω・´)
- ソースコードのコメントよりも空白行のほうが理解を助けるという研究結果:森崎修司の「どうやってはかるの?」:ITmedia オルタナティブ・ブログ
このうち、読みやすさに最も影響を与えやすいメトリクスとして、1位に変数の個数、2位に行数、3位に括弧の数、9位に空行数、15位にコメント行数が示されている。- 絵を描いた後にパソコンへ転送、ぺんてるのペン『airpenDraw』 | WIRED VISION
- CodeBeamer MR - Simplified Repository Management for Subversion, Git & Mercurial | Intland
- Haskellナイト - あどけない話
- Haskellで賢人鳥(またの名をYコンビネーター) - あどけない話
- 賢人鳥 - あどけない話
- プログラマの人に聞きます。 -OKWave
プログラマの人はC言語のライブラリ関数をマスタしているのでしょうか?もしくは少しだけの知識でも大丈夫なのでしょうか?- WindowsとMac OS,どっちが真似した? - Paul ThurrottのWinInfo Short Takes:ITpro
- MS運営のオープンソース開発プロジェクト支援サイト「CodePlex」を探検する(1) - builder by ZDNet Japan
- 気になる「自然蒸発」と「セル寿命」:USBメモリーは10年もつか
- 20インチ以上の液晶ディスプレイ利用者が増加――自宅のパソコンに関する調査 - japan.internet.com デイリーリサーチ
- Intel と NEC、将来に向けたスーパーコンピューター技術の共同開発に合意 - japan.internet.com Webテクノロジー
- 競技大好き、世界3位のアルゴリズマー「高橋直大」 - IT業界就職ラボ
「みょんみょん」は口癖なんですけど、一度そういってからTopCoderに出たら、すごくいい成績が取れたことがあったんですよ。だから、願掛けに近いですね。
しかし「アルゴリズマー」…- 一生幸せになりたければ○○をしなさい - *ListFreak
- (mosh concurrent) のスレッドセーフ性 - ひげぽん OSとか作っちゃうかMona-
- 改造版 ckw の修正版のバイナリとソースを公開 - 予定は未定Blog版
- map,apply and partial - Lisp log - cadr group
- InfoQ: Bobおじさんが述べるTDDの適用可能性
- Python Package Index : grin 1.1.1
I wrote grin to help me search directories full of source code. The venerable GNU grep and find are great tools, but they fall just a little short for my normal use cases.- マンガで分かるLisp (Section 2.4)
変えているのはクダーそのものrplacd?
2009年11月17日
・今日の日めくり Learn to walk before you run.
・限定版 OADつきの絶望先生19巻、ひとつ前のがちょっとだぶつき気味だったせいか 今回の出荷数は少なめ?
■_ History of Programming Language
Scripting Languages and the Web Scripting Languages and the Web (スクリプティング言語とWeb) When Tim Berners-Lee first proposed the “Mesh” (later renamed to the World Wide Web) to CERN back in 1989, the concept was much simpler than it has become today. The problem Berners-Lee sought to solve was how to establish links between the massive number of related documents generated world-wide by CERN projects, especially the LHC. So he focused primarily on hyperlinked text. In a section of the proposal titled “ Bells and Whistles”, we read: 1989年の CERN で Tim Berners-Lee が最初に“Mesh”(のちに World Wide Web と改名されまし た) を提案したとき、そのコンセプトは今日のそれよりも格段に単純なものでした。 Berners-Lee が解決を試みた問題とは、CERN プロジェクト、特に LHC によって world-wide に 生成された関連する大量なドキュメント間のリンクをいかにして establish するかというもの でした。そして彼はハイパーリンクされたテキストにフォーカスしました。 “Bells and Whistles” というタイトルのセクションにこういった部分があります: Storage of ASCII text, and display on 24×80 screens, is in the short term sufficient, and essential. Addition of graphics would be an optional extra with very much less penetration for the moment. (ASCII テキストのストレージと 24×80 スクリーン上での表示は短期的には十分なものであり 本質的なものです。グラフィックの追加はそれほどの時間をおかずにそれほどのペナルティな しに行えるようになるでしょう) Never mind embedded videos or Ajax-driven interactivity. You request a page, you get a page. But in the section titled “Live links” we get a glimpse of the web's future: 埋め込まれたビデオや Ajax-driven な対話性 (interactivity) を気にすることはありません。 あなたはページをリクエストすれば、ページのデータが得られるのです。しかし “Live links” というタイトルのついたセクションでわたしたちは web の将来を glimpse (垣間見る) しまし た。 Hypertext allows documents to be linked into “live” data so that every time the link is followed, the information is retrieved. If one sacrifices portability, it is possible to make following a link fire up a special application, so that diagnostic programs, for example, could be linked directly into the maintenance guide. (ハイパーテキストではドキュメントの“live”なデータに対するリンクが可能なので リンクが follow される度に情報の取得が行われます。もし誰かが可搬性 (portability) を 犠牲にして特殊なアプリケーションへリンクする follow を可能にしたならば、 検査プログラム、たとえばメンテナンスガイドへダイレクトにリンクすることも可能になるでしょう。) Server-side scripting (サーバーサイドスクリプティング) In usage, it soon became apparent that the more “live” the data, the more useful the site. Nevertheless, it took a few years for server-side programming to standardize on the Common Gateway Interface (CGI), which uses environment variables and standard input/output to transfer data to/from a separate executable (or later, an embedded module of the web server). All those who have written CGI programs in C or Bourne Shell please raise your hands (if you still can). The Perl language soon proved to be a far superior alternative to either of these for CGI programming - partly because it combined some of the best features of both, but mostly because of its advanced capabilities for manipulating strings and regular expressions. 使っていくうちにすぐにより“live” なデータが見られるようになり、サイトが便利になって いきました。とはいうものの、ほんの数年でサーバーサイドのプログラミングは Common Gateway Interface (CGI) に標準化されました。これはデータの送受信を分割された実行ファイ ルで行うために環境変数や標準入出力を使うものです(のちに、webサーバーに組み込まれるモジ ュールにもなりました)。C や Bourne シェルで CGI プログラムを書いたことのある人は手を上 げてください(もし今でも書けるのなら)。Perl という言語がすぐに CGI プログラミングの向け のもので群を抜いた存在になりました。それは部分的にはいくつかの機能の組み合わせ、とくに Perl の文字列や正規表現についての advanced capabilities によるものでした。 But using any of these languages requires you to explicitly output the entire returned page, even the static parts. Web developers wanted to be able to write plain HTML, and add scripting code where needed for the dynamic bits. しかしこれらの言語のいずれかを使った場合、あなたは返すページ全体をそれが静的なものであ ってもはっきりした形で出力することが要求されます。Web 開発者は plain なHTML を書けるよ うになっていることと、動的要素 (dynamic bits) が必要なところにスクリプティングコードを 追加できることを望んでいました。 PHP arose as an answer to that problem. Any content in a PHP page that isn't within the <%php and %> delimiters is simply output as-is, within the execution context of the code that is within those delimiters. That code is Perl-like - but much simpler and less consistent, betraying a history that contains more evolution than intelligent design. Hundreds of inconsistently named base functions in a single, global namespace often make finding the right way to do something a lengthy exercise in searching php.net. Yet, PHP powers many of the most visited sites on the web, including Wikipedia, Yahoo!, Facebook, and millions of WordPress blogs (including this one), perhaps because of its simple (though numerous) functions to access back-end databases. PHP はこういった問題に対する回答として登場しました。PHP によるページのすべてのコンテン ツは<%php と %> で区切られ単純に出力されるままの状態で存在していて、実行されるコ ードはそのデリミターの内側に置かれています。PHP のコードは Perl に似ていますが、Perl よりも単純かつ一貫性に欠けるものであって、intelligent design というよりは、 evolution からできているという歴史をさらけ出しています。統一されていない命名規則による数百の関数 が単一のグローバルな名前空間に存在しているので、何かを行う正しい方法 (right way to do something) を見つけ出すために php.net での検索という冗長なエクササイズを嫌というほどや る羽目になります。それでも PHP は web 上にある most visited sites の多くで力を振るって います。そういったサイトにはWikipedia、Yahoo!、Facebook、そしてWordPress を使った数多 くのblog (ここも含みます) がありますが、それはおそらく、PHPにはバックエンドのデータベ ースにアクセスするための関数が、単純ではあっても数がたくさんあるおかげでしょう。 I shouldn't fail to mention a couple of similar but less widely used alternatives: JavaServer Pages (JSP) and ColdFusion's CFML. Both allow the insertion of special tags into an HTML-like page to direct the generation of dynamic web content. 二つのよく似てはいるけれどもあまり広くは使われていないものについて言及するのを忘れるべ きではないでしょう: JavaServer Pages (JSP) と ColdFusion の CFML がそれです。両方とも、 動的な webコンテンツの生成をダイレクトに行うための HTML に似た独自タグを挿入することを 許しています。 Active Server Pages (ASP) provides a capability similar to PHP, but for Microsoft IIS Servers. The <% and %> delimiters demarcate script embedded within HTML. By default, the scripting language is VBScript, though JScript (an implementation of JavaScript) and PerlScript (derived from Perl) can be used instead. The syntax of VBScript is, as the name implies, much more like Visual Basic than like C or Perl - which means that it's simpler and less expressive than even PHP. ASP.NET represents a stark departure from the scripting model of web design. Active Server Pagese (ASP) はPHPのような能力を提供するものですが Microsoft の IIS Server 向けです。HTML 中に埋め込まれたスクリプトの境界は <% と %> で表します。 デフォルトのスクリプティング言語は VBScript ですが、JScript (JavaScriptの一実装)や PerlScript (Perlから派生したもの)を代わりに使うこともできました。VBScript の構文はその 名前に暗示されているようにC や Perl よりも Visual Basic にずっと近いものです。そしてそ れは、PHP よりもさらに単純で、less expressive だということを意味しています。APS.NET は web デザインの scripting モデルから完全に departure (逸脱、発展)したものを提供していま す。 Development of web pages more closely resembles desktop GUI development, and the result is a compiled assembly rather than a runtime-interpreted script. Any .NET CLR language can be used for the code behind (for the vast majority, that means Visual Basic .NET or C#). While this model may be more comfortable for programmers who grew up on Visual Basic (assuming that's even possible), I find the number of things that are done for you behind the curtain to be a little unsettling. web ページの開発は、デスクトップ GUI の開発にとてもよく似ているもので、その結果は実行 時に解釈されるスクリプト (rutime-interpreted script)というよりはcompiled assembly (コ ンパイルされたアセンブリ) になっています。すべての .NET CLR 言語を陰に隠れているコード として使うことができます(for the vast majority, that means Visual Basic .NET or C#)。 このモデルは Visual Basic (それが使えたと仮定して) と共に成長してきたプログラマーにと ってはより comfortable であったかもしれませんが、 I find the number of things that are done for you behind the curtain to be a little unsettling. Ruby also provides the ability to embed code in HTML, via eRuby. Several such templating systems are available for Python as well. Both of these languages offer excellent support for standard CGI programming, too. Ruby もまた eRubyを経由して HTML に埋め込む能力を提供しています。同様なテンプレートシ ステムのいくつかが Python でも使えます。これらの言語の両方ともが、標準的な CGIプログラ ミングの素晴らしいサポートも一緒に提供しています。 A number of web frameworks have been built on top of these languages, often employing the model-view-controller design pattern. Some of the more popular include Ruby on Rails (for Ruby), Django (for Python) and (still in preview) ASP.NET MVC for ASP.NET. These frameworks offer the advantage of nearly eliminating duplicated effort between projects that more or less follow the standard pattern. これらの言語を使って数々のwebフレームワークが構築されましたが、それらのほとんどは model-view-controller という設計パターンを使用しています。より一般的なものを幾つか挙げ ると、Ruby 向けの Rubyy on Rails、Python 向けの Django、ASP.NET 向けの ASP.NET MVC (ま たpreview段階)があります。これらのフレームワークは、標準的なパターンに従っていようとい まいと複数のプロジェクト間での労力の重複を避けやすい(nearly eliminating duplicated effort) という利点があります Client-side scripting (クライアントサイドスクリプティング) Generating all your web content on the server side may give you a nice sense of control, but it sure makes for some clunky user interface if every update has to be achieved by requesting a whole new page. To make pages more interactive, you want to be able to direct the browser's actions by embedding scripts within the page that is sent to the client. あなたの web content をすべてサーバーサイドで生成することはあなたに nice sense of control を与えるかもしれませんが、新しいページ全体をリクエストすることによってすべての 更新を行う必要があればそのために確実に some clunky user interface になってしまいます。 ページをより対話的にするために、スクリプトをクライアントに送ったページの中に埋め込むこ とによって直接ブラウザーのアクションを行えることをユーザーは望んだのです。 Brendan Eich invented the JavaScript language for this purpose, and it was first included in Netscape back in 1995. Despite its name, this language is only superficially similar to Java - it's really a much more dynamic and functional language than Java could ever be. It started out in life making little bits of web pages more interactive - for instance, if you didn't need to go to the server to validate a field, you could alert the user as soon as they modified it. Brendan Eich がこの目的のために JavaScriptを発明し、1995年に初めて Netscape に取り込ま れました。JavaScript という名前とは裏腹にこの言語が Java に似ているのは表面だけで、 Java よりももっと動的で関数型的な言語に近いものです。JavaScript は web ページをもっと 対話的なものにするためのものとして始まりました。たとえばサーバーにフィールドのバリデー ションをやらせる必要がない場合に、ページが変更されたことをユーザーに警告できました。 Internet Explorer added scripting capabilities in two available languages: VBScript and JScript. The latter was similar to JavaScript, with just enough differences to drive a web developer crazy. In recent versions, Internet Explorer has moved closer towards more standards compliance, but there are still enough differences to evoke the frequent “Curse you, IE!” Internet Explorerには VBScript と JScript という二つの言語を使用可能にする能力が追加さ れました。後者は JavaScript に似たものですがweb 開発者を狂気に導くのには十分な違いを持 ったものです。最近のバージョンでは Internet Explorer はより standards compliance にぐ っと近寄りましたが、それでもまだ “Curse you, IE!”(IE 爆発しろ!) という呪詛の言葉を 吐くのには十分な違いが存在しています。 The standard for the JavaScript language is properly called ECMAScript, after the Ecma International organization to whom Netscape passed control of the standardization process for JavaScript. Most modern browsers now support some level of the ECMAScript standard. この JavaScript という言語のための標準は、Netscape がJavaScript の標準化プロセスをコン トロールを委ねたEcma International organization に由来して ECMAScript と呼ばれることが あります現時点でのほとんどのモダンなブラウザーは、この ECMAScirpt standard をなんらか のレベルでサポートしています。 One of the more exciting developments in JavaScript in recent years has been the rise of AJAX, which stands for Asynchronous JavaScript And XML (although XML need not actually be involved). The key to this technique is the ability in JavaScript to send an HTTP request to the web server and retrieve a result without reloading the current page in the browser. Then the JavaScript can evaluate what it retrieved, and apply any necessary changes to the page without a full repaint. Originally, the data was always returned as XML (hence the X), but recent refinements include returning JSON instead - a format that is easily converted into JavaScript objects (but not without security concerns). 近年における JavaScript を使った more exciting developments の一つが Asynchronous JavaScript And XML 、略称して AJAX (実際には XMLは必須ではないのですが) と呼ばれる手法 の流行です。この手法のキーとなるのはwebサーバーにHTTP リクエストを送り、その結果をブラ ウザーのカレントページのリロードをすることなしに受け取れるというJavaScript の能力です。 JavaScript は受け取ったものを評価してページ全体を再描画することなしに任意に必要な変更 を適用することが可能です。元々データは常にXMLとして返されていましたが最近では代わりに JavaScirpt のオブジェクトに間単に変換できるフォーマット(ただしセキュリティの問題があり ます)である JSON で返されるという改良がありました I love JavaScript as a language. When I write something in JavaScript, I feel happy for some reason. It's a light, agile, but powerfully dynamic scripting language. However, I've often wondered why more browsers don't support multiple scripting languages. No, I'm not a VBScript fan (far from it), but wouldn't it be nice to be able to script both the client and server side in Ruby, for instance? Unfortunately, for any new client-side scripting language to become viable, it would first have to be implemented by all of the major browsers. And I'm afraid the script for that dream is: わたしは言語として JavaScript が大好きです。JavaScript で何かを書くときはいくつかの理 由で嬉しさを感じます。JavaScript は軽量で agile なものですが、強力で動的なスクリプティ ング言語でもあります。とはいうものの、わたしは、なぜもっと多くのブラウザーが複数のスク リプティング言語をサポートしないのだろうかとよく不思議に思うのです。いえ、VBScriptは楽 しくありません (楽しさとはかけ離れたところにあります)が、それでもたとえば Ruby でクラ イアントサイドとサーバーサイドの両方のスクリプトを書けるようになれば素晴らしいことでは ないでしょうか? 残念なことにどんな新しいクライアントサイドのスクリプティング言語も、生 き残るためにはまず初めに主要なブラウザー全てで実装される必要があるのです。 And I'm afraid the script for that dream is: alert("They've got too much to do already"); This post is Part Four in a series on the history of programming languages. Here are links to the previous installments: * The Early History of Programming Languages * An introduction to object oriented languages * The ascent of scripting languages Related Posts: 1. The ascent of scripting languages 2. The Early History of Programming Languages 3. An introduction to object oriented languages 4. Internal Software Development Moves to the Web Browser■_ チカラワザ
ついった経由 Twitter / tnozaki: しかしnawkのdecimal pointもずいぶん ...
Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/dist/nawk/main.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -p -r1.9 -r1.10 --- src/dist/nawk/main.c 2009/03/01 23:30:52 1.9 +++ src/dist/nawk/main.c 2009/11/15 21:56:06 1.10 @@ -35,7 +35,6 @@ const char *version = "version 20070501" #include <stdlib.h> #include <string.h> #include <signal.h> -#include <locale.h> #include "awk.h" #include "awkgram.h" @@ -102,6 +101,7 @@ static void fpecatch(int n int main(int argc, char *argv[]) { const char *fs = NULL; + struct lconv *lconv; setlocale(LC_CTYPE, ""); setlocale(LC_NUMERIC, "C"); /* for parsing cmdline & prog */ @@ -114,6 +114,9 @@ int main(int argc, char *argv[]) } (void) setlocale(LC_ALL, ""); + lconv = localeconv(); + lconv->decimal_point = "."; + #ifdef SA_SIGINFO {なるほどこれは強引な。
どうも複数の修正がごっちゃになってこんなことになっていた模様。
■_本日の巡回から
- ICU64: First Release of ICU64 and Frodo Redpill
- Source Checkout - hectorchu-go-windows - Project Hosting on Google Code
- You Don't Know Jack About Software Maintenance | November 2009 | Communications of the ACM
- Alieniloquent: Blog
- CodeBeamer MR - Simplified Repository Management for Subversion, Git & Mercurial | Intland
- 行動に磨きをかけてチャンスをつかむ - @IT自分戦略研究所
- 文書スキャナ「ScanSnap」に新エントリーモデル--WinとMacのハイブリッド:ニュース - CNET Japan
- 驚きの薄さと軽さ! バッテリー駆動も10時間 魅力のモバイルノート:スグレモノ発見
- チェックしておきたいぜい弱性情報<2009.11.17> - CSIRTメモ:ITpro
- カルチュラル・コンピューティング - 新刊・近刊:selfupこの本買ってたんだよな。早く読まないと。
- Windows 7とServer 2008 R2に新たな脆弱性、攻撃プログラムが出現 - ニュース:ITpro
- MS、スーパーコンピュータ向け「Excel」を開発中--クラスタで計算可能に:ニュース - CNET Japan
- マインドマップが会議の“困ったちゃん”を変える - 記者のつぶやき:ITpro
- 【問題1】 MPUの動作について - @IT MONOist
- 乱数の分布が気になったからプロットしてみた
- メジャーRDBは快適(?)
- セキュリティホール memo
25 年たってもわからない、に 1 票。- 年越しイベント「アニソン紅白2009」が開催決定、豪華声優陣も登場 - GIGAZINE
- 窓の杜 - 【REVIEW】壁紙が変更できない“Windows 7 Starter”で無理矢理壁紙を変更する「むりかべ」
- Why learning Haskell/Python makes you a worse programmer « All Unkept2006年のがなんで今頃 redditに
- Goの面白いところ: iota - jarp,
- Twitterのアニメ・ゲームなどのキャラクターbotまとめ - Twiwiki::TwitterまとめWikiサービス
- 千利休 (_Sousyou) on Twitter
- http://images-jp.amazon.com/images/P/B002L94SVA.09.IN02._SCRMZZZZZZ_.jpg
- http://images-jp.amazon.com/images/P/B002L94SVA.09.IN01._SCRMZZZZZZ_.jpg
2009年11月16日
とある夕刊紙に、ロッテからFAでメジャーリーグに行ったコバマサが ジャイアンツに来るとか何とか載ってたけどどうなんだろか。 あ、ジャイアンツってもサンフランシスコのじゃなくて東京のですw
■_ 2010
マルチコア対応アプリ開発やバグ報告を効率化,MSが「Visual Studio 2010」ベータ2版を一般提供:ITpro 同日,Visual Studio 2010のエディション構成も明らかになった。現行のVisual Studio 2008で は10種類のエディションを展開しているが,「ユーザーからエディション構成が複雑で機能差が 分かりづらいという意見が多かったため」(近藤氏),次期製品ではエディション数を,「 Ultimate」「Premium」「Professional」の3種類に減らした。「Ultimate」は設計から導入まで すべての工程に対応する最上位版,「Premium」は開発工程向けエディション,「Professional」 は開発のための基本機能だけを備えるエディションとなる。んーむ。そろそろVisutal Studio とお別れか喃。 とりあえず F# だけコンソールから使えるようにとかできんのかなあw
■_ え?
…釣り?
Pythonでチャットや掲示板を作りたいのですが日本語の入門書が見つかりません。 - Yahoo!知恵袋 Pythonでチャットや掲示板を作りたいのですが日本語の入門書が見つかりません。 Perlの入門書を買ってこれば大丈夫ですか?「入門書」つーんだから、言語の本だよねえ。Perl の?
■_本日の巡回から
- TokyuRuby会議01 -参加登録- : ATND
- Twitter / Masahiro Sakai: 今週金曜HaskellナイトのLT(Haskelll ...
- とてつもなく日本 : JAMSTEC(海洋開発研究機構)に手をつけただけで、この仕分けなるもののお里が知れた気がする。
- Microsoftが大量レイオフで手放したドン・ドッジ、Googleへ:海外速報部ログ:ITmedia オルタナティブ・ブログ
- 「THE HUSTLER」(1962年):アルファルファモザイク - 2ちゃんねるスレッドまとめブログ
- Twitter / 菊次郎52歳: ET 2009 のホテル取ろうと思ってたら、東京オフ ...
- プログラミングHaskell
これまで、下記のような誤植が見つかっています。- Smalltalkの萌芽 - パソコン創世記
- GNU patchが5年ぶりにバージョンアップ バージョン2.6リリース:CodeZine
- 文書スキャナ「ScanSnap」に新エントリーモデル--WinとMacのハイブリッド:ニュース - CNET Japan☆ー
- http://tabesugi.net/memo/2009/ba.html#152327
- Windows 7でウィンドウに隠れたガジェットを素早く見つける - @IT
- [取らせたい資格]技術職はセキュリティ、営業職は中小企業診断士が急上昇 - 2010年版「いる資格、いらな...:ITpro
- 第12回 SMMを悪用したキーロガー - 悪魔のツール“ルートキット”最前線:ITpro
- minipc.jp、A5用紙より小さなサイズのCore 2 Duoマシン「CX45シリーズ」:ニュース - CNET Japan
- なぜ Linux は Microsoft がシェアの大半を占める SMB で伸びないか(1) - japan.internet.com LinuxTutorial
- なぜ Linux は Microsoft がシェアの大半を占める SMB で伸びないか(2) - japan.internet.com LinuxTutorial
- なぜ Linux は Microsoft がシェアの大半を占める SMB で伸びないか(3) - japan.internet.com LinuxTutorial
- neue cc - F# TutorialをC#と比較しながらでF#を学ぶ
- 0byteのallocaやmemset -OKWavealloca?
- Windows7 に対応したコンパイラを探しています。 -OKWave
- InfoQ: 提案: C#で動的型付けを扱う折衷案
- InfoQ: Microsoftは.NET 4.0からコードアクセスセキュリティを除外している
このモデルではコードを3つに分類している。- InfoQ: Java SE 5がサービス期限に達した
サンの実装によるJ2SE 5.0は、2009年11月3日で、サービス期限が終了した(EOSL)。- 遠藤諭の東京カレー日記: 洋書の背表紙・知らないのは私だけ?
- 遠藤諭の東京カレー日記: 洋書の背表紙・知らないのは私だけ?(続)
- 圧倒的な安さを誇る7000円台のノートパソコンが登場、その名も「EasyPC」 - GIGAZINE
OSにはマイクロソフトの「Windows CE 5.0」が採用されており、Googleの携帯電話向けOS「Android」を採用したモデルも提供予定CE 5.0 とはまた- サービスサイトで内部エラーをそのまま出すのは恥ずかしい: 異常感想注意報
■_
CS302 2007S : John McCarthy - History of LISP John McCarthy - History of LISP McCarthy, J. (1978). History of LISP. ACM SIGPLAN Notices 13(8), pp. 217-223. DOI= http://doi.acm.org/10.1145/960118.808387 When discussing about conditional expressions (in pg. 218), McCarthy says that XIF(M,N1,N2) had to be used sparingly since all three arguments had to be evluated even if M was either zero or not. He says that it led to the invention of the true conditional expression which evaluated only one of N1 and N2 depending on whether M was true of false. What is the difference between representing the value of M as either 0 or 1, or True and False? How are True and False implemented in LISP? C does not have explicit True and False in which case we define True and False to be 0 and 1 if we ever need to use it. conditional expressions (in pg. 218) について議論しているときに、McCarthy は三つの引数 は M がゼロであろうとなかろうと評価されなければならないのでXIF(M,N1,N2) は sparingly に使われる必要があるのように主張しました。彼はそれが、 M が true であるか false である かによって、N1 か N2 のいずれか片方だけが評価される本物の conditional expression の発 明に繋がったと主張しています。M の値を 0 か 1で表現するのか、あるいはTrue か False で 表現するかの間にある違いとはなんでしょうか? LISP では True と False はどのように実装さ れているのでしょうか? C には明確な値としての True や False を持っておらず、そういった ものが必要になった場合には1 と 0 を True と False に当てはめています。 It's mostly an order-of-evaluation issue. For a traditional procedure, you evaluate all the arguments before applying the procedure. In the revised version, you only evaluate some of the arguments. これはほぼ評価順序の問題です。伝統的な手続きでは手続きを適用する前にすべての引数が評価 されます。改訂版 (revised version) の場合は、一部の引数だけしか評価されません。 I was wondering whether or not data structures were prevalent during the time Lisp was developed. It is evident why he makes lists the main data structure (functions themselves are simply lists) but why did he not include a way to make a struct or a similar data type? Lisp が開発されていた時期に、データ構造が広く普及していたかどうかがわたしには疑問でした。 それは 彼がリストを主たるデータ構造としたのかという理由の evident (証拠) になります(関 数それ自体が単純なリストです)。しかしなぜ彼は構造体やそれに類するデータ型を作成する方 法を含めなかったのでしょうか? No, generic mechanisms for making compound data types had not really been invented at the time Lisp was first developed. いいえ。compound data types (複合データ型) を作るための generic mechanisms は Lisp が最初に開発された時点では発明されていませんでした。 Were macros added after this paper was written? He doesn't seem to mentioned them much, but the other readings seem to emphasize them a lot. マクロはこの論文が書かれた後で追加されたのでしょうか? 彼はこの件についてはっきりと言及 はしていないようですが、他の文献ではそのことを強調しているものが多くあるようです。 Macros were not part of the original Lisp. I'm not sure when they were added, but they were a central part of Common Lisp. マクロはオリジナル Lisp の一部ではありませんでした。マクロがいつ追加されたものなのかは わたしにはわかりませんが、マクロは Common Lisp の central part となりました。 Also, what exactly is pornographic programming? また、 pornographic programming とは一体なんなんでしょうか? I'll get back to you on that. When McCarthy discusses the creation of a "LISP environment" does he mean creating the interpreter for the language or is it something else? Assuming that is what he means, what reasons were there for LISP to be an interpreted language instead of a compiled language? McCarthy states that the concern was that producing the compiler would take too long, but were there any other advantages or disadvantages for favoring an interpreted language over a compiled language? McCarthy が "LISP environment" の作成について論じるとき彼はそれを言語のイン タープリターを作ったという意味で言っているのでしょうか?それとも別の意味で言っているの でしょうか?彼の意図していたところを仮定したとして、LISP をコンパイル型言語ではなくイン タープリター型言語にする理由はなんだったのでしょうか? McCarthy はコンパイラーを作るこ と (producing the compiler) に非常に手間が掛かることに関心があったと主張していますが、 しかしコンパイル型言語ではなくインタープリター型言語を選択させたその他の advantages や disadvantages はなかったのでしょうか? Yes, he generally means the interpreter. The big advantage is that it encourages experimentation - type a little, see the result, type a little more, see the next result, and so on and so forth. There's also a bit of encouragement in such a system to write small procedures, which many of us think are good. 確かに彼はインタープリターのことが念頭にありました。インタープリターの big advantage はちょっとタイプして結果を確認し、さらにちょっとタイプして新しい結果を見るといった手順 で進めることに対するそれはまた、わたしたちの多くがきちんと考えることのできるような小さ な手続きを記述するためのシステムを encouragement するものでもあります。 McCarthy says that a large number of computer scientists and programmers regard the fact that LISP programs are lists to be a disadvantage. Why is that so? And why does he go on to say that this same feature of the language may have contributed to its survival? McCarthy は、コンピューター科学者とプログラマーのうちのかなりの数がLISP のプログラムは リストが disadvantage になっているとみなしていると主張しています。なぜでしょうか?そし て、なぜ彼は同じ機能をLISPという言語が生き延びることに寄与したのかもしれないと言ったの でしょうか? Let me get back to you on that. The writer of the History of Lisp says that one could conjecture that LISP owes its survival specifically to the fact its programs are lists. He says that everyone including him have regarded as a disadvantage. If it is a disadvantage, why isn't it changed especially considering its so central to Lisp? Lisp の歴史の記述者は プログラムがリストであるという事実がLISP の持つ survival specifically であると 推測できたものがいる。と言っています。 He says that everyone including him have regarded as a disadvantage. もしそれが disadvantage であるのなら、 why isn't it changed especially considering its so central to Lisp? Because it's also an advantage, and he's exaggerating. As the previous writer mentions, McCarthy also says that lists were key to Lisp's survival. なぜならそれは advantage でもあり、彼は誇張しているのです。先述した writer が言及した ように、McCarty もリストが Lisp が生き残るためのカギであったと言っています。 McCarthy states, "The first succesful LISP compiler was programmed by Timothy Hart and Michael Levin. It was written in LISP and was claimed to be the first compiler written in the language to be compiled" How is it possible to write a compiler in the same language as the language to be compiled? 「最初の成功した LISP コンパイラーは Timothy Hart と Michael Levin によって作成され、 それは LISP で記述されたものであり、コンパイルされる言語で記述された最初のコンパイラー である」と McCarthy は主張しています。 How is it possible to write a compiler in the same language as the language to be compiled? どのようにすれば、コンパイルされるのと同じ言語でコンパイラーを記述することができるのでしょうか? There are a number of ways, we'll actually cover this issue on Friday. In terms of the interpreter, seven key operations (plus or minus) are implemented in assembler. Everything else can be implemented with those key operations. In addition, if there's an interpreter, then you can interpret the compiler and have that compile itself to get an executable compiler. それには多くのやり方がありますが、we'll actually cover this issue on Friday. インタープ リターの terms では七つのキーとなるオペレーション (plus or minus) がアセンブラーで実装 されました。それ以外のものは、そのキーオペレーションによって実装することが可能です。そ れに加えて、インタープリターがあった場合、コンパイラーをインタープリットして実行形式の コンパイラーを得るために自分自身をコンパイルすることが可能です。 LISP puts the operator first in a mathematical expression because "any other notation necessarily requires special programming". When an operation is translated into machine code, why would it require special programming? It seems like it would be a very simple change. Is it there for other reasons besides making the programming easier? LISP は演算子を算術式 (mathematical expression) の先頭に置きます。それは、「他のどんな 表記法も特殊なプログラミングを必須としてしまう」からです。ある操作が機械語に変換された ときに、なぜそれが特殊なプログラミングを必要とするのでしょうか? It seems like it would be a very simple change. Is it there for other reasons besides making the programming easier? It's easier to parse things in which the operator comes first. When you see the operator, you know its arity, you know the expected types, you know almost everything. 演算子が最初に来ることで解析をすることが簡単になっています。演算子を見つけた時点で、あ なたはその演算子がとる引数や期待している型、などなどのほとんどすべてのことを知っている のです。 It's also there because it makes the form of s-expressions a bit simpler, but I suppose that's incorporated in the previous answer. S式の form ををちょっとだけ単純にするということもありますが、 これは前の回答に incorporated されているとわたしは suppose します。 What are the possible downsides to building a programming language that revolves around lists? リストに関連することを解決したプログラミング言語を構築するための posssible downsides とはなんでしょうか? You need to do garbage collection, you need to chase pointers (which means that things that are related may not be nearby in memory), you sometimes succumb to "If the only tool you have is a hammer, everything looks like a nail.". ガーベジコレクションをする必要があり、ポインターを追いかける必要があるのなら (which means that things that are related may not be nearby in memory), あなたは "If the only tool you have is a hammer, everything looks like a nail.". (持っている道具がハンマーだけならば、全てがくぎのように見える) ということに屈することがあるでしょう。 When the paper compares the LISP with Turing Machine, it doesn't provide any example. Generally, in this paper, I am not familiar with many things such as IBM 704, SDS.... It's hard for students, who are from current programming world, to understand this paper. 論文で LISP と チューリングマシンとを比較したときに何の例も提供されませんでした。一般 的に言って、この論文にはわたしが良く知らないことがらがたくさんあります。IBM 704 だとか SDS だとかそのほかいろいろ。この論文を理解することは、現在のプログラミング世界にいる学 生には困難なことです Well, if understanding the thing seems central to the paper, then you probably need to a bit of extra research. However, knowing the details of the computer on which LISP ran is probably not essential. What kind of example would you like in the comparison of Lisp with a Turing machine? Church's theorem shows them to be equivalent. You must also realize the audience for whom he was writing. さて、仮にこの論文の肝心な部分と思える箇所を理解するのなら、多分あなたには bit of extra research の必要があるでしょう。しかし LISP が動作していたコンピューターについて の詳細を知ることはおそらく本質的なことではありません。LISP とチューリングマシンを比較 するのになにか実例が欲しいですか?チャーチの理論 (Church's theorem) は両者が等価なもの であることを証明しています。 You must also realize the audience for whom he was writing. Note that one of the things I want you to gain from this course is a better understanding of history, and, because I respect you as intelligent learners, I have no intention of spoon-feeding you that history. Note that わたしがあなたにこのコースから得て欲しいものの一つが歴史をより理解することであり、そし てそれはわたしがあなたを intelligent learners であると respect しているからであって I have no intention of spoon-feeding you that history. John McCarthy credits his work with AI as very influential in his creation of LISP. He explains that he chose to make a list-based language because of his work with AI. This brought to mind one of our past readings about how software engineering has influenced the design of programming languages. It seemed to me that McCarthy's article also shows how the available hardware influences the design of a programming language (e.g car and cdr). John McCarthy は 彼の work をAI がLISP を彼が作成するのに大きな影響があったということ とともにcredit しています彼の work が AI についてのものだったことがリストベースの言語 (list-based language) にすることを選択させたのだと彼は説明しています。その説明はわたし に、ソフトウェアエンジニアリングがどのようにプログラミング言語の設計に影響を及ぼすかに ついて過去に読んだものを思い起こさせました。このことは McCarthy の article が使用可能 なハードウェアがいかにプログラミング言語の設計に影響を及ぼすか (たとえば car や cdr) を示しているのと同じことのようにわたしには思えるのです。 It is natural to make a language reflect the hardware, at least a bit, particularly if you care about efficient code.a 少なくともコードの効率というものを考慮したときに、 ハードウェアを言語に反映させるのは自然なことなのです。 The 15 bit sections for address ond decrement make sense. What are the prefix and tag sections of the word for? 各々15ビットの、アドレスのためのセクションと decrement のためのセクションがあるのには 意味があります。ワード中の prefix や タグといったセクションはなんのためなのでしょうか? I'll get back to you that.
2009年11月15日
歴史群像(2009年12月号)で 「内臓タイマー」という誤記を見つけてがっくし
なんで世のプログラミング言語は軒並み(COBOLは例外) 実数を扱うのに二進の浮動小数点数を使うのだという意見を見かけた。 同様なことは自分も書いたことがあるような覚えが(笑)
・金融工学 ちょっと読んでみた。 Amazon.co.jp: 「金融工学」は何をしてきたのか(日経プレミアシリーズ): 今野 浩: 本 正確なところは良くわからないけど、取り扱い注意な代物なのはわかった。 しかし Amazon.co.jp: 金融工学 - 和書: 本 ずいぶんとあるもんだなあ。
■_ あんびりーばぼーなコード
たぶん reddit 経由で。
Coding horrors: post the code that makes you laugh (or cry) - The Something Awful Forums I remember there used to be a thread like this, but I can't find it anymore. Just post code that either you or your coworkers/classmates have written that is hilariously bad. I've been looking through a large system recently, since I just started a new co-op and I have to get caught up. This one coder (who I've never met) has stuff like this in all his classes: private static final int FIVE = 5; private static final int NEG_ONE = -1; private static final int FIVE_BILLION = 5000000000; private static final String SPACE_PIPE_EQUALS = " |="; private static final String ERROR_WITH_CODE = "Error with code"; I was reading one of his classes today that had 50 lines of constants written like that. In an 800 line class. Also, in multiple places he does this: File fw = new File(args[0]); File fh = new File(args[1]); File nv = new File(args[2]); File nh = new File(args[THREE]); File tw = new File(args[FOUR]); He does this in multiple classes. 0, 1, 2 are fine, but any number higher than that he replaces with a named constant. He also doesn't comment his code, and uses method names like "task" and "task2". Then there was this method: code: private boolean compareInts(int one, int two) { boolean areEqual = false; if(one == two) { areEqual = true; } return areEqual; } His code is unreadable, and I am considering begging my boss to let me rewrite it, since he doesn't have me doing anything else. Of course, if I do that then I need to try to understand what exactly his code does, which may be impossible. I'm sure compared to many of you that this isn't all that bad, so share your own tale of horror!いやどういう思考でこのコードができるのか謎だ。 寄せられた意見の中に
This pipe not pipe!! How come the guy is still employed?ごもっともな疑問だw
■_ Perl 6
最近ぜんぜんいじってないなあ parrot とか。
blog | Perlgeek.de :: Is Perl 6 really Perl? Thu, 12 Nov 2009 Is Perl 6 really Perl? A few days ago masak blogged about the social aspect of the is Perl 6 really Perl? question. → http://use.perl.org/~masak/journal/39861 He presumes that the answer is yes, but doesn't tell us why. I'll try to give some reasons. Perl 6 started as the successor to Perl 5 Perl 6 started off as the successor to Perl 5, at a Perl 5 meeting, by the Perl crowd. It was a plan to escape both the backwards compatibility trap (which meant that broken things couldn't be fixed without many people yelling), and the lack of momentum in the community. Perl 6 embraces the Perl philosophy What makes Perl Perl? In my opinion it's not the sigils on variables that make Perl Perl, or that writing a regex only need two characters and so on. It's mostly the philosophy that makes the difference. There are some underlying principles like TIMTOWTDI, context sensitivity, convenience over consistency, making simple things easy and hard things possible, often used constructs short and less frequent things longer, and so on. Perl 6 is founded on all those philosophies and ideals, and also shares some technical principles. For example sigils on variables (oh, I mentioned them already ...), easy access to powerful regexes, that fact that operations coerce their arguments (instead of the type of arguments determining the operation like in javascript, where a + can either mean addition or string concatenation). So if you agree with my definition of what makes Perl Perl, Perl 6 is also Perl. If not, please tell me what's the essence of Perl!まあ見た目もなにも別言語といった方がすっきりする気もするけど、 根本的な考えた方はまあ共通なんだろう。
■_ げーん
Amazon さんからお手紙着いた。
このたびは、Amazon.co.jpをご利用いただき、ありがとうございます。 誠に申し訳ございませんが、お客様のご注文内容のうち以下の商品について、商品を 入手できないことがわかりました。 Guido Van Rossum (著), et al "The Python Programming Language" Amazon.co.jpでは、この商品につきまして、入荷の可否を継続して確認して参りましたが、 現時点では入荷の見込みがないと判断せざるを得ませんでした。 つきましては、Amazon.co.jp利用規約に基づき、お客様のご注文からキャンセルさせて いただきましたので、お知らせいたします。 (以下略)Amazon.com でもチェックしとくか。
■_ C++
いなばさんのところでのC++ネタで
d.y.d. 18:56 09/11/13 Hello C++ World std::cout << "Hello, World!" << std::endl; C++の話が続くことに特に意味はないのですが、いや、改めて考えると面白いなーと思ったので。 @DecimalBloat さんのポスト を見て @Cryolite さんのポスト を思い出した上で改めてこの何 の変哲もないハローワールドを見てみると、この1行だけでも、 良くも悪くも C++ の色々な側 面がつまってるんだなあ、 と 蛇に足をはやしたく なった次第です。 std::cout << "Hello, World!" << std::endl; 「名前空間」 で分類することで、名前の衝突を防げます。 標準ライブラリはすべて、std 名前 空間に入っています。 std::cout << "Hello, World!" << std::endl; ostream という「クラス」のオブジェクトが変数 cout に入っています。 オブジェクト指向な 感じです。 cout は「グローバル変数」です。 全ての変数は必ず何かのクラスに属させる必要 がある Java 等と違い、 グローバルに変数を置いちゃえます。 std::cout << "Hello, World!" << std::endl; 「演算子オーバーロード」。<< という演算子を、 組み込みの意味(シフト演算)と違う 動作をするように多重定義しています。 ただそれだけのように見えますが、実は、ここでは更に、「ADL (Argument Dependent Lookup)」 と呼ばれる、C++の仕様の中でも一二を争うトリッキーな仕組みが発動しています。 この << 演算子の多重定義、cout のメソッドとかではなく、こんな、 namespace std { ostream& operator<<(ostream& os, const char* s) {...} } std 名前空間にあるグローバル関数なんです。名前空間の中にある関数を、 std::<< な どと修飾せずに呼び出せてしまうのは、本来はおかしい。 これを呼び出せるようにするための 仕組みが ADL です。引数 cout の型が名前空間 std で宣言されている型だったら、たとえ関数 名がstd::修飾されていなくても、 勝手に std:: にも探しに行きます。 演算子のための特殊仕 様というわけでもなく、任意の関数呼び出しでADLは発動します。 (以下面白い部分をさっくりと略) というわけで、Hello World から眺める C++ をお送りしました。<< の名前の解決の話、言われるまで気がつかなかった ○| ̄|_
■_ XXX It!
XXX It もタイトルに統一性をもたせたシリーズだったんですか(にぶちん)。
The Pragmatic Bookshelf | Debug It! in print Three things are certain: Death. Taxes. Debugging. For those first two you're own your own, but if you're a programmer, we can help you handle the third. Debug It! is now in print and shipping. Thanks to everyone who responded to our survey about the Pomodoro cover. Based on the survey results and your emails, we've settled on a new cover. PragProWriMo continues through the month of November, we hope that's going well for you. And don't forget to check out the latest issue and back issues of our magazine, PragPub. Debug It! Author Paul Butcher says, “Debugging is one of the few completely unavoidable software development tasks. It's a certainty that at some point, you're going to have to write code and at some other point (possibly very soon after the first!) you' re going to have to debug it.” These secrets of professional debugging will show you how to handle every stage of the bug life-cycle, from constructing software that makes debugging easy, through detection, reproduction, diagnosis and rolling out your eventual fix. Whether you're writing Java or assembly language, targeting servers or embedded micro-controllers, using agile or traditional approaches, the same basic bug-fixing principles apply. You'll learn an empirical approach which leverages your software's unique ability to show you what's really happening; the importance of finding a reliable and convenient means of reproducing a bug; how to avoid common pitfalls. You'll see how to use commonly available tools to automatically detect problems before they're reported by customers. You'll construct “self-debugging” software that automatically provides access to crucial information, and identifies the broken assumptions that lead to bugs. You can continue to just wing it, or you could start a professional approach to debugging today. Debug It! will show you how. Now available in print and shipping from pragprog.com/titles/pbdp Enjoy!
Three things are certain: Death. Taxes. Debugging.三つの避けられないものですか。しかし Death(死) と Taxes (税金)と デバッグが並べられるとは。The Ruby revolution is over | Merbist The Ruby revolution is over According to wikipedia, a revolution (from the latin revolutio, “a turn around”) is a fundamental change in power or organizational structures that takes place in a relatively short period of time. Wikipedia によれば革命とは、力によって為された根本的な変化 もしくは比較的短い期間でのorganizational structures の交代となっています。 Somehow, I believe this is exactly what Ruby has done in the programming world, especially with the help of Rails. Over the last few years, Ruby lead a mini revolution in the midst of software development. Thanks to Ruby, developers now look at software development differently. One thing for sure, it pushed DHH to write Rails and then convinced thousands of people to develop Ruby based applications on a daily basis. とにかくわたしはこれが、まさしく Ruby が特に Rails の助けを借りてプログラミング世界で 成し遂げたことだと確信しています。ここ数年、Ruby はソフトウェア開発の midst において小 さな革命をリードしてきました。Ruby のおかげで開発者たちは今、ソフトウェア開発を異なる 目で見ているのです。ひとつ確実に言えるのは、Rubyは DHH がRails を書くことを push し、 そしてさらに何千という人に日々使うアプリケーションをRubyで開発させるようにしたというこ とです。 How did it happen? (どのように行われたのか?) Let's take a look at history of revolutions. Some people get frustrated their situation, they try to find workarounds until it's just too much and the revolution kicks in. では革命の歴史を見ていくことにしましょう。 一部の人は自分の置かれている状況にに不満を感じて workaround を探そうとしていました。 until it's just too much and the revolution kicks in. Ruby came up with a new holistic perspective on things. Unlike most other programming languages, one of the main key value of Ruby is that writing code should feel right for the developer. You feel good about it because the language was written for humans and not machines. Basically, the language was designed to make you productive because it's designed to please you. Ruby は new holistic perspective on things と共に広まりました。他の大部分のプログラミ ング言語とは異なり、Ruby の main key value の一つはコードを書くことが開発者にとって心 地よいものでなければならないというものです。あなたが Ruby に心地よさを感じるのは、この 言語が機械のためにではなく人間のために書かれたものだからです。基本的にこの Ruby という 言語はあなたをより productive にするためにあなたが心地よさを感じるように設計されました。 As people were discovering web 2.0, Ruby also came with an opinionated framework, pushing for productivity, testing, simplicity and elegance. People started to see a new way of doing things and it quickly became the new, cool technology. Rails became a buzz word, developers were hired to work on cool projects, and books were selling by the thousands. 人々が web 2.0 を discovering したのと同じようにRuby also came with an opinionated framework, Ruby もまた opinionated framework となってproductivity と testing 、 simplicity、elegance を推進していました。人々は新しいやり方の探索を始め、Ruby はすぐに 新しくてcool な技術となりました。Rails はバズワードとなり、開発者たちは cool なプロジ ェクトのために雇われました。さらに本が何千冊と売れたのです。 What did it change? (何が変わったのか?) If you ask my mom, she would probably say: nothing, except that now my son works from his home office and he seems to really enjoy what he does for living. あなたがもしわたしの母に尋ねたら、こう答えるでしょう: 何も変わってないわね。ああ、でも今は、息子が自分の home office で働くようになったし 自分の人生のためにしていることを本当に楽しんでいるように見えるかな。 Relatively speaking, Ruby did not change the way we work or live. However, I believe that it has influenced many software developers around the globe. Why else do you think that companies like Microsoft, Apple or SAP are working on their own implementation of the Ruby language? Relatively speaking, Ruby はわたしたちの仕事のやり方や生活を変えてはいません。 しかしわたしは、 Ruby が多くの around the globe の ソフトウェア開発者に影響を及ぼしたということを確信しているのです。 Why else do you think that companies like Microsoft, Apple or SAP are working on their own implementation of the Ruby language? Microsoft や Apple、SAPのような企業が 自分たちの実装による Ruby 言語を When I first discovered Ruby, I was amazed at how “right” it felt, at how much fun it was to write code using its syntax and idioms. Now, if I don't get that feeling when testing a programming language, I think there is something wrong. わたしが初めて Ruby を見つけたとき、それがどれほど“正しい”と感じさせるものであり、コ ードを書くのに使っている構文やイディオムがとても楽しいということに驚かされました。もし 今、プログラミング言語をテストしているときにそういった感触が得られなければ、何かが間違 っているとわたしは考えるでしょう。 The Ruby community also revived the Agile/XP world. Testing being a strong value of the community, we spent a lot of time discussing TDD, BDD, integration test as well as other practices such as pair programming, code review, sprints etc.. Ruby コミュニティは Agile/XP 世界も revive しました。テストはコミュニティの strong value となりわたしたちは長い時間をかけてディスカッションしましたTDD、BDD、integration test もさることながら、ペアプログラミングやコードレビュー、sprints などについても。 A few years ago, when people were asking me what programming language I would write their app in, I would reply Ruby and had to explain what it was, why it is great and would have to answer a lot of questions from potential clients. Nowadays, people don't even argue, sites like hulu.com, twitter.com, yellowpages.com and many others are written in Ruby and it's just part of the tools known to work very well. ほんの数年前には、誰かがわたしに自分がアプリケーションを書くためのプログラミング言語は 何が良いかと尋ねてきたときにはRuby と答えるだけではなくてRubyが何であるかを説明する必 要がありましたし、なぜ Ruby が great であり potential clients の質問の多くに対する回答 になるのかについて説明しなければなりませんでした。今日、同じように尋ねてくる人は文句を いうこともありませんし hulu.com, twitter.com, yellowpages.com を始めとした多くのサイト が Ruby で書かれていて、 and it's just part of the tools known to work very well. The revolution is over! (革命は終わった!) Yes, Ruby made it's revolution and the world “has changed”. But a real movement doesn't die after its revolution, that's actually when it has to be strong and defend its values. 確かに Ruby は革命を成し遂げ、「世界は変わりました」。 けれども本当の活動 (real movement)はその革命のあとも死んでいなくて、 実際には強くあって、その価値を守るべき時なのです。 This doesn't mean that Ruby is dead or that Rails is “passé”. To the contrary, Ruby imposed itself as a new valued and respected player, a new standard if you will. このことは Ruby が死んだとかRails が “passe”だということを意味してはいません。むしろ それとは反対に、あなたが望むのならRubyは自身を new valued で respected な player であ り新しい標準であると impose しています。 Ruby is certainly not the “new kid in the block”anymore nor the“popular kid”, however lots of older kids seem to want to have her on their team. (.NET, Java, Objective-C can all use Ruby) たしかに Ruby はもはや “new kid in the block”ではありませんし、“popular kid” でもありません。それでも数多くの older kids が自分たちのチームに Rubyを加えたがって いるようです(.NET, Java, Objective-C can all use Ruby)。 The TDD + Ruby combo doesn't surprise anyone anymore and the Enterprise is slowly but surely adopting Ruby. Ruby is now just getting better, tools and libraries are improving and the amount of users is growing. TDD (テスト駆動開発) と Ruby とのコンボは最早誰も驚かせるようなことはありませんし、そ して Enterprise はゆっくりとではありますが確実に Ruby を受け入れてきています。 Ruby は 今まさに改善されているところで、ツールとライブラリは改良されているしユーザーの数も増え ています。 Certainly the Ruby community is still small compared to other software developer communities, but the fundamental change was done and we are now working on improvement and keeping things running smoothly, growing and getting new ideas inspired by our experience and other communities. 確かに Ruby のコミュニティは他のソフトウェア開発者のコミュニティーに比べればまだまだ小 さいものですが、fundamental な変化はすでに完了していて、わたしたちは現在、ものごとを改 良したりスムーズに行い続けるための作業や、コミュニティを成長させ、わたしたちの経験や他 のコミュニティから inspire された新しいアイデアを得るための作業をしています。 Long live Ruby! revolution, ruby This entry was posted on Monday, November 9th, 2009, 00:10 and is filed under Misc, ruby. You can follow any responses to this entry through RSS 2.0. You can leave a response, or trackback from your own site.どうも訳がしっくり来ない部分が多々あるなあ。
- 2010 年はアップルにとって何か大きな年になりそう « maclalala2
- 三鷹市シニアのITリテラシーの高さがハンパじゃなかった件:とりあえず前向き。なブログ:So-net blog
- Ziddielくんの「僕も社食に連れてって」:アドビのサンフランシスコオフィスでマクロメディア魂を見た編 - Ziddyちゃんの「私を社食に連れてって」 - ZDNet Japan
- Twitter / Tajima: だが、断言しよう。GoをNTTデータを筆頭としたSI ...
- ソフトウェアの世界は止まらない:柴田 芳樹 (Yoshiki Shibata):So-netブログ
したがって、基本は本人が自主的に学習を継続することです。継続した学習の習慣を身に付けていない人への教育は、焼け石に水となる可能性が高いです。- Twitter / KAKUTANI Shintaro: #railstokyo 関数型プログラミングの考え方 ...
- 一ヶ月先ってなに? - がるの健忘録
- プログラミング初心者って、何が分からないんだろう? さすがに、日曜プログラマ... - Yahoo!知恵袋
- フリーソフトについて -OKWave
回答者の回答もなかなかむずがゆいものがががが- Twitter / 未知の生物たかの: 「ジャッジメントですの」で検索するとテオリアさまのブ ...
- Twitter / Chaton CommonLispJP: shiro: 知り合いのレンダラ書きの人によれば、現 ...
- Twitter / Faith and Brave: 仕事で C++ 使うひとにたったひとつのお願い。メン ...
- Twitter / Yugui (Yuki Sonoda): http://d.hatena.ne.jp/mine ...
- 10〜30分で何となく分かるGo
- Twitter / しょ~ぐん: 頭痛持ちの小男vs福耳のペテン師vsアル中御曹司って ...
- Goでdial - Plan9日記
- DTP・印刷、今までで一番すごいミス - にくろぐ。
- IT業界の求人条件は図々しい。「経験者+プログラミング+マネジメント出来る方のみ」とかかなり贅沢 by うるさい黙れ(。・ω・。)
- Twitter / 菊次郎52歳: しかし最低な名前だよな… まだ Programmin ...
- Twitter / 菊次郎52歳: ● G 言語の特徴: ゴキブリのようにしぶといバグが ...
- JR山手線に 劇場版マクロスF 仕様の痛電が登場:【2ch】ニュー速VIPブログ(`・ω・´)
- Applicative.pdf (application/pdf オブジェクト)
- Amazon.com: Head First Programming: A Learner's Guide to Programming Using the Python Language (9780596802370): Griffiths David, Barry Paul: Books
Head First シリーズで出るのか。ここ数日ついったから拾ってくるのが多いな。
gist: 234728 - GitHub HIMA はじめますよー (今回は Typeclassopedia を吊るし上げる会です) 22:01 ikegami__: Applicative は idiom だと、作者自身が言ってるので 22:01 ikegami__: おぼえよう、高校英語のように聞き覚えのない用語が飛び交っててわけわかりませんでした。 でも泣かない。
2009年11月14日
・まつもとさんTwitter / Yukihiro Matsumoto: Rubyの成功はDHHがいたからw ちょっw
・最近思うのです 仕事でちまちまと Excelをいじっているときに、 ああ、このシートのデータを R でいじれたらなあなどと。 いやまあ、R の拡張ライブラリに Excel のデータを扱えるようにするのがあるというのは 知っているのですが、マウスでセルをつんつんしながら、適当なところで 一気にコマンド(スクリプト)を書けたら楽できるよなあとかそういう感じです。 VBA はまああれはあれで重宝しますが、マクロとして書くのがちょっと面倒ですよね。 Emacs のミニバッファーみたいのを開いてぽちぽちと入力といったのが☆なーと。
OOo の Calc で、Pythonをその手の操作に使えたらサイコーなんですがw
・飛ばせデータブロック転送~♪YouTube - 【初音ミク】 Z-80のうた
・意外なところから反応が って、Smalltalkネタに反応があるのは id:sumim さんだけではなかったのを忘れていた 軌跡は自分で起こすもの - みねこあ
■_ 最近なかなか
きちんと見ている余裕がなっしんぐ。
C言語なら俺に聞け(入門篇) Part 55 798 デフォルトの名無しさん [sage] 2009/11/14(土) 19:02:00 ID: Be: I/Oがたまに他プロセスに取られて動作しなくなるのですが、 どうすればI/Oを取り戻せますか。 800 デフォルトの名無しさん [] 2009/11/14(土) 19:04:52 ID: Be: >>798 ポーリングをやめて割り込み駆動にする 801 デフォルトの名無しさん [] 2009/11/14(土) 19:08:28 ID: Be: 微笑み忘れた顔等 見たくはないさ I/O取り戻せ! 803 デフォルトの名無しさん [sage] 2009/11/14(土) 19:41:36 ID: Be: んI/O取り戻~せぃぇ~~ぃぇぃぇ。 804 デフォルトの名無しさん [sage] 2009/11/14(土) 20:30:26 ID: Be: ユーアーショック! Iで空が落ちてくる!「愛を取り戻せ!」の歌詞は「You は shock!」 なんだよねw >804
C言語なら俺に聞け(入門篇) Part 55 [ 805 デフォルトの名無しさん [sage] 2009/11/14(土) 21:59:26 ID: Be: 個人的に許せへんのは、小文字かつ1文字の変数 i とか t とか 806 デフォルトの名無しさん [sage] 2009/11/14(土) 22:08:00 ID: Be: なにか問題でも? 807 デフォルトの名無しさん [] 2009/11/14(土) 22:13:31 ID: Be: まあ許せよ、インタープリタ方式の言語が長かった奴の性ってやつよ K&R C が長かったり、長くもなかったりする奴の return(0); は許してるんだろ? 808 デフォルトの名無しさん [sage] 2009/11/14(土) 22:14:55 ID: Be: わかりにくい。 もうちょっと何とかならんのかい。 long double ConvertGeometryMatrix(void) というところでインクリメント用変数を使うのだとしたら、 ConvertGeometryMatrix_InclementValue などとすれば一発で分かるのに。 809 デフォルトの名無しさん [sage] 2009/11/14(土) 22:16:46 ID: Be: なげーよw 810 デフォルトの名無しさん [sage] 2009/11/14(土) 22:27:43 ID: Be: こんな感じか? IntegerVariable MainFunction(IntegerVariable ArgumentCount, CharacterVariable *ArgumentVector[]) { return 0; } 811 デフォルトの名無しさん [sage] 2009/11/14(土) 22:33:24 ID: Be: 一文字変数に文句言うやつを何とかしてほしい。 812 デフォルトの名無しさん [sage] 2009/11/14(土) 22:37:02 ID: Be: まあ、ハンガリアンとかも含めて 中二病みたいなもんだから その内に治まるだろ。 無意味だと気付くまでやりたいようにやらせとけ。 813 デフォルトの名無しさん [sage] 2009/11/14(土) 22:38:04 ID: Be: コーディングスタイルにはいろいろある 人それぞれ好みが違う ンなことは分かりきってるし、散々いろんなところで議論されてきたのに やっぱ目の前でモメるとイライラする。それも int First, Second; なのか、 int first, Second; なのか程度で 814 デフォルトの名無しさん [sage] 2009/11/14(土) 22:48:25 ID: Be: >>808 なんだよInclementって。わかんねーよ 815 デフォルトの名無しさん [sage] 2009/11/14(土) 22:52:08 ID: Be: >>813 int first; int second;まあ限定されたスコープなら一文字の名前でもいいと思うけど、 以前書いたみたいに、g 一文字の「グローバル変数」が各所にちりばめられている プログラムをいじったりすると許しがたいものがあるなw
推薦図書/必読書のためのスレッド 52 821 デフォルトの名無しさん [sage] 2009/11/13(金) 23:52:46 ID: Be: Maxima のような数式処理システムの仕組みを理解して簡単なものを作ってみたいです。 しかし、現時点ではデータ構造の考え方とか基本的なことからよくわかっていません。 (何となく想像はできるのですが) 「はじめてのMaxima」に少し考え方が載っていますが、 数式処理システムを専門に扱った本でいいのは無いでしょうか。 洋書でも構いません。 「数式処理システム (ソフトウェア講座) 」は初心者には読みやすいでしょうか。 822 デフォルトの名無しさん [] 2009/11/14(土) 00:59:07 ID: Be: 読みやすいね。 823 デフォルトの名無しさん [sage] 2009/11/14(土) 03:20:52 ID: Be: 構造体教えて 824 デフォルトの名無しさん [] 2009/11/14(土) 07:21:57 ID: Be: C++でのクラスみたいなもんだゃえ”? >824 いやネタ回答でしょうけど。
■_ history of programming language
An introduction to object oriented languages An introduction to object oriented languages Object-orientation can refer to a set of design principles, a programming style, or features of programming languages that support that style. Continuing from an earlier post on the history of programming languages, let's next concentrate on the purpose and history of the languages that support OOP. オブジェクト指向は設計の原則の集まり (set of design principles)、プログラミングのスタ イル、もしくはそのスタイルをサポートするプログラミング言語の機能と見なすことができます。 Continuing from an earlier post on the history of programming languages, let's next concentrate on the purpose and history of the languages that support OOP. The purpose of object orientation is to model, in code, the objects that make up the application you're writing and the interactions between them. As in human language, it's impossible to describe any process without referring to the nouns that are involved. All programming languages provide some nouns, but until object-oriented languages arrived on the scene, the programmer couldn't create his/her own nouns very easily. Programming was limited to talking about the set of nouns provided by a language: numbers, characters, channels, etc. Of course, programmers built more abstract structures around this limited set of nouns, but the code that described those abstractions was much more complex than talking about them in English. Object-oriented languages allow you to define types of objects (called classes) that are derived from, or composed of, other types. In addition to this data component, the functions (also called methods) that “belong” to the data are also grouped in the class. This has at least three benefits: オブジェクト指向の目的は、コードの中であなたが書くアプリケーションを作り上げるオブジェ クトとオブジェクト間の相互作用 (interactions) をモデル化することです人間の言語における それと同様、提供された名詞を参照せずになんらかのプロセスを記述することは不可能です。す べてのプログラミング言語はなんらかの名詞を提供していますが、オブジェクト指向言語が登場 するまではプログラマーは自分自身の名詞を簡単作り出すということはできなかったのです。プ ログラミングは、数字、文字、チャンネルなどの言語によって提供されている名詞の集合によっ て話すことが制限されます。もちろん、プログラマーはこの制限された名詞の集合の下でより抽 象化された構造を構築しますが、しかしそういった抽象化を記述したコードは英語でそれらにつ いて話すよりもさらに複雑なものだったのです。オブジェクト指向言語ではあなたが別の型から 派生したり、複数の型を集成したオブジェクトの型 (クラスと呼ばれます) を定義することが可 能です。さらにこのデータコンポーネント (data component) に加えて、そのデータに “属す る” 関数 (メソッドと呼ばれます)もまたそのクラスの中にまとめられます。これには少なくと も三つの利点があります。 1. Encapsulation. Functions that are internal to a class can be marked as “private”. This means that they're hidden from any code outside the class, so their implementation can be changed without bothering any code that uses the class. Conversely, the methods that are marked “public” form a well-defined interface that should not be changed without due consideration, because client code relies on it. Encapsulation. (カプセル化) あるクラスの内部にある関数は“private”なものと見なせ ます。これはそのクラスの外側からのどんなコードからも隠されているということを意味し ます。このため、そのクラスを使ってるコードがどんなものなのかを一切気にすることなし に実装に対して変更を加えることが可能です。反対に、“public”とマークされたメソッド はクライアントコードがそれに依存しているので、正当な consideration 抜きに変更すべき ではない well-defined interface (きちんと定義されたインターフェース) を form します。 2. Inheritance. You can derive one class from another, and the new class automatically contains all of the methods and data of the original class. This is useful when some subset of your objects needs an additional capability, but you don't want to give that capability to all of the other objects. Inheritance. (継承) あるクラスを別のクラスから派生 (derive) させることができ、派生した 新しいクラスは自動的に派生元のクラスのメソッドとデータのすべてを保持します。あなたの オブジェクトのなんらかのサブセットが additional capability を必要としているけれどもそ ういった capability をその他のすべてのオブジェクトに与えたくないようなときに有用です。 3. Polymorphism. Polly who? It's a Greek-derived term that means “many forms”. In OOP, it means that sending the same message (in most OO languages, this means calling a method by name) may evoke different responses depending on type. Polymorphism itself has more than one form. The first form is when a derived class overrides an inherited method with its own implementation, so that sending the same message (calling the same function) on two different objects yields a different behavior depending on their types. A second type of polymorphism is called “parametric polymorphism”, which means that a class provides different implementations for a method depending on the types of parameters passed to it. Polymorphism. (多態) Polly って誰? この単語は “many forms”(多様な形式) を意味す るギリシャ語からきているものです。オブジェクト指向プログラミングでは、これは同一 のメッセージを送ったときに型に応じて異なるレスポンスが引き起こされる可能性がある という意味です (大部分のオブジェクト指向言語では、これは名前によってメソッドを呼び 出すことを意味しています)。多態それ自身が二つ以上の form を持っていて、第一の形式 (form) では派生クラス (derived class) が継承したメソッドを自分自身の実装でオーバー ライドしたときに、型に応じて異なる振る舞いをする二つの異なるオブジェクトに同じメッ セージを送ります (同じ関数を呼び出す)。多態の二番目のタイプは “parametric polymorphism”と呼ばれるもので、渡されたパラメータの型に依存するメソッドのためにそ のクラスが異なる実装を提供していることを意味します。 Have I lost you yet? Good. Many people these days automatically think of Java when they hear “object-oriented language”, but Java was far from the first object-oriented language. That distinction belongs to Simula, which was developed back in the 1960's. But even though Simula introduced the concepts of object-orientation, the first language to be called “object-oriented” was SmallTalk - and it earned that moniker by making literally everything an instance of a class, even literals (a feature that Ruby picked up later). 今日、多くの人が“オブジェクト指向言語”という言葉を聞いたときにはJava を即座に思い浮 かべますが、Java は最初のオブジェクト指向言語からはかけ離れたものです。その栄誉は、 1960年代に開発された Simula に帰するものです。しかし Simula でさえもオブジェクト指向の コンセプトを持ち込んだものではありますが最初の“オブジェクト指向言語”と呼ばれるものは Smalltalk でした。このSmalltalk では、リテラルも含め、リテラル的なものすべてをあるクラ スのインスタンスとすることでmoniker を得ていました(のちにRubyが採用した機能です) Object-orientation made for good theory back in the eighties when I was first introduced to it, but it didn't receive wide adoption until it became widely available as extensions to more popular languages like C (as C++) and Pascal (as Object Pascal). Borland helped to popularize both of these languages on the PC with their Turbo C++ and Turbo Pascal products. Since both C++ and Object Pascal are layered on top of non-OOP languages, they were often criticized by OO purists as “hybrids” - because it was still possible to write non-OO code in those languages. オブジェクト指向はわたしが最初にそれを採用した1980年代に役に立つ優れた理論であると宣伝 されましたが、C や Pascal のようなより一般的な言語に対する拡張(C++ と Object Pascal) が広く使えるようになるまでは採用が広まることはありませんでしたBorland は Turbo C++ と Turbo Pascal という製品で、PC におけるこれら両方の言語の普及 (popularize) に貢献しまし た。C++ と Object Pascal の両方とが非オブジェクト指向言語の上に被さったレイヤーであり、 非オブジェクト指向なコードを記述することがまだ可能であったためにこれらの言語はしばしば オブジェクト指向純粋主義者 (OO purists) たちから「雑種」(“hybrids”) と criticized さ れていました。 When Java came along in the early 90's, it introduced a syntax similar to C++, but simpler in the object-orientation department. It also eliminated the “hybrid” problem (sort of) by forcing all routines to be members of a class - even the main routine. Unfortunately, this has led to the creation of gratuitous classes merely to enclose functions, and thus to an over-abundance of nouns in the code conversation. But neither is Java a pure OO language, because primitive types are not members of a class (although they can be coerced to objects). Because of these limitations, and the casting required by static typing, programming in Java often becomes an exercise in verbosity. C# is largely a Microsoft-centric variant of Java, though it has introduced many verbosity-reducing features, some of which have subsequently been copied by Java in what looks to me like an attempt to keep up with the Joneses. 90年代初めに Java が登場したとき Java は C++ に似た構文を導入していたのですが、 object-orientation department において、より simple でした。Java では、メインルーチン さえも含むすべてのルーチンをクラスのメンバーにすることを強制することによって“hybrid” 問題(に類するもの)も取り除いていたのです。残念なことに、これは単に関数を enclose する だけの gratuitous classes (クラスにする意味のないクラス?) を作ることに繋がってしまい、 その結果としてコードの conversation をするときに名詞の氾濫 (over-abundance of nouns) を 招くことになりました。しかし Java は純粋なオブジェクト指向言語 (Java a pure OO language) でもありませんでした。なぜなら、プリミティブ型がクラスのメンバーになっていな かったからです (ただしプリミティブ型はオブジェクトに coerce 可能でした)。Java によるプ ログラミングは、このような制限と静的型付け (static typing) が要求するキャストによってし ばしば exercise in verbosity となったのでした。C# は多分に Microsoft 風味の Java です が多くの verbosity を減らすための機能が導入されています。 そのうちの一部はのちに Java にもコピーされています in what looks to me like an attempt to keep up with the Joneses. Perhaps the best thing that Java did for object-oriented programming was to demonstrate by negative example that not every function belongs in a class. If one of the main goals of object-orientation is to model in code the objects and processes that comprise the application, then forcing an unnatural discussion of the actor for every action misses that goal. In English, we often describe a process by saying “ first, do this… then, do that” without mentioning the implied subject (”you”). More recent languages like Python and Ruby give you the option of using object-oriented syntax, but they don't force it down your throat. They are called “ multi-paradigmatic” languages, because you can write them in an imperative, object-oriented, or functional style - and you can mix these styles as you like. オブジェクト指向プログラミングのために Java が行った best thing は、おそらくすべての関 数が何らかのクラスに属しているということについてのネガティブな実例を示したことでしょう。 仮にオブジェクト指向の目標 (goal) の一つがアプリケーションを構成するオブジェクトとプロ セスとをコードでモデル化することであるのなら、そういった目標を失っているすべてのアクシ ョンにアクター (actor) の unnatural discussion を強制します。英語ではわたしたちは subject である “you” を省略してしまって“first, do this… then, do that”(最初にこれ をやって、次にあれをやって)のように言うことがよくあります。より新しい Python や Ruby のような言語ではオブジェクト指向構文 (object-oriented syntax) の使用はoption であって、 強制されるものではありません。そういった言語は「マルチパラダイム」言語 (“multi- paradigmatic” languages) と呼ばれました。それは、あなたがそのような言語を使ってプログ ラムを命令的にも、オブジェクト指向的にも、はたまた関数的にも書け、さらにはそれらを好き なように混ぜたスタイルでも書くことができるからです。 So it turns out that the “hybrid” nature of Object Pascal and C++, so criticized by OO purists, was actually a strength. As OOP has caught on, almost all programming languages have added capabilities to support it, including even Perl, PHP, Lisp, COBOL, and a language that I've worked on for many years, Synergy/DE. Because these languages weren't originally OOP languages, they too are “hybrids”. Object Pascal や C++ の「雑種」としての性質 (“hybrid” nature) は、オブジェクト指向純 粋主義者たちから criticized されたことで実際には強みとなっていました。Perl, PHP, Lisp, COBOL、 さらにはわたしが長年にわたった仕事で使ってきた言語であるSynergy/DE さえ含むほと んどすべてのプログラミング言語がオブジェクト指向プログラミングをサポートするための能力を 追加されています。これらの言語は originally なオブジェクト指向言語ではないので、同様に “ハイブリッド”なのです。 So object-orientation finds it natural place in the programmer's vocabulary. It isn't the end-all and be-all that it was originally advertised to be, but it can be quite useful. You need complex nouns in a hierarchy of abstraction to be able to describe things well. But you can't be confined to using only one hierarchy of abstraction, nor to describing all actions in terms of the nouns involved. こうしてオブジェクト指向はプログラマーのボキャブラリの中で自然な位置を見出したのです。 その位置は元々宣伝されていた end-all でも be-all でもありませんが、とても便利なもので ある可能性があります。あるものをきちんと記述できるようにするには、抽象化の階層における 複雑な名詞が必要です。しかしあなたは使用する階層を一つに制限することも与えられた terms of the nouns ですべてのアクションを記述することもできないのです。 #confine 限定する Related Posts: 1. The ascent of scripting languages 2. The Early History of Programming Languages 3. An introduction to functional programming 4. Scripting Languages and the Web
- なんでだよっ!消せよっ!!:アルファルファモザイク - 2ちゃんねるスレッドまとめブログ
- だが、私はCPANを使えない! - taro-nishino の日記
- プログラミング言語「go」は本当に速い? | Happy My Life
まあ、先日リリースされたばかりのgoコンパイラと、長い歴史とさまざまな技術が投入されているコンパイラとを比較して、性能が〜、と即座に判断を下すのも酷な話。- Twitter / ++C++; // 管理人: 岩永: 人の世話見るなら「尋ね安い人オーラ」身につけるの大事 ...
- true tears ブルーレイBOXついに一般ニュースサイトに掲載キタ━━━━━━(゚∀゚)━━━━━━ !!!!!:【2ch】ニュー速VIPブログ(`・ω・´)
- Twitter / ぶれいす・てぃふと: ArrayListを配列と呼んでいて非常に紛らわしい ...→Twitter / ぶれいす・てぃふと: @kyon_twit 最後の「継承や拡張は、オブジェ ...
- Twitter / DenialofSociality: do 書いたら負けかなと思っている。
- Twitter / Masayuki Hatta: 直接の副産物の一つがG++。だから、フリーソフトウェ ...
- マナビット - 学び × IT のコミュニティサイト - — Groups — IPA 「GPLv3 逐条解説書」輪読会
- Google Go で碁…… - daily dayflower
ウォーゲームによると三目並べで核戦争が回避されるらしいのでこれでいいのだ。
世界には勝ちも負けもない場合がある。でしたっけ?- Hexenkessel - 囚人に寛容なノルウェー社会。その社会のあり方には裁判に参加する「参審員」と呼ばれる一般の市民が大きな役...
- Twitter / shelarcy(しぇらーしぃ): 牧野淳一郎さんの「次世代スーパーコンピューター」の「 ...
- 押井守・脚本『宮本武蔵-双剣に馳せる夢-』(75点)~「バガボンド」が嫌いな人にはオススメ - そっと××
BDの初回限定版には特典として、押井守のオリジナル脚本(24ページ)がそのまま同梱される予定。
スカイクロラのあんな感じの限定版だとやだなあと思ったらそれほどでもなかった。- Amazon.co.jp: 宮本武蔵‐双剣に馳せる夢‐ 初回限定版 [Blu-ray]: 西久保瑞穂, 押井守: DVD
価格: ¥ 7,615 OFF: ¥ 2,675 (26%)- 押井守「PG13指定を受けても、市場規模を犠牲にしてもタバコが捨てられなかった」~創作世界の禁煙は難しい~ - そっと××
- Twitter / KAKUTANI Shintaro: ダブルチーズバーガーという単語に異様に反応する息子。 ...
- Twitter / いわた: ちょ RT @repeatedly D言語は自らのバ ...
- D言語 - アンサイクロペディア
- 山手線が痛電車に - (´A`)<咳をしてもゆとり
まだチョコレート色のも見てない。- 次世代スーパーコンピュータに関して、追記 - 脇見運転
- さかなくんさんはガチですごい:アルファルファモザイク - 2ちゃんねるスレッドまとめブログ
- 時間城年代記:Yコンビネータに2変数以上の関数をぶっこむ
- 知的プロフェッショナルの五つの条件 - *ListFreak
- Twitter / tnozaki: 前も書いたけど、*BSDとかnviとか、何十年前もの ...
■_ 挫けた
Twitter / yt: 2chのC++スレやDスレのGoへの反応が特徴がでて ... ということなので、各スレから拾い集めてみようと思ったが面倒くせー ○| ̄|_