Topple

From Esolang
Jump to navigation Jump to search

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

Development began on December 19th, 2024.

Topple 1.0, the first properly functioning version, was completed on June 22nd, 2025.

Overview

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
^ Calls variables
  • Does not ignore whitespace
a=1 a^. @ 1
! 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
+ 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

Special Characters

Character Description
\ New Line (\n)

Source Code

Topple Source Code

Example Code

Hello, world!

H.e.l.l.o. ,.~ .w.o.r.l.d.@!,

Hello, world! (but unnecessarily longer)

v=1
a=0
v.{
    a^.0.?.(H.e.l.)[
        a^.1.?.(w.o.r.)
    ]
    l.
    a^.0.?.(o. ,.~ . a=1)[
        a^.1.?.(d.)
        v=0
    ]
}
@!,

Computational class

Topple is Turing Complete.

...What else do I put? It can simulate any Turing machine thanks to the WHILE statement, it's pretty straightforward as far as Turing Complete languages go.

If anyone else who's 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.