this post was submitted on 11 Feb 2024
305 points (98.4% liked)

Programmer Humor

32710 readers
835 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
305
submitted 11 months ago* (last edited 11 months ago) by lawrence to c/[email protected]
 

Hacker News post about this: https://news.ycombinator.com/item?id=39309783 (source available)

you are viewing a single comment's thread
view the rest of the comments
[–] clericc 30 points 11 months ago* (last edited 11 months ago)

After 5 minutes of staring at it: Its typesystem sudoku. Each row and each col in the grid must add up to 15 (T<>), bit each number in the grid must be different (Df<>).

Grid will only be a type alias for the value true (google "Dependent types") only if all Type Parameters (wich are values) hold up to the Sudoku conditions).

The file would not compile with "true as Grid" when grid type-aliases to false.

Fun to understand.

EDIT: too late