Shlomi Fish avatar Shlomi Fish committed 9b94b26

Got rid of a lot of trailing space.

Comments (0)

Files changed (799)

 $(DOCBOOK4_RENDERED_DIR)/%.html: $(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html
 	./bin/clean-up-docbook-xsl-xhtml.pl -o $@ $<
 
-$(DOCBOOK4_FO_DIR)/%.fo: $(DOCBOOK4_XML_DIR)/%.xml
-	$(DOCMAKE_WITH_PARAMS) -o $@ --stringparam "docmake.output.format=fo" -x $(FO_XSLT_SS) fo $<
-
-
-$(DOCBOOK4_PDF_DIR)/%.pdf: $(DOCBOOK4_FO_DIR)/%.fo
-	fop -fo $< -pdf $@
-
-$(DOCBOOK4_RTF_DIR)/%.rtf: $(DOCBOOK4_FO_DIR)/%.fo
-	fop -fo $< -rtf $@
-
 DOCMAKE_SGML_PATH = lib/sgml/shlomif-docbook
 DOCBOOK4_MAK_MAKEFILES_PATH = lib/make/docbook
 
 
 DOCMAKE_PARAMS = -v
 
-$(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html: $(DOCBOOK4_XML_DIR)/%.xml
-	$(DOCMAKE) --stringparam "docmake.output.format=xhtml" -x $(XHTML_ONE_CHUNK_XSLT_SS) -o $(patsubst $(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html,$(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%,$@) xhtml $<
-	mv $(patsubst %/all-in-one.html,%/index.html,$@) $@
-
 HHGG_CONVERT_SCRIPT_FN = convert-hitchhiker-guide-to-st-tng-to-screenplay-xml.pl
 HHGG_CONVERT_SCRIPT_SRC = bin/processors/$(HHGG_CONVERT_SCRIPT_FN)
 HHGG_CONVERT_SCRIPT_DEST = $(T2_DEST)/humour/by-others/$(HHGG_CONVERT_SCRIPT_FN).txt
 
 $(DOCBOOK4_FO_DIR)/%.fo: $(DOCBOOK4_XML_DIR)/%.xml
 	$(DOCMAKE_WITH_PARAMS) -o $@ --stringparam "docmake.output.format=fo" -x $(FO_XSLT_SS) fo $<
+	perl -lpi -e 's/[ \t]+\z//' $@
 
 $(DOCBOOK4_PDF_DIR)/%.pdf: $(DOCBOOK4_FO_DIR)/%.fo
 	fop -fo $< -pdf $@
 $(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html: $(DOCBOOK4_XML_DIR)/%.xml
 	$(DOCMAKE) --stringparam "docmake.output.format=xhtml" -x $(XHTML_ONE_CHUNK_XSLT_SS) -o $(patsubst $(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.html,$(DOCBOOK4_ALL_IN_ONE_XHTML_DIR)/%,$@) xhtml $<
 	mv $(patsubst %/all-in-one.html,%/index.html,$@) $@
+	perl -lpi -e 's/[ \t]+\z//' $@
 
 # DOCBOOK5_RELAXNG = http://www.docbook.org/xml/5.0/rng/docbook.rng
 DOCBOOK5_RELAXNG = rng/docbook.rng
 	$(DOCMAKE) --stringparam "root.filename=$@.temp.xml" --basepath $(DOCBOOK5_XSL_STYLESHEETS_PATH) -x $(DOCBOOK5_XSL_ONECHUNK_XSLT_STYLESHEET) xhtml-1_1 $<
 	xsltproc --output $@ ./bin/clean-up-docbook-xhtml-1.1.xslt $@.temp.xml.html
 	rm -f $@.temp.xml.html
+	perl -lpi -e 's/[ \t]+\z//' $@
 
 $(DOCBOOK5_RENDERED_DIR)/%.xhtml: $(DOCBOOK5_ALL_IN_ONE_XHTML_DIR)/%/all-in-one.xhtml
 	./bin/clean-up-docbook-5-xsl-xhtml-1_1.pl -o $@ $<
 
 $(DOCBOOK5_FO_DIR)/%.fo: $(DOCBOOK5_SOURCES_DIR)/%.xml
 	$(DOCMAKE_WITH_PARAMS) --basepath $(DOCBOOK5_XSL_STYLESHEETS_PATH) -o $@ -x $(DOCBOOK5_XSL_FO_XSLT_STYLESHEET) fo $<
+	perl -lpi -e 's/[ \t]+\z//' $@
 
 $(DOCBOOK5_PDF_DIR)/%.pdf: $(DOCBOOK5_FO_DIR)/%.fo
 	fop -fo $< -pdf $@
 $(SPORK_LECTURES_BASE_STARTS) : $(SPORK_LECTS_SOURCE_BASE)/%/slides/start.html : $(SPORK_LECTS_SOURCE_BASE)/%/Spork.slides $(SPORK_LECTS_SOURCE_BASE)/%/config.yaml
 	(cd $(patsubst %/slides/start.html,%,$@) && \
 		shspork -make && \
-		(cd slides/ && (for I in *.html ; do tidy -asxhtml -o "$$I".new "$$I" ; mv -f "$$I".new "$$I" ; done)) \
+		(cd slides/ && (for I in *.html ; do tidy -asxhtml -o "$$I".new "$$I" ; mv -f "$$I".new "$$I" ; perl -lpi -e 's/[\t ]+\z//' "$$I" ; done)) \
 	)
 
 lib/presentations/spork/Vim/beginners/Spork.slides: lib/presentations/spork/Vim/beginners/Spork.slides.source

bin/clean-up-docbook-5-xsl-xhtml-1_1.pl

     # Fixed in Perl 6...
     $s =~ s{<(/?)h(\d)}{"<".$1."h".($2+2)}ge;
 
+    $s =~ s/[ \t]+$//gms;
     open my $out, ">", $out_fn;
     binmode $out, ":utf8";
     print {$out} $s;

bin/clean-up-docbook-xsl-xhtml.pl

     # Fixed in Perl 6...
     $s =~ s{<(/?)h(\d)}{"<".$1."h".($2+2)}ge;
 
+    $s =~ s/[ \t]+$//gms;
+
     open my $out, ">", $out_fn;
     binmode $out, ":utf8";
     print {$out} $s;

bin/gen-docbook-make-helpers.pl

         id => "case-for-drug-legalisation",
         path => "philosophy/politics/drug-legalisation",
         base => "case-for-drug-legalisation",
-    },    
+    },
     {
         id => "case-for-drug-legalisation-rev2",
         path => "philosophy/politics/drug-legalisation",
         base => "case-for-file-swapping-rev3",
     },
     {
-        id => "dealing-with-hypomanias", 
-        path => "philosophy/psychology/hypomanias/", 
+        id => "dealing-with-hypomanias",
+        path => "philosophy/psychology/hypomanias/",
         base => "dealing-with-hypomanias",
         work_in_progress => 1,
         db_ver => 5,
     },
     {
-        id => "end-of-it-slavery", 
-        path => "philosophy/computers/software-management/end-of-it-slavery", 
+        id => "end-of-it-slavery",
+        path => "philosophy/computers/software-management/end-of-it-slavery",
         base => "end-of-it-slavery",
     },
     {
         path => "philosophy/foss-other-beasts/revision-2",
         base => "foss-and-other-beasts",
     },
-    
+
     {
-        id => "introductory-language", 
-        path => "philosophy/computers/education/introductory-language", 
+        id => "introductory-language",
+        path => "philosophy/computers/education/introductory-language",
         base => "introductory-language",
     },
-    
+
     {
-        id => "isr-pales-conflict-solution", 
-        path => "philosophy/israel-pales", 
+        id => "isr-pales-conflict-solution",
+        path => "philosophy/israel-pales",
         base => "isr-pales-conflict-solution",
     },
-    
+
     {
         id => "objectivism-and-open-source",
         path => "philosophy/obj-oss",
         base => "objectivism-and-open-source",
         db_ver => 5,
     },
- 
+
     {
         id => "rindolf-spec",
         path => "rindolf",
         base => "rindolf-spec",
     },
-    
+
     {
         id => "the-eternal-jew",
         path => "philosophy/the-eternal-jew",
         base => "the-eternal-jew",
     },
-    
+
     {
-        id => "what-makes-software-high-quality", 
-        path => "philosophy/computers/high-quality-software", 
+        id => "what-makes-software-high-quality",
+        path => "philosophy/computers/high-quality-software",
         base => "what-makes-software-high-quality",
     },
-    
+
     {
-        id => "what-makes-software-high-quality-rev2", 
-        path => "philosophy/computers/high-quality-software/rev2", 
+        id => "what-makes-software-high-quality-rev2",
+        path => "philosophy/computers/high-quality-software/rev2",
         base => "what-makes-software-high-quality-rev2",
     },
     {
-        id => "perfect-it-workplace", 
-        path => "philosophy/computers/software-management/perfect-workplace", 
+        id => "perfect-it-workplace",
+        path => "philosophy/computers/software-management/perfect-workplace",
         base => "perfect-it-workplace",
     },
     {
-        id => "Spark-Pre-Birth-of-a-Modern-Lisp", 
-        path => "open-source/projects/Spark/mission", 
+        id => "Spark-Pre-Birth-of-a-Modern-Lisp",
+        path => "open-source/projects/Spark/mission",
         base => "Spark-Pre-Birth-of-a-Modern-Lisp",
     },
     {
-        id => "human-hacking-field-guide", 
+        id => "human-hacking-field-guide",
         path =>  "humour/human-hacking",
         base => "human-hacking-field-guide",
         custom_css => 1,
-    },   
+    },
     {
-        id => "human-hacking-field-guide-v2-arabic", 
+        id => "human-hacking-field-guide-v2-arabic",
         path =>  "humour/human-hacking/arabic-v2",
         base => "human-hacking-field-guide-v2-arabic",
-    },   
+    },
     {
-        id => "perfect-it-workplace-v2", 
+        id => "perfect-it-workplace-v2",
         path =>  "philosophy/computers/software-management/perfect-workplace/v2",
         base => "perfect-it-workplace-v2",
         db_ver => 5,
         work_in_progress => 1,
     },
-    
+
     {
-        id => "foss-licences-wars", 
-        path => "philosophy/computers/open-source/foss-licences-wars", 
+        id => "foss-licences-wars",
+        path => "philosophy/computers/open-source/foss-licences-wars",
         base => "foss-licences-wars",
     },
 
         db_ver => 5,
     },
     {
-        id => "human-hacking-field-guide-v2", 
+        id => "human-hacking-field-guide-v2",
         path =>  "humour/human-hacking",
         base => "human-hacking-field-guide-v2",
         custom_css => 1,
 =begin foo
     # Removed due to it already being in FICTION_DOCS in Makefile.
     {
-        id => "The-Pope-Died-on-Sunday-hebrew", 
-        path => "humour/Pope/", 
+        id => "The-Pope-Died-on-Sunday-hebrew",
+        path => "humour/Pope/",
         base => "The-Pope-Died-on-Sunday-hebrew",
         work_in_progress => 1,
         db_ver => 5,
     return \%f;
 }
 
-my @end_formats = 
+my @end_formats =
 (
     (
         map { process_simple_end_format($_) }
     [
         'src_dir' => $dir,
         'src_files' =>
-        [ 
+        [
             sort { $a cmp $b }
             grep { $include_cb->($_) }
             # Filtering out explicitly because it has its own separate
             # dependency.
-            grep { $_ ne "index.html" } 
+            grep { $_ ne "index.html" }
             @files
         ],
     ];
     return get_quad_pres_files("lib/presentations/qp/perl-for-newbies/$n");
 }
 
-$tt->process($template_fh, 
+$tt->process($template_fh,
     {
         docs_4 => [ grep { $_->{db_ver} != 5 } @documents],
         docs_5 => [ grep { $_->{db_ver} == 5 } @documents],
 EOF
         quadp_presentations =>
         {
-            (map 
+            (map
                 {
                     (
-                        "p4n$_" => 
+                        "p4n$_" =>
                         {
                             dest_dir => "lecture/Perl/Newbies/lecture$_",
                             @{get_p4n_files($_)},
Add a comment to this file

lib/docbook/4/fo/PLACEHOLDER

Empty file added.

lib/docbook/4/from-mediawiki/optimizing-code-for-speed.docbook.xml

 
 </para>
 <para>
-Also consider that short functions and methods are considered preferable over longer methods, to allow for greater code re-use, testing, and self-documentation. (See the <ulink url="http://c2.com/cgi/wiki?ExtractMethod"><citetitle>"Extract Method" refactoring pattern</citetitle></ulink>). However, function or method calls are considered a relatively costly operation, and so this extra code-quality, will probably make the program slower. 
+Also consider that short functions and methods are considered preferable over longer methods, to allow for greater code re-use, testing, and self-documentation. (See the <ulink url="http://c2.com/cgi/wiki?ExtractMethod"><citetitle>"Extract Method" refactoring pattern</citetitle></ulink>). However, function or method calls are considered a relatively costly operation, and so this extra code-quality, will probably make the program slower.
 </para>
 <para>
 Therefore, it's not hard to imagine that a developer who wishes to save some extra cycles will merge a function that gets used only once or a few times into its caller code (or incorporating its code using a macro, or a preprocessing stage if possible), and therefore making the code less modular.
 The next thing you need to do is to make sure your code is modular. Duplicate code and other properties that make a code non-modular can prevent a clear analysis of the code's bottlenecks by profiling it.
 </para>
 <para>
-Afterwards, it is important to profile your code using a good software profiler. Profiling will help show which code does not take a lot of time to run and therefore it would be best not to invest a lot of optimization effort in it. One should start by optimizing the most time-consuming tasks first. 
+Afterwards, it is important to profile your code using a good software profiler. Profiling will help show which code does not take a lot of time to run and therefore it would be best not to invest a lot of optimization effort in it. One should start by optimizing the most time-consuming tasks first.
 </para>
 <para>
 It takes some expertise to knowing how to properly analyze the results given by the profiler, and seeing what needs to be optimized. For example, some IO-intensive routines may appear to consume a lot of time, while in fact that time cannot be effectively eliminated because the amount of IO is minimal (while still being relatively time consuming). I feel that discussing this aspect of profiling further is orthogonal to the mission of this article, so I'm not going to cover it here.
 Generally, an algorithm has an asymptotic comptutational complexity. Assuming the input is of size N, we can say that the algorithm will finish at O(N), O(N^2), O(N^3), O(N*log(N)) etc. This means that it is a certain mathematical expression of the size of the input, and the algorithm finishes between two factors of it.
 </para>
 <para>
-Generally, the smaller the order of complexity of the program's underlying algorithm, the faster the it will run and the better it will scale as the input gets larger. Thus, we should often seek more efficient algorithms in order to reduce the order of complexity. 
+Generally, the smaller the order of complexity of the program's underlying algorithm, the faster the it will run and the better it will scale as the input gets larger. Thus, we should often seek more efficient algorithms in order to reduce the order of complexity.
 </para>
 
 </section>
 <ulink url="http://fc-solve.shlomifish.org/"><citetitle>Freecell Solver</citetitle></ulink> is a library written in ANSI C that solves deals of FreeCell and similar "full-knowledge" Solitaire games. Freecell Solver used traditional Game artificial intelligence heuristics from the beginning such as Depth First Search and Best First Search. As a result, there was a need to maintain a collection of the previously encountered board positions (or "states") so they won't be checked twice.
 </para>
 <para>
-The very first version of the solver (written in Perl) used a linear search over an array. That proved to be too slow to be effective to solve even the most elementary deals. Afterwards, the program was re-implemented in C, and used a sorted array, with a "sort margin" that was sorted using ANSI C's <ulink url="http://www.cplusplus.com/reference/clibrary/cstdlib/qsort.html"><citetitle>qsort's function</citetitle></ulink>, which performs the Quick Sort algorithm at an average complexity of O(N*log(N)), giving the program an average lookup of O(log(N)) and an accumulated addition of between O(N*log(N)) and O(N^2). 
+The very first version of the solver (written in Perl) used a linear search over an array. That proved to be too slow to be effective to solve even the most elementary deals. Afterwards, the program was re-implemented in C, and used a sorted array, with a "sort margin" that was sorted using ANSI C's <ulink url="http://www.cplusplus.com/reference/clibrary/cstdlib/qsort.html"><citetitle>qsort's function</citetitle></ulink>, which performs the Quick Sort algorithm at an average complexity of O(N*log(N)), giving the program an average lookup of O(log(N)) and an accumulated addition of between O(N*log(N)) and O(N^2).
 </para>
 <para>
 Later versions made optional use of two Balanced Binary Trees libraries: <ulink url="http://www.stanford.edu/~blp/avl/"><citetitle>libavl</citetitle></ulink> and <ulink url="http://libredblack.sourceforge.net/"><citetitle>libredblack</citetitle></ulink>, which have a maximal O(log(N)) lookup and insertion and an accumulative O(N*log(N)) run-time. Sometimes later, a custom hash table was coded, whose run-time was even somewhat faster than the balanced binary trees, and had an <emphasis role="bold">average</emphasis> run-time of O(N). This hash was later further optimized using micro-optimizations.
 In his <ulink url="http://www.joelonsoftware.com/articles/fog0000000319.html"><citetitle>article "Back to Basics"</citetitle></ulink>, Joel Spolsky illustrates a common (and unnecessary) pattern that increases the complexity of programs. Essentially, when one does in C:<programlisting>  char string[1000];</programlisting><programlisting>  strcpy (string, "One ");</programlisting><programlisting>  strcat (string, "Two ");</programlisting><programlisting>  strcat (string, "Three ");</programlisting><programlisting>  strcat (string, "Four ");</programlisting><programlisting>  .</programlisting><programlisting>  .</programlisting><programlisting>  .</programlisting>
 </para>
 <para>
-And so forth, then the strcat calls will keep starting from the beginning of the string and seek the (increasing) end times and again. As a result, the complexity of appending N strings each with a limited length, becomes O(N^2) instead of O(N). 
+And so forth, then the strcat calls will keep starting from the beginning of the string and seek the (increasing) end times and again. As a result, the complexity of appending N strings each with a limited length, becomes O(N^2) instead of O(N).
 </para>
 <para>
 Eliminating such problematic mis-implementations in the code can yield a substantial speed-increase.
 </para>
 <section><title>Note about the Memory-Speed Tradeoff</title>
 <para>
-After reading what was written here, you may think this contradicts the common Memory-Speed Trade-off "truism". The Memory/Speed Trade-off has its origins in theoretical computer science, where it is shown that for certain tasks, one can reduce the run-time's asymptotic complexity by increasing the asymptotic amount of memory used (and vice versa). For example, we can sometimes reduce the asymptotic run-time from O(N^2) to O(N) by increasing the memory from O(1) to O(N). 
+After reading what was written here, you may think this contradicts the common Memory-Speed Trade-off "truism". The Memory/Speed Trade-off has its origins in theoretical computer science, where it is shown that for certain tasks, one can reduce the run-time's asymptotic complexity by increasing the asymptotic amount of memory used (and vice versa). For example, we can sometimes reduce the asymptotic run-time from O(N^2) to O(N) by increasing the memory from O(1) to O(N).
 </para>
 <para>
 This is all nice and true, but it doesn't contradict the fact that given the architecture of contemporary computer hardware and operating systems, the less memory a program uses (while the logic of the algorithm remains the same) - the faster it will probably run. It's not an asymptotic trade-off, but rather a gain-gain situation.
 The Schwartzian transform is a way to optimize certain kinds of comparison-based sort operations. If the keys of the function that we want to compare take a lot of time to calculate (such as if they require access to the hard-disk), then we can first prepare an equivalent array with pairs of the inputs and their keys, then sort the pairs based on the keys, and finally filter only the original inputs from the pairs.
 </para>
 <para>
-It should be noted that the Schwartzian transform actually reduced the order of complexity of the number of times the keys are calculated from O(N*log(N)) to O(N). However, the overall order of complexity of the sort remains O(N*log(N)). 
+It should be noted that the Schwartzian transform actually reduced the order of complexity of the number of times the keys are calculated from O(N*log(N)) to O(N). However, the overall order of complexity of the sort remains O(N*log(N)).
 </para>
 
 </section>
 Speed and optimizing other resources are one important factor <ulink url="http://www.shlomifish.org/philosophy/computers/high-quality-software/"><citetitle>in the general, abstract quality of programs</citetitle></ulink>. If your program is slow, it is likely going to make your users frustrated and unhappy, which will be a failure in your mission as a software developer. So it is important that your program is fast enough, if not very much so.
 </para>
 <para>
-My aim in this document was to explain the "why"'s, "what"'s and to a lesser extent "how"'s of optimization. I hope I was successful, and that people who read it will be more willing to optimize their software and more clueful in how to do so. 
+My aim in this document was to explain the "why"'s, "what"'s and to a lesser extent "how"'s of optimization. I hope I was successful, and that people who read it will be more willing to optimize their software and more clueful in how to do so.
 </para>
 
 </section>
Add a comment to this file

lib/docbook/4/pdf/PLACEHOLDER

Empty file added.

Add a comment to this file

lib/docbook/4/rtf/PLACEHOLDER

Empty file added.

lib/docbook/4/style/human-hacking-field-guide/style.css

 a:hover { background-color : palegreen; }
-body 
-{ 
+body
+{
     background:url(hhfg-bg-middle.png) #E5F0FA repeat-y top center;
     color:black;
     margin:0px;
 {
     display: none;
 }
-.itemizedlist ul.centralized 
-{ 
-    text-align: center; 
+.itemizedlist ul.centralized
+{
+    text-align: center;
     list-style-type : none;
     font-size: large;
 }

lib/docbook/4/xml/case-for-drug-legalisation.xml

 	<dc:rights><Agent><dc:title>Shlomi Fish</dc:title></Agent></dc:rights>
 	<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
 		</Work>
-		<License rdf:about="http://creativecommons.org/licenses/by/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/></License></rdf:RDF> -->                
+		<License rdf:about="http://creativecommons.org/licenses/by/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/></License></rdf:RDF> -->
             </para>
         </legalnotice>
 
                 <date>14 October 2005</date>
                 <authorinitials>shlomif</authorinitials>
                 <revremark>
-                    Forked the text from a previous document, and starting to 
+                    Forked the text from a previous document, and starting to
                     adapt it.
                 </revremark>
             </revision>
         Many people take the prohibition on the currently illegal narcotics
         (e.g: Marijuana, Cocaine, Heroine) for granted. They believe that
         just because the drugs are physically harmful, they should be banned.
-        Yet, this is very far from the fact. While drugs can be harmful, there 
+        Yet, this is very far from the fact. While drugs can be harmful, there
         is no good reason to make them illegal. In fact, the prohibition on
         drugs causes so many undesirable side-effects, that they
         <emphasis role="bold">must</emphasis> be made legal.
     </para>
     <para>
-        If this sounds fantastic to you - read on, I'm sure you'll find out 
+        If this sounds fantastic to you - read on, I'm sure you'll find out
         that I know what I'm saying.
     </para>
     <para>
         minority groups who hold this view. As a result, most people who
         believe they should choose between left, right or middle, think drug
         prohibition is acceptable on everybody. But this is not the case. The
-        prohibition on drugs is very harmful to the public and individual 
+        prohibition on drugs is very harmful to the public and individual
         well-being and must be eradicated as soon as possible.
     </para>
 </section>
     <title>The Morality of Drug Abuse</title>
     <para>
         A person has a basic right to harm himself, as long as he does not harm
-        others in the process. That's because everyone of us is the owner of 
+        others in the process. That's because everyone of us is the owner of
         his mind, body and property, and is solely responsible for their use
-        and abuse. 
+        and abuse.
     </para>
     <para>
-        All arguments that do not favour that, like that a person thus 
+        All arguments that do not favour that, like that a person thus
         contributes less to society, and becomes a burden on it are pretty
         silly. That's because a person is never obliged to contribute to
         society ("First, do not harm"), and the society at large is not
         are perfectly healthy people who just happen to have a drug problem,
         just like people who smoke, or are alcholics, or are
         addicted to caffeine have a drug problem. Otherwise, they are able
-        to function properly and be good citizens. There are no recorded 
+        to function properly and be good citizens. There are no recorded
         deaths from Marijuana in the U.S. The amount of deaths for Cocaine
-        is 20 per 100,000 (4 if we take into account such factors as its 
+        is 20 per 100,000 (4 if we take into account such factors as its
         reduced quality), and the deaths from Heroin are 400 per 100,000 (or
         80 if we take these factors into account). This is compared to 150
         deaths per 100,000 from Alcohol and 650 from Tobacco. Taking the
-        numbers into account, in the U.S. there used to be 390,000 deaths 
+        numbers into account, in the U.S. there used to be 390,000 deaths
         per year from Tobacco, 150,000 from Alcohol and only 400 from Heroin
         and 200 from Cocaine (and none from Marijuana).
         (<ulink url="http://www.cato.org/pubs/pas/pa121.html">Source</ulink>.)
     </para>
     <para>
-        Thus, legalising drugs, which would potentially make them more 
+        Thus, legalising drugs, which would potentially make them more
         common, will not be a hazard to the global health status of the
         population.
     </para>
     <para>
         The mere act of consuming illegal narcotics, usually does not cause
         one to commits crimes. While drugs affect the mind, a large
-        increase in drug consumption by itself will not cause a large 
+        increase in drug consumption by itself will not cause a large
         increase in the number of crimes committed.
     </para>
     <para>
             distributed and sold by local legitimate entities, who will be
             subject to Capitalistic market constraints. Their prices will
             drop to a minimum, allowing everybody to buy them at the
-            needed quantities. Criminals will no longer be able to make a 
+            needed quantities. Criminals will no longer be able to make a
             decent living from selling them in the black market (as there will
             be none.).
         </para>
             Law enforcement organisations attempt to stop drug trade by
             catching drug shipments, and drug dealers. However, any shipment
             or dealer that is caught, has only one effect: a temporary increase
-            in the price of drugs at the location to which they were intended. 
+            in the price of drugs at the location to which they were intended.
             Most drug shipments and transactions are never stopped, and it is
             a pointless struggle to try to stop them.
         </para>
             Quality of Drugs</title>
         <para>
             Illegal drugs are not sold in the free market and as a result the
-            sold good is subject to the whims of the local outlaw manufacturer 
+            sold good is subject to the whims of the local outlaw manufacturer
             or distributor. As a result, they often have reduced quality, which
             can cause a lot of unnecessary health side-effects on their users,
             including many deaths.
         </para>
         <para>
             During the prohibition on alcohol it was observed that the quality
-            of alcoholic beverages has heavily decreased, and the same thing 
+            of alcoholic beverages has heavily decreased, and the same thing
             happens now with the currently illegal drugs.
         </para>
     </section>
     <section id="arguments_for__causes_proliferation">
-        <title>The Prohibition on Drugs Causes Proliferation of 
+        <title>The Prohibition on Drugs Causes Proliferation of
         Drugs' Use</title>
         <para>
             People who become heavy drug users often need to find a way to
         <title>Slowdown of the Progress of Lower Sectors</title>
         <para>
             Drug dealing in a society where drugs are criminalised is
-            a way to make a lot of money. As a result, young people among 
+            a way to make a lot of money. As a result, young people among
             the poor find selling drugs an easy way to earn their living
             and escape the more demanding path of working in an honest job.
         </para>
         <para>
-            This causes a bad effect on the societies in poor neighbourhoods, 
+            This causes a bad effect on the societies in poor neighbourhoods,
             who turn to drug dealing instead of advancing their rank in the
             honest world. Making drugs legal will kill this easy way out, and
             force the young people of the poor to struggle for a honest living
     <section id="arguments_for__unholy_enemy">
         <title>Drug Users Serve as the "Unholy Enemy" of Society</title>
         <para>
-            There is a common pattern in history of "unholy enemies" - 
+            There is a common pattern in history of "unholy enemies" -
             groups of people who are presented by leaders to be of such
             evil nature that the general populace should be willing to
             sacrifice their lives, freedom or well-being to fight them.
-            These have been the Jews in Nazi Germany, and the Kafirs in 
+            These have been the Jews in Nazi Germany, and the Kafirs in
             Islam. In modern society, drug users now serve as an unholy
             enemy for which the government can undermine
             <ulink url="http://en.wikipedia.org/wiki/Liberalism">Liberalism</ulink>
             such as drug-induced theft.
         </para>
         <para>
-            These prisoners are a large strain on society which needs to 
+            These prisoners are a large strain on society which needs to
             support them. They also prevent more serious criminals from
             being jailed, which undermines the punishment and
             rehabilitation system of the government.
         <para>
             The legalisation of drugs will free the prisons from false
             criminals, and restore justice. And the lawful people will no
-            longer need to support hundreds of thousands of jailed drug users 
+            longer need to support hundreds of thousands of jailed drug users
             and dealers.
         </para>
     </section>
                 Note that you should feel free to link to this article, or
                 even quote its text, as long as you give attribution. (See
                 <ulink url="http://creativecommons.org/licenses/by/2.5/">its
-                    open-content, Creative Commons, licence for more 
+                    open-content, Creative Commons, licence for more
                     information.</ulink>
             </para>
         </listitem>
                 <emphasis role="bold">Contact Your Government</emphasis> -
                 write to your representatives and government, and tell them
                 why the prohibition on drugs is harmful and not justified. If
-                possible, vote for representatives that support the 
+                possible, vote for representatives that support the
                 legalisation of drugs.
             </para>
         </listitem>
                 <emphasis role="bold">Don't work against the cause</emphasis>
                 - if you're a drug-enforcing policeman, then switch to a
                 different department, or quit. If you're an agent of the
-                <ulink url="http://en.wikipedia.org/wiki/Drug_Enforcement_Administration">Drug 
-                    Enforcement Administration (DEA)</ulink> or a similar 
+                <ulink url="http://en.wikipedia.org/wiki/Drug_Enforcement_Administration">Drug
+                    Enforcement Administration (DEA)</ulink> or a similar
                 organisation - then quit.
             </para>
         </listitem>
         <listitem>
             <para>
-                Last, but not least - <emphasis role="bold">don't use illegal 
+                Last, but not least - <emphasis role="bold">don't use illegal
                     narcotics</emphasis>. They
                 have numerous bad medical effects, and using them reduces
-                your credibility as someone who can speak against their 
-                prohibition. 
+                your credibility as someone who can speak against their
+                prohibition.
             </para>
         </listitem>
     </orderedlist>
 
     <para>
-        By acting and propagating the understanding that drugs should 
+        By acting and propagating the understanding that drugs should
         be legalised, we can eventually create a strong, vibrant
         movement against the prohibition on drugs, that can eventually
         abolish it completely.
     <itemizedlist>
         <listitem>
             <para>
-                <ulink url="http://www.cato.org/pubs/pas/pa121.html">James 
-                    Ostrowski's "Thinking about Drug Legalization"</ulink> is an 
-                excellent and detailed article about the problems of drug 
+                <ulink url="http://www.cato.org/pubs/pas/pa121.html">James
+                    Ostrowski's "Thinking about Drug Legalization"</ulink> is an
+                excellent and detailed article about the problems of drug
                 prohibition.
             </para>
         </listitem>
         <listitem>
             <para>
-                The Wikipedia has an 
-                <ulink url="http://en.wikipedia.org/wiki/Prohibition_(drugs)">article 
-                    
-                    written on the Prohibition on drugs</ulink> from a hopefully 
+                The Wikipedia has an
+                <ulink url="http://en.wikipedia.org/wiki/Prohibition_(drugs)">article
+
+                    written on the Prohibition on drugs</ulink> from a hopefully
                 Neutral Point of View.
             </para>
         </listitem>
         <listitem>
             <para>
-                The web site 
-                <ulink url="http://www.drugwarfacts.org/">"Drug 
-                    War Facts"</ulink> was recommended to me by a 
+                The web site
+                <ulink url="http://www.drugwarfacts.org/">"Drug
+                    War Facts"</ulink> was recommended to me by a
                 libertarian correspondant. I didn't fully read it yet.
-            </para> 
+            </para>
         </listitem>
         <listitem>
             <para>
                 <ulink url="http://www.druglibrary.org/schaffer/">The Schaffer
                     Library of Drug Policy</ulink> is a comprehensive site for
-                support of the legalisation of drugs. It contains a 
-                <ulink url="http://www.druglibrary.org/schaffer/dea/">copy of 
-                    the Drug Enforcement Administration (DEA) site, with 
+                support of the legalisation of drugs. It contains a
+                <ulink url="http://www.druglibrary.org/schaffer/dea/">copy of
+                    the Drug Enforcement Administration (DEA) site, with
                     comments</ulink> and especially a step-by-step
-                <ulink url="http://www.druglibrary.org/schaffer/dea/pubs/legaliz/claims.htm">rebuttal of their "Speaking Out against Drug Legalisation" 
+                <ulink url="http://www.druglibrary.org/schaffer/dea/pubs/legaliz/claims.htm">rebuttal of their "Speaking Out against Drug Legalisation"
                     document</ulink>.
             </para>
         </listitem>

lib/docbook/4/xml/case-for-file-swapping-rev3.xml

 	<dc:rights><Agent><dc:title>Shlomi Fish</dc:title></Agent></dc:rights>
 	<dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
 		</Work>
-		<License rdf:about="http://creativecommons.org/licenses/by/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/></License></rdf:RDF> -->                
+		<License rdf:about="http://creativecommons.org/licenses/by/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/></License></rdf:RDF> -->
             </para>
         </legalnotice>
 
                 <date>14 October 2005</date>
                 <authorinitials>shlomif</authorinitials>
                 <revremark>
-                    Forked the text from a previous document, and starting to 
+                    Forked the text from a previous document, and starting to
                     adapt it. Tagged as CC-by 2.5
                 </revremark>
             </revision>
                     Corrected some errors (such as spelling, phrasing or
                     grammatical); added more discussion of why copying an
                     artwork is moral; added the merchandise way of making
-                    profit, the “Pirates of the Carriben” anecdote, 
+                    profit, the “Pirates of the Carriben” anecdote,
                     “Don’t Download this song”, and DRM and the Sony rootkit.
                 </revremark>
             </revision>
 <section id="introduction">
     <title>Introduction</title>
     <para>
-        The purpose of this article is to explain why Internet file 
+        The purpose of this article is to explain why Internet file
         swapping (of media such as music files, video files, etc.) is moral,
         ethical and should be legal. Plus, people who share files on the
         Internet or download them, must not be prosecuted.
     <section id="term_intellectual_property">
         <title>“Intellectual Property”</title>
         <para>
-            As noted by Richard Stallman, <ulink url="http://www.linux.com/archive/feature/39915">the term Intellectual property is a 
+            As noted by Richard Stallman, <ulink url="http://www.linux.com/archive/feature/39915">the term Intellectual property is a
                 seductive mirage</ulink>. Patents, Copyrights, and Trademarks
             are not equivalent to property, not even “intellectual” one.
             Furthermore, they shouldn’t be grouped together as they are
             treated differently according to law).
         </para>
         <para>
-            Some people claim that since a copyrighted work is 
-            “intellectual property”, then copying it is equivalent to 
+            Some people claim that since a copyrighted work is
+            “intellectual property”, then copying it is equivalent to
             “stealing”. But that is not the case here.
         </para>
     </section>
     <section id="term_stealing_theft">
         <title>“Stealing” or “Theft”</title>
         <para>
-            Copyright apologists like to say that copying a work that is 
-            copyrighted and was published to the public, is equivalent to 
+            Copyright apologists like to say that copying a work that is
+            copyrighted and was published to the public, is equivalent to
             “stealing” or “theft”. However, stealing involves taking tangible
             property without permission, and depriving the owner of one less
             instance of it. On the other hand, with a public work, we can
             make an unlimited number of copies, while not harming the original,
-            and while respecting the exclusive rights of the author for his 
+            and while respecting the exclusive rights of the author for his
             work. This is because we just copy it - we don’t claim it is ours.
         </para>
         <para>
         <orderedlist>