Formin

From Esolang
Jump to navigation Jump to search
Formin
Designed by User:CapinolDev
Appeared in 2025
Computational class Turing-complete
Reference implementation https://github.com/CapinolDev/Formin/blob/main/interpreter.f95
File extension(s) .fmn
Official Formin logo


Formin is an esoteric programming language created by User:CapinolDev in 2025.

It uses a symbolic, label-driven syntax with commands enclosed between #/ and /#. Programs are executed sequentially, but can jump between labeled sections using mark# and go# commands, creating a unique flow-based execution model.

Overview

Formin source files use a compact, tokenized structure:

command#/token1|token2|token3/#

Strings are enclosed in single quotes ('text'), while variables are referenced directly.

Example:

create#/greeting|'Hello, World!'/#
spew#/greeting/#
bye

Computational class

Formin is Turing-complete because it supports arbitrary loops (`mark#/go#/ifgo#`), mutable variables, and conditional branching, allowing it to simulate a Minsky machine.


Example

A simple Tic-Tac-Toe program demonstrates how Formin handles variables, branching, and flow markers:

create#/validator|0/#
create#/checkNum|0/#
color#/green/#
spew#/Welcome to tic tac toe!/#
color#/reset/#
go#/initBoard/#
mark#/initDone/#

(Full example available on the GitHub repository.)

Commands

Command Description
create# Define or update a variable.
spew# Print text with automatic spaces.
spewmult# Print without automatic spacing.
color# Change terminal color (e.g. green, red, reset).
mark# Define a label to jump to.
go# Jump to a marker.
ifgo# Conditional jump using is, isnt, >, <, etc.
add#, sub#, mult#, div# Basic arithmetic operations.
ask# Prompt the user and store input in a variable.
open#, read#, close# Simple file handling commands.
clear# Clear the terminal screen.
bye Terminate execution.

Implementation

The official Formin interpreter is written in Fortran 95. It performs a two-pass parse:

  1. Scans all mark#/ labels.
  2. Executes each command sequentially with conditional branching support.

The interpreter and example programs are available on GitHub.

License

  • Interpreter — MIT License
  • Logo — CC BY-SA 4.0
  • Documentation — CC BY-SA 4.0

External links