{"id":24086433,"url":"https://github.com/electrikmilk/aml","last_synced_at":"2026-06-17T09:32:07.784Z","repository":{"id":128798567,"uuid":"523471201","full_name":"electrikmilk/aml","owner":"electrikmilk","description":"Interpreted math equation language 🧮","archived":false,"fork":false,"pushed_at":"2023-04-08T15:05:45.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-22T09:19:51.198Z","etag":null,"topics":["calculator","interpreter","language","math","math-language","parser","programming-language"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/electrikmilk/aml?tab=doc","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electrikmilk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-10T19:25:15.000Z","updated_at":"2023-04-05T00:27:18.000Z","dependencies_parsed_at":"2023-05-06T03:16:37.724Z","dependency_job_id":null,"html_url":"https://github.com/electrikmilk/aml","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/electrikmilk/aml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Faml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Faml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Faml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Faml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electrikmilk","download_url":"https://codeload.github.com/electrikmilk/aml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electrikmilk%2Faml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34443232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","interpreter","language","math","math-language","parser","programming-language"],"created_at":"2025-01-10T01:57:58.523Z","updated_at":"2026-06-17T09:32:07.779Z","avatar_url":"https://github.com/electrikmilk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AML\n\n[![Build](https://github.com/electrikmilk/aml/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/electrikmilk/aml/actions/workflows/go.yml)\n[![Releases](https://img.shields.io/github/v/release/electrikmilk/aml?include_prereleases)](https://github.com/electrikmilk/aml/releases)\n[![License](https://img.shields.io/github/license/electrikmilk/aml)](https://github.com/electrikmilk/aml/blob/main/LICENSE)\n[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://pkg.go.dev/github.com/electrikmilk/aml?tab=doc)\n[![Go Report Card](https://goreportcard.com/badge/github.com/electrikmilk/aml)](https://goreportcard.com/report/github.com/electrikmilk/aml)\n\nAML (Arith-Metic Language) is an interpreted math equation language. You can either use the interactive shell by running\nthe interpreter with no arguments, or with a file ending in .aml by passing the name of the file as an argument.\n\nBuild latest release:\n\n```console\ngo install github.com/electrikmilk/aml@latest\n```\n\nBuild from source:\n\n```console\ngo build\nsudo mv aml /usr/local/bin\n```\n\nRun the interpreter with no arguments to enter the interactive shell:\n\n```console\naml\nEnter \"q\" to quit\n\n\u003e _\n```\n\nRun with an AML file:\n\n```console\naml file.aml\n```\n\nRun tests after building:\n\n```console\ngo run tests.go\n```\n\n---\n\n## Syntax\n\nAML can interpret human readable equations, no extra syntax is required beyond standard mathematical syntax.\n\n\n| Operator     | Action                       |\n|--------------|------------------------------|\n| +            | Add                          |\n| -            | Subtract                     |\n| *, × (times) | Multiply                     |\n| /            | Divide                       |\n| %            | Modulus (division remainder) |\n| ^            | Denote Exponent              |\n| (            | Start closure                |\n| )            | End closure                  |\n| =            | Equality                     |\n| var          | Denote variable              |\n| const        | Denote constant              |\n\nEach equation must be on its own line.\n\nBasic arithmetic operators should only be in between integers (or decimals).\n\nExpressions (a statement of integers and operators) may be inside of closures and calculated separately, but operands\nmust follow and precede closures. Closures will be evaluated separately in order.\n\n```aml\n5 * (8 + 4) / 8\n```\n\nExponents are supported by following an integer or decimal with the `^` operator and following it with another integer or decimal.\n\n```aml\n2^4 * 16\n```\n\nComments are allowed, but must either be on their own line or at the very end of a line. Comments are denoted using `#`.\n\n```aml\n# This is a comment\n\n2 + 2 # equals 5\n\n# This is a\n# multiline\n# comment\n```\n\nVariables and constants are supported, but currently must be only one character long.\n\n```aml\nvar x = 10\nconst y = 10\nx * y\n```\n\nVariables can be reassigned, while constants cannot. Variables and constants must all have unique identifiers.\n\nVariables and constants must either be an integer, decimal or exponent.\n\n---\n\n## Error Handling\n\nWhen an input is found to be invalid during or after parsing, a detailed error message will be printed showing the exact line and column that is invalid.\n\n![Error Handling](https://i.imgur.com/1dOgEGS.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrikmilk%2Faml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectrikmilk%2Faml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectrikmilk%2Faml/lists"}