ときどきの雑記帖'

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

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

ホームへ

2013年04月10日

■_

とりあえず捨てずに残していた雑誌(歴史群像とか)をどうにかする。

■_

本の虫: 様々なUNIX環境のecho.cの比較 はてなブックマーク - 本の虫: 様々なUNIX環境のecho.cの比較

ま、いいんですけどね。 ■_ 実装の比較

昨日か今日かコメントが増えたのか UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c

■_

■_ Ada 2012

やっぱ翻訳記事欲しいねえ(知ってもらえる範囲を広げるという意味で)。 Ada 2012: Ada With Contracts | Dr Dobb's

■_ にぶんたんさく

Route 477 - Ruby 2.0のRange#bsearchが無限区間の二分探索に対応している件 なんの偶然かこういう記事も(内容は被ってません。単に「二分探索」を取りあげているだけ) Efficient Binary Search | rootkea

bool bsearch(int array[], int size, int *loc, int val)
{
    int first, mid, last;
    int count;

    first = 0;
    last = size - 1;
    count = 0;

    while(first <= last) //Unless first and last crosses each other
    {
        printf("Pass %d\n", ++count);
        mid = first + (last - first)/2;

        if (val == array[mid])
        {
            *loc = mid;
            return true;
        }
        else if (val < array[mid])
            last = mid - 1;
        else
            first = mid + 1;

    }

    return false;
}

これを

bool mod_bsearch1(int array[], int size, int *loc, int val)
{
    int first, mid, last;
    int count;

    first = 0;
    last = size - 1;
    count = 0;

    while(array[first] <= val && val <= array[last])
    {
        printf("Pass %d\n", ++count);
        mid = first + (last - first)/2;

        if (val == array[mid])
        {
            *loc = mid;
            return true;
        }
        else if (val < array[mid])
            last = mid - 1;
        else
            first = mid + 1;
        }

        return false;
}

のように書くと、ちょっと効率が良くなるとかなんとか (これにさらに手を加えたものが元記事に)。

2013年04月09日

■_

こういうのをやりたいと思ってたのよー (ただし会社で、会社にあるコードで) Linux ファイルシステムにおけるバグ傾向 | Rabbit Note A Study of Linux File System Evolution | USENIX

■_ DSL

Interview and Book Review: DSL Engineering

Interview and Book Review: DSL Engineering

Markus Völter, one of the authors of "Model-Driven Software Development", has published a
new book in the field of model-driven software development (MDSD). "DSL Engineering" focusses
on the design and implementation of domain specific languages (DSLs).

DSLs are languages with a vocabulary optimized for efficiently describing problems and solutions in a
certain domain. In contrast, general pupose languages (GPL) like Java may be able to describe the same
problems and solutions, but they typically require more verbose programs, are harder to analyze by tools
and harder to understand by domain experts. Thus, well-designed DSLs are suitable to be used by
non-programmers to formally define business related models. Usually, those models are then transformed
into artifacts such as GPL source code or documents.

(略)

The book is available as paperback as well as PDF. The latter can be downloaded as donation ware.
Currently, there is no specific e-reader format.

DSL の反対のものとして、general purpose languages、GPL ってその略称はいかがなものかと 思いつつもこれしかないかあ。

PDF でも (donation ware として)入手できるというのでちょっと行ってみた。 DSL Engineering

■_

■_ Python で

2013年04月08日

■_

やる気ゼロ

■_

おや書評が。 クラウゼウィッチーズ(巌百合彦)読了 - 主にライトノベルを読むよ^0^/@はてなブログ パラパラと本をめくるとページのどこかに必ず一つは下ネタがみつかるレベルのお下劣小説だった わたしが気になった点には言及してないな。かすってるけど。 他の人は気にならないんだろうか?

■_ コードクローン

ぐぐってみた

■_

2013年04月07日

■_

そういえば今年の4/1のお遊びはあったんだろうかと みねこあ ↓を見て思い出したり

重版出来! 1 (ビッグ コミックス)
重版出来! 1 (ビッグ コミックス) 結構面白かった。 これがどれだけ続くのかというのはちょっと心配なところはあるし、 口さがない人なら新鮮みはあまりないという感想を出すかもしれない。 でもまあ機会があれば読んでみても良いかと。

■_ Haskell for Windows

いやまあ茨の道だから以下略ということなんでしょうけども

Haskell on Windows | Gundersen.net

Haskell on Windows
by wpgundersen on April 6th, 2013

Haskell is fascinating, but getting started can be a bit rough – especially if you are on Windows.
Here are some necessary steps to get you over these initial stumbling blocks when running the
Haskell Platform (2012.4) on Windows.

It is quite obvioius that a lot of the users of Haskell are on other platforms, and as a Windows-user
you quickly run into some problems not experienced on other platforms. This is doubly frustrating as
a newbie because you haven’t had time to develop the necessary intuition about where to look for
solutions yet. It also certainly does not help that Haskell error messages are known to be misleading.

Making Networking code work on Windows

(略)

Replacing tabs with spaces

If you are starting out with creating your initial projects in an editor, you may get some
surprising parsing errors where all seems well. The reason is that Haskell by default is white-space
aware, which, by the way, is a great characteristic it shares with Python. The easiest way to make
the parsing errors go away is to set your editor to replace tabs with spaces. In Notepad++ (free, and
more than sufficient for your first few projects), this is done by going to Settings, Languages and
selecting “replace by space” under Tab Settings. Surprisingly enough, this is not default in the
built-in Haskell language and syntax highlighting settings in Notepad++.


Copyright © 2013 Finn Espen Gundersen

■_ ライトついてますか

的な。

某社社内で(たぶんワタクシ個人が)困ってることがあるんですが なんか良い手段が無いものだろうかと日々考えていたりするのです(大げさ)。

■_

どうにかして読めないものかしらね (いやまあ圏論(に限らず)数学ロクに理解してませんけどもごにょごにょ)

■_ なぜ Python を選んだか

Why do you choose Python over other language? : Python

Why do you choose Python over other language? : Python

Hi, coding newbie here, I want to know why do you prefer Python over other language and it pro's and
con's. Really interesed into learning Python, any tips?

Edit: Wow, such a great feedback, as I see the main Pro is the overall badass community that Python
has behind (refer to all the comments in this thread), thanks guys.

Edit 2: The question now. Python 2.x or 3.x?

A few off the top of my head:

    Huge standard library

    Generally good quality documentation for standard library

    Gobs of third-party modules to rival even Java

    Platform agnostic, and present in virtually every *nix distribution I'm aware of without even
    needing to install it (because so many system tools are written using it)

    Very common use of BSD/MIT-style licencing with third-party modules; GPL licencing gives corporate
    lawyers a big headache

    Emphasis on code readability (see PEP-8) and DRY principles without sacrificing readability
    (kind of a middle ground between perl and java, I guess?)

    Useful for a really broad range of programming tasks from little shell scripts to enterprise web
    applications to scientific uses; it may not be as good at any of those as a purpose-built
    programming language but it can do all of them, and do them well (e.g. you don't see web apps
    written as bash scripts nor do you see linux package managers written in Java)


I guess I didn't really respond to the cons request ... I am not particularly well-read about other
programming languages so this is probably not super-helpful, but here they are:

    A lot of programmers have a problem with significant whitespace, and absolutely lose their shit
    at PEP-8 (particularly the 79 columns per row bit). I do a lot of split screen coding and 3-way
    merging so I love PEP-8, but not everyone agrees.

    Python's multithreading/multiprocessing modules are confusing. They are somewhat more recent
    additions to the language which may have something to do with it; They aren't bashful about saying
    that multi-threaded software development is hard (I'm sure that is true in any language) but
    getting your application to perform by using them can be challenging. Others are welcome to
    disagree, I confess some degree of ignorance on the complexities of multithreading/multiprocessing
    in other programming languages.

    Python is not a good choice for doing embedded-type work (e.g. mobile devices on down); while some
    tools exist to let you run Python on such devices they tend to be cobbled together, slow, and
    poorly supported compared to, say, Java (duh).

    Python also has a lot of challenges regarding sandboxing (read: security); currently the only way
    I've seen to do this (reasonably) is running a virtualized interpreter (e.g. Pypy), which has its
    own challenges—especially where compatibility with C-based modules is required for your application.

    Python prefers to have "one way to do things" but this is unfortunately pretty far from the
    truth; there are two different "url" libraries in the standard lib and a bunch of XML—and
    none of them are great compared to third-party libraries that attempt to fix what's broken about
    them (and do so, with limited success). For example, you'll virtually always parse XML-like documents
    with either lxml (a third-party library with a C-binding) or BeautifulSoup (specific to the needs of
    parsing HTML documents), neither of which are standard library. Python's stanard library 'urllib2'
    is painful to use compared to the third-party 'requests' library.
(略)

I am going to add: Python is where all the cool kids are.

    If you say C++ (which I use) you are potentially too hardcore,
    If you say PHP (which I use) you are a script kiddie,
    If you say Ruby (see PHP),
    If you use Perl you are old,
    If you use Scala you are too academic,
    If you use Lisp you are insane,
    If you use Erlang you will have to explain yourself,
    If you use Java you wear a suit to work (or at least a tie),
    If you use PL/SQL you work with the Java guy,
    If you use .net you work for a competitor to the guy who uses Java,
    If you use Lua you have to explain yourself to everyone but the Erlang guy,
    If you use Javascript you work with the PHP guy,
    If you use Go you wish you worked for Google,
    If you use ASM you have too much work to do to be reading Reddit.

■_ ゴロー♪

今日の新言語。 なんか構文にRubyっぽいところが? The Golo Programming Language

The Golo Programming Language

Hello world

Golo source code need to be placed in modules. Module names are separated with dots, as in:

  Foo
  foo.Bar
  foo.bar.Baz
  (...)

It is suggested yet not enforced that the first elements in a module name are in lowercase, and that
the last one have an uppercase first letter.

A Golo module can be executable if it has a function named main and that takes an argument for the
JVM program arguments:

  module hello.World

  function main = |args| {
    println("Hello world!")
  }

println is a predefined function that outputs a value to the standard console. As you can easily guess,
here we output Hello, world! and that is an awesome achievement.

Running "Hello world" with gologolo

Of course, we need to run this incredibly complex application.

Golo comes with a gologolo script found in the distribution bin/ folder. Provided that it is available
from your current $PATH, you may simply invoke it as follows:

$ gologolo samples/helloworld.golo
Hello world!
$

「孤独のグルメ」O.S.T. 「孤独のグルメ Season 2」O.S.T.

■_ 復刊リクエスト

こんなやりとりが

このシリーズかあ 情報数学講座 全15巻 | 共立出版

こいつか。あまり高値はついてないね 応用論理 (情報数学講座)
応用論理 (情報数学講座) このあたりに比べると。 プログラミング言語の基礎理論 (情報数学講座)
プログラミング言語の基礎理論 (情報数学講座) プログラム検証論 (情報数学講座)
プログラム検証論 (情報数学講座)

こいつは復刊されたんだけどなあ プログラム意味論 (情報数学講座)
プログラム意味論 (情報数学講座)

■_

2013年04月06日

■_

ポール・アレン本を読んでいて、こういうものがシアトルにできていたのを初めて知った ○| ̄|_ SFファンの新しい聖地『SF殿堂博物館』、シアトルに6月オープン « WIRED.jp
ぼくとビル・ゲイツとマイクロソフト アイデア・マンの軌跡と夢
ぼくとビル・ゲイツとマイクロソフト アイデア・マンの軌跡と夢

■_ 原形

とある筋から次のリンクを紹介されて 2進数、16進数と10進数 - CyberLibrarian 同じサイトの別のページを見ていてふと気になった。 LAN - CyberLibrarian

LAN - CyberLibrarian

ツイスト・ペア・ケーブル

ツイスト・ペア・ケーブル(Twist Pair Cable)は、8本の線材を2本ずつ対にしてより合わせた構造になっており、
ノイズなどの混入を防ぐためにシールド加工されたものと、されていないものがあります。前者をSTP(エスティー
ピー; Shielded Twist Pair cable)、後者をUTP(ユーティーピー;Unshielded Twist Pair cable)と呼びます。
一般家庭やオフィス環境では通常、UTPが使用されています。

カタカナ書きにしている場合はまあ良いとして、twist pair じゃなくて twisted pair じゃあなかろうかと。

ツイストペアケーブル - Wikipedia

ツイストペアケーブル(Twisted pair cable、ツイステッドペアケーブル)は、撚り対線(よりついせん)とも
言い、電線を2本対で撚り合わせたケーブルである。単なる平行線よりノイズの影響を受けにくい。TPケーブルと
言う場合もある。古くからある技術であるが、近年ではイーサネットの特にLANでの配線に使われる例がよく知ら
れている。

この辺も混乱しているっぽい? ツイストペアケーブルとは【twisted pair cable】(より対線) - 意味/解説/説明/定義 : IT用語辞典 確かに ~ed ~ed と続くのは不自然に感じられるところがあるかもしれないけど UTPとは【Unshielded Twist Pair cable】 - 意味/解説/説明/定義 : IT用語辞典

ツイストペアケーブル - Wikipedia

UTP

シールドが施されていないツイスト・ペア・ケーブルをUTP(Unshielded Twisted Pair、アンシールデッド・ツ
イステッド・ペアー)ケーブルと言い、電話線やイーサネットなどで使われる。取回しが簡単で安価なため、特
に高速伝送を求められないイーサネットのLAN用途に標準的に使用されている[3]。日本で一般に販売されている
LANケーブルは、ほとんどがUTPケーブルである。

STP

UTPに対し、電線対にシールドが施されたものをSTP(Shielded Twisted Pair、シールデッド・ツイステッド・ペ
アー)ケーブルという。これらはノイズが非常に多い工場内や野外、少しでも高い通信速度が必要とされる場面
(例:1000BASE-CX)で使われる。またヨーロッパではSTPが主流であり、UTPはあまり普及していない。

Twisted pair - Wikipedia, the free encyclopedia

Twisted pair cabling is a type of wiring in which two conductors of a single circuit are twisted
together for the purposes of canceling out electromagnetic interference (EMI) from external sources;
for instance, electromagnetic radiation from unshielded twisted pair (UTP) cables, and crosstalk
between neighboring pairs. It was invented by Alexander Graham Bell.

In contrast to FTP (foiled twisted pair) and STP (shielded twisted pair) cabling, UTP (unshielded
twisted pair) cable is not surrounded by any shielding. It is the primary wire type for telephone
usage and is very common for computer networking, especially as patch cables or temporary network
connections due to the high flexibility of the cables.

ですよねえ。

んでまあこの話はこういう用語でも良く見られますね。と。 syntactic sugar Syntactic sugar - Wikipedia, the free encyclopedia Dotted Pair Notation - GNU Emacs Lisp Reference Manual

■_ Perl

無名リファレンスからその実体をコピーすることなく取得したい。 かな?

Shallow copy reference into variable in Perl - Stack Overflow

In Perl, you can assign to a variable a reference to another variable, like this:

  my @array = (1..10);
  my $ref = \@array;

And, as it is a reference, you can do something like this and both variables will be affected:

  push @array, 11;
  push @$ref, 12;

and both variables will contain 1..12, because they both point to the same space.

Now, I'd like to know if there is any way you can do the same thing, but starting with a ref and
later assigning that reference to a plain variable. For example:

  my $ref = [1..12];
  my @array = # something here that makes @array point to the same space $ref contains

I know I can just assign it like this:

  my @array = @$ref;

but, that's a copy. If I alter $ref or @array, those will be independent changes.

Is there some way to make @array point to the same variable as $ref?

This can be done when the array is a package variable, using typeglobs.

  my $foo = [7,8,9];
  our @bar;
  *bar = $foo;
  $foo->[1] = 3;
  print @bar;     # "739"

Lexical variables (i.e. my @bar) can't be assigned to with typeglobs, though. Maybe there is a
lexical solution or workaround built around PadWalker.

Data::Alias, not PadWalker.

Three ways:

    our @array; local *array = $ref;
    use Data::Alias; alias my @array = @$ref;
    Using magic (e.g. tie my @array, 'Tie::StdArrayX', $ref;)

But of course, the sensible approach is to do

    my $array = $ref;

and use @$array instead of @array.


Aforementioned Tie::StdArrayX:

    package Tie::StdArrayX;
    use Tie::Array qw( );
    our @ISA = 'Tie::StdArray';
    sub TIEARRAY { bless $_[1] || [], $_[0] }

■_

2013年04月05日

■_

ううむ「白熱教室」使いすぎな気が。 NHK バークレー白熱教室

今年のイベント名は「LLまつり」に決定! 今回は LL イベントとしては初めて、複数トラックでセッションが同時進行する形式になります。

面白そうなのがまたたくさん。この他にもspringerの高い本ががが (アフィリエイトはついてないので安心して リンクを分deください)。 電書で買えるのは電書かなあ。特に洋書。 Amazon.co.jp: The Great Indian Phone Book: How the Cheap Cell Phone Changes Business, Politics, and Daily Life: Assa Doron, Robin Jeffrey: 洋書 Amazon.co.jp: Secure Coding in C and C++ (2nd Edition) (SEI Series in Software Engineering): Robert C. Seacord: 洋書 Amazon.co.jp: Honoring the Code: Conversations with Great Game Designers: Matt Barton: 洋書 Amazon.co.jp: F# for C# Developers: Tao Liu: 洋書 Amazon.co.jp: Modern Computer Algebra: Joachim von zur Gathen, Juergen Gerhard: 洋書 Amazon.co.jp: PowerShell 3.0 Advanced Administration Handbook: John Arundel: 洋書 Amazon.co.jp: 小飼弾のコードなエッセイ ~我々は本当に世界を理解してコードしているのだろうか? (Software Design plus): 小飼 弾: 本 Amazon.co.jp: コーディングを支える技術 ~言語の成り立ちから見えてくる作法 (WEB+DB PRESS plus): 西尾 泰和: 本 Amazon.co.jp: おうちで学べるプログラミングのきほん: 河村 進: 本 Amazon.co.jp: 基礎情報科学―東洋英和女学院大学〈2013年版〉: 有田 富美子, 吉野 志保, 柳沢 昌義: 本 Amazon.co.jp: ひと目で伝わる! ワンランク上のグラフ作成術 (web-tan BOOKS(Next Publishing)): 衣袋 宏美: 本 Amazon.co.jp: リファクタリング (アジャイルソフトウェア開発技術シリーズ・応用編): 設楽秀輔, 長瀬嘉秀: 本

■_ revolution

どうもチャート(グラフ)の見方がよくわからないのだけど。 The Quiet Revolution in Programming | Dr Dobb's ところで元記事の右カラムの広告にこういうのが This month, programming languages take center stage in this Dr. Dobb's Journal. Explore the most interesting features in the new Ada 2012 standard; understand the philosophy behind Clojure; look at the major update to NetRexx; and take a tour through Fantom, a language that generates JavaScript and binaries for .NET and the JVM, and much more! 登録してみようかなあ。

The Quiet Revolution in Programming | Dr Dobb's

The Quiet Revolution in Programming

By Andrew Binstock, April 03, 2013

During the last two years, one of the longest eras in programming has quietly drawn to a close.

About every ten years, it seems, we're told that we're on the precipice of some revolutionary
development in computing: The PC revolution. Ten years later, the networking and client/server
revolution. Ten years on, the Internet revolution. Today, we're in the throes of the mobile and
cloud revolutions. Authentic and important as these tides of change are, they do not greatly affect
the way we approach programming. There, tides roll in more slowly. Object orientation in the 1990s,
the subsequent rise of dynamic languages, and the emergence of parallel programming cover many of
the important changes. (Arching over these is the magic dust of agile programming, which changed the
coding experience by integrating tests and moving to a faster, leaner model.) And even these waves
sweep over programming slowly — note, for example, the snail's pace adoption of parallel programming.

However, during the last 24 months, the sheer volume of change in the computing paradigm has been so
great that programming has felt its imprint right away. Multiple programming paradigms are changing
simultaneously: the ubiquity of mobile apps; the enormous rise of HTML and JavaScript front-ends; and
the advent of big data.

(略)

The movement from few to many languages has important ramifications. For example, it's now more
difficult to find programmer talent that satisfies all the needs of a project; and it's more difficult
as a programmer to be deeply fluent in all the necessary languages and idioms. These obstacles might
suggest division of labor along the lines of programming languages (which likely reflect different
concerns and separate components), but as the first chart shows, this is not happening. Rather, the
traditional division of labor along domains appears to be the continuing norm. Because the trend is so
new, it's hard to tell what the other repercussions of this shift are and will be. I'll cover them as
they emerge. Meanwhile, all hail polyglots!

— Andrew Binstock

Dr. Dobb's の記事、どこかできちんと訳してもらえんものだろうか。 無料で、というのは流石に虫が良すぎる気がするのでまあある程度なら…

■_ 入門

~の基礎も同じ流れなんだろうか これとか 圏論の基礎
圏論の基礎

■_ RMS vs

Stallman: 'OpenBSD Ports Suggests Non-Free Software'

Richard Stallman sent a message to OpenBSD-Misc, explaining why he doesn't recommend OpenBSD.
"From what I have heard, OpenBSD does not contain non-free software (though I am not sure whether
it contains any non-free firmware blobs). However, its ports system does suggest non-free programs, or
at least so I was told when I looked for some BSD variant that I could recommend. I therefore exercise
my freedom of speech by not including OpenBSD in the list of systems that I recommend to the public."
His mail started a huge thread (that's just page 1) and since then he's under a blast of messages from
Theo de Raadt and the OpenBSD users. De Raadt replied: "Richard, you are wrong. You said very
clearly in your interview that the ports tree contains non-free software. It does not. It is just a
scaffold of Makefiles containing URLs, and an occasional patch here or there. You are just plain wrong.
And you are not enough of a man to admit that you are wrong. I may be unfriendly at times, but you are
a power-misusing hypocritical liar who attacks projects that try harder than any others to only make
free software available. Shame on you."

なんかよくわからんが Theo 様の返答がかなり強めな語調の気が。

■_

■_

いろいろ大変なんすよ。ええ。

2013年04月04日

■_

まーじーでー 週末は猛烈低気圧で台風並みの暴風に(2013年4月4日) - 日直予報士 - 日本気象協会 tenki.jp

読んだ 新宿で85年、本を売るということ (メディアファクトリー新書)

■_ val var

Twitter / hassyX: @kmizu ありがとうございます。複数のScala人から回 ...

■_ Atack of the Clone

緊急特集!みずほ証券-東証裁判の争点を洗い出す - [論点3]どんな開発手法を適用すべきか:ITpro

緊急特集!みずほ証券-東証裁判の争点を洗い出す - [論点3]どんな開発手法を適用すべきか:ITpro

ソースコードの品質についても、みずほ証券は問題を指摘している。今回のバグがあったプログラム全体について、
「ソースコードの著しい重複が見られるなど、エラーの潜在する率が極めて高い作り方をされており、品質が極め
て低い」と主張。これに対して東証は「コードクローン(記述の重複)を含むプログラムは、含まないプログラム
と比較して信頼性が高いことが定量的な研究で裏付けられている」と反論した。 

問題の論文のabstract。

ソフトウェアに含まれるコードクローン(重複するコード列)は,ソフトウェアの構造を複雑にし, ソフトウェア品質に悪影響を与えるといわれている.しかし,コードクローンとソフトウェア品質の 関係はこれまで定量的に明らかにされていない.本論文では,20年以上前に開発され,拡張COBOL 言語で記述されたある大規模なレガシーソフトウェアを題材とし,代表的なソフトウェア品質である 信頼性・保守性とコードクローンとの関係を定量的に分析した.信頼性の尺度として保守工程で発見 された「フォールト数/LOC(Lines of Code)」を用い,保守性の尺度として「モジュールの改版数」 を用いた.分析の結果,コードクローンを含むモジュール(clone-includedモジュール)は含まない モジュール(non-cloneモジュール)よりも信頼性(平均値)が約40%高いが,200行を超える大きさの コードクローンを含むモジュールは逆に信頼性が低いことが分かった.また,clone-included モジュールはnon-cloneモジュールよりも改版数(平均値)が約40%大きく(すなわち,改版のため により多くの保守コストが費やされてきた),さらに,モジュールに含まれるコードクローンのサイ ズが大きいほど改版数がより大きい傾向にあることが分かった

ふむ。

■_ 3

メジャーバージョンが上がった。 R 3.0.0 is released! (what’s new, and how to upgrade) | (R news & tutorials)

R 3.0.0 is released! (what’s new, and how to upgrade) | (R news & tutorials)

SIGNIFICANT USER-VISIBLE CHANGES

    Packages need to be (re-)installed under this version (3.0.0) of R.

    There is a subtle change in behaviour for numeric index values 2^31 and larger. These never
    used to be legitimate and so were treated as NA, sometimes with a warning. They are now legal
    for long vectors so there is no longer a warning, and x[2^31] <- y will now extend the vector
    on a 64-bit platform and give an error on a 32-bit one.

    It is now possible for 64-bit builds to allocate amounts of memory limited only by the OS. It
    may be wise to use OS facilities (e.g.ulimit in a bash shell, limit in csh), to set limits on
    overall memory consumption of an R process, particularly in a multi-user environment. A number of
    packages need a limit of at least 4GB of virtual memory to load.  64-bit Windows builds of R are
    by default limited in memory usage to the amount of RAM installed: this limit can be changed by
    command-line option –max-mem-size or setting environment variable R_MAX_MEM_SIZE.

    Negative numbers for colours are consistently an error: previously they were sometimes taken as
    transparent, sometimes mapped into the current palette and sometimes an error.

この他にも色々。

■_

2013年04月03日

■_

iTunes で懐メロ(といっても甲斐バンドとかアンルイスとか一世風靡セピアとか)を何曲か購入。 ベストアルバム探してリッピングして~なんて手間をかけないでも 聴きたい曲だけをパッと購入できるのはありがたい。 しかし、甲斐バンドのあの曲が見あたらないんだけどなんで? フェアリー(完全犯罪) - Wikipedia

■_ オライリーの

表紙の動物絵について

A Short History of the O'Reilly Animals

People like animals with faces. The images we use on the Animal books are from the entire animal
kingdom, from large land mammals like tigers and elephants to fishes, birds, insects, and invertebrates.
We’ve discovered that people respond most positively to animals that 1) have recognizable faces; and
2) are looking directly at the audience.

なるほどねえ。

■_ 昔々

とある論争がありまして。 The Tcl War The Second Tcl War

The Second Tcl War: GNU Extension Language Plans

* Step 2. Other languages should be implemented on top of Scheme.

** Rush is a cleaned-up version of the Tcl language, which runs far
faster than Tcl itself, by means of translation into Scheme. Some
kludgy but necessary Tcl constructs don't work in Rush, and Tcl
aficionadoes may be unhappy about this; but Rush provides cleaner ways
to get the same results, so users who write extensions should like it
better. Developers looking for an extension language are likely to
prefer Rush to Tcl if they are not already attached to Tcl.
Here are a couple of examples supplied by Adam Sah:

(略)

** A C-like language syntax can certainly be implemented this way.

* Distribution conditions.

We will permit use of the modified Scheme interpreter in proprietary
programs, so as to compete effectively with alternative extensibility
packages.

Translators from other languages to modified Scheme will not be part
of any application; each individual user will decide when to use one
of these. Therefore, there is no special reason not to use the GPL as
the distribution terms for translators. So we will encourage
developers of translators to use the GPL as distribution terms.


この、なんでもかんでもScheme に変換して Scheme インタープリターで実行するというアプローチを、 当時はどう考えても無理だろう(使い物にはならない)と思ってたんですが、 今現在の JavaScript をターゲット(出力言語)とした言語処理系の隆盛を見ると 技術の進歩ってのは怖いわねえと思うわけですよ。 これはまあ JIT コンパイルの長足の進歩が一番の原動力なんですかね。

■_ Software Engineering とは

Principles of Software Engineering, Part 1 | Hacker News

Principles of Software Engineering, Part 1 - thoughts from the red planet - thoughts from the red planet

Principles of Software Engineering, Part 1

DateTuesday, April 2, 2013

This is the first in a series of posts on the principles of software engineering. There's far more
to software engineering than just "making computers do stuff" – while that phrase is accurate,
it does not come close to describing what's involved in making robust, reliable software. I will use
my experience building large scale systems to inform a first principles approach to defining what it
is we do – or should be doing – as software engineers. I'm not interested in tired debates like dynamic
vs. static languages – instead, I intend to explore the really core aspects of software engineering.

(略)

Conclusion

Software engineering is a constant battle against uncertainty – uncertainty about your specs,
uncertainty about your implementation, uncertainty about your dependencies, and uncertainty about
your inputs. Recognizing and planning for these uncertainties will make your software more reliable
– and make you a better engineer.

ちょっと前についったで、ソフトウェア工学とは~ 的な盛り上がりがあったみたいですが (火付け役はきしださん ソフトウェア工学は失敗している - きしだのはてな)、 例によって遠巻きにして眺めておりましたとも。ええ。

■_

■_

2013年04月02日

■_

今日オープンだったんで、会社帰りにちと寄ってみるかと思ったら 建物に入るのすら行列ができていたという。 で、潔く諦めたw 店舗情報 - 武蔵小杉東急スクエア店 武蔵小杉東急スクエア 公式サイト

■_ 新機能

Ten C++11 Features Every C++ Developer Should Use : programming

Ten C++11 Features Every C++ Developer Should Use - CodeProject

Ten C++11 Features Every C++ Developer Should Use
By Marius Bancila, 2 Apr 2013

This article discusses a series of features new to C++11 that all developers should learn and use.
There are lots of new additions to the language and the standard library, and this article barely
scratches the surface. However, I believe some of these new features should become routine for all
C++ developers. You could probably find many similar articles evangelizing different C++11 features.
This is my attempt to assemble a list of C++ features that should be a norm nowadays. 

Table of contents:  

    auto
    nullptr
    Range-based for loops
    Override and final
    Strongly-typed enums
    Smart pointers
    Lambdas
    non-member begin() and end()
    static_assert and type traits
    Move semantics

以下略

あれ、final ってなんっだっけ

■_ JavaScriptは

JavaScript is Not Web Assembly | Hacker News Webのアセンブリ言語ではなく、別の何かであるという主張。 ま、ちょっと前の記事ではあるんですが。

blog.izs.me: JavaScript is Not Web Assembly

JavaScript is Not Web Assembly

It's fairly common these days to think of JavaScript as a sort of “assembly language for the web”.
After all, it's the language that is natively supported by web browsers, making it the most widely
deployed runtime in history. With Node, we have a very relevant general purpose non-browser stack
for doing system programming using this language, so it's even more important as a language.

(略)

JavaScript is not the Assembly of the Web. It's the C of the web. The to-JS languages are lining up
to become the C++ of the web.

    They offer language features that make some sorts of programs a little bit easier to write, but
    don't make an order of magnitude difference in expressive power.

    They're mostly backwards compatible with JavaScript.

    You still need to grok the DOM, or node, or whatever other platform your program is interacting
    with, and that's probably documented in JavaScript.

    They break almost all of the tooling that exists for JavaScript debugging.

Clarification: CoffeeScript does try very hard to compile to JS that runs on all JS platforms.
However, it does not optimize for a given platform, or have a specified target when it compiles.
The resulting JS is still a high-level general-purpose program, and the pitch, at least, is that it
is a better one than you would have written as easily by hand.

Wed 2011-09-14 14:21:00

© Isaac Z. Schlueter. Several rights reserved.

■_ Photoshop 1.0

先日ソースコードが公開されたアレをビルドしてしまった人がいるらしい Building Photoshop 1.0 | Hacker News

The Long View

On February 13, 2013, the Computer History Museum reported that they had received the source code
for version 1.1 of Photoshop from Adobe, and had permission to release it for non-commercial use.
This is the second time recently that something like this has happened, the first being the release
of the Quickdraw and MacPaint source code by Apple last year.  In both cases, there was a nice
commentary by Grady Booch, software design legend and trustee of the Computer History Museum.  Both
times, Booch reported having a look at the code and found it to be elegant and clear, and outstanding 
examples of how to write software. In his commentary on the Photoshop source code, Booch says
"Software source code is the literature of computer scientists, and it deserves to be studied and appreciated".

    Writers need to study the writing of others, and usually they do.  Computer programmers? not so
    much.  There is a lot written about programming, and most programmers read that stuff (including
    Grady Booch's books), but there are very few opportunities to actually read an acknowledged
    Great Work of programming from the past.  So now that we have the sources to Photoshop, an
    indisputable software masterpiece.  How can we make use of it?  Shall we read through the 100,000
    or so lines of code in 179 files to see how Thomas Knoll made it do its magic?  Maybe Grady Booch
    can just look at the code and immediately understand the thread of genius that runs through it, 
    but I can't.  Source code may be the literature of computer scientists, and each program's source
    code may tell the story of its function, but that story is written in a scrambled, crazy order
    and it makes no sense.  To understand their stories, computer programs must be read in the order
    of their execution, not the order of the text in the files.  For Photoshop, as for MacPaint, that
    means the code has to be compiled and running when we read it. We need to  see it in its natural
    order, and while it is executing, so we can compare what it says to what it does. Only then can 
    we learn its story.


Software source code is the literature of computer scientists, and it deserves to be studied and appreciated とか良いこと言うなあ

■_

■_

うーむ。以前気になってはいたんだけど iPhone用ということでスルーしたアプリを ほとんど思い出せない(ぼんやりとは覚えているけど検索の手がかりになるようなものががが)。 ま、急がんでも良いかw

2013年04月1日

■_

入社式があったはずですが、本社勤務ではないのでよくわかりません。

■_ けんろん!

なんかこう、向こうから迫っていてるというかなんというか。 ああ、間違って黄色いあの本を買ってしまった日がなんと遠い昔に思えることよ
圏論の基礎

これかな? タイトルでぐぐると、pdfへのリンクも見つかるけどとりあえずこっち。 [0808.1032] Introducing categories to the practicing physicist

そう言えばこの本途中まで読んで放置したままだ Basic Category Theory for Computer Scientists (Foundations of Computing)

■_

■_

あ、iPhone 持ちになりました


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

ホームへ


リンクはご自由にどうぞ

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