Docker names generator guards against ever returning “boring_wozniak” (github.com) 11 points by baxter001 10y ago ↗ HN
[–] azaras 10y ago ↗ I don't understand Go but: It is the "goto" necessary? A "loop" will not be better? [–] mirceal 10y ago ↗ if name == "boring_wozniak" /* Steve Wozniak is not boring * { return GetRandomName(retry) } [–] jhurliman 10y ago ↗ This has a very low but non-zero chance of exceeding the max call stack size [–] mirceal 10y ago ↗ what are the odds? :) [–] mirceal 10y ago ↗ so if your call stack max depth is n the odds are 1 : (8060^n) [–] meric 10y ago ↗ Epiphany. Thank you.
[–] mirceal 10y ago ↗ if name == "boring_wozniak" /* Steve Wozniak is not boring * { return GetRandomName(retry) } [–] jhurliman 10y ago ↗ This has a very low but non-zero chance of exceeding the max call stack size [–] mirceal 10y ago ↗ what are the odds? :) [–] mirceal 10y ago ↗ so if your call stack max depth is n the odds are 1 : (8060^n) [–] meric 10y ago ↗ Epiphany. Thank you.
[–] jhurliman 10y ago ↗ This has a very low but non-zero chance of exceeding the max call stack size [–] mirceal 10y ago ↗ what are the odds? :) [–] mirceal 10y ago ↗ so if your call stack max depth is n the odds are 1 : (8060^n) [–] meric 10y ago ↗ Epiphany. Thank you.
[–] mirceal 10y ago ↗ what are the odds? :) [–] mirceal 10y ago ↗ so if your call stack max depth is n the odds are 1 : (8060^n)
6 comments
[ 3.1 ms ] story [ 15.6 ms ] thread