EML (EML Machine Language) is a simple programming language built around the eml(x,y) function.
  • Python 94.1%
  • Shell 5.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-04-25 15:35:41 -04:00
.github/workflows Update stdlib.yml 2026-04-25 15:35:41 -04:00
stdlib Format JavaScript code 2026-04-25 19:34:39 +00:00
eml.nanorc Add files via upload 2026-04-25 14:15:41 -04:00
eml.py Add files via upload 2026-04-23 20:13:28 -04:00
LICENSE Initial commit 2026-04-23 19:47:48 -04:00
preprocess.py Rename linker.py to preprocess.py 2026-04-25 15:22:18 -04:00
README.md Update README.md 2026-04-24 13:06:01 -04:00

eml

EML (EML Machine Language) is a simple programming language built around the eml(x,y) function.

This project was inspired by this paper on arXiv, describing a single mathematical function capable of implementing a wide variety of arithmetical operations.

Language reference

Invoking eml(x, y)

The syntax for invoking eml(x, y) is x y, where x is the first argument and y is the second one.

Multiplying the ans variable by -1

To multiply the ans variable by -1, use the inv command with no arguments.

Showing help

To show the built-in help, type h.

Ending program

To end the program, use the q command or send the end-of-file character (Ctrl+D on most Linux machines).

Subroutines

EML has no built-in support for functions, jumping, or logic, but it is possible to produce a basic form of subroutine by copy-pasting pre-written code and using variables to pass data around.

Convention is to use lowercase w, x, y, z, and so on for subroutine inputs, and the ans variable for the finished output as well as any intermediate steps.

Setting a variable

To set a variable, you use the set command, like this: set x 5. ans can also be set like a variable.

Using a variable

Putting a variable's name anywhere in a command invocation (except the first argument of the set command) will have it substituted to a value before the command is executed.

Standard library

A basic standard library is available for eml:

  • epow.emlprg: compute e^x
  • ln.emlprg: compute ln(x)
  • subtract.emlprg: compute x-y
  • add.emlprg: compute x+y

For information on using these in your program, see the Subroutines section.

Using the linker

EML comes with a basic linker script (named linker.py) that lets you include code from other files by putting an exclamation mark followed by a filepath in your program (for example, !stdlib/ln.emlprg).

It accepts an unlimited number of arguments; each argument should be a path to a file that the linker should modify.