5 ms·
One of 2004 IOCCC winners (2004/hibachi [1]) was an 154 line long CGI and vhost capable HTTP server [2]. It is one of a few winning entries that ever came with
by lifthrasiir 6y ago
One of 2004 IOCCC winners (2004/hibachi [1]) was an 154 line long CGI and vhost capable HTTP server [2]. It is one of a few winning entries that ever came with its own ./configure, and violated so many guidelines but not a single rule, making judges pretty upset. Its obfuscation was pretty basic even at that time and it won solely out of the novelty factor.
[1] https://github.com/ioccc-src/winner/blob/main/2004/hibachi.hint https://github.com/ioccc-src/winner/blob/main/2004/hibachi.h...
[2] https://github.com/ioccc-src/winner/blob/main/2004/hibachi.tar.gz https://github.com/ioccc-src/winner/blob/main/2004/hibachi.t... (yes, it is also probably the only winning entry that its source code is packaged into a tarball.)
- 13of40 6y agoI wish I could dig it up now, but years ago I ran a QA team that needed to validate that our equivalent of man pages could be downloaded on the fly with a command. The guy who owned it came up with a test plan that included setting up and maintaining a web server just for this purpose, and was dragging the project on for weeks until I sat through lunch one day and wrote him a bare bones HTTP server in Powershell that we could just start locally and talk to at run-time. I'm pretty sure the first cut of it was only like 50 lines of code.
- majkinetor 6y agoToday you can do it in single line.
- aflag 6y agoWhat is the sort of guidelines it violated?
- lifthrasiir 6y agoIt wasn't obfuscated at all. The guideline doesn't explicitly dislike such entries, but as a side effect of not being obfuscated it implicitly violated several guidelines at once (e.g. it was quite "longer than [it] need[s] to be"). Indeed, today's nginx source code [1] would be probably slightly more obfuscated than this code modulo perhaps name changes (and that can be considered as a minimal effort to get the entry within the size limit). Its only obfuscation was reusing a buffer from getenv() pre-initialized (referred as to "getenv() == "putenv()" in the hint). [1] for example, https://github.com/nginx/nginx/blob/8365f73/src/http/ngx_http_parse.c#L108-L128 https://github.com/nginx/nginx/blob/8365f73/src/http/ngx_htt...