Blogged by Ujihisa. Standard methods of programming and thoughts including Clojure, Vim, LLVM, Haskell, Ruby and Mathematics written by a Japanese programmer. github/ujihisa

Friday, October 30, 2009

38th Kansai Ruby Workshop (in Japanese)

I attended 38th Kansai Ruby Workshop today and make a presentation there. The workshop was ustreamed.

My Presentation "Hacking parse.y"

I have made the same title presentation in Vancouver.rb so far. I also have two other opportunities to make the same title presentation in Kansai Open Forum and RubyConf2009. All presentations are different because of the difference audience. Kansai Ruby Workshop is the most casual place of them, so my presentation today was be the most casual one.

The agenda was the following:

  • Brief self introduction
  • What is Ruby Core
  • What is Ruby's parser
  • Understanding colons
  • Adding literal
  • (cont.)

Note that this presentation isn't for super Ruby programmers. I think all ruby commitors already know all of what I'll talk tomorrow.

Slides, Handouts and Record

Slides are available here(slideshare).

Handouts are availabble here(pdf).

Record is available here(ustream). (in Japanese)

Wednesday, October 14, 2009

GRE Exam

Today I took the GRE exam.

The result was too crazy to write here. I think something must be going wrong.

Thursday, October 8, 2009

RubyGems on Ruby 1.9

This blog post is a note of a report about the current RubyGems 1.3.5 on Ruby 1.9 for myself (including both 1.9.1 and 1.9.2) without any good reproductions or the solutions.

When I did rake192 spec on a directory which contains a Rakefile that uses jeweler, I met an enormous errors (The suffix means the Ruby version on my machine.) I've heard that anyhow gem192 uninstall update-rubygems can solve the problem, so I did it. But after that, the rake192 started to cause segfault!

The segfault is caused by a 1.9.2 marshal's bug which is already reported but not fixed yet. I gave up using 1.9.2, and then I decided to use 1.9.1 instead.

On 1.9.1 the results were exactly same except that it didn't cause a SEGV.

Downgrading RubyGems (failed!)

According to baroquebobcat,

$ gem uninstall rubygems-update
$ gem install -v x.x.x rubygems-update
$ sudo update_rubygems

does downgrade rubygems itself. So I did them with some trivial changes, but it failed again. The following is the result:

$ update_rubygems191
<internal:gem_prelude>:344:in `method_missing': undefined method `bin_path' for Gem:Module (NoMethodError)
        from /Users/ujihisa/rubies/bin/update_rubygems191:19:in `<main>'


Friday, October 2, 2009

What's Your View?

When I was a student, my supervisor often asked me the question. It confused me, which meant that I didn't understand what I was talking.

Although the relationship between understanding the contents and grasping the view is bi-directionally, it is worth trying to grasp the view of a given research first, then understand the remains. This strategy is easier, particularly for me. Never forget to look for the author's viewpoint. Ask myself: "What's the view of the research?" Now I must be able to find the goal of the research easily.

Programming Language as Human Interface

5 Reasons Why People Use This Language

There are a lot of programming languages both in the real world and in the academic experimental world. Everybody knows the common function which Professor Turing defined among the languages. Although almost all programming languages which are used as a production can be ultimately written in a single language, we tend to use specific languages for some reasons.

  1. Our project has used this language.
  2. Our project needs a specific library written in this language.
  3. We're excel at this language.
  4. A specific functionality of this language is absolutely effective on our project.
  5. The syntax of this language is good.

This order means the order of impact. Yes, unfortunately the syntax matters the least.

Note that only (3) and (5) are independent on a specific project, and (3) can be said a consequence of (5). Therefore it is deducted that (5) is worth studying.

Human Computer Interaction

According to wikipedia, human computer interaction, also known as the study of human interface, is defined as the study of interaction between people and computers. In other words, human computer interaction is the combination of computer science, behavioral sciences, design and several other fields of study. The goal of HCI (Human Computer Interaction) is to improve the interactions between users and computers by making computers more usable and receptive to the user's needs.

I think that the biggest challenge of this field is how to evaluate the goodness of a given hypothesis. We cannot deductively prove the new theory certainly makes a system more usable easily. We cannot numerically measure how the new theory certainly improved the usability easily.

Programming Language as Human Computer Interaction

Remember the conclusion of the reason why we use a specific programming language, which is previously described: "because the syntax of this language is good." Here we have to consider how to evaluate the goodness of the language. It is difficult for language designers and users to objectively explain how good their language syntax is. This circumstance is highly similar to the issue of HCI.

For example, some people agree the following example: Ruby is better than Java because of the simple "Hello, world!" sample obviously.

# Ruby
puts 'Hello, world!'

/* Java */
class HelloWorld {
  public static void main(String argv) {
    System.out.println("Hello, world!");

It is easy for me to disagree the opinion. I don't think I have to declare the reasons here because you can presume easily.

So, how can we evaluate the goodness of language syntax without any controversial counterargument? What points of view are desirable for the purpose? This issue is worth studying.


Programming language has aspects of the study of human computer interaction. I showed only the importance of syntax as one of aspects, but there are some other features include being able to complete by editors and type system for human aid. It turns out that it is good to improve it with the similar ways of previously used in HCI studies.

Other Miscellaneous Comments

According to ACM, HCI is defined as "a discipline concerned with the design, evaluation and implementation of interactive computing systems for human use and with the study of major phenomena surrounding them." In short, HCI is for implementation of interactive computing system. Whereas my view on this entry is for implementation of implementation of interactive computing system. It can be said as higher order HCI.

Thursday, October 1, 2009

Google Earth In Canada

Google Maps in Canada is sometimes insufficient. Information on the map in Canada isn't as rich as in Japan or in the US. The satellite is outdated.

Today I installed Google Earth on my MacBook Air and viewed my neighborhood. I surprised that Google Earth is absolutely greater than Google Maps regarding to the contents.


This is my nearest public library.

In Google Earth,


It's amazingly real.