"unix" entries

Where apps end and the system begins

Exploring the system calls and control flow that underpin high-level languages.

Editor’s note: Sometimes we can forget how important it is to truly understand how a system works, and how the nuts and bolts affect our everyday activities. Marty Kalin asks us to dive a little deeper and strengthen our computational thinking abilities.

It’s clear that applications need system resources to execute: a processor, memory, and usually I/O devices such as the keyboard and screen. It’s less clear how applications gain access to these shared resources, which are under operating system (OS) control. The OS, like any good manager, is efficient and unobtrusive as it handles resource requests from applications. Let’s take a look at how applications interact with the OS, in both routine and dramatic fashion.

Consider what happens when a print statement executes. Here’s a Ruby example:

The Ruby puts statement wraps a call to a high-level I/O function in the standard C library (in this case, printf), which acts as the interface between resource-requesting applications and resource-granting OS routines. In this example, the screen is the requested resource. The standard library interacts seamlessly with the OS, which also is written in C with some assembly language. The library function printf is high-level because, as the f in the name indicates, the function can format the bytes to be written as integers, floating-point values, and character strings such as Hello, world!. In systems-speak, the Ruby application and the C library function execute in user space, which does not bestow the rights and privileges needed to control system resources such as the screen.

Read more…

Comment
Four short links: 17 December 2013

Four short links: 17 December 2013

Graph Compression, Learning Minecraft Coding, Performance Enhancing, and Explained Shell

  1. WebGraph a framework for graph compression aimed at studying web graphs. It provides simple ways to manage very large graphs, exploiting modern compression techniques. (via Ben Lorica)
  2. Learn to Program with Minecraft PluginsYou’ll need to add features to the game itself: learn how to build plugins for your own Minecraft server using the Java programming language. You don’t need to know anything about programming to get started—-this book will teach you everything you need to know! Shameless Christmas stocking bait! (via Greg Borenstein)
  3. In Search of Perfection, Young Adults Turn to Adderall at Work (Al Jazeera) — “Adderall is just the tip of the iceberg,” Essig said. “There are lots more drugs coming down the pike. The way we set up our cultural model for dealing with psychologically performance-enhancing drugs is a real serious question.”
  4. Explain Shell — uses parsed manpages to explain a shell commandline. (via Tracy K Teal)
Comment: 1

Transformative Programming

Flow-based, functional, and more

“Small pieces loosely joined,” David Weinberger’s appealing theory of the Web, has much to say to programmers as well. It always inspires me to reduce the size of individual code components. The hard part, though, is rarely the “small” – it’s the “loose”.

After years of watching and wondering, I’m starting to see a critical mass of developers working within approaches that value loose connections. The similarities may not be obvious (or even necessarily welcome) to practitioners, but they share an approach of applying encapsulation to transformations, rather than data. Of course, as all of these are older technologies, the opportunity has been there for a long time.

The Return of Flow-Based Programming

No Flo and its successful Kickstarter to create a unique visual environment for JavaScript programming reawakened broader interest in flow-based programming. FBP goes back to the 1970s, and breaks development into two categories:

“There’s two roles: There’s the person building componentry, who has to have experience in a particular program area, and there’s the person who puts them together,” explains Morrison. “And it’s two different skills.”

That separation of skills – programmers creating separate black box transformations and less-programmery people defining how to fit the transformations together – created a social problem for the approach. (I still hear similar complaints about the designer/programmer roles for web development.)

The map-like pictures that are drawing people to NoFlo, like this one for NoFlo Jekyll, show how the transformations connect, how the inputs and outputs are linked. I like the pictures, I’m not terribly worried that they will descend into mad spaghetti, and this division of labor makes too much sense to me. At the same time, though, it reminds me of a few other things.

graphic representation of flow through Jekyll

NoFlo diagram for noflo-jekyll

Read more…

Comments: 22
The stories behind a few O'Reilly "classics"

The stories behind a few O'Reilly "classics"

A look back at "Unix Power Tools," "DNS and Bind," and other O'Reilly titles.

Tim O'Reilly: "It's amazing to me how books I first published more than 20 years ago are still creating value for readers."

Comments: 3

On Dennis Ritchie: A conversation with Brian Kernighan

Brian Kernighan discusses Dennis Ritchie.

I talked on Friday with Brian Kernighan about Dennis Ritchie, who sadly passed away two weeks ago at the age of 70. To a large extent, Ritchie completed what he started.

Comments: 7

Dennis Ritchie's legacy of elegantly useful tools

We need more people who share Dennis Ritchie's spirit.

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity," Dennis Ritchie once said. It's true, and we need more geniuses who share his spirit.

Comments: 6
Dennis Ritchie Day

Dennis Ritchie Day

On 10/30/11 let's remember the contributions of computing pioneer Dennis Ritchie.

I don't have the convening power of a governor, but for those of us around the world who care, I hereby declare this Sunday, October 30 to be Dennis Ritchie Day.

Comments: 25
Developer Week in Review: Two giants fall

Developer Week in Review: Two giants fall

Steve Jobs and the App Store, goodbye to Dennis Ritchie, and an internal Google critique goes public.

Better late than never, a few thoughts on Steve Jobs. Also, a Unix pioneer leaves us, and Google's dirty laundry is accidentally hung out to dry.

Comments: 2
Four short links: 21 June 2011

Four short links: 21 June 2011

Terminal Tool, Gamifying Education, Exponential Shortcut, and Kindle Spam

  1. tmux — GNU Screen-alike, with vertical splits and other goodies. (via Hacker News)
  2. Gamifying Education (Escapist) — a more thoughtful and reasoned approach than crude badgification, but I’d still feel happier meddling with kids’ minds if there was research to show efficacy and distribution of results. (via Ed Yong)
  3. Rule of 72 (Terry Jones) — common piece of financial mental math, but useful outside finance when you’re calculating any kind of exponential growth (e.g., bad algorithms). (via Tim O’Reilly)
  4. Spam Hits the Kindle Bookstore (Reuters) — create a system of incentives and it will be gamed, whether it’s tax law, search engines, or ebook stores. Aspiring spammers can even buy a DVD box set called Autopilot Kindle Cash that claims to teach people how to publish 10 to 20 new Kindle books a day without writing a word. (via Clive Thompson)
Comment: 1
Four short links: 10 May 2011

Four short links: 10 May 2011

Car Monitoring with iPhone, Multitasking, Privacy, and Cool Unix Tools

  1. ODB to iPhone Converter — hardware to connect to your car’s onboard computer and display it on an iPhone app. (via Imran Ali)
  2. Multitasking Brains (Wired) — interesting pair of studies: old brains have trouble recovering from distractions; hardcore multitaskers have trouble focusing. (via Stormy Peters)
  3. Social Privacy — Danah Boyd draft paper on teens’ attitudes to online privacy. Interesting take on privacy as about power: This incident does not reveal that teens don’t understand privacy, but rather that they lack the agency to assert social norms and expect that others will respect them. (via Maha Shaikh)
  4. Cool but Obscure Unix Tools — there were some new tricks for this old dog (iftop, socat). (via Andy Baio)
Comments Off