<?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>maSnun&#039;s logs &#187; go</title>
	<atom:link href="http://masnun.com/blog/tag/go/feed/" rel="self" type="application/rss+xml" />
	<link>http://masnun.com/blog</link>
	<description>Personal Blog of maSnun</description>
	<lastBuildDate>Sat, 24 Jul 2010 04:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Google Go Experience</title>
		<link>http://masnun.com/blog/2010/01/02/the-google-go-experience/</link>
		<comments>http://masnun.com/blog/2010/01/02/the-google-go-experience/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 13:07:07 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[go]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=776</guid>
		<description><![CDATA[I have always wanted to check out the Go language sooner but unfortunately enough couldn&#8217;t have a go&#8230; Today I googled if there are any debian packages for Google Go and luckily I found one&#8230; It&#8217;s of course not an &#8230; <a href="http://masnun.com/blog/2010/01/02/the-google-go-experience/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have always wanted to check out the Go language sooner but unfortunately enough couldn&#8217;t have a go&#8230; Today I googled if there are any debian packages for Google Go and luckily I found one&#8230; It&#8217;s of course not an official release from the Go team. Still it interested me. I downloaded the file and installed the package. Yeah, it works! This is the first time I am playing with Go, so no issues have been encountered. But the debian package requires me to overwrite some of the GCC files. Again, I am not a serious C/C++ programmer, so I don&#8217;t know if that has damaged my GCC to any extent.</p>
<p>Oh yeah, I forgot to mention I am on Ubuntu 9.04 <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I downloaded the package from this link: <a href="http://drop.io/gccgodeb/asset/gccgo-4-5-0-1-i386-deb">http://drop.io/gccgodeb/asset/gccgo-4-5-0-1-i386-deb</a></p>
<p>It&#8217;s nearly a 27 MB of download. I downloaded and double clicked to install it. The installation failed with some errors. So, I pointed back to the <a href="http://www.atoztoa.com/2009/11/gccgo-debian-package.html">Original Source Page</a> (Author&#8217;s Blog Post) of the package and re-read carefully. I had to use the command line to set &#8220;&#8211;force-overwrite&#8221; mode to the dpkg utility so that it could overwrite files at it&#8217;s discretion. Here&#8217;s the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">--force-overwrite</span> <span style="color: #660033;">-i</span> gccgo_4.5.0-<span style="color: #000000;">1</span>_i386.deb</pre></div></div>

<p>Now, for quick demo, I downloaded the sample &#8220;Hello World!&#8221; source code from the official Go website at <a href="http://golang.org/">http://golang.org/</a> <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (Hey, wasn&#8217;t it http://go-lang.org the last time I visited it? No way, both URL works now <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</p>

<div class="wp_syntax"><div class="code"><pre class="go" style="font-family:monospace;">package main
&nbsp;
import &quot;fmt&quot;
&nbsp;
func main() {
  fmt.Printf(&quot;Hello, ??\n&quot;)
}</pre></div></div>

<p>PS: I am sorry that my Syntax Highlighter doesn&#8217;t yet have the Go syntax highlighting patterns. Neither does my code editor! But still I used the code block, just out of a good practice! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Then I compiled the source (after naming it masnun.go) with the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gccgo masnun.go</pre></div></div>

<p>It created the file a.out . I ran it from the command line again:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$ .<span style="color: #000000; font-weight: bold;">/</span>a.out
Hello, ??
masnun<span style="color: #000000; font-weight: bold;">@</span>ubuntu:~<span style="color: #000000; font-weight: bold;">/</span>Desktop$</pre></div></div>

<p>It was pretty easy in fact! I am going to play with Go at my leisure to check out what it has to provide the developers with&#8230; I love Python, let&#8217;s see if Go can give me anything more than Python <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks to Google, we have another programming language to do our bidding! Happy programming!</p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/01/02/the-google-go-experience/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
