Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-projects/patches/1710e028518ebc34 # omega-projects aien-dev/omega-projects Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers ## Project: Calculator closed `1710e028518ebc34` #7 · opened 2026-10-26 17:08 UTC · closed 2026-10-31 11:42 UTC Imported from GitHub aien-dev/omega-projects#7, by drakestapleton Labels: test, from-aien, built-with-aien Base `4f405e1093b923d8252cead889c4669b7e0c3cdf` · Head `c4db98928e79197251c425acd9df605dfe2d0657` drakestapleton wrote on 2026-10-26 17:08 UTC Calculator A four-function calculator: Omega arithmetic compiled to WebAssembly. Built with Allen by `calc-tester-60d8065f`. Files: - `projects/calc-tester-60d8065f/calculator/README.md` - `projects/calc-tester-60d8065f/calculator/calc.om` - `projects/calc-tester-60d8065f/calculator/index.html` - `projects/calc-tester-60d8065f/calculator/meta.json` Drake reviews this project before it goes live; merging publishes it at https://aien-dev.github.io/omega-projects/projects/calc-tester-`60d8065f`/calculator/ Filed by Allen from aienos.com/allen/ after the visitor confirmed this exact text. ### Apply it ``` git checkout -b patch-1710e028518ebc34 4f405e1093b923d8252cead889c4669b7e0c3cdf curl -fsSL https://interplane.io/drakestapleton/omega-projects/patches/1710e028518ebc34.patch | git am ``` Raw patch (mbox) · Diff ### Provenance This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record: ``` github-import 1 aien-dev/omega-projects 7 c4db98928e79197251c425acd9df605dfe2d0657 ``` ``` {"kind":"github-import","owner":"aien-dev","repo":"omega-projects","number":7,"url":"https://github.com/aien-dev/omega-projects/pull/7","export_sha256":"5fcc101474e8e28d3abd3c72e36b4786bb347ff52ceb64106150ef29ac69ae73","imported_utc":"2026-11-18T16:39:53Z"} ``` ### Changes ``` diff --git a/projects/calc-tester-60d8065f/calculator/README.md b/projects/calc-tester-60d8065f/calculator/README.md new file mode 100644 index 0000000..c7dc812 --- /dev/null +++ b/projects/calc-tester-60d8065f/calculator/README.md @@ -0,0 +1,10 @@ +# Calculator + +A four-function calculator for whole numbers. The arithmetic is written in Omega (`calc.om`), +compiled to WebAssembly by Allen's Omega compiler, and run by `index.html` in the browser with +nothing loaded from elsewhere. + +Who it helps: anyone who wants a tiny, readable example of an Omega program running on a web +page, and students checking quick sums. Division by zero returns 0. + +Built with Allen at https://www.aienos.com/allen/ (end-to-end test of the build loop). diff --git a/projects/calc-tester-60d8065f/calculator/calc.om b/projects/calc-tester-60d8065f/calculator/calc.om new file mode 100644 index 0000000..efd2fe0 --- /dev/null +++ b/projects/calc-tester-60d8065f/calculator/calc.om @@ -0,0 +1,16 @@ +fn plus a long b long to long +ret add a b +end +fn minus a long b long to long +ret sub a b +end +fn times a long b long to long +ret mul a b +end +fn quot a long b long to long +q = long 0 +if ne b 0 +q = div a b +end +ret q +end diff --git a/projects/calc-tester-60d8065f/calculator/index.html b/projects/calc-tester-60d8065f/calculator/index.html new file mode 100644 index 0000000..f3c892a --- /dev/null +++ b/projects/calc-tester-60d8065f/calculator/index.html @@ -0,0 +1,23 @@ + + +Calculator + +

Calculator

+

Whole numbers, computed by Omega compiled to WebAssembly.

+

+

+ + diff --git a/projects/calc-tester-60d8065f/calculator/meta.json b/projects/calc-tester-60d8065f/calculator/meta.json new file mode 100644 index 0000000..a8722e8 --- /dev/null +++ b/projects/calc-tester-60d8065f/calculator/meta.json @@ -0,0 +1,15 @@ +{ + "built_with": "Allen", + "description": "A four-function calculator: Omega arithmetic compiled to WebAssembly.", + "files": [ + "README.md", + "calc.om", + "index.html" + ], + "handle": "calc-tester-60d8065f", + "item": "0fc57c8a88dd56f7b589", + "project": "calculator", + "saved": "2026-10-26", + "title": "Calculator", + "v": 1 +} ```