The heyday of unix

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

Usually when something is at its peak its victory seems so natural that no one really appreciates it in the moment. It is worth noting that Microsoft lost momentum with developers at some point in the period 2000 – 2005, and this has lead to the heyday of Unix, mostly Linux. All of the competitors are dead. I am not sure what comes after Unix, but it is noteworthy how much it dominates the landscape for applications that do not need true-real-time performance (it is not used in the devices that deploy airbags in cars during vehicle collisions, but for general computer devices, Unix is everywhere).

As a sign of the times, please note the tone of voice in “I like Unicorn because it is Unix“:

A note about Unix programming in Ruby in general

We should be doing more of this. A lot more of this. I’m talking about fork(2), execve(2), pipe(2), socketpair(2), select(2), kill(2), sigaction(2), and so on and so forth. These are our friends. They want so badly just to help us.

NOTE The links above are to Linux section 2 manpages; in many cases, BSD manpages are vastly superior.

Ruby, Python, and Perl all have fairly complete interfaces to common Unix system calls as part of their standard libraries. In most cases, the method names and signatures match the POSIX definitions exactly. Yet, of the groups, only the Perl people seem to regularly (and happily) apply common Unix idioms to a wide range of problem areas.

Unix is not one of the “perlisms” Ruby should be trying to distance itself from. Perl got that part right. And with immediately recognizable Unix system calls spewed all over the core library, Ruby feels like it was built for Unix hacking. It’s surprising to see how infrequently this stuff is used as intended or even talked about.

This is wrong in most ways: programmers should use higher level abstractions than “fork”, and MRI Ruby should not be used for any application that needs concurrency (use jRuby instead). But this posts reminds us of 2 things:

1.) for a long time, scripting languages, including Ruby, were trying to get away from Unix.

2.) there are many programmers who now want to go back and rediscover Unix: “It’s surprising to see how infrequently this stuff is used as intended or even talked about”.

Post external references

  1. 1
    http://tomayko.com/writings/unicorn-is-unix
Source