ときどきの雑記帖″

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

一つ前へ 2014年7月(中旬)
一つ後へ 2014年8月(上旬)

ホームへ

2014年07月31日

■_

新人はラブライバーでした。

■_

これ、61号から80号までの予定の中に ベアルンとか薩摩とかデアフリンガーとかやたら通好み? な選択が。 しかしドレッドノートは良さそうだな。 隔週刊 世界の軍艦コレクション | イーグルモス / 軍艦コレクション41-60 あと、 隔週刊 世界の軍艦コレクション | イーグルモス / 軍艦コレクション 18号の「香取」、一覧では「戦艦」だけど、 詳細みると「巡洋艦」なのは一体… 香取 (練習巡洋艦) - Wikipedia 香取 (戦艦) - Wikipedia

■_

■_

あなたはどういったプログラマーか。 問のところだけ

What Kind of Programmer Are You?
How often do you comment your code?
You are writing a function to compute the least common multiple of two values. What do you name it?
You’re reading someone else’s code, and it’s awful. What do you do?
You want to style an HTML element and the appropriate CSS is non-standard. What is your solution?
Git or SVN?
What’s your preferred text editor??
What does your terminal look like?
Which is your programming language of choice?
Which is your ALL-CAPS programming language of choice?
What is your single-letter programming language of choice?
What is your preferred indentation style?
How would you describe your StackOverflow usage?
What is your favorite sorting algorithm?

2014年07月30日

■_

7巻の表紙はダヴーか! ってまだこっちにはきてなかった ナポレオン ~覇道進撃~ (7) (ヤングキングコミックス)
ナポレオン ~覇道進撃~ (7) (ヤングキングコミックス)

■_

2014年07月29日

■_

これが文庫になったのかーというのを見かけたのだけどタイトル忘れたw

Coffee Time Challenges, Q13 How many を Squeak Smalltalk で - Smalltalkのtは小文字です あとはスタート値に注意ですね。 しまったーっ

■_

2014年07月28日

■_

何回か本の裁断をお願いしていたところが数ヶ月前に店じまいしていたことを今頃知る。 ううむ困ったなあ…

■_

■_ 明日世界が滅びるとしても

僕は今日林檎の木を植える。 と覚えてたんだけどなんか微妙に違う? 「君」が植えるってのもあるし。

渚にて【新版】 人類最後の日 (創元SF文庫)
渚にて【新版】 人類最後の日 (創元SF文庫)

たしか中学一年の時に読んだ(もちろんそれは新訳版ではないけれどもw)。

マルティン・ルター - Wikiquote

もしも明日世界が終わるなら、私は今日リンゴの木を植えるだろう。

    "Wenn morgen die Welt unterginge, würde ich heute ein Apfelbäumchen pflanzen."

微妙にニュアンス違うなー (ドイツ語わからん)

2014年07月27日

■_

日経ソフトウエアちょっと薄くなった?

■_

■_

2014年07月26日

■_

文庫化されてた ローマ亡き後の地中海世界1: 海賊、そして海軍 (新潮文庫 し 12-94)
ローマ亡き後の地中海世界1: 海賊、そして海軍 (新潮文庫 し 12-94) ローマ亡き後の地中海世界2: 海賊、そして海軍 (新潮文庫 し 12-95)
ローマ亡き後の地中海世界2: 海賊、そして海軍 (新潮文庫 し 12-95)

■_

■_

今日のチカラワザ

Coffee Time Challenges

13) How many

Challenge: ABCDEFGHIJ is a ten-digit-number. All of the digits are distinct. If 11111 divides it evenly, how
many possibilities are there for ABCDEFGHIJ?

irb(main):009:0> [*1234576543.step(9876543210, 11111)].length
=> 777785
irb(main):009:0> [*1234576543.step(9876543210, 11111)].delete_if{|e| [*e.to_s.chars].uniq.length != 10}.length
=> 3397

合ってない○| ̄|_

2014年07月25日

■_

映画を観に行きたいが面倒くさい

■_

また新しいランキング? Interactive: The Top Programming Languages - IEEE Spectrum で、どのように順位付けしているかについて IEEE Top Programming Languages

IEEE Top Programming Languages

IEEE Top Programming Languages: Design, Methods, and Data Sources

The IEEE Spectrum Top Programming Languages app synthesizes 12 metrics from 10 sources to arrive at an overall
ranking of language popularity. The sources cover contexts that include social chatter, open-source code
production, and job postings. Read on to learn more about the languages we track and each of the data sources
we used, what it measures, and how we measured it.

What We Track

Starting from a list of over 150 programming languages gathered from GitHub, we looked at the volume of
results found on Google when we searched for each one in the pattern “X programming” where “X” is the
name of the language. We filtered out languages if they had a very low number of search results and then went
through the list by hand to identify the most interesting languages. We labeled each language according to
its use in Web, mobile, enterprise/desktop, or embedded environments.

Our final set of 49 languages includes names familiar to most computer users like Java, stalwarts like Cobol
and Fortran, and more recent but niche languages like Erlang. For each we gauged its popularity using 12 metrics across 10 sources:

2014年07月24日

■_

あ、日経ソフトウエア買うの忘れてた。

■_ Pike

なぜに今頃 Cに似たプログラミング言語「Pike」 | マイナビニュース たしかに drdobbs での記事も最近のものだけど Pike Programming Language | Dr Dobb's

で、Pike のページを見る

pike.lysator.liu.se: Home

latest pike news

	2014, June 25: Pike 7.8.866 Released

Pike 7.8.866 is now released!
This is an update of the 7.8 stable series. Read the release notes and download the distribution.

	2013, October 5: Pike Conference 2013

This years pike-conference will be held at the Roxen offices November 1:st to 3:rd. Read more

	2012, December 18: Pike Google+ Community

Find us on Google+ and share your own Pike news with the community at large.

	2012, October 2: Pike Conference 2012

This years pike-conference will be held at the Opera offices November 3:rd to 4:th. Read more

	2012, September 16: Pike 7.8.700 Released

Pike 7.8.700 is now released!
This is an update of the 7.8 stable series. Read the release notes and download the distribution.

pike conference とかやってたんだ。 一応最近リリースされたという動きはあった訳ね。

■_

■_ 重箱の隅

Matz氏語る「今ソフトウェアはソフトじゃない」 - Engine Yard Blog

Matz氏語る「今ソフトウェアはソフトじゃない」 - Engine Yard Blog

IBMの初代社長トーマス・ジョン・ワトソンの有名な言葉に、「コンピューターは全世界で5台くらいしか売れないと思う」
と言ったとされています。 その数字は当時の計算技師の人数とENIACの計算性能から導かれた数でした。

これ、ENIAC 云々は記憶にないなあと思い調べてみると…

Thomas J. Watson - Wikipedia, the free encyclopedia

Although Watson is well known for his alleged 1943 statement, "I think there is a world market for maybe
five computers", there is scant evidence he made it. Author Kevin Maney tried to find the origin of the
quote, but has been unable to locate any speeches or documents of Watson's that contain this, nor are the words
present in any contemporary articles about IBM.

なんだってー。 それに仮に本当に言っていたとしても、1943年の時点では ENIAC の性能云々は無理じゃないかなあ。

あともうひとつ

Matz氏語る「今ソフトウェアはソフトじゃない」 - Engine Yard Blog

1965年Intelの創業者の一人ゴードン・ムーアの論文中に示したムーアの法則は半導体集積度は18ヶ月ごとに2倍になる
というものです。 20年で1000倍以上、40年で100万倍以上になります。

18ヶ月ごとというのは間違いという話(少なくともムーアはそういってない)があったような

Moore's law - Wikipedia, the free encyclopedia

The period is often quoted as 18 months because of Intel executive David House, who predicted that chip
performance would double every 18 months (being a combination of the effect of more transistors and their
being faster).[12]
Moore's law - Wikipedia, the free encyclopedia

Retrieved 2011-11-27. "Moore also affirmed he never said transistor count would double every 18 months,
as is commonly said. Initially, he said transistors on a chip would double every year. He then recalibrated
it to every two years in 1975. David House, an Intel executive at the time, noted that the changes would
cause computer performance to double every 18 months."

あ、これだこれだ。 Mooreの法則は「1年で2倍」であり、「18ヶ月で2倍」は間違いです:坂本史郎の【朝メール】より:ITmedia オルタナティブ・ブログ Mooreの法則の「18ヶ月で2倍」はやはり間違い(2):坂本史郎の【朝メール】より:ITmedia オルタナティブ・ブログ

■_

今日もひとつチカラワザで解いておこうと思ったけど時間切れ。

2014年07月23日

■_

まあ毎度のことなんですが。 日本語翻訳記事が出てから盛り上がるのはどうにかならんのかなー。 などと。自分のアンテナ感度の低さはさておいても、 元記事出てから日本語翻訳記事がでるまでの間の反応が(ry

■_ 今日のチカラワザ

Coffee Time Challenges

17) Use all the digits

Challenge: Find a five-digit number, all digits distinct and non-zero, such that that number is equal to
the sum of all three-digit numbers can be made with the digits of that number.

i.e. A number ABCDE that is equal to ABC + ABD + ABE + BCA + CBA + BDA + DBA + … etc.

これを

xx=[*12345..98765]

ここから

yy=xx.collect{|e| [[*e.to_s.chars].uniq, e]}.delete_if{|e| e[0].include?("0") || e[0].length!=5}

こうして

zz=yy.collect{|e| [[*e[0].permutation(3)].collect{|e| e.join.to_i}.inject(:+), e[1]]}

こうじゃ!

irb(main):006:0> zz.each{|e| puts e[0] if e[0]==e[1]}
35964

合ってるみたい。

■_

2014年07月22日

■_

いくら近現代史の扱いが中学高校の歴史(日本史、世界史)ではアレだとは言え、 真珠湾攻撃で第二次世界大戦が始まった。と言っちゃうのはなんだかなあ。 World War II - Wikipedia, the free encyclopedia

World War II - Wikipedia, the free encyclopedia

The Empire of Japan aimed to dominate Asia and the Pacific and was already at war with the Republic of
China in 1937,[2] but the world war is generally said to have begun on 1 September 1939 with the invasion
of Poland by Germany and subsequent declarations of war on Germany by France and the United Kingdom. 
略
In December 1941, Japan joined the Axis, attacked the United States and European territories in the Pacific
Ocean, and quickly conquered much of the Western Pacific.

そういや、長崎に落とされた原爆が「リトルボーイ」だとか言ってたのもいたなあ。 わざわざ名前出して間違えるこたないのに(話の流れ上それに言及する必要はまったくなかった)。 Fat Man - Wikipedia, the free encyclopedia "Fat Man" was the codename for the type of atomic bomb that was detonated over the Japanese city of Nagasaki by the United States on 9 August 1945. Little Boy - Wikipedia, the free encyclopedia Little Boy was the codename for the type of atomic bomb dropped on the Japanese city of Hiroshima on August 6, 1945 by the Boeing B-29 Superfortress Enola Gay, piloted by Colonel Paul W. Tibbets, Jr., commander of the 509th Composite Group of the United States Army Air Forces.

■_ 今日のチカラワザ

Coffee Time Challenges

16) LED Clock

Challenge: You are in a totally dark room. The only light in the room comes from an old LED digital alarm
clock (with four seven segment displays). The clock display is HH:MM (no seconds). The clock is configured
to display time in 24 hour format and the leading digit is blank if not used. What is the period of time
between when the room is at its darkest, to when it is at its lightest?

こんなかんじで

irb(main):002:0>[*0..23].collect{|h| [*0..59].collect{|m| sprintf "%d%02d",hh m}}
=> [["000", "001", "002", "003", "004", "005", "006", "007", "008", "009", "010",
"011", "012", "013", "014", "015", "016", "017", "018", "019", "020", "021", "022",
"023", "024", "025", "026", "027", "028", "029", "030", "031", "032", "033","034",
"035", "036", "037", "038", "039", "040", "041", "042", "043", "044","045", "046",
"047", "048", "049", "050", "051", "052", "053", "054", "055","056", "057", "058", "059"],
(略)
["2300", "2301", "2302", "2303", "2304", "2305", "2306", "2307", "2308", "2309", "2310",
"2311", "2312", "2313", "2314", "2315", "2316", "2317", "2318", "2319", "2320", "2321",
"2322", "2323", "2324", "2325", "2326", "2327", "2328", "2329", "2330", "2331", "2332",
"2333", "2334", "2335", "2336", "2337", "2338", "2339", "2340", "2341", "2342", "2343",
"2344", "2345", "2346", "2347", "2348", "2349", "2350", "2351", "2352", "2353", "2354",
"2355", "2356", "2357", "2358", "2359"]]

0:00 から 23:59 までのパターンをつくって

irb(main):015:0> xx.flatten.collect{|s| s.chars.collect{|c| c.to_i }
=> [[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 0, 3], [0, 0, 4], [0, 0, 5], [0, 0, 6],
 [0, 0, 7], [0, 0, 8], [0, 0, 9], [0, 1, 0], [0, 1, 1], [0, 1, 2], [0, 1, 3], [0, 1, 4],
[0, 1, 5], [0, 1, 6], [0, 1, 7], [0, 1, 8], [0, 1, 9], [0, 2, 0], [0, 2, 1], [0, 2, 2],
[0, 2, 3], [0, 2, 4], [0, 2, 5], [0, 2, 6], [0, 2, 7], [0, 2, 8], [0, 2, 9], [0, 3, 0],
[0, 3, 1], [0, 3, 2], [0, 3, 3], [0, 3, 4], [0, 3, 5], [0, 3, 6], [0, 3, 7], [0, 3, 8],
[0, 3, 9], [0, 4, 0], [0, 4, 1], [0, 4, 2], [0, 4, 3], [0, 4, 4], [0, 4, 5], [0, 4, 6],
[0, 4, 7], [0, 4, 8], [0, 4, 9], [0, 5, 0], [0, 5, 1], [0, 5, 2], [0, 5, 3], [0, 5, 4],
[0, 5, 5], [0, 5, 6], [0, 5, 7], [0, 5, 8], [0, 5, 9], [1, 0, 0], [1, 0, 1], [1, 0, 2],
[1, 0, 3], [1, 0, 4], [1, 0, 5], [1, 0, 6], [1, 0, 7], [1, 0, 8], [1, 0, 9], [1, 1, 0],
(略)
[2, 3, 5, 0], [2, 3, 5, 1], [2, 3, 5, 2], [2, 3, 5, 3], [2, 3, 5, 4], [2, 3, 5, 5],
[2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 5, 9]]
irb(main):016:0>

そいつを整数値の配列に分解してから (んー、もうちょっと効率よく作れるか?)、

0 6
1 2
2 5
3 5
4 4
5 5
6 6
7 3
8 7
9 6

↑なパターンで7セグメントの光ってる部分の数に置き換えて、さらに足し込む

irb(main):021:0>yy.collect{|ee| [ee.inject(0){|r, e| r+=[6,2,5,5,4,5,6,3,7,6][e]]},ee]}.max
=> [24, [2, 0, 0, 8]]
irb(main):024:0>yy.collect{|ee| [ee.inject(0){|r, e| r+=[6,2,5,5,4,5,6,3,7,6][e]]},ee]}.min
=> [6, [1, 1, 1]]

問題ではここからこの二つの間の時間を求めることが要求されているけど省略

■_

■_

twitter で見かけて知ったのですが面白そう。 が、ちょっとお値段お高めでしょんぼりんぐ。

Amazonでの書評も興味をそそる

Amazon.co.jp: 軍人皇帝時代の研究―ローマ帝国の変容: 井上 文則: 本

これまで過渡期・混乱期としか見なされず、手短に紹介されがちだった、
軍人皇帝時代、いわゆる「危機の三世紀」について、じつは その後のローマ帝国の
統治構造の、抜本的な変化を促した時期だったという、本書での考察・検証自体も、
十分興味深いのですが、やはり、本書の中で特に印象的なのは、ローマ帝国の
再建・反転攻勢の先駆者としての位置付けを与えられ、復権されているガリエヌスの姿でしょう。

塩野七生はガリエヌスについては著書の「ローマ人の物語 迷走する帝国」の中で手厳しい評価を下し、
彼を殺害してその後に皇帝になったアウレリアヌスの方を、高評価していますが、
以下略

軍人皇帝時代の研究―ローマ帝国の変容
軍人皇帝時代の研究―ローマ帝国の変容

2014年07月21日

■_

ふと優先席の中国語表記が「博愛席」というのに気がついた。 これ、どの鉄道会社でも同じなんだろうか?

これまでのパターンだと毎年7月に新刊が出てたんだけど5巻の気配がないなあ… 呉越春秋 湖底の城 宮城谷昌光||講談社BOOK倶楽部

■_

■_

2012年だけど、まだTcl/Tk で本が出ていたのにちょっと驚いた Tcl/Tk, 3rd Edition - O'Reilly Media

Tcl/Tk, 3rd Edition - O'Reilly Media

Tcl/Tk, 3rd Edition
A Developer's Guide
By Clif Flynt
Publisher: Elsevier / Morgan Kaufmann
Final Release Date: January 2012
Pages: 816
 
Newly updated with over 150 pages of material on the latest Tcl extensions, Tcl/Tk: A Developer’s Guide
is a unique practical tutorial for professional programmers and beginners alike. Starting with a clear
picture of the basics, Tcl/Tk covers the variety of tools in this "Swiss army knife" of
programming languages, giving you the ability to enhance your programs, extend your application's
capabilities, and become a more effective programmer.

This updated edition covers all of the new features of version 8.6, including object-oriented programming
and the creation of megawidgets, existing data structure implementations, themed widgets and virtual
events. Extensive code snippets and online tutorials in various languages will give you a firm grasp on
how to use the Tcl/Tk libraries and interpreters and, most importantly, on what constitutes an effective
strategy for using Tcl/Tk.



一つ前へ 2014年7月(中旬)
一つ後へ 2014年8月(上旬)

ホームへ


リンクはご自由にどうぞ

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