ときどきの雑記帖 再起編

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

一つ前へ 2012年4月(中旬)
一つ後へ 2012年5月(上旬)

ホームへ

2012年04月30日

■_

COMIC1
行ってきました。目当てはこれ↓

1はまあなんとか買えたのですが、2と3はダメ(ブースについたときはておくれ)だったんですよね。 今回はコミケ前にこのCOMIC1でも頒布するということでコミケに賭けるよりはと (PC関連と別の日になったりで辛いのですよなかなか)。 んで、なんかさっくり買えたので会場一巡りしていろいろと(事前のチェック全くなしw)

ヤマトの評論本はえらく辛口(ガンダムもぶった切ってたw)でしたが 今回一番の収穫かも。2199に対するコメントは同感でした。

昨日書いてた自転車、日本でも買えるみたいなんだけどこの値段は手が出んわー○| ̄|_ 2012年モデル パシフィック イフモードV(Pacific IFMODE-V)【 自転車 ジョイ - Yahoo!ショッピング 通常販売価格:252,000円(税込) 当店ネット価格:240,000円(税込)

■_ C Style Haskell

Korma Language: C Style Haskell

Thursday, November 10, 2011

C Style Haskell

The other day I found this blog post on using GADTs to write more usable C style Haskell with
effects, references and loops.  I couldn't get the example to typecheck without unsafe code,
so I decided to write my own version.  I wanted the behavior of expressions and operators to
be similar to that of C.  This is what I came up with:

swap(r1, r2) = function $ do
{
    z <- auto undefined;
    z =: r1;
    r1 =: r2;
    r2 =: z;
};

factorial = function $ do
{
    a <- auto 0;
    n <- auto 1;
    for ( a =: prim 1 , a <. prim 11 , a +=: prim 1 ) $ do
    {
       n *=: a;
       iff ( a <. prim 7) $ do
       {
           continue;
       };

       iff ( a >. prim 5) $ do
       {
            break;
       };
    };

    swap( ref n , ref a);
    returnF n;
};


In order to make expression operators behave similarly to that of C, I added a new value
type as a wrapper for computations in this monad, so as to allow seamless composition of
effectfull expressions on the right hand side.  "callCC" was used to achieve C
style "break", "continue" and "return".  The reader monad
was used to hide the extra arguments required for callCC.


確かにそれっぽく見えなくもない…

■_ 誤爆から始まるストーリー

山田芳裕 『へうげもの』 第百一席

650 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 13:37:30.32 ID:xm+ZJmoV0 Be:
    でもあんまり昆虫人間に成り過ぎたら
    普通に種族間抗争と言うか火星vs地球の宇宙戦争に・・・ 

651 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 13:38:36.69 ID:xm+ZJmoV0 Be:
    あれ、何故ここに誤爆を・・・失礼しました 

652 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 14:08:46.38 ID:Et0ybn1E0 Be:
    もう何が来ても誤爆にならない気がするw 

653 名無しんぼ@お腹いっぱい [] 2012/04/29(日) 14:13:57.61 ID:5FhvmxGOO Be:
    もはやバッタでもライダーでなくとも仮面ライダーであることがこの細川忠興の仮面ライダーぞ 

654 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 14:26:39.74 ID:TI2+t4rrO Be:
    太鼓を叩くのが武器の、バイクに乗らない仮面ライダーがおりましたな
    後で免許取ってましたが 

655 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 15:18:29.06 ID:Aqlvpd7Y0 Be:
    そもそもV3はトンボだしXライダーは武器持ってたし、バッタだの武器云々だの言うのはおかしい。 

656 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 15:48:38.15 ID:bbi9H2nAP Be:
    そもそも仮面ライダーの定義とは何ぞw 

657 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 15:51:57.93 ID:hQjmiRlm0 Be:
    変身出来る改造人間
    変身出来なきゃタダのサイボーグじゃ! 

658 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 15:54:38.02 ID:Aqlvpd7Y0 Be:
    いまや改造人間ですらないわけで 

659 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 17:09:48.62 ID:hQjmiRlm0 Be:
    なっ、なんだって??ーーー! 

660 名無しんぼ@お腹いっぱい [] 2012/04/29(日) 17:21:44.84 ID:oN0OkVTJO Be:
    >>656
    個人的には蜂女が主人公で
    仮面ガールズライダーをやってほしい

    改造人間が仮面かぶってバイクに乗ればいいんでしょ?

    宗矩はバイクにのれば地顔でも仮面ライダーになれる

661 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 17:57:29.09 ID:rqgFFUJ90 Be:
    >>660
    セーラームーンから始まった女児向けガールズアクションの実写版か
    意外にいい線ついてるのかもしれないね 

662 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 18:42:34.93 ID:SeDFlA/C0 Be:
    宗匠「仮面ライダーはBLACKこそ至高と存じまする…」 

663 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 19:03:45.61 ID:VbjJ6LMKP Be:
    長安がたま~にサスペンダーをパシーン!する仮面ライダー部顧問の大杉に見えるわ 

664 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 19:36:53.27 ID:GcYMWv4i0 Be:
    この流れ先が読めぬ・・・

    ライダーといえば牛車もあっt(ヤメレ)。 

665 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 19:39:05.06 ID:z7Ldx4FH0 Be:
    ・・・・・・まずいっ
    俺は仮面ライダーの善し悪しがいまいちわからぬ・・・・・・
    またここのスレ民に馬鹿にされるぞ・・・・・・! 

666 名無しんぼ@お腹いっぱい [] 2012/04/29(日) 20:05:46.99 ID:5FhvmxGOO Be:
    話振っといてあれやけどワシもわからんw 

667 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 21:05:48.49 ID:iEcdh6tz0 Be:
    たまに自分でも深く考えず書いたネタに全力で食いつかれること在るよなw 

673 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 21:51:38.36 ID:XhcFHk4JO Be:
    >661
    そもそもセーラームーンが、実写のポワトリンに影響されて創り出されたものらしいけどな。 

676 名無しんぼ@お腹いっぱい [sage] 2012/04/29(日) 22:21:03.07 ID:rHkHnh1K0 Be:
    こたびの黄金の日々には
    「へうげもの」ゆかりの地を聖地巡礼する所存。 

677 名無しんぼ@お腹いっぱい [sage] 2012/04/30(月) 00:18:20.26 ID:qC3LqTWa0 Be:
    というと堺ですかな 

678 名無しんぼ@お腹いっぱい [sage] 2012/04/30(月) 00:36:14.64 ID:7lidci/p0 Be:
    バイクにでも乗って瀬田の唐橋を見に行くのか 

679 名無しんぼ@お腹いっぱい [sage] 2012/04/30(月) 00:42:41.32 ID:w9JoHY9m0 Be:
    >>655
    V3が蜻蛉だっちうのは初めて知ったw
    スーパー1はスズメバチ、ストロンガーはカブト虫
    アマゾンはトカゲだっけ?

    Xライダーは何だったかな?

680 名無しんぼ@お腹いっぱい [sage] 2012/04/30(月) 00:46:21.38 ID:5hlqVmax0 Be:
    取り敢えず京都に行くなら

    北区 大徳寺
    上京区 興聖寺
    東山区 正伝永源院
    伏見区 仏国寺

    ここらに行って見るのもよろしかろう。
    それぞれ宗匠、ゲヒ殿、有楽殿、コボちゃんの墓所がある。
    あと上京区ならば晴明神社も行っとけ、宗匠が切腹した屋敷跡だ、あとすぐ近くの一条戻橋もな。 


V3 のそれ知らなかったw

■_ art

art もわりとと訳すのに苦労するような単語な印象

推薦図書/必読書のためのスレッド 67

411 デフォルトの名無しさん [sage] 2012/04/29(日) 09:12:15.00 ID: Be:
    文芸的プログラミングを解説した本で、
    クヌース以外の人が書いた本は無いでしょうか 

412 デフォルトの名無しさん [sage] 2012/04/30(月) 01:28:20.69 ID: Be:
    アートだか読めるようなプログラムだか知らないが、「文芸的」って
    形容を付ける、そういうプログラム哲学みたいなこと主張するってそれほど
    意味があることなのか?
    直接師事したわけでもないのに、「クヌース先生」とか呼ぶ奴もなんか気持ち
    悪いし。fjの時代はクヌースには「先生」つけろとか主張するキチガイみたいな
    奴いて印象が悪い。
    テフ作ったおっさんでいいじゃないか。 

413 デフォルトの名無しさん [sage] 2012/04/30(月) 02:04:51.99 ID: Be:
    突然どうした 

414 ◆QZaw55cn4c [sage] 2012/04/30(月) 02:11:41.02 ID: Be:
    >>412
    >テフ作ったおっさんでいいじゃないか。
    その程度の認識か?

    文芸的うんたらかんたら、については今となっては噴飯物かもしれない、が、ようはメインテナンス性、再読性の問題にひとつの案を提示しているだけなのでは? 

415 デフォルトの名無しさん [sage] 2012/04/30(月) 02:26:21.10 ID: Be:
    >>414
    どうして噴飯物なのかわかんない。
    ソースとドキュメントのシンクロが大切だとか、
    変数の命名や諸概念の記述順序なども
    解説や文体の卓越性という観点が重要だとか、
    納得のいく話が柱になってるはずだよ、文芸的っていうのは。
    要は、そういうのってまるで随筆家みたいなものなんだよって話。

    機械に何をさせるかというよりも、何をさせたいかを人間に対して
    解説するってスタンスでソースを記述しドキュメントと一体化させるとかなんとか、
    確かそれを柱にしてたと思う。そういう考えは今でも重要なんじゃないの? 

416 ◆QZaw55cn4c [sage] 2012/04/30(月) 02:40:31.35 ID: Be:
    >>415
    文芸的プログラミングの概念自体を否定するつもりはないことは >>414 で示したつもり。
    メタアノテーションはまだよくわからないレベルだけれども。

417 デフォルトの名無しさん [sage] 2012/04/30(月) 10:49:17.54 ID: Be:
    おっさんは無いだろう
    年齢的にはテフ作ったおじいちゃんだ。 

419 デフォルトの名無しさん [sage] 2012/04/30(月) 11:17:30.94 ID: Be:
    クヌースといえば、Concrete Mathematics の内容をかいつまんで教えてほしい。
    どんなテーマを扱っているのか?
    個人的には、いわゆる「漸化式」と線形微分方程式のある種の相似性を切に知りたい。これをとりあげて解説している書籍はないだろうか? 

420 デフォルトの名無しさん [sage] 2012/04/30(月) 11:33:38.49 ID: Be:
    クヌースにハマるのは百害あって一利なし 

421 デフォルトの名無しさん [sage] 2012/04/30(月) 11:46:37.81 ID: Be:
    >>420
    そこまで言うなら、クヌースにハマることの害を5つくらい挙げてみろ

    クヌース以外にも当てはまるもの挙げたらバナナの刑に処する 

422 デフォルトの名無しさん [sage] 2012/04/30(月) 12:31:21.20 ID: Be:
    >>421
    (1)バージョン番号に無理数を使いたくなる
    (2)バグに懸賞金を掛けて破綻する
    (3)使っているコンパイラが気に入らないと自分でコンパイラを作る
    (4)だがクヌースほどの天才ではないので使い物にならない
    (5)プログラミングは芸術だとわけの分からない事を言い出す 

423 デフォルトの名無しさん [sage] 2012/04/30(月) 12:32:32.39 ID: Be:
    プログラミングは芸術だ 

424 デフォルトの名無しさん [sage] 2012/04/30(月) 12:38:46.53 ID: Be:
    >>423
    芸術は爆発だ
    ゆえにプログラミングは爆発だ。 

425 デフォルトの名無しさん [sage] 2012/04/30(月) 12:45:12.60 ID: Be:
    >>424
    岡本太郎さんはプログラマじゃないだろ!謝罪しろ! 

426 デフォルトの名無しさん [sage] 2012/04/30(月) 12:47:41.43 ID: Be:
    >>422
    がんばったな

    バナナの刑は効果覿面だ 

430 デフォルトの名無しさん [] 2012/04/30(月) 13:37:16.62 ID: Be:
    アートを「藝術」としか翻訳できない日本の翻訳者がおぱんぽんランド開園だよーわぁいってだけだろ。
    アート・オブ・プロジェクトマネジメントではアートは藝術ではなく職人芸、極まった技のことだと書いていた(あれ?別の本だったかな)。
    これはミュージック・セオリーを音楽「理論」と訳してしまうことに近い。ミュージックセラピーとはヤラセである。ヤナセではない。 

431 デフォルトの名無しさん [sage] 2012/04/30(月) 13:44:53.86 ID: Be:
    >>430
    クヌース先生の本でも芸術って訳したらアウトなの?
    (徒弟制で身につけるような)職人芸として訳すべき? 

432 デフォルトの名無しさん [sage] 2012/04/30(月) 13:54:47.04 ID: Be:
    >>430
    わざわざ原著者自ら art には artistic と artificial の二つの側面があってうんぬん、と書いているくらいだから、翻訳文化の伝統名高い日本の翻訳業界が失態をしでかしたとは思えない。
    なにか「理由」があるはずだ、そう信じたい。

    >ミュージック・セオリーを音楽「理論」
    ごめんなさい、これが適当と思ってしまうのですけれども、正解は何? 

433 デフォルトの名無しさん [sage] 2012/04/30(月) 13:54:52.06 ID: Be:
    >>431
    脊髄反射のように「職人芸として訳すべき?」と訊く前に、
    職人芸として訳したらどう解釈できるか、
    何が見えてくるかをまずは自分で考えてみてはどうだ?

    と、端で見ていて思った 

434 デフォルトの名無しさん [sage] 2012/04/30(月) 13:59:53.72 ID: Be:
    「技芸」って訳してる本がなかったっけ 

435 デフォルトの名無しさん [sage] 2012/04/30(月) 14:02:54.67 ID: Be:
    >>433
    いや、知ってて言ってる
    あちらさんは工学に至っていないって意味でArtって言葉を使ったりするんだよ

    ただ*クヌース先生の本では*どうなのかって 

436 デフォルトの名無しさん [sage] 2012/04/30(月) 14:03:40.25 ID: Be:
    >>434
    Prologの技芸かな 

437 デフォルトの名無しさん [] 2012/04/30(月) 14:06:55.47 ID: Be:
    ごめんね、かあさんちょっと藝術っていってみたかっただけだから、ごめんねJ( 'ー`)し 

438 デフォルトの名無しさん [sage] 2012/04/30(月) 14:52:25.05 ID: Be:
    おまいらスレ違いの話題になると元気ハツラツだな 

439 デフォルトの名無しさん [sage] 2012/04/30(月) 16:29:18.22 ID: Be:
    state of the art って言葉もあるんだが 

ところで、オライリーの The art of ~ なタイトルの本がどれも翻訳されると アートオブ~になるのが気になるんですが。

■_ それvimで

ちょっと複雑な?置換を

vim - simple regex - between double quotations replace space with underscore and make all letters lowercase - Stack Overflow

Could you help me with a regex to change lines like

<string name="Final time">Final time</string>
<string name="After extra time">After extra time</string>

to lines

<string name="final_time">Final time</string>
<string name="after_extra_time">After extra time</string>

So between double quotations replace space with underscore and make all letters lowercase.

I will use this regex with search/replace in VIM.

A generic approach:

:%s/\(<string name="\)\(\u\)\([^" ]\+\) \([^" ]\+\)/\1\l\2\e\3_\4/

This replaces every string @name that

    starts with an upper case character (\u) and
    consists of two space-separated words (\([^" ]\+\) \([^" ]\+\)) and
    replaces it with the corresponding lower-case character (\l\2\e).
    It also replaces the space with an underscore.

To make everything in @name lower-case, this could be simplified:

:%s/\(<string name="\)\([^" ]\+\) \([^" ]\+\)/\1\l\2_\3_\e/

To get rid of multiple spaces, do two steps. First, make the attribute value lower-case:

:%s/\(<string name="\)\([^"]\+\)/\1\l\2\e/

then, replace every space in the attribute value with an underscore

:%s/\(<string name="[^"]*\)\@<= /_/g

Note that the \@<= is vim's way of expressing a positive look-behind assertion.

(This answer is outdated and does not fully answer the question as presently asked. However,
it is retained here rather than deleted on the advice of another answerer.)

If you want a regex that cannot be fooled, why, that will take some work. While using Vim,
though, one usually takes a more relaxed attitude. Does this not serve?

:s/"final time"/"final_time"/g

You can omit the trailing g if you want replacement to occur only once. On the other hand, you can make it

:s/"\cfinal time"/"final_time"/g

to make the pattern-match case-insensitive (though, really to do this right, see @Tomalak's answer).

However, while using Vim, there may be an easier way, as follows.

    Press qq to start recording Macro q (or qa to start recording Macro a, etc., as you prefer; if unsure, qq is quickest to type and as good as any other).
    Type the search command /"\cfinal time" and press enter.
    Press f<Space> or 6l to move the cursor over to the space.
    Press r_ to replace the space with an underscore.
    Press q to finish recording the macro.

Then, if you like, you can immediately press @q to make Vim repeat the same operations
automatically. This is quick, and useful, if you have several strings "final time"
scattered throughout your file that all want the same edit. Even better, the third and
subsequent time you want Vim to do the same operations, you can just press @@ to repeat the
last @ operation. This is extra quick.

(Thanks to @Tomalak for adding that /"\cfinal time" modifies the search to be
case-insensitive. I had not known that.)
You forgot \c – Tomalak yesterday
@Tomalak: I admit that \c is unfamiliar to me. On the other hand, it looks as though the OP
has updated the question after I started to answer, so I'll look at it again, and investigate
\c. Thanks.
\c is case-insensitive regex. Your's wouldn't match.

@thb Thank you, but I meant much more generic case than just a string 'final time'. It is
about any string, with any number of words.

お、vim での先読みとか大小文字の違い無視とか知らなかった。

■_

■_

2012年04月29日

■_

昨日今日で大散財(大袈裟)
ドメイン特化言語 パターンで学ぶDSLのベストプラクティス46項目
ドメイン特化言語 パターンで学ぶDSLのベストプラクティス46項目
形式手法入門―ロジックによるソフトウェア設計― Interface (インターフェース) 増刊 組み込みシステム開発に役立つ理論と手法 2012年 05月号 [雑誌] なぜデザインが必要なのか――世界を変えるイノベーションの最前線 小さく賭けろ!―世界を変えた人と組織の成功の秘密

「なぜデザインが必要なのか」に載っていたイギリスのメーカー製の折りたたみ自転車欲しいなあ。 買えても高そうだけど。 それとは別にこの本を読んで思うところがあったのだけど、 それについて書くことがあるかもしれないしないかもしれない。

洋書もたまに買わないと置くスペースがなくなってしまうよなあと この本を買ってはみたものの、Amazonさん価格と比べるとちょっと悲しくなるねえ(^^;
Haskell: The Craft of Functional Programming (3rd Edition) (International Computer Science Series)

この本、気になっているのだけど Amazon.co.jp: Safe C++: How to Lower the Bug Count of Your C++ Code: Vladimir Kushnir: 洋書 出版社: Oreilly & Associates Inc (2012/8/22) だし、電書版すぐに買えるかな?

もくもく
5/1、2 と半日くらいもくもくできるところないかなあ (久しぶりにGW 中の平日も休みになっているらしい)。

■_ R

言語仕様をどうにかしようよとか(ちょっと違う)

An academic programming language paper about R | (R news & tutorials)

An academic programming language paper about R
April 27, 2012
By Derek-Jones

(This article was first published on The Shape of Code » R, and kindly contributed to R-bloggers)

The R language has passed another milestone, a paper aimed at the academic programming language
community (or at least one section of this community) has been written about it, Evaluating the
Design of the R Language by Morandat, Hill, Osvald and Vitek. Hardly earth shattering news, but
it may have some impact on how R is viewed by nonusers of the language (the many R users in
finance probably don't care that R seems to have been labeled as the language for doing
statistics). The paper is well written and contains some very interesting information as well
as a few mistakes, although it will probably read like gobbledygook to anybody not familiar
with academic programming language research. What follows has something of the form of an R
users guide to reading this paper, plus some commentary.

The paper has roughly three parts, the first gives an overview of R, the second is a formal
definition of a subset and the third an initial report of an analysis of R usage. For me and I
imagine you dear reader the really interesting stuff is in the third section.

(略)

The complaint that R has been defined by the successive releases of its only implementation,
rather than a written specification, applies to all widely used languages, at least in their
early days. Back in the day a major reason for creating language standards for Pascal and then
C was so that other implementations could be created; the handful of major languages whose
specification was written before the first implementation (e.g., PL/1, Ada) have/are dieing
out. Are multiple implementations needed in an Open Source world? The answer seems to be no for
Perl and yes for PHP, Ruby etc. The effort needed to create a written specification for the R 
language might be better invested improving the efficiency of the current implementation so
that a better alternative is not needed.

Needless to say the authors suggested committing the fatal programming language research mistake.

The authors have created an interesting set of tools for static and dynamic analysis 
of R and I look forward to reading more about their findings in future papers.

どうなっていくんでしょうねえ R。 Jullia やらも気になるし。

■_ パッチを書く前に

パッチを受け取る側からのお願い?

Before you write a patch, write an email - Perlbuzz


Before you write a patch, write an email
By Andy Lester on April 27, 2012 9:00 AM | 2 Comments

(Originally posted to my non-Perl blog)

I often get surprise patches in my projects from people I've never heard from. I'm not talking
about things like fixing typos, or fixing a bug in the bug tracker. I'm talking about new
features, handed over fully-formed. Unfortunately, it's sometimes the case that the patch
doesn't fit the project, or where the project is going. I feel bad turning down these changes,
but it's what I have to do.

Sometimes it feels like they're trying to do their best to make the patch a surprise, sort of
like working hard to buy your mom an awesome birthday present without her knowing about it. But
in the case of contributing to a project, surprise isn't a good thing. Talking to the project
first doesn't take away from the value of what you're trying to do. This talking up front may
even turn up a better way to do what you want.

(略)

バグフィックスではない、機能拡張のパッチをイキナリ送ってくれるな(それも面識がないのに)。 と。 そらまあそうだろうなあ。 git の pull request だとどうなんだろね。

■_ A Forgotten Principle of Compiler Design

なんかまた Oberon の名前が

A Forgotten Principle of Compiler Design

Programming in the 21st Century

A Forgotten Principle of Compiler Design

That a clean system for separately compiled modules appeared in Modula-2, a programming language
designed by Niklaus Wirth in 1978, but not in the 2011 C++ standard...hmmm, no further comment
needed. But the successor to Modula-2, Oberon, is even more interesting.

#あえて訳さず :)

With Oberon, Wirth removed features from Modula-2 while making a few careful additions. It was
a smaller language overall. Excepting the extreme minimalism of Forth, this is the first
language I'm aware of where simplicity of the implementation was a concern. For example, nested
modules were rarely used in Modula-2, but they were disproportionately complex to compile, so
they were taken out of Oberon.

Oberon では、Wirth は Modula-2 に対していくつかの機能追加を慎重に行った一方で
機能の削除もしています。言語全体は比較的小さなものでした。
Forth の極端なミニマリズム (extreme minimaism) を除けば、Oberon はわたしがその実装の
simplicity に関心を持った最初の言語でした。
#違うか
たとえば、ネストしたモジュールは Modula-2 ではほとんど使われることがなかったにもかかわらず
コンパイルをとんでもなく複雑なものにしてしまっていたので、Oberon では取り除かれたのです。


That simplicity carried over to optimizations performed by the compiler. Here's Michael Franz:

    Optimizing compilers tend to be much larger and much slower than their straightforward
    counterparts. Their designers usually do not follow Oberon's maxim of making things
    "as simple as possible", but are inclined to completely disregard cost (in terms
    of compiler size, compilation speed, and maintainability) in favor of code-quality benefits
    that often turn out to be relatively marginal. Trying to make an optimizing compiler as
    simple as possible and yet as powerful as necessary requires, before all else, a
    measurement standard, by which both simplicity and power can be judged.

    最適化コンパイラーは、その straightforward な counterparts と比べて
    より大きく、より遅いものになる傾向があります。
    そういったコンパイラーの designer たちは大抵 Oberon の maxim of making things である
    「可能な限りシンプルにする」に従っていません。その一方で (コンパイラーのサイズだとか
     コンパイル速度、保守性といった) code-quality benefits に関わるコストを完全に無視しよ
    うとしているのです。
    #ちと無理やり。考え直す
    最適化コンパイラーを可能な限りシンプルにし、かつ必要十分に強力であるように努力することは

    For a compiler that is written in the language it compiles, two such standards are easily
    found by considering first the time required for self-compilation, and then the size of the
    resulting object program. With the help of these benchmarks, one may pit simplicity against
    power, requiring that every new capability added to the compiler "pays its own way"
    by creating more benefit than cost on account of at least one of the measures. 

The principle is "compiler optimizations should pay for themselves."

Clearly it's not perfect (the Oberon compiler doesn't make heavy use of floating point 
math, for example, so floating point optimizations may not speed it up or make it 
smaller), but I like the spirit of it.

(If you liked this, you might enjoy Papers from the Lost Culture of Array Languages.)
permalink April 25, 2012

Modula-2 → Oberon での機能(予約語)削減はいくらなんでもやりすぎな気も。 for なくすとか(といってコンテナーライブラリでごにょごにょということもありません)。 まあ、Modula-2 のモジュールの仕様は複雑すぎるとは思うけど。 あと、中間コードとか実行ファイルのフォーマットなんかもどうにかしないと Modula-2 なり Oberon なりのモジュールの機能をきちんと実装するのは 難しいんじゃないかなあ。

■_ for

予約語 for の起源とは。

【Lua】組み込み系言語総合 その5【Squirrel】

450 デフォルトの名無しさん [sage] 2012/04/16(月) 01:22:26.86 ID: Be:
    Luaの文法がCと違うのは混乱しないために良いのかもしれないけど
    どうせならifとかforとかCの予約語とも重複しないで欲しかったな 

451 デフォルトの名無しさん [sage] 2012/04/16(月) 01:47:42.83 ID: Be:
    配列が1から始まることを忘れちゃってつい0番に値を入れちゃう
    動くから気づかないし 

453 デフォルトの名無しさん [sage] 2012/04/17(火) 22:37:42.93 ID: Be:
    0番に入れるのは間違いとは限らないし
    -1から始まる可能性も忘れてはいけない

    local i = -1
    local t = {[0] = "zeroth", "first", "second"}
    local function f() i = i+1; return t[i] end
    for x in f do print(x) end 

459 デフォルトの名無しさん [sage] 2012/04/20(金) 08:16:19.57 ID: Be:
    if/forの代替になるキーワードって何があるのさ
    俺は全く思いつかん
    こいつらはCの予約語どうのって以前に殆どの言語で共通のキーワードなんだから
    変えたら混乱以前に誰も使う気しなくなるだろ 

460 デフォルトの名無しさん [sage] 2012/04/20(金) 08:36:24.47 ID: Be:
    英語が分からんから記号的にしか捉えられないのだろう。
    すなわち if ~ then でなく if () { のがいいというC脳の発想。そこにユーザーへの愛はない。 

462 デフォルトの名無しさん [sage] 2012/04/21(土) 01:27:33.69 ID: Be:
    >>460
    英語でif~thenなんて文法は存在しない

463 デフォルトの名無しさん [sage] 2012/04/21(土) 08:53:28.79 ID: Be:
    >>462
    そんなこと誰も問題にしてないぞ。どうした? 

465 デフォルトの名無しさん [sage] 2012/04/21(土) 10:34:22.31 ID: Be:
    >>462
    FORTRANの創始者ジョン・バッカスをバカにしてんのか? 

466 デフォルトの名無しさん [sage] 2012/04/21(土) 10:42:31.67 ID: Be:
    if と then はそれぞれ独立して使うもので同時に使うことは英語の文法上ないんだよ
    if ~ then なんて用法はプログラム的文法にすぎない
    日本語に例えてみると
    「もし」「じゃあ」みたいなもんだ
    「もし」フラグが立ったら「じゃあ」実行しよう
    ほらおかしいだろ? 

467 デフォルトの名無しさん [sage] 2012/04/21(土) 11:51:40.64 ID: Be:
    >>466
    If you want a friend then get out of here 

468 デフォルトの名無しさん [sage] 2012/04/21(土) 12:06:23.90 ID: Be:
    「If you don't think you can do it, then you can't.」とか普通にあるな。

469 デフォルトの名無しさん [sage] 2012/04/21(土) 13:54:06.23 ID: Be:
    >>466
    英語わかんないのに何でこんなに自信たっぷりなの? 

470 デフォルトの名無しさん [sage] 2012/04/21(土) 13:59:33.76 ID: Be:
    >>467
    ないない
    通じない

    >>468
    ないない
    通じない

    受験英語覚えて英語覚えた気になってる馬鹿だな 

471 デフォルトの名無しさん [sage] 2012/04/21(土) 15:05:32.33 ID: Be:
    英語の文法で正しいかどうかなんて関係ない
    他のプログラミング言語で事実if ~ then ... という文法が
    広く採用されているってのがポイント
    分岐はプログラムの論理構造の根幹なんだから
    そこにオリジナリティを持つだけ無駄だろ

    お前が英語に詳しいのはわかったから
    それを正しい方向へ生かす努力をしろ 

472 デフォルトの名無しさん [sage] 2012/04/21(土) 16:06:21.59 ID: Be:
    >>466
    どこがおかしいかまったくわからんのだが。
    曲解して無理やりおかしくしてるだけでは。
    「それぞれ独立して使うもの」ではあるが「同時に使ってはならないもの」ではないのだろう?
    そもそも「Luaは英語文法に沿って設計されてます」なんて誰も言ってないぜ?
    仮に文法どおりの究極的な言語できたとしても遅くて実用に耐えないだろうよ

473 デフォルトの名無しさん [sage] 2012/04/21(土) 16:21:32.31 ID: Be:
    then よりもまず for が英語的には意味不明だな

    もともとは while / until / repeat などのキーワードを含む、ALGOL の繰り返し文の
    パラメータ指定用のキーワードだったんだけど、後の言語では繰り返しを意味する
    単語は姿を消して for だけが回数指定繰り返しのキーワードとして残り、
    最終的には foreach というさらに謎の単語が派生して今に至る

BASIC の for ~ to ~ next も Algol から来たんだろか (時期的にはあっても不思議ではない)。 HOPL でなにか言ってたかしらん >BASICの作者

■_

2012年04月28日

■_

ようやく Firefox の異常動作の原因が判明。 拡張(アドオン)でこうまで動作がおかしくなるってのはブラウザー側にも なんかしら対処して欲しい気がするんだけどいい手はないもんですかねえ。

■_

■_ Rakudo

最近追いかけ熱も冷め気味

Announce: Rakudo Star 2012.04 – a useful, usable, “early adopter” distribution of Perl 6 | rakudo.org

Announce: Rakudo Star 2012.04 – a useful, usable, “early adopter” distribution of Perl 6

Posted on 2012.04.26 by moritz	

On behalf of the Rakudo and Perl 6 development teams, I'm happy to announce the April 2012
release of “Rakudo Star”, a useful and usable distribution of Perl 6. The tarball for the
April 2012 release is available from github.

In the Perl 6 world, we make a distinction between the language (“Perl 6″) and specific
implementations of the language such as “Rakudo Perl”. This Star release includes release
2012.04.1 [0] of the Rakudo Perl 6 compiler [1], version 4.3 of the Parrot Virtual Machine [2],
and various modules, documentation, and other resources collected from the Perl 6 community.

Here are some of the major improvements in this release over the previous distribution release.

* much improved startup time

* much more robust module precompilation

* autovivification for arrays and hashes is implemented again

* many phasers like PRE, POST and REDO are now implemented

* improved support for calling C functions and modelling structs and arrays via NativeCall.pm6

* now includes modules URI, LWP::Simple, jsonrpc and Bailador (a Perl 6 portof Dancer)

(略)

■_

"Before you write a patch, write an email - Perlbuzz" http://perlbuzz.com/2012/04/before-you-write-a-patch-write-an-email.html

■_ 犯人は

もういろいろ試して駄目かと思ったところで発見。

Mozilla Firefox 拡張機能スレッド Part68 

322 名無しさん@お腹いっぱい。 [sage] 2012/03/24(土) 18:58:18.04 ID:lfP5fpAd0 Be:
    Firefox 12が出ても次の問題でアドオンが使えない事が分かった

    TabMixPlus と Session Manager この二つが競合して不具合起こしてる
    どっちか単体だけでならば動くのは確認
    (SSアドオン開発者の製作が止まってるのできづいてくれないと修正されない)

    Status4ever を入れるとブックマークツールバーの表示がされなくなる
    一回チェック外してからチェック付け直すと映るけど面倒
    これはアドオン開発者が修正してくれるまで待ち 

326 名無しさん@お腹いっぱい。 [sage] 2012/03/24(土) 22:19:42.98 ID:fl+akDaB0 Be:
    >>322
    それってAiOS入れてるからじゃねーの 

327 名無しさん@お腹いっぱい。 [sage] 2012/03/24(土) 22:48:50.91 ID:WeKu/ge90 Be:
    >>.322
    aiosの設定で高度にして特殊のサイドバーの折り畳みのところのチェックを外せ 

817 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 09:07:57.91 ID:z+K7WbvA0 Be:
    All-in-One Sidebar が強烈に重くなったな…
    ウィンドウをワイドにして、サイドバーは常時表示させる感じで、
    All-in-One Sidebar を外したら快適すぎた。
    ワイド画面になる前から長年慣性的に使っていたけど、もう必要なかったんだな。 

818 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 09:34:26.08 ID:+5jYHqRT0 Be:
    やっぱり重くなってるよな
    と言っても代わりがなくて困った
    Omnisidebarはちょっと感じが違うし 

819 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 11:16:41.94 ID:OWW3bTgH0 Be:
    重すぎたからバージョン元に戻したよ 

821 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 12:27:07.45 ID:i4dBA6Et0 Be:
    >>817-819
    ああ、やっぱりか。俺だけじゃなかったんだな。 

822 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 14:31:21.87 ID:aMJTAqcu0 Be:
    Forumにもいくつかトピック立ってるが、原因はまだ特定できてないようだ。
    とりあえず前バージョンに戻して自動更新切っておくか。
    問題解決したバージョン出たら教えてくれ。 

823 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 16:59:41.76 ID:mAhkWmzt0 Be:
    mPage https://addons.mozilla.org/ja/firefox/addon/mpage/
    っていうiGoogleみたいにRSSを表示してくれるアドオンなんだけど、
    サイトの順番の並び替えがうまくできないのってオレだけかな?

    他にもこんな自分用のページを作れるアドオンあったら教えてほしい。
    (よくいくサイトを表示してくれるアドオン以外で) 

824 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 17:31:48.41 ID:Rokhp9u/0 Be:
    all-in-sidebarはおれもバージョン1個前の使ってるけどそろそろ何か別のものに依存したいな 

825 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 17:44:09.52 ID:dE7UXJMH0 Be:
    ここ最近重かった原因All-in-One Sidebarだったのか

826 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 18:10:57.43 ID:2uVSvpGA0 Be:
    All-in-One Sidebarは14.0a1でも本体の仕様変更でトラブル出てて
    0.7.14/0.7.15両方でブックマークからページが開けない
    何か乗り換えられるアドオンがあれば良いんだけど
    他のアドオンでここまで出来るのは正直ないんだよな 

827 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 18:25:39.45 ID:26arGHcC0 Be:
    何か問題なく動いてるのが嘘みたい<aios0.7.15 

840 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 22:39:15.32 ID:Vq3pWZ260 Be:
    11で使えるBartab的なアドオンありますか?

    Bartabじゃなくても、「browser.sessionstore.max_concurrent_tabs」で設定できてた
    「起動時にタブを読みこまない」ってこと'だけ'が出来ればいいんですが・・・ 

842 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 22:44:34.35 ID:FZPLG16O0 Be:
    >>840
    browser.sessionstore.restore_on_demand 

843 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 22:45:07.37 ID:TfF1FdyV0 Be:
    >>840
    browser.sessionstore.restore_on_demand 

844 名無しさん@お腹いっぱい。 [sage] 2012/04/24(火) 22:49:03.09 ID:Vq3pWZ260 Be:
    >>842-843
    ありがてぇありがてぇ。名前変わってたのか。 

865 名無しさん@お腹いっぱい。 [sage] 2012/04/25(水) 12:54:36.85 ID:exWZnbz60 Be:
    All-in-One Sidebarだったのか重い原因
    0.7.14に戻して快適だわ 

978 名無しさん@お腹いっぱい。 [sage] 2012/04/28(土) 08:16:18.73 ID:Ia4pHJJ60 Be:
    もうAiOSもTMPも正式版出てからでいいわ
    Fx11で何も困らんし 

979 名無しさん@お腹いっぱい。 [sage] 2012/04/28(土) 08:19:53.88 ID:NvLSYMbe0 Be:
    でも脆弱性あるからね 

981 名無しさん@お腹いっぱい。 [] 2012/04/28(土) 09:06:52.43 ID:mGRBndVu0 Be:
    aiosは7.14に落として「サイドバーを折りたたむ」を無効にしたら、殆ど何の問題も無く
    使えてる。最初は俺の低スペがFirefox12に耐えられなくなったのかと思っていたが、原因が
    あると分かってよかったよw 

ぐぐっても 3.6 時代の記事が結構ひっかかって往生した。 症状自体は昔からあるのよねえ>CPUパワー馬鹿食い

2012年04月27日

■_

まだはまってます。 まともに動きゃあしない。 Firefox12キタ━━━━━━━━(゚∀゚)━━━━━━━━!!

■_

■_

G.W.

2012年04月26日

■_

Firefox と悪戦苦闘中

■_

Julia。

New Julia language seeks to be the C for scientists

New Julia language seeks to be the C for scientists
By Paul Krill
Created 2012-04-18 03:00AM

Julia is a new programming language being developed for building technical applications. In
its early stages, Julia has been used in such applications as image analysis and linear algebra
research. The language is the brainchild of developer Stefan Karpinski, along with Jeff
Bezanson and Viral Shah. InfoWorld Editor at Large Paul Krill recently got the lowdown on Julia
during an interview with Karpinski.

InfoWorld: When did you develop Julia, and what was the main intention in developing it?

Karpinski: We started talking in August 2009. Viral put Jeff and me in contact, and we started
talking about our frustrations with technical computing languages. Primarily, one of them being
that you just have to use so many different languages for different things because they're all
good at one thing but not good at everything. You end up having to switch languages a lot.

(略)

■_

Julia もうひとつ

Julia, Python and Cython - julia-dev | Google グループ

Hi Julia-dev list,

I'm one of the core developers of Cython, a tool for translating Cython
code (a blend of Python and C) into C code using the CPython API,
loadable into the standard CPython interpreter. It's become somewhat of
a de facto standard in the scientific Python community when Python
itself isn't enough.

I recently learned about Julia -- and so far I love it! Congratulations!

To some of the Cython developers and users, Cython has been something of
a stop-gap solutions. It gets the job done, but it's not pretty. So
while I have invested lots of time in Cython and have a heavy emotional
investment as well, I still wish for Cython to be swept away -- or the
need for it to disappear.

What I hope can be done here is to avoid walled gardens. We already have
R and Python as somewhat separate open source gardens (although Python
folks will occasionally call into R) and it's very destructive. Open
source computation doesn't have more cycles than we need!

I believe Julia and Python is a match made in heaven:

(略)

■_

  • gnu makeの変数を全てダンプする - karasuyamatenguの日記
  • Crazy for life(セイカツ イチバン、IT ニバン): 知的エンジニアライフの方法 (5)休み方
  • 2012年04月25日

    ■_

    この質問、なかなか面白いと思う(どう答えるか。が) コンピュータがプログラムによって自由に動く仕組みが、いまいち理解できません。 ... - Yahoo!知恵袋

    ■_

    ■_

    うがーっ12に上げたらまともにうごきゃあしねえ(やたらと反応がなくなる(ハングアップではない))

    2012年04月24日

    ■_

    日経ソフトウエア、見た目がなんか変わってる。

    ■_

    ■_ おべろん

    リンク先のpdf読むと結構ほめてる。 Oberon(とOberon-2)は確かに面白いところがあるんだけど、 ちょっと「やりすぎ」な感じもするんだよねえ。

    Oberon - The Oberlooked Jewel | Hacker News
    
    Having grown up on Borland Pascal, I have a sentiment for Pascal and its derivatives. I
    enjoyed programming in BP, and I'm not too happy that Pascal derivatives lost their popularity
    to C derivatives. (I was reading a bit about Modula 3 and got quite intrigued by its module
    system.)
    
    But, users are few, fragmentation is high (Borland Pascal/Delphi, Object Pascal, Component
    Pascal; Modula-2 and Modula-3; Oberon, Oberon-2, Oberon-07, Active Oberon, Zonnon). How the
    heck are you supposed to choose when all those languages taken together have probaby about
    user base as "large" as that of common lisp? Plus, Oberon webpages at ETH look
    like abandoned.
    
    
    
    Delphi is very popular outside of the U.S: http://www.google.com/trends/?q=delphi,lisp
    
    (I'll leave it to others to correct my Google Trends query to the proper search terms for
    Lisp variants -- or it could be that Lisp programmers tend not to Google their own language much :) )
    
    
    
    In two decades as a professional programmer, I have only ever heard glowing remarks 
    from Delphi developers about their environment. Certainly Eclipse and even Smalltalk 
    can't match that.
    
    
    
    Delphi 6 and 7 were the best IDE's of their time, way better than Visual Studio 6. The 
    language was great for the time, there was a vibrant community around it, you could 
    find a component for everything. Borland also shipped the sources for their main 
    library, VCL, which helped a lot when debugging. It was the best way to do Rapid 
    Application Development.
    
    Unfortunately, the company lost it's focus, they've tried to move to .net and the next 
    few versions of the IDE were really buggy. The language also lagged behind C#/Java, 
    they didn't add full Unicode support until 2009, for example.
    
    
    
    They're no longer lagging. The most recent version has a new ui framework that is 
    hardware accelerated and cross-platform (a pretty unique combination). You can even 
    make iOS apps with it.
    
    
    I'm happy that Pascal lost:
    
    - Everything new that Pascal had (record file io, for example) were suboptimal. Everything
    useful in Pascal came from C (including loop controls).
    
    - Useful things from C are bolted on Pascal in gross, inconsistent and ugly way. E.g. break;
    loop construct is a procedure! Lol, what?
    
    
    
    > loop construct is a procedure! Lol, what?
    
    Common Lisp's loop is a macro, Smalltalk's are method calls (with blocks), work fine.
    
    That's not the case in Pascal though. Neither `for` nor `while` are procedures, as in C
    they're special forms of the language.
    
    
    
    Macro is okay. Procedure is not okay. Break is a procedure.
    
    
    
    > Macro is okay. Procedure is not okay. Break is a procedure.
    
    Why do you believe this to matter? Smalltalk's signaling and exception handling (both `catch`
    and `finally` equivalent) uses regular messages and blocks (with hooks into the interpreter
    obviously). What value do you see in making special syntax things which need not be so, ease
    of "optimizations" (such as compiling a block to a jump)?
    
    

    例によって議論はあさっての方向に進んでいくのでした。 Oberonシステムいじってみたいなあ。

    2012年04月23日

    ■_

    耳鼻科。 だいぶ良くはなってるみたいなんですが、 もう一週間投薬(種類は減った)

    ■_

    ておくれそのいち

    すでに話題になってたという意味で。

    Adam Petersen - Software Articles
    Adam Petersen - Software Development Pages, Articles Section 
    Start News Articles Book Reviews 
    
    Solving FizzBuzz using compiler error messages 
    
    Using C++ template metaprogramming, I'll try to solve FizzBuzz by having the compiler output
    the solution as error messages. 
    
    (略)
    
    #include <iostream> 
    
    #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS 
    #define BOOST_MPL_LIMIT_VECTOR_SIZE 110 
    
    #include "boost/mpl/if.hpp" 
    #include "boost/mpl/int.hpp" 
    #include "boost/mpl/vector.hpp" 
    #include "boost/mpl/push_back.hpp" 
     
    using namespace std; 
    using namespace boost::mpl; 
     
    struct Fizz{}; 
    struct Buzz{}; 
    struct FizzBuzz{}; 
     
    template<int i> 
    struct RunFizzBuzz 
    { 
     typedef vector<int_<i> > Number; 
     
     typedef typename if_c<(i % 3 == 0) && (i % 5 == 0), FizzBuzz, 
     typename if_c<i % 3 == 0, Fizz, 
     typename if_c<i % 5 == 0, Buzz, Number>::type>::type >::type t1; 
     
     typedef typename push_back<typename RunFizzBuzz<i - 1>::ret, t1>::type ret; 
    }; 
     
    template<> 
    struct RunFizzBuzz<0> // Terminate the recusion. 
    { 
     typedef vector<int_<0> > ret; 
    }; 
     
    int main() 
    { 
     typedef RunFizzBuzz<100>::ret::compilation_error_here res; 
    } 
     
    This program is impossible to outperform with respect to run-time performance; it will actually
    never run! And here's the nice touch: the program will deliberately not even compile! The
    interesting part is that as error message, the compiler outputs the FizzBuzz solution. Look at
    the highlighted parts below: 
     
    \Main.cpp(36) : error C2039: 'compilation_error_here' : is not a member of  'boost::mpl::vector101 <SNIP long argument list>' 
     with 
     [ 
     T0=boost::mpl::int_<0>, 
     T1=boost::mpl::vector<boost::mpl::int_<1>>, 
     T2=boost::mpl::vector<boost::mpl::int_<2>>, 
     T3=Fizz, 
     T4=boost::mpl::vector<boost::mpl::int_<4>>, 
     T5=Buzz, 
     T6=Fizz, 
     T7=boost::mpl::vector<boost::mpl::int_<7>>, 
     T8=boost::mpl::vector<boost::mpl::int_<8>>, 
     T9=Fizz, 
     T10=Buzz, 
     T11=boost::mpl::vector<boost::mpl::int_<11>>, 
     T12=Fizz, 
     T13=boost::mpl::vector<boost::mpl::int_<13>>, 
     T14=boost::mpl::vector<boost::mpl::int_<14>>, 
     T15=FizzBuzz, 
     <SNIP of elements 16 - 95> 
     T96=Fizz, 
     T97=boost::mpl::vector<boost::mpl::int_<97>>, 
     T98=boost::mpl::vector<boost::mpl::int_<98>>, 
     T99=Fizz, 
     T100=Buzz 
     ] 
     
    How it works 
    (略) 
    
    
    
    ©2005 Adam Petersen adam@adampetersen.se 
    
    

    詳しい解説は元記事を。 エラーメッセージで FizzBuzz をという話でした。

    ■_ 猫でも

    回答者のあげた項目がやけに具体的なんだけどどれがどの本にあるものだろう とか気になったりして。

    猫でもわかるC言語の本で勉強された方教えてー;_; | OKWave
    
    猫でもわかるC言語を勉強しています
    
    Microsoft Visual C++2008 Express Edition のバージョンのコンパイラで
    
    第5章のscanf関数のところで困っていることになっていますsos
    本の通りに
    
      /*scan01.c*/
    
      #include <stdio.h>
    
      int main()
      {
          int seisu;
     
          printf("整数値を入力してください----125");
          scanf("%d",&seisu);
          printf("あなたの入力した数値は%dですね",seisu);
    
          return 0;
      }
    と書いてビルドをしても警告1になります、あと
    
      /*scan01.c*/
    
      #include <stdio.h>
      #define _CRT_SECURE_NO_DEPRECATE
    
      int main()
      {
           int seisu;
    
           printf("整数値を入力してください----125");
           scanf_s("%d",&seisu);
           printf("あなたの入力した数値は%dですね",seisu);
    
           return 0;
      }
    
    と書いてもエラーや警告は0になるけどデバッグ→デバッグなしで開始でいつもどうりに画面に
    (コマンド プロンプト?っぽいやつに)出力をすると本の通りに
    
    整数値を入力してください----125
    あなたの入力した数値は125ですね
    
    とならず
    
    整数値を入力してください----125
    
    だけが出力されます(コマンド プロンプトに)・・・
    みなさんはどうやって突破したの!?いや、されたのッ!!!それともいらってはいないんですけどコンパイラの設定が悪いんでしょうか?;_;
    
    何をどこをヘルプしたらいいやら分かりません教えてください先輩僕は一体どうしたらいいの!!!!
    これ以降いっぱいscanfのこといっぱい出るのにぃ~~OTL←やっぱ僕これになるんでしょうかね・・。
    
    
    ANo.4
    
    >猫でもわかるC言語の本で勉強された方教えてー;_; 
    「猫でもわかるC言語」はゴミ本です、今すぐ捨てて書いてあったことは全て忘れ別の本で勉強しなおしましょう。
    
    本を選ぶときは、以下のような記述をしている本は絶対に避けてください。
    (1)if(式)文;else文;
    (2)do 文;while(式);
    (3)do 文;while(式)
    (4)「goto文はラベルへ飛ぶ」と書き、ラベルの定義を「ラベル名:」とする
    (5)exit文、書式は「exit 式;」、使うにはstdlib.hが必要
    (6)a<b<cがコンパイルエラーになる
    (7)double intと宣言
    (8)scanf文、printf文などの記述
    (9)熟練者は「*p++=toupper(*p);」と書くと記述
    (10)do 文 文 文 while(式);などと「do」と「while」の間に複数の文を書ける
    (11)do{文}while(式);などと「{}」が必要
    (12)(10)と(11)を同一人物が別の本で書く
    (13)a<bの結果が0、1以外の値が返る
    (14)文字列の最後は文末コード
    (15)if(!expr)goto label;... /* 処理 */label;
    (16)「~」文字がC言語では未使用
    (17)「^=」演算子は右辺を反転したものを左辺に代入する
    (18)for(文 式;式)文
    (19)','で区切られた式は右から評価する
    (20)#define文、#include文などの記述
    (21)printfにはdouble専用の書式は無いと記述
    
    (A)printf("%lf",double型の式);
    (B)floatの出力には%f、doubleの出力には%lf、と書きながら浮動小数の出力は%e、%gだと書いてある。
    
    (a)0<n<16という式を使う
    (b)int func(int n){int d;d=1/n;return d;}というサンプルを作る
    (c)関数形式マクロの説明で「パラメータに括弧をつける」と「全体に括弧をつける」の片方だけの記述
    
    (1)~(21)は文法の基本を知らないバカが書く記述です。
    (A)~(B)関数への引数渡しの基本を知らない人間の記述です。
    (a)~(c)は単なるどじでしょう。
    
    

    ■_

    SCM Boot Camp in Nagoya に行ってきた・・・と見せかけた SML# の多相レコードの話 - 予定は未定Blog版

    $ smlsharp
    SML# version 1.0.0 (2012-04-06 17:51:49 JST) for x86-mingw
    # 1 + 1;
    Creating library file: \s4ug./000.lib
    val it = 2 : int
    #
    
    SCM Boot Camp in Nagoya に行ってきた・・・と見せかけた SML# の多相レコードの話 - 予定は未定Blog版
    
    現在のバージョンの SML# は C ドライブ直下に一時ファイルの置き場を作って、そこに .lib やら
    .o やら .s (!) やら .so やらを出力します。
    
    この置き場は実行毎に異なり、今回の場合は「s5cc」というフォルダが作られます (1 行目にフォルダ
    名が出力されている)。
    
    対話環境を終了 (Ctrl+c) させても消えないので、自分で消すようにしましょう。
    

    ということがあるらしいのでソースを見てみた

    まずは main() があるところから

    main.c
    
    /**
     * main.c
     * @copyright (c) 2007-2009, Tohoku University.
     * @author UENO Katsuhiro
     * @version $Id: $
     */
    
    #include <stdio.h>
    #include "smlsharp.h"
    
    /* entry point of SML# object file. */
    void SMLmain(void);
    
    int
    main(int argc, char **argv)
    {
    	sml_init(argc, argv);
    
    #if 0
    	__asm__ volatile ("movl $0xaa55aa55, %%eax\n\t"
    			  "subl $0x4000, %%esp\n\t"
    			  "movl %%esp, %%edi\n\t"
    			  "movl $0x4000, %%ecx\n\t"
    			  "cld\n\t"
    			  "rep\n\t"
    			  "stosb\n\t"
    			  "addl $0x4000, %%esp\n\t"
    			  : : : "edi", "eax", "ecx", "cc", "memory");
    #endif
    
    	SMLmain();
    
    	sml_finish();
    	return 0;
    }
    
    

    なんで "stosb" なんだろうかという疑問はおいといて SMLmain を探す。

    (**
     * GenerateMain.sml
     * @copyright (c) 2011, Tohoku University.
     * @author UENO Katsuhiro
     *)
    structure GenerateMain : sig
    
      val generate : AbsynInterface.interfaceName list -> string
      val mainSymbol : AbsynInterface.compileUnit -> {mainSymbol: string}
    
    end =
    struct
    
      fun makeMainSymbol ({hash,...}:AbsynInterface.interfaceName) =
          "SMLmain" ^ hash
    
      fun mainSymbol ({interface={interfaceName,...}, topdecs}
                      : AbsynInterface.compileUnit) =
          case interfaceName of
            NONE => {mainSymbol = "SMLmain"}  ← ※※これ?
          | SOME name => {mainSymbol = makeMainSymbol name}
    
      fun escape s =
          String.translate
            (fn c => if Char.isAlphaNum c orelse c = #"_"
                     then str c
                     else if ord c < 256
                     then "\\" ^ StringCvt.padLeft #"0" 3 (Int.toString (ord c))
                     else raise Control.Bug "escape")
            s
    
      fun generate interfaceNames =
          let
            val _ =
                foldl
                  (fn ({hash, sourceName, place}, map) =>
                      case SEnv.find (map, hash) of
                        NONE => SEnv.insert (map, hash, sourceName)
                      | SOME prevName =>
                        raise UserError.UserErrorsWithoutLoc
                                [(UserError.Error,
                                  GenerateMainError.HashConflict
                                    (prevName, sourceName, hash))])
                  SEnv.empty
                  interfaceNames
    
            val decs =
                map (fn name =>
                        let
                          val mainSymbol = escape (makeMainSymbol name)
                        in
                          "val _ = (_import \"" ^ mainSymbol ^ "\" : () -> ()) ()\n"
                        end)
                    interfaceNames
          in
            String.concat decs
          end
    end
    
    

    さらに潜っていくと

    RunLoop.sml
    
    (**
     * interactive program execution
     *
     * @copyright (c) 2011, Tohoku University.
     * @author UENO Katsuhiro
     *)
    structure RunLoop : sig
    
      type options =
           {asmFlags : string list,
            systemBaseDir : Filename.filename,
            stdPath : Filename.filename list,
            loadPath : Filename.filename list,
            LDFLAGS : string list,
            LIBS : string list,
            errorOutput : TextIO.outstream}
    
      datatype result = SUCCESS | FAILED
    
      val available : unit -> bool
      val run : options
                -> Top.toplevelContext
                -> Parser.input
                -> result * Top.newContext
      val interactive : options -> Top.toplevelContext -> unit
    end =
    struct
    (略)
      fun run ({asmFlags, stdPath, loadPath, LDFLAGS, LIBS, errorOutput, ← この関数に降りてくる?
                ...}:options) context input =
          let
            fun puts s = TextIO.output (errorOutput, s ^ "\n")
            val options = {stopAt = Top.NoStop,
                           dstfile = NONE,
                           baseName = NONE,
                           stdPath = stdPath,
                           loadPath = loadPath,
                           asmFlags = asmFlags}
    
    
            val (_, result) =
                Top.compile options context input
                handle e =>
                (
                 case e of
                   UserError.UserErrors errs =>
                   app (fn e => puts (userErrorToString e)) errs
                 | UserError.UserErrorsWithoutLoc errs =>
                   app (fn (k,e) => puts (userErrorToString (Loc.noloc,k,e))) errs
                 | Control.Bug s => puts ("Compiler bug:" ^ s)
                 | exn => puts "Compilation failed."
                ;
                raise CompileError Top.emptyNewContext
                )
            val (newContext, code) =
                case result of
                  Top.RETURN (newContext, Top.FILE code) => (newContext, code)
                | Top.STOPPED => raise Control.Bug "run"
          in
            let
              val sofile = TempFile.create "so"   ←※※※
              val ldflags =
                  case SMLSharp_Version.HostOS of
                    SMLSharp_Version.Unix => nil
                  | SMLSharp_Version.Windows =>
                    ["-Wl,--out-implib="
                     ^ Filename.toString (Filename.replaceSuffix "lib" sofile)]
              val libfiles =
                  case SMLSharp_Version.HostOS of
                    SMLSharp_Version.Unix => nil
                  | SMLSharp_Version.Windows =>
                    map (fn x => Filename.toString (Filename.replaceSuffix "lib" x))
                        (!loadedFiles)
              val _ = BinUtils.link
                        {flags = SMLSharp_Config.RUNLOOP_DLDFLAGS () :: LDFLAGS
                                 @ ldflags,
                         libs = libfiles @ LIBS,
                         objects = [code],
                         dst = sofile}
                        
    
    

    で、一時ディレクトリを作る辺り

    TempFile.sml
    
    (**
     * temporary file management
     * @copyright (c) 2010, Tohoku University.
     * @author UENO Katsuhiro
     *)
    structure TempFile : sig
    
      (* takes a template of filename, and generates a fresh filename based on
       * the template, and create a file of that name.
       * The template must be of the form "<base>.<suffix>". ".<suffix>" may be
       * omitted. If the template is empty string, a random name will be used.
       *)
      val create : string -> Filename.filename
    
      val cleanup : unit -> unit
    
    end =
    struct
      val mktempRetryCount = 5
      val tmpDir = ref NONE : Filename.filename option ref
      val tmpFiles = ref nil : Filename.filename list ref
      val tmpFileCount = ref 0
    
      fun mktemp_d retry =
          if retry <= 0
          then raise Fail "failed to make temporally directory"
          else
            let
              (*
               * Basis Library specification says that OS.FileSys.tmpName creates
               * a new file. tmpName of SML/NJ for UNIX doesn't create a file
               * because it is implemented by tmpnam(3).
               *)
              val tmpname = OS.FileSys.tmpName ()
              val tmpname = Filename.fromString tmpname
            in
              (CoreUtils.rm_f tmpname;
               CoreUtils.mkdir tmpname;
               tmpname)
              handle OS.SysErr _ => mktemp_d (retry - 1)
            end
    
      fun tmpDirName () =
          case !tmpDir of
            SOME dir => dir
          | NONE =>
            let
              val dirname = mktemp_d mktempRetryCount
            in
              tmpDir := SOME dirname;
              dirname
            end
    
      fun split template =
          let
            val ss = Substring.full template
            val (base, suffix) = Substring.splitr (fn c => c <> #".") ss
            val base = Substring.dropr (fn c => c = #".") base
          in
            (Substring.string base, Substring.string suffix)
          end
    
      fun makeFilename (dir, base, suffix, seqno) =
          let
            val num = StringCvt.padLeft #"0" 3 (Int.fmt StringCvt.DEC seqno)
            val base = if base = "" then num else base ^ "-" ^ num
            val filename = Filename.fromString base
            val absname = Filename.concatPath (dir, filename)
          in
            if suffix = "" then absname else Filename.addSuffix (absname, suffix)
          end
    
      fun freshName template =
          let
            val dir = tmpDirName ()
            val (base, suffix) = split template
            fun loop () =
                let
                  val filename = makeFilename (dir, base, suffix, !tmpFileCount)
                in
                  if CoreUtils.testExist filename
                  then (tmpFileCount := !tmpFileCount + 1; loop ())
                  else filename
                end
          in
            loop ()
          end
    
      fun create template =
          let
            val filename = freshName template
          in
            CoreUtils.newFile filename;
            tmpFiles := filename :: !tmpFiles;
            filename
          end
    
      fun cleanup () =
          (
            app CoreUtils.rm_f (rev (!tmpFiles));
            Option.map CoreUtils.rmdir_f (!tmpDir);
            tmpDir := NONE;
            tmpFiles := nil;
            tmpFileCount := 0
          )
    
    end
    
    

    prim.c
    
    	/* standard C library functions for basis library implementation */
    	/* ANSI */
    	{"ldexp", (primfn*)ldexp},
    	{"sqrt", (primfn*)sqrt},
    	{"sin", (primfn*)sin},
    	{"cos", (primfn*)cos},
    	{"tan", (primfn*)tan},
    	{"asin", (primfn*)asin},
    	{"acos", (primfn*)acos},
    	{"atan", (primfn*)atan},
    	{"atan2", (primfn*)atan2},
    	{"exp", (primfn*)exp},
    	{"pow", (primfn*)pow},
    	{"log", (primfn*)log},
    	{"log10", (primfn*)log10},
    	{"sinh", (primfn*)sinh},
    	{"cosh", (primfn*)cosh},
    	{"tanh", (primfn*)tanh},
    	{"floor", (primfn*)floor},
    	{"ceil", (primfn*)ceil},
    	{"round", (primfn*)round},
    	{"modf", (primfn*)modf},
    	{"frexp", (primfn*)frexp},
    	{"strerror", (primfn*)strerror},
    	{"getenv", (primfn*)getenv},
    	{"free", (primfn*)free},
    	{"system", (primfn*)system},
    	{"tmpnam", (primfn*)tmpnam},
    	{"remove", (primfn*)remove},
    	{"rename", (primfn*)rename},
    
    	/* C99 */
    
    

    tmpnam を使っているっぽい。けどこの関数 deprecate だよねえ。

    などと書いていたら、24日にこの問題が修正された1.0.1がリリースされたとさ ○| ̄|_

    ■_

    2012年04月22日

    ■_

    今日も今日とて各所でいろいろ勉強会とか読書会とか。 あれは行きたかったが以下略

    読んだ
    参謀―落合監督を支えた右腕の「見守る力」
    参謀―落合監督を支えた右腕の「見守る力」

    山井の完全試合目前での投手交替の話とかあって、なかなか楽しく読めた。 実際、落合が彼をあれだけ高く買っている理由というのはやっぱりわからなかったのだけど、 ドミンゴやウッズが彼を慕ってベイスターズから移った(移籍を希望した)って辺りにあるのかなあと。 それに関連してドミニカに選手探しに行ったエピソードも面白かった。 モツ鍋屋(中野渡)の本のときもそうだったけど、 人脈って大切ですね。と。

    ■_ 欧州

    vなんとかさんが現れる流れ?

    【怪奇の事件は】電人ザボーガーVol.4【Σの仕業】 
    
    461 どこの誰かは知らないけれど [sage] 2012/04/21(土) 22:47:59.00 ID:7WkiyA5l Be:
        Σ団のブロック分けって、ざっくりなのかな。
        イギリスブロック、ヨーロッパブロックって。
    
        イギリスはヨーロッパとは違うのか…。 
    
    462 どこの誰かは知らないけれど [sage] 2012/04/21(土) 23:05:26.13 ID:XPVHGEF1 Be:
        俺的には、そこに対しては渋い設定だなーと思ったよ。 
    
    463 どこの誰かは知らないけれど [sage] 2012/04/21(土) 23:36:43.08 ID:TokzmNZk Be:
        W杯でイングランドとスコットランドが分かれてるみたいな
        何か深い理由があるんだろうw
    
        しかし幹部のキャラ立ち(まだ見た目だけだが)と
        ネーミングセンスは実に素晴らしいな 
    
    464 どこの誰かは知らないけれど [sage] 2012/04/22(日) 01:18:45.14 ID:Zt/YNMi8 Be:
        大陸と島で分けたんじゃね? 
    
    465 どこの誰かは知らないけれど [sage] 2012/04/22(日) 03:46:38.78 ID:7Bg5ZS0k Be:
        イギリス>ヨーロッパなのか、ヨーロッパ>イギリスなのか。
    
        それはそうと、ゴリコングに拉致られてハァハァ(;´д`)な美代ちゃんは
        次回、絶叫美人ぶりを見せてくれるん?
    
        星野みどりさんの診断結果
        ttp://naruken.info/ishiyama/search/星野みどり
    
        【楽天市場】八女かぶせ茶 『星野みどり』:たがの園
        ttp://item.rakuten.co.jp/taganoen/10000003/ 
    
    

    ■_ SML#

    SML# - SML#のダウンロード ようやくソースコードをダウンロード。 読む時間をどうにかしないと。

    んで、

    SML# - How to build SML#
    
    How to build SML#
    
    This page describes how to build SML# 0.60 series and version 0.90 from the source tarball.
    
    Build on UNIX like systems (including Mac OS X)
    
    Prerequisites
    
    SML/NJ or MLton
        Necessary to build SML# compiler and extra tools. Required version is SML/NJ 110.65 or above,
        or MLton-20100608 or above. The latest version is recommended.
    
    GNU MP Bignum Library
    
        Necessary to build SML# runtime system. Both version 4 series and version 5 series are OK,
        but note that SML# requires 32-bit build. This version of SML# supports only 32-bit mode.
    
    C++ compiler (only for 0.60 series)
        Necessary to build SML# virtual machine. It must be able to generate 32-bit code. GCC is recommended.
    
    ISO C99 compiler
    
        Necessary to build SML# native runtime library. It must be able to generate 32-bit code. GCC is recommended.
    
    POSIX compatible commands and tools
    
        A Bounce shell, make, sed and standard file commands are needed to build SML#. We have been
        writing Makefiles only with standard features so that SML# can be built on any UNIX like
        systems. If you have some trouble in Makefile, please let us know and use GNU tools for the
        time being. 
    
    (略)
    

    MinGW 版はすでにあるみたいだけど、自前ビルドで GMP いるのかー。

    ■_ Use and Abuse of Garbage Collected Languages

    面白そうなタイトルなのであとで読む。

    Use and Abuse of Garbage Collected Languages
    
    Programming in the 21st Century
    
    Use and Abuse of Garbage Collected Languages
    
    The garbage collection vs. manual memory management debates ended years ago. As with the
    high-level vs. assembly language debates which came before them, it's hard to argue in favor of
    tedious bookkeeping when there's an automatic solution. Now we use Python, Ruby, Java,
    Javascript, Erlang, and C#, and enjoy the productivity benefits of not having to formally
    request and release blocks of bytes.
    
    But there's a slight, gentle nagging--not even a true worry--about this automatic memory
    handling layer: what if when my toy project grows to tens or hundreds of megabytes of data,
    it's no longer invisible? What if, despite the real-time-ness and concurrent-ness of the
    garbage collector, there's a 100 millisecond pause in the middle of my real-time application?
    What if there's a hitch in my sixty frames per second video game? What if that hitch lasts two
    full seconds? The real question here is "If this happens, then what can I possibly do about it?"
    
    以下略
    

    こちらもあわせて。 Use and Abuse of Garbage Collected Languages : programming

    ■_

    ■_

    C言語なら俺に聞け(入門編)Part 100
    
    672 デフォルトの名無しさん [sage] 2012/04/22(日) 11:46:28.31 ID: Be:
    
        if (1) goto A; else goto B;
    
        A:
        nop();
        goto END;
    
        B:
        nop();
        goto END;
    
        END:
    
        上記のC風ソースコードを、アセンブラコードへと変換するプログラムを書く。
    
        gotoをpc命令へ変換するとして、ifの時点ではラベルのアドレスが不明。
        どのようにしてアセンブラコードへ変換すればいいか。
    
    673 デフォルトの名無しさん [sage] 2012/04/22(日) 11:51:22.93 ID: Be:
        アドレス解決はアセンブラがやってくれるはずだが…
    
        まあ、「アセンブラコード」とか言う意味不明のこと言い出す奴だかなぁ… 
    
    674 はちみつ餃子 ◆8X2XSCHEME [sage] 2012/04/22(日) 11:52:05.45 ID: Be:
        2パスで処理すりゃいいだろ。 
    
    675 デフォルトの名無しさん [sage] 2012/04/22(日) 11:57:09.32 ID: Be:
        アセンブラコードの宿命はよ
    
    

    つ「バックパッチ」(バックパッチング)

    バイナリオブジェクトを直接出力したいとして。だけど。

    2012年04月21日

    ■_

    喉やら鼻はだいぶよくなってるんですが、耳の方は今ひとつ。

    ■_ Code blocks in Python

    Python でブロックを。的な。

    Code blocks in Python « Computer Science
    
    
    Code blocks in Python
    
    Posted by mtomassoli on April 20, 2012
    
    Introduction
    
    As anyone knows, Python doesn't support code block objects: you can't create and pass around
    anonymous blocks of code. That's a pity and in fact many coders have suggested workarounds.
    Some tried to introduce proper code blocks by manipulating byte codes, while others proposed to
    use lambdas with concatenated expressions so as to emulate multi-statement blocks.
    
    誰もが知っているように Python はコードブロックをサポートしておらず、
    名前を持たないコードのブロックを作ったり渡したりすることができません。
    これは pity であり、多くの coder がワークアラウンドを提案してきています。
    中にはバイトコードを操作することによって proper なコードブロックを導入しようとする人もいましたが
    マルチステートメントのブロックをエミュレートするための
    concatenated expression を使った lambda を提案したものもありました。
    
    Unfortunately, these attempts, while very interesting and clever, can't be used in production
    code because of their many limitations and oddities. I tried many approaches myself, but none
    was perfect: one didn't support ‘nonlocal', the other was slow, and so on…
    
    残念なことに、これらの試みは very intersting かつ clever である一方で
    prodcution code では使えないものでした。
    なぜならそれには多くの制限と oddities (変なところ?) があるからです。
    わたしはさまざまなアプローチを試してみましたが完全なものはありませんでした。
    あるものは 'nonlocal' をサポートしていませんでしたし、
    あるものは遅く、あるいは…何かしらの問題があったのです。
    
    Finally, I went for source code rewriting and I'm quite satisfied with the result.
    
    結局、わたしはソースコードを rewrite する方向に行って、満足する結果を得たのです。
    
    Here are the main features:
    
        code blocks act as normal functions/closures (you can use return, yield, global and nonlocal inside of them)
        コードブロックは普通の関数やクロージャのように振舞います
        (コードブロック中で return, yield, global, nonlocal を使えます)
    
        the source code is rewritten, on-the-fly, in RAM: no files are created or modified
        ソースコードは RAM の中で on-the-fly で rewrite されます。
        ファイルを生成したり修正したりはしません。
    
        syntax errors related to the new syntax generate meaningful error messages
        新しい構文に関係する構文エラーは meaningful なエラーメッセージを生成します
    
        error messages refer to your code and not the module codeblocks
        エラーメッセージはモジュールのコードブロックではなくあなたのコードを参照します。
    
        debuggers break on your code as it should be
        デバッガーはそうあるべきようにあなたのコードでブレークします
    
        stepping and tracing through your code behave as expected
        あなたのコードに対するステッピングやトレーシングは期待通りに動きます
    
        codeblocks doesn't mess with the importation process
    
        codeblocks doesn't manipulate byte code and should be quite portable
    
        codeblocks works with both Python 2.7 and Python 3.2 (but nonlocal is not supported in Python 2.7)
    
    Repository
    
    You can download (and contribute to, if you wish) this module from bitbucket.
    
    The docstring of the module offers a more technical documentation and the exact rewriting rules
    applied to the original code.
    
    A little example
    
    	def each(iterable, block):
    	    for e in iterable:
    	        block(e)                        # step into -> 6:
    	 
    	with each(range(0, 10)) << 'x':
    	    print('element ' + str(x))
    
    That with statement is a special statement that
    
        creates an anonymous function anon_func which takes an argument x and has line 6 as its body,
        passes anon_func as a positional argument to the function each,
        executes each with all its arguments (the one given at line 5 and the block)
    
    
    以下略
    
    

    ■_ Lisp Hackers: Pascal Costanza

    Lisp Hakcer へのいんたびう

    Lisp, the Universe and Everything: Lisp Hackers: Pascal Costanza
    
    2012-04-16
    
    Lisp Hackers: Pascal Costanza
    
    Pascal Costanza is a researcher, and an active Common Lisp programmer and community enthusiast:
    
    
        he's the maintainer of Closer to Mop library, that provides a common facade to the MOP
        implementation in different Lisps, and is the basis of some of his more advanced libraries
        like: ContextL and FilteredFunctions;
    
        the originator of Common Lisp Document Repository (CDR) project, that collects proposals
        for improving the language (a la JCP for Java or PEP for Python);
    
        and the author of a Highly Opinionated Guide to Lisp, which can serve as introductory text
        for those, who come from other languages. (It was quite a useful text for me, when I
        started studying Lisp.)
    
    (略)
    
    What you dislike the most about Lisp?
    
        There is not much to dislike about Lisp itself. There are some technical details here and
        there, some minor inconsistencies, but nothing that cannot be fixed in easy and
        straightforward ways. From a purely conceptual point of view, Common Lisp is one, if not
        the most complete and best integrated programming language that covers a lot of ground.
        Some rough edges are just to be expected, because nothing is ever perfect.
    
        What concerns me a lot more is that there is too much unwarranted arrogance in the Lisp
        community. I don't know exactly where this comes from, but some Lispers seem to believe,
        just because they understand some Lisp concepts, that they are much smarter than anybody
        else in the universe. What they are forgetting is that computer science as a discipline is
        very, very young. In one or two hundred years from now, Lisp concepts will be common
        knowledge, just like elementary algebra. There is no reason to be arrogant just because you
        know that the earth is round, even if most other people still believe that it is flat.
    
    

    ■_ R

    スライドは pptx なんですがたぶんこれで見られます → LangNEXTCookR.pptx

    John Cook: Why and How People Use R | Lang.NEXT 2012 | Channel 9
    
    R is a strange, deeply flawed language that nevertheless has an enthusiastic and rapidly
    growing user base. What about R accounts for its popularity in its niche? What can language
    designers learn from R's success?
    
    

    なんかひどい言われような気が…w

    で、reddit での反応

    R is a strange, deeply flawed language that nevertheless has an enthusiastic and rapidly growing user base. What about R accounts for its popularity in its niche? : programming
    
    Why would it be considered flawed? (new R user)
    
    
    
    You'll discover some warts over time.
    
    Namely:
    
        R is pretty slow, even where other scripting languages are fast (for some applications). In
        most cases R is slow while looping over data but it has many functions and means to
        vectorize computations allowing for some improvements. Sometimes these functions allow you
        to think more clearly about the problem (especially for math on vectors and matrices) but
        other times you can develop anti-practices from rigorously avoiding loops. Other times R is
        just unavoidably slow.
    
        R doesn't* have an associative array data structure built in. You can hack in some stuff
        with environments or use packages for similar effects but that's something you'll really
        miss from python. It's a handy fucking structure.
    
        R's baseline data structure is a List. These are flexible and handy but can get you in
        trouble if you try to import your habits for subsetting vectors right over lists. It's also
        really easy to get stuff into lists and really hard to get stuff out. :)
    
        Subsetting in general is a little goofy. If you subset a data frame then remove some
        elements and subset it again you'll be surprised to learn that the original numbering was
        maintained. That seems like a curiosity until you run into a problem that really lends
        itself to subsetting a vector multiple times. Then it is a pain in the ass. That's only one
        of the subsetting oddities in R. It's a shame that subsetting has so many odd (and verbose)
        habits because subsetting by conditions is often a good way to avoid loops.
    
    There's other stuff too. And there are a bunch of fancy computer sciency things about closures
    or something but I'm too fucking dumb for that shit. I just turn data into economics. :) And I
    kinda like R.
    
    

    ■_ The Impact of Software Testing on Embedded Systems

    InfoQ。

    InfoQ: The Impact of Software Testing on Embedded Systems
    
    In its recent issue the Chip Design Magazine points out that the huge growth of portable and
    wireless systems combined with the increasing relevance of software in embedded systems poses a
    challenge. Quality issues need special attention, especially in safety-critical systems. This
    is why software test tools for software systems will become increasingly important as the Chip
    Design Magazine concludes.
    
    略
    

    Chip Design Magazine なんてのがあるですか。

    ■_ 本人降臨

    本の虫: プリンスオブペルシャのソースコードを救ったギーク達The Geeks Who Saved Prince of Persia's Source Code From Digital Death | Game|Life | Wired.com で、コメント欄。

    The Geeks Who Saved Prince of Persia's Source Code From Digital Death | Game|Life | Wired.com
    
    While it's cool that Diaz has and maintains all this old tech, why couldn't the restoration
    been done with a USB floppy drive and an emulator?  3.5" USB floppy drives are still
    available (haven't seen a 5.25" one, but maybe an old Apple drive could be jury-rigged).
    He wouldn't have to jury rig an Apple II to have an ethernet port.  Am I missing something here?
    
    
    Jason Scott
    
    Hi, Jason Scott here (guy in article). In point of fact, we have taken magnetic scans and will
    continue to of the 3.5 and 5.25" disks. But at the end of it, I would have only had the
    disk image files - and with some luck and doing a second pass, we could do a set of format-aware
    magnetic scans that would result in .dsk or such files. But what Tony brought to the table was
    an ability to, at that moment, read in the data, run programs against it, and do it all with
    vintage software and hardware, making it easier to deal with. 
    
    Think of it as the difference between us having a well-maintained 16mm film projector to project
    out the movie, and us having a massive visual scanner that would be turning the individual
    frames into .png files that could then be analyzed over days. Both methods result in something
    usable, but are for different purposes. We were able to do both at once.
    

    we have taken magnetic scans and will continue to of the 3.5 and 5.25" disks. magnetic scan ってなんか気になる表現だ。

    ■_


    一つ前へ 2012年4月(中旬)
    一つ後へ 2012年5月(上旬)

    ホームへ


    リンクはご自由にどうぞ

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