forked from 0xfe/experiments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic golang "Hello World" with waf script.
- Loading branch information
Showing
5 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Printf("hello, world\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
} |