ねもぷらす

ふぁいんでぃんぐねもの日記。プログラミングとか育児とか

はてなダイアリー10周年! ありがとう キャンペーン

はてなダイアリー10周年おめでとう!

Web系の業務に配属され、いろいろブログサービスを試し歩いてきましたが最終的にはてなダイアリーだけが残りました。
10周年だったとは。ブログサービスの先駆けだけにもっと経ってるイメージがあった。
はてなブログの方の機能強化も期待してます!

MacPorts で perl のバージョンを上げる

perl は古いままなのに ruby だけ最新バージョンなんて滑稽だわ。
ここはお墓よ、JavaJavaアプレットの。


ということで Perl のバージョンも上げておく。


http://www.perl.org/
現在の最新バージョンは 5.16.2 の様子。

perl -v

$ perl -v

This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level

Copyright 1987-2010, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

port installed | grep perl

$ port installed | grep perl
  p5.12-libwww-perl @6.40.0_1+ssl (active)
  perl5.12 @5.12.4_1 (active)
  postgresql92 @9.2.2_0+perl+python+python27+universal (active)
  subversion-perlbindings-5.12 @1.7.7_0 (active)

sudo port install perl5.16

バージョン違いなので upgrade ではなく install。

--->  Computing dependencies for perl5.16
--->  Fetching archive for perl5.16
--->  Attempting to fetch perl5.16-5.16.1_1.darwin_10.x86_64.tbz2 from http://packages.macports.org/perl5.16
--->  Attempting to fetch perl5.16-5.16.1_1.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/perl5.16
--->  Installing perl5.16 @5.16.1_1
--->  Activating perl5.16 @5.16.1_1
--->  Cleaning perl5.16
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

シンボリックリンクを張り替える必要アリ

$ ls -l /opt/local/bin/perl*
lrwxr-xr-x  1 root  admin     23  1 14 06:39 /opt/local/bin/perl -> /opt/local/bin/perl5.12
-rwxr-xr-x  1 root  admin   9896  6 26  2012 /opt/local/bin/perl5.12
lrwxr-xr-x  1 root  admin      8  6 26  2012 /opt/local/bin/perl5.12.4 -> perl5.12
-rwxr-xr-x  1 root  admin  10000  8 24 03:41 /opt/local/bin/perl5.16
lrwxr-xr-x  1 root  admin      8  8 24 03:42 /opt/local/bin/perl5.16.1 -> perl5.16
-rwxr-xr-x  2 root  admin  45815  6 26  2012 /opt/local/bin/perlbug-5.12
-rwxr-xr-x  2 root  admin  41712  8 24 03:41 /opt/local/bin/perlbug-5.16
-rwxr-xr-x  1 root  admin    244  6 26  2012 /opt/local/bin/perldoc-5.12
-rwxr-xr-x  1 root  admin    244  8 24 03:41 /opt/local/bin/perldoc-5.16
-rwxr-xr-x  1 root  admin  12484  6 26  2012 /opt/local/bin/perlivp-5.12
-rwxr-xr-x  1 root  admin  10802  8 24 03:41 /opt/local/bin/perlivp-5.16
-rwxr-xr-x  2 root  admin  45815  6 26  2012 /opt/local/bin/perlthanks-5.12
-rwxr-xr-x  2 root  admin  41712  8 24 03:41 /opt/local/bin/perlthanks-5.16

$ sudo rm /opt/local/bin/perl; sudo ln -s /opt/local/bin/perl5.16 /opt/local/bin/perl

$ perl -v

This is perl 5, version 16, subversion 1 (v5.16.1) built for darwin-thread-multi-2level

Copyright 1987-2012, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Acme::AjiFry - 食えアジフライお刺身食え食えお刺身ドボドボ岡星ドボドボ

http://search.cpan.org/~moznion/Acme-AjiFry-0.08/

なんぞこれ

use Acme::AjiFry;

my $ajifry = Acme::AjiFry->new();

print $ajifry->translate_to_ajifry('はて、なんだこれは。')."\n";

print $ajifry->translate_from_ajifry('桑ドボアジフライ実アジ食え食え陶人!お刺身アジフライ食えお刺身アジ食え食え陶人ああアジフライ食えお刺身アジアジフライ陶人食えお刺身アジ食え食え陶人ドボ食え食え!?') . "\n";
  • 実行結果
山岡食え食えアジむむ・・・、ドボ食え食え京極アジ食え食え陶人フライアジフライああむむ・・・山岡食え食え。
桑の実だ!そうだろうそうだな!?

長男@4歳、泳げるようになった!

今年から親子スイミングスクールに通い始めて2回目、浮き袋なしで浮けるようになりました。
水の中に落ちた石を拾う遊びを熱心にやるので遊ばせてたらだんだん浮けるようになってきて、終わる頃には自分で浮きながらバタ足しようとするところまできた。

MacPorts で ruby のバージョンを上げる

rails のアップデートしたら ruby もあげときたくなったので。

今年もクリスマスに合わせて Ruby 1.9.3-p362 が リリース

ruby リリースノート - http://www.ruby-lang.org/ja/news/2012/12/25/ruby-1-9-3-p362-is-released/

インストール済みバージョンを確認

ruby -v

$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin10]

port installed | grep ruby

$ port installed | grep ruby
  ruby19 @1.9.3-p327_0+doc (active)

sudo port upgrade ruby19

$ sudo port upgrade ruby19
--->  Computing dependencies for ruby19
--->  Fetching archive for ruby19
--->  Attempting to fetch ruby19-1.9.3-p362_1+doc.darwin_10.x86_64.tbz2 from http://packages.macports.org/ruby19
--->  Attempting to fetch ruby19-1.9.3-p362_1+doc.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/ruby19
--->  Installing ruby19 @1.9.3-p362_1+doc
--->  Cleaning ruby19
--->  Computing dependencies for ruby19
--->  Deactivating ruby19 @1.9.3-p327_0+doc
--->  Cleaning ruby19
--->  Activating ruby19 @1.9.3-p362_1+doc
--->  Cleaning ruby19
--->  Updating database of binaries: 100.0%
--->  Scanning binaries for linking errors: 100.0%
--->  No broken files found.

$ ruby -v
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin10]


おわり。

はてなブログ2013新春キャンペーン「2013年にやりたいこと 」

2013年にやりたいこと

元旦の目標をもう一度掲げて ¥5,000- を狙ってみる。
下に行くほど難易度高

  1. railsで業務アプリを作ってみる。
  2. 視力回復トレーニングを忘れない。
  3. 体重を+10㌔
  4. 応用情報技術者試験合格
  5. 長男の頭を叩かない。
  6. 月55時間を超える残業(サービスを含め)をしない。

家族の目標

  1. 毎朝ラジオ体操をする

Ruby on Rails に極めて深刻な脆弱性

リリースノート - http://weblog.rubyonrails.org/2013/1/8/Rails-3-2-11-3-1-10-3-0-19-and-2-3-15-have-been-released/
@IT - http://www.atmarkit.co.jp/ait/articles/1301/10/news081.html
Tech Racho - http://techracho.bpsinc.jp/baba/2013_01_10/6487


3.2.11、3.1.10、3.0.19、2.3.15 がリリースされた模様。

$ rails -v
Rails 3.2.9

やったー、該当してたよ。

ということでバージョンアップの備忘録。

sudo gem update --system

Gemの最新化。gemもバージョンが上がっていたらしいので update。

$ gem -v
1.8.23

$ sudo gem update --system
Password:
Updating rubygems-update
Fetching: rubygems-update-1.8.24.gem (100%)
Successfully installed rubygems-update-1.8.24
Installing RubyGems 1.8.24
RubyGems 1.8.24 installed

== 1.8.24 / 2012-04-27

* 1 bug fix:

  * Install the .pem files properly. Fixes #320
  * Remove OpenSSL dependency from the http code path


------------------------------------------------------------------------------

RubyGems installed the following executables:
	/opt/local/bin/gem1.9

RubyGems system software updated

$ gem -v
1.8.24

sudo gem update rake

rake の最新化、こっちは最新だった。

$ rake --version
rake, version 10.0.3

$ sudo gem update rake
Password:
Updating installed gems
Nothing to update

sudo gem update rails

rails の最新化。

$ sudo gem update rails
Updating installed gems
Updating rails
Fetching: activesupport-3.2.11.gem (100%)
Fetching: activemodel-3.2.11.gem (100%)
Fetching: actionpack-3.2.11.gem (100%)
Fetching: activerecord-3.2.11.gem (100%)
Fetching: activeresource-3.2.11.gem (100%)
Fetching: actionmailer-3.2.11.gem (100%)
Fetching: railties-3.2.11.gem (100%)
Fetching: rails-3.2.11.gem (100%)
Successfully installed activesupport-3.2.11
Successfully installed activemodel-3.2.11
Successfully installed actionpack-3.2.11
Successfully installed activerecord-3.2.11
Successfully installed activeresource-3.2.11
Successfully installed actionmailer-3.2.11
Successfully installed railties-3.2.11
Successfully installed rails-3.2.11
Gems updated: activesupport, activemodel, actionpack, activerecord, activeresource, actionmailer, railties, rails
Installing ri documentation for activesupport-3.2.11...
Installing ri documentation for activemodel-3.2.11...
Installing ri documentation for actionpack-3.2.11...
Installing ri documentation for activerecord-3.2.11...
Installing ri documentation for activeresource-3.2.11...
Installing ri documentation for actionmailer-3.2.11...
Installing ri documentation for railties-3.2.11...
Installing ri documentation for rails-3.2.11...
Installing RDoc documentation for activesupport-3.2.11...
Installing RDoc documentation for activemodel-3.2.11...
Installing RDoc documentation for actionpack-3.2.11...
Installing RDoc documentation for activerecord-3.2.11...
Installing RDoc documentation for activeresource-3.2.11...
Installing RDoc documentation for actionmailer-3.2.11...
Installing RDoc documentation for railties-3.2.11...
Installing RDoc documentation for rails-3.2.11...

$ rails -v
Rails 3.2.11

bundle update rails

bundleもアップデート。

$ cd rails_project_home

$ bundle update rails
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Enter your password to install the bundled RubyGems to your system: 
Using rake (10.0.3) 
Using i18n (0.6.1) 
Using multi_json (1.5.0) 
Using activesupport (3.2.11) 
Using builder (3.0.4) 
Using activemodel (3.2.11) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Installing rack (1.4.3) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.2.2) 
Using actionpack (3.2.11) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Using actionmailer (3.2.11) 
Using arel (3.0.2) 
Using tzinfo (0.3.35) 
Using activerecord (3.2.11) 
Using activeresource (3.2.11) 
Using bundler (1.2.3) 
Installing json (1.7.6) with native extensions 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Using thor (0.16.0) 
Using railties (3.2.11) 
Using rails (3.2.11) 
Using sqlite3 (1.3.6) 
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.

$ bundle show rails
/opt/local/lib/ruby1.9/gems/1.9.1/gems/rails-3.2.11