<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The ramblings of a yorkshire tyke &#187; go</title>
	<atom:link href="http://www.gennard.net/blog/tag/go/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gennard.net/blog</link>
	<description>Life, Rants and Programming In A Blog</description>
	<lastBuildDate>Sat, 10 Jul 2010 23:04:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>VIM and GO</title>
		<link>http://www.gennard.net/blog/2009/11/vim-and-go/</link>
		<comments>http://www.gennard.net/blog/2009/11/vim-and-go/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 21:05:19 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[go]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=297</guid>
		<description><![CDATA[Getting started with GO and vim As a developer who lives most of his life on my Mac with vi/vim, I was happy to see the GO distribution includes vim colourisation for .go, files ..but it was installed.. so.. To setup this up, first copy $GOROOT/misc/vim/go.vim to your vim/gvim syntax directory or $HOME/.vim/syntax (see comment [...]]]></description>
			<content:encoded><![CDATA[<p>Getting started with GO and vim</p>
<p>As a developer who lives most of his life on my Mac with vi/vim, I was happy to see the GO distribution includes vim colourisation for .go, files ..but it was installed.. so..</p>
<p>To setup this up, first copy $GOROOT/misc/vim/go.vim to your vim/gvim syntax directory or $HOME/.vim/syntax (see comment below for the mac). Then all that is required is to setup the file association in runtime/filetype.vim, the following lines did it for me..</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&quot; Go<br />
au BufNewFile,BufRead *.go &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setf go</div></div>
<p>If like me, you are using Vim.app on the mac, the runtime vim location will be Vim.app/Contents/Resources/vim/runtime with the syntax directory being below this too.</p>
<p>If all goes well, it should look like:</p>
<p><img src="http://www.gennard.net/blog/wp-content/uploads/2009/11/2009-11-25_2100.png" alt="GVIM and GO" title="GVIM and GO" width="460" height="159" class="alignnone size-full wp-image-300" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2009/11/vim-and-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GO Baby GO..</title>
		<link>http://www.gennard.net/blog/2009/11/go-baby-go/</link>
		<comments>http://www.gennard.net/blog/2009/11/go-baby-go/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 22:21:06 +0000</pubDate>
		<dc:creator>spgennard</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://www.gennard.net/blog/?p=275</guid>
		<description><![CDATA[As someone who works with &#8216;C&#8217;, MSIL and Java bytecode to write system level software for our compilers and runtime, I was nicely surprised to see that someone has produced a new language aim at &#8216;System Level Programming&#8217;. Let me introduce you to &#8216;GO&#8217; Googles new language and of course it is open source. So [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://cdn.mashable.com/wp-content/uploads/2009/11/go-logo-black.png"></p>
<p>As someone who works with &#8216;C&#8217;, MSIL and Java bytecode to write system level software for our compilers and runtime, I was nicely surprised to see that someone has produced a new language aim at &#8216;System Level Programming&#8217;.  Let me introduce you to &#8216;GO&#8217; Googles new language and of course it is open source.</p>
<p>So why has google created the language?  Well it is better to let Google themselves say why? (taken from their FAQ..)</p>
<blockquote>
<p>No major systems language has emerged in over a decade, but over that time the computing landscape has changed tremendously. There are several trends:</p>
<li>Computers are enormously quicker but software development is not faster.</li>
<li>Dependency management is a big part of software development today but the “header files” of languages in the C tradition are antithetical to clean dependency analysis—and fast compilation.</li>
<li>There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.</li>
<li>Some fundamental concepts such as garbage collection and parallel computation are not well supported by popular systems languages.</li>
<li>The emergence of multicore computers has generated worry and confusion.</li>
</blockquote>
<p>Enough quotes.. I hear you say.. so what next if you want read more.. drive over to <a href="http://golang.org/">http://golang.org/</a>.. now lets get practical and it up and running, as it is open-source and very young its a d.i.y. job&#8230; still it looks easy enough&#8230;</p>
<p>They says its simple build&#8230; so lets put it to the test.. let my diary begin&#8230;</p>
<p>Firstly&#8230; I&#8217;ll be up front and say these instructions are for the Mac OSX and tested on my little MacBook running 10.6 with xcode pre-installed.. </p>
<p>1) First download Mercurial source control:</p>
<p> <a href="http://mercurial.selenic.com/downloads/">http://mercurial.selenic.com/downloads/</a></p>
<p>2) Add the following to $HOME/.bash_profile using vim</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">export PATH=$HOME/bin:$PATH<br />
export GOROOT=$HOME/go<br />
export GOARCH=amd64<br />
export GOOS=darwin</div></div>
<p>Tip: if you don&#8217;t have a directory called bin, do a quick &#8220;mkdir $HOME/bin&#8221;</p>
<p>3) Startup a new terminal session and check to see if the environment have been set with:</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">env | grep &quot;^GO&quot;</div></div>
<p>If all goes well you should see:</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">GOARCH=amd64<br />
GOROOT=/Users/spg/go<br />
GOOS=darwin</div></div>
<p>4) Okay, lets download the latest source code for Go!</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hg clone -r release https://go.googlecode.com/hg/ $GOROOT</div></div>
<p>The &#8216;hg&#8217; command gets the source code and hopefully your screen should be something like!</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">requesting all changes<br />
adding changesets<br />
adding manifests<br />
adding file changes<br />
added 4109 changesets with 17125 changes to 2968 files<br />
updating to branch default<br />
1676 files updated, 0 files merged, 0 files removed, 0 files unresolved</div></div>
<p>5) Now lets build it&#8230;</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd $GOROOT/src<br />
./all.bash</div></div>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wow.... A lot goes bye.... and then finally... it ends with......<br />
k-nucleotide<br />
mandelbrot<br />
meteor-contest<br />
pidigits<br />
threadring<br />
chameneosredux<br />
<br />
--- cd ../test<br />
1 known bugs; 0 unexpected bugs</div></div>
<p>Wow&#8230; I appear to have something installed&#8230; it took me&#8230;  less than fifteen minutes..
<p>So lets try some of the samples out&#8230;</p>
<div class="codecolorer-container text blackboard" style="border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">stephen-gennards-macbook:src spg$ cat hello.go<br />
package main<br />
<br />
import &quot;fmt&quot;<br />
<br />
func main() {<br />
fmt.Printf(&quot;hello, world\n&quot;)<br />
}<br />
stephen-gennards-macbook:src spg$ 6g hello.go<br />
stephen-gennards-macbook:src spg$ 6l hello.6<br />
stephen-gennards-macbook:src spg$ ./6.out<br />
hello, world</div></div>
<p>Ohhh&#8230; my that was too easy&#8230; its time to leave the blog and start playing&#8230;</p>
<p>What next&#8230; guess its time to watch a video about Go!</p>
<hr />
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/rKnDgT73v8s&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/rKnDgT73v8s&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8227618096827072";
/* 468x15, created 11/23/09 */
google_ad_slot = "6592882116";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gennard.net/blog/2009/11/go-baby-go/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
