ときどきの雑記帖″

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

一つ前へ 2014年5月(上旬)
一つ後へ 2014年5月(下旬)

ホームへ

2014年05月20日

■_

こんなシリーズが! しかも第一弾がエンタープライズD。 スタートレック・スターシップコレクション| DeAGOSTINI デアゴスティーニ・ジャパン

■_

MagicPoint presentation foils の中の MagicPoint presentation foils の一枚目。 「Available for hire」ってのがあるんですがこういう言い回しするんですねえ

■_

あ、山形さんのコメントがついてる 伽藍とバザールの「伽藍」ってなんだろう。 - 未来のいつか/hyoshiokの日記

2014年05月19日

■_

イカサマータイム今年もやるってよ。某社。

■_

■_

2014年05月18日

■_

19時ちょっと前に勧誘電話。 なんの勧誘だったかなど詳しくは書かないけど、 「この4月に入社した新人で~」とか最初に言うし、 話し方もなんとなくそれっぽい。 一週間のシフトなんてどうなってるか分からんけど (固定電話にかけるならこういう時間の方がいるだろうし)、 なんともご苦労さんだねえ。

BGM(の音量)。なーんかどこも大きくしすぎな気がするんですがー

■_

■_

特に気になる変更は入ってないかな grep.git - grep

2014年05月17日

■_

田園都市線は土曜の午後も結構混むのねえ…

■_ The Best of the Both Worlds

Pascal: The best of both worlds | KaM Remake Development Blog この「The Best of the Both Worlds」ってフレーズ、たまに見かけるんだけどよくわからん。 The Best of Both Worldsの意味 - 英和辞典 Weblio辞書

新スター・トレック ベストエピソード 浮遊機械都市ボーグ [Blu-ray]
新スター・トレック ベストエピソード 浮遊機械都市ボーグ [Blu-ray]

■_

■_ GNU grep

grep.git - grep これ。 「port mb_next_wc to RHEL 6.5 x86-64」とあって、差分が

grep.git - grep

diff --git a/src/searchutils.c b/src/searchutils.c
index 5eb9a12..18dd584 100644
--- a/src/searchutils.c
+++ b/src/searchutils.c
@@ -285,5 +285,6 @@ mb_next_wc (char const *cur, char const *end)
{
wchar_t wc;
mbstate_t mbs = { 0 };
- return mbrtowc (&wc, cur, end - cur, &mbs) < (size_t) -2 ? wc : WEOF;
+ return (end - cur != 0 && mbrtowc (&wc, cur, end - cur, &mbs) < (size_t) -2
+ ? wc : WEOF);
}

こうだったのでなんのこっちゃと思ったのだけどアレか、 mbrtowc の第三引数の扱いか。 Man page of MBRTOWC mbrtowc 某日記(後期) しかし戻り値大丈夫なのこれ… あー false で 0 か?

2014年05月16日

■_

アルスラーン戦記14。 6年ぶり…そんなにあいてたのかー

とある機能が、Excel 2013では追加されているというのを知って地団駄(ry 2007なんだよねえ。会社の。

■_

■_ Heartbleed

流行は去っても淡々と追いかけるy Heartbleed: Q&A » SEI Blog

Heartbleed: Q&A » SEI Blog

Heartbleed: Q&A

Will DormannThe Heartbleed bug, a serious vulnerability in the Open SSL crytopgrahic software library, enables
attackers to steal information that, under normal conditions, is protected by the Secure Socket Layer/Transport
Layer Security (SSL/TLS) encryption used to secure the internet. Heartbleed and its aftermath left many
questions in its wake: 

    Would the vulnerability have been detected by static analysis tools?

    If the vulnerability has been in the wild for two years, why did it take so long to bring this to public knowledge now?

    Who is ultimately responsible for open-source code reviews and testing?

    Is there anything we can do to work around Heartbleed to provide security for banking and email web browser applications? 

(略)

Looking Ahead

As the answers above demonstrate, Heartbleed is fundamentally a coding mistake and one that could have been
prevented. Through open exchanges like this, we hope to prevent future vulnerabilities. We welcome your
feedback in the comments section. 

© 2014 Carnegie Mellon University

いつものごとく対話部分を訳そうなんて余裕はありませぬ○| ̄|_

2014年05月15日

■_

pocket に放り込んでるページが増える一方である。

■_

■_

QCon London 2014 のセッションから。 結構面白かった。 Catastrophic Cancellation スライドはこちらからの方が ユーザー登録要らない分よさげ → Presentations -> Catastrophic Cancellation: the Pitfalls of Floating-point Arithmetic

Presentations -> Catastrophic Cancellation: the Pitfalls of Floating-point Arithmetic

The design of IEEE754 floating-point arithmetic makes it safe to use in most cases without specialised knowledge
of numerical analysis. However, it only approximates arithmetic on real numbers, leading to hazards that can
produce wildly inaccurate results.

This talk covers the common problems that can occur, with a view to avoiding them in practice. I will discuss
how IEEE754 approximates real numbers, and present some common patterns in which inaccuracy can occur. I will
provide an overview of some manual and automated floating-point optimisations, and how they can safely be used. 

IEEE754 に関するある読み物を数年前から訳してるんだけどなんか進まないんだよねえ。

2014年05月14日

■_

超高速開発本。 池袋のジュンク堂には入ったらしいけど、渋谷では見つけられなかった…

■_

2014年05月13日

■_

■_

■_ strstr

高速な。と謳ってるんですがさて

RaphaelJ/fast_strstr

A fast substitution to the stdlib's strstr() sub-string search function.

fast_strstr() is significantly faster than most sub-string search algorithms when searching relatively small
sub-strings, such as words. We recommend any user to benchmark the algorithm on their data as it uses the same
interface as strstr() before discarding other algorithms.

Its worst case complexity (O(n × m) where n is the length of the string and m the length of the searched
sub-string) is the same as the naive brute-force algorithm but it mostly runs with a linear complexity (O(n))
on most strings.

Algorithm

Unlike other efficient sub-string search algorithms, it doesn't try to skip characters of the string but reads
every character of the string. However, the amount of work done for each character is substantially smaller.

This algorithm is thus faster when the searched sub-string has a small number of characters as other algorithms
are not able to skip a large number of characters.

Its starts by computing the sum of the character values of the sub-string.

It then reads the string by shifting a reading window the size of the sub-string. It knows the sum of the
character values inside this window and is able to update this sum when shifting it.

Comparing the two sub-string (the one inside the iterating window and the searched one) only occurs when the
both sums are equal (actually when sums difference equals zero for performance issues). This trick enable the
algorithm to skip a large number of comparisons.

A reference implementation of the algorithm is freely available here.

This algorithm is a special case of the Rabin-Karp algorithm for sub-string search which uses a simple sum as
rolling hash function.

ラビン・カープの変形?

■_ bash scripting

色々機能がついてんですねえ。 知ってたのもあったけど

Robert Muth: Better Bash Scripting in 15 Minutes

Signs you should not be using a bash script

    your script is longer than a few hundred lines of code
    you need data structures beyond simple arrays
    you have a hard time working around quoting issues
    you do a lot of string manipulation
    you do not have much need for invoking other programs or pipe-lining them
    you worry about performance

Instead consider scripting languages like Python or Ruby.

2014年05月12日

■_

「前倒し」の反対とは。

特に後者オススメ。 The Unreasonable Effectiveness of Dynamic Typing for Practical Programs Forty Years of Teams

YAPC::Asia Tokyo 2014 でました!Perlの父ことラリーが来日します。 おー。

■_

■_ GNU grep

2.19のはなしが

#17246 - grep-2.19 planning - GNU bug report logs

Message #56 received at 17246 <at> debbugs.gnu.org (full text, mbox):

Subject: Re: bug#17246: grep-2.19 planning
Date: Sat, 10 May 2014 18:03:43 -0700

Jim Meyering wrote:
> The precise date (or even week) will depend on too many factors.

From my point of view, now would be a good time for grep 2.19.  Today I 
finished wading through the bug reports and fixing the ones that seem 
pressing.  The remaining unresolved bugs are either lower-than-normal 
priority, or have to do with grep --color (which is low priority for me, 
as the coloring stuff is a mess and anyway I'm more of a monochrome guy 
myself).

■_

2014年05月11日

■_

ぺんぎん。 とある壁にでっかいペンギンのイラストが描かれててですね。 そのイラストの脇に「pengin」と。 おいおいペンギンのつづりは「penguin」だろ(ry と思ったのだけど実はローマ字綴りだった模様。

■_

■_

ちょっと前に Heartbleed 関連の話題を何回か書いたときに知ったのだけど 他にもいろいろ興味深いものがある Embedded in Academia :


一つ前へ 2014年5月(上旬)
一つ後へ 2014年5月(下旬)

ホームへ


リンクはご自由にどうぞ

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