Colophon
This page is about smoot, a calculating notepad: where the name comes from, what came before it, the ideas it rests on, and what it is built with.
The name
Section titled “The name”A smoot is a unit of length: 5 feet 7 inches, or 1.7018 metres.
1 smoot to feet, inches
1 smoot to metresIn October 1958, Oliver Smoot, a pledge of MIT’s Lambda Chi Alpha fraternity, lay down again and again on the Harvard Bridge, between Boston and Cambridge, so that his fraternity brothers could measure it by his height.
One smoot is thus defined as Oliver Smoot’s height in 1958.
The bridge came to 364.4 smoots, plus or minus one ear. The marks are still painted on the pavement, one every ten smoots.
Oliver Smoot later chaired the American National Standards Institute and was president of the International Organization for Standardization.
The calculating notepad smoot knows the unit. MIT’s student radio station, WMBR, gives its wavelength as two smoots:
import "physics/constants"
bridge = 364.4 smoot
bridge to m
c / 88.1 MHz to smootPrior art
Section titled “Prior art”The smoot notepad joins a line of calculators that understand units:
- Soulver, the notepad calculator smoot most resembles.
- Numbat, a statically typed language for physical units.
- Frink, a language that tracks units through every calculation.
- Qalculate!, a desktop calculator with units, currencies, and symbolic algebra.
- GNU units, the command-line converter, and its long file of unit definitions.
Further reading
Section titled “Further reading”The ideas smoot rests on, by the part of smoot that uses them.
The parser
Section titled “The parser”- Vaughan R. Pratt, “Top down operator precedence”, POPL 1973. Every operator’s precedence is declared in smoot’s prelude, and one precedence-climbing loop parses them all, juxtaposition included.
The solver
Section titled “The solver”- Alan Bundy and Bob Welham, “Using meta-level inference for selective application of multiple rewrite rule sets in algebraic manipulation”, Artificial Intelligence 16(2), 1981. Solving an equation as choosing which rewrite rules to apply. An unknown is isolated using the inverses that smoot’s prelude declares.
- Leon Sterling, Alan Bundy, Lawrence Byrd, Richard O’Keefe and Bernard Silver, “Solving symbolic equations with PRESS”, Journal of Symbolic Computation 7(1), 1989. Isolation and collection: the two moves smoot makes when it isolates an unknown and gathers like terms.
- Gerald Jay Sussman and Guy L. Steele Jr., “Constraints — a language for expressing almost-hierarchical descriptions”, Artificial Intelligence 14(1), 1980. Relations that run in any direction, like smoot’s formulas: known values propagate first, and only genuinely coupled equations are solved together.
- Franz Baader and Tobias Nipkow, Term Rewriting and All That, Cambridge University Press, 1998. Rewrite rules, and why a set of them stops. smoot’s identities are rewrite rules.
- Eelco Visser, Zine-el-Abidine Benaissa and Andrew Tolmach, “Building program optimizers with rewriting strategies”, ICFP 1998. Rewriting with an explicit traversal (top-down, bottom-up, innermost first), as each of smoot’s solver strategies chooses its own.
The document
Section titled “The document”- A. B. Kahn, “Topological sorting of large networks”, Communications of the ACM 5(11), 1962. Lines are evaluated in the order their dependencies need, like a spreadsheet, with Kahn’s algorithm.
Units, numbers and dates
Section titled “Units, numbers and dates”- Andrew Kennedy, “Types for units-of-measure: theory and practice”, 2010. Dimensions checked as types.
- The International System of Units, the SI Brochure, 9th edition, 2019.
- Mike Cowlishaw, General Decimal Arithmetic.
Why
0.1 + 0.2should equal0.3. - The Revised⁷ Report on Scheme,
§6.2, 2013. Exact and inexact numbers. In smoot,
1/3stays exact until something inexact touches it. - Temporal, JavaScript’s date and time proposal. Instants, calendar dates and durations kept apart.
Built with
Section titled “Built with”- The engine is written in Rust. Exact arithmetic uses dashu. Dates, times, and time zones use jiff.
- The app runs the engine in your browser as WebAssembly, with Svelte, CodeMirror and Vite.
- These docs are built with Astro and Starlight.
- The wordmark is drawn from Archivo Black. The docs are set in Spectral.
Exchange rates are the European Central Bank’s euro reference rates, fetched each day through Frankfurter. They are published for information, not for trading.