For challenges involving doing something at compile-time, rather than run-time. This means that only compiled languages can compete.

learn more… | top users | synonyms

21
votes
6answers
1k views

Bloatware contest: producing 100+ MiB executable

Create short source code in your favourite compiled language that compiles into a big (not less than 104857600 bytes) executable file. The program must be runnable (assuming 1GB of free memory) and ...
1
vote
1answer
250 views

Generate numerical permutations with conditions and template metaprogramming

This, but via template metaprogramming: template <int n> struct insanity { int[][n] permutations; } Generate all numbers with n digits (0-9) such that each digit is either: Zero The first ...
22
votes
13answers
2k views

Crash your favorite compiler

Write a perfectly legal code in a decent language of your choice whose compiling will either crash the compiler or send it into an infinite loop (infinite compile time). Restrictions: Use a ...
12
votes
7answers
4k views

Compute the CRC32 table at compile-time

The reference implementation of CRC32 computes a lookup table at runtime: /* Table of CRCs of all 8-bit messages. */ unsigned long crc_table[256]; /* Flag: has the table been computed? Initially ...
26
votes
4answers
4k views

Solve the eight queens problem at compile-time

Can you solve the eight queens puzzle at compile-time? Pick any suitable output format. I'm particularly interested in a C++ template metaprogramming solution, but you can use languages that have ...