トップ «前の日記(2009-05-06) 最新 次の日記(2009-05-08)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|

2009-05-07 :-)

_ 朝ッ

0800 起床

_ 仕事

休み

_ [俺の妹がこんなに可愛いわけがない]俺の妹がこんなに可愛いわけがない(3)

彼氏?

あたり前にいる

てか

いないわけないじゃん

みたいな

ガッシボッカ

アタシは死んだ

スイーツ(笑)

という話。

電撃文庫が電撃文庫をネタにする、というところは注目できる( 週刊少年ジャンプをネタにしている「バクマン。」と同じようなもん )。相変わらず Pixiv や Twitter や Skype といったキーワードが出てきて最近の中学生は発達していますね。あと沙織を follow したいんですが。

次が最終巻か?

4048677586

_ [よくわかる最新データ圧縮技術の基本と仕組み]よくわかる最新データ圧縮技術の基本と仕組み

LZ 法や Huffman 法の解説から MPEG のデータ構造なども書いてある。

4798005606

_ [デザインパターン][Singleton]Head First デザインパターンを写経する - 5章 Singleton パターン

むしろ lib/ruby/1.8/singleton.rb といったものが用意されてるので素直に require 'singleton' して使ったほうがいい。singleton.rb なら同期にも対応している。

#!/usr/bin/ruby -Ks

class Singleton
  @@singleton = nil

  private_class_method :new
  def Singleton.getInstance
    @@singleton = new if @@singleton == nil
    return @@singleton
  end
end

def main
  obj1 = Singleton.getInstance
  obj2 = Singleton.getInstance
  puts "同じ" if obj1 == obj2
end

main
% ./singleton1.rb
同じ

_ [デザインパターン][Command]Head First デザインパターンを写経する - 6章 Command パターン

#!/usr/bin/ruby -Ks

class Light
  def on
    puts "親方さま!照明を点灯させます!"
  end

  def off
    puts "親方さま!照明を消灯させます!アッー"
  end
end

module Command
  def execute
  end
end

class LightOnCommand
  include Command

  def initialize( light )
    @light = light
  end

  def execute
    @light.on
  end
end

class SimpleRemoteControl
  def initialize
  end

  def setCommand( command )
    @slot = command
  end

  def buttonWasPressed
    @slot.execute
  end
end

def main
  remote = SimpleRemoteControl.new
  light = Light.new
  lightOn = LightOnCommand.new( light )
  remote.setCommand( lightOn )
  remote.buttonWasPressed
end

main
% ./command1.rb
親方さま!照明を点灯させます!

安直に実装してこんな感じにもなる

#!/usr/bin/ruby -Ks

module Command
  def execute
  end
end

class Command1
  include Command

  def execute
    puts "ねんがんの アイスソードをてにいれたぞ!"
  end
end

class Command2
  include Command

  def execute
    puts "殺してでも うばいとる"
  end
end

class Command3
  include Command

  def execute
    puts "な なにをする きさまらー!"
  end
end

class IceSword
  def initialize
    @slot = []
  end

  def add( command )
    @slot << command
  end

  def run
    @slot.each { |cmd| cmd.execute }
  end
end

def main
  ice = IceSword.new
  cmd1 = Command1.new
  cmd2 = Command2.new
  cmd3 = Command3.new
  ice.add( cmd1 )
  ice.add( cmd2 )
  ice.add( cmd3 )
  ice.run
end

main
% ./command2.rb
ねんがんの アイスソードをてにいれたぞ!
殺してでも うばいとる
な なにをする きさまらー!

_ [やってきたよ、ドルイドさん!]やってきたよ、ドルイドさん! (2)

テンポいいなあ。闇鍋のマップ兵器 MAX コーヒーに笑ってしまった。百合の成分が高まっている。

4840126666

_ [リッジレーサー7]リッジレーサー7

JUJAK 練習。JUJAK に ROLLING THUNDER+3 を履かせてみたんだがさっぱり操作できん。こんなのよく操作できるなあ。BOSCONIAN+3 ならだいぶマシになるんだが。

  • 走行距離 18658.962 km
  • RSGP 進行度 100.0 %
  • 名声 18443 FP

_ PlayStation@Network からサインアウトされることが頻発する

ううむ。

_ [おひる][ナポリタン]おひる

ナポリタン

_ [][ほたてのピラフ]飯

ほたてのピラフ