ASCII fluid dynamics -- IOCCC2012 endoh1.c

Channel:Yusuke Endoh · Length:3:08 · Published:2013-11-24 · Views:1688364

Watch on YouTube

Summary

A 3-minute demo of a tiny IOCCC 2012 winning C program that simulates fluid dynamics in an 80x25 terminal, using any text (including its own source) as input. The video shows the simulation running to Handel's Water Music.

Why HN recommends it

Commenters repeatedly point to it as an astonishing, beautiful piece of obfuscated-C code golf.

truly a work of art — HN, 2023

C, C++, Rust, Go & systems languages · Computer graphics & rendering · Creative coding & generative art

Subtitles (excerpt)

[Music] the [Music] la [Music]

On Hacker News

My favorite 2D liquid simulator is this IOCCC2012 submission [1]... simply astonishing. That is the source file shown at the beginning of the video... it compiles without warnings, runs a full blown fluid dynamics sim with surface tension and everything, can take itself as its own input... truly a work of art. [1] [VIDEO] — 6502nerdface, 2023-02
This was written by Yusuke Endoh, who also wrote this submission to the IOCCC that I remember being arguably more astonished when I saw it for the first time: [VIDEO] (ASCII fluid dynamics). — daptaq, 2022-10
Yusuke Endoh is a god amongst men. His C program which creates an approximation of fluid dynamics from any text input is insane - [VIDEO] — yung_steezy, 2022-05
is this opensource? adding a cool fluid simulation to whatever you draw would be really fun. its like one of those ioccc vids - [VIDEO] — pwnfunction, 2025-10
The IOCCC also featured a very concise fluid simulator [1] [2], which can be seen in action in this video [3]. [1] [LINK] [2] [LINK] [3] [VIDEO] — tromp, 2024-05

Related videos