Prototyping 22 Jan 2013: Difference between revisions
No edit summary |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* Nan: ubuntu install on partition on mac book; issues: wireless? | * Nan: ubuntu install on partition on mac book; issues: wireless? | ||
* Yoana: ubuntu to gnome: everything appears to be working ;) | * Yoana: ubuntu to gnome: everything appears to be working ... Trackpad however is "really different" ;) | ||
* Nicole: Virtual Box + Crunchbang: Kernel panic on open ?! | * Nicole: Virtual Box + Crunchbang: Kernel panic on open ?! | ||
* Mich: VB Crunchbag, working | * Mich: VB Crunchbag, working | ||
Line 21: | Line 21: | ||
http://abyss.hubbe.net/gfx/covers/bks/lg/compilers.jpg | http://abyss.hubbe.net/gfx/covers/bks/lg/compilers.jpg | ||
In 1985, | Compilation turns a programmer's source code into something a particular computer can perform (an executable). | ||
<source lang="C"> | |||
#include <stdio.h> | |||
int main() { | |||
printf("Hello, world!\n"); | |||
return 0; | |||
} | |||
</source> | |||
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: | |||
./helloworld | |||
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). | |||
== Libraries == | |||
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 [[Library|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 [http://www.gnu.org/gnu/manifesto.html 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: | |||
<blockquote> | <blockquote> | ||
So far we have an Emacs <b>text editor</b> with Lisp for writing editor commands, a source level <b>debugger</b>, a yacc-compatible <b>parser generator</b>, a <b>linker</b>, and around 35 utilities. A <b>shell</b> (command interpreter) is nearly completed. A new portable optimizing C <b>compiler</b> has compiled itself and may be released this year. An initial <b>kernel</b> 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)'' | So far we have an Emacs <b>text editor</b> with Lisp for writing editor commands, a source level <b>debugger</b>, a yacc-compatible <b>parser generator</b>, a <b>linker</b>, and around 35 utilities. A <b>shell</b> (command interpreter) is nearly completed. A new portable optimizing C <b>compiler</b> has compiled itself and may be released this year. An initial <b>kernel</b> 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)'' | ||
</blockquote> | </blockquote> | ||
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. | |||
[[Gstreamer]] | [[Gstreamer]] |
Latest revision as of 14:52, 22 January 2013
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
Compile
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:
./helloworld
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).
Libraries
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
http://en.wikipedia.org/wiki/Unix_philosophy
2003 Eric Raymond's The Art of Unix Programming is published [1]
Pipeline
Small tools loosely joined
Grep, and videogrep
Free Software
Script
In-class
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).