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

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

一つ前へ 2016年1月(上旬)
一つ後へ 2016年1月(下旬)

ホームへ

2016年01月20日

■_

ギリシア人の物語I 民主政のはじまり
ギリシア人の物語I 民主政のはじまり どうせ次の巻が出るのは今年の終わりくらいだろうしー。で ゆっくり読み進めているんですが、 「王たちの王」という書き方にちょっとした新鮮みを感じたり。 中学やら高校の世界史の教科書では「王の王」のように書かれていたと思うんだけど、 「鋭さ」は多少失われるけど 「意味するところ」ははっきりするかなあ。という。 詳しい感想などは(まだ)書かない:p ペルシア戦争

実は発売されてすぐに買ったのにまだロクに読んでいないこの辺。 皇帝フリードリッヒ二世の生涯 上
皇帝フリードリッヒ二世の生涯 上 皇帝フリードリッヒ二世の生涯 下
皇帝フリードリッヒ二世の生涯 下

■_

2016年01月19日

■_

4522敗の記憶 ホエールズ&ベイスターズ涙の球団史 (双葉文庫)
4522敗の記憶 ホエールズ&ベイスターズ涙の球団史 (双葉文庫) 追加された章を読む。 村田の、FA移籍時にあった例の発言の真意らしきもの(当人によるものではないけど)が 書かれていて、 「弱冠22歳」やらなんやらの発言を考えるとわりと信頼できるとも思うのだけど かといってそれであのときの村田に対する印象が変わるかというと……

■_

■_

TrumpScript | Devpost 新?言語 なんだけど……

TrumpScript | Devpost

TrumpScript is language based upon the illustrious Donald Trump. As the undeniably best presidential candidate in the 2016 language, we found that the current field of programming languages does not include any that Trump's glorious golden combover would approve of.

TrumpScript is our solution to this. It's the programming language Trump would approve of. Just like he is making America great again, we hope our efforts will make programming great again.

で、

TrumpScript | Devpost

Features 
 
Our language includes several convenient features, perfect for any aspiring Presidential candidate including: 
  • No floating point numbers, only integers. America never does anything halfway.
  • All numbers must be strictly greater than 1 million. The small stuff is inconsequential to us.
  • There are no import statements allowed. All code has to be home-grown and Amerian made.
  • Instead of "True" and "False," we have "fact" and "lie"
  • Only the most popular English words, Trump's favorite words, and current politician names can be used as variable names.
  • Error messages are mostly quotes directly taken from Trump himself.
  • All programs must end with "America is great."
  • Our language will automatically correct Forbes' $4.5B to $10B
  • In it's raw form, TrumpScript is not compatible with Windows, because Trump isn't the type of guy to believe in PC
  • The language is completely case insensitive

そしてトドメ。

TrumpScript | Devpost

The exciting parts: 
  • Strings are denoted by double quotes ("I love Trump")
  • The 'is' and 'are' keywords are used both to check for equality, and for assignment. To use for assignment, say something like 'Trump is great' or 'Democrats are dumb'. To use to check for equality, do the same but append a '?'. For example, you may need to ask yourself 'Trump is "the best"?' (although we all know that would evaluate to 'fact' anyway)
  • Assignment can also be done via the 'make' keyword. E.g. 'Make America great' assigns the value of the variable 'great' to 'America'
  • Printing to stdout can be done via 'tell' or 'say'
  • While loops are denoted via 'as long as'. And that's the only type of loop you need anyway.
  • If a 'word' (so anything that could be a variable name) is deemed unnecessary by the compiler, it's simply thrown away. So you can make truly self documenting code, or code that appear to read very very similarly to real speeches by the big man himself. You can find some interesting examples in our 'test/test_files' directory

But most importantly, Trump doesn't like to talk about his failures. So a lot of the time your code will fail, and it will do so silently. Just think of debugging as a fun little game.

2016年01月18日

■_

かなり早い時刻に家を出た(それでももう雪は雨に変わっていた)ので あまり影響を受けずに会社着。 自席で世の混乱の様を眺めておりました:) あ、特別今日早く出たということではなく いつもそんな感じなのです(多少早めにはでたけど)。

■_

  • Proper handling of SIGINT/SIGQUIT
  • Mesa - Software Preservation Group
  • SIG :: Software Improvement Group :: Building Maintainable Software - Full version available now!
  • PHPのdirname関数でWindows環境のShift_JISパス文字列のディレクトリ名の末尾に特定のコードが入るとディレクトリが欠落する現象 - Qiita
  • 2016年01月17日

    ■_

    そういえば歴史群像の最新号では赤いあの人の特集が(結構読み応えがあった)。 歴史群像 2016年 02 月号 [雑誌]
    歴史群像 2016年 02 月号 [雑誌]

    加筆された章があるというので文庫版でも買ってしまった。 元のやつ買ったのはたしか…… 4522敗の記憶 ホエールズ&ベイスターズ涙の球団史 (双葉文庫)
    4522敗の記憶 ホエールズ&ベイスターズ涙の球団史 (双葉文庫)

    都立中央図書館でやるのか。 4階企画展示室……たぶん行ったことないな(中央図書館自体は何度も行ってる)。

    これ、なんか既視感がががが Orthodox C++ Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

    ■_

    ■_

    昨日の。 足し算の回数があまりにアレなので減らそうと思ったものの

    irb(main):006:0> (1..11).each{|e| puts [*1..e].inject(:+)}
    1
    3
    6
    10
    15
    21
    28
    36
    45
    55
    66
    irb(main):023:0> (1..10).inject(0){|a, d| puts d+a; d+a}
    1
    3
    6
    10
    15
    21
    28
    36
    45
    55
    => 55
    irb(main):056:0> (1..10).inject([0]){|a, d| a<<a[-1]+d}.drop(1)
    => [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]
    irb(main):057:0> (1..100).inject([0]){|a, d| a<<a[-1]+d}.drop(1)
    => [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190,
    210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666,
    703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326,
    1378, 1431, 1485, 1540, 1596, 1653, 1711, 1770, 1830, 1891, 1953, 2016, 2080, 2145,
    2211, 2278, 2346, 2415, 2485, 2556, 2628, 2701, 2775, 2850, 2926, 3003, 3081, 3160,
    3240, 3321, 3403, 3486, 3570, 3655, 3741, 3828, 3916, 4005, 4095, 4186, 4278, 4371,
    4465, 4560, 4656, 4753, 4851, 4950, 5050]
    

    イマイチじゃのう…

    2016年01月16日

    ■_

    年に何回かある土曜出勤の日じゃったのよ

    ■_

    ■_

    "A critique of "How to C in 2016" | Hacker News" 
    https://news.ycombinator.com/item?id=10908217
    
    "Keith-S-Thompson/how-to-c-response" 
    https://github.com/Keith-S-Thompson/how-to-c-response
    
    "A brief introduction to C++'s model for type- and resource-safety [pdf] | Hacker News" 
    https://news.ycombinator.com/item?id=10907573
    

    A critique of "How to C in 2016" 「Ken Thompson」じゃないし、彼の親戚でもなんでもないよとあって笑った。

    ■_

    なぞのすくりぷと

    irb(main):018:0> (1..100).collect{|e| [*1..e].inject(:+).to_s.match(/\A(\d)\1+\z/).to_s}.delete_if{|e| e.empty?}
    => ["55", "66", "666"]
    
    irb(main):019:0> (1..10000).collect{|e| [*1..e].inject(:+).to_s.match(/\A(\d)\1+\z/).to_s}.delete_if{|e| e.empty?}
    => ["55", "66", "666"]
    irb(main):020:0>
    

    ふうむ。

    2016年01月15日

    ■_

    バスの降り口に仲良し三人組が立っててブロックされる。 電車と違うから一辺降りてこっちを通してくれとは言わないけど でっかいバッグを足元に置いてもいるし以下略

    ■_

    2016年01月14日

    ■_

    ■_

    2016年01月13日

    ■_

    あれかなあ。特に子どもを乗っけたママチャリのライダーさんは 「止まっちゃうと死んじゃう病」にでもかかってるんだろうか。 と思うような行動を毎日ちらほらと。

    ■_

    2016年01月12日

    ■_

    またもやPython本が

    ■_

    2016年01月11日

    ■_

    あることのついでに 東京都・渋谷で元祖ゴジラ絵師・生賴範義回顧展-開田裕治による追悼作品も | マイナビニュース に行ってきた。自分のお気に入りは 国会議事堂に迫る初代ゴジラの絵 (リンク先のページにある回顧展のポスターでいうと、「回顧展」の字が被ってる奴) だったのだけど(初ゴジ好きなのよw)、 残念ながら 一番好きなポスターへ投票すると、最終日の結果発表後、投票者の中から抽選で1位作品の複製原画(25万0円相当)がプレゼントされる企画が開催される。 の投票対象じゃなかったんだけど。

    んで、オーライタロー、開田裕治、麻宮駿亜、西川伸司 といった方々のインタビュー動画とか いくつかの作品の予告編やらを上映してたんですがその中に 「シン・ゴジラ」の特報(たぶん)もあったんですが なんというかその(ごにょごにょ)。

    あ、こっちの方が扱い大きいw>お気に入り でも色が違うな? ゴジラX生賴範義 回顧展 | PARCO GALLERY X | パルコアート.com

    ■_

    ■_

    Oberon を使っているという話。 Oxford Oberon-2 compiler - Spivey's Corner

    Oxford Oberon-2 compiler - Spivey's Corner
    

    At Oxford, we use Oberon as the second language we teach to our undergraduate students (the first one is Haskell). We chose it because of its cleanliness and simplicity, and because of the availability of books that emphasize clear reasoning about programs. Yes, it seems old-fashioned in some ways, but partly that's because it is closer to the hardware than is now the fashion. And it's hard to find another language with a defining document that comes in under 20 pages.

    first language が Haskell はへー、だけど second language に Oberon が 挙がってるのは意外というかなんというか。 ↑の引用部の後にも色々書かれてるんで余裕のある向きはそちらも。

    ■_

    melancholic afternoon 経由で 曰記 を読んで、なるほどねえと思うなど。 Z80 なんか test 命令もないからゼロ判定に and や or 使ったんだぞ(おっさん発言)w

    ちなみにモトローラのチップは(ry


    一つ前へ 2016年1月(上旬)
    一つ後へ 2016年1月(下旬)

    ホームへ


    リンクはご自由にどうぞ

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