Prototyping 22 Jan 2013

From XPUB & Lens-Based wiki

State of the install

  • Nan: ubuntu install on partition on mac book; issues: wireless?
  • Yoana: ubuntu to gnome: everything appears to be working ... Trackpad however is "really different" ;)
  • Nicole: Virtual Box + Crunchbang: Kernel panic on open ?!
  • Mich: VB Crunchbag, working
  • Joz: crunchbang, game missing library: self compilation problems Warsow
  • Lasse: XUBUNTU! problems with debian and crunchbang; MacBook with partition
  • Marlon: Ubuntu on partition on thinkpad
  • Menno: Yet to install (acer laptop partition?)
  • Matt[h]ias: VirtualBox + Crunchbang
  • Niek, Matthijs
  • Roel (Crunchbang!?)

Compilation, Free Software, and the Pipeline




Compilation turns a programmer's source code into something a particular computer can perform (an executable).

#include <stdio.h>

int main() {
    printf("Hello, world!\n");

    return 0;

The command to use the GNU C compiler to compile this "Hello world" program would look like:

gcc helloworld.c

More likely you'd like helpful output (-Wall), and a nicer name for the program that gets output (-o).

gcc -o helloworld helloworld.c

The resulting file (in the end called helloworld) can be run from the command line by typing:


which outputs:

Hello World!

In fact compilation involves two steps, the latter called "linking" where the source code, translated into machine language, is wedded to the underlying code of any libraries it makes use of (in this case simply the stdio, or input output library standard to all C implementations).


Whereas proprietary software packages are sealed boxes, and pride themselves on their seamlessnes (think Adobe Photoshop and the creative "suites"), free software is inherantly all about the fact that it's composed of other pieces. These pieces arrange themselves in complex hierarchies. This orientation toward reuse between projects is reflected in how software is install in many different locations, including places such as "/usr/share" -- the share referring to the idea that this is a place where different software's could put resources that are common.

TODO: IMAGE OF a packages file layout

All software depends on libraries. Part of the job of a package manager is to make sure that the software

This is not and operating system

The C language was designed by Dennis Ritchie the context of the UNIX operating system in the 1970s. Due to conditions of US law, AT&T, the giant American telecom company that owned UNIX could not charge (large) amounts of money for it and UNIX was practically free for anyone to use. As a result, UNIX was widely used in universities, such as MIT.

In 1985, Richard Stallman, a programmer at the MIT Artificial Intelligence lab writes the GNU Manifesto, in part in response to his frustrations in how his programming work is controlled and how the way companies own and control software (and it's associated tools) can effectively cut-off a programmer for his or her own work. He envisions an entire operating system, to be called GNU (GNU's Not Unix) designed to be free for all to use. In the Manifesto, he writes:

So far we have an Emacs text editor with Lisp for writing editor commands, a source level debugger, a yacc-compatible parser generator, a linker, and around 35 utilities. A shell (command interpreter) is nearly completed. A new portable optimizing C compiler has compiled itself and may be released this year. An initial kernel exists but many more features are needed to emulate Unix. When the kernel and compiler are finished, it will be possible to distribute a GNU system suitable for program development. We will use TeX as our text formatter, but an nroff is being worked on. We will use the free, portable X Window System as well. After this we will add a portable Common Lisp, an Empire game, a spreadsheet, and hundreds of other things, plus online documentation. We hope to supply, eventually, everything useful that normally comes with a Unix system, and more. (bold has been added)

Finally in 1991, Linus Torvalds, a computer science student in Helsinki, Finland writes a kernel, the part of the operating system that connects to the computer hardware, in this case cheap Intel-processor based PC's, that makes it possible for a fully free (as in freedom) operating system.


The Shell

wikipedia:Bourne_shell, wikipedia:Unix_shell

Bourne was later Bourne-again in the form of BASH (programmers do love their wordplay).

UNIX Philosophy


2003 Eric Raymond's The Art of Unix Programming is published [1]


Small tools loosely joined

Grep, and videogrep

Free Software

Free software



Select a commandline tool and create a wiki page briefly explaining it and giving some simple cookbook examples. (If the page already exists for what you're interested in, you can also extend/improve it instead).