Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
more fixes for the intro chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
miekg committed Oct 17, 2010
1 parent 7ae1471 commit 9d694e4
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions go-intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,18 @@ \section{Getting Go for Linux}
\item For building Go you also need the packages: \prog{bison},
\prog{gcc}, \prog{libc6-dev}, \prog{ed}, \prog{gawk} and \prog{make};

\item Set the environment variable \prog{GOROOT} to the root of your
Go install:
\begin{display}
\pr export GOROOT=~/go
\end{display}

\item Then retrieve the Go source code:
\begin{display}
\pr export GOROOT=~/go \rem{\# set the GOROOT environment variable}
\pr hg clone -r release https://go.googlecode.com/hg/ $GOROOT
\end{display}
\item Set your PATH to find the Go binaries:
\item Set your PATH to so that the Shell can find the Go binaries:
\begin{display}
\pr export PATH=$GOROOT/bin:$PATH
\end{display}
Expand All @@ -116,14 +121,29 @@ \section{Getting Go for Linux}
\pr ./all.bash
\end{display}
\end{itemize}
If all goes well, you should now have Go installed on your system and
you can start playing.
If all goes well, you should see the following:
\begin{display}
Installed Go for linux/amd64 in /home/gobook/go.
Installed commands in /home/gobook/go/bin.
The compiler is 6g.
\end{display}
You now have Go installed on your system and you can start playing.

\subsection{Keeping up to date}
New releases are announced on the Go Nuts mailing list \cite{go_nuts}. To update an
existing tree to the latest release, you can run:
\begin{display}
\pr cd $GOROOT/src
\pr hg pull
\pr hg update release
\pr ./all.bash
\end{display}
\section{Origins}
Go has it origins in Plan 9 \cite{plan9}. Plan 9 is (or was
supposed to be) the successor of Unix. As you know one of the
supposed to be) the successor of Unix. As you may know one of the
core ideas of Unix is "everything is a file", so the \func{read()} and
\func{write()} calls work as well on normal files as they do on I/O
\func{write()} systemcalls work as well on normal files as they do on I/O
devices. However for some devices this has never happened, notably
network and video devices. In Plan 9 this "everything is a file"--idea
is taken to the next level and truly everything is presented to the
Expand All @@ -140,10 +160,10 @@ \section{Origins}
\end{quote}
That sounds a lot like Go, and one could say Go is a reimplementation of
Limbo on Unix--like systems like Linux. One feature of Limbo that is
also included in Go is the excellent support for cross compiling.
also included in Go is the support for cross compiling.
Another feature Go inherited from Limbo is channels (see chapter
\ref{chap:channels}). Again from the documentation.
\ref{chap:channels}). Again from the Limbo documentation.
\begin{quote}
[A channel] is a communication mechanism capable of sending and receiving objects of
the specified type to another agent in the system. Channels may be used
Expand Down Expand Up @@ -175,9 +195,6 @@ \section{Origins}
Go is the first C--like language that is widely available,
runs on many
different platforms and makes concurrency easy (or easier).
Becoming proficient in a new language means doing your exercises,
reading about it helps, but getting down to the little details when
programming your self is even better.
\end{lbar}
\section{Exercises}
Expand Down

0 comments on commit 9d694e4

Please sign in to comment.