User:Silviolorusso/Report: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''4/6 October - Install Party'''
== 4/6 October - Install Party ==


Bought a brand new cheap netbook. Installed Ubuntu by myself, therefore joined the Debian group.  
Bought a brand new cheap netbook. Installed Ubuntu by myself, therefore joined the Debian group.  
Line 10: Line 10:




'''10 October - Terminal session /part 1'''
== 10 October - Terminal session /part 1 ==


In developing his [http://en.wikipedia.org/wiki/Jacquard_loom mechanical loom], Joseph Marie Jacquard implemented punched cards. It was 1801. [http://en.wikipedia.org/wiki/Punched_card Punched cards] were a crucial innovation that would eventually affect the whole computer industry because they were the only way to store data.
In developing his [http://en.wikipedia.org/wiki/Jacquard_loom mechanical loom], Joseph Marie Jacquard implemented punched cards. It was 1801. [http://en.wikipedia.org/wiki/Punched_card Punched cards] were a crucial innovation that would eventually affect the whole computer industry because they were the only way to store data.
Line 107: Line 107:
>>>>>>>>>>>>>>>>>>>GIFMAKA >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>GIFMAKA >>>>>>>>>>>>>>>>>>>>>>>>>>>>>


<code>  
<source lang="bash">  
#!/bin/sh
#!/bin/sh


Line 130: Line 130:
# remove files
# remove files
rm $FWD
rm $FWD
</code>
</source>
 
[[User:silviolorusso/Report/gifmaka-ex | Examples]] of use of GIFMAKA capturing frames from [http://en.wikipedia.org/wiki/Vampire_in_Venice Vampire in Venice] directed by Augusto Caminito.

Latest revision as of 20:01, 10 October 2011

4/6 October - Install Party

Bought a brand new cheap netbook. Installed Ubuntu by myself, therefore joined the Debian group.

First day: not everything clear, especially regarding the file structure. Realized I was missing the basic terminal commands. Anyway Debian was installed and it was working fine (except for the wireless and the audio).

Second day: not able to follow, pretty much copying from the screen. Got the audio to work. Realized my netbook processor is 64. Had to reinstall from scratch. Installed Ubuntu this time.



10 October - Terminal session /part 1

In developing his mechanical loom, Joseph Marie Jacquard implemented punched cards. It was 1801. Punched cards were a crucial innovation that would eventually affect the whole computer industry because they were the only way to store data.

A company called Dehomag, subsidiary to IBM, was leading the punchcards movement.

Then the punchcard technology became deprecated for the connection with Nazism: punch cards allowed Nazis to have scientific control over the repressed people. People started to think punchcards were allowing a repressive control over people.

The terminal concept was a sort of response to punchcards: instead of punching cards, writing command and data into a terminal. In fact the first terminal was not much more than a typing machine. Computer were made in a modular way: terminal were meant only to send data and to display it, not to precess them.

VT100 is an example of "dumb" terminal.

In parallel to terminal, serial consoles came to exist. A serial console allowed the admin to connect to the system through it. Now the difference between serial consoles and terminal is pretty blurred.


>>>>>>>>>>>>>>>> time jump >>>>>>>>>>>>>>>>>>>


(UNICS) UNIX, fully operating system, developed in 1969 by employers of Packard Bell research lab. The idea was to be able to breakdown everything in small parts. Modular. Doug Mcllroy:

<quote> This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface. </quote>

The philosophy took off. More than 40 years after every simple computer is directly related to this principle.

Unix → NeXTSTEP (Steve Jobs), total failure → again in mac OS X

GNU started with the GNU manifesto 1980's by Richard Stallman

Stallman was working at AI labs and he witnesses the transformation of computing as a collaborative working to a commercial enterprise. No recipes, bits of code could be shared anymore. Bill Gates and others prevented that because it was considered harmful for the enterprise.
Four freedoms GNU:

  • The freedom to run the program, for any purpose (freedom 0).
  • The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). ** Access to the source code is a precondition for this.
  • The freedom to redistribute copies so you can help your neighbor (freedom 2).
  • The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this.


How to enforce this legally? GPL license, a sort of hack on copyright.

Stallman and others started to rewrite bits of code and release those in GPL.

Linux: just a Kernel without operating system. GNU didn't have a kernel. Good opportunitiy. GNU + LINUX.

Do one thing and do it well? How? Pipeline! What to pipe? Std (standard) streams in Unix (stdin / stdout / stderr)

Terminal: text-based as metaphoric as gui

commandlinefu.com: list of recipes command

LIST OF SHELL COMMANDS

ls : list
grep : find a line
ps : processes
man : manual
less : simple text viewer
alias : create alias
vim : text editor
pwd : where I am?
mkdir : make directory
cd : change directory
touch : create file
for do done : iteration loops
while : iteration loop, while something is true iterate some commands
whereis : where is software?
source: refresh
echo : print function
ssh : connect to a player
sh : a shell
bash : other shell
zsh : another one
chmod +x : change modes of a file
dmesg : list all kernel messages
> : pipe writes to file
| : pipe
\ : cut oneliner
seq : sequence number
sed : editor text to pipe

ARGUMENTS
&: run in background

FILES AND FOLDERS AND VARIABLES
.bashrc : config of bash
/dev/mem : ram
/dev/dsp : audiocard
~ : home
$HOST: name of the computer
$USER: name of the user

SHELL SHORTCUTS
TAB: Completion

>>>>>>>>>>>>>>>>>>>GIFMAKA >>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 
#!/bin/sh

# Extract three PNG frames from a movie | $1 movie name | $2 time position in seconds | $3 number of frames
ffmpeg -i $1 -r 25 -ss $2 -vframes $3 $1-%03d.png

# convert PGN to single GIF

for FRAME in $(seq -f %03g $3)
do
	convert $1-$FRAME.png $1-$FRAME.gif
	rm $1-$FRAME.png
done

# combine all individual GIF in an animated one
FWD=$(/bin/ls $1-*.gif)
BWD=$(echo "${FWD}" | sed 1d | sort -r | sed 1d)

gifsicle --delay 4 --loopcount=0 --colors 256 \
$FWD $BWD > $1-anim.gif 

# remove files
rm $FWD

Examples of use of GIFMAKA capturing frames from Vampire in Venice directed by Augusto Caminito.