A.G.Udaya Shamendra is currently a second year undergraduate(Bachelor of Computer Science) at University of Colombo School of Computing(UCSC), Sri Lanka. He has interests in Java, 2D graphic designing (do out sourcing projects), Web designing, Web development (PHP, HTML...etc), Web Security, FOSS, C# (and some Microsoft technologies), Google Technologies (GWave, android...etc), Adobe Technologies and Networking. He likes blogging (Technology via Technology), movies, painting and poem writing. Udaya is a Manager of Adobe- Sri Lanka User Group (A-SLUG) and is involved with Mozilla Firefox Campus Rep programs and GTUG (Google Technology User Group), Sri Lanka.
02/23/2010 5:51 am By Udaya Shamendra | Articles: 21
Google Corporation’s GO Language is latest, highly comprehensive and effective system’s language.
GO is an open source project, distributed under a BSD-style license.
"GO combines the development speed of working in a dynamic language like Python with the performance and safety of a compiled language like C or C++," according to a Google blog post.
GO which is expressive, concurrent, and garbage-collected language as their Home Page says.
Following Shows how the programming languages are ranking in 2009 and 2010.
First of all I would like it if you also try GO’s power. Please use following instructions. (If you are familiar with any Programming Language, it will be more helpful you).
Installation & Basics
GO is not a Platform independent. I think that is the worst-case that affect GO to spread. It’s works on Linux and Mac Platforms. But even it’s not support to windows platform; it’ll conquer the programming language world as seen on above picture.
Remember all of GO Language most likely to C Language and it is very easy if you are familiar with C Language. And following instructions are for who works on linux platforms.
Installation:
i.Install by using apt-get via bison parser generator.
$ sudo apt-get install bison gcc libc6-dev ed gawk make
ii. To build the Go distribution and run
$ cd $GOROOT/src
$ ./all.bash
There are two ways to get experience with GO.
1. gc Go compiler and tools (6g, 8g etc.).
2. Uses gccgo, a more traditional compiler using the GCC back end.
Here you can see how to install and uses GO with first approach.
I’ll explain how to use GO in Linux platform and setting Environmental Variables
The Go compilation environment depends on three environment variables that you should set in your .bashrc or equivalent, plus one optional variable.
$GOROOT :
The root of Go tree. Typically this is $HOME/go but it can be any directory.
$GOOS and $GOARCH :
$GOOS
$GOARCH
darwin
amd64
freebsd
386
freebsd
amd64
linux
386
linux
amd64
linux
arm
Above diagram shows what OS ($GOOS) going to use and the architecture ($GOARCH ) used. Choices of Architectures are 386 (x86 32bit), amd64 (x86 64bit or most mature port), arm (32bit Arm, an incomplete port).
$GOBIN (optional):
The location where binaries will be installed. As on Java it will be on default at C:\Program Files\Java\jdk1.6.0_03\bin . In GO language default is $HOME/bin. After installing, you will want to arrange to add this directory to your $PATH,
Output file which is compiled will be file.6 for amd64 architecture. It will be ‘8’ and ‘5’ for 386 and armare architectures.
Save this text as helloworld.go
Compile it 6g compiler for Go Lang(amd64).
$ 6g file.go
To link that file use
$ 6l file.6
To run that use
$ ./6.out
Remember GO is just released and there will be some bugs and so many incomplete things.!
Gossips and Rumors about GO
The LOGO :
A Gopher :
A gopher is a small burrowing rodent that comes in many varieties. - Wkipedia
When looking at the above picture we can see those above logos are look like same. Yes it’s true. Both have same animal called gopher and designed by same person. PLAN 9 is a Bell Labs project and it is designed by Renee French.
PLAN 9 from Bell Labs is distributed operating system.
Is Google use GO Language ? :-D
GO is an experiment. Also it is just at experimental level. But Google use it for some cases and in future they will broadly use GO.
Nice Article......
Nice Article......keep it writing.. We all are FOSS lovers!
Post new comment