HASH Ain't Simple Hash

Adam Štěpánek


A hash function maps arbitrary data to a fixed-size value. Usually, that value is a mere number. However, HASH is no usual hash function. No, HASH spins up a whole new operating system and then bends and fuses together scripts — both of my own and of my fellow students — and spits out a brand new image.


I may have bent the definition of a hash function a little. HASH doesn’t produce values of fixed-size in bytes, but in resolution.



  • Docker A tool that runs other tools inside an isolated operating system.

  • Bash A script interpreter.

  • PowerShell — Another script interpreter.

  • Processing A Java library for generative sketches.

  • p5.js A Processing clone written in JavaScript.

  • Firefox — A web browser / p5.js renderer.

  • Blender — A 3D modeling and rendering tool.

  • ImageMagick — A command-line tool that changes images.

  • Libman — A library manager that isn’t npm.

  • Xvfb — A dummy X server.

Code Snippet

My favourite piece of code from HASH: a bash function that starts a simple http server, runs Firefox on a given p5.js sketch, and waits until a valid PNG file appears.


You can download and explore this app at gitlab.fi.muni.cz/xstepan1/hash.