Simpler

From Esolang
Jump to navigation Jump to search

Simpler is an esolang by User:Yeetb01. It is a stack-based concatenative language.

What stuff does

  • 0-f Push hexadecimal digit onto stack
  • add Stack = a b, Does b+a
  • sub Stack = a b, Does b-a
  • mul Stack = a b, Does b*a
  • div Stack = a b, Does b/a
  • mod Stack = a b, Does b%a
  • squ Square top of stack
  • cub Cube top of stack
  • pow Stack = a b, Does b^a
  • sqr Square root top of stack
  • cbr Cube root top of stack
  • nrt Stack = a b, Does bthroot(a)
  • dup Duplicates top of stack
  • inc Increments top of stack
  • dec Decrements top of stack
  • inn Input number on top of stack
  • ina Input ASCII on top of stack
  • prn Print value
  • pra Print ASCII value
  • tgl Toggle between stack 1 and stack 2
  • grt Stack = a b, If b > a then true else false
  • lst Stack = a b, If b < a then true else false
  • eql Stack = a b, If b = a then true else false
  • if[expression][ If expression is true, do these commands until ] else do following es[
  • es[ Defined in if[
  • dw[expression][ Do while expression is true until ] and repeat until expression is false.

Syntax

Line breaks or spaces in between the commands and the last brackets '[' and ']' in if[ and dw[

Like this:

5 4 mul f 4 add if[eql][

16 7 mul dup pra 2 add a squ 5 add pra b a mul dup pra 6 add pra

]

prints "print"