From 4d146dbcfbee46b2a394e4f44ea2d73329649b13 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Wed, 19 Jun 2024 08:30:21 -0400 Subject: [PATCH] rename to f.go --- README.md | 2 ++ fermi.go => f.go | 7 +++---- makefile | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) rename fermi.go => f.go (99%) diff --git a/README.md b/README.md index e977618..6f71584 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,8 @@ Note that these sed commands are just hacks, and won't parse e.g., `3.5K` correc - Joint types - Enums - [x] Fix correlation problem, by spinning up a new randomness thing every time some serial computation is done. +- [ ] Maintain *both* a more complex thing that's more featureful *and* the more simple multiplication of lognormals thing. +- [ ] Clean up error code. Right now only needed for division - [ ] Dump samples to file - [ ] Represent samples/statistics in some other way - [ ] Perhaps use qsort rather than full sorting diff --git a/fermi.go b/f.go similarity index 99% rename from fermi.go rename to f.go index babf122..55d7455 100644 --- a/fermi.go +++ b/f.go @@ -4,8 +4,8 @@ import ( "bufio" "errors" "fmt" - "git.nunosempere.com/NunoSempere/fermi/sample" "git.nunosempere.com/NunoSempere/fermi/pretty" + "git.nunosempere.com/NunoSempere/fermi/sample" "math" "os" "sort" @@ -348,8 +348,7 @@ func operateStackWithDist(stack Stack, new_dist Dist, op string) Stack { func runRepl(stack Stack, reader *bufio.Reader) Stack { - - replForLoop: +replForLoop: for { new_line, _ := reader.ReadString('\n') words := strings.Split(strings.TrimSpace(new_line), " ") @@ -378,7 +377,7 @@ func runRepl(stack Stack, reader *bufio.Reader) Stack { stack.old_dist = INIT_DIST fmt.Println() continue replForLoop - /* Variable assignment */ + /* Variable assignment */ case words[0] == "=:" && len(words) == 2: stack.vars[words[1]] = stack.old_dist fmt.Printf("%s ", words[1]) diff --git a/makefile b/makefile index 0a23053..ae8dbbd 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,9 @@ run: - go run fermi.go + go run f.go build: - go build fermi.go + go build f.go -install: fermi - sudo mv fermi /usr/bin/fermi - sudo ln -s /usr/bin/fermi /usr/bin/f +install: f + sudo mv f /usr/bin/f + sudo ln -s /usr/bin/f /usr/bin/fermi