ときどきの雑記帖'

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

一つ前へ 2013年8月(中旬)
一つ後へ 2013年9月(上旬)

ホームへ

2013年08月31日

■_

やさしいじゃば やさしいJava 第5版 (「やさしい」シリーズ)
やさしいJava 第5版 (「やさしい」シリーズ) の新しいのが出てたので中身チェック。 「参照渡しと言われることもある」って前からこんな濁した書き方だっけか。 やはり最近出たこっちでは「参照渡し」言い切ってましたが。 AndroidエンジニアのためのモダンJava
AndroidエンジニアのためのモダンJava

The Pragmatic Bookshelf | Read Our Magazines issue #50 どうなってんだろ…

行かねば(今日は混んでいたらしい) 「よつばとダンボー展」、原画やカスタムダンボーずらり | マイナビニュース

■_

Reversing Sinclair's amazing 1974 calculator hack - half the ROM of the HP-35 | Hacker News Reversing Sinclair's amazing 1974 calculator hack - half the ROM of the HP-35

■_ 10年

元記事って青木さん訳してたっけ? Cannot Measure Productivity | Hacker News 10 years later: Cannot Measure Productivity : programming

■_ Oracle

12c 出たじゃないすか。C は「Cloud」からとったというのは聞いてたんですが

Database Watch(2013年8月版):米国の熱気は日本にも届くか? 納涼もんご祭り/Oracle Database 12c (3/3) - @IT

これまでを振り返ると、その時代背景に合わせてOracle Databaseは進化してきました。バージョン番号に添えられるアル
ファベットが時代を象徴しています。

 「8i」はクライアントサーバモデル時代でインターネットの「i」、「10g」ではグリッドコンピューティングの「g」。
「g」の世代でOracle Databaseは単なるSQLのエンジンではなくグリッド環境のプラットフォームへと進みました。そして
Exadataも登場します。今回の「12c」はクラウドの「c」が添えられることになり、三澤氏は「大きなアーキテクチャのチェ
ンジ」と話していました。

知らなかったー>「i」「g」

■_ ぬるぽ

たぶんHN経由。

Null, null, Nil, Nothing, None, and Unit in Scala | Java, JVM and beyond

Null, null, Nil, Nothing, None, and Unit in Scala
By Mohamed Sanaulla On July 12, 2009 · 9 Comments

Null- Its a Trait.
      この場合の trait は性質?

null- Its an instance of Null- Similar to Java null.
      Null のインスタンス

Nil- Represents an emptry List of anything of zero length. Its not that it refers to nothing but it refers to
     List which has no contents.
     空リスト?

Nothing is a Trait. Its a subtype of everything. But not superclass of anything. There are no instances of Nothing.
     すべての(型の?) subtype?

None- Used to represent a sensible return value. Just to avoid null pointer exception. Option has exactly 2
subclasses- Some and None. None signifies no result from the method.

Unit- Type of method that doesn’t return a value of anys sort.
      値を返さないメソッドの型。でいいのかな。

Its a subtype of everything. But not superclass of anything. なんかこーゆーのTAPLで見たな。 あと束論とか。 型システム入門 −プログラミング言語と型の理論−
型システム入門 −プログラミング言語と型の理論− Types and Programming Languages
Types and Programming Languages

束論でこういう本が見つかったんですがどうなんでしょう? 記号論理学講義: 基礎理論 束論と圏論 知識論
記号論理学講義: 基礎理論 束論と圏論 知識論

書籍一覧・検索 » 記号論理学講義 - 東京大学出版会

内容紹介

記号論理学における中級者を対象にしたテキスト.この領域の代表的理論を学び,数学の抽象化を推し進めた束論および
圏論を援用して理解を深める.さらに「論理語がなぜ基本的と見なされるか」などの知識をめぐる根本的な問いを考察.
30年間の講義をもとにした集大成.

中級者…ちょっときびしいかなん

■_

2013年08月30日

■_

イブニング。 しばちゅうさんも話が五丈原まで来てますねー。

積ん読を積極的に解消しないとですね(特に洋書)

■_

C++14とC++1yの新しいペーパーがさらに公開された - Faith and Brave - C++で遊ぼう 本論とは関係ないところに。 「世界一バカなスマートポインタ」と呼んでいる、生ポインタの単なるラッパークラスの提案。スマートポインタのインタフェースを持つ、ただのポインタ。 現状は、exempt_ptrという名前にしようと考えているらしい。exemptは、「(義務の)免除」という意味で、所有権を持たないとかそういうことを意図してるのだと思います。他の名前案もいろいろ考えられています。 ホワイトカラーなんちゃらのあれかー > exempt

■_

Why C still matters in 2013: a simple example : programming HN でもそこそこ伸びてた気がしたんだけどコメント数0だわね… Why C still matters in 2013: a simple example | Hacker News 元記事はこちら。 Why C still matters in 2013: a simple example | JabSoft I/O 目新しい主張はない。かなあ。

C がしぶとく残ってるのはこの辺が主な理由かなあ。などと。

manvscode comments on Why C still matters in 2013: a simple example

C will matter for a long time for at least 3 reasons:

    A simple, consistent ABI on nearly every platform that exists.
    The existence of C compilers on nearly every platform that exists.
    The ease of mixing C with any language.


That's the real reason; C can glue together almost anything. The performance is nice, but it's an argument
that's gotten weaker with time. When you need it, nothing else will do, but increasingly, you don't need it.

Gluing together libraries and language, though, will always be needed. C might not be the best language for this
job if you were starting from scratch, but we're not starting from scratch.
Fabien4 comments on Why C still matters in 2013: a simple example

1/ Write the same code in C++.

2/ Check that it's as fast as the C code.

3/ Conclude that C doesn't matter any more.

Who cares about Fibonacci anyway?

Of course, C still matters. The Linux kernel code won't be rewritten into another language any time soon.

Real reason why C matters: Most OS APIs are C based as a result there exists a C ABI that all compilers for that
platform support.

Then there is the problem of converting language features, which C solves by being the lowest common denominator
 - you wont have to deal with exceptions if your language does not support them, C doesn't either (who case if
longjump messes up your internal state).

TL;DR; C is the javascript of the desktop - as much as some want to avoid it, it is the only way to interact
with anything.


I am glad someone understands the importance of a consistent, simple ABI.

C++ cannot claim this. Historically, different compilers on the same OS have implemented name mangling
differently. This makes sharing compiled code between such compilers difficult. 

■_ りーずなぶる

Chromatic Leaves | Making Code Reasonable ここで使ってる「reasonable」ってどういう意味かしらん。

■_

2013年08月29日

■_

今週号で連載三回目の「異法人」がちょっと気になる。>モーニング

Ritch Hicky。スライドをちょっと見ただけだけど面白そう Design, Composition and Performance

■_

Java をやるべき七つの理由みたいのを見かけたんだけどどこだっけか あ、これだ。 Seven Reasons You Should Use Java Again - Programming - O'Reilly Media って良く見ると2011年に書かれたものでしたー

■_

ロジスティック曲線を描いてみる。 式はまあ色々あるんだけど、簡単な?ところで。

> logi <- function(x, b, c) 1/(1+(b*exp(1)**(-c*x)))
> logi(0,1,1)
[1] 0.5
> seq(-6,6,0.5)
 [1] -6.0 -5.5 -5.0 -4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5  0.0  0.5
[15]  1.0  1.5  2.0  2.5  3.0  3.5  4.0  4.5  5.0  5.5  6.0
> logi(seq(-6,6,0.5),1,1)
 [1] 0.002472623 0.004070138 0.006692851 0.010986943 0.017986210
 [6] 0.029312231 0.047425873 0.075858180 0.119202922 0.182425524
[11] 0.268941421 0.377540669 0.500000000 0.622459331 0.731058579
[16] 0.817574476 0.880797078 0.924141820 0.952574127 0.970687769
[21] 0.982013790 0.989013057 0.993307149 0.995929862 0.997527377
> z <- seq(-6,6,0.1)
> plot(z, logi(z,1,1), ann=F, type="l")
> par(new=T)
> plot(z, logi(z,0.3,1), ann=F, type="l")
> par(new=T)
> plot(z, logi(z,3,1), ann=F, type="l")
> 

しまった。同じ色、線種だからどの曲線がどのパラメータで描画されたものかわからんw 上の例ではb の値だけを変化させましたが、c の値を0に近づけるとだんだん直線に近くなります。 たとえば plot(z, logi(z,1,0.2), ann=F, type="l")で描画させた結果はこう。

さて話をどう広げよう。

■_

  • 続・JSXでダックタイピング(型消去)が出来るようになった話 - wasabizの日記
    先日JSXでダックタイピング(型消去)が出来るようになった話というエントリを書いたのだけれどそれについてTwitterで質問を受けたのでここで改めて詳細に解説することにする。
  • 『Excelで学ぶ統計解析入門 Excel2013/2010対応版』まもなく発売 - オーム社開発部
  • ソフトウェア開発手法の歴史 1970 - 1990年代 - Hのキーがhellで、Sのキーがslaveだ、と彼は思った。そしてYのキーがyouだ。
  • PHPの関数定義はこんな変態的な書き方ができる - 頭ん中
  • 2013年08月28日

    ■_

    府中街道(武蔵小杉の辺りはとても細い)を逆走する自転車を毎日のように見かけて怖いというか 呆れるというか。 横断歩道渡ろうとしたところに逆走+信号無視でつっこんできた自転車に当てられそうになったことも。

    ■_

    Perl 6 というか Rakudo

    Rakudo Star 2013.08 released | rakudo.org
    
    Please note that this release of Rakudo Star does not support the JVM backend from the Rakudo compiler. While
    the JVM backend mostly implements the same features as the Parrot backend, many small IO bits are still missing,
    rendering some crucial parts like the module installer unsable. We hope to provide a JVM-based Rakudo Star
    release soon.
    
    The following features have been deprecated or modified from previous releases due to changes in the Perl 6
    specification, and are planned to be removed or changed as follows:
    
        postcircumfix:<[ ]> and postcircumfix:<{ }> will become multi-subs rather than multi-methods.
        Both at_pos and at_key will remain methods.
    
        All unary hyper ops currently descend into nested arrays and hashes. In the future, those operators and
        methods that are defined “nodal” will behave like a one-level map.
    
        The Str.ucfirst builtin is deprecated; it will be replaced by Str.tc.
    
        Leading whitespace in rules and under :sigspace will no longer be converted to <.ws>. For existing
        regexes that expect this conversion, add a <?> in front of leading whitespace to make it meta again.
    
    There are some key features of Perl 6 that Rakudo Star does not yet handle appropriately, although they will
    appear in upcoming releases. Some of the not-quite-there features include:
    
        advanced macros
        threads and concurrency
        Unicode strings at levels other than codepoints
        interactive readline that understands Unicode
        non-blocking I/O
        much of Synopsis 9
    
    

    まだまだ未実装なもの多いのねえ

    んで Feature comparison of Perl 6 compilers

    Feature comparison of Perl 6 compilers
    
    A note about Pugs: Pugs is a Perl 6 compiler written in Haskell, based largely on much older versions of the
    Perl 6 specification. Because Pugs is not being actively maintained, many things are "broken" and it's
    not really a useful comparison for this chart.
    

    ああ…>Pugs

    ■_ ロジスティック曲線

    ロジスティック曲線作成 vb6サンプルプログラム | Visual BasicのQ&A【OKWave】

    ■_

    2013年08月27日

    ■_

    まんがサイエンス。kindle ででてるのは12巻まで?

    まんがサイエンス 14 (ノーラコミックス)まんがサイエンス 14 (ノーラコミックス)
    あさり よしとお

    学研マーケティング 2013-08-27
    売り上げランキング :

    Amazonで詳しく見る
    by G-Tools

    ■_ 頭再帰

    じゃなくて「先頭再帰」。 適当にぐぐったら head recursion らしい。 以前先頭再帰でぐぐったときにはそれっぽいのがひっかからなかったのだけど さっきやったら幾つか(大学での論文とか)。 head recursion - Google 検索

    Recursive Programming
    
    Tail and Head recursions
    
    If the recursive call occurs at the end of a method, it is called a tail recursion. The tail recursion is
    similar to a loop. The method executes all the statements before jumping into the next recursive call.
    
    If the recursive call occurs at the beginning of a method, it is called a head recursion. The method saves
    the state before jumping into the next recursive call. Compare these:
    
    public void tail(int n)                 public void head(int n)
    {                                       {
       if(n == 1)                             if(n == 0)
          return;                                return;
       else                                   else
          System.out.println(n);                 head(n-1);
    
       tail(n-1);                              System.out.println(n);
    }
    

    beginning of a method つっても、先に再帰の停止条件調べてるからなあ という気はする。が、if の then と else だからいいんだろか。

    ■_

    ■_ パパに訊け

    まったく目新しい質問はないっぽい? Interviews: Guido van Rossum Answers Your Questions - Slashdot

    Interviews: Guido van Rossum Answers Your Questions - Slashdot
    
    Last week you had a chance to ask Guido van Rossum, Python's BDFL (Benevolent Dictator For Life), about all
    things Python and his move to Dropbox. Guido wasted no time answering your questions and you'll find his
    responses below.
    
    From Google to Dropbox
    by nurhussein
    
    
    Why did Python avoid some common "OO" idioms?
    by i_ate_god
    
    
    functional programming
    by ebno-10db
    
    
    Multi-line lambdas
    by NeverWorker1
    
    
    PyPy
    by Btrot69
    
    Python in the browser ?
    by Btrot69
    
    
    Python 3
    by MetalliQaZ
    
    
    Key question for any language designer
    by dkleinsc
    
    Have the prospects of Python in any way improved since you grew a beard? To what degree does language success
    correlate to beard length?
    
    Guido: It is absolutely essential. Just look at Perl's fate -- Larry Wall is just too clean-shaven. :-)
    

    2013年08月26日

    ■_

    「当人」と「当家」「当社」で「当」の意味合いが微妙に違うのが面白い。 関係ない他の人が「当人」を使うことはできるけど、他二つはダメですよね。 「御当家」とかいう言い回し知らなかったわこの年までw 当家 とは - コトバンク 普通,自分の家以外をいう場合は「御当家」の形を用いる

    ■_ プログラマが考え方がおもしろいほど身につく本

    半分くらいまで読んで放置してたのを最後まで。 「先頭再帰」ってあまり馴染みのない言葉なんだけど 言語ではなんなんだろ。 プログラマの考え方がおもしろいほど身につく本 問題解決能力を鍛えよう!
    プログラマの考え方がおもしろいほど身につく本 問題解決能力を鍛えよう! 各章の問題をまじめに考えてみると結構面白いかも。

    ■_

    リンクが貼られたのを見たのは昨日辺りだったのだけど、1999年のものらしい。 でも結構面白かった。 Strong Typing and Perl

    Strong Typing and Perl
    
    Since type checking in C and Pascal is a failure (and I have a big fit about this and foam at the mouth so that
    nobody dares disagree) there are two directions to go. You can give up on it, and many succesful langauges like
    Lisp, APL, Awk, and Perl do give up. This leads a lot of people to conclude that static type checking is a bad
    idea that has been abandoned.
    
    But actually that's not so; it just shows that the inferior implementation in C and Pascal is a bad idea. Since
    C and Pascal were designed in the late 1960's, the state of the art has advanced, and languages like ML and
    Haskell have really good type systems.
    
    I then spend about an hour showing examples of the ML type system. The big benefits here are: The type system is
    very fine-grained and flexible, so that there are many many types and you can be very specific about what type a
    certain value has. Types are deduced automatically by the compiler, so you don't need to declare them. Instead,
    you just write your code, and you look at the declarations that the compiler prints out and see if they were
    what you expected. If not, then your program almost certainly has a serious bug.
    

    で、スライドの方の結論。

    Conclusion
    
    Conclusion
    
        Type checking in C and Pascal sucks.
    
        Just because static type checking is a failure in C and Pascal doesn't mean you have to give up on the idea.
    
        Languages like ML have powerful compile-time type checking that is successful beyond the wildest imaginings of people who suffered from Pascal.
    
        It is probably impossible to get static, ML-like type checking into Perl without altering it beyond recognition.
    
        However, Perl does have some type checking mechanisms, and more are coming up.
    

    ■_

    2013年08月25日

    ■_

    LL まつりと被ったので今日観に行きました。 感想は…7章全部観に行くほどには期待してたし面白かったとは思いますが 不満点がないわけじゃないし、Blu-ray を買うほどじゃあないよねえ…という辺りでお察しくださいw とはいえ最終章だけはまあ劇場限定版買いますかね(中身的には第6章の方が良かったかなあ…)

    さて、スタートレックとパシフィック・リムもどうにか観ないとだわ

    ■_

    日経ソフトウエア、今回の特集記事はちょっとなあ。 カネを稼ぐことを書いちゃいけないとは言わんけれども、 これはどうよってのがあるんだよなあ。 日経ソフトウエア 2013年 10月号

    ■_

    やる夫と学ぶホビーパソコンの歴史 第9話: 11289 Bytes free - タイニーPのブログ 実際この1982年、N-BASICの内容をニーモニックに変換して解説した書籍の出版差し止めを求める裁判が、マイクロソフトによって起こされている。 秀和の本かな?

    ■_

    2013年08月24日

    ■_

    開催案内 - Lightweight Language Matsuri あとで書く。

    「(ページ|アカウント)毎」の「毎」を「まい」と読んだり 「場数」を「ばすう」というのが気になった

    ■_ LLまつり(1)

    g新部の「g新」は一文字 まつもとさんは大変だなあ(twitterでのやり取りをみて) Delphiの歴史 https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-prn1/994896_10200098178891365_1381602307_n.jpg

    ■_ LLまつり(2)

    B会場一番手のぐぬーべ(g新部)さん

    A会場はこんなでした

    出番待ちのまつもとさん

    PowerShell、Windows 限定でなければ面白そうなんだけど…とはまつもとさんの弁

    発表中のまつもとさん

    15000円以上オライリー本を買うとこれがもらえたらしい

    LT からひとつ。

    ■_ LLまつり(3)

    今回メモやらとらなかったんだよな。 何書こう…w

    2013年08月23日

    ■_

    やーるーきーぜろー

    皇国(文庫版)やら八八の新刊やらをすっかり忘れてた。 いや、朝までは覚えてたんだけど。 皇国の守護者2 - 勝利なき名誉 (中公文庫) 八八艦隊海戦譜 - 攻防篇1 (C・Novels 55-78)
    八八艦隊海戦譜 - 攻防篇1 (C・Novels 55-78) こたつやみかん(2) (アフタヌーンKC)
    こたつやみかん(2) (アフタヌーンKC)

    あれだ。オライリーの新刊はLLまつりの会場で売ってる場合にはそっちで買った方が良いかと思って 某大型書店に寄るのを止めたからだ。これね 入門 データ構造とアルゴリズム
    入門 データ構造とアルゴリズム あと数学セミナーまだ買ってない。

    ■_

    2013年08月22日

    ■_

    定期的にやってる番組だったのかー。知らなかった。 歴史にドキリ - Wikipedia

    ■_

    ■_ 違い

    Differences between Common Lisp and Emacs Lisp | Yoo Box

    Differences between Common Lisp and Emacs Lisp | Yoo Box
    
    In Emacs Lisp,
    
    (member "na" (list "ga" "na" "da")) ; => ("na" "da")
    
    In Common Lisp,
    
    (member "na" (list "ga" "na" "da")) ; => NIL
    

    これはちょっとびっくりした。

    (member "na" (list "ga" "na" "da") :test #'equal)
    ("na" "da")
    
    

    ふむ。

    ■_

    Developer Reading List | Dr Dobb's 何冊かあげられてるんだけど一冊目が気になる

    Developer Reading List | Dr Dobb's
    
    What Makes It Page?
    
    The Windows 7 x64 Virtual Memory Manager
    
    by Enrico Matignetti
    
    What Makes It Page? is an extraordinary hacker's journey through the Windows 7 (x64) virtual memory manager.
    Rather than just relying on commonly available information about Windows 7 internals, the author used WinDbg
    to analyze the operations and functionality. How many hours he must have spent in this effort and the
    consequent research is beyond my capacity to answer, but in view of the fact that he has delivered here almost
    600 pages of material, suggests years of monk-like work. 
    

    2013年08月21日

    ■_

    艦これ。 やってないすよ?w それはさておき、新しいサーバーがラバウルとかで そこに着任だかする人は「ラバウル小唄」を覚えて云々というツイートを見かけたんですが、 あれ出だしが さらば ラバウルよ また來るまでは しばし 別れの 涙がにじむ だったような… ラバウル小唄 ラバウル - Wikipedia

    LLまつりのTシャツ忘れてた○| ̄|_

    ■_

    ■_

    昨日は暑さでまともに寝られなかったせいもあってかとても眠いんだぱとらっしゅ


    一つ前へ 2013年8月(中旬)
    一つ後へ 2013年9月(上旬)

    ホームへ


    リンクはご自由にどうぞ

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