back
53 comments
Fabrice Bellard (the wizard behind FFmpeg, QEMU, etc.) has his own entry, which I find amazing: a ~4 kB program that outputs a ~50 kB image (of Lena), in addition to being able to decompress other images. His entry's hint page: http://www.ioccc.org/2018/bellard/hint.html
Here's the default output (embedded 1220 byte 128x128 Lena picture) of Fabrice's IOCCC entry converted into PNG:

https://pasteboard.co/Hk60KEv.png

Of course there are plenty of compression artifacts, but very impressive for just 1220 bytes of image data embedded in decompressor written in C totaling only 3984 bytes of source code!

No idea about what kind of service pasteboard.co is, hopefully the image will stay up for a while...

Edit: For comparison, here's a roughly corresponding original Lena image converted into 1269 byte 128x128 JPEG.

  convert -resize 128x128 -strip -quality 12% lena.png lena.jpg
https://pasteboard.co/Hk67yXC.png
> No specific obfuscation was needed as the algorithms already have a significant complexity.

Hehe...

Funny, the compiler seems to have a hard time with it. Running it OTOH is instant.
It's a 3KB decoder and 1KB of image data, from the hint: "The actual image data is 1220 byte long, which gives a compression ratio of 40"
Can you explain a bit more how this works? I am not familiar at all with these challenges

50kB to 4kB is a 10x compression, it doesn't seem that huge, what's the achievement here?

From the author's comments:

"The uncompressed image is 12 times larger than the source code of the program which includes the image data and the complete decoder. The actual image data is 1220 byte long, which gives a compression ratio of 40. Using a JPEG-like algorithm would not be enough to reach this level of compression (the Lena image would be barely recognizable). So the algorithm is based on the latest advances in image compression."

http://www.ioccc.org/2018/bellard/hint.html

Achieving 10x compression in a 4kB program+data file hybrid is pretty hard to do.
From the author’s notes:

> The actual image data is 1220 byte long, which gives a compression ratio of 40.

Those 4k include the decoder source code and the C string representation of the image data
For those using iTerm, a nice way to try this out is running it through imgcat:

  make && ./prog < lena512.bin | imgcat
If you have ImageMagick installed the `display` utility can also show PPM images from stdin:

    ./prog < lena512.bin | display
---

btw, the `animate` program can also be used to display the animated GIFs from endoh1.

Is there a program available somewhere to generate our own compressed image (.bin) files?
Almost certainly not yet. The compression method seems to be pretty advanced, borrowing ideas from h.264 etc. and is almost certainly incompatible with any currently existing format.

If we're lucky, Bellard might eventually post an image compressor program on his website at https://bellard.org/.

GIMP?
Didn't he come up with a custom image compression scheme? Or am I understanding this wrong?
Christopher Mill's "Best of Show" pdp-7 emulator is seriously impressive. How is this even possible in such a small program?
An IOCCC Judge here. We are rather fond of this one. The "prog" variant allows you to build and run the mullender entry from the first IOCCC http://www.ioccc.org/years.html#1984. The source is provided in the image, as is the compiler.
The source code is a punchcard...

http://www.ioccc.org/2018/mills/prog.c

Anyone able to decode what is "punched" into it?

  > # There is no 2016 IOCCC contest
  > # There is no 2017 IOCCC contest
Anybody know why?
An IOCCC Judge here. Sure, a variety of things! A competition can take about 4 full weekends of time ~128hrs total (Fri:6+Sat:16+Sun:10 x 4) to set up, judge and release the results. Getting 3 independent and very busy people coordinated with work, travel and major life events going on can get quite difficult. Recently we've opted to not start a competition if we do not pre-schedule the weekends for completing it! The result is that 2016 and 2017 could not happen.
Thanks! And thanks for taking the time to organise these competitions when you can, they're truly edifying.
poikola:

    X enum  {T,F}  z; //True & False

    #define E {
    #define B }
Old ideas, but they'll still catch people out.

It's interesting to see how well, or badly, the syntax colourization in NeoVIM copes with the various entries.

Yang's spoiler.html is actually super interesting as it's a live coding session for the entire program essentially. Also I thought the program name looked familiar when it said nuko, it's from the manga/anime Shoujo Shuumatsu Ryokou. It's a cute little thing that likes to eat technology, looks like this one's eaten four programs!
Don Yang provided a video of how he wrote the code and transformed it into the obfuscated version (see spoiler.html). It is as interesting as the final result itself.
Yusuke Endoh's "Best Use of Python" entry is a memetic masterpiece
Anyone else feel that their URL should be cocic.gro ?
hugged to death?
I have tried navigate the page, but I still have not figured out what the goal was this year, who won, with which program and what has been obfuscated in it. Is there a better summary of this contest somewhere? Is there a link I'm missing?
rules.txt contains rules and the overarching goals of the IOCCC, not the particular theme/goal for this year, and now I've wasted a few minutes poking through it to make sure. Thanks a lot.
I don't think there are any "goals" to the IOCC beyond writing the most clever and obfuscated code. There are only rules limiting what's acceptable.
Are you perhaps thinking of the underhanded code contest?
I am! Good catch, that explains my confusion. :-)
The page / site really needs a redesign and a bit of writing done.

I'm actually of a mind to start a new webpage that does just that, but there might be some copyright issues there.

> Creative Commons License. This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Should be fine, no?

I'm not sure what copyright issues (writing or code or?) you are concerned about, but you should be able to get around them with a little planning. Just don't outright copy stuff.
Or just get in touch with the people behind the site and ask for explicit permission. Seems the simplest way to be sure, no?
An IOCCC Judge here. Do you want to volunteer? What do you have in mind? Please contact us at j.2018@ioccc.org and include "IOCCC 2018" in the subject line. Thanks!
right at the top are a couple of links like rules.txt and whowon.html, those might explain a bit more
And they say Perl is unreadable
Funny enough, the creator of Perl's previously well known accomplishment was winning these contests pretty much any time he cared to join. Take that as you will.
You know this competition is old when they still use .text files
Stuff that works doesn't need fixing.

It's very liberating, when you don't need to chase a trend.

The trend of three letter file extensions has been around since about 1989?