News for hackers. Stuff that matters.
Re:GOTOphobia Considered Harmful (In C) by fsckboy on Sunday February 26, 2023 @07:38PM (#34951513)
tangentially, can somebody point me to what are considered the best fizzbuzz solutions? I'm both an experienced and cs-educated coder, and I know what I would consider to be a good solution, but I have no idea what the rest of "you" are looking for. (my favored solution would be a small number of state machines running in parallel to sieve-of-eratosthenes the correct answers thus avoid innumerable divisions, but maybe that's just me and I'm old fashioned?)
Re:GOTOphobia Considered Harmful (In C) by anonymoushn on Sunday February 26, 2023 @11:43PM (#34953059)
Surely your compiler won't actually emit an integer modulus if you tell it to mod by a constant?
Re:GOTOphobia Considered Harmful (In C) by _kst_ on Monday February 27, 2023 @01:00AM (#34953520)
I don't claim to have the best, or even good, fizzbuzz implementations, but if you're looking for a lot of fizzbuzz implementations:

https://github.com/Keith-S-Thompson/fizzbuzz-c

https://github.com/Keith-S-Thompson/fizzbuzz-polyglot