Comment by ibejoeb 18 hours ago The moment we've been waiting for. Who else remembers how to fizzbuzz? We're gonna be rich. 21 comments ibejoeb Reply rrrx3 18 hours ago https://github.com/enterprisequalitycoding/fizzbuzzenterpris... embedding-shape 18 hours ago On the other spectrum, shortest JS fizzbuzz (62 characters): for(i=0;++i<101;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' Anyone can beat it? (any language accepted) NitpickLawyer 18 hours ago Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per... 1 reply → chrisguilbeau 18 hours ago LLM: wrt frst 100fizzbuzz 8 replies → wilkystyle 18 hours ago Python:[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]edit: Hacker News stripped the * character. Now it's properly escaped. 1 reply → winrid 18 hours ago you can flip it and save a few bytes, but not valid fizzbuzz then:for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' 2 replies → nprateem 18 hours ago I do!> openai.messages("write fizzbuzz in python")Bingo
rrrx3 18 hours ago https://github.com/enterprisequalitycoding/fizzbuzzenterpris... embedding-shape 18 hours ago On the other spectrum, shortest JS fizzbuzz (62 characters): for(i=0;++i<101;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' Anyone can beat it? (any language accepted) NitpickLawyer 18 hours ago Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per... 1 reply → chrisguilbeau 18 hours ago LLM: wrt frst 100fizzbuzz 8 replies → wilkystyle 18 hours ago Python:[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]edit: Hacker News stripped the * character. Now it's properly escaped. 1 reply → winrid 18 hours ago you can flip it and save a few bytes, but not valid fizzbuzz then:for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' 2 replies →
embedding-shape 18 hours ago On the other spectrum, shortest JS fizzbuzz (62 characters): for(i=0;++i<101;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' Anyone can beat it? (any language accepted) NitpickLawyer 18 hours ago Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per... 1 reply → chrisguilbeau 18 hours ago LLM: wrt frst 100fizzbuzz 8 replies → wilkystyle 18 hours ago Python:[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]edit: Hacker News stripped the * character. Now it's properly escaped. 1 reply → winrid 18 hours ago you can flip it and save a few bytes, but not valid fizzbuzz then:for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' 2 replies →
NitpickLawyer 18 hours ago Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per... 1 reply →
wilkystyle 18 hours ago Python:[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]edit: Hacker News stripped the * character. Now it's properly escaped. 1 reply →
winrid 18 hours ago you can flip it and save a few bytes, but not valid fizzbuzz then:for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz' 2 replies →
https://github.com/enterprisequalitycoding/fizzbuzzenterpris...
On the other spectrum, shortest JS fizzbuzz (62 characters):
Anyone can beat it? (any language accepted)
Perl6: say "Fizz"x$_%%(2+1)~"Buzz"x$_%%(4+1)||$_ for 1..100
from here - https://github.com/rsha256/shortest-fizzbuzz/blob/master/Per...
1 reply →
LLM: wrt frst 100fizzbuzz
8 replies →
Python:
[(x%3<1)*'Fizz'+(x%5<1)*'Buzz'or x for x in range(1,101)]
edit: Hacker News stripped the * character. Now it's properly escaped.
1 reply →
you can flip it and save a few bytes, but not valid fizzbuzz then:
for(i=100;i--;console.log(i%5?f||i:f+'Buzz'))f=i%3?'':'Fizz'
2 replies →
I do!
> openai.messages("write fizzbuzz in python")
Bingo