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