2026 Obfuscated C Code Contest winner generates and interprets FORTRAN

(From Slashdot)

Yesterday 2026’s International Obfuscated C Code Contest concluded, with 22 new winners announced in a special three-hour livestreamed ceremony!

One winning entry emulates an IBM 7040 mainframe, first converting a program (encoded in whitespace) into ASCII-character drawings of punchcards for a FORTRAN program — and then executing that program to calculate the light visible to an observer looking at black hole, ultimately creating an image. It’s all recreating what astrophysicist Jean-Pierre Luminet had to do in 1978 to generate the first-ever simulated photograph of a black hole (on an IBM 7040 mainframe). "The entry can also run other FORTRAN programs — but “they must be provided as a deck of punch cards… Tools have been provided to convert to/from decks and to interpret…”

2025/cesmoak - Retro space award

7 Likes

Beautiful! Thanks for sharing it.

Here is the source code: winner/2025/cesmoak at e489c2c788725decd69c8d7993bb38c2ddb3ace3 · ioccc-src/winner · GitHub

Here is the program deck using “punch cards” in ascii art: winner/2025/cesmoak/out.prog.deck at e489c2c788725decd69c8d7993bb38c2ddb3ace3 · ioccc-src/winner · GitHub. Nice idea.

1 Like

Super! The file out.print_1200x600.pgm (download it for viewing) is indeed similar to the figure 11 we can see in Luminet’s paper (he’s the only author), available here:
https://www.researchgate.net/publication/234464726_Image_of_a_spherical_black_hole_with_thin_accretion_disk

And here:
https://articles.adsabs.harvard.edu/pdf/1979A%26A....75..228L

So nice physics…

And a retrospectively moving conclusion:

The results are taken into account in Fig. 11, which represents the final result of this paper, namely a simulated “bolometric photography” of a static black hole with thin accretion disk.
Figures 9-11 are valid for a large number of black hole situations, i.e. black holes with any mass accreting matter at any rate sufficiently far below the Eddington limit. Thus our picture could represent many relatively weak sources, such as for instance the supermassive black hole whose existence in the nucleus of M 87 has been suggested recently by Young et al. (1978).
It is important to point out that for more spectacular sources such as quasars and Seyfert galaxies, the theory has not yet been developed enough to provide reliable models that could be visualized analogously.

2 Likes

While this has nothing to do with obfuscated C or black holes, I once reconstructed punch cards for the retirement party of a colleague. The idea was to “relive” some of the computing problems he started his career with - solving linear programming problems. So the punch cards represented such a - very small - problem.

2 Likes