diff --git a/go/README b/go/README new file mode 100644 index 0000000..8e18e99 --- /dev/null +++ b/go/README @@ -0,0 +1,11 @@ +Installing Go + +http://golang.org + +$ sudo port install go + +Installing waf + +$ curl -O http://waf.googlecode.com/files/waf-1.6.3 +$ mv waf-1.6.3 waf +$ ./waf --version diff --git a/go/hello.go b/go/hello.go new file mode 100644 index 0000000..9ef90e8 --- /dev/null +++ b/go/hello.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Printf("hello, world\n"); +} diff --git a/go/waf b/go/waf new file mode 100755 index 0000000..0dcf397 Binary files /dev/null and b/go/waf differ diff --git a/go/wscript b/go/wscript new file mode 100644 index 0000000..aba462e --- /dev/null +++ b/go/wscript @@ -0,0 +1,18 @@ +APPNAME = "gohello" +VERSION = "1.0" + +top = "." +out = "build" + +def configure(ctx): + pass + +def hello(ctx): + print("hello world") + +def build(ctx): + go_compile = "6g ${SRC} -o ${TGT}" + go_link = "6l ${SRC} -o ${TGT}" + + ctx(rule=go_compile, source="hello.go", target="hello.6") + ctx(rule=go_link, source="hello.6", target="hello") diff --git a/scala/MapTest.scala b/scala/MapTest.scala index 280a8a5..a00cf10 100644 --- a/scala/MapTest.scala +++ b/scala/MapTest.scala @@ -1,9 +1,12 @@ package com.muthanna.playground.scala +import java.lang.Integer; +import java.util.Map; +import java.util.HashMap; + object MapTest { def main(args: Array[String]) { - var capital = Map("US" -> "DC", "India" -> "Delhi") - capital += ("Canada" -> "Ottawa") - println(capital("India")) + var aMap = new HashMap[Integer, String] + println("boo"); } }