docs/unix-phil

changeset 48:40caeb9e9b25

switched to new header macro; cleaned up CW
author meillo@marmaro.de
date Mon, 12 Apr 2010 14:45:29 +0200
parents b6ae4a8ab1d3
children 2f188a5dc0dc
files unix-phil.ms
diffstat 1 files changed, 59 insertions(+), 156 deletions(-) [+]
line diff
     1.1 --- a/unix-phil.ms	Mon Apr 12 14:11:39 2010 +0200
     1.2 +++ b/unix-phil.ms	Mon Apr 12 14:45:29 2010 +0200
     1.3 @@ -1,27 +1,46 @@
     1.4  .nr PS 11
     1.5  .nr VS 13
     1.6 -.nr lu 0
     1.7  
     1.8  .de CW
     1.9  .nr PQ \\n(.f
    1.10 -.if t .ft CW
    1.11 -.ie ^\\$1^^ .if n .ul 999
    1.12 -.el .if n .ul 1
    1.13 -.if t .if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
    1.14 -.if n .if \\n(.$=1 \&\\$1
    1.15 -.if n .if \\n(.$>1 \&\\$1\c
    1.16 -.if n .if \\n(.$>1 \&\\$2
    1.17 +.if t \{\
    1.18 +.	ft CW
    1.19 +.	if !^\\$1^^ \&\\$1\f\\n(PQ\\$2
    1.20 +.\}
    1.21 +.if n \{\
    1.22 +.	ie ^\\$1^^ .ul 999
    1.23 +.	el .ul 1
    1.24 +.	if \\n(.$=1 \&\\$1
    1.25 +.	if \\n(.$>1 \&\\$1\c
    1.26 +.	if \\n(.$>1 \&\\$2
    1.27 +.\}
    1.28  ..
    1.29  
    1.30  .ds [. \ [
    1.31  .ds .] ]
    1.32  
    1.33 -.rn NH _N
    1.34 -.de NH
    1.35 -.if '\\$1'1' .sp 2v
    1.36 -.if '\\$1'1' .nr PS +2
    1.37 -._N \\$1
    1.38 -.if '\\$1'1' .nr PS -2
    1.39 +.de H
    1.40 +.if '\\$1'1' \{\
    1.41 +.	sp 2v
    1.42 +.	nr PS +2
    1.43 +.	NH \\$1
    1.44 +\\$2
    1.45 +.	nr PS -2
    1.46 +.	LP
    1.47 +.	XS
    1.48 +.	sp .5v
    1.49 +.	B
    1.50 +\\*(SN \\$2
    1.51 +.	XE
    1.52 +.\}
    1.53 +.if '\\$1'2' \{\
    1.54 +.	NH \\$1
    1.55 +\\$2
    1.56 +.	LP
    1.57 +.	XS
    1.58 +	\\*(SN \\$2
    1.59 +.	XE
    1.60 +.\}
    1.61  ..
    1.62  
    1.63  .am QP
    1.64 @@ -58,13 +77,7 @@
    1.65  .CW \s-1http://marmaro.de/docs \ .
    1.66  .FE
    1.67  
    1.68 -.NH 1
    1.69 -Introduction
    1.70 -.XS
    1.71 -.sp .5v
    1.72 -.B
    1.73 -\*(SN Introduction
    1.74 -.XE
    1.75 +.H 1 Introduction
    1.76  .LP
    1.77  The Unix Philosophy is the essence of how the Unix operating system,
    1.78  especially its toolchest, was designed.
    1.79 @@ -135,13 +148,7 @@
    1.80  is a good book that covers this topic.
    1.81  Its point of view matches to the one of this paper.
    1.82  
    1.83 -.NH 1
    1.84 -Importance of software design in general
    1.85 -.XS
    1.86 -.sp .5v
    1.87 -.B
    1.88 -\*(SN Importance of software design in general
    1.89 -.XE
    1.90 +.H 1 "Importance of software design in general
    1.91  .LP
    1.92  Software design is the planning of how the internal structure
    1.93  and external interfaces of a software should look like.
    1.94 @@ -251,23 +258,13 @@
    1.95  It offers guidelines to achieve good quality and high gain for the effort spent.
    1.96  
    1.97  
    1.98 -.NH 1
    1.99 -The Unix Philosophy
   1.100 -.XS
   1.101 -.sp .5v
   1.102 -.B
   1.103 -\*(SN The Unix Philosophy
   1.104 -.XE
   1.105 +.H 1 "The Unix Philosophy
   1.106  .LP
   1.107  The origins of the Unix Philosophy were already introduced.
   1.108  This chapter explains the philosophy, oriented on Gancarz,
   1.109  and shows concrete examples of its application.
   1.110  
   1.111 -.NH 2
   1.112 -Pipes
   1.113 -.XS
   1.114 -	\*(SN Pipes
   1.115 -.XE
   1.116 +.H 2 Pipes
   1.117  .LP
   1.118  Following are some examples to demonstrate how applied Unix Philosophy feels like.
   1.119  Knowledge of using the Unix shell is assumed.
   1.120 @@ -333,11 +330,7 @@
   1.121  The other is the design of the programs that are used in the pipeline.
   1.122  They need interfaces that allow them to be used in such a way.
   1.123  
   1.124 -.NH 2
   1.125 -Interface design
   1.126 -.XS
   1.127 -	\*(SN Interface design
   1.128 -.XE
   1.129 +.H 2 "Interface design
   1.130  .LP
   1.131  Unix is, first of all, simple \(en Everything is a file.
   1.132  Files are sequences of bytes, without any special structure.
   1.133 @@ -385,11 +378,7 @@
   1.134  Testing of interactive programs is much more complicated,
   1.135  than testing of non-interactive programs.
   1.136  
   1.137 -.NH 2
   1.138 -The toolchest approach
   1.139 -.XS
   1.140 -	\*(SN The toolchest approach
   1.141 -.XE
   1.142 +.H 2 "The toolchest approach
   1.143  .LP
   1.144  A toolchest is a set of tools.
   1.145  Instead of having one big tool for all tasks, one has many small tools,
   1.146 @@ -466,11 +455,7 @@
   1.147  they will still relay on the external programs,
   1.148  which do the actual work.
   1.149  
   1.150 -.NH 2
   1.151 -A powerful shell
   1.152 -.XS
   1.153 -	\*(SN A powerful shell
   1.154 -.XE
   1.155 +.H 2 "A powerful shell
   1.156  .LP
   1.157  The Unix shell provides the possibility to combine small programs into large ones.
   1.158  But a powerful shell is a great feature in other ways, too.
   1.159 @@ -531,11 +516,7 @@
   1.160  changing requirements.
   1.161  Software parts that are not written will not miss the requirements.
   1.162  
   1.163 -.NH 2
   1.164 -Worse is better
   1.165 -.XS
   1.166 -	\*(SN Worse is better
   1.167 -.XE
   1.168 +.H 2 "Worse is better
   1.169  .LP
   1.170  The Unix Philosophy aims for the 90% solution;
   1.171  others call it the ``Worse is better'' approach.
   1.172 @@ -584,11 +565,7 @@
   1.173  then less effort was spent into the project, than it would have be
   1.174  when a different approach had been used.
   1.175  
   1.176 -.NH 2
   1.177 -Upgrowth and survival of software
   1.178 -.XS
   1.179 -	\*(SN Upgrowth and survival of software
   1.180 -.XE
   1.181 +.H 2 "Upgrowth and survival of software
   1.182  .LP
   1.183  So far it was talked about \fIwriting\fP or \fIbuilding\fP software.
   1.184  Although these are just verbs, they do imply a specific view on the work process
   1.185 @@ -688,11 +665,7 @@
   1.186  Who cares if the large program is a failure,
   1.187  but parts of it become successful instead?
   1.188  
   1.189 -.NH 2
   1.190 -Summary
   1.191 -.XS
   1.192 -	\*(SN Summary
   1.193 -.XE
   1.194 +.H 2 "Summary
   1.195  .LP
   1.196  This chapter explained central ideas of the Unix Philosophy.
   1.197  For each of the ideas, the advantages they introduce were explained.
   1.198 @@ -710,13 +683,7 @@
   1.199  
   1.200  
   1.201  
   1.202 -.NH 1
   1.203 -Case study: \s-1MH\s0
   1.204 -.XS
   1.205 -.sp .5v
   1.206 -.B
   1.207 -\*(SN Case study: \s-1MH\s0
   1.208 -.XE
   1.209 +.H 1 "Case study: \s-1MH\s0
   1.210  .LP
   1.211  The previous chapter introduced and explained the Unix Philosophy
   1.212  from a general point of view.
   1.213 @@ -738,11 +705,7 @@
   1.214  \s-1MH\s0 and nmh are described.
   1.215  
   1.216  
   1.217 -.NH 2
   1.218 -Historical background
   1.219 -.XS
   1.220 -	\*(SN Historical background
   1.221 -.XE
   1.222 +.H 2 "Historical background
   1.223  .LP
   1.224  Electronic mail was available in Unix very early.
   1.225  The first \s-1MUA\s0 on Unix was \f(CWmail\fP,
   1.226 @@ -805,11 +768,7 @@
   1.227  mh
   1.228  .]
   1.229  
   1.230 -.NH 2
   1.231 -Contrasts to monolithic mail systems
   1.232 -.XS
   1.233 -	\*(SN Contrasts to monolithic mail systems
   1.234 -.XE
   1.235 +.H 2 "Contrasts to monolithic mail systems
   1.236  .LP
   1.237  All \s-1MUA\s0s are monolithic, except \s-1MH\s0.
   1.238  Although there might actually exist further, very little known,
   1.239 @@ -863,11 +822,7 @@
   1.240  alone or in combination with others, also from other toolchests,
   1.241  without leaving the shell.
   1.242  
   1.243 -.NH 2
   1.244 -Data storage
   1.245 -.XS
   1.246 -	\*(SN Data storage
   1.247 -.XE
   1.248 +.H 2 "Data storage
   1.249  .LP
   1.250  \s-1MH\s0's mail storage is a directory tree under the user's
   1.251  \s-1MH\s0 directory (usually \f(CW$HOME/Mail\fP),
   1.252 @@ -928,11 +883,7 @@
   1.253  man page mh-profile mh-sequence
   1.254  .]
   1.255  
   1.256 -.NH 2
   1.257 -Discussion of the design
   1.258 -.XS
   1.259 -	\*(SN Discussion of the design
   1.260 -.XE
   1.261 +.H 2 "Discussion of the design
   1.262  .LP
   1.263  This section discusses \s-1MH\s0 in regard to the tenets
   1.264  of the Unix Philosophy that Gancarz identified.
   1.265 @@ -1115,11 +1066,7 @@
   1.266  With these three, I was able to convince people that the structure was viable.
   1.267  This took about three weeks.
   1.268  
   1.269 -.NH 2
   1.270 -Problems
   1.271 -.XS
   1.272 -	\*(SN Problems
   1.273 -.XE
   1.274 +.H 2 "Problems
   1.275  .LP
   1.276  \s-1MH\s0 is not without problems.
   1.277  There are two main problems: one is technical, the other is about human behavior.
   1.278 @@ -1149,11 +1096,7 @@
   1.279  are quite outdated and thus not very appealing, compared to the modern interfaces
   1.280  of many monolithic \s-1MUA\s0s.
   1.281  
   1.282 -.NH 2
   1.283 -Summary \s-1MH\s0
   1.284 -.XS
   1.285 -	\*(SN Summary \s-1MH\s0
   1.286 -.XE
   1.287 +NH 2 "Summary \s-1MH\s0
   1.288  .LP
   1.289  \s-1MH\s0 is an \s-1MUA\s0 that follows the Unix Philosophy in its design.
   1.290  It consists of a toolchest of small tools, each of them does one job well.
   1.291 @@ -1176,13 +1119,7 @@
   1.292  
   1.293  
   1.294  
   1.295 -.NH 1
   1.296 -Case study: uzbl
   1.297 -.XS
   1.298 -.sp .5v
   1.299 -.B
   1.300 -\*(SN Case study: uzbl
   1.301 -.XE
   1.302 +.H 1 "Case study: uzbl
   1.303  .LP
   1.304  The last chapter took a look on the \s-1MUA\s0 \s-1MH\s0,
   1.305  which is an old and established software.
   1.306 @@ -1191,11 +1128,7 @@
   1.307  Its name comes from the \fILolspeak\fP word for ``usable'';
   1.308  it is pronounced identical.
   1.309  
   1.310 -.NH 2
   1.311 -Historical background
   1.312 -.XS
   1.313 -	\*(SN Historical background
   1.314 -.XE
   1.315 +.H 2 "Historical background
   1.316  .LP
   1.317  Uzbl was started by Dieter Plaetinck in April 2009.
   1.318  The idea was born in a thread in the Arch Linux Forums.
   1.319 @@ -1243,11 +1176,7 @@
   1.320  slashdot uzbl
   1.321  .]
   1.322  
   1.323 -.NH 2
   1.324 -Contrasts to other web browsers
   1.325 -.XS
   1.326 -	\*(SN Contrasts to other web browsers
   1.327 -.XE
   1.328 +.H 2 "Contrasts to other web browsers
   1.329  .LP
   1.330  Like most \s-1MUA\s0s are monolithic, but \s-1MH\s0 is a toolchest,
   1.331  most web browsers are monolithic, but uzbl is a frontend to a toolchest.
   1.332 @@ -1287,11 +1216,7 @@
   1.333  But instead of using existing, external programs, modern web browsers
   1.334  include these functions.
   1.335  
   1.336 -.NH 2
   1.337 -Discussion of the design
   1.338 -.XS
   1.339 -	\*(SN Discussion of the design
   1.340 -.XE
   1.341 +.H 2 "Discussion of the design
   1.342  .LP
   1.343  This section discusses uzbl in regard of the Unix Philosophy,
   1.344  as identified by Gancarz.
   1.345 @@ -1458,11 +1383,7 @@
   1.346  .]
   1.347  
   1.348  
   1.349 -.NH 2
   1.350 -Problems
   1.351 -.XS
   1.352 -	\*(SN Problems
   1.353 -.XE
   1.354 +.H 2 "Problems
   1.355  .LP
   1.356  Similar to \s-1MH\s0, uzbl, too suffers from being different.
   1.357  It is sad, but people use what they know.
   1.358 @@ -1489,11 +1410,7 @@
   1.359  Now web browsers, and eventually the users, suffer from it.
   1.360  
   1.361  
   1.362 -.NH 2
   1.363 -Summary uzbl
   1.364 -.XS
   1.365 -	\*(SN Summary uzbl
   1.366 -.XE
   1.367 +.H 2 "Summary uzbl
   1.368  .LP
   1.369  ``Uzbl is a browser that adheres to the Unix Philosophy'',
   1.370  that is how uzbl is seen by its authors.
   1.371 @@ -1517,19 +1434,9 @@
   1.372  Despite this bad situation, uzbl does a fairly good job.
   1.373  
   1.374  
   1.375 -.NH 1
   1.376 -Final thoughts
   1.377 -.XS
   1.378 -.sp .5v
   1.379 -.B
   1.380 -\*(SN Final thoughts
   1.381 -.XE
   1.382 +.H 1 "Final thoughts
   1.383  
   1.384 -.NH 2
   1.385 -Quick summary
   1.386 -.XS
   1.387 -	\*(SN Quick summary
   1.388 -.XE
   1.389 +.H 2 "Quick summary
   1.390  .LP
   1.391  good design
   1.392  .LP
   1.393 @@ -1537,11 +1444,7 @@
   1.394  .LP
   1.395  case studies
   1.396  
   1.397 -.NH 2
   1.398 -Why people should choose
   1.399 -.XS
   1.400 -	\*(SN Why people should choose
   1.401 -.XE
   1.402 +.H 2 "Why people should choose
   1.403  .LP
   1.404  Make the right choice!
   1.405