Author Archive for Sugano Yoshihisa

31
Mar
12

Ruby 1.9.3-p125 and Mac OS X Lion

I tried to build Ruby 1.9.3-p125 on Mac OS X Lion(10.7.3). But it can’t build psych library in ruby because missing yaml.h.

I just type below.

$ brew install libyaml

It solved :)

09
Feb
12

Ruby CSV with CP932

Ruby is a good language. But little bit unuseful for japanese user include me.

I’ve got often invalid seqence error.

CSV.open(filename, 'r:cp932')

This code is bad.

I found a code in csv.rb below:

    @encoding ||= Encoding.default_internal || Encoding.default_external

This line from /usr/local/ruby-1.9.1/lib/ruby/1.9.1/csv.rb.
I tried use only “Encoding.default_external = ‘cp932′”.

Encoding.default_external = 'cp932'
CSV.open(filename, 'r')

It works.

13
Jan
12

Getting MacBook Pro

Now I’m in Japan. I had bought and setuped MacBook Pro 15″ in this new year holiday.

MacBook Pro 15"

MacBook Pro 15"

 

I am NOT Mac fan and Jobs believer. I just love UNIX envronments. Actually MacBook is good UNIX laptop.

But I got little trouble after I migrate from old MacBook white by Migration Assistant.

I just wrote and ran a ruby script as usual. I got error “nokogiri not found”. OMG!!

The Ruby 1.9.2 was compiled by me. Migration Assistant migrate compled ruby itself but don’t migrate libraries. sigh…

After setup, I bought 8GB RAM. I use many application, especially VMware use RAM much more.
4GB x2 RAMSet up RAM to MacBook Pro
Cool. I got 4 core CPU and 8GB RAM laptop. My first mobile UNIX has 486 compatible CPU and 2MB RAM. I couldn’t use Emacs 19 because it is too heavey. Thanks for Moore’s Law.
13
Jan
12

Hello world!

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can always preview any post or edit it before you share it to the world.



About

I'm a Japanese programmer.
I have been trying to write technical notes in English on this blog.

Recent Tweet(en)

Recent Tweet(ja)


Follow

Get every new post delivered to your Inbox.

Join 221 other followers