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

223
votes
14answers
27k views

Build a Compiler Bomb

Introduction You're probably familiar with zip bombs, XML bombs, etc. Put simply, they are (relatively) small files which produce enormous output when interpreted by naïve software. The challenge ...
22
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
370 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 ...
34
votes
25answers
3k 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 ...
15
votes
8answers
7k views

Compute the CRC32 table at compile-time [closed]

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 ...
31
votes
5answers
5k 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 ...