Best of show – abuse of libc
ioccc.org
Best of show – abuse of libc
1–10 of 84 posts
Re: Best of show – abuse of libc
#2General thread here: https://news.ycombinator.com/item?id=25651942
Re: Best of show – abuse of libc
#3awesome. I didn't know about that printf hack....time for some fun experiments
Re: Best of show – abuse of libc
#4General thread here: https://news.ycombinator.com/item?id=25651942
Thanks for nothing, dang!
Re: Best of show – abuse of libc
#5>Format specifiers can take extra “arguments”. - "%hhn": store the number of bytes written mod 256 to the char pointer ...
Oh boy. I'll put that down for my "thing I don't think I wanted to know" of the day.
Re: Best of show – abuse of libc
#6General thread here: https://news.ycombinator.com/item?id=25651942
Thanks for all, dang !
Re: Best of show – abuse of libc
#7Up next: a C compiler that compiles to printf statements :-P
Re: Best of show – abuse of libc
#8> Format specifiers can take extra “arguments”. - "%hhn": store the number of bytes written mod 256 to the char pointer ... Oh boy. I'll put that down for my "thing I don't think I wanted to know" of the day.
There is some innocent beauty in the twistedness of printf - especially with GNU extensions.
Re: Best of show – abuse of libc
#9Up next: a C compiler that compiles to printf statements :-P
https://github.com/HexHive/printbf
well this is a brainfuck interpreter inside printf. I’m pretty sure there are plenty of c-to-bf transpilers.
Re: Best of show – abuse of libc
#10How did printf end up here in the first place? Decades of feature additions, or were these features a part of an early spec?