Google Go on OpenSUSE 12.1

Intro

As you may have already know the latest distribution release of OpenSUSE 12.1 ships with Google Go language. Go language was founded by Google as their very own programming language works like an interpreter language yet it has to be compiled in order to execute. This small introduction will show you how to set up the environment and run your first Go language program.

Installing Go

Actually Go language is a part of the SUSE 12.1 distribution so you will not get it out of the box that is you have to install it first in order to use it. So lets begin installing Go

sudo zypper install go

Here I have issued the zypper command to install the Go (usual SUSE way of installing packages from repos). It will probably install two packages. Ok after the successful installation lets check if it’s available

whereis go

outputs

go: /usr/lib/go /usr/share/go

Voila.! so we got installed Go

Setting up the environment

As in the Go guided tutorial mentioned we need to set up three environment variables in order to successfully compile and execute a Go program. So lets open up the /.bashrc file where you usually place your environment variables (because /.bashrc file executes with every new session)

sudo nano ~/.bashrc

place three environment variables on the bottom of the file:-

export GOROOT=/usr/lib/go
export GOOS=linux
export GOARCH=386

[ctrl + x to save the file]

export GOROOT – location of your Go source installation (/usr/lib/go) use whereis command to see that as used before.

export GOOS – Your OS type which is Linux

export GOARCH – Your OS architecture, in my case x86-32 (32-bit) so it goes as 386 [see here for more details]. Issue lscpu to check your sys-architecture.

Ok now everything is setup up. All you have to do now is open a new session, simply logout and re-login.

First program

As this is an introduction I will grab the same “Hello” program listed on http://golang.org/doc/install.html#writing

nano hello.go

package main

import "fmt"

func main() {
	fmt.Printf("hello, world\n")
}

[ctrl + x to save the file]

compiling

8g hello.go

linking

8l hello.8

executing

./8.out

output

hello, world

Note: here I have used 8g, 8l because my arc-type is 32-bit (386). 
You will notice a different formation on the guide. 

Ok now you have successfully completed your first Google Go language program. Pretty straight forward hah? To me it seems like that it follows a familiar executing process as in assembly language. So this is just a little heads up you can find more tutorials and code sample on http://golang.org/doc/

Regards.

Tagged , , , ,

Dealing with DLC’s in Playstation Network

Intro

Are you a casual gamer or a hardcore gamer? Your criteria or purpose doesn’t matter in gaming you do it to entertain yourself. There’s a point that you always want so badly to extend your gaming experience and that’s where you want to deal with DLC’s (downloadable contents).

PS3 DLC’s and region free games

Playstation 3 games are region free in fact there’s no region restrictions like in Xbox 360.  Games made for Europe (EU) playable in both Asia or North America (NTSC) but when it comes to DLC’s there’s a region restriction based game’s region. Lets think if you have a game made for EU and you downloaded some DLC’s from your NTSC account  and there’s a restriction that you cannot use it with your game. So it’s always good to follow a one direction either you buy games matching to your PSN (Playstation Network) accounts region or keep a separate PSN account for buying DLC’s that matches your game’s region.

Non-supported Playstation Network countries

When you are creating a PSN account you have to select a country in order to complete the registrations process, but what if your country not listed as a selection. Some countries  (most of Asian countries) are not supported by PSN it self but do not worry you can still create an account. As mentioned above you have to create an account(s) according to one of the two options. Here’s a step-by-step guide of how you can create a PSN account

http://us.playstation.com/support/answer/index.htm?a_id=934

I recommend creating a PSN account selecting USA as the country if you are country is not listed. Because most DLC’s and game merchandise are releases early in North America also it’s kind of easy to handle payments in US currencies.

Payment options and PSN wallet

Now you know the restrictions and the complications that you may have face when dealing with DLC’s. Lets look in to payment options that PSN provides for adding funds to your wallet in order to purchase DLC’s and game merchandise. PlayStation Network provides two options of payment methods :-

  • Pyastation Network card (PSN card)
  • Credit/Debit (International Visa) card

 

to be contained  …

Follow

Get every new post delivered to your Inbox.