Google Go

Well, it seems our friends in Mountain View, Ca have decided that they want to replace C/C++/Java, by inventing a new systems language called: Go. This language compiles insanely fast, has strong threading support, is object-oriented, is designed to require less typing, is garbage-collected, is nearly as fast as C, and supports more stuff in its initial release than you can throw a stick at. Take a look for yourself:

http://www.youtube.com/watch?v=rKnDgT73v8s

I'm not entirely sure I like the syntax, given that I'm so used to (and kind of like) the way C does things. I know it may not appear as such from looking at this blog, but I'm actually a big fan of C. I guess I can get used to it tho...

If you're interested in trying Go out, you can look at their site at http://www.golang.com/.

To install go, you need to do the following:

  1. Make sure you have this stuff installed: 'ed', 'libc6-dev', 'make', 'gcc', 'bison', and 'mercurial'.
  2. Create a 'go' folder in your home directory. (also, add a 'bin' directory to your home directory/$PATH if you haven't already.)
  3. Add the following lines of code to your .bashrc:
    export GOOS=linux
    export GOARCH=amd64
    export GOROOT=$HOME/go
    Note: $GOARCH can be any of: '386', 'amd64', or 'arm', depending on your CPU type.
  4. Then run:
    hg clone -r release https://go.googlecode.com/hg/ $GOROOT
    Once that completes, you can then run the following:
    cd $GOROOT/src && ./all.bash
    Wait a while. This will compile the various Go compilers, copy them into the ~/bin directory, and then run some test-suites on those programs.

When it's all done, you'll have a nice, shiny, new Go compiler that you are free to play around with. Enjoy. ;)


0 Responses to Google Go

  1. There are currently no comments.

Leave a Reply



About

User