Skip to content

Instantly share code, notes, and snippets.

@halfbyte
Created June 2, 2017 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halfbyte/3cba20fbd77a17b4b0312a4f47af600a to your computer and use it in GitHub Desktop.
Save halfbyte/3cba20fbd77a17b4b0312a4f47af600a to your computer and use it in GitHub Desktop.
Reformatted entry for IOCC, originally planned to be in my aesthetics of code talk
# From: http://ioccc.org/2015/mills2/hint.html
int I=256, l, c, o, O=3;
void e(int L) {
o=0;
for(l=8; L >> ++l && 16 > l; o += l << l - 1);
o += l * L - (l << l - 1);
if (pread(3, &L, 3, O + o / 8) < 2) exit(0);
L >>= 7 & o;
L %= 1 << l;
L >> 8 ?
256-L ?
e(L - 1),
c || (e(c = L), c = 0) :
( O += (-I & 7) * l + o + l >> 3, I = L) :
putchar(L);
}
int main(int l, char ** o) {
for(open(1[o], 0); ; e(I++));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment