> in a single call to printf > while(*d) printf(fmt, arg) How's that a single call ?
> How's that a single call syntactically it is. But it's not a very clear description. So how would you describe that single call location getting executed in a loop so everybody understands what is really meant? A single line of code is worse.
C implementation of Tic-Tac-Toe in a single call to printf
31–40 of 85 posts
Re: C implementation of Tic-Tac-Toe in a single call to printf
#32I am afraid that the author has disqualified himself by publishing the source code before the judging of IOCCC 2020 is over. See catch 22 in the rules: "The judges STRONGLY prefer to not know who is submitting entries to the IOCCC."[1] Even the winners are asked not to publish the code until it is available on the IOCCC web site.[2] [1] https://ioccc.org/2020/rules.txt [2] Personal communication
Re: C implementation of Tic-Tac-Toe in a single call to printf
#33Re: C implementation of Tic-Tac-Toe in a single call to printf
#34Earlier quoted context omitted.
Hence advanced bait. printf() is called in a while loop, so it is hardly a single call.
I don’t want to jump on the title hate bandwagon - what the author has done is definitely creative and clever and this discussion detracts from it - but it also uses scanf.
int main() {
while(*d) printf(fmt, arg);
}Re: C implementation of Tic-Tac-Toe in a single call to printf
#35But it's actually a lot more clever than that.
I feel like this would be a lot more impressive if it was written in simple and clear C since then you'd see that there really isn't any tic-tac-toe logic being explicitly implemented the way you'd expect.
Re: C implementation of Tic-Tac-Toe in a single call to printf
#36Earlier quoted context omitted.
I don’t want to jump on the title hate bandwagon - what the author has done is definitely creative and clever and this discussion detracts from it - but it also uses scanf.
Where? int main() { while(*d) printf(fmt, arg); }
Re: C implementation of Tic-Tac-Toe in a single call to printf
#37This is just crazy and I love it From a description on the author's website[1] of a Doom clone written in 13k of JavaScript. > Until recently all content on this website was research, and while writing papers can be fun, sometimes you just need to blow off a little steam. I think more companies should allow for their employees to have some plain old fun with no strings attached on a regular basis. [1] https://nichola…
What about char arrays?
Re: C implementation of Tic-Tac-Toe in a single call to printf
#38Suggests in my mind, somehow, thought I’d share: “CTRL-F oriented programming” :)
Re: C implementation of Tic-Tac-Toe in a single call to printf
#39This is just crazy and I love it From a description on the author's website[1] of a Doom clone written in 13k of JavaScript. > Until recently all content on this website was research, and while writing papers can be fun, sometimes you just need to blow off a little steam. I think more companies should allow for their employees to have some plain old fun with no strings attached on a regular basis. [1] https://nichola…
>I think more companies should allow for their employees to have some plain old fun with no strings attached on a regular basis. Maybe we could call this additional 'holiday pay' or a longer 'weekend' and mandate it through law so that everyone benefits.
Re: C implementation of Tic-Tac-Toe in a single call to printf
#40Earlier quoted context omitted.
Where? int main() { while(*d) printf(fmt, arg); }
On line 57: https://github.com/carlini/printf-tac-toe/blob/master/printt...