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.

Soliloquy

From Esolang
Jump to navigation Jump to search

Soliloquy is an esoteric programming language by User:Dragoneater67. It is inspired by an older discarded draft of котята-арбузята.

Overview

The program is a folder with files. Each file must have the extension .slq, files that do not have the extension are ignored. The code in the files is run in parallel (e.g. each file has its own concurrent thread). Each file must start with an address definition, which does not count as a line:

@xxxxxxxxxxxxxxxx

Where each x is a hexadecimal digit. The defined address belongs to its respective thread and is used for inter-thread communication. Duplicate addresses are allowed. The rest of the file is a newline-separated list of instructions that gets executed top-to-bottom. Each thread halts on EOF. Each thread's memory is stored in variables, they are implicitly defined upon first reference. Each variable stores an unbounded nonnegative integer and is initialized to 1. Variable names can only contain uppercase characters. Each thread has an equality flag that stores a single bit, it is initialized to 0.

Instructions
Instruction Description
x@y Thread at address y jumps to line number stored at current thread's variable x if the current thread's equality flag is 0. If y is equal to the current thread address, the thread halts instantly. Lines are 1-indexed. Setting y to a non-existent thread implicitly creates a thread with the same code and memory as the current thread, then starts the execution at target line. If there are multiple threads with the same address, the jump happens in only 1 randomly-picked address. If target line is out-of-bounds, that thread halts.
x+y Add variable x to variable y, store the result in variable y.
x=y If the variables x and y are equal, set equality flag to 1, else, set equality flag to 0.
>x Output variable x mod 256 as an ASCII character.

The program halts only when all threads halt.