Kim Pyeong Gwon

GitHub single-file operation-line challenge

Even a metric as simple-looking as 'lines of code' cannot be measured fairly without precise rules. I designed a challenge specification anyone can reproduce and verify under the same conditions.

  • Rules: fit as many distinct real operation lines derived from a = 1, b = 1 as possible into a single source file, with a final output of 2, in any language.
  • Fairness: every accepted line must connect directly or indirectly to the inputs; plain aliases, duplicates, blank lines, comments, and declaration-only lines are excluded, and a long line still counts as one.
  • Reproducible verification: runs within ten minutes on Azure Standard_D4s_v5 (4 vCPU, 16GiB, Ubuntu 24.04), prints 2 to stdout, exits 0. A line-based verifier and tests are included.
  • Handling rule changes: if GitHub's single-file size limit changes, classes are re-set and past records are kept with the limit, commit, and file hash of the time; records under different limits are compared by lines per MiB.
  • Contents: per-language examples (100+ lines each), identity-transformation patterns, a constraints JSON, and a language suitability table.

See also