vielmetti / sisyphus

Tools for the never ending task
6 stars 1 forks source link

write a version in go #41

Closed vielmetti closed 4 years ago

vielmetti commented 4 years ago

with code pulled from this shuffle

https://www.calhoun.io/how-to-shuffle-arrays-and-slices-in-go/

vielmetti commented 4 years ago

noting the algorithm here https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle?oldformat=true

and Rosettacode gives it as "Knuth shuffle" https://www.rosettacode.org/wiki/Knuth_shuffle

vielmetti commented 4 years ago

There is a version in Go that prints a single line from a standard Unix formatted fortune file.

https://github.com/bmc/fortune-go/blob/master/fortune.go

vielmetti commented 4 years ago

nah