January 3, 2010

Google Go, windows version is out

There were only Linux/OSX versions – now someone built it for Windows ( http://code.google.com/p/go-windows/ ).  Go get this file - http://go-windows.googlecode.com/files/go-1.zip

To install, unzip and set the following environment variables:

set GOROOT=[the go folder]
set GOOS=mingw
set GOARCH=386 

and then add GOROOT\bin directory to PATH.

Sample Hello world source. Save below as “hello.go”:

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

How to compile:

% 8g hello.go -> produces "hello.8"
% 8l hello.8 -> produces "8.exe"  (or "8.out" in Linux)

Using Clojure in Cygwin


Create a shell script as below:

CMD="java -cp `cygpath -wp $CLASS_PATH`"
SHELL="jline.ConsoleRunner clojure.main"

if [ "$1" ]; then