Topple

From Esolang
Jump to navigation Jump to search

Topple, created by User:H33T33, was developed using C.

Development began on December 19th, 2024.

The first working version of Topple was completed on June 22nd, 2025.

Overview

Single-Character Commands

Unless otherwise specified, whitespace in any given code example is purely for organization
Command Description Example(s) Output
. "Admits” a given character
  • Does not ignore whitespace
a. b. c. None
, Outputs characters w/o the need of admitting them
  • Does not ignore whitespace
a,b,c, abc
@ Outputs all admitted characters and deletes them a.b.c. @ abc
& Outputs all admitted characters without deleting them a.b.c. & abc
| Deletes all admitted characters a.b.c.| @ None
: Outputs an admitted character at a given index
  • Does not ignore whitespace
a.b.c. 0: a
; Takes admitted character from a given index and copies it.
  • Does not ignore whitespace
a.b.c. 0; @ abca
= Defines variables
  • Does not ignore whitespace
a=1 None
+ Increments an admitted character at a given index
  • Does not ignore whitespace
1.2.3. 0+@ 223
- Decrements an admitted character at a given index
  • Does not ignore whitespace
1.2.3. 0-@ 023
~ Clears console a.b.c. @ ~ None
* Quits the program

Multi-character Commands

None of these will ignore whitespace

Command Description Example(s) Output
^. "Admits" a given variable a=1 a^. @ 1
^+ Increments a given variable by 1 a=1 a^+ @ 2
^- Decrements a given variable by 1 a=1 a^- @ 0
! Takes user input !. @ Whatever the user inputs
? Compares the last two admitted values. Returns ‘1’ if the two are the same or ‘0’ if the two are not the same a.b.?. @ 0
# Returns a random number between 0 and 9 #. @ 0-9
<...> FOR Loop, loops based on the last admitted character 3.<a.@> aaa
(...) IF Statement, conditionally runs code based on the last admitted character 1.(a.@) a
[...] ELSE Statement, will run only if the last IF Statement did not 0.(a.@)[b.@] b
{...} WHILE Loop, Takes a given variable and loops for as long as it is non-zero
  • Variable does not need to be manually called
v=1 v.{a.@}

v=1 v.{a.@ v=0}

aaaaaaaaaaa...

a

_..._ Used for commenting _a.b.c.@_ None

Special Characters

Character Description
\ New Line (\n)

Source Code

Example Code

Computational class

Topple is Turing Complete.

...What else do I put? Topple could simulate any Turing machine, it's pretty straightforward as far as Turing Complete languages go.

If anyone more educated in Computational Classes would like to add/correct anything, please do so. I am NOT the guy to ask about this type of stuff.