ときどきの雑記帖'

最新ページへのリンク
目次ページへのリンク

一つ前へ 2013年3月(上旬)
一つ後へ 2013年3月(下旬)

ホームへ

2013年03月20日

■_

MOLESKINのノート。 今売っている(作っている)ところは、ヘミングウェイだのが使っていたという 宣伝にあるのとは全然関係ないところだとかいろいろ聞きましたが (あんまり裏は取ってない)、それはそれとして、 適当な厚みでハードカバーがついてるってのは良いですね。 バンドがついたものは他のメーカーでもありますが、 表紙の堅さが今ひとつだったり。 一つ割と良い感じのを見かけたのですがメーカー名がわからず。 LOGBOOKって名前のようなんですがぐぐってもひっかかるのは…(ry Made in China とあったんですが、ノート本体に一緒にシュリンクされていた 説明のペラには英語でしか書かれてなかったし。 なんのかんのいって結構気に入ったので、2014年分も買おうかと思ってるんですが 問題は値段か…w マスターヨーダのお言葉も入ってないでしょうし。
Moleskine 2013 12 Month Star Wars Limited Edition Weekly Notebook Planner Black Hard Cover Pocket (Moleskine Star Wars)

StarTrek の To Boldly go … なのが入ってたりしたら喜んで買ってしまう気がする。

■_ Rubyフェア

なぜ高田馬場の?という疑問はあったのですが

「算法表現論」のためにいって参りました

買ったので棚からなくなっちゃいました :)

岩波講座情報科学 12 算法表現論岩波講座情報科学 12 算法表現論

岩波書店 1982-05
売り上げランキング :

Amazonで詳しく見る
by G-Tools

■_ Development Commandments for Collaboration

共同作業のための

Development Commandments for Collaboration — The Wellfire Blog

Development Commandments for Collaboration

Open source project? Team project? Product? Client work? Whichever you're working, have DVCS will travel.

    Thou shalt write good commit messages
    Thou shalt make diffs meaningful
    Thou shalt meaningfully order merged commits
    Thou shalt only branch off of the canonical branch
    Thou shalt run tests before merging a branch
    Thou shalt add tests for new code before merging or issuing a pull request
    Thou shalt not hard code settings, URL schemes, or app-domains
    Thou shalt follow a consistent project coding style

There's nothing ground-breaking about these commadnments, but they're good to reiterate.

以下解説部分は略

    © 2013 Wellfire Interactive

■_

■_

2013年03月19日

■_

今日はこれだけ。

レビュアーの顔ぶれすごいナー (知らない人もいますが)

型システム入門 −プログラミング言語と型の理論−型システム入門 −プログラミング言語と型の理論−
Benjamin C. Pierce 住井 英二郎

オーム社 2013-03-26
売り上げランキング : 3519

Amazonで詳しく見る
by G-Tools

■_

今回初めて東横線→副都心線乗り入れで武蔵小杉から池袋まで移動したんですが便利すぎw 山手線使うと渋谷→新宿あたりはかなり混雑した状態になるんですがそれもなし。 副都心線池袋駅からジュンク堂まではちょーーーっと距離がありますが 乗り換えなしで座っていける(しかも特急(副都心線内は急行)なので、途中停車駅は 自由が丘、中目黒、渋谷、新宿三丁目だけ)ことを考えれば十分おつりが来ますね。

2013年03月18日

■_

東横線

■_

■_ 擬人化

こーゆーのも良いかと。

■_ 重箱の隅

先週の金曜日に新しい回が上がってた。が。 山浦恒央の“くみこみ”な話(52):サンプリングと、残存バグ数予測と、TV視聴率 (1/2) - MONOist(モノイスト) ※注1:この他、「複雑なものは単純にする」「大きいものは分割する」「小さいものは拡大する」 などがあります。ソフトウェア設計の大原則である「大きいものは分割する」は、 イタリアの政治思想家ニッコロ・マキャヴェッリが『君主論』で説いた「分割して統治せよ」に通じるところがあり、興味深いですね。 マキャベリだっけ? Divide and conquer - Wikipedia, the free encyclopediaDivide and rule - Wikipedia, the free encyclopedia

Divide and rule - Wikipedia, the free encyclopedia

In modern times, Traiano Boccalini cites "divide et impera" in La bilancia politica, 1,136
and 2,225 as a common principle in politics. The use of this technique is meant to empower the
sovereign to control subjects, populations, or factions of different interests, who collectively
might be able to oppose his rule. Machiavelli identifies a similar application to military strategy,
advising in Book VI of The Art of War[3] (Dell'arte della guerra),[4] that a Captain should endeavor
with every art to divide the forces of the enemy, either by making him suspicious of his men in whom
he trusted, or by giving him cause that he has to separate his forces, and, because of this, become
weaker.

マキャベリの名前は出てくるけど最初に出てくるって感じでもないし、 「The Art of War」って「君主論」じゃないじゃん… こっちにも見あたらないよねえ Niccolo Machiavelli Quotes - BrainyQuote

そのため、エンドゲームでは「余計なことはするな!」が超基本です。 例えば、「counter01=1, counter01=1」という重複したソースコードがあり、 カッコ悪いので軽い気持ちで片方を削除すると……、機能退行を引き起こす可能性もあります。 開発の終盤で余計なことをするなというのはよしとしても、 なんだってこんなのが終盤まで残るのかということについて小一時間(ry

■_ loser

200以上のコメントがつく盛況。 一つ目のコメントが長いけどしっかり書かれてるかなあ。 前にも同様のことがあったような気もするんだけど思い出せない I'm a loser and I want to change that - now | Hacker News

I don't have too much time left. My 20ies are gone. うーん。

I'm a loser and I want to change that - now | Hacker News

I have been a dreamer all my life. It took me until last year to figure this out, and only thanks to
this community. I hardly ever tried - and when I tried, I didn't persist. It has been my goal to
start a business since ever I can remember. And yet I never really tried (until last year, which
resulted in abysmal failure). Not even something small, like selling stuff online. I was always good
at dreaming up new ideas. But never executed on any one of them.

Likewise, I have been programming on and off since the age of 17. Unfortunately, I started out with
C++. As soon as I hit pointers, I made up my mind that programming was only for people smarter than
me. Somehow, I did get back into it a few years later, but I never really became proficient at it.
Again, I was good at learning the basics, reading code, messing around with code snippets on the
command line. But I never built anything of value.

I don't have too much time left. My 20ies are gone. This is my chance to turn the boat around, and
realize my goals. So, this is meant as much for the rest of the world as it is meant for myself.
Usually, I would have just signed up with yet another anonymous name. Not this time. I want to keep
myself honest. I need to break out of my own little word (unfortunately, besides being a loser, I'm
also a loner).

HN, here I am. My name is Stefan Kueng, I'm 30 years old, based in Switzerland. For better or for
worse. This is my last chance to get my life back on track. If anyone else reads this, wish me good
luck.

[EDIT]
Thanks for your all your responses! I really appreciate it. I admit that my post probably was a bit
too much drama. Actually, I have been wanting to say what I said for a long time. But I restrained
myself, because I didn't want to decrease the signal-to-noise ratio on HN. But this time I felt I
just had to. I'll probably not get to answer to everyone of you tonight. Just once again, a heartfelt
thanks to you guys. HN really is a great community. And yes, I will consider all your advise. But I'm 
definitely going ahead with my plan to start building stuff - and eventually to start a business. I
have long ago made up my mind that I have only one life. I could go the safe route and work a regular
9-to-5 job, perhaps start a family, and lead a long and happy life. Or I could bet everything on
something that's far less likely to succeed. Even if I fail and the resulting stress cuts a few years
off my life span, it will have been worth it. I have been wanting to start my own business for too
long. I just can't let go of it.

■_ 地下道

コメント#2345881 | 「フローベヤ」終了 | スラッシュドット・ジャパン

246の下には横断地下道(4/7付けで閉鎖される)が有りますし、位置関係から推測できる渋谷川の位置は東口バスターミナル前の歩道辺りじゃないかと

あー、アレもなくなるのかあ。 アニメイト渋谷が移転してから使うことがなかったのだけどもう一回くらい行っておこうw

2013年03月17日

■_

ポール・アレン本を読んでいましたらば。

p225に 秘密の作業部屋には、IBMから送られてきたプロトタイプに加え、 秘密の作業部屋には(ママ)ICE (Intel Circuit Emulator)-88 と名付けられた青い箱が置かれていた。 Intel? インサーキット・エミュレータ - Wikipedia "In-Circuit Emulator"は、米インテル社の登録商標である[1]。 おお。知らなかったw ぐぐったら @alohakun のツイートも見つかった。

ポール・アレン本でもうひとつ。 第10章(MS-DOSの開発のあたり)で 「ボーカラトーン」なる地名が出てくるんですがそれってここ? → ボカラトン - Wikipedia ボカラトン(英: Boca Raton、発音:/ˈboʊkə rəˈtoʊn/、ボカレイトンと表示されることもある) 発音記号を見ると、まあ「ボーカラトーン」の方が近いかなあと言う気もしますが フロリダ州ボカラトンでの生活を教えて下さい - 北アメリカ - 教えて!goo ボカラトン - 旅行ガイド 【トリップアドバイザー】 ボーカラトーンで検索してもボカラトンがひっかかるんですが。
ぼくとビル・ゲイツとマイクロソフト アイデア・マンの軌跡と夢
ぼくとビル・ゲイツとマイクロソフト アイデア・マンの軌跡と夢

写真ないかなあと思ったら見つかった>オリジナルブックカバー。 とはいえこれのために何冊も買うというわけにもw 3/9発売予定『よつばと!』12巻をお買い上げの方に紀伊國屋書店オリジナルブックカバーを差し上げます! | 本の「今」がわかる 紀伊國屋書店 JBOOK:よつばと!  12【数量限定特典:オリジナルブックカバー付】:あずま きよひこ 著:書籍 ニュース&トピックス
よつばと! 12 (電撃コミックス)
よつばと! 12 (電撃コミックス)

■_

桐島、Rubyやめるってよ #odrk03 - I am Cruby!

■_

野球と余談とベースボール (マイナビ新書)
野球と余談とベースボール (マイナビ新書)
新書なのでさくっと読めてしまった。 割とオススメ。田口選手も長いことメジャーでやってたけど(複数のチームを渡り歩いて)、 参考にすべきは野茂とかイチローよりはこういった選手の方じゃないのかなあ。 WBC のことや、メジャー行きを望む選手と球団の話、 英語があまりにも通じなくて困った話等々(わたしも「chiken」が聞き取ってもらえず往生した覚えがw) セイバーメトリックスに対する反発についてはまあうなずける部分もありますが どうなんでしょうねえ。

野球選手絡みの新書といえばこっちも読みたい。 伊良部秀輝 (PHP新書)
伊良部秀輝 (PHP新書)

■_

■_ 解読

正規表現が解読できません。 | その他(プログラミング)のQ&A【OKWave】

正規表現が解読できません。
ツールが対象ファイルを認識する規則が正規表現で記載されているのですが、
正規表現について無知なため、解読することができずに困っております。
ネット等で検索し、[A-Z0-9]や{4,4}など部分的には解読することができたのですが・・・

FILE_COPY.REGEX1=<ABC>\t.+\\\\ABC(\\\\.*)?\\\\[A-Z0-9]{4,4}[0-9]{3,3}[A-Z0-9]+\\\\[A-Z0-9]{4,4}[0-9]{3,3}[A-Z0-9]+\\.gz

FILE_COPY.REGEX2=<DEF>\t.*\\\\[^\\\\]*(?<\!\\.tar)

FILE_COPY.REGEX3=<GHI>\t.+\\.xml\\.gz

どなたかお時間のある方がいらっしゃいましたら、ご教示いただけないでしょうか。
どうぞよろしくお願いいたします。
投稿日時 - 2013-03-15 19:20:03

なんで!がエスケープされてんだろう。 あ、でも二重でないからこの謎のツールにとって意味がある記号ということなのかな。 あと{3,3}とか{4,4}とかいう回数指定がちと気になる ({3}のようには書けないだけか)

2013年03月16日

■_

東京では桜が開花したとか。

■_ プロトタイプ

宇宙戦艦ヤマト2199 第116話

774 名無しさん@お腹いっぱい。 [sage] 2013/03/16(土) 01:40:57.51 ID:CyXwEv2A0 Be:
    >>730
    ミッチーといえばコロンビアの大御所
    かつては彼女が本社に来る時には幹部が出迎えたという伝説まであるらしいんだがな……

    それはともかく
    拾った

    788 :おさかなくわえた名無しさん:2013/01/16(水) 22:44:34.97 ID:/ZqnF4zp
    近所の模型屋に飾ってある大和のプラモ(完成品)を眺める外人二人
    A「おぉ、ヤマトだ」
    B「ちがう。ヤマトじゃない。見ろ、ハドーホーの穴が無いぞ」
    A「でもプレートにはヤマトって書いてあるぞ」
    店主「それ波動砲が付く前の大和なんだよ」
    B「そうか、プロトタイプ・ヤマトですね!」
    A「プロトタイプ?そんなのあるんですか?」
    B「ガンダムだってあるじゃないか」
    後で店主と話してみたが、
    こういう海外のお客さんが最近増えてきたとのこと。
    どうも大和は宇宙戦艦から逃れられないらしい。 

■_ patent

The patented IBM multi-pipe: the evolution of Unix pipes | Hacker News [9fans] The PATENTED IBM MULTI-PIPE : the evolution of unix pipes

■_

■_ Julia

0.2 の予定が

0.2 release notes · Issue #2581 · JuliaLang/julia

I am starting this issue for two reasons - to start collecting items for Release Notes for 0.2.
This will be continuously updated as the discussion progresses.

Current date for the 0.2 milestone is April 5.

Release Notes:
1. Immutable types (#13)
2. Functions that were deprecated in 0.1 are removed (include the list)
3. varm, stdm (#2265)
4. getindex, setindex! (#1484, #907)
5. Linear algebra updates (#2212)
6. Updates to the package manager
7. Removal of extras (#2422)

4/5 ですか。

■_

なかなかに刺激的なタイトル Perl: The Language Everybody Wants to Declare Dead : programming Perl: The Language Everybody Wants to Declare Dead ~ Linux Advocates

Perl: The Language Everybody Wants to Declare Dead ~ Linux Advocates

Perl: The Language Everybody Wants to Declare Dead
3/15/2013 11:23:00 AM

by +Dietrich Schmitz

I keep looking, but I still haven't found a language that compares with Perl.  The level to which one
can go with it soars above other languages with ease.  Perl will take you through a project and
provide the deliverables.

(略)

Will Perl eventually die?  Some say it will.  But if you go by a recent study from RedMonks that
measures the spectrum of programming languages in use on GitHub, it is evident that Perl is quite
alive and well.

Copyright © 2012 Linux Advocates | Powered by Blogger

2013年03月15日

■_

有朋自遠方来不亦楽乎

ということで本日分お休みにござりまする。

2013年03月14日

■_

うーむやっぱこういう流れか。 横浜DeNA:布袋さん作曲の新応援歌完成、ホーム開幕戦で披露:ローカルニュース : ニュース : カナロコ -- 神奈川新聞社

■_ 二倍二倍

日本語版にあった訳文は以下の通り(15ページ) 虫取りが、最初にプログラムを書くことと比べて2倍も大変だということは、だれでも知っている。 プログラムを書く段階で精一杯がんばって技巧を凝らしてしまったら、虫取りはどんな風にやったらよいのかわからない。 ということで、検索してたくさん引っかかるアレのでどころはどこなんでしょうねえ。と。 ところでこの訳の 「最初にプログラムを書くこと」というのは 原文の「writing a program in the first place」に対応してると思いますが、 この「in the fitst place」はそう訳してはいけないような気が。 in the first placeの意味 - 英和辞典 Weblio辞書

■_

■_

2013年03月13日

■_

まあその色々と。

■_ カーニハンの梃子

ちょっと前に Kernighan's lever というのを(例によって reddit/Hacker news 経由で知ったのですが)知ったのですが その最初の方にカーニハン大先生の有名なアレを引用していたのですが

Kernighan's lever

Kernighan's lever

Brian Kernighan famously wrote:

     Everyone knows that debugging is twice as hard as writing a program in the first place. So if
     you're as clever as you can be when you write it, how will you ever debug it?

     — The Elements of Programming Style, 2nd edition, chapter 2

The following version also circulates on the net:

     Debugging is twice as hard as writing the code in the first place. Therefore, if you write the
     code as cleverly as possible, you are, by definition, not smart enough to debug it.

This second quote may or may not be by Kernighan — the questionable use of "by definition"
makes me uncertain — but it is useful as a provocative sound bite conveying the same essential idea.

二つめのがちょっと気になった。 This second quote may or may not be by Kernighan だし。 ところが検索してみると、日本語訳されたものは後者の方ばかり引っかかるんですよね (前者もなくはない)。

プログラマーが選ぶプログラミングに関する名言ベスト10 | tommyjp.com

プログラマーが選ぶプログラミングに関する名言ベスト10 | tommyjp.com

1位

そもそも、デバッギングはコーディングよりも2倍難しい。従って、あなたが可能な限り賢くコードを書くとし
たら、定義からして、あなたはそれをデバッグできるほど賢くない。

ブライアン カーニハン

これとかどう見ても後者を訳したものですよね。

んで、後者の「原文」を検索してみると確かにそれなりに見つかります。 favorite - What's your favourite quote about programming? - Programmers

favorite - What's your favourite quote about programming? - Programmers

    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the
    code as cleverly as possible, you are, by definition, not smart enough to debug it.

— Brian W. Kernighan

そして興味深かったのはこれ CakePHP2のsaveメソッドを詳しく順に読んでみた | X->A->O 原文は前者のを引用しているのだけど、後者の訳を採用してる。

CakePHP2のsaveメソッドを詳しく順に読んでみた | X->A->O

教訓

    そもそも、デバッギングはコーディングよりも2倍難しい。従って、あなたが可能な限り賢くコードを書くと
    したら、定義からして、あなたはそれをデバッグできるほど賢くない。

ブライアン カーニハン

    “Everyone knows that debugging is twice as hard as writing a program in the first place. So if
     you're as clever as you can be when you write it, how will you ever debug it?”

Brian Kernighan

ネットでプログラマに座右の銘アンケートを取ったら、たいていぶっちぎりでこれが一位に選ばれるとか。私も
ご多分に漏れず、何よりも肝に銘じておきたいこととしてここに掲載させていただいてます。さてこの名言、訳
文と原文を読み比べると後半が若干違ってるのですがその相違もまた面白い。原文の方の「そんなに頑張りすぎ
ちゃったら、デバッグはどうするの?」っていう温かみのあるニュアンスが、訳文では「あなたはそれほど賢く
ない」とバッサリ。でもこの切れ味こそがこの名言が支持されている要因かもしれなし、そうだとすると、この
教訓が広く知れ渡った陰には、どなたかは存じませんが翻訳者の才能も一役買っているような気がします。

うーむ、書法ではどうなってたっけか。 原著(第二版)では 10ページ目の一番下のパラグラフにありました。 内容は当然 Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? でした。 ここで翻訳版(書法)ではどうなっているのか確かめたいところなのですが 翻訳本が行方不明で確かめられず ○| ̄|_

プログラム書法 第2版 The Elements of Programming Style
The Elements of Programming Style

仮に後者の訳文が載ってたとすると、どうしてその訳にしたのかってのはちょっと気になりますね。 そうではなく前者の訳文が載っていた場合、 なぜその訳ではなく後者のものがポピュラーになったのかというのが気になってきます。 さて真実は?

■_ 壁に耳あり

的な。

このあとももう少しやり取りが続いてますがめげた。

■_

■_

Brian Kernighan's Home Page を見てて知らない本があったのだけど、たけえw AMPL: A Modeling Language for Mathematical Programming

2013年03月12日

■_

東横線渋谷駅。地下鉄への入り口の移動やら新設やらがあっていよいよだなあと。

■_ Dive into ぺちぺ

すばらしい。 配列の参照 - てきとうなメモ

■_ Tcl

なんか妙に盛り上がってンですが、言及してる先の記事2006年とか… Tcl the Misunderstood : programming Tcl the misunderstood

Tcl the misunderstood

Conclusion

I don't claim everybody should like Tcl. What I claim is that Tcl is a powerful language and not a
Toy, and it's possible to create a new Tcl-alike language without most of the limitations of Tcl but
with all of its power. I tried this myself, and the Jim interpreter is the result: the code is there
and working and can run most Tcl programs, but then I had no longer time to work for free to language
development, so the project is now more or less abandoned. Another attempt to develop a Tcl-alike
language, Hecl, is currently in progress, as a scripting language for Java applications, where the
author (David Welton) exploits the fact that the Tcl core implementation is small, and the command
based design simple to use as a glue between the two languages (This is not typical with modern
dynamic languages, but both the ideas apply to Scheme too). I'll be very glad if, after reading this
article, you no longer think of Tcl as a Toy. Thank you. Salvatore. 

■_

2013年03月11日

■_

録画予約 ITmedia News スマート - NHKクローズアップ現代「3Dプリンター革命」あす夜放送

■_ InfoQ

これ、訳すとしてもついてるコメントにも言及しとくべきなんじゃないすかね。 Anime version of Scrum overview diagram available from Scrum Primer website

■_

だいぶ前の Tables » Hummus and Magnets の続き。 けっしてかくたにさんからこの本をいただいて思い出したからではありませぬw 科学の花嫁 (叢書・ウニベルシタス)
科学の花嫁 (叢書・ウニベルシタス)

これにたどり着けるのはさていつか(さらにまだ続くんですけどね) Analytical Programming » Hummus and Magnets

にしても数式のところ辛いなあ。どうにかできないだろうか (最後のArticle はもっと強烈)。

Difference » Hummus and Magnets

Difference
by Christian Plesner Hansen Posted on October 14, 2012	

This is my second post in a series about Babbage's mechanical calculating engines. The first post
was about why it was so important in the early 1800s to be able to produce accurate arithmetic
tables and ended with what I'll be generous and call a cliffhanger: that Babbage's difference
engine was a groundbreaking solution to that problem. In this post I'll explain how the difference
engine works, how to “code” it and how to interpret what you get back.

これはバベジの機械式計算機械に関する二番目の投稿です。初回の投稿では 1800年代初めにおいて正確な数表
を生成できるようにすることがいかに重要であったかについて、そしてバベジの階差機関はその問題に対する
graoundbreaking solution であったことを述べました。今回の投稿では階差機関がどのように動作するか、
どのように“code”するか。そして得られたものをどのように解釈するかについて説明します


Before we get to the engine itself there's a bit of math to explain the basic principles it works
by. To give you a taste of the engine itself before that here is a small JavaScript emulator1 that
performs a simple calculation. It's tiny compared to the real engine but works by the same
principles just on a smaller scale.

エンジンそのものを理解する前に、それが動作する基本原理を説明するためのちょっとした数学的知識に
ついて述べます。engine そのものの雰囲気を感じてもらうために単純な計算を実行する JavaScript による
小さなエミュレーターを用意しました。これは本物の階差機関に比べればとても小規模なものですが、
単に縮小されているだけで同じ原理で動作します。


Try stepping it a few times. The model is actually quite straightforward and the computations you
can use it for are based on some basic mathematical principles. You can treat it as an exercise
before reading the rest if you like: try to work out what it's calculating, how it does it, and how
you can make it calculate other things. Of course you can also just read on an I'll tell you.

何度か試してみてください。このエミュレーターで使っているモデルは actually quite starightforward で、
エミュレーターで可能な計算はいくつかの基本的な数学的原理に基づいています。エミュレーターをこの投稿
の残りを読む前の exercise としても構いません。何を計算しているのか、どのように計算しているのか、
どのようにすればほかの計算をさせられるのか試してみてください。もちろん読むだけでも構いません。



Differences
差分

The difference engine is a very simple device in principle. It's an adding machine, that's all it
is[2]. Part of what makes it such an impressive accomplishment is that it took a difficult problem,
calculating complex functions, and solved it using a simple enough approach that it could be
implemented mechanically using contemporary technology.[3]

階差機関は非常に単純な原理で動作するデバイスです。加算を行う機械である。それですべてです [2]。
それを強烈な印象を与える業績 (impressive accomplishment) にしている原因の一部は、難しい問題を取り上
げて複雑な関数を計算し、当時の技術 (contenmorary technology) を使って mechanically に実装できるくら
い単純なアプローチによってその問題を解決したというものです [3] 。さて、では加算だけを使って複雑な計
算をするにはどのようにすればよいのでしょうか? 大抵の人はその答えがわからないでしょうから、簡単な多項
式から始めてみることにしましょう。



Consider this simple polynomial, the square function:
二乗関数という、単純な多項式を考えてみましょう

  f(x) = x^2

The first few values are
その最初のいくつかの値はこうです

  \begin{tabular}{lcl} f(0) & = & 0 \\ f(1) & = & 1 \\ f(2) & = & 4 \\ f(3) & = & 9 \\ & \vdots & \end{tabular}

The difference engine is based on a technique called divided differences. Divided differences is
similar to differentiation but simpler and it's based on simple arithmetic. It works as follows.
You take the values of your polynomial at a fixed interval, here we'll use the first four values
from before:

階差機関は divided differences (差分商) と呼ばれる技法に基づいています。divided differences は
differentiation (微分) に似ていますがもっと単純で、簡単な演算がベースになっています。手順は固定され
た interval で多項式の値をとっていくというもので、ここでは先の多項式から最初の四つを使ってみましょう:


差分商(divided difference)
Derivative - Wikipedia, the free encyclopedia


  \begin{tabular}{l} 0 \\ \\ 1 \\ \\ 4 \\ \\ 9 \end{tabular}

Then you find the distance between each successive pair of them:

  \begin{tabular}{l|l} 0 \\ & 1 \\ 1 \\ & 3 \\ 4 \\ & 5 \\ 9 \end{tabular}

These are the first differences. Then you find the distance between the first differences the same way:
これが first differences (第1階差数列) です。そしてさらにこの第1階差数列に対して同様のことを行います。

  \begin{tabular}{l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 \\ 4 && 2\\ & 5 \\ 9 \end{tabular}

These are the second differences. And one last time to get the third differences:
これが second differences (第2階差数列) です。最後に third differences (第3階差数列)を求めます。

  \begin{tabular}{l|l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 && 0\\ 4 && 2\\ & 5 \\ 9 \end{tabular}

You can see the similarity to differentiation: it's a polynomial of degree 2 so the first
differences increase linearly just like the first derivative, the second differences are constant
just like the second derivative, and so on. We don't actually need the third differences, they'll
all be 0 anyway, so I'll leave those out below.

ここに微分 (differentiation) と同様のものを見つけることができます。多項式が二次のものなので、
first differnces は first derivative (第1次導関数) のように linearly に増加していきます。
second diffrences (第2階差数列) は second derivative (第2次導関数)と同様に定数となります。
以下も同じ様に続くのですが、third differences からはすべてが 0になるので実際には不要です。


What's neat is that once you have these values you can extend the table using nothing but addition.
You know the difference between the first derivatives is fixed, 2, so you can get the next first
derivative by adding 2 to the previous one. And you know the difference between the function values
is the first differences so you can get the next value just by adding the next first difference to
the previous function value. Okay maybe it's easier to explain with a concrete example:

これが素晴らしいのは、一度これらの値を求めれば加算だけで table を拡張できるということです。最初の二
つの導関数の差が 2で固定されていることがわかっているのですから、直前のものに 2を加えることで next
first derivative を求められます。そして関数の値と値の差が第1階差数列であることがわかっているのです
から、一つ前の関数の値に next first difference を加えてやるだけで next value が得られます。具体的な
例を使って説明したほうがたぶん簡単でしょう。


\begin{tabular}{l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 \\ 4 && 2 \\ & 5 \\ 9 \end{tabular} \quad\to\quad \begin{tabular}{l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 \\ 4 && 2 \\ & 5 & \tiny{+0} \\ 9 && \bf{2} \end{tabular} \quad\to\quad \begin{tabular}{l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 \\ 4 && 2 \\ & 5 \\ 9 & \tiny{+2} & \bf{2} \\ & \bf{7} \\ \end{tabular} \quad\to\quad \begin{tabular}{l|l|l} 0 \\ & 1 \\ 1 && 2\\ & 3 \\ 4 && 2 \\ & 5 \\ 9 && \bf{2} \\ \tiny{+7} & \bf{7} \\ \bf{16} \\ \end{tabular}

Notice that we don't need the full table at this point, we only need that for calculating the
initial values. All we need to generate more values is the last of each of the differences:

ここではtable まるごとではなく、initial vlues を計算するのに必要なだけあれば十分なことに注意してく
ださい。より多くの値を生成するのに必要となるのはそれぞれの階差数列の最後のものだけです。


  \begin{tabular}{l|l|l} \multicolumn{1}{r}{}&&2 \\ & 7 & \tiny{+0}\\ 16 &\tiny{+2}& 2 \\ \tiny{+9} & 9 \\ \bf{25} \\ \end{tabular} \quad\to\quad \begin{tabular}{l|l|l} \multicolumn{1}{r}{}&&2 \\ & 9 & \tiny{+0}\\ 25 &\tiny{+2}& 2 \\ \tiny{+11} & 11 \\ \bf{36} \\ \end{tabular} \quad\to\quad \begin{tabular}{l|l|l} \multicolumn{1}{r}{}&&2 \\ & 11 & \tiny{+0}\\ 36 &\tiny{+2}& 2 \\ \tiny{+13} & 13 \\ \bf{49} \\ \end{tabular} \quad\to\quad\dots


This provably works for any polynomial. To generate a sequence of values for a polynomial of degree
n all you need is n+1 initial values; from the values you calculate the table of differences using
subtraction, and from there on you can calculate as many successive values as you like using just
addition. You don't even need to know the closed form of the polynomial as long as you can evaluate
the initial values at fixed intervals.

このやり方はおそらくどんな多項式に対してもうまくいきます。n次の多項式に対する値の並び(sequence of
values) を生成するのに必要となるのは n+1 個の初期値です。その初期値から引き算を使って差分のテーブル
を計算し、それから好きなだけの長さの successive values を足し算で計算します。多項式の closed form に
ついて知る必要はありません。


This is the basic principle of the difference engine, and what it's named after. The engine has 8
integer registers called columns that can each hold a 31-digit integer value which represent the
current value of the function and the first to the seventh difference. By cranking the handle those
values are added together from right to left. Here is a another mini-emulator, this one calculating
the square function using the differences we just calculated:

これが階差機関の基本原理であり、その名前の由来でもあります。階差機関は8個の整数レジスターを持ってい
ます。それはカラムと呼ばれ、それぞれが31桁の整数値を保持できました。これらは関数の current value と、
第1差分から第7差分 (first to the seventh difference) までとを表わしています。ハンドルを cranking す
ることでレジスター群の値は右から左へ合算されます。これがもうひとつの mini-emulator で、これはわたし
たちが計算した階差数列を使って square function を計算します。


You can see the values are being added together from right to left and the current function value in
the leftmost column is printed for each emulated crank on the handle. Printing was also a part of
the original difference engine. A common source of errors in mathematical tables was typesetting so
to avoid that step the engine would automatically stamp its output in a soft material that could be
used directly for printing, as well as print a log on paper.

右から左へと値が加算されていくことやハンドル上の各 enumlated crank のそれぞれに対して最も左のカラムの
current function が印字されることが見て取れます。印刷もオリジナルの階差機関の一部でした。mathematical
table 中のエラーの一般的な原因は typesetting (活字組み、植字)でしたから、階差機関はそのステップを排除
して出力を紙にログを出力するように直接印字するのにも使える soft material で自動印字しました。


Being able to evaluate an integer polynomial is just the beginning though. First of all, integers
aren't enough, we need to be able to evaluate real-valued functions. Secondly, so far we've only
seen positive values, we also need negatives. Finally, polynomials can be useful in themselves but
we're really more interested in more complex functions like logarithms and trigonometric or
astronomical functions. But with a few tricks the difference engine can handle all those things.

しかしながら整数多項式を評価できるようになったのは出発点に過ぎません。第一に整数だけでは充分ではなく、
real-valued functions を評価できるようにする必要があります。第二に、正の数しか扱っていませんが負の数
も必要です。最後に、多項式は便利なものではあるのですが、現実には対数関数や三角関数、あるいは
astronominal な関数のようなもっとも複雑な関数を必要としています。ただし、ちょっとしたトリックを使う
ことで階差機関はこれらの関数をすべて扱えるようになりました。


Precision
精度

First off: how do we use this to evaluate real-valued functions? You use fixed-point decimal numbers.
For instance, say we want to plot the square function from before but this time in steps of 0.25:

はじめに。real-valued function を評価するにはどのようにすればよいでしょうか? あなたは固定小数点
(fixed-point) の十進数を使っています。たとえば、square function のplotをしたいとしましょう。
ただし time in steps of 0.25 で


  \begin{tabular}{lcl|l|l} f(0) & = & 0 \\ &&& 0.0625 \\ f(0.25) & = & 0.0625 && 0.125 \\ &&& 0.1875 \\ f(0.5) & = & 0.25 \end{tabular}

These are fractional numbers but if you multiply them by 105 we're back to integers
端数がありますが、105を乗じることによって整数に戻します。

  \begin{tabular}{lcl|l|l} 10000 f(0) & = & 0 \\ &&& 625 \\ 10000 f(0.25) & = & 625 && 1250 \\ &&& 1875 \\ 10000 f(0.5) & = & 2500 \\ \end{tabular}

Now we're back to something the engine can calculate:
これで階差機関で計算できるような形に戻りました。

I've added a line between the digits to mark where the decimal point goes. It also gets added to
the output (I don't believe the original engine did this). But the decimal point is purely a
matter of interpretation by the operator, the adding mechanism is not aware of it, it's operating
purely on 6-digit integer values.
小数点がある場所を markするために桁の間にある行の加算を行いました。また、出力のための加算もできま
した (わたしはオリジナルの階差機関がこれをしていたとは信じられません)。しかし小数点は純粋に演算子
によって解釈されるものなので、加算機構では小数かどうかを気にする必要はありません。
純粋に6桁の整数値として処理します。



In this case we were lucky because there was a relatively small factor of 10 we could multiply
onto the values to get integers without losing precision. That's unlikely to be the case in general.
If you can't use this trick you multiply the values with as large a factor of 10 as you have
precision for and just bite the bullet, round the scaled values to the nearest integers and lose
some accuracy. That's not necessarily as bad as it sounds. The original design had 31 digit
precision in base 10 which corresponds to roughly 103 bits, well beyond the already quite large
64-bit integers on most modern machines. So you can afford to scale the values up quite a bit
before rounding. We'll see an example in a bit of how long it takes for errors to accumulate.

このケースでは幸運にも比較的小さな10というfactor であったので、精度を失わずに乗算による値の整数化が
できました。しかしこのような幸運に恵まれないことのほうが一般的です。もし必要な精度にするために値に
factor 10 を乗じるというこの trick を使えない場合には正確さを多少犠牲にして scaled value を nearest
integers へ丸めます。オリジナルのデザインでは十進で31桁の精度を持っていて、これはおおよそ103ビット分
にあたり modern machines の大部分で使われている64ビット整数よりもかなり大きなものです。このため、丸
めの前に十分なビットを scale の値として与えることが可能です。errors to accumlate のためにどのくらい
の長さのビットを使うかにその例を見ることができます。オリジナルの設計では十進数で31桁の精度を持ってい
ましたがこれはおおよそ103ビットに相当し、modern machines の大部分で使われている 64ビット整数よりもか
なり大きなものです。


Negative values
負の値

To represent negative values we use the exact same trick as with binary numbers, just in base 10: tens
complement. A negative number d is represented as 10n - d where n is the number of decimal digits, so
-1 is represented by 999…999 and so forth. The adding mechanism itself has no concept of negative
values, just like with twos complement the correct behavior just falls out of how overflow works. It's
up to the operator or printer to interpret the output correctly as signed or unsigned values.

負の数を表現するのに、二進数の場合とまったく同じトリックを十進数に対して用います。つまり、十の補数を使
います。ある負数は 10^n - d として表現されます。ここで、n は decimal digits の数で、たとえば -1 は
999…999 のようになります。加算機構そのものは負の数という concept はなくて、二の補数の correct behavior
のようにそれは演算子やプリンターが符号つきの値の出力と符号なしの値の出力を正しく解釈することに依存して
います。


Here is an example of a function that starts off positive, peaks, and then descends into the negative numbers.

ここで例示したのは positive から始まり peak があり、それから negative numbers に向かって descends
する関数の例です。


You'll notice that the numbers in the columns are all positive but the ones that represent negative
values are printed as negative. As with the decimal point that's a hack I added in the printer
which makes it print smaller integer values as positive and larger ones as negative. But it's
purely a matter of interpretation, the calculating part of the engine is oblivious.

カラムにある数値はすべて正の数であるのに、負の数は負として印字されていることに気がつくでしょう。小数
点がついているかのようにするために、小さな整数値を正として、大きな整数値を負であるとして出力させる
hack をプリンターに追加しました。しかしこれは純粋に解釈の問題(matter)であり、階差機関の caluclating
part の問題であることは明らかです。


Polynomial approximation
多項式による近似

Okay, now we're getting close to the goal: being able to produce accurate arithmetic 
tables of general functions.

さてゴールが近づいてきました。一般的な関数に対する正確な arithmetic table の生成を可能にしましょう。


In my previous post the main example of how important mathematical tables were was how astronomical
tables were used by mariners to navigate by lunar distance. I don't actually know the math
underlying those astronomical tables so here I'll use an example I do understand: trigonometric
functions. On the right here is a table of trigonometric functions from 1785. It gives 7 digits of
the values of 8 different trignonmetric functions, sin, cos, tan, etc., for each arcminute between
0° and 45°. There's 60 arcminutes to one degree so that's 2700 values for each function, 21,600 
values in total. The author of this table, Charles Hutton, said about this edition in a later one
that it had so many errors that is was basically useless:

前回の post での mathematical tables がいかに重要であるかの main example は、lunar distance による
navigate のために astronomical tables が mariners によってどのように使われているかといったものでし
た。そのような astronomical tables に依存してる数学をわたしは実際には知らないので、ここでは自分が
理解している三角関数を例に使います。右側にあるのは1785年に作られた三角関数のtable です。(sin, cos,
tanなど) 8個の異なる三角関数の 0°から45°での7桁の値が記載されています。1°は60 arcminutes なのでそ
れぞれの関数に(60x45で) 2700個の値があり、その総計は 21,600個になります。このt able の作者 Charles
Hutton はこの edition について後に、エラーがとてもたくさんあったので基本的には役に立たなかったと述
べています。


    Finding, as well from the report of others, as from my own experience, that those editions
    [...] were so very incorrectly printed, the errors being multiplied beyond all tolerable
    bounds, and no dependence to be placed on them for any thing of real practice [...]


For this last part about how to calculate complex functions I'll show how to replicate one column,
sin, of this table.

この引用部の最後の部分、複雑な関数をどのように計算するかについて、table の sin 関数のカラムをどの
ように replicate するかで説明します。


Since we know how to evaluate polynomials the solution that first springs to mind is to approximate
the function we want to calculate using a polynomial. Taylor polynomials were well known at this
time so that's an obvious approach. Taylor's theorem says that for an infinitely differentiable
function f (which sin is),

Taylor の polynominals は当時からよく知られていましたから、
多項式を使った計算で関数を近似するのには妥当なアプローチです。
Taylor の theorem (定理) では無限微分可能な関数 f (sin 関数もそうです)について
以下の等式が成り立つとしています。


  f(x) = \sum_{k=0}^{\infty}\frac{f^{(k)}(a)}{k!}(x-a)^k


where f^{(k)} means f differentiated n times and a is any point on the function. Since the engine
only has 8 columns and we need n+1 columns for a polynomial of degree n we have to limit ourselves to
at most the first 7 terms. And in fact, since I want to demonstrate this with the emulator in a
little bit and 8 columns of 31 digits takes up an enormous amount of space we'll limit ourselves
even more in this example to 4 columns of 13 digits. This means that we'll use only the first 3 terms
of the Taylor polynomial. For sin those are:

ここで f^{(k)} は f を n 回微分したものを表していて、a はその関数における任意の点です。階差機関は
高々 8カラムだけしか保持できないのですが、n次の多項式のためには n+1 個のカラムが必要です。多くても
最初の七項に制限しなければなりません。実際にはわたしたちはこれを little bit なエミュレーターで
demonstrate したいのと、8 columns of 31 digits は非常に大きなスペースを必要とすることから、この例では
4 columns of 13 digits に制限します。これはつまり、Taylor polynomial の最初の三項だけを使うということ
です。sin 関数に対しては次のようになります(すべての偶数項は 0になります)

  \sin(x) \approx x - \frac{x^3}{3!}

(Conveniently all the even degree terms are 0). This approximates sin quite well around 0 so we'll
use that as the basis for generating the table.

この式は 0の近傍でsinをとてもよく近似するので table を生成するための basis として使うことにします。


To calculate the differences we first need to produce n+1 values at fixed intervals. The generated
table should have an entry per arcminute so we'll start at 0′and do steps of 1′:

階差を計算するためにはまず、fixed interval を持った n+1 個の values を生成する必要があります。生成
された table は arcminuite ごとにエントリーを持つとよいので、ここでは0' から始めて1'刻みにします。


	x 	sin(x)
	0′ 	0
	1′ 	2.909 10^-4
	2′ 	5.818 10^-4
	3′ 	8.727 10^-4

Then we need to find the nth differences:
それからn番目の階差数列を見つけ出す必要があります。

	x 	sin(x) 	Δ1 	Δ2 	Δ3
	0′ 	0 	2.909 10^-4 	-2.461 10^-11 	-2.461 10^-11
	1′ 	2.909 10^-4 	2.909 10^-4 	-4.923 10^-11 	
	2′ 	5.818 10^-4 	2.909 10^-4 		
	3′ 	8.727 10^-4 			


All of this is a matter of evaluating a polynomial so that's not super hard to do by hand with as
many decimals as you need, as long as you only need a few of them. From this table we take the
last of each of the differences and that'll be the starting point for the calculation:

all of this が多項式評価の matter なので、必要な分の dicimals だけ手作業で行うことは特別難しいことで
はありません。この table から各数列の最後を取り出し、それを計算のスタート地点とします。


   0.000872664515235
   0.000290888130722
  -0.000000000049228
  -0.000000000024614

At this point we need to decide how much accuracy we want, that is, where we want the fixed decimal
point to be. We have 13 digits which gives us room enough to multiply by 1013 before rounding.
That gives us these integer values:

ここでどのくらいの正確さ (accuracy) を必要としているのか、つまり、どこに小数点を置くのかを決定しな
ければなりません。わたしたちには 13桁分の容量がありますから、丸めを行う前に 10^13 を乗ずるのに十分
な余裕があります。結果として以下のような整数値が得られます。

  8726645152
  2908881307
  -492
  -246

And now we're ready to get tabulating:
さてこれで作表 (tabulating) の準備が整いました。


If you follow along with the original table you can see that it generates exactly the 
same values. The values generated by the engine continue to match the table values 
until 1° 1′, 57 values in, where the table says 0.0177432 and the engine produces 
0.0177433, and after that it continues to produce matching values up until 1° 53′, 
more than 100 values in.

original table を追いかけていくと、まったく同じ値を生成できていることがわかるでしょう。
階差機関によって生成された値は table のそれに  1° 1′まで一致し続けています。
57番目のその値は table では 0.0177432 ですが engineが生成した値は 0.0177433 です。
その後はまた 1° 53′まで一致した値が百個を超えて生成され続けます。



Not bad right? And remember, this is a simplified emulator that can only calculate the third degree
approximation where the original could go up to the seventh, and only with 13 digits of precision
where the original had 31. Not bad right? And remember,

これが単純化されたエミュレーターであることを思い出してください。オリジナルが seventh degree
apprixmation まで可能なのに対してこのエミュレーターは third degree approximation までしか計算できま
せん。また、オリジナルは31桁までの精度があるのにエミュレーターでは13桁までです。


So what's the source of the deviation? There's two: the approximating polynomial and 
the accumulating error of the engine. Let's first look at the polynomials.

ではこの誤差の原因 (source of the deviation) はなんなのでしょうか? それは近似多項式と、階差機関の
計算誤差 (accumulating error) の二つです。まずは多項式の方から見てみましょう。


The first plot on the right is of how quickly the approximating polynomials of 
different degrees deviate from the true sine function. At 1° the approximations are 
still well within 0.01 billionth of the correct value. Like I said, near 0 these 
polynomials approximate sin really well.

右側にあるプロットの最初のものは、異なる次数の近似多項式がどのくらい quickly に sin 関数の真の値から
離れていくのかを示したものです。1°における近似は正しい値との差がまだ 0.01 billonth (一千億分の一)の
中に収まっています。先に述べたように、0の近傍での sin の近似多項式はとても優れているのです。


This suggests that the main source of inaccuracy is the engine itself, the precision we had to
discard when fixing the decimal point, and as you can see in the second graph, it is. The engine
loses precision faster than the polynomial by a large factor. This makes sense because the
inaccuracy accumulates for every step.

このことは不正確さの主原因が階差機関そのものであり、小数点を固定するときに破棄しなければならない精度
が原因であることを示唆しています。このことは二番目のグラフで確認できます。階差機関は large factor を
使った多項式よりも早く精度を失っています。各ステップで不正確な accumulates をしているのでこれには意
味があります。


Luckily in this case the polynomial deviates slowly enough we can use it to calculate new
almost-accurate initial values at fixed intervals, for instance for each degree, and reset the
machine to those. However, eventually the polynomial itself will deviate too much and at that point
we can use the fact that the Taylor polynomial has an a parameter that specifies the point around
which we're approximating. So say the polynomial that approximates around 0° becomes too inaccurate
at 6° we can derive a Taylor polynomial around 6° and use that to continue the calculation. Indeed,
since the polynomial approximates equally well on both sides of the point we might as well
approximate around 9° and use it for all values between 6° and 12°.

このケースでは幸運にも多項式の devuates (逸脱)は、新しい almost-accurate な初期値をたとえば角度ごと
のような fixed intervals で計算するためだとか machine をリセットするための計算のに使うのには十分緩や
かです。しかしながら結局は多項式そのものが逸脱しすぎてしまい、その時点でわたしたちが近似している周辺
のポイントを specify しているパラメーターを Taylor polynominal が持っているという事実を使うことにな
ります。ですからこの 0° 付近で近似する多項式は 6° では不正確になりすぎることがいえます。それでも 6°
付近での Taylor polynomial を derive できますから、計算を継続するにはそれを使います。さらに言うと、
この多項式は the point での both sides で等しく近似するので、9°付近での近似式は6°から12°の間の値すべ
てに対して使えるのです。


Sin is a relatively easy function to approximate in this way, a function such as log is harder but
the same basic principles apply to harder functions. It's a matter of how often you need to reset to
get rid of the accumulating errors and how long the same approximating polynomial remains accurate.

sin 関数は相対的に言えばこの方式での近似が容易な方です。log のような関数はこの方法での近似がもっと難
しいのですが、そういった関数にも同じ basic principles を適用します。重要なのは計算誤差を取り除くため
にどのくらいの頻度でリセットする必要があるのかということと、同じ近似多項式がどのくらいの間正確に計算
し続けるのかということです。


One of the weak points of the engine is that even though it requires less manual work than producing
a table completely manually, there's still a fair amount of manual analysis and computation to be
done. That's not a killer in itself though. Even if it took just as much work to operate, which it
surely wouldn't have, just having a different way to create these tables would have been immensely
valuable since two different approaches are likely to produce different errors and hence can be used
to cross-check each other. But as this illustrates, even if the engine had been built it was
definitely not a matter of just plugging in a few values and then going to lunch, using it involved a
fair amount of work.[4]

解析機関の弱点のひとつが、完全に手作業で数表を作成するよりは少ないもののそれでも手作業を要求する部分が
あって、非常に多くの manual analisys とそれを完了するための計算が存在しているということです。とはいえ
それは致命的なものではありません。たとえ (it surely would't have な) 実行するのに多大な手間を要するもの
であったとしても、table を作成する異なる方法があるということは非常に価値があるのです。なぜなら異なる二
つのやり方は異なるエラーを生成する傾向があるので、お互いをクロスチェックのために使うことができるからで
す。しかし今回 illustrate したようにたとえ解析機関が完成していたとしても、
it was definitely not a matter of just plugging in a few values and then going to lunch, 
using it involved a fair amount of work.[4]



The revolution that didn't happen
起こらなかった革命

Here's a video of the only difference engine ever built which was completed in 2002.
これは2002年に組み立てられた階差機関のビデオです


Babbage tried to build it and ultimately gave up for a number of reasons including family problems,
financial problems, problems working with his engineer, and his gradual change of focus to the
analytical engine. Despite what you often hear the technology did exist to build it; the modern
one was built from his designs and only with technology that would have been available back then.

バベジは解析機関の製作に挑みましたが、最終的にはいくつかの理由で断念しました。家族の問題、財務上の問題、
雇ったエンジニアとの作業の問題、彼自身の解析機関への focus という大きな変化などなど。当時の技術が解析
機関の製作には不十分であったいうことはよく耳にしますが、the modern one は彼の設計と当時可能であった技
術だけを用いて実際に組み立てられているのです。


It also appears that Babbage's interests and those of the English government who paid for the whole
thing were just too far apart. Babbage was interested in the machine itself whereas his sponsors
just wanted accurate tables, whatever way Babbage could produce them. It's a shame really. It seems
from what I've read that the difference engine was a failure not of vision or technology but of
product management. The technology was so promising that if a successful prototype had been built
and he'd delivered the tables the English government wanted it's not unlikely that they would have
continued to fund research in more advanced engines. The ground would have been fertile for
mechanical calculation on a larger scale by the mid 1800s. Obviously that wouldn't have meant a
mechanical iPad in every home by 1900 but it would certainly have been a better outcome than what
happened, that the designs went in the drawer.

このことはまた、バベジの興味と英国政府のそれとの乖離をもつまびらかにしています。バベジは機械そのも
のに興味があったのに対して、スポンサー(英国政府)は正確な数表があればよかったのです。バベジがどのよ
うな方法でそれを作るのかには関係ありませんでした。これは実に恥ずべきことです。わたしが読んだところ
では、階差機関が失敗したのは vision のせいでも技術のせいでもなく、product management のためであった
ように思えます。当時の技術はもし successful prototype が製作されていたならば、バベジは数表をそれを
欲していながらも more advanced な engine の研究に対する出資の継続を渋っていた英国政府に対して
delivered していたであろうことを promising していました。その ground は1800年代半ばまでに large scale
の mechanical calculation には fertile (肥沃な、豊かな)ものとなっていました。1900年までにすべての家
庭に機械仕掛けのiPad (mechanical iPad) があるという事態は起こらなかったでしょうが、(the designs went
to in the drawer な) 実際に起きたことよりももっと良い outcome があったのは確実でしょう。


Ultimately Babbage moved on to the analytical engine, the first ever programmable computer. My next
post will be about that and in particular the first ever software programs which were written for it.

最終的にはバベジは史上最初のプログラム可能なコンピューター、解析機関へと移行しました。次回はその解析
機関と解析機関のために書かれた最初のソフトウェアプログラムについて触れます。


Sources

For more information about the difference engine a quick introduction is given in the first part of
Menabrea's Sketch of the Analytical Engine from 1842. A more detailed description, including of the
underlying mechanics of the engine, can be found in Lardner's Babbage's Calculating Engine from the
July 1834 edition of the Edinburgh Review.


Notes

1: While the emulator performs the same type of calculations as the difference engine it actually
looks nothing like it. I made a point to give the emulator a mechanical feel but it's inspired
more by the Curta calculator, the mechanical calculator I know best, not the difference engine.
Note also that I have only tested it on the browsers I have easy access to, Chrome, Firefox,
Opera, and Safari on mac. If it doesn't work on your platform the code lives on github and
patches are welcome.

2: Ada Lovelace in her famous notes about it is almost contemptuous of how simple it is compared
to the analytical engine:

    The Difference Engine can in reality [...] do nothing but add; and any other process [...] can
    be performed by it only just to the extent in which it is possibly, by judicious mathematical
    arrangement and artifices, to reduce them to a series of additions.


3: Incidentally, much of the underlying math was developed before Babbage by J. H. Müller.

4: I wonder if it's possible to automate some of the manual work involved in operating the engine
using the engine itself, like calculating initial values.


Divided differences - Wikipedia, the free encyclopedia
差分商(divided difference)
差分法 - Wikipedia
2 テイラー展開から三角関数の諸公式

■_

■_


一つ前へ 2013年3月(上旬)
一つ後へ 2013年3月(下旬)

ホームへ


リンクはご自由にどうぞ

メールの宛先はこちらkbk AT kt DOT rim DOT or DOT jp