Permalink
Browse files

Better biblio

  • Loading branch information...
1 parent dd03ed8 commit 8ecf96bc827bbed194c4a93a83cbf4d5741bf938 @miekg miekg committed Mar 10, 2012
Showing with 58 additions and 77 deletions.
  1. +2 −2 about-miekg.tex
  2. +1 −1 ex-communication/src/proc.pl
  3. +1 −1 ex-functions/ex-map.tex
  4. +4 −2 go-beyond.tex
  5. +4 −4 go-channels.tex
  6. +2 −2 go-communication.tex
  7. +2 −1 go-functions.tex
  8. +1 −1 go-interfaces.tex
  9. +0 −1 go-packages.tex
  10. +41 −62 go.bib
View
@@ -4,8 +4,8 @@
\end{center}
\end{wrapfigure}
Miek Gieben has a master's degree in Computer Science from the Radboud University Nijmegen (Netherlands).
-He is involved in the development and now the deployment of the DNSSEC protocol \cite{RFC4033,RFC4034,RFC4035} --
-the succesor of the DNS and as such co-authored \cite{RFC4641}.
+He is involved in the development and now the deployment of the DNSSEC protocol --
+the successor of the DNS and as such co-authored \cite{RFC4641}.
After playing with the language Erlang, Go was the first concurrent language
that actually stuck with him.
@@ -1,6 +1,6 @@
#!/usr/bin/perl -l
my (%child, $pid, $parent);
-my @ps=`ps -e -opid,ppid,comm`; # Capture the ouput from `ps`
+my @ps=`ps -e -opid,ppid,comm`; # Capture the output from `ps`
foreach (@ps[1..$#ps]) { # Discard the header line
($pid, $parent, undef) = split; # Split the line, discard 'comm'
push @{$child{$parent}}, $pid; # Save the child PIDs on a list
View
@@ -5,7 +5,7 @@
each member in the list and a new list containing
these calculated values is returned.
Thus:
-$$ map(f(), (a_1,a_2,\ldots,a_{n-1},a_n)) = (f(a_1), f(a_2),\ldots,f(a_{n-1}), f(a_n)) $$
+$$ \mathrm{map}(f(), (a_1,a_2,\ldots,a_{n-1},a_n)) = (f(a_1), f(a_2),\ldots,f(a_{n-1}), f(a_n)) $$
\Question \label{ex:map function q1} Write a simple
\func{map()}-function in Go. It is sufficient
for this function only to work for ints.
View
@@ -63,7 +63,7 @@ \subsection{Allocation with new}
a newly allocated zero value of type \type{T}. This is important to
remember:
\begin{lbar}[]
-\key{new} returns \emph{pointers}.
+\key{new} returns a \emph{pointer}.
\end{lbar}
This
@@ -225,10 +225,12 @@ \section{Defining your own types}
An example would be when we want record somebody's name (\type{string})
and age (\type{int}) in a single structure and make it a new type:
\lstinputlisting[label=src:struct,caption=Structures]{src/struct.go}
+\needspace{5\baselineskip}
Apropos, the output of \lstinline{fmt.Printf("%v\n", a)} is
\begin{display}
&\{Pete 42\}
\end{display}
+
That is nice!
Go knows how to print your structure. If you
only want to print one, or a few, fields of the structure you'll
@@ -296,7 +298,7 @@ \subsection{Methods}
\begin{quote}
If \type{x} is
addressable and \lstinline{&x}'s method set contains \func{m},
-\lstinline{x.m()} is shorthand for \lstinline{(&x).m()}.
+\lstinline{x.m()} is shorthand for \mbox{\lstinline{(&x).m()}}.
\end{quote}
In the above case this means that the following is \emph{not} an
error:
View
@@ -164,8 +164,8 @@ \section{More on channels}
\index{channel!non-blocking read}
\index{channel!non-blocking write}
-Although reads from channels block, you can perform an
-non-blocking read with the following syntax: \todo{Still need to test this.}
+Although reads from channels block, you can perform a non-blocking read
+with the following syntax: \todo{Still need to test this.}
\begin{lstlisting}
x, ok = <-ch
\end{lstlisting}
@@ -179,13 +179,13 @@ \section{More on channels}
\left\{
\begin{array}{ll}
value == 0 & \rightarrow \textrm{unbuffered (blocking)} \\
-value > 0 & \rightarrow \textrm{buffered (non-blocking) up to \emph{value} elements)}
+value > 0 & \rightarrow \textrm{buffer \emph{value} elements (non-blocking)}
\end{array}
\right.
$$
\subsection{Closing channels}
-%% section needs to be written
+\todo{section needs to be written}
\section{Exercises}
\input{ex-channels/ex-for-channels.tex}
View
@@ -6,7 +6,7 @@
\section{Files and directories}
Reading from (and writing to) files is easy in Go. This program
only uses the \package{os} package to read data from the file \file{/etc/passwd}.
-\lstinputlisting[caption=Reading from a file (unbufferd),label=src:read]{src/file.go}
+\lstinputlisting[caption=Reading from a file (unbuffered),label=src:read]{src/file.go}
\showremarks
If you want to use \first{buffered}{buffered} IO there is the
\package{bufio}\index{package!bufio} package:
@@ -86,7 +86,7 @@ \section{Executing commands}
import "exec"
cmd := exec.Command("/bin/ls", "-l")
-buf, err := cmd.Ouput() |\coderemark{\var{buf} is a (\type{[]byte})}|
+buf, err := cmd.Output() |\coderemark{\var{buf} is a (\type{[]byte})}|
\end{lstlisting}
\section{Networking}
View
@@ -169,6 +169,7 @@ \section{Named result parameters}
In the following example we declare a simple function which calculates
\gomarginpar{Some text in this section comes from \cite{go_intro}.} % layout
the factorial value of a value \var{x}.
+\needspace{9\baselineskip}
\begin{lstlisting}
func Factorial(x int) int { |\coderemark{\texttt{func Factorial(x int) (int)} is also OK}|
if x == 0 {
@@ -353,7 +354,6 @@ \section{Callbacks}
\begin{lstlisting}
func printit(x int) { |\coderemark{Function returns nothing}|
fmt.Print("%v\n", x) |\coderemark{Just print it}|
-
}
\end{lstlisting}
The signature of this function is: \lstinline{func printit(int)}, or
@@ -371,6 +371,7 @@ \section{Panic and recovering}
Instead it uses a panic-and-recover mechanism. It is worth remembering that you should use this as
a last resort, your code will not look, or be, better if it is littered with panics. It's a powerful tool:
use it wisely. So, how do you use it?
+\todo{Create example code.}
The following description was taken from \cite{go_blog_panic}:
\begin{description}
View
@@ -216,7 +216,7 @@ \subsection{Methods on interface types}
var buf bytes.Buffer
io.Copy(buf, os.Stdin)
\end{lstlisting}
-Would copy standard input into a copy of \var{buf}, not into \var{buf} itself.
+would copy standard input into a copy of \var{buf}, not into \var{buf} itself.
This is almost never the desired behavior.
\end{lbar}
View
@@ -44,7 +44,6 @@
We get an error when compiling, because we are trying to use a
\emph{private} function:
\begin{display}
-# _/myeven
myeven.go:10: cannot refer to unexported name even.odd
\end{display}
View
103 go.bib
@@ -1,21 +1,21 @@
@misc{go_web,
- author = "Go Authors",
+ author = "{G}o Authors",
howpublished = {\url{http://golang.org/}},
- title = "Go website",
+ title = "{G}o website",
year = 2010
}
@misc{go_tutorial,
- author = "Go Authors",
+ author = "{G}o Authors",
howpublished = {\url{http://golang.org/doc/go_tutorial.html}},
- title = "Go tutorial",
+ title = "{G}o tutorial",
year = 2010
}
@misc{effective_go,
- author = "Go Authors",
+ author = "{G}o Authors",
howpublished = {\url{http://golang.org/doc/effective_go.html}},
- title = "Effective Go",
+ title = "{E}ffective {G}o",
year = 2010
}
@@ -41,50 +41,50 @@ @misc{bubblesort
}
@misc{go_nuts,
- author = "Go Community",
- title = "Go Nuts mailing list",
+ author = "{G}o Community",
+ title = "{G}o Nuts mailing list",
howpublished = {\url{http://groups.google.com/group/golang-nuts}},
year = 2010
}
@misc{go_spec,
- author = "Go Authors",
- title = "Go language specification",
+ author = "{G}o Authors",
+ title = "{G}o language specification",
howpublished = { \url{http://golang.org/doc/go_spec.html}},
year = 2010
}
@misc{go_interfaces,
author = "Ian Lance Taylor",
- title = "Go interfaces",
+ title = "{G}o interfaces",
howpublished = {\url{http://www.airs.com/blog/archives/277}},
year = 2010
}
@misc{go_intro,
author = "Mark C. Chu-Carroll",
- title = "Google's new language: Go",
+ title = "{G}oogle's new language: Go",
howpublished = {\url{http://scienceblogs.com/goodmath/2009/11/googles_new_language_go.php}},
year = 2010
}
@misc{go_doc,
- author = "Go Authors",
- title = "Go package documentation",
+ author = "{G}o Authors",
+ title = "{G}o package documentation",
howpublished = {\url{http://golang/doc/pkg/}},
year = 2010
}
@misc{go_cpp,
- author = "Go Authors",
- title = "Go for C++ programmers",
+ author = "{G}o Authors",
+ title = "{G}o for {C}++ programmers",
howpublished = {\url{http://golang.org/doc/go_for_cpp_programmers.html}},
year = 2010
}
@misc{go_blog,
- author = "Go Authors",
- title = "The Go programming language blog",
+ author = "{G}o Authors",
+ title = "The {G}o programming language blog",
howpublished = {\url{http://blog.golang.org/}},
year = 2010
}
@@ -106,26 +106,26 @@ @misc{scala
@misc{c,
author = "Dennis Ritchie, Brian Kernighan",
- title = "The C Programming Language",
+ title = "The {C} Programming Language",
year = 1975
}
-@misc{c++,
+@misc{C++,
author = "Bjarne Stroustrup",
- title = "The C++ programming language",
+ title = "The {C}++ programming language",
year = 1983
}
@misc{java,
title = "Java",
- author = "James Gosling et al",
+ author = "James {G}osling et al",
howpublished = {\url{http://oracle.com/java/}},
year = 1995
}
@misc{perl,
title = "Perl",
- author = "Larray Wall et al",
+ author = "Larry Wall et al",
howpublished = {\url{http://perl.org/}},
year = 1987
}
@@ -138,8 +138,8 @@ @misc{haskell
}
@misc{go_youtube,
- author = "Go Authors",
- title = "Go Youtube channel",
+ author = "{G}o Authors",
+ title = "{G}o Youtube channel",
howpublished = {\url{http://youtube.com/gocoding/}},
year = 2010
}
@@ -203,68 +203,68 @@ @misc{iota
@misc{fizzbuzz,
author = "Imran On Tech",
- title = "Using FizzBuzz to find developers who grok coding",
+ title = "Using FizzBuzz to find developers...",
howpublished =
{\url{http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/}},
year = 2010
}
@misc{go_course_day2,
author = "Rob Pike",
- title = "The Go programming language, day 2",
- howpublished = {\url{http://golang.org/doc/GoCourseDay2.pdf}},
+ title = "The {G}o programming language, day 2",
+ howpublished = {\url{http://golang.org/doc/{G}oCourseDay2.pdf}},
year = 2010
}
@misc{go_course_day3,
author = "Rob Pike",
- title = "The Go programming language, day 3",
- howpublished = {\url{http://golang.org/doc/GoCourseDay3.pdf}},
+ title = "The {G}o programming language, day 3",
+ howpublished = {\url{http://golang.org/doc/{G}oCourseDay3.pdf}},
year = 2010
}
@misc{go_nuts_interfaces,
- author = "Go Community (SnakE in particular)",
+ author = "{G}o Community",
title = "Function accepting a slice of interface types",
howpublished =
{\url{http://groups.google.com/group/golang-nuts/browse_thread/thread/225fad3b5c6d0321}},
year = 2010
}
-# Go issues
+# {G}o issues
@misc{go_issue_65,
- author = "Go Community",
- title = "Go Issue 65: Compiler can't spot guaranteed return in if statement",
+ author = "{G}o Community",
+ title = "{G}o Issue 65: Compiler can't spot guaranteed return in if statement",
howpublished =
{\url{http://code.google.com/p/go/issues/detail?id=65}},
year = 2010
}
@misc{go_blog_panic,
- author = "Go Authors",
+ author = "{G}o Authors",
title = "Defer, Panic, and Recover",
howpublished =
{\url{http://blog.golang.org/2010/08/defer-panic-and-recover.html}},
year = 2010
}
@misc{go_faq,
- author = "Go Authors",
- title = "Go FAQ",
+ author = "{G}o Authors",
+ title = "{G}o FAQ",
howpublished = {\url{http://golang.org/doc/go_faq.html}},
year = 2010
}
@misc{go_release_hist,
- author = "Go Authors",
- title = "Go Release History",
+ author = "{G}o Authors",
+ title = "{G}o Release History",
howpublished = {\url{http://golang.org/doc/devel/release.html}},
year = 2010,
}
@misc{go_profiling,
author = "Russ Cox",
- title = "Profiling Go Programs",
+ title = "Profiling {G}o Programs",
howpublished = {\url{http://blog.golang.org/2011/06/profiling-go-programs.html}},
year = 2011,
}
@@ -290,30 +290,9 @@ @misc{RFC4641
year = 2006,
}
-@misc{RFC4033,
- author = "Arends, et al.",
- title = "DNS Security Introduction and Requirements",
- howpublished = {\url{http://www.ietf.org/rfc/rfc4033.txt}},
- year = 2005,
-}
-
-@misc{RFC4034,
- author = "Arends, et al.",
- title = "Resource Records for the DNS Security Extensions",
- howpublished = {\url{http://www.ietf.org/rfc/rfc4034.txt}},
- year = 2005,
-}
-
-@misc{RFC4035,
- author = "Arends, et al.",
- title = "Protocol Modifications for the DNS Security Extensions",
- howpublished = {\url{http://www.ietf.org/rfc/rfc4035.txt}},
- year = 2005,
-}
-
@misc{go_windows,
author = "Joseph Poirier",
- title = "Go MinGW",
+ title = "{G}o MinGW",
howpublished = {\url{https://bitbucket.org/jpoirier/go_mingw/downloads/}},
year = 2011,
}

0 comments on commit 8ecf96b

Please sign in to comment.