Milinda Pathirage’s Blog

Let the code talk for yourself!

Entries Tagged as 'ruby'

inotify - Linux File System Activity Monitoring

November 10th, 2008 · No Comments · c programming, linux, linux tips, php, programming, python, ruby

inotify is a Linux kernel subsystem which monitors Linux file system operations, such as read, write, create and delete. It was included in the mainline kernel from release 2.6.13 (June 18, 2005). It is more efficient than busy polling from a corn job and it’s an extensions to Linux file system to capture the file [...]

[Read more →]

Tags:

Ruby Aliasing

August 13th, 2008 · No Comments · ruby

Aliasing is a powerful Ruby feature that allows more than one method to be referred to by multiple names. This can be used to give a programmer more expressive options or to create copies of a method, allowing you to change the behavior of a class.

For an example if you wanted to override to_s [...]

[Read more →]

Tags:

Ruby method lookup(method name resolution) algorithm

August 10th, 2008 · 1 Comment · ruby

I found this nice discussion(http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/33615) about Ruby’s name resolution algorithm while browsing through the internet. You can browse through the discussion by clicking ‘N’ button of the tool bar on top of that page.

From the ‘Ruby Programming Language’ book, I found following algorithm for method lookup.For example take method invocation expression o.m, Ruby goes through [...]

[Read more →]

Tags:

Ruby method lookup flow

August 9th, 2008 · 1 Comment · ruby

In a previous post I describe the advantages of Ruby method_missing feature. Here is good diagram which shows the flow of Ruby method lookup.

Here is the link for original pdf.
Sphere: Related Content

[Read more →]

Tags:

The importance of Ruby’s method missing concept

July 21st, 2008 · 1 Comment · python, ruby

To be frankly, I don’t have any previous experience with Ruby programming. I first looked at Ruby code(WSF/Ruby source), when I started to write WSF/Python and WSF/Python is still in its initial stage. When I started to implement WSDL mode for WSF/Python, to understand how it has done in WSF/Ruby, I looked at WSF/Ruby source. [...]

[Read more →]

Tags: