Get the latest tech news

The JIT Calculator Challenge


Advent of code has come and passed, what should I do now with so much free time? Fear not! The JIT calculator challenge is here. 1. The challenge Back when Rust was in its infancy, the official website featured an example program to showcase the language’s syntax. It was a toy calculator, implemented as an interpreter in 20 lines of code. Why talk about website archaeology, though? We are not here for nostalgia’s sake, are we?

In case some of the terms above (e.g. JIT) are obscure to you, I have included a bunch of background knowledge later in this blog post to help you get started. When you visit a website, its linked Javascript source code gets downloaded, compiled and executed on the spot by your browser. You can test the code in the Rust playground using this link and compare it against the original calculator to confirm that the results are similar.

Get the Android app

Or read this on Hacker News