From 5a36bec0ba30464e1149c35a74cb845fb1274de9 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Fri, 16 Feb 2024 00:19:09 +0100 Subject: [PATCH] initialize go program --- go/hello.go | 7 +++++++ go/makefile | 2 ++ go/notes.md | 3 +++ go/squiggle.go | 10 ++++++++++ 4 files changed, 22 insertions(+) create mode 100644 go/hello.go create mode 100644 go/makefile create mode 100644 go/notes.md create mode 100644 go/squiggle.go diff --git a/go/hello.go b/go/hello.go new file mode 100644 index 00000000..70a7fe5d --- /dev/null +++ b/go/hello.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello world!") +} diff --git a/go/makefile b/go/makefile new file mode 100644 index 00000000..63504138 --- /dev/null +++ b/go/makefile @@ -0,0 +1,2 @@ +run: + go run hello.go diff --git a/go/notes.md b/go/notes.md new file mode 100644 index 00000000..54236fef --- /dev/null +++ b/go/notes.md @@ -0,0 +1,3 @@ +- [ ] Hello world program +- [ ] Look into randomness sources in go +- [ ] diff --git a/go/squiggle.go b/go/squiggle.go new file mode 100644 index 00000000..5d7227a8 --- /dev/null +++ b/go/squiggle.go @@ -0,0 +1,10 @@ +package main + +import "fmt" +import rand "math/rand/v2" + +func main() { + r := rand.New(rand.NewPCG(1, 2)) + fmt.Println("Hello world!") + fmt.Printf("%v\n", r.Float64()) +}