… Unix systems return the time in seconds as a signed integer relative to the Unix epoch. Negative numbers are interpreted as dates before the Unix epoch.
Using seconds (and fractions of a second) to represent time allows application authors to rely on arithmetic rather than specialized functions for calculating time intervals.
File systems expose timestamps for all files in Unix time with varying degrees of accuracy and granularity. The Ruby File and File::Stat classes can support …
The Unix pipe is the first example of an anonymous file we will cover.
Unlike regular files and directories, anonymous files do not exist on the filesystem and do not persist across reboots. Only the process that creates the anonymous file (and its descendants) can access anonymous files. Anonymous files only persist until the last process using it closes it.
At its heart, the Unix pipe is just like a pipe in plumbing, a one-way buffer for transporting payload from one end to another.
…but under-appreciated work. You will have experience with Mac, Linux or UNIX, but it might not be your daily environment. Similarly you will have an opinion about vi vs. Emacs or Python vs. Ruby, but you'll understand that they're just opinions.
You'll care about your tools and will take real, genuine pride in the quality of the code you create. You won't consider automated testing and continuous integration as optional components of a project, and will appreciate …
…but under-appreciated work. You will have experience with Mac, Linux or UNIX, but it might not be your daily environment. Similarly you will have an opinion about vi vs. Emacs or Python vs. Ruby, but you'll understand that they're just opinions.
You'll care about your tools and will take real, genuine pride in the quality of the code you create. You won't consider automated testing and continuous integration as optional components of a project, and will appreciate …
Phusion Passenger is an Apache and Nginx module for deploying Ruby web applications. It has a strong focus on ease of use, stability and performance. Phusion Passenger is built on top of tried-and-true, battle-hardened Unix technologies, yet at the same time introduces innovations not found in most traditional Unix servers. Since version 3.0 it can also run standalone without an external web server, making it not only easier for first-time users but also ideal on development environments.
Learn the Unix Command Line
In case of a failure, the command line will be your best friend. Knowing the right tools to quickly sift through a set of log files, being able to find and set certain kernel parameters to adjust TCP settings, knowing how get the most important system statistics with just a few commands, and knowing where to look for a specific service's configuration. All these things are incredibly valuable in case of a failure.
Knowing your way around a Unix or Linux…
Unix daemons (such as the famously-fast Nginx ) often use evented programming to maximize concurrency and robustness. The seminal C10K article explores the use of system calls such as kqueue and epoll for evented programming. In scripting languages, evented frameworks such as Twisted for Python and EventMachine for Ruby enjoy popularity.
EventMachine is a fascinating case study to compare against Node.js. Because EventMachine's reactor …
…add those command line arguments every time. Fortunately there is an easy solution - like all good Unix utilities `gem` will read `/etc/gemrc` or `~/.gemrc` for default configuration options. The RC files are in YAML format; to globally disable rdoc and ri generation during gem installation for just yourself: #~/.gemrc gem: --no-rdoc --no-ri
To understand exactly what you are turning off read: Ruby ri Tool . Honestly since I've just now bothered to read how to use `ri` …
Back to UNIX
After many, many bad experiences with Vlad, I gave up. However, I'm not just a lazy programmer, I'm also a lazy sysadmin, so I thought it was time to break out my vestigial UNIX skills and script the whole thing myself.
I'm starting to get tired of seeing Rake everywhere. What was wrong with Makefiles? And why are we using version control systems to check out the latest version of a project? Why can't I run rsync on the code that I'm looking …
…Smalltalk's consistent object system, Perl's practical syntax, UNIX's sensibilities. Not that it didn't bring entirely new innovations ( block syntax! Smalltalk had block syntax first!) of its own, but it's amazing to consider how much of Ruby's design rests on the elegant packaging of old concepts into a new coherent whole.
There's something less obvious but perhaps more essential that Ruby borrowed: the very concept of blatant, unashamed borrowing. …