Esolang based on pattern manipulation with a TIS-100 inspired syntax.
Sequential is a dynamic, hybrid programming language designed for the noir sci-fi world of Onyx Black - a far future that's really just the 1960s in space. It's the in-universe language used to program Semi-Linear Computers (SLCs), capable of running in both analog and digital modes. Features include:
- Pattern-based programming with sequence manipulation
- Hybrid analog/digital data processing capabilities
- Register-based architecture with special 'PILE' stack operations
- Unique 'magnetic autotape' inspired memory model
- Designed to bridge the gap between analog and digital computing
This project provides a web-based interpreter for Sequential, allowing users to write, execute, and visualise basic Sequential code in a browser environment.
- Patterns: The basic unit of code in Sequential. Each pattern is a named sequence of instructions.
- Sequences: Defined collections of patterns that determine the order of execution.
- Registers: Storage locations for data. Sequential uses a register-based architecture.
- PILE: A stack-like structure for temporary data storage. Think a FILO clipboard.
- Magnetic Autotape: The conceptual model for memory in Sequential, inspired by analog tape storage.
Sequential supports a variety of operations, including:
SEQD
: Define a sequence of patternsPTIN
: Initialize a new patternPEND
: End a pattern definitionPSTR
: Start executing patterns from the sequence definition
INIT
: Initialize a register with a valueMOVE
: Move data between registers or from a literal to a registerLIFT
: Push a value onto the PILEDROP
: Pop a value from the PILE into a register or to output (TTY0)
ADDV
: Add valuesSUBV
: Subtract valuesMULT
: Multiply valuesDIVV
: Divide values (integer division)INCR
: Increment a valueDECR
: Decrement a value
WAIT
: Pause execution, simulating waiting for inputPJMP
: Jump to a specific pattern
SEQD
INITSEQ
CALCSEQ
OUTPUTSEQ
SEQD
PTIN INITSEQ
INIT X 5
INIT Y 3
MOVE "Hello, Sequential!" ECHO
LIFT ECHO
PEND
PTIN CALCSEQ
ADDV X Y
MULT X Y
INCR X
DECR Y
PEND
PTIN OUTPUTSEQ
DROP TTY0
MOVE X ECHO
LIFT ECHO
MOVE Y ECHO
LIFT ECHO
WAIT
PEND
This program initializes two registers, performs some calculations, outputs a message, and then outputs the final values of the registers.
- Enter your Sequential code in the provided text area.
- Click the "Run Code" button to execute the program.
- The output will be displayed in the "Output" section.
- The final state of all registers will be shown in individual boxes in the "Registers" section.
- Check the browser's log for more details on control flow and state.
This interpreter is implemented in JavaScript and runs entirely in the browser. It provides a simplified simulation of a Semi-Linear Computer, focusing on the core concepts of Sequential without implementing the full complexity of analog/digital hybrid computation. It does not support mode switching or +/- operation prefixing, but I aim to include these in future releases.
- This interpreter operates in a purely digital mode and does not simulate analog operations.
- Some advanced features of Sequential, such as interrupt handling, are not implemented.
- The interpreter does not implement a true magnetic autotape system; instead, it uses JavaScript objects to simulate memory.
- Conditional operations using the TEST and +/- instructions are not implemented.
Contributions to improve the interpreter, add new features, or expand the Sequential language specification are welcome. Please feel free to submit issues or pull requests.
GPL3
Onyx Black is a fictional world created by Ruby Morgan Voigt. If you'd like to read more about Onyx Black, check out Last Edited, an encyclopaedic thriller made to expand and explain the world in greater detail. Find Last Edited at https://almanet.cc/.