K ときどきの雑記帖 2012 2012年10月(中旬)

ときどきの雑記帖 2012

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

一つ前へ 2012年10月(上旬)
一つ後へ 2012年10月(下旬)

ホームへ

2012年10月20日

■_

買いに行こうかと思ったところにこういう知らせが Google Nexus 7 の32GB版は10月29日解禁で入荷中、16GB版と同額 - Engadget Japanese

■_

小宮秀一の開発日記: 昨日の2つの課題について

次に「いつの間にか単純な選択(|)の処理速度が PCRE の80%に落ちてしまっていました。
コレを何とか改善したいですね」について。

コレはアルゴリズムではなく、もっとカンタンに解決できました。

やっとことは次の通り。

  if (Ch >= 'a') and (Ch <= 'z') then

この種の条件文を次のように書き換えました。

  if (Ch < 'a') or (Ch > 'z') then

すると、PCRE と同じ速度になりました。

と言う訳でコレは解決です。

さすがにこれだけでバージョンアップは何なので、修正はしばらくお待ちを。

条件判定の書き換えのところちょっと気になる。 Pascal って短絡評価はしないと思うんだけど、Delphi は違うんだっけ? (コンパイルスイッチになってたような気もする)

■_

■_ めも

boxing。

Object type (object-oriented programming) - Wikipedia, the free encyclopedia

Boxing

Boxing, otherwise known as wrapping, is the process of placing a primitive type within an object
so that the primitive can be used as a reference object. For example, lists may have certain
methods which arrays might not, but the list might also require that all of its members be
dynamic objects. In this case, the added functionality of the list might be unavailable to a
simple array of numbers. For a more concrete example, in Java, a LinkedList can change its size,
but an array must have a fixed size. One might desire to have a LinkedList of ints, but the
LinkedList class only lists references to dynamic objects — it cannot list primitive types, which
are value types.

known as wappingうん。そうだよねえ。 やっぱりボックス化は良くない訳語と思うのよ(蒸し返す)。

■_ How to be an Excellent Programmer for Many Years

What did the *really* successful programmers do differently? [HN thread] : programming Ask HN: What did the really successful programmers do differently? | Hacker News から。

Ask HN: What did the really successful programmers do differently? | Hacker News

How to be an Excellent Programmer for Many Years

(Excellent==Successful. Money & fame are more difficult to control.)

1. Choose a small subset of available technology, learn it intimately, and embrace it. Then
   evolve that subset.
   利用可能なテクノロジーの小さなサブセットを選び、それを徹底的に学び、受け入れる (embrace)。
   そうしておいてから、そのサブセットを evolve (発展、展開) させる。

2. Understand the pros and cons of various data structures, both in memory and on disk.
   さまざまなデータ構造の、メモリ上における pros and cons (良い点と悪い点、利点と弱点) と
   ディスク上におけるそれを理解する

3. Understand the pros and cons of various algorithms.
   さまざまなアルゴリズムの pros and cons を理解する

4. Understand your domain. Get away from your computer and do what your users do.
   自分の domain (領分?) を理解する。
   自分のコンピューターから離れて、自分のユーザーがやっていることをする

5. Be ready, willing, & able to deep dive multiple levels at any time. You must know what's
   going on under the hood. There is a strong correlation between "number of levels of
   deepness understood" and "programming prowess".

6. Use your imagination. Always be asking, "Is there a better way?" Think outside the
   quadralateral. The best solution may be one that's never been taken.

7. Good programmer: I optimize code.
   Better programmer: I structure data.
   Best programmer: What's the difference?

8. Structure your data properly. Any shortcomings there will cause endless technincal debt in your code.
   データを適切に組み立てる。
   データ構造の欠点はコードに存在する際限のない technical debt (技術的負債) の原因となる。

9. Name things properly. Use "Verb-Adjective-Noun" for routines and functions.
   Variables should be long enough, short enough, and meaningful. If another programmer cannot
   understand your code, you haven't made it clear enough. In most cases, coding for the next
   programmer is more important than coding for the environment.
   名前を適切につける。ルーチンや関数には "Verb-Adjective-Noun"
   (動詞-形容詞-名詞) を使う。変数名には短すぎず、長すぎず、意味のある名前をつける。
   他のプログラマーがあなたのコードを理解できないのなら、あなたのコードには明確さが
   不足している。ほとんどの場合、次のプログラマーのためのコーディングは
   現在の環境のためのコーディングよりも重要である。

10. Decouple analysis from programming. They are not the same thing, require different personal
    resources, and should be done at different times and places. If you do both at the same time,
    you do neither well. (I like to conduct analysis without technology at the end of the day
    and start the next morning programming.)
    分析とプログラミングをわける。これらは違うものであり、異なる personal resouces を
    必要とし、違う時違う場所で行うべきものである。
    もしあなたがこれらを同時に行っているのなら、あなたはそのどちらもきちんと行えていないだろう。

11. Never use early exits. Never deploy the same code twice. Never name a variable a subset of
    another variable. You may not understand these rules and you may even want to debate them.
    But once you start doing them, it will force you to properly structure your code. These
    things are all crutches whose use causes junior programmers to remain junior.
    early exit を使わない。同じコードを二度 deploy しない。
    他の変数の名前のサブセットになっている変数名を使わない。

12. Learn how to benchmark. Amazing what else you'll learn.

13. Learn the difference between a detail (doesn't really make that much difference) and an
    issue (can end the world). Focus only on issues.

14. Engage your user/customer/managers. Help them identify their "what". Their
    "how" is not nearly as important.

15. Write a framework, whether you ever plan to use it or not. You'll learn things you'll never
    learn any other way.

16. Teach others what you know, either in person or in writing. You'll accidently end up teaching
    yourself, too.

17. Always tell your customer/user "yes", even if you're not sure. 90% of the time,
    you'll find a way to do it. 10% of the time, you'll go back and apologize. Small price to
    pay for major personal growth.

18. Find someone else's code that does amazing things but is unintelligible. Refactor it. Then
    throw it away and promise yourself to never make the same mistakes they made. (You'll find plenty.)
    unintelligible やり方でびっくりするようなことをしている誰かのコードを見つけたら
    それをリファクタリングする。そうしておいてそのコードを放棄し、
    自分はこんな間違いは決してしないと自分に誓う

19. Data always > theory or opinions. Learn the data by building stuff.

20. At some point, run your own business (service or product). You will learn things about
    programming that you'll never learn as an employee.

21. If you don't love your job, find another one.

early exit するなで盛り上がってるなあ。

2012年10月19日

■_

買った。読んだ。 特に後者で言及されていることについては色々自分も思うところがあるのだけど 今は書く余裕もないので略。といっても、政治やらの話ではなくて それをたとえばOSSに関する活動などに敷衍しての話なのだけど。 IDの秘密 (丸善ライブラリー―情報研シリーズ)
IDの秘密 (丸善ライブラリー―情報研シリーズ) ヒーローを待っていても世界は変わらない
ヒーローを待っていても世界は変わらない

■_ quote

例の、ケインズが言ったとかいうお言葉なんですが (漠然と正しく - 坂の上の雲をめざして Twitter / techniao: 「正確に誤るよりも漠然と正しくありたい」(ケインズ) ...)、 色んな人物の「名言」を集めたサイトが複数あるので どこかにあるんじゃないだろうかと思って検索してみたのですが見つからず。 keynes quote - Google 検索

サイトの一つで取りあげられていたわりと近かったものがこれなんですが、misattributed とは?

John Maynard Keynes - Wikiquote

Misattributed

    It is better to be roughly right than precisely wrong.
        Not attributed to Keynes until after his death. The original quote comes from Carveth Read and is:
        It is better to be vaguely right than exactly wrong.
            Logic, deductive and inductive (1898), p. 351 [1]

misattributed はおいといても、 It is better to be ~ と I'd rather be ~ じゃあニュアンスもだいぶ違うんじゃないか という気がします(実際のところどうなのかはわかりません)。

でそれが出てくるのがこの辺りらしく。

The Project Gutenberg eBook of Logic, by Carveth Read, M.A.

The terms of ordinary language fall into the same classes as those of science: they stand for
things, classes of things, parts, or qualities, or activities of things; but they are far less
precise in their signification. As long as popular thought is vague its language must be vague;
nor is it desirable too strictly to correct the language whilst the thought is incorrigible.
Much of the effect of poetry and eloquence depends upon the elasticity and indirect
suggestiveness of common terms. Even in reasoning upon some subjects, it is a mistake to aim at
an unattainable precision. It is better to be vaguely right than exactly wrong. In the criticism
of manners, of fine art, or of literature, in politics, religion and moral philosophy, what we
are anxious to say is often far from clear to ourselves; and it is better to indicate our meaning 
approximately, or as we feel about it, than to convey a false meaning, or to lose the warmth and
colour that are the life of such reflections. It is hard to decide whether more harm has been
done by sophists who take a base advantage of the vagueness of common terms, or by honest
paralogists (if I may use the word) who begin by deceiving themselves with a plausible
definiteness of expression, and go on to propagate their delusions amongst followers eager for
systematic insight but ignorant of the limits of its possibility.

……よくわからん ○| ̄|_

Twitter / MakotoNonaka: @MasaoApril @dan_rachi "I'd ... こっちのリンク辿った先のblog にはケインズの言葉として書かれてますね。 他にも、経済学関連の名言だとか I'd rather be vaguely right than precisely wrong. で探すと引っかかりました。 Economics Quotes には

Economics Quotes

I'd rather be vaguely right than precisely wrong.

        — J.M.Keynes; Found in Forbes magazine 01/25/1999 issue. In the Numbers Game column by Bernard Cohen 

……本当に本人が言ってたんでしょか? Not attributed to Keynes until after his death. ということは、引用して言った言葉が本人の言葉として広がっていった。ということなんですかねえ。 わからん。

というか本人が言ったか言ってないかはどうでもよくて、 どういう文脈で言われた言葉を知りたかったんですよね。 というのもそれがわからないとどういう訳になるのが良いのかがわからん気がするのです。 「正確(精密)に誤る」ってどゆことよーっ。と。

最近ではグリーンスパンがこの言葉を引用して使ったらしく、そっちでも色々見つかりました。 http://www.ncsu.edu/PER/Articles/DeardorffDissertation.pdf には Federal Reserve Board Chairman, Alan Greenspan, summed up the nature of uncertainty in economic forecasting by quoting the British economist John Maynard Keynes, who said, "It is better to be roughly right, than precisely wrong" (NPR 1997). This quote (by a man whose words are heavily weighted) suggests that uncertainty in an estimate is acceptable, as long as all known systematic errors have been eliminated so that the estimate is (hopefully) centered on the target value (see Figure 4-1). This statement also summarizes the expert perspective on measurement uncertainty - reasonably accurate results are more beneficial than precise results that have no validity. とくだりがあって、文中で言及されている Figrue 4-1 を見てみると… ふむ。 要するにそういうことなんだろうか? > precisely wrong

FRB: Testimony, Greenspan -- Bias in the consumer price index -- March 4, 1997

しかしなにやってんすかね、ワタクシ。

■_

■_ 高速化

小宮秀一の開発日記: SkRegExp version 1.5.0 公開

小宮秀一の開発日記: SkRegExp version 1.5.0 公開

それと、いつの間にか単純な選択(|)の処理速度が PCRE の80%に落ちてしまっていました。

コレを何とか改善したいですね。

理由はわかっています。PCRE は 複数以上の文字列に対応した QuickSearch のようなモノを使っているからです。

ただ、何というアルゴリズムかわかりません。

複数以上の文字列を高速に検索できるアルゴリズムをご存じの方は教えてください。

複数文字列の検索の高速化というと、Aho-Corasick あたりだよねえ と思ったもののすでに使っていたらしく。

小宮秀一の開発日記 Aho-Corasick 法にこだわってきましたが、テーブルを使った方がはるかに速くなりました。

んで、ちと検索して引っかかったのを見ていて ああ、なんか見覚えがあるなあというのを発見 > Wu-Manber [pcre-dev] [Bug 1027] New: Faster keyword matching http://ocw.hokudai.ac.jp/Course/GraduateSchool/InformationScience/InformationKnowledgeNetwork/2005/page/materials/InformationKnowledgeNetwork-2005-Note-03.pdf Search::WuManber - search.cpan.org ただ、一番要のドキュメントが見られなくなっているっぽいんですがあああ ○| ̄|_ Sun Wu and Udi Manber (1994) A fast algorithm for multi-pattern searching. Technical Report TR-94-17, University of Arizona. http://webglimpse.net/pubs/TR94-17.pdf

10/20 追記: 翌日に動きがあった模様 小宮秀一の開発日記: 昨日の2つの課題について

■_

ほー、こんな本が。 ところでどういった経緯で彼を監督に選んだんでしょうか>ファイターズ Amazon.co.jp: 覚悟 理論派新人監督は、なぜ理論を捨てたのか: 栗山英樹: 本

2012年10月18日

■_

新しい靴を買ったんですが、サイズが微妙に合わず靴擦れがががが。

■_

今日の朝にこれがリツイートでまわってきたんですが、 なんか話がごっちゃになっているような。

「1991年に再現」ということなら階差機関 (Difference engine) のことですが、 これを「プログラム可能な計算機」と読んで良いのかどうか。 もちろんさまざまな計算ができたのは確かですが。 とりあえずうぃきぺ。 階差機関 - Wikipedia

階差機関 - Wikipedia
階差機関(かいさきかん、difference engine)または差分機関(さぶんきかん)は、歴史上の機械式用途
固定計算機で、多項式の数表を作成するよう設計された。対数も三角関数も多項式で近似できるため、その
ようなマシンはかなりの汎用性があった。
(略)
バベッジの本来の計画に基づいて、ロンドンのサイエンス・ミュージアムは実動する階差機関二号機を1989
年から1991年にかけて製作した。バベッジ生誕200周年の記念事業の一環である。2000年には、バベッジが
設計した数表出力用プリンターも完成している。もともとの設計図を製造に適した図面に書き写す段階でバ
ベッジの設計にいくつかの細かいミスが見つかったため、それらは訂正する必要があった。完成した階差機
関とプリンターはどちらも問題なく動作した。階差機関とプリンターは19世紀の技術水準の信頼性や精度に
合わせて製作され、バベッジの設計したものは動くのかという長年の議論に終止符を打った。バベッジの階
差機関の開発が失敗した理由としては、当時の工作技術力が不足しているという説もあった。しかし、シュ
ウツ親子による階差機関が完成していることもあり、工作技術力というよりは、実際の開発作業を行なった
技術者クレメントとの間での確執、すなわち必要とする費用の問題であったという説もある。今日の視点か
らは、バベッジが当時要求した精度が過剰なものであったという指摘もあるが、そもそも公差という概念が
できる前の時代であることを考えると、工作精度といったことより、このような複雑な機械の製作を管理す
る工学的手法がまだ無かったと言える。

んで、「プログラム可能」云々はこっちを言うときに使うものじゃないかと。 解析機関 - Wikipedia

解析機関 - Wikipedia

チャールズ・バベッジが最初に開発しようとした機械式計算機は階差機関だが、これは多項式の
計算によって対数や三角関数の数表を作ることに特化した計算機械であった。このプロジェクト
はバベッジの性格的な問題や政治的な理由で失敗したが、彼はさらに汎用性のある設計が可能で
あると思いついた。バベッジはそれを解析機関(Analytical Engine)と呼び、設計を開始した。
(略)

現在のアセンブリ言語に近いプログラミング言語が採用されている。ループと条件分岐が可能で
あり、チューリング完全を達成した言語と言えるだろう。パンチカードには3種類あって、演算
用、定数用、ロード/ストア用に分類される。ロード/ストア用というのは演算装置と格納領域の
間で数値のやりとりを行う指示をするパンチカードである。これら3種類のパンチカードについ
て独立した3つの読取装置が対応している。

1842年、イタリア人数学者ルイジ・メナブレアはバベッジがイタリアを訪れた際にバベッジと会
い、フランス語で解析機関に関する記録を残し出版した。1843年、エイダ・キング、ラブレス伯
爵夫人はこれを翻訳し、本文以上の訳注を記述している。彼女はその十年ほど前から解析機関に
興味を持っていた。その訳注の解釈によっては、彼女を世界初のプログラマとする者もおり、ベ
ルヌーイ数を計算する方法が示されているという。プログラミング言語Adaは彼女にちなんで名
づけられている。
2010年10月、イギリスのプログラマージョン・グラハム=カミングが、完全な解析機関を製作す
るために寄付を募るキャンペーンを開始した[6]。そして2011年、グラハム=カミングらは解析
機関を製作するプロジェクト "Paln 28" を立ち上げた。バベッジは設計を改良し続
け、完了させていなかったため、まずクラウドソーシングによってベースとなる設計を確定させ
るプロジェクトを開始した[7]。675バイト相当のメモリを持ち、7Hzのクロック周波数相当で動
作する予定である。バベッジの没後150周年となる2021年までに完成させることを目標としてい
る[8]。

「difference engine」といえば、「大昔」に 「それまでの機械とは全く異なるものであったことから」 「difference」とつけられたのだとかなんとか解説記事を書いた雑誌があってですね (正確に覚えてはいませんが概ねこんな感じだったはず)、 今でもその雑誌は刊行され続けています。 名前は変わりましたが。

■_

■_

「ソフトウェア品質工学の尺度とモデル」から

ソフトウェアプロジェクトが、Rayleigh の密度曲線で示されたライフサイクルパターンを とることは経験的に確立されている (Norden, 1963; Putnam, 1978)。 ソフトウェアに対するこのモデルの応用は、主としてソフトウェアプロジェクトの ライフサイクルにわたる人員の見積もりであった。 最近の研究は、ソフトウェアプロジェクトの欠陥除去パターンにも Rayleigh のパターンがあてはまることを立証している。(p150)

自信のデータに適応した Rayleigh モデルを開発することによって、 Gaffney は運用時の予想残存欠陥を見積もることができた。 Putnam は、ソフトウェア規模とリソースの見積もりに関する彼の著名な研究 (Putnam と Myers, 1992) に加えて、ソフトウェアの欠陥数の見積もりに Rayleigh モデルを応用する研究をしている。 欠陥データを用いてモデルを検証することにより、Putnam と Myers (1992) は 実際の総欠陥数はモデルによって予測された欠陥数の5%~10%以内であることを発見した。 しかし、データの確実性が疑わしいシステムについては、データはあまりうまく適合しなかった。(p150)

ふうむ。>立証されている

10/19 追記 実際の総欠陥数は~5%~10%以内 というのは、誤差が5%~10%という話らしい。

2012年10月17日

■_

2199

観てきました。 なぜか横浜(桜木町駅のすぐそばだけど)で。 今回は旧作にはなかった (膨らませた。のが近いかも) あれやらこれやらが盛りだくさん。 確かにまあ良かったと思うのだけど どこかで見たような○○などと感じてしまうのは スレちゃってんでしょうねえ… ところであの人のあの台詞が気になったんですが

ふうむ。 Google Nexus 7 の32GB版を Staples が掲載。16GB版と同等価格 - Engadget Japanese Twitter / clworld: Nexus7 32GB版が16GB版と同価格帯という ...

■_

アレとアレとアレ。 MATLAB, R, and Julia: Languages for data analysis - Strata

MATLAB, R, and Julia: Languages for data analysis - Strata

Big data frameworks like Hadoop have received a lot of attention recently, and with good reason:
when you have terabytes of data to work with — and these days, who doesn't? — it's amazing to
have affordable, reliable and ubiquitous tools that allow you to spread a computation over tens
or hundreds of CPUs on commodity hardware. The dirty truth is, though, that many analysts and
scientists spend as much time or more working with mere megabytes or gigabytes of data: a small
sample pulled from a larger set, or the aggregated results of a Hadoop job, or just a dataset
that isn't all that big (like, say, all of Wikipedia, which can be squeezed into a few gigs
without too much trouble).

At this scale, you don't need a fancy distributed framework. You can just load the data into
memory and explore it interactively in your favorite scripting language. Or, maybe, a different
scripting language: data analysis is one of the few domains where special-purpose languages are
very commonly used. Although in many respects these are similar to other dynamic languages like
Ruby or Javascript, these languages have syntax and built-in data structures that make common
data analysis tasks both faster and more concise. This article will briefly cover some of these
core features for two languages that have been popular for decades — MATLAB and R — and another,
Julia, that was just announced this year.

MATLAB

MATLAB is one of the oldest programming languages designed specifically for data analysis, and
it is still extremely popular today. MATLAB was conceived in the late '70s as a simple scripting
language wrapped around the FORTRAN libraries LINPACK and EISPACK, which at the time were the
best way to efficiently work with large matrices of data — as they arguably still are, through
their successor LAPACK. These libraries, and thus MATLAB, were solely concerned with one data
type: the matrix, a two-dimensional array of numbers.

(略)
R

The other widely used open source language for data analysis is R, a modern version of the S
language for statistical computing that originally came out of the Bell Labs around the same time
MATLAB was being developed.

Although R has access to a similar set of matrix math routines as MATLAB — via the LAPACK library
— it avoids any specialized syntax for numeric matrices. Where R shines, instead, is in datasets
that are richer or messier than the pure numerics of MATLAB. R introduces the “data frame” as
a core data structure, which is like a matrix with two key differences: first, its columns and
rows can have names; second, each column can hold a different data type. Like MATLAB matrices,
you can operate on them as a whole.

(略)
Julia

Julia is a modern language for scientific computing, designed to address some of these concerns.
Superficially, Julia strongly resembles MATLAB. For example, here's how the MATLAB documentation
says you should compute the density of a matrix — that is, what proportion of its values are non-zero:

(略)
… and Python

Reading this, you might get the impression that data analysis is all about numerics and filtering,
and maybe plotting. Of course, that's not true in the real world: data is messy, and in many cases,
the majority of the work in a data analysis project is retrieving the data, parsing it, munging it,
and so on. In this area, it's unfortunately hard to dispute that general-purpose scripting
languages like Perl, Ruby, and Python, have much better language and library support in this area
than any of the data-specific languages. For that reason, despite the obvious advantages of MATLAB,
R, and Julia, it's also always worth considering what a general-purpose language can bring to the table.

The leading contender here is almost certainly Python. The NumPy library provides a solid
MATLAB-like matrix data structure, with efficient matrix and vector operations. That's not unusual,
however. For example, NArray provides a similar facility for Ruby; Java and the various JVM
languages can use Colt, and so on. What makes Python stand out are two more libraries that have
been built on top of NumPy:

    SciPy includes a very large collection of numerical, statistical, and optimization algorithms.

    Wes McKinney's Pandas provides R-style Data Frame objects (using NumPy arrays underneath to
    ensure fast computation), along with a wealth of tools for manipulating them.

At the same time, Python has a huge number of well-known libraries for the messier parts of
analysis. For example, Beautiful Soup is best-of-breed for quickly scraping and parsing
real-world HTML. Together with Python's strong community and innovative environments like iPython
and Reinteract, these libraries make Python a compelling alternative: not as tuned to numerics as
MATLAB, or to stats as R, or as fast or elegant as Julia, but a useful (and popular) tool for data
analysis all the same.
  
O'Reilly

© 2012, O'Reilly Media, Inc.

■_ 検定

こういうのがあったのかあ。

■_

県立地球防衛軍のサントラCD 欲しい (とくに「正月仮面」の歌が)んだけど、 たまーにヤフオクに出てきてもけっこう高くなるのよねえ。 これだし。 Amazon.co.jp: 県立地球防衛軍: 音楽

【祝・栄光の】横山信義総合スレ26【タコ八艦隊】

271 名無し三等兵 [sage] 2012/10/16(火) 08:18:34.09 ID:??? Be:
    ノビーもそろそろタイムスリップネタとかどうだろう 

272 名無し三等兵 [sage] 2012/10/16(火) 10:28:38.16 ID:??? Be:
    とりあえずタコネタをきちんと終わらせてからだね。 

273 名無し三等兵 [sage] 2012/10/16(火) 11:58:33.59 ID:??? Be:
    タコネタが2199まで続くか、それが問題だw 

274 名無し三等兵 [sage] 2012/10/16(火) 14:23:35.87 ID:??? Be:

    >>272
    イキナリ火星人が消えて、時間が戻って1941年の真珠湾攻撃になるような事はやめてほしいな。

275 名無し三等兵 [sage] 2012/10/16(火) 16:15:18.58 ID:??? Be:
    >>272
    天麩羅蕎麦じゃなくて、寿司屋の息子が「タコの握りが自慢であります」って
    言う場面を想像したw 

276 名無し三等兵 [sage] 2012/10/16(火) 19:58:37.22 ID:??? Be:
    タコ天の天麩羅そばが最強。 

277 名無し三等兵 [] 2012/10/16(火) 21:07:13.59 ID:w19QQ0WP Be:
    侵略タコ娘と言うネタしか思い浮かばない自分に絶望した。

278 名無し三等兵 [sage] 2012/10/16(火) 22:25:18.90 ID:??? Be:
    キモイから生きしないで。 

279 名無し三等兵 [sage] 2012/10/16(火) 22:41:52.10 ID:??? Be:
    タコ娘はもう原作の方に出て来てなかったっけ? 

280 名無し三等兵 [sage] 2012/10/16(火) 23:52:41.06 ID:??? Be:
    そんなオナホがあったな。 

281 名無し三等兵 [sage] 2012/10/17(水) 06:15:34.46 ID:??? Be:
    実はUCは既に地球人類の中に入り込んでいるのです 

282 名無し三等兵 [sage] 2012/10/17(水) 11:06:28.44 ID:??? Be:
    火星人を撃退したら次は地底人、その次は海底人との戦いだな 

283 名無し三等兵 [sage] 2012/10/17(水) 11:55:46.54 ID:??? Be:
    地底人の次の最低人は無視ですかそうですか 

284 名無し三等兵 [sage] 2012/10/17(水) 12:04:24.82 ID:??? Be:
    タコツボと言えばバンカー 

285 名無し三等兵 [sage] 2012/10/17(水) 12:07:32.15 ID:??? Be:
    >>282
    そして南蛮帝国、更に某県の材木屋ですかw 

286 名無し三等兵 [sage] 2012/10/17(水) 13:16:00.52 ID:??? Be:
    >>285
    アナボリックアカデミーを忘れてるぞw 

287 名無し三等兵 [sage] 2012/10/17(水) 13:50:36.85 ID:??? Be:
    年齢がわかるスレ 

288 名無し三等兵 [] 2012/10/17(水) 15:24:09.37 ID:y5OK499K Be:
    某県の材木屋地下に閉じ込められている正月仮面と戦うのかw 

289 名無し三等兵 [sage] 2012/10/17(水) 15:35:34.02 ID:??? Be:
    そしてドリーム仮面の登場ですよw




    さて何人解るかな? 

290 名無し三等兵 [] 2012/10/17(水) 16:33:42.98 ID:y5OK499K Be:
    マッスル日本が出てくるの? 

291 名無し三等兵 [sage] 2012/10/17(水) 16:34:47.31 ID:??? Be:
    華味三珍復刻希望 

292 名無し三等兵 [sage] 2012/10/17(水) 18:07:02.51 ID:??? Be:
    陸軍中野予備校 

293 名無し三等兵 [sage] 2012/10/17(水) 18:08:29.28 ID:??? Be:
    タイガー&ドラゴン 

294 名無し三等兵 [sage] 2012/10/17(水) 18:09:11.06 ID:??? Be:
    しいたけヨーグルト 

295 名無し三等兵 [sage] 2012/10/17(水) 18:11:24.28 ID:??? Be:
    県立地球防衛軍 

296 名無し三等兵 [sage] 2012/10/17(水) 19:02:07.07 ID:??? Be:
    戦場ロマンシリーズ 

297 名無し三等兵 [sage] 2012/10/17(水) 20:29:18.67 ID:??? Be:
    定吉セブンが読みたいのうw 


■_

Happy Ada Lovelace Day! — Free Software Foundation — working together for free software

■_

■_

memo

【大砲とスタンプ】 速水螺旋人 3 【靴ずれ戦線】

909 名無しんぼ@お腹いっぱい [sage] 2012/10/17(水) 15:39:26.72 ID:go8X8Boc0 Be:
    Хаями Расэндзин@東京練馬
    もう情報が出ているようで、はい、「大砲とスタンプ」2巻は12月の予定です。

    よっしゃあああ! 

2012年10月16日

■_

時間があるけどない

数学セミナー。 今月号の「圏論の歩き方」が最終回だったけど とりあえず来月号も(忘れなければ)買う。

■_ History of software engineering

「ソフトウェア工学」の歴史。 かなり読み応えがあった。

History of software engineering - Wikipedia, the free encyclopedia

From its beginnings in the 1940s, writing software has evolved into a profession concerned with
how best to maximize the quality of software and of how to create it. Quality can refer to how
maintainable software is, to its stability, speed, usability, testability, readability, size,
cost, security, and number of flaws or "bugs", as well as to less measurable qualities
like elegance, conciseness, and customer satisfaction, among many other attributes. How best to
create high quality software is a separate and controversial problem covering software design
principles, so-called "best practices" for writing code, as well as broader management
issues such as optimal team size, process, how best to deliver software on time and as quickly as
possible, work-place "culture," hiring practices, and so forth. All this falls under the
broad rubric of software engineering.

Overview

There are a number of areas where the evolution of software engineering is notable:

    Emergence as a profession: By the early 1980s,[1] software engineering had already emerged as
    a bona fide profession, to stand beside computer science and traditional engineering. See also
    software engineering professionalism.

    Role of women: In the 1940s, 1950s, and 1960s, men often filled the more prestigious and better
    paying hardware engineering roles, but often delegated the writing of software to women.[citation needed]
    Grace Hopper, Jamie Fenton and many other unsung women filled many programming jobs during the
    first several decades of software engineering.[citation needed] Today, fewer women work in
    software engineering than in other professions, a situation whose cause is not clearly
    identified. It is often attributed to sexual discrimination, cyberculture or bias in
    education.[who?] Many academic and professional organizations consider this situation
    unbalanced and are trying hard to solve it.

    Processes: Processes have become a big part of software engineering and are hailed for their
    potential to improve software and sharply criticized for their potential to constrict programmers.

    Cost of hardware: The relative cost of software versus hardware has changed substantially over
    the last 50 years. When mainframes were expensive and required large support staffs, the few
    organizations buying them also had the resources to fund large, expensive custom software
    engineering projects. Computers are now much more numerous and much more powerful, which has
    several effects on software. The larger market can support large projects to create commercial
    off the shelf software, as done by companies such as Microsoft. The cheap machines allow each
    programmer to have a terminal capable of fairly rapid compilation. The programs in question can
    use techniques such as garbage collection, which make them easier and faster for the programmer
    to write. On the other hand, many fewer organizations are interested in employing programmers for
    large custom software projects, instead using commercial off the shelf software as much as possible.

The Pioneering Era
(略)
Prominent Figures in the History of Software Engineering

    Charles Bachman (born 1924) is particularly known for his work in the area of databases.
    Laszlo Belady (born 1928) the editor-in-chief of the IEEE Transactions on Software Engineering in the 1980s
    Fred Brooks (born 1931) best known for managing the development of OS/360.
    Peter Chen, known for the development of entity-relationship modeling.
    Edsger Dijkstra (1930–2002) developed the framework for proper programming.
    David Parnas (born 1941) developed the concept of information hiding in modular programming.
    Michael A. Jackson (born 1936) software engineering methodologist responsible for JSP method of program design; JSD method of system development (with John Cameron); and Problem Frames method for analysing and structuring software development problems.

参照リンクにこんなのが NATO Software Engineering Conferences

■_

2012年10月15日

■_

あどえす
で。何か別のに乗り換えるとして。 WILLCOM のスマートフォン→Androidだし(すでに持ってる)、2.3だし それを今から3年縛りでというのは… WILLCOM のその他→えーと… iPhone → すぐには買えないみたいだしー。 げしょ。

特撮博物館で一番印象に残ったもの。 渋谷文化会館のミニチュア(G2で使ったやつだったかな)。とかゆってみる。

■_ Demystifying Garbage Collectors

がべこれ。

Demystifying Garbage Collectors | Zor's Blog

Demystifying Garbage Collectors
October 11, 2012 by XTZGZoReX	

There seems to be a lot of confusion among developers on how garbage collectors actually work.
They really aren't as magical as some people think; in many ways, some garbage collectors are
actually quite crude and — by modern developer standards — evil, unmaintainable, and full of
subtle gotchas (the latter is certainly true no matter one's perspective). In this post, I'll
try to shed some light on how GCs work in a way that (hopefully) any developer can understand.
I do assume that the reader is at least familiar with basic computer memory concepts (C knowledge
is preferred).

Note: This is a very long blog post. Grab some coffee.

(本文ざっくり略)

Conclusion

While this post is fairly abstract in comparison to actual GC implementations, I hope it has
shed some light on how garbage collectors work. If you understand the things in this post, that's
enough to understand how to work with a garbage collector and optimize for it, in practice – you
don't have to know every little implementation detail.

If there's anything you find unclear in this post or perhaps completely unanswered, please leave
a comment! It's entirely possible that I forgot something due to the lengthy nature of this post.

But, But, Internals?!

Sorry, but actual garbage collector implementations are complex beasts full of clever and subtle
optimizations and algorithms. Even describing the algorithms behind a single implementation would
have made this blog post — quite literally — 10 times as long as it is now.

If you're interested in garbage collector implementations, I recommend taking a look at some open
source code:

    The D runtime's GC
    The Parrot VM's GC
    The Mono SGen GC
    The Boehm-Demers-Weiser GC

Many others exist out there. These are just the ones I happen to be familiar with.

Also, again, I really recommend the Garbage Collection Handbook.

D だののガーベジコレクターのコードは面白そうだから読んでみるか。 Parrot もこの辺はスルーしたしな。

■_ TAPL 読書会

今回の問題

21.5.6 Exercise

Another observation that can be made from Figure 21-2 is that an element x of vF is not a member
of μF if x participates in a cycle in the support graph (or if there is a path from x to an
element that participates in a cycle). Is the converse also true that is, if x is a member of vF
but not μF , is it necessarily the case that x leads to a cycle?

The remainder of the section is devoted to proving the correctness and termination of gfp .
(First-time readers may want to skip this material and jump to the next section.) We start by
observing a couple of properties of the support function.


  
21.5.13
exercise

Suppose F is an invertible generating function.
Define the function lfp_F (or just lfp) as follows:

    lfp(X) = if   support(X)↑, then false
             else if X = Ø,     then true
             else lfp(support(X)).

Intuitively, lfp works by starting with a set X and using the support relation to reduce it
until it becomes empty. Prove that this algorithm is partially correct, in the sense that

    If lfp_F(X) = true,  then X ⊆ μF.

    If lfp_F(X) = false, then X ⊈ μF.

Can you find a class of generating functions for which lfp_F is guaranteed to terminate on
all finite inputs? 

finite な入力全てに対して lfp_F のterminate が保証される
generating functions の class とは?

  

■_

2012年10月14日

■_

スマート・プライシング 利益を生み出す新価格戦略
スマート・プライシング 利益を生み出す新価格戦略
読んだ。 面白かった。 極論すれば、どのようにすれば売る側買う側両方に不満が出にくいやり方で 効果的な値付けをするか。というあたり? 値引きのやり方にも色々あるんだなあと感心。 最近洋書の技術書でよく見かける MEAPもこの種の値付けの仕方の一つなのかな。とも。

信頼度成長曲線など。 付箋紙ぺたぺた。

■_ クロカン

「播磨灘物語」がベースじゃない?

その1

~みなもと太郎「風雲児たち」茶屋 其の参拾八~

955 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 18:54:57.65 ID:DOmlV6Nu0 Be:
    13年の大河は黒田官兵衛か 

956 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 18:56:05.04 ID:DOmlV6Nu0 Be:
    ごめん、2014年ね 

963 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 07:45:43.99 ID:G9qEO/CB0 Be:
    どうせ戦を憎み、平和と家族を愛する黒田如水だろうなw >大河ドラマ 

964 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 11:20:16.32 ID:dq/igJcB0 Be:
    ヒュ~マンだなぁ 

965 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 18:51:27.16 ID:92NaG7ve0 Be:
    竹中半兵衛を一方的にライバル視していたのに
    窮地に追い込まれたのを救ってもらって感動するとか
    そういうエピソードが強調されそうだ 

969 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 05:53:43.56 ID:HiasojWL0 Be:
    むしろ思いっきり腹黒いダークヒーローに描いたら面白いと思うし見てみたいんだが、
    大河って地域振興も兼ねているからなぁ。
    ぜひおらが地元の有名人を! って陳情すごいらしいし。
    あまり思い切った描き方はどうしてもやりにくい。 

970 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 10:20:55.51 ID:pPTUMGuF0 Be:
    長期連載化した漫画でありがちなように
    主人公は空気か完璧超人にして
    脇役にアクの強いのを配置すればいい。 

971 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 10:40:46.44 ID:dlMRFYoQ0 Be:
    >>970
    母里太兵衛「脇役は」
    後藤 又兵衛「俺達にまかせろ!」

972 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 10:56:53.77 ID:B82BkZFK0 Be:
    息子始め又兵衛、太兵衛に
    道糞に城井とアクの強い脇役には事かかんなぁ 

973 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 11:30:12.97 ID:0DKWuYak0 Be:
    ダークヒーローっつーか、悪女を題材にしたら
    視聴率が歴代最低だったというし無理じゃね。 

974 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 12:18:24.25 ID:EQV6KulA0 Be:
    日野富子の「花の乱」か。その記録を更新しそうな今年の大河と言い
    悪人評価されるのがデフォの人物を、ダークヒーロー/ヒロインでもなく
    裏返した徹底美化でもなく、「人間くささ」を強調して描こうとすると
    「人物像が中途半端でつまらない」という評価になったりするのかね? 

976 名無しんぼ@お腹いっぱい [sage] 2012/10/12(金) 12:53:19.34 ID:d/UiNBO+0 Be:
    平清盛を主人公にするって最初に情報を知ったとき、
    はなから視聴率狙いは眼中になくって冒険しまくるのかと思った。
    その意味じゃ中途半端には違いない。 

■_ クロカン

その2

【父は本能寺】センゴク 宮下英樹・71番槍【子は妙覚寺】

164 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 16:20:53.57 ID:EfzGfYaD0 Be:
    再来年の大河はクロカンになったぞ


    主演はジャニだけど
    NHK@首都圏@nhk_shutoken 16:13

    【ニュース】再来年に放送されるNHKの大河ドラマは、戦国時代に豊臣秀吉の天下統一を支え、
    天才軍師といわれた黒田官兵衛の生涯を描く「軍師官兵衛」に決まり、主演は「V6」のメンバーで、
    俳優としても活躍している岡田准一さんが務めることになりました。
    #nhk 

201 名無しんぼ@お腹いっぱい [] 2012/10/11(木) 11:01:04.32 ID:846YFa9p0 Be:
    有岡城をリアルに一年かけてやってくれんかなw 

207 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 13:09:54.02 ID:VleaYtpd0 Be:
    >>201
    大河ドラマ『軍師官兵衛』
    1話『信長登場』
    2話『説得』
    3話『幽閉』
    4話『牢獄』
    5話『体が臭い』
    6話『女体が恋しい』
    7話『腹が減った』
    8話『差し入れ』
    9話『妄想攻城戦』
    10話『俺の部屋だ』
    11話『昼夜の感覚』

    48話『うおっ眩し』
    最終話『1年ぶりの有馬温泉』

    最終話の感動半端ないな 

208 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 13:48:30.62 ID:AXwvny6x0 Be:
    ずっと閉じ込められてるのか
    哲学的だな 

331 名無しんぼ@お腹いっぱい [sage] 2012/10/14(日) 12:13:45.37 ID:CX6sTwWm0 Be:
    ところでさ、何月何日は○○の記念日って言うときは、旧暦の日付をそのまま太陽暦の日付として記念日にするんだろうか?
    それとも太陽暦に換算したあとの日付が記念日になるのかな?
    今日は○○(旧暦の頃の人物)の誕生日とか言われても本当にそうなのか迷うよね? 

大抵旧暦そのままの日付じゃなかろか。 だから微妙に変な感じが残ったりする。赤穂浪士の討ち入りとか。 あと、本能寺の変の2日というのも太陰歴で考えると(ry

■_ fortify

Twitter / kosaki55tea: @_ko1 @k_tsj ... というやり取りを見て、はて fortify とかなんだろか。と。 [ruby] Diff of /trunk/configure.in

Man page of FEATURE_TEST_MACROS

_FORTIFY_SOURCE (glibc 2.3.4 以降)
    このマクロを定義すると、文字列やメモリの操作を行う様々な関数を使用する際にバッファオーバー
    フローを検出するための軽めのチェックが 実行されるようになる。すべてのバッファオーバーフロー
    が検出される わけではなく、あくまでよくある例についてだけである。 現在の実装では、以下の関
    数にチェックが追加されている: memcpy(3), mempcpy(3), memmove(3), memset(3), stpcpy(3),
    strcpy(3), strncpy(3), strcat(3), strncat(3), sprintf(3), snprintf(3), vsprintf(3),
    vsnprintf(3), gets(3). _FORTIFY_SOURCE が 1 に設定された場合、コンパイラの最適化レベルが 1
    (gcc -O1) かそれ以上であれば、規格に準拠するプログラムの振る舞いを 変化させないようなチェッ
    クが実行される。 _FORTIFY_SOURCE が 2 に設定された場合、さらなるチェックが追加されるが、 規
    格に準拠するプログラムのいくつかが失敗する可能性がある。 いくつかのチェックはコンパイル時に
    実行でき、コンパイラの警告として 表示される。他のチェックは実行時に行われ、チェックに失敗し
    た場合 には実行時エラーとなる。 このマクロを使用するにはコンパイラの対応が必要であり、 バー
    ジョン 4.0 以降の gcc(1) で利用できる。 

fortifyの意味 - 英和辞典 Weblio辞書 1 〈…に〉防御工事を施す; 〈…を〉要塞(ようさい)化する,〈…の〉防備を固める.

なるほど納得。

■_ How can I work with more advanced programmers?

大元は stackexchange の記事らしく。

In over my head! How can I work with more advanced programmers? | Ars Technica

This Q&A is part of a weekly series of posts highlighting common questions encountered by
technophiles and answered by users at Stack Exchange, a free, community-powered network of 80+ Q&A
sites.

darkman asks:

I've just been hired as a member of a group that is developing in C++. For the last 11 years, I'd
been coding on and off (some C, some Fortran, some C++).

The coding I'd done was mostly maintaining and adding new features to one of our systems. The code,
being 10 years old, did not contain all the modern C++ stuff. Lo and behold, my new job is filled
with programmers with 5-10 years experience of pure coding and they all use the most modern aspects
of C++ (C++11, template, lambda, etc, etc).

They are expecting someone with that same experience... which I have: I've been working for 15
years total, but when I look at their code, I can't understand half of it! :-|

Anyone been in that situation? What would you recommend?

えーと。(自分から見ると)ちょーレベル高いところに放り込まれちゃったんだけど どうしよう?

■_

■_

しまった。TAPL読書会のことを書いている時間が(ry

2012年10月13日

■_

半袖のシャツをしまった。

TAPL読書会。 21章歯ごたえありすぎ。 次回は11月17日を予定しています。 あ、今回のまとめはあとで。

■_ 特典

余裕があれば amazonさんとの値段差(5000円くらい)は気にせずに予約してたんだけどなあ。 みんな(ぴー)が悪いんじゃ。

GA 芸術科アートデザインクラス 素猫57匹目

462 名無しさん@お腹いっぱい。 [sage] 2012/10/10(水) 23:24:56.37 ID:mb6P2Lxt0 Be:
    アニメイト、Blu-ray BOX 予約〆切り
    売り切れマシタ 

463 名無しさん@お腹いっぱい。 [sage] 2012/10/10(水) 23:31:29.94 ID:kq53eUyd0 Be:
    まだ、BOX買うか迷ってるのにぃー
    好きだけども、録画済みのものでも画質十分だしなぁ・・・
    でもそんなにお高くもないしやはり買うべきか・・・悩ましすぎる 

464 名無しさん@お腹いっぱい。 [sage] 2012/10/10(水) 23:35:08.74 ID:/2CM1qZh0 Be:
    そろそろ決めなきゃとは思っていたが
    アニメイトにはしないつまりだったからはよ選ぶか 

465 名無しさん@お腹いっぱい。 [sage] 2012/10/10(水) 23:48:59.82 ID:mb6P2Lxt0 Be:
    さあアニメイトで予約と思って、
    カートに入れて確定を押したら終了しましたとか言われて泣けた。

    まあ、特典は既存絵だし大人しくamazonってくる。 

466 名無しさん@お腹いっぱい。 [sage] 2012/10/11(木) 07:13:52.79 ID:uqvm5ofu0 Be:
    メイトのBOXもう締め切ったのかー
    発売来月下旬だよな 

467 名無しさん@お腹いっぱい。 [sage] 2012/10/11(木) 09:00:56.86 ID:v2HFUs9T0 Be:
    しょうがないからネオウィングとやらで予約した
    あと6点だけらしいぞ 

468 名無しさん@お腹いっぱい。 [sage] 2012/10/11(木) 19:27:16.26 ID:KMZr1OZY0 Be:
    >>463
    悩むぐらいならいっそ買っちまった方がスッキリするんじゃねえの
    こういうのって単純に映像楽しむってより、ファンアイテムの面が強いし
    大なり小なり後悔することになったとしても、所有欲は満たされるんじゃね 

■_

■_ eading Other People's Code

他の人のコードを読もうぜ。という話。

Mahdi Yusuf: Reading Other People's Code

Reading Other People's Code

Sunday, September 23, 2012

I really enjoy reading other people's code, it allows you see how others solve common problems,
and sometimes even provide parables on what you shouldn't do with yours. It also teaches the much
needed skill of reading other people's code.  Unfortunately there isn't a convenient and fun way
of reading other people's code. 

わたしは他の人のコードを読むのがとても楽しいです。
それによって一般的な問題を他の人がどのように解決したのかを知ることができます。
また、parables on what you shouldn't do with yours が得られることもあります。
さらに、他人のコードを読むのに必要なスキルを教えるものでもあります。
残念なことに、他人のコードを読むための便利で楽しいやり方といったものはありません。

Now, ask yourself two questions:
さてここで以下の質問を自分に問うてみてください

    how many hours a week you spend writing code?
    一週間でどのくらいの時間をコードを書くのに費やしていますか?

    how many hours do you spend reading code written by someone you don't know or have access to?
    知らない人やアクセスする手段を持たない人の書いたコードを読むのにどのくらいの時間をかけていますか?

The brave might even ask:

    how much of that code am I confident I understand, and could contribute to?
    そういったコードのどのくらいを、理解できたと確信できますか?
    あるいは貢献できると思えますか?

Many people avoid reading code simply because they hate being outside of their comfort zone.
Documentation is an effective use of time if it does what it says. Often times documentation is
outdated and unreliable and maybe even lies. Only thing you can be sure of is the source. 

多く人が、自分の comfort zone の外側にいることを好まないのでコードを読むことを避けています。
ドキュメントはそれがきちんと書かれている場合には時間の有効な使い方です。
多くの場合、ドキュメントは outdate かつ unreliable であり、間違いが書かれていることすらあります。
あなたが確実に信用できる唯一のものがソースなのです。

Entire businesses have been built on the idea of sharing and writing code, but not reading.


以下略
Copyright 2012 Mahdi Yusuf
Errrrday I be programmin' (oh and hustlin' too)

Reading Other People's Code | Hacker News

Here's a few sources I really liked:

* Express - https://github.com/visionmedia/express - I don't like TJ's coding style, and general trolling of CoffeeScript, but this is a really great, clean and tiny codebase. (As well as all the connect middlewares - https://github.com/senchalabs/connect)

* Async - https://github.com/caolan/async - is very readable. Async is a great library for async ops handling in JS, and it's really neat seeing the implementation patterns.

* Ray - is a games DSL in Ruby - https://github.com/Mon-Ouie/ray - I love it, and it's a great read especially if you are interested in DSLs as much as I do.

* Jekyll - https://github.com/mojombo/jekyll - really helped me going forward with my ruby skills. It's nice, clean, commented, not too big, and useful.

* Redis - https://github.com/antirez/redis - lots of data structure implementations. Antirez just writes C so nicely. anet.c has networking, TCP bits, ae.c is an event loop. Lots of great code there.


Let me add substack (https://github.com/substack) to your list. Lots of javascript/node gems.

■_

What is the fascination with code metrics? - Stack Overflow What are useful metrics for source code? - Programmers

■_ Concurrency, multi-threading and parallel programming concepts

用語解説。グリーンプロセスとか知らなかった。

kaisellgren/Concurrency-concepts

Concurrency, multi-threading and parallel programming concepts

This document describes various concurrency, multi-threading, parallel programming methods and
concepts. The purpose is to write a single document/wiki that contains everything you need to
know about concurrency. Things should be explained clearly yet in as great detail as possible.
You are welcome to contribute to this document.

If you are interested in contributing to this document, you can ask me to add you as a
contributor or you can just fork this.

Note 1: This document mainly discusses modern OS and hardware.

Note 2: While attention is paid to what is written here, there is no guarantee that this document
is correct at its entirety.

Table of Contents

Approaches to concurrency

    Processes
    Threads
    Green Threads
    Green Processes
    Isolates

Synchronization primitives

    Locks
    Mutex
    Semaphores
    Monitors
    Message Passing

Higher-Level Frameworks and Languages

    Microsoft's TPL and other asynchronous features
    Apple's GCD and blocks
    Clojure
    Erlang
    Node.js
    Python gevent
    HTML5 Web Workers

どういった解説が書かれているかは元記事を。

■_

図書館であの本やらあの本を借りてきた。 というとこで内容チェックちう。

2012年10月12日

■_

ヘッドホン
コードが70cm前後くらいのものが良いのですが、 最近は1.2mとかいうのが多くてちょっともてあます。 長いコードをまとめる器具ってのもあって 二つ三つ試してみましたがどうもうまくない。

■_ Linus Torvalds Answers Your Questions

Linus に訊け。

面白いと思った質問(と回答)を。

Linus Torvalds Answers Your Questions - Slashdot

The Absolute Death of Software Copyright?
by eldavojohn

Recently you spoke out about software patents and the patent process. But I was interested in
what you said about how "nasty" copyright issues could get. You use SCO as the
obvious nightmare case but what about violations against open source licenses like the GPLv3?
Would you care if someone forked the Linux kernel and made major modifications to it and started
selling it without releasing the code to the customers? What does your ideal situation look like
for open source and commercial closed source? Would you just copy the Finnish model and aren't
you afraid American experts are just as daft as American juries?

Linus: So I like copyrights, and even on patents I'm not necessarily in the "Patents are
completely evil" camp. When I rant about patents or copyrights, I rant against the *excesses*
and the bad policies, not about them existing in the first place.

The patent problems people on slashdot are probably familiar with: the system is pretty much
geared towards people abusing it, with absolutely ridiculous patents being admitted, and it
hindering invention rather than helping it. The failures are many, and I don't know how to fix it,
but much stricter limits on what can be patented are clearly needed.

(以下略)

favorite hack
by vlm

I asked a bunch of hard architecture questions, now for a softball Q. Your favorite hack WRT
kernel internals and kernel programming in general. drivers, innards, I don't care which. The
kind of thing where you took a look at the code and go 'holy cow that's cool' or whatever. You
define favorite, hack, and kernel. Just wanting to kick back and hear a story about cool code.

Linus: Hmm. You do realize that I don't get all that close to the code any more? I spend my time
not coding, but reading emails, and merging stuff others wrote. And when I *do* get involved with
the code, it's not because it's "cool", it's because it broke, and you'll find me
cursing the people who wrote it, and questioning their parentage and that of their pets.

(略)

At the opposite end of the spectrum, I actually wish more people understood the really core
low-level kind of coding. Not big, complex stuff like the lockless name lookup, but simply good
use of pointers-to-pointers etc. For example, I've seen too many people who delete a singly-linked
list entry by keeping track of the "prev" entry, and then to delete the entry, doing
something like

たとえば singly-linked リストのあるエントリを "prev" entry に記録しておいてから
そのエントリを削除するときにあまりにも多くの人が次のようにしているのを見てきました。

  if (prev)
      prev->next = entry->next;
  else
      list_head = entry->next;

and whenever I see code like that, I just go "This person doesn't understand pointers".
And it's sadly quite common.

このようなコードを見るたびに、「このコードを書いた人はポインターを理解していない」と
思ってしまいますが、それは悲しいことにとても一般的なことなのです。


People who understand pointers just use a "pointer to the entry pointer", and initialize
that with the address of the list_head. And then as they traverse the list, they can remove the
entry without using any conditionals, by just doing a "*pp = entry->next".

ポインターを理解している人であれば、「エントリーポインターへのポインター」を使い、
それを list_head のアドレスで初期化するということをするでしょう。そうしておけば
リストのトラバースを行い、"*pp = entry->next" とするだけで
条件判断なしにエントリの削除ができるのです。

So there's lots of pride in doing the small details right. It may not be big and important code,
but I do like seeing code where people really thought about the details, and clearly also were
thinking about the compiler being able to generate efficient code (rather than hoping that the
compiler is so smart that it can make efficient code *despite* the state of the original source code).



Describe your computer
by twistedcubic

Can you describe in detail your home and work computers, including processor, motherboard, and
graphics card? And also say something about their compatibility with Linux?

Linus: My home computer isn't actually all that interesting: I don't need all that much CPU power
any more, and for the last several years, my primary requirement (since CPU's are fast enough) has
been that the system be really really quiet, and that it has a good SSD in it. If our cat deigns
to jump into my lap while I'm working, the loudest noise in the room should be the purring of the
cat, not the computer.

So my main desktop is actually a 4-core Westmere machine, not really anything special. The most
unusual part of the machine is probably just the fact that it has a good case (I forget the exact
case name now) which avoids rattling etc. And one of the bigger Intel SSD's. I think I'll be
upgrading some time this fall, but I will have had that machine for two years now, I think.

My laptop (that I'm writing this with, since I'm traveling in Japan and Korea right now) is an
11" Apple Macbook Air from last year (but running Linux, of course - no OS X anywhere),
because I really hate big laptops. I can't understand people who lug around 15" (or 17"!)
monsters. The right weight for a laptop is 1kg, no more.

■_ ソフトウェア工学(の歴史)

英語版 wikipedia に結構詳しいのがあった。あとでよむ。 History of software engineering - Wikipedia, the free encyclopedia

■_

■_ The APL Programming Language Source Code

APL。

Computer History Museum | @CHM : The APL Programming Language Source Code

The APL Programming Language Source Code

(略)

APL became popular when IBM introduced “APL\360” for their System/360 mainframe computer.
Unlike most other languages at the time, APL\360 was also a complete interactive programming
environment. The programmer, sitting at an electromechanical typewriter linked to a timeshared
computer, could type APL statements and get an immediate response. Programs could be defined,
debugged, run, and saved on a computer that was simultaneously being used by dozens of other
people.

Written entirely in 360 assembly language, this version of APL took control of the whole machine.
It implemented a complete timesharing operating system in addition to a high-level language.

With the permission of IBM, the Computer History Museum is pleased to make available the source
code to the 1969-1972 “XM6” version of APL for the System/360 for non-commercial use.

IBM の許可を得て、Computer History Museum は APL の 1969-1972 “XM6” version の
ソースコードを non-commercial use で利用できるようにしました。


The text file contains 37,567 lines, which includes code, macros, and global definitions. The 90
individual files are separated by ‘./ ADD” commands. To access this material, you must agree to
the terms of the license displayed here.

ソースコードのテキストファイルは 37567 行あり、そこにはコード、マクロ、グローバルな定義
といったものがあります。90個の individual なファイルは ‘./ ADD”コマンドで分割されています。
ダウンロードのためには、リンク先で表示されるライセンスの文言に同意しなければなりません。

Download APL360 Source Code

Additional Material
(略)
    clathwell on October 11, 2012

    Dear Len,

    What a great way to honour the 50th anniversary of the publication of A Programming Language.
    There is a subtle wave of appreciation for your leadership here quietly sweeping the planet.

    bobc4012 on October 12, 2012

    APL was a great language. It was used internally by IBM. Unfortunately, IBM management never
    had the foresight to push it as a mainstream language. Just like so many other things. If IBM
    management hadn't been so fixated on PL/I and MVS (sold the big iron) and looked at VM and
    APL plus their own internal version of PL/I (the internal was more powerful than C), Unix and
    C would have been another “interesting” OS and language.

ということでダウンロードして読む>ソースコード

■_

↑に対する reddit での反応。

Computer History Museum : The APL Programming Language Source Code : programming

If you're curious what it looks like and don't feel like clicking on an agreement just to
download it, here is an excerpt picked at random:

&TAG     SR    R1,R1               ZERO OUT R1 FOR THE IC STEPS.        02220000
         IC    R1,MTYPE(&COLR)     PICK UP COLUMN OF BRANCH MATRIX.     02280000
         LR    R0,R1               PREPARE TO GET THE ROW OF IT ALSO.   02340000
         IC    R0,MTYPE(&ROWR)     GET THE ROW OF THE BRANCH MATRIX.    02400000
         SLL   R0,2                MULTIPLY BY FOUR.                    02460000
         AR    R1,R0               ADD TO THE COLUMN NUMBER.            02520000
         SLL   R1,2                MULTIPLY BY FOUR AGAIN.              02580000
         L     R1,&TABLE.(R1)      LOAD THE BRANCH ADDRESS.             02640000
         BCR   15,R1               BRANCH TO THE RIGHT PLACE.           02700000
         MEND                                                           02760000
         MACRO                                                          02820000
&L       BMW   &GPR                                                     02880000
&L       LTR   &GPR,&GPR           SEE IF THIS IS A SMTB PTR.           02940000
         BC    2,BMW&SYSNDX        BRANCH IF IT IS NOT.                 03000000
         L     &GPR,MLIST(&GPR)    LOAD THE ADDRESS OF THE M-ENTRY.     03120000
BMW&SYSNDX N   &GPR,STRIKE         REMOVE THE 8 HIGH ORDER BITS.


I like how the comments are defined by their column in each line :-P


Welcome to punch card land. The numbers in the far right are to help when you drop the deck of
punch cards and have to put them back in the correct order. Dropping a box of 2000 cards (standard
size) was a good way to kill an afternoon.


Learning APL for the IBM 1130 as an undergraduate in 1974 was a transformational event in my
education. FWIW, the source code for APL\1130 and, in fact, a simulator for it has been available
at IBM1130.org for quite a while.


I learned APL on a IBM System/370 Model 155 at Orange Coast College in 1975. I still have the
book, “A Programming Language”. Had a lot of fun with it.

一部では結構使われていたのかなあ>APL 創刊の頃の ASCII の記事にも APL の記事がちょこちょこあったし。 一説によれば最も金を稼いだプログラミング言語らしい(要出典)

2012年10月11日

■_

アドエス。 以前にへたった電池を交換し、 キーが一つ取れても使ってたりしたわけですが、 交換した電池もへたってしまってまともに使えなくなってきました (満充電から使い始めてもすぐにローバッテリーに)。 さらに、アドエス上で使っているtwitter クライアントが twitter の仕様変更で使えなくなっているっぽく最早持ってる意味もないという (電話としてはほとんど使ってないし、連絡先としてアドエスの番号を(基本的には) 教えることはしていない)。 で、どうするか。なんですが(つづく)

オライリーさん半額セール。 なにか良いものはないかいな(PDTで16日いっぱいまでです) Save 50% on Code Ebooks & Videos - Deals?-?O'Reilly Media

■_

■_

スープレックス。

星野之宣を語れ Part15

295 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 05:45:32.62 ID:yMvxCKY80 Be:
    最初絵が古いなと思いつつ題名だけ聞いたことある作品だから
    原作付だが星野作品初めて読んだのだけど滅茶ハマった

    他作品も読んでみようと思ったらたくさんありすぎるのだけど
    テイストが近い感じでおすすめなのある?
    本作みたいに謎が解けていく感じのやつが希望で 

296 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 05:46:15.65 ID:yMvxCKY80 Be:
    読んだやつは「星を継ぐもの」ね 

301 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 13:07:07.59 ID:lw0751SK0 Be:
    >>295
    >本作みたいに謎が解けていく感じのやつが希望で

    ブルーシティー 

302 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 18:07:24.25 ID:cmFFfkSN0 Be:
    ブルーホールかな 

303 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 18:21:44.14 ID:SlajDNqu0 Be:
    謎が解けるというかジャーマンスープレックスなのが「ヤマタイカ」
    その元となった「ヤマトの火」はゾクゾクしたんだけどねぇw>謎解き 

305 名無しんぼ@お腹いっぱい [] 2012/10/10(水) 18:47:41.59 ID:nPfxyRzM0 Be:
    ヤマタイカの冒頭、久高島の地下にあった冠をかぶった骸骨は誰なんだよ
    一番の投げっぱなしだと思う 

307 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 19:06:09.40 ID:cmFFfkSN0 Be:
    >>303
    代表作の一角だし挙げようと思ったけどやめた
    まさにジャーマンスープレックスだね、それ言い得て妙w
    >>305
    Σ(゚д゚)
    その読解力で星野漫画読めるのか
    偉ぶるつもり無いけど、結構難易度高めだぞ 

315 名無しんぼ@お腹いっぱい [sage] 2012/10/10(水) 23:13:29.62 ID:lw0751SK0 Be:
    >>303,>>307
    ジャーマンスープレックスは本来、キッチリ固める技だぞw 

316 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 00:09:06.09 ID:2vqgCGjX0 Be:
    投げっぱなしジャーマンって語呂が良いからw 

318 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 00:24:32.79 ID:omut0/C70 Be:
    それはジャーマンスープレックスホールドだ 

320 名無しんぼ@お腹いっぱい [sage] 2012/10/11(木) 02:32:53.10 ID:3UxLPFKA0 Be:
    >>318
    ゴッチ曰く、「スープレックスと呼ばれるものは、後ろから相手の胴をクラッチして反り投げ、ブリッジで固めるものだけだ」 

読んでみてちょっとびっくりしたw ジャーマン・スープレックス - Wikipedia スープレックス - Wikipedia

■_ 今日の信頼度成長曲線

信頼度成長曲線。というか、ソフトウェアの信頼性云々で調べてみると ハードウェアのそれを持ち込んだ感じがします。 信頼性工学 - Wikipedia Reliability engineering - Wikipedia, the free encyclopedia

ソフトウェア単体で見た場合当然のことながらハードウェアとはいろいろ条件が違うわけで、 どんなもんかなあと思わんでもないです。

「ソフトウェア工学」の歴史を見るとなんかわかるだろうか ソフトウェア工学 - Wikipedia Software engineering - Wikipedia, the free encyclopedia 日本語版と英語版でだいぶ違うな…


一つ前へ 2012年10月(上旬)
一つ後へ 2012年10月(下旬)

ホームへ


リンクはご自由にどうぞ

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