We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

RegLike

From Esolang
Jump to navigation Jump to search
RegLike
Paradigm(s) Minsky machine
Designed by User:HadiMakesCodes
Appeared in 2026
Memory system Register-based
Computational class Turing-complete
Reference implementation Python and Css downloads
Influenced by Subleq
Addleq
Muxleq
Minsky machine
File extension(s) .rglq

RegLike is a programming language with 5 commands made by User:HadiMakesCodes and inspired by Subleq, Addleq, Muxleq and Marvin Minsky's Machine.

reglike
Reglike

Syntax

RegLike programs are a series of commands, each in its own line. Commands refer to registers and lines by their numbers. Lines are 1-indexed.

Commands
Command Purpose
(reg) (line) If not zero ,decrease (reg) val by 1, else jump to (line)
(reg) Increase (reg) value by 1
(reg)=(val) Defines The register id to a value
a(reg0)...(regn) Outputs the corresponding ascii decval of a (reg)
(reg)=i Defines the register id to the user input (Numerical)

For example this is a line using the first command:

0 4 

It means that IF register 0 is equal to 0 then jump to line 4, else decrease register 0 by 1 and go to the next line.

A line with only one number uses the second command:

0

It means it increases register 0 by 1.

A jump to a empty line or beyond the last line halts execution.

Examples

Examples use ; for line comments. This isn't part of standard RegLike syntax.

Adding 2 Numbers

0=i
1=i
2=0
0 7
1
2 3

For example 2 + 5 = 1 + 6 = 0 + 7, Final state of registers is 0 7 0 with answer in register 1.

Hello World Program

0=72
1=101
2=108
3=108
4=111
5=44
6=32
7=87
8=111
9=114
10=108
11=100
12=33
a0 1 2 3 4 5 6 7 8 9 10 11 12

Using ascii values it prints "Hello, World!"

Repeating

0=10
1=0 ;This is a zeroer
0 5
1 3 ;If reg1 is 0 goto line 3 

Repeats n Times

Truth Machine

0=i
1=49 ;Ascii 1
2=48 ;Ascii 0
3=0
4=99
0 11
0 8
4 12
a1
3 8
a2

If you type in 1 it prints 1, 99 times if you type in 0 it prints a singular 0

If Statements

0=i
1=65
2=66
3=0
0 9
0 7
a1
3 10
a2

If you input 0 it outputs A else if you output 1 it outputs B