The title of this blog has the meaning of forcing me to think English as a programming language so that I can learn it as well as programming languages.

I have started English lesson since last Saturday. I had found myself that my listening skill of English is so poor. It's necessary to do strong effort.

I have also started to listen ESL podcast. That is very easy to listen, because the speakers speak very slowly and clearly.

posted by Png takiuchi on Tue 18 Mar 2008 at 11:51 with 6 comments

The Rails Study Meeting#28(Japanese)

Genki Takiuchi

Recent Situation:

  • Founded a small company.
    • And we have already survived 6 months, Yay!
  • Learning English hard.
  • I got an enlightenment of coLinux.
  • Binary stuffs: Computer Graphics, FWS/CWS, MUDA.
  • Smalltalk and NEPL!
  • And also being with Rails 2.0.2

Favorite Things:

  • C/C++ Template, JavaScript, Ruby.
  • Thinking algorithm, Rendering (CG) and 3D.
  • Vim7, Zsh, GNU screen, rails.vim, ZenTest.

Thank you!

posted by Png takiuchi on Sun 16 Mar 2008 at 11:48

I have tried FriendFeed yesterday. That is said as the next monster coming from SXSW.

friendfeed_com_settings_recommended.png

I have got the impression that it is almost meta-twitter. It is like to Soup.io. So to say it is better Soup.io that is enabling us to import the friendship network from other services.

At any rate, I recommend you to create an account if you care about your identity of nickname even if you have no plan to use this service.

Incidentally, my friendfeed ID is genki. My page is here. Feel free to subscribe it :-)

posted by Png takiuchi on Sat 15 Mar 2008 at 13:27

I think that the complex Rails applications such as maintained over years tend to have messy config/routes. Today I'd like to introduce a simple way to keep them clean.

The way is really simple. Use with_options for each controller with prefix options.

   1  map.with_options(:controller => 'posts',
   2      :name_prefix => 'posts_',
   3      :path_prefix => 'posts') do |posts|
   4    # posts_rss_path => 'posts/rss'
   5    posts.rss 'rss', :action => 'rss'
   6  end

Still complex? Okey, I have written the plugin for you.

With this plugin, you can draw the routes belonging to some controller like this.

   1  map.with_controller('posts') do |posts|
   2    posts.rss # posts_rss_path => 'posts/rss'
   3  end

As you can see, there's one more thing. I have also installed MapperWithController class into RouteSet at this plugin for making named routes be completely DRY.

   1  class MapperWithController
   2    def initialize(mapper)
   3      @mapper = mapper
   4    end
   5  
   6    def method_missing(name, *args, &block)
   7      path, *args = args
   8      path ||= name.to_s
   9      args.unshift path
  10      @mapper.send name, *args, &block
  11    end
  12  end

map.namespace :posts does nearly same thing, but it couldn't be used for this purpose because of it is optimized to making namespaces for a routing.

posted by Png takiuchi on Fri 14 Mar 2008 at 19:00

Matz might have a plan to introduce the method that calculates a cartesian product of two ranges into future Ruby. It is very interesting.

CS 11: Python track: python idioms

He has been thinking a good name for the method. I wish that there could be more set operators in future Ruby.

posted by Png takiuchi on Fri 7 Mar 2008 at 22:24

This is just a signpost.

Does anyone know other tools?

See Also

posted by Png takiuchi on Thu 6 Mar 2008 at 22:15

In this weblog system, "nickname" and "email" required to IdP. This is from a behaviour of the original RestfulOpenIDAuthentication plugin. (I think that it is expecting the myopenid.com as default IdP and it has them as mandatory parameters.)

If you are using other IdP, it might have neither "nicknames" nor "email". In that case, you need to fill the lacking parameters and to retry.

Obviously, that was a big barrier for users. So I have changed this system so that can make IdPs free from required parameters and make a chance to add the lacking informations immediately.

I consider that every IdCs require such the mechanism due to the architecture of OpenID.

posted by Png takiuchi on Tue 4 Mar 2008 at 08:41

Announcement of event in Tokyo.

Smalltalk Study Meeting

Let's learn about the basics of Smalltalk and talk.

  • When: 4th March (TODAY) 19:00-22:00 (7 p.m. - 10 p.m.)
  • Where: Drecom (Map
  • Requirement:
    • Notebook PC with Smalltalk environment.
    • or passion.

We're supposing that the number of attendee is as much as 10 according to a capacity of the room. If you would like to join us, please nudge @takiuchi or @technohippy at Twitter, or leave a comment to this entry.

Thank you.

posted by Png takiuchi on Tue 4 Mar 2008 at 07:17

Matz announced a release of the snapshot of Ruby-1.9.0-1 at the ruby-dev mailing list yesterday.

1.9.x 1.9.0-x versions are for development and so this release is not stable. It has fixed some bugs and not fixed others.

At any rate, files are here:

Original Source

Updates

  • 6 March, 2008. Corrected the mistaken version number 1.9.x mentioned above to 1.9.0-x. Thanks Ryan!
  • 24 March, 2008. Added the original source which hughperson told me at reddit.com. Thanks!
posted by Png takiuchi on Sun 2 Mar 2008 at 15:33 with 3 comments

I am using Skype Chat everywhere because it is useful. But it has a limit due to its P2P mechanism that is needing at least 2 online users in order to keep messages transmitted completely.

When you are the only online user in the chat room, the messages sent by you are stored locally until someone comes in. In other words, suppose the chat room has user A and B;

  1. A said hello to B.
  2. A had logged out and became offline.
  3. "hello" had been stored into A's PC.
  4. B has become online.
  5. Nothing happen.

To solve this problem, I have been running the SkypeBot upon my Mac mini server and made it join to the chat rooms with me. By this, the chat room can always have over 2 online users so that all messages can be sent to each other.

Thus, I provide the SkypeBot identified by 'skype.s21g' which is always online except when I update Mac mini. Everyone can use this by dropping it into your open Skype chat which has no problem about privacy.

posted by Png takiuchi on Sat 1 Mar 2008 at 12:11
Contents
The meaning of the title of this blog
Position Paper for the Rails Study Meeting#28
Can FriendFeed act as meta-twitter?
How to draw cleanly controller specific routes.
Ruby and Set Operators
How to Use Multiple Databases on Rails
How should you handle if an OpenID authentication lacks required informations?
ANN: Urgent Smalltalk Study Meeting
Ruby 1.9.0-1 Was Quarried Yesterday
Provides 24/7 Active SkypeBot
Comments
Spencer: You don't have to re-compile it, this version w... '14-4
staiano: Any chance we can get a recompile for 10.9? '14-1
falsefalse: @tiancongxin try using this one https://github.... '12-2
tiancongxin: TerminalCopyOnSelect not work on OS X 'Lion' , ... '11-7
staiano: Roderick you rock for recompiling it. Thanks. '11-3
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ