A developer built a >60 FPS voxel game in Dyalog APL after 9 months of learning, then replaced a beloved one-liner face-culling expression that cut VRAM from 261 MB to 72 MB.
Key Takeaways
The original face-visibility line uses outer-product shifts on a 16x128x16 boolean array to detect exposed chunk faces, inspired directly by the APL Game of Life one-liner.
Replacing wrap-around edge logic with zero-padded shifts dropped vertex count from 31.4M to 6.2M and render time from 11.2 ms to 2.14 ms on Metal.
APL’s array primitives let the author hold the entire culling algorithm in working memory, enabling optimization during walks and meals without a computer.
The benchmark shows the core operation runs in ~61 microseconds per chunk on a 16x128x16 array in Dyalog 20.0.
Adám Brudzewsky reviewed and tightened the original expression; the refined version was presented at DYNA26 before being retired.