Friday, April 22, 2011

Setting up development environment for Go on windows

A simple tutorial to set up a development environment for the Google's Go programming language on windows.

Firstly, download Go windows installer here. Then install after downloading.

Secondly, launch eclipse (you can get it from here if you don't have it installed already). Goto Help -> Install New Software and add this link "http://goclipse.googlecode.com/svn/trunk/goclipse-update-site/". Then install the plugin.


With this goclipse plugin is installed. Next is to configure the plugin. Goto Windows -> Preferences -> Go

Finally, lets write hello world.

Create a new go project




Create  a source file and write hello world.






Lets run our project. In case there is an error message, right-click on main.go -> Run As -> Go Application.



Lets use packages

Other packages apart from main package should be created under pkg


 Name the package "my" and create a file add.go under it with the following contents


Now lets go back to main.go and change its contents to this

Finally, lets run our project. If every goes well, we should see this output
  










Thursday, July 15, 2010

using codeigniter autocomplete in eclipse helios

UPDATE FOR CODEIGNITER 2


Paste the codes in /system/core/controller.php and /system/core/model.php instead.


I was able to get my eclipse autocomplete for codeignite in these two steps.

I use eclipse helios and codeigniter 1.7.2 and php5
  1. Create a new eclipse php project, choose project at existing location and choose path/to/codeigniter/system. I mean path to the codeigniter folder.
  2. edit codeigniter/Base4.php
    and insert the following before the constructor
            /**
    * @var CI_Config
    */
    var $config;
    /**
    * @var CI_DB_active_record
    */
    var $db;
    /**
    * @var CI_Email
    */
    var $email;
    /**
    * @var CI_Form_validation
    */
    var $form_validation;
    /**
    * @var CI_Input
    */
    var $input;
    /**
    * @var CI_Loader
    */
    var $load;
    /**
    * @var CI_Router
    */
    var $router;
    /**
    * @var CI_Session
    */
    var $session;
    /**
    * @var CI_Table
    */
    var $table;
    /**
    * @var CI_Unit_test
    */
    var $unit;
    /**
    * @var CI_URI
    */
    var $uri;
    /**
    * @var CI_Pagination
    */
    var $pagination;

Save it and you're done. Try using the autocomplete and if it doesn't show, force it by pressing Ctrl-Space.

Friday, June 4, 2010

A simple Calculator using Go Language with go-gtk

SCREENSHOT


You need to have Go and go-gtk installed.

You can install Go here

For go-gtk, download the source here, navigate to the directory and 'make example'.

Full source code of the calculator is available here.








Friday, April 23, 2010

gostrutils

gostrutils is a package for the Go programming language with StringTokenizer and StringBuffer similar to the ones in java.

project site is code.google.com/p/gostrutils.

Monday, April 12, 2010

gopages - my simple web framework for Go Programming Language

I'm used to php way of coding web pages where you embed your codes in <?php ?> tags. So I'm trying to emulate such feature in Go with gopages.



You can visit the project home at http://code.google.com/p/gopages.

All comments are welcomed.

Thursday, April 8, 2010

Compact Diary

Compact Diary is available for download at project site .

Just like the name, it is a password protected diary where you can store your daily toughts.

You can even publish to blogger with it.

You can check it out.

Ubuntu 10.04 LTS

Ubuntu 10.04 LTS beta 1 was released some days ago and I've been really impressed with everything, the theme, the booting speed and better performance with my ATI graphic card. But the only thing I missed is the absence of GIMP but it can still be installed with synaptic or apt-get.

My wireless wasn't recognised after installation but was fixed by just installing the bcmwl-kernel-source using synaptic and the 10.04 cd or iso as the repository.

Can't wait for the stable release