ときどきの雑記帖 倒行逆施編

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

一つ前へ 2015年5月(下旬)
一つ後へ 2015年6月(中旬)

ホームへ

2015年06月10日

■_

朝の駅のエスカレーターでのできごと。 わたしの前に乗っていたおねーさん二人組が、 登り切ったエスカレーターから降りたところで立ち止まる → わたしもエスカレーターを降りるところまで来たが おねーさんたちはそのまま。 → 左右に避ける余地はないし、といってぶつかりに行くわけには行かないし。 → で、一瞬躊躇したら(エスカレーターの)次の段に乗っていたおねーさんに 靴のかかとを踏まれた○| ̄|_

ふと、ARMS (Project ARMS) の主題歌(OP/ED)を聴きたいと思ったが サントラ出てないんだよねこれ。 放送当時マキシシングル買ってたはずだけどさて。

さすがに全部活動停止か。 New Cinema 蜥蜴 - Wikipedia WAG - Wikipedia GARNET CROW - Wikipedia

■_

■_

機械式計算機について 【OKWave】 質問そのものはおいといてこの回答

方向性が異なりますが… 高校生の子を持つような世代の親の時代 【OKWave】

高校生の子を持つような世代の親の時代には学研の付録で 
おもちゃの機械式計算機が付いてきた時代がありました。 
(計算尺ではなく、ちゃんと回すやつです)

なんだってー。 しかしできればもう少し具体的な年代で書いて欲しかった…w

リレー式電卓

リレー式電卓

小学校の頃、学研の「科学」のふろくで、パスカルの計算機の原理を利用した計算機がありました。ダイヤルが4つあって、 それを付属の棒で時計回りに回すと足し算で、反時計回りだと引き算でした。カウンタは、これと同じようなものといえます。

10進カウンタIC(7490)を5個並べて、各桁にカウントアップのボタンを備えていました。数字を入力するには、たとえば 12345なら10000の位を1回、1000の位を2回・・・のように操作します。さらに54321を足すとすれば、同様に10000の位 を5回、1000の位を4回・・・のように押していくと、答えが表示されます。

という記述が見つかったのですが、これかな? でもやっぱりいつ頃のものかわからん。

「科学」「学習」が休刊へ: 軽井沢日記(ブログ) にもあと、機械式計算機も気に入りましたし とか。

関係ないけど一緒に見つかったもので興味深かったものをぺたり モンロー計算機完全マスター!! (sm16350571) をアカウントなしで見よう! | NicoGame

大人の科学マガジン Vol.24 (4ビットマイコン) (Gakken Mook)
大人の科学マガジン Vol.24 (4ビットマイコン) (Gakken Mook) 大人の科学マガジン Vol.27(8ビットマイコン) (Gakken Mook)
大人の科学マガジン Vol.27(8ビットマイコン) (Gakken Mook)

2015年06月09日

■_

Haskellで生産性を高める-Pythonからの移行 | プログラミング | POSTD 既に誰か訳してたよなこれ。 と思って調べたら Qiitaにあった(一ヶ月ほど前) [翻訳] Haskellで生産的になる(Pythonから移行して) - Qiita 比較しちゃダメよ?w

pragprog。 The Pragmatic Bookshelf | Clojure Applied とか The Pragmatic Bookshelf | Pragmatic Scala とか The Pragmatic Bookshelf | Ruby Performance Optimization とか The Pragmatic Bookshelf | Mazes for Programmers とか 興味はあるもののこのところの円安傾向で、以前ほどにはホイホイクリックという気にもなれなくなってきたなあ(^^; ブラックフライデー辺りのセール待ちますかね。 って packt publishing とかO'reillyにも狙ってるのあるんだけどw

日経LINUX。まつもとさんの連載でローカル変数を最初に導入したプログラミング言語は? ってのがあって、そういやなんだろうと(以前調べたことがあるような気もする。「文字列」と一緒に)。 まつもとさんも決定的な情報は見つけられなかったということだけど。

■_

■_

まずこういうので

(defun ff (x y)
  (labels ((sqr (x) (* x x)))
    ;(print y)
    (cons (+ (sqr (car x)) (car y))
	  (list (+ (cadr x) (cadr y))))))

試してみて

(ff '(1 2) '(3 4))
→(4 6)
(reduce #'ff '((1 2) (3 4) (5 6)))
→(21 12)

次にこういうのを試して

(defun fff (x)
  (cons (* x x)
	(cons x
	      (list 1))))
(setq data '(2.0 6.0 4.0 9.0 8.0 9.0 9.0 6.0 7.0 9.0))
(mapcar #'fff data)
→((4.0 2.0 1) (36.0 6.0 1) (16.0 4.0 1) (81.0 9.0 1) (64.0 8.0 1) (81.0 9.0 1) (81.0 9.0 1) (36.0 6.0 1) (49.0 7.0 1) (81.0 9.0 1))

行けそうなので、これを

(defun f4 (x y)
  (labels ((sqr (x) (* x x)))
    (cons (+ (car x) (car y))
	  (cons (+ (cadr x) (cadr y))
		(list (+ (caddr x) (caddr y)))))))

こうすると

(reduce #'f4
	(mapcar #'fff data))
→(529.0 69.0 10)

自乗和と和と個数が求まったので、あとはここから平均と自乗和の平均を求めればOK。 しかしひでえ関数名だw

■_

明日があるさ

2015年06月08日

■_

某古書店で「Prologの技芸」を見かけたがついていた値は いちまんにせんえんでした(つってもわたしはもう持ってるんですけどね。 ただし表紙カバーなしの)。

「やめる」止める辞める已める

RustによるFirefoxの機能の実装はC++よりも優位 | マイナビニュース Firefoxの開発に携わっているNicholas Nethercote氏は6月3日(米国時間)、「Measuring data structure sizes: Firefox (C++) vs. Servo (Rust)|Nicholas Nethercote」において、 情報元の記事へのリンクをきちんとはっているのは珍しい気が

■_

■_

And the latest programming language? It doesn't matter it can be disassembled : programmingWondering how to hack a military drone? It’s all on Google | cyber security dojo“We’ve developed a new programming language that is provably free from those vulnerabilities,” said Lee Pike, research lead for cyber-physical systems with security R&D firm Galois. “The approach is to transition the programming language we’ve developed, called Ivory, to Boeing so that they can rewrite their systems.”

で、ivory で調べてみると… programming language ivory - Google 検索

  
   http://ivorylang.org/
   http://ivorylang.org/ivory-introduction.html
   https://www.cs.indiana.edu/~lepike/pubs/pike-plpv14.pdf
   https://github.com/GaloisInc/ivory

…あれ? 前に見たことがある?

■_

Lisp で分散を求める。

分散のelispプログラム - by shigemk2 にあるプログラムは、 標本の数(という表現はここで正しいのだろうか?)が固定でそれは面白くないってのと、 わたしが大学でプログラミングを始めた頃 (きちんと始めたのは大学に行ってからでした)に 「FORTRAN」で分散(や標準偏差や平均)を求めるプログラムを「書かされた」なあ などと遠い目をしてたら 「はて。ではあの頃FORTRANで書いたようなものをLispで書いたらどんなのになる?」 という考えが。

いやまあ「求めること自体」は難しくないと思うんですよ。 FORTRAN の配列をリストに置き換えて(他のデータ型でもよいですがとりあえず) こんな感じ(変なインデントな気がしますがそこはスルーしてくださいませ)?

(defun varp (lst)
  (let ((len (length lst)))
    (labels ((sqr (x) (* x x)))
      (- (/
	  (apply #'+ (mapcar #'sqr lst))
	  len)
	 (sqr (/
	       (apply #'+ lst)
	       len))))))
varp

(varp '(0.0 2.0 8.0 16.0))
38.75

分散を求める式を変形してますが、 それでも length の引数も併せて考えればリスト lst を三回走査しています。 この走査の回数を、二回。できれば一回で済ませる書き方はあるんでしょうか?

(defun hoge (lst)
  (let ((len (length lst)))
      (mapcar (lambda (x) (cons x (list (* x x))))
	      lst)))

(hoge '(1.0 2.0 3.0))
((1.0 1.0) (2.0 4.0) (3.0 9.0))

眠気に負けたのでここまで。

続く。か?

2015年06月07日

■_

イマドキのお寺さんは本堂にも椅子があって法事のときも正座しないで済むんで楽っすな

■_

■_

明日読(めたらいいなあ) Why Software Engineering Isn’t Engineering, and the Implications – Ian Cackett

2015年06月06日

■_

今月来月の出版予定を眺めてたらこんなのが。 Amazon.co.jp: The Art of Computer Programming Volume 1 Fundamental Algorithms Third Edition 日本語版: Donald E.Knuth, 有澤 誠, 和田 英一, 有澤 誠, 和田 英一, 青木 孝, 筧 一彦, 鈴木 健一, 長尾 高弘: 本

登録情報

    単行本: 656ページ
    出版社: KADOKAWA (2015/6/26)
    言語: 日本語
    ISBN-10: 4048694022
    ISBN-13: 978-4048694025
    発売日: 2015/6/26

ようやく来たかー。でもページ数がちょっと増えてるのに値段は半分くらいってのは ペーパーバックなのかな?

参考までにアスキー版はこう。 Amazon.co.jp: The Art of Computer Programming Volume1 Fundamental Algorithms Third Edition 日本語版 (ASCII Addison Wesley Programming Series): ドナルド・E・クヌース, 有澤 誠, 和田 英一, 青木 孝, 筧 一彦, 鈴木 健一, 長尾 高弘: 本

登録情報

    単行本: 632ページ
    出版社: アスキー (2004/2/18)
    ISBN-10: 475614411X
    ISBN-13: 978-4756144119
    発売日: 2004/2/18
    商品パッケージの寸法: 25.6 x 18.4 x 2.8 cm

電書版も期待したいんだけどどうだろか

書影、「ASCII」のままぢゃんw The Art of Computer Programming Volume 1 Fundamental Algorithms Third Edition 日本語版
The Art of Computer Programming Volume 1 Fundamental Algorithms Third Edition 日本語版

■_

■_

忘れずメモ。今月は次の日曜深夜(というか月曜未明か)。 中島みゆきのオールナイトニッポン月イチ|AMラジオ 1242 ニッポン放送

■_

■_

ふと思いついて見に行ってみたら gawk.git - gawk Add two new helper programs. という気になるコミットがあったのでどんなもんだろかとチェック

gawk.git - gawk

index e0d394b..4188c17 100644 
--- a/helpers/ChangeLog 
+++ b/helpers/ChangeLog 
@@ -1,3 +1,7 @@ 
+2015-05-27 Arnold D. Robbins <arnold@skeeve.com> 
+ 
+ * mb_cur_max.c, timeformat.c: New files. 
+ 
 2015-05-19 Arnold D. Robbins <arnold@skeeve.com> 
 
 * 4.1.3: Release tar ball made. 
diff --git a/helpers/mb_cur_max.c b/helpers/mb_cur_max.c 
new file mode 100644 
index 0000000..c36d7ef 
--- a/dev/null 
+++ b/helpers/mb_cur_max.c 
@@ -0,0 +1,10 @@ 
+#include <stdio.h> 
+#include <locale.h> 
+#include <stdlib.h> 
+ 
+int main() 
+{ 
+	setlocale(LC_ALL, ""); 
+	printf("MB_CUR_MAX = %lu\n", MB_CUR_MAX); 
+	return 0; 
+} 
diff --git a/helpers/timeformat.c b/helpers/timeformat.c 
new file mode 100644 
index 0000000..c3d1b93 
--- a/dev/null 
+++ b/helpers/timeformat.c 
@@ -0,0 +1,13 @@ 
+#include <stdio.h> 
+#include <locale.h> 
+#include <langinfo.h> 
+ 
+int main(int argc, char **argv) 
+{ 
+	setlocale(LC_ALL, ""); 
+	printf("D_T_FMT: %s\n", nl_langinfo(D_T_FMT)); 
+#ifdef _DATE_FMT 
+	printf("_DATE_FMT: %s\n", nl_langinfo(_DATE_FMT)); 
+#endif /* _DATE_FMT */ 
+	return 0; 
+}

ふむ。 やろうとしていることは分かるけど、なんのためだろう? ビルド前(あるいはビルド時)にあれこれするのならMakefile関連にも差分ができるだろうし。 それと timeformat.c の方で気になったのだけど、 langinfo.h とか nl_langinfo って存在決め打ちして良いもの?

準拠 SUSv2, POSIX.1-2001. (Man page of NL_LANGINFO) ふうむ。

■_

必要に迫られて。ではあるのだけど、仕事は全く関係なく(下手したら高校レベルの) 数学をこのところやっている (仕事に関係するのもやってるけれどそれはまた別の話)。 やっぱり必要に迫られると理解度違うねw

というかあの頃こういう題材(謎)を取り上げて こういうところで使いますよ(使えますよ)と教えてくれれば(ry

2015年06月05日

■_

Blu-ray Audioとかいうのですでに出ていたのだけど そんなのの再生環境は持っていなかったのだった。 劇場版『宇宙戦艦ヤマト2199 星巡る方舟』オリジナル・サウンドトラック
劇場版『宇宙戦艦ヤマト2199 星巡る方舟』オリジナル・サウンドトラック というわけで(やっとでた)CDを。 ガトランティス関連の曲がよい:)

宇宙戦艦ヤマト2199 追憶の航海 オリジナル・サウンドトラック 5.1ch サラウンド・エディション【Blu-ray audio】
宇宙戦艦ヤマト2199 追憶の航海 オリジナル・サウンドトラック 5.1ch サラウンド・エディション【Blu-ray audio】 こっちはCDでないんかね。

静的型付け言語の良い点 - L'eclat des jours(2015-06-05) アマゾンの洋書の価格がものすごく高くなっていて驚いた) そういえば、 某大型書店の洋書売り場でちょっと気になる本があったときに 値段を確かめると予想よりもだいぶ高いという印象ですね。 元からAmazonで買うより高いというのを勘案してもさらにその上。

■_

■_

前回見落としてたのを。 perldelta - what is new for perl v5.22.0 - metacpan.org

perldelta - what is new for perl v5.22.0 - metacpan.org

qr(...\(...\)...), qr[...\[...\]...], and qr{...\{...\}...} now work. Previously it was impossible to escape these three left-characters with a backslash within a regular expression pattern where otherwise they would be considered metacharacters, and the pattern opening delimiter was the character, and the closing delimiter was its mirror character.

" P" =~ /(?=.*P)P/ should match, but did not. This is now fixed. [perl #122171].

qr のこの挙動は気がつかなかった(知らなかった)。

■_

コードとは。 Code is like public toilet | Java Deep

Code is like public toilet | Java Deep

We, developers, work with legacy code. There are only two types of code: legacy or dead. Before your code dies it becomes legacy unless it was born dead. Legacy code must be dealt with and legacy code is never perfect. Was it perfect when it was created? Perhaps it was. A piece of code can erode because of change of the environment. This environment can be other code, integration interfaces, developer experience. The code that looked okay one day may seem to be disgusting next day or a year later. The code that one team created may just not seem okay to another team. There may be something “real” issue that the industry generally agrees today as bad practice like having 5000 lines god objects, or some discussable things like having many return statements in an otherwise readable and neatly written method. One group may agree to use a variable retval and have one return statement, other schools do not care so long as long other readability issues are not present. (以下略)

コードには legacy なものと死んだものの二種類しかない。と。

2015年06月04日

■_

はてなブックマーク - アンディ・ウォーホルとUHA味覚糖のコラボのど飴に第2弾 - はてなニュース 前回のは全然見かけなかったんだけどどこにあったんだーー > コラボのど飴

Access 2007 からの機能を使うとこれまでやりたかったけどできなかったことが できるようなんだけど、中々思うような結果にならないでござる。

■_

■_ にやにや

はてなブックマーク - トヨタの車のソースコードはスパゲッティコード山盛り? - YAMDAS現更新履歴

米国でのトヨタ車急加速事件、ファームウェアに欠陥があったとの見方ふたたび | スラド ハードウェア ストーリー by hylom 2013年10月31日 8時00分トヨタ側の反応はいかに 部門より

トヨタ自動車の大規模リコール (2009年-2010年) - Wikipedia

■_

ソフトウェア云々でもうひとつ。 生死をも左右するソフトウェアの設計・構築はどうすれば完璧に近づけられるのか? - GIGAZINE1980年代後半、ちょうど航空業界ではエアバスがA340型機のデビューを控えていた頃だが、 ソフトウェア関連やセーフティ関連のエンジニアの間ではあるエピソードが有名だった。そのエピソードとは、 ボーイングとエアバスという2大航空機メーカーで、FBWのテスト方法がどれだけ異なるかについてのものだった。 というの、原文 ( How Is Critical 'Life or Death' Software Tested? | Motherboard CERIAS - Center for Education and Research in Information Assurance and Security) の In the late 1980s, around the time the Airbus A340 was introduced (1991), those of us working in software engineering/safety used to exchange a (probably apocryphal) story. 「probably apocryphal」がすっぽり抜け落ちたりしてるけどいいのかね。 本文の後の方で 上記のエピソードはあくまで都市伝説的に語り継がれているものなので、実際にそのような手法が行われていたかどうかは不明ですが、両社のコンピューターシステムに対する考え方の違いをよく表しているものといえそう。 という一文はあるけど、前述の文だけ切り出してるのだけ見て勘違いしちゃってた手合いが結構いそうだけど。

それはそれとして 関連記事の testing - How is software used in critical life-or-death systems tested? - Programmers Stack Exchange にあった They're still a PITA for the average programmer, but they're often more effective at testing critical systems. の PITA ってなんぞ。 全部大文字だしなにかの略語なんだろうけど PITA - Definition by AcronymFinder 11個もあるけど、なんちゃらあそしえーしょんは除外して…… これか? pain in the ass - definition of pain in the ass by The Free Dictionary

They Write the Right Stuff | Fast Company | Business + Innovation

2015年06月03日

■_

今日は出勤時に雨だったわけですが。 いましたねー傘差し自転車。 どのくらい周知されてんだろか違反扱い云々の話。

access 2007 ルックアップウィザード ルックアップ列

ゲームプログラマのためのコーディング技術
ゲームプログラマのためのコーディング技術 パラパラと眺めてみたけど、最後の章がコードのメトリクス関連なのは面白いと思った。 お、kindle版ももうある? ゲームプログラマのためのコーディング技術
ゲームプログラマのためのコーディング技術

■_

■_

Introduction to J Programming Language (2004) | Hacker News 2004とかあるけど、実際元記事見たら日付はこの5月だったり? Introduction to J Programming Language [2004] それはともかく、 By the way, APL is sometimes called “a Chinese BASIC” due to its symbols. ちゃいにーずべーしっく……

■_

PyPy 2.6.0登場 - Pythonより7倍高速化 | マイナビニュース

PyPy 2.6.0登場 - Pythonより7倍高速化 | マイナビニュース

PyPy 2.6.0の主な特徴は次のとおり。 
 
 JIT最適化の促進。CPythonと比較して7倍を超える高速性を実現 
 zlibおよびbz2モジュールにおける入出力パフォーマンスの向上 
 JITパフォーマンスを引き上げるためのリファクタリングとクリーンナップの実施 
 フレームサイズの改善 
 JITコードのプロファイリングを実施することを目的とした新しい軽量のスタティックプロファイラ「vmprof」を導入(実験段階) 
 TLS 1.1および1.2のサポート改善

毎度のことだけどこういう「n倍高速」って書き方は誤解招くんじゃないかなあと思いつつ (JavaとC++の比較みたいに限定的な状況でとか前提条件ありそうだし) それっぽい英文記事を探すと PyPy Status Blog: PyPy 2.6.0 release

PyPy Status Blog: PyPy 2.6.0 release

Performance improvements: 
 
 Slight improvement in frame sizes, improving some benchmarks 
 Internal refactoring and cleanups leading to improved JIT performance 
 Improved IO performance of zlib and bz2 modules 
 We continue to improve the JIT’s optimizations. Our benchmark suite is now over 7 times faster than cpython

確かにover 7 times faster than cpythonとある。 んで、Our benchmark suite というのが前にくっついているので どんなベンチマークなんJAROねと……(続く?)

Python (で書いたプログラム)の高速化云々といえばこういうのもちょっと前にあって。 Optimizing Python With Cython - DoubleMap Engineering

Optimizing Python With Cython - DoubleMap Engineering

Python is slow. It’s still faster than a lot of other languages, but describing Python code as “fast” will probably get some weird looks from people who use compiled or JITted languages.

Still, I love Python for its design and speed at which I can write good code. Most of the time, when writing Python for distributed or web applications, it doesn’t matter. Your runtime is usually dominated by network traffic or data accesses than it is by raw computational speed. In those cases, the correct optimization is often reducing network requests or indexing your data.

Sometimes—just occasionally—we actually do need fast computation. Traditional Python wisdom has been to profile your code (perhaps using cProfile), identify the hot spot, and rewrite it in C as a Python extension. I’ve had to do that before for a handwriting recognition algorithm with great success (it turned a 2–3 second computation into a practically real-time one), but writing C code and then figuring out the FFI was a pain. I had to rewrite the algorithm in C, verify that my C version was correct and didn’t have memory errors, and then figure out the right incantations to get it to cooperate with Python.

Let’s try something different this time.

確かに高速化のためにCで書き直すのは面倒…という気持ちは分かる。 でもここで Cyhon 持ってこれるものなんだねえ。

Cython といえば翻訳本出ますな。 Cython ―Cとの融合によるPythonの高速化

■_

Pyhon の次は Perl で。 Perl 5.22がリリースされました - 数学関連の機能強化、メソッドのパフォーマンスの改善、正規表現の改善 - サンプルコードによるPerl入門 - 安定と信頼のPerlを学ぶ で紹介されてるもの以外にも興味を惹かれた新機能やらがあって。 perldelta - what is new for perl v5.22.0 - metacpan.org

perldelta - what is new for perl v5.22.0 - metacpan.org

 Core Enhancements 
 New bitwise operators 
 New double-diamond operator 
 New \b boundaries in regular expressions 
 qr/\b{gcb}/ 
 qr/\b{wb}/ 
 qr/\b{sb}/ 
 Non-Capturing Regular Expression Flag 
 use re 'strict' 
 Unicode 7.0 (with correction) is now supported 
 use locale can restrict which locale categories are affected 
 Perl now supports POSIX 2008 locale currency additions 
 Better heuristics on older platforms for determining locale UTF-8ness 
 Aliasing via reference 
 prototype with no arguments 
 New :const subroutine attribute 
 fileno now works on directory handles 
 List form of pipe open implemented for Win32 
 Assignment to list repetition 
 Infinity and NaN (not-a-number) handling improved 
 Floating point parsing has been improved 
 Packing infinity or not-a-number into a character is now fatal 
 Experimental C Backtrace API 

 Security 
 Perl is now compiled with -fstack-protector-strong if available 
 The Safe module could allow outside packages to be replaced 
 Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available

 Incompatible Changes 
 Subroutine signatures moved before attributes 
 & and \& prototypes accepts only subs 
 use encoding is now lexical 
 List slices returning empty lists 
 \N{} with a sequence of multiple spaces is now a fatal error 
 use UNIVERSAL '...' is now a fatal error 
 In double-quotish \cX, X must now be a printable ASCII character 
 Splitting the tokens (? and (* in regular expressions is now a fatal compilation error. 
 qr/foo/x now ignores all Unicode pattern white space 
 Comment lines within (?[ ]) are now ended only by a \n 
 (?[...]) operators now follow standard Perl precedence 
 Omitting % and @ on hash and array names is no longer permitted 
 "$!" text is now in English outside the scope of use locale 
 "$!" text will be returned in UTF-8 when appropriate 
 Support for ?PATTERN? without explicit operator has been removed 
 defined(@array) and defined(%hash) are now fatal errors 
 Using a hash or an array as a reference are now fatal errors 
 Changes to the * prototype
(略)
 Documentation 
 New Documentation 
 perlunicook 
略

↑見出しはこんな感じ。お、a2p なくなった?


New bitwise operators 
  

A new experimental facility has been added that makes the four standard bitwise operators (& | ^ ~) treat their operands consistently as numbers, and introduces four new dotted operators (&. |. ^. ~.) that treat their operands consistently as strings. The same applies to the assignment variants (&= |= ^= &.= |.= ^.=).

文字列対象の bitwise operetor ってのがピンとこないけど(対応する)一文字ずつ操作する?

New \b boundaries in regular expressions 
  
qr/\b{gcb}/ 
  

gcb stands for Grapheme Cluster Boundary. It is a Unicode property that finds the boundary between sequences of characters that look like a single character to a native speaker of a language. Perl has long had the ability to deal with these through the \X regular escape sequence. Now, there is an alternative way of handling these. See "\b{}, \b, \B{}, \B" in perlrebackslash for details.

qr/\b{wb}/ 
  

wb stands for Word Boundary. It is a Unicode property that finds the boundary between words. This is similar to the plain \b (without braces) but is more suitable for natural language processing. It knows, for example, that apostrophes can occur in the middle of words. See "\b{}, \b, \B{}, \B" in perlrebackslash for details.

qr/\b{sb}/ 
  

sb stands for Sentence Boundary. It is a Unicode property to aid in parsing natural language sentences. See "\b{}, \b, \B{}, \B" in perlrebackslash for details.

ふむ。

Use of multiple /x regexp modifiers 
 
It is now deprecated to say something like any of the following: 
 
  qr/foo/xx; 
  /(?xax:foo)/; 
  use re qw(/amxx); 
  

That is, now x should only occur once in any string of contiguous regular expression pattern modifiers. We do not believe there are any occurrences of this in all of CPAN. This is in preparation for a future Perl release having /xx permit white-space for readability in bracketed character classes (those enclosed in square brackets: [...]).

これか /xx 。

New Documentation 
perlunicook 
 
This document, by Tom Christiansen, provides examples of handling Unicode in Perl. 

unicook という名前からすると、 Unicode に関連したもの?

2015年06月02日

■_

分量的には大した量じゃないんだけど、「行動進化学」面白そう (ぐぐってみると名前に揺れがあるっぽい? nature科学 深層の知 物理数学・物理化学・工学・ロボット
nature科学 深層の知  物理数学・物理化学・工学・ロボット

■_

2015年06月01日

■_

録画予約 スティーブ・ジョブズ vs. ビル・ゲイツ | BS世界のドキュメンタリー | NHK BS1

昨日の昼(11:30am~)にBSフジでやってたガリレオXを録画で観たけどひどい内容で最後まで観るのが辛かった。 ガリレオX|テレビ番組|ワック

■_

■_

面白い。 50 Lies Programmers Believe さすがに50個全部はあれなので最初の10個を。

50 Lies Programmers Believe
  1. The naming convention for the majority of the people in my country is the paradigm case and nobody really does anything differently.
  2. Names are all representable in US ASCII.
  3. Unicode has properly solved the problem of language encoding.
  4. Gender is immutable and fits cleanly into an enumerated list of two options.
  5. A person’s legal name is how they identify to the world.
  6. In general, openness is preferable to privacy.
  7. Postcodes or ZIP codes are a good way to identify the location someone is in rather than an arbitrary string used for routing mail.
  8. Everyone has a phone number and that phone numbers map 1-to-1 with people.
  9. Objects of any size can be delivered to one’s home at any time.
  10. Users give a fuck about security.

一つ前へ 2015年5月(下旬)
一つ後へ 2015年6月(中旬)

ホームへ


リンクはご自由にどうぞ

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