github.com/fgaz/pure-html-calc

A pure HTML calculator. No css or javascript.

Open this visualization on its own page →

Contributors

1

Lines of Code

7

From

2015-01-19

To

2017-12-22

About fgaz/pure-html-calc

This is a Haskell project that generates a fully functional calculator as static HTML files with no CSS or JavaScript dependencies. The calculator works by pre-computing every possible arithmetic result for two two-digit numbers and an operator at build time, then creating a separate HTML file for each calculation result. Users navigate between results by clicking links in the generated pages.

The project is intentionally minimal and somewhat whimsical, as suggested by the "Because why not?" tagline. It demonstrates an extreme approach to web development where all interactivity is replaced by pre-rendered static pages. The tradeoff is significant: since every possible calculation combination must be generated as its own HTML file, the build output weighs hundreds of megabytes. The author warns that running the build script with runhaskell will consume non-linear space, and recommends compiling the Haskell code first for better performance.

Share this video