Commit 6ef0fb71 authored by Pierre Neidhardt's avatar Pierre Neidhardt
Browse files

MMD: init

parent 2641a399
.SUFFIXES: .html .md
HTMLC ?= multimarkdown -s
.PHONY: all
all: index.html \
LICENSE.html \
......@@ -15,7 +17,7 @@ all: index.html \
%.html: %.md header.html footer.html content.awk path.awk
awk -f path.awk -v path=$< header.html > $@
awk -f content.awk $< | markdown >> $@
awk -f content.awk $< | ${HTMLC} >> $@
awk -f path.awk -v path=$< footer.html >> $@
# This is for BSD make since it does not support patterns.
......
......@@ -11,52 +11,47 @@
<h1>Cinema Frivolities</h1>
</div>
<p>An insight of Hollywood:
<a href="http://www.writingmoviesforfunandprofit.com/">Writing movies for fun and profit</a>.</p>
<p>An insight of Hollywood: <em>Writing movies for fun and profit</em> (Thomas Lennon &amp; Robert Ben Garant, 2012)</p>
<p>Some movies written not following the aforementioned book:</p>
<p>Some random movies:</p>
<ul>
<li>12 angry men</li>
<li>A History of Violence</li>
<li>Abre los ojos (Open Your Eyes)</li>
<li>Analyze This</li>
<li>Atonement</li>
<li>Bakjwi (Thirst)</li>
<li>Before Sunrise</li>
<li>Before Sunset</li>
<li>Boyhood</li>
<li>Burried</li>
<li>Carnage</li>
<li>Chinjeolhan geumjassi (Lady Vengeance)</li>
<li>Chugyeogja (The Chaser)</li>
<li>Confessions</li>
<li>Confessions of a Dangerous Mind</li>
<li>Das Experiment (The Experiment)</li>
<li>Donnie Darko</li>
<li>Eastern Promises</li>
<li>Ed Wood</li>
<li>El laberinto del fauno (Pan's Labyrinth)</li>
<li>El laberinto del fauno (Pan&#8217;s Labyrinth)</li>
<li>Eyes wide shut</li>
<li>Jisatsu sâkuru (Suicide Club) and one interesting <a href="http://www.imdb.com/title/tt0312843/board/nest/189698427">decryption</a></li>
<li>Magnolia</li>
<li>Mr. Nobody</li>
<li>Mullholland Dr.</li>
<li>Stoker</li>
<li>The Imaginarium of Doctor Parnassus</li>
</ul>
<p>Other random movies:</p>
<ul>
<li>A History of Violence</li>
<li>Analyze This</li>
<li>Atonement</li>
<li>Boyhood</li>
<li>Carnage</li>
<li>Confessions</li>
<li>Eastern Promises</li>
<li>Falling Down</li>
<li>Gongdong gyeongbi guyeok JSA (J.S.A.: Joint Security Area)</li>
<li>Jisatsu sâkuru (Suicide Club) and one interesting <a href="http://www.imdb.com/title/tt0312843/board/nest/189698427">decryption</a></li>
<li>Joheunnom nabbeunnom isanghannom (The Good, the Bad, and the Weird)</li>
<li>L.A. Confidential</li>
<li>Madeo (Mother)</li>
<li>Magnolia</li>
<li>Mr. Nobody</li>
<li>Mullholland Dr.</li>
<li>My Cousin Vinny</li>
<li>Shallow Grave</li>
<li>Stoker</li>
<li>The Imaginarium of Doctor Parnassus</li>
<li>The Killer Inside Me</li>
<li>The Kings of Summer </li>
<li>The Kings of Summer</li>
<li>The Man from Earth</li>
<li>Wrong</li>
</ul>
......
# Cinema Frivolities --
Title: Cinema Frivolities --
latex input: ../mmd-preamble
An insight of Hollywood: *Writing movies for fun and profit* (Thomas Lennon & Robert Ben Garant, 2012)
......
......@@ -2,14 +2,17 @@ BEGIN {
title = ""
toc = ""
buf = ""
property = 0
}
# Convert level-1 section (only one #) to HTML title. If a double dash is found
# Convert the 'Title' property to HTML title. If a double dash is found
# (--), following part is a subtitle. If not, generate a default subtitle. To
# remove subtitle, add a '--' with nothing after it.
/^#[^#]/ {
NR == 1 && /^Title:/ {
property = 1
title = $0
sub("#+ *", "", title)
sub("^Title: *", "", title)
subtitle = title
sub(" *--.*", "", title)
sub(".*-- *", "", subtitle)
......@@ -24,14 +27,26 @@ BEGIN {
next
}
# Generate TOC from level-2 sections.
/^##[^#]/ {
property && /^ *$/ {
property = 0
next
}
property {
next
}
# Generate TOC from level-3 sections.
/^###[^#]/ {
link = $0
sub("#+ *", "", link)
name = link
gsub("[\"]", "", link)
gsub ("[^[:alpha:]-]", "", link)
link = tolower (link)
toc = toc "<a href=\"#" link "\">" name "</a>\n"
gsub ("$", " <a name=\"" link "\"></a>")
# gsub ("$", " <a name=\"" link "\"></a>")
}
{
......
......@@ -13,17 +13,17 @@
</div>
<div id="menu" class="entry">
<a href="#About">About</a>
<a href="#Preview">Preview</a>
<a href="#Scenario">Scenario</a>
<a href="#Features">Features</a>
<a href="#Dependencies">Dependencies</a>
<a href="#History">History</a>
<a href="#Links">Links</a>
<a href="#about">About</a>
<a href="#preview">Preview</a>
<a href="#scenario">Scenario</a>
<a href="#features">Features</a>
<a href="#dependencies">Dependencies</a>
<a href="#history">History</a>
<a href="#links">Links</a>
</div>
<h2>About <a name="About"></a></h2>
<h3 id="about">About</h3>
<p>Demlo organizes your music library automatically and dynamically. It runs a
chain of user-defined scripts using variables such as tags and file properties.
......@@ -31,9 +31,9 @@ This way it yields virtually unlimited customization power to the user.</p>
<p>It is free and open source, powered by Lua and FFmpeg.</p>
<h2>Preview <a name="Preview"></a></h2>
<h3 id="preview">Preview</h3>
<p>Here follows a sample output showing the 'before-after' differences.</p>
<p>Here follows a sample output showing the &#8216;before-after&#8217; differences.</p>
<pre><code>$ demlo fantasie_impromptu.flac
:: Config [/home/johndoe/.config/demlo/demlorc]
......@@ -59,18 +59,18 @@ This way it yields virtually unlimited customization power to the user.</p>
[/home/johndoe/music/Chopin/The Best Ever Piano Classics (John Doe, 2014)/Fantasie-Impromptu in C Sharp Minor, Op. 66.ogg]
</code></pre>
<h2>Scenario <a name="Scenario"></a></h2>
<h3 id="scenario">Scenario</h3>
<ul>
<li>No folder structure.</li>
<li>Tags are not homogeneous, some entries are filled, other not, it varies from file to file.</li>
<li>Some files have bad audio quality.</li>
<li>Audio codecs are not always the same. Some file are CBR/VBR, lossless/lossy, ...</li>
<li>mp3's ID3 tags are a nightmare.</li>
<li>Audio codecs are not always the same. Some file are CBR/VBR, lossless/lossy, &#8230;</li>
<li>mp3&#8217;s ID3 tags are a nightmare.</li>
<li>Covers are sometimes embedded in tags, others are of terrible quality.</li>
</ul>
<h2>Features <a name="Features"></a></h2>
<h3 id="features">Features</h3>
<p>A few scripts are already provided and they give a good example of what you can
do. You can choose to use them, to rewrite them, or to write a new script from
......@@ -80,7 +80,7 @@ can be chained: this feature makes Demlo extremely flexible and powerful!</p>
<ul>
<li><p>Move all files according to a unique, yet dynamic folder hierarchy. For
instance, setting</p>
instance, setting</p>
<pre><code>output.filename = table.concat {library, '/', o.artist, '/',
not empty (o.album) and (empty (o.date) and o.album .. '/' or o.date .. ' - ' .. o.album .. '/') or '',
......@@ -96,16 +96,16 @@ instance, setting</p>
<li><code>~/music/John Doe/01 - Intro.ogg</code> if there is no album.</li>
</ul></li>
<li><p>Case checking: a powerful script that will turn everything to title case. It supports special cases such as Roman numerals, McDonald, etc. It also supports a list of exceptions (e.g. AC-DC, DJ, feat., etc.).</p></li>
<li>Encoding: you can conditionally re-encode you files, so you can choose to only re-encode files with some particular encoding settings. You can set the desired bitrate, etc.</li>
<li>Covers: automatically remove embedded covers, remove duplicates, remove files beyond/below a quality threshold, etc.</li>
<li>Different kinds of music: classical, OST, and band musics have usually different kinds of tags and folder structures. You can manage different audio libraries easily by setting the corresponding "library" variables.</li>
<li>Edit tags of a file set with your favorite text editor.</li>
<li>Support for cue sheets. (Both external and embedded.)</li>
<li>Demlo can be interfaced with any other program, both ways. (X calls Demlo or Demlo calls X.)</li>
<li>MusicBrainz support for online tagging and cover fetching.</li>
<li><p>Encoding: you can conditionally re-encode you files, so you can choose to only re-encode files with some particular encoding settings. You can set the desired bitrate, etc.</p></li>
<li><p>Covers: automatically remove embedded covers, remove duplicates, remove files beyond/below a quality threshold, etc.</p></li>
<li><p>Different kinds of music: classical, OST, and band musics have usually different kinds of tags and folder structures. You can manage different audio libraries easily by setting the corresponding &#8220;library&#8221; variables.</p></li>
<li><p>Edit tags of a file set with your favorite text editor.</p></li>
<li><p>Support for cue sheets. (Both external and embedded.)</p></li>
<li><p>Demlo can be interfaced with any other program, both ways. (X calls Demlo or Demlo calls X.)</p></li>
<li><p>MusicBrainz support for online tagging and cover fetching.</p></li>
</ul>
<h2>Dependencies <a name="Dependencies"></a></h2>
<h3 id="dependencies">Dependencies</h3>
<p>This program is completely written in Lua. Its only major dependency is FFmpeg.
A few Lua modules are required, which should not eat more than a few KiB on your
......@@ -115,8 +115,9 @@ program.</p>
<ul>
<li>Chromaprint: audio fingerprinting needed for online queries (optional)</li>
<li>FFmpeg: tagging, transcoding</li>
<li>Lua (>= 5.1)</li>
<li>Lua ( 5.1)</li>
<li>Lua modules:
<ul>
<li>dkjson: index support</li>
<li>filesystem: walking folders</li>
......@@ -126,7 +127,7 @@ program.</p>
</ul></li>
</ul>
<h2>History <a name="History"></a></h2>
<h3 id="history">History</h3>
<p>This program is based on <a href="http://bitbucket.org/ambrevar/musish">Musish</a> by the
same author. The original program was written in POSIX shell but suffured from
......@@ -144,7 +145,7 @@ into others, however scripts can be chained. (Which is a saner design.)</p></li>
<li><p>All tags are processed dynamically, no more hard-coded tags.</p></li>
</ul>
<h2>Links <a name="Links"></a></h2>
<h3 id="links">Links</h3>
<ul>
<li><a href="https://bitbucket.org/ambrevar/demlo/downloads">Sources</a></li>
......
# Demlo -- A dynamic and extensible music library organizer
Title: Demlo -- A dynamic and extensible music library organizer
latex input: ../mmd-preamble
## About
### About
Demlo organizes your music library automatically and dynamically. It runs a
chain of user-defined scripts using variables such as tags and file properties.
......@@ -8,7 +9,7 @@ This way it yields virtually unlimited customization power to the user.
It is free and open source, powered by Lua and FFmpeg.
## Preview
### Preview
Here follows a sample output showing the 'before-after' differences.
......@@ -35,7 +36,7 @@ Here follows a sample output showing the 'before-after' differences.
:: Destination
[/home/johndoe/music/Chopin/The Best Ever Piano Classics (John Doe, 2014)/Fantasie-Impromptu in C Sharp Minor, Op. 66.ogg]
## Scenario
### Scenario
* No folder structure.
* Tags are not homogeneous, some entries are filled, other not, it varies from file to file.
* Some files have bad audio quality.
......@@ -43,7 +44,7 @@ Here follows a sample output showing the 'before-after' differences.
* mp3's ID3 tags are a nightmare.
* Covers are sometimes embedded in tags, others are of terrible quality.
## Features
### Features
A few scripts are already provided and they give a good example of what you can
do. You can choose to use them, to rewrite them, or to write a new script from
......@@ -60,6 +61,7 @@ can be chained: this feature makes Demlo extremely flexible and powerful!
o.title}
will move `john doe - 1. intro.ogg` to
* `~/music/John Doe/2013 - Great Album/01 - Intro.ogg` if there is an album and a date,
* `~/music/John Doe/Great Album/01 - Intro.ogg` if there is an album and no date,
* `~/music/John Doe/01 - Intro.ogg` if there is no album.
......@@ -73,7 +75,7 @@ can be chained: this feature makes Demlo extremely flexible and powerful!
* Demlo can be interfaced with any other program, both ways. (X calls Demlo or Demlo calls X.)
* MusicBrainz support for online tagging and cover fetching.
## Dependencies
### Dependencies
This program is completely written in Lua. Its only major dependency is FFmpeg.
A few Lua modules are required, which should not eat more than a few KiB on your
......@@ -82,7 +84,7 @@ program.
* Chromaprint: audio fingerprinting needed for online queries (optional)
* FFmpeg: tagging, transcoding
* Lua (>= 5.1)
* Lua ( 5.1)
* Lua modules:
* dkjson: index support
* filesystem: walking folders
......@@ -90,7 +92,7 @@ program.
* penlight.lapp: commandline arguments processing
* slnunicode: unicode support
## History
### History
This program is based on [Musish](http://bitbucket.org/ambrevar/musish) by the
same author. The original program was written in POSIX shell but suffured from
......@@ -109,7 +111,7 @@ into others, however scripts can be chained. (Which is a saner design.)
* All tags are processed dynamically, no more hard-coded tags.
## Links
### Links
* [Sources](https://bitbucket.org/ambrevar/demlo/downloads)
* [Arch Linux package (AUR)](https://aur.archlinux.org/packages/demlo/)
......
......@@ -8,15 +8,15 @@
</head>
<body>
<div id="header">
<h1>Go: A Short Review</h1>
<h1>Go: A Short Review </h1>
<p id="subtitle"><a href="../index.html">by Pierre Neidhardt</a></p>
</div>
<div id="menu" class="entry">
<a href="#Official documentation">Official documentation</a>
<a href="#Pros">Pros</a>
<a href="#Cons and debatable points">Cons and debatable points</a>
<a href="#Conclusion">Conclusion</a>
<a href="#officialdocumentation">Official documentation</a>
<a href="#pros">Pros</a>
<a href="#consanddebatablepoints">Cons and debatable points</a>
<a href="#conclusion">Conclusion</a>
</div>
......@@ -24,7 +24,7 @@
whether I consider them as strong points or debatable decisions.
This is not an argumentation, simply my plain opinion.</p>
<h2>Official documentation <a name="Official documentation"></a></h2>
<h3 id="officialdocumentation">Official documentation</h3>
<p>The <a href="https://golang.org/doc/">official documentation</a> is fairly complete and
well organized. It is recommended to go through the following documentation, in
......@@ -41,7 +41,7 @@ the language. It features a few challenging exercises. One of them is a virtual
web-crawler: the challenge is to implement a recursive goroutine that needs to
synchronize with all its instances. <a href="crawler.go">Here</a> is my suggested solution.</p>
<h2>Pros <a name="Pros"></a></h2>
<h3 id="pros">Pros</h3>
<ul>
<li><p>Almost no <em>dark corners</em> (see below).</p></li>
......@@ -54,7 +54,7 @@ opening curly brace <em>must</em> be on the same line, one-line control structur
<pre><code>if _, status := f(); status { ...
</code></pre></li>
<li><p>Universal UTF-8 support.</p></li>
<li><p>Universal UTF&#8211;8 support.</p></li>
<li><p>Strong typing. Type names are clear, size can be relative or absolute (e.g.
<code>int</code> or <code>int8</code>), <code>char</code> is now <code>byte</code> which makes more sense, <code>rune</code> is used
for unicode characters.</p></li>
......@@ -75,8 +75,8 @@ Lua.</p></li>
<li><p>Multiple return values are supported. This is a big plus for error management.</p></li>
<li><p>No exceptions (in general): very big plus for error management.</p></li>
<li><p>The <code>defer</code> keyword: an elegant <code>goto</code> that allows execution of code before a
function returns (such as closing file descriptor). It is essential to write
clear and clean code for terminating a function properly.</p></li>
function returns (such as closing file descriptor). It is essential to write
clear and clean code for terminating a function properly.</p></li>
<li><p>Package import is as simple as it can be, as is the hierarchy of projects. No
<code>protected</code> members, no headers, function order does not matter, and so on.</p></li>
<li><p>Performance: Go is a serious competitor to C and Fortran!</p></li>
......@@ -124,23 +124,23 @@ tests.</p></li>
</ul></li>
</ul>
<h2>Cons and debatable points <a name="Cons and debatable points"></a></h2>
<h3 id="consanddebatablepoints">Cons and debatable points</h3>
<ul>
<li><p>Debugging capabilities are yet to improve. (To be confirmed.)</p></li>
<li><p>There is an odd semantic part of the language: the <code>switch type</code>. It allows
for type introspection. This seems out of place to me. A <code>type()</code> function in
the <code>introspection</code> package may have been more appropriate.</p></li>
for type introspection. This seems out of place to me. A <code>type()</code> function in
the <code>introspection</code> package may have been more appropriate.</p></li>
<li><p>Go has no operator overloading ability. This has lead to long debates and it
is hard to tell what the right choice. It makes Go not so convenient to write
code for big numbers and matrices.</p></li>
is hard to tell what the right choice. It makes Go not so convenient to write
code for big numbers and matrices.</p></li>
<li><p>The Go standard library boasts a simple and elegant design overall: only the
most useful and hard to implement methods are present. The rest can be easily
implemented if needs be, possibly using those initial methods.
However, a few packages could have been made simpler, perhaps.</p></li>
most useful and hard to implement methods are present. The rest can be easily
implemented if needs be, possibly using those initial methods.
However, a few packages could have been made simpler, perhaps.</p></li>
</ul>
<h2>Conclusion <a name="Conclusion"></a></h2>
<h3 id="conclusion">Conclusion</h3>
<p>In my opinion Go is a versatile language that is suitable to most contexts. One
exception would be very low-level programming with important memory constraints
......@@ -156,7 +156,7 @@ extremely efficient.</p>
the lack of operator overloading might be detrimental, though it is yet to be
confirmed.</p>
<p>Go's main goal is not expressiveness though: languages such as Lua and Lisp are
<p>Go&#8217;s main goal is not expressiveness though: languages such as Lua and Lisp are
much more capable on this field thanks to a powerful introspection design. This
quality can be treacherous though and I would not recommend it for a team
development: the risk to write unreadable code is too big. The lack of
......
# Go: A Short Review
Title: Go: A Short Review
latex input: ../mmd-preamble
This article relates my opinion on some features of the Go programming language,
whether I consider them as strong points or debatable decisions.
This is not an argumentation, simply my plain opinion.
## Official documentation
### Official documentation
The [official documentation](https://golang.org/doc/) is fairly complete and
well organized. It is recommended to go through the following documentation, in
......@@ -21,7 +22,7 @@ the language. It features a few challenging exercises. One of them is a virtual
web-crawler: the challenge is to implement a recursive goroutine that needs to
synchronize with all its instances. [Here](crawler.go) is my suggested solution.
## Pros
### Pros
* Almost no *dark corners* (see below).
......@@ -86,45 +87,45 @@ simplest concurrent programming experience I had. A warmly welcomed feature.
* Distribution tools: `go` can download source packages, compile, install and
execute.
* It is possible to run go files with `go run` just as if it were an
interpreter. The source file actually gets compiled and the resulting
executable gets deleted upon termination.
* It is possible to run go files with `go run` just as if it were an
interpreter. The source file actually gets compiled and the resulting
executable gets deleted upon termination.
* `go build` analyses the imports: for every package that is not to be found
locally, it will automatically download it if it is a URL, then compile and
install. Various version control systems such as *git* and *Mercurial* are
supported. In a way, `go` is also a package manager (like Luarocks, pip,
rubygems, etc.). Having a standard package manager is a big advantage for
centralizing community contributions. The lack of such a tool has long been
a flaw for Lua.
* `go build` analyses the imports: for every package that is not to be found
locally, it will automatically download it if it is a URL, then compile and
install. Various version control systems such as *git* and *Mercurial* are
supported. In a way, `go` is also a package manager (like Luarocks, pip,
rubygems, etc.). Having a standard package manager is a big advantage for
centralizing community contributions. The lack of such a tool has long been
a flaw for Lua.
* `go` only compiles source files that are more recent than binaries. Farewell,
Makefiles! Something less to care about.
* `go` only compiles source files that are more recent than binaries. Farewell,
Makefiles! Something less to care about.
* `go` links statically by default. It is quite reverse to the current trend.
See [cat-v.org](http://harmful.cat-v.org/software/dynamic-linking/) and
[here](http://port70.net/~nsz/32_dynlink.html) for an (anti-)rationale.
* `go` links statically by default. It is quite reverse to the current trend.
See [cat-v.org](http://harmful.cat-v.org/software/dynamic-linking/) and
[here](http://port70.net/~nsz/32_dynlink.html) for an (anti-)rationale.
* A Go tree is very simple:
* A Go tree is very simple:
/bin
/pkg/<arch>/<source|author>/<packages>.a ## static libs
/src/<source|author>/<packages>.go
* `gofmt` is an automatic code formatter. The fact that it is part of the
standard distribution ensure some universality in style. It puts an end to
never-ending debates on style issues that have no right solution.
* `gofmt` is an automatic code formatter. The fact that it is part of the
standard distribution ensure some universality in style. It puts an end to
never-ending debates on style issues that have no right solution.
* `godoc` is a simple yet powerful documentation system. The lack of markup
makes it easier to use.
* `godoc` is a simple yet powerful documentation system. The lack of markup
makes it easier to use.
* `go test` is a testing system. Again, very simple: run `go test` over a
package and every filename ending in `_test.go` will be run. This also keeps
the file hierarchy simple (a `tests` subfolder is enough). Having this part
of the standard distribution makes it easier and more automatic to integrate
tests.
* `go test` is a testing system. Again, very simple: run `go test` over a
package and every filename ending in `_test.go` will be run. This also keeps
the file hierarchy simple (a `tests` subfolder is enough). Having this part
of the standard distribution makes it easier and more automatic to integrate
tests.
## Cons and debatable points
### Cons and debatable points
* Debugging capabilities are yet to improve. (To be confirmed.)
......@@ -141,7 +142,7 @@ execute.
implemented if needs be, possibly using those initial methods.
However, a few packages could have been made simpler, perhaps.
## Conclusion
### Conclusion
In my opinion Go is a versatile language that is suitable to most contexts. One
exception would be very low-level programming with important memory constraints
......
# Homogeneous Coordinates: A Concrete Explanation
Title: Homogeneous Coordinates: A Concrete Explanation
latex input: ../mmd-preamble
Coming soon.
......@@ -8,19 +8,19 @@
</head>
<body>
<div id="header">
<h1>Indentation: A Rationale</h1>
<h1>Indentation: A Rationale </h1>
<p id="subtitle"><a href="../index.html">by Pierre Neidhardt</a></p>
</div>
<div id="menu" class="entry">
<a href="#Rationale">Rationale</a>
<a href="#The Go example">The Go example</a>
<a href="#A solution">A solution</a>
<a href="#Tabulations">Tabulations</a>
<a href="#Alignment">Alignment</a>
<a href="#Tools">Tools</a>
<a href="#Algorithm">Algorithm</a>
<a href="#References">References</a>
<a href="#rationale">Rationale</a>
<a href="#thegoexample">The Go example</a>
<a href="#asolution">A solution</a>
<a href="#tabulations">Tabulations</a>
<a href="#alignment">Alignment</a>
<a href="#tools">Tools</a>
<a href="#algorithm">Algorithm</a>
<a href="#references">References</a>
</div>
......@@ -48,7 +48,7 @@ however I would like to point out how simple measures taken right from the
inception of a programming language can help reducing all the hassle the
indentation question creates.</p>
<h2>Rationale <a name="Rationale"></a></h2>
<h3 id="rationale">Rationale</h3>
<p>Main arguments:</p>
......@@ -65,19 +65,19 @@ indentation question creates.</p>
<li>The indentation engine should be short and simple.</li>
</ul>
<h2>The Go example <a name="The Go example"></a></h2>
<h3 id="thegoexample">The Go example</h3>
<p>Let us consider the Go language (first issued in 2010). The official
implementation ships with an indentation/formatting tool called <code>gofmt</code>. From the
<a href="http://blog.golang.org/go-fmt-your-code">official website</a>:</p>
<blockquote>
<p>Gofmt'd code is:</p>
<p>Gofmt&#8217;d code is:</p>
<ul>
<li>easier to write: never worry about minor formatting concerns while hacking away,</li>
<li>easier to read: when all code looks the same you need not mentally convert others' formatting style into something you can understand.</li>
<li>easier to maintain: mechanical changes to the source don't cause unrelated changes to the file's formatting; diffs show only the real changes.</li>
<li>easier to read: when all code looks the same you need not mentally convert others&#8217; formatting style into something you can understand.</li>
<li>easier to maintain: mechanical changes to the source don&#8217;t cause unrelated changes to the file&#8217;s formatting; diffs show only the real changes.</li>
<li>uncontroversial: never have a debate about spacing or brace position ever again!</li>
</ul>
</blockquote>
......@@ -107,7 +107,7 @@ it will not</p>
<ul>
<li><p>Comment style is extremely varied, and there is no clear winner. <code>gofmt</code> is a
<em>standard</em> tool, and as such it does not claim to impose a comment style.</p></li>
<li><p>Line splitting depends on line width (which value is left to the programmer's
<li><p>Line splitting depends on line width (which value is left to the programmer&#8217;s
choice), and <em>where it feels right</em>. This can obviously not be determined
computationally. So it seems wise not to touch it. However it does merge multiple
empty lines between two comments. I am not sure why it is being inconsistent here.</p></li>
......@@ -126,37 +126,37 @@ sections.</p></li>
<ul>
<li><blockquote>
<p>Readability matters. Code is read more than it is written.</p>
<p>Readability matters. Code is read more than it is written.</p>
</blockquote>
<p>The choice of style for indentation and token spacing is good enough: it is
close to K&amp;R, a style which has been widely accepted and source of inspiration
for many other styles.</p></li>
<li><blockquote>