SDAPL

From Esolang
Jump to navigation Jump to search

SDAPL (Super Duper Awesome Programming Language) is a stack-based esoteric programming language created in 2026. It features a unique marker system for flow control instead of traditional loops and conditionals. Was created by User:ReddoYT, and also was created because of how much I like videos of Truttle1, and just I like the idea of programming languages being useless(mine is not, kinda).

Concept

Instead of functions or loops, you create named blocks called "markers" and control flow with stack-based conditions.

Language Basics

The Stack

All operations work on a stack (LIFO - Last In, First Out).

Markers

Markers are named code blocks that can be executed later:

( myMarker
# code here
)

Command Reference

Command Description Example
( name Start marker ( loop
) End marker )
run name Execute marker run loop
notempty m1 m2 If top ≠ 0 → m1, else → m2 notempty yes no
if pos1 greater/less/equals pos2 m1 m2 Compare stack items if 0 greater 1 bigger smaller
stop Stop execution stop
get Input (number/char) get
get int Input integer get int
get ascii Input char → ASCII get ascii
get string Input string → ASCII codes get string
asciify text Text → ASCII codes in stack asciify Hello
introduce Print top as character introduce
introduce # Print top as number introduce #
dump Show entire stack dump
welcome value Push to stack welcome 42
welcome random Push random number welcome random
clone Duplicate top item clone
copyfrom n Copy item n from top copyfrom 2
swap Swap top two items swap
reverse Reverse entire stack reverse
insert pos val Insert at position insert 2 99
length Push stack size length
pop Remove top item pop
remove n Remove item n from top remove 1
add Addition add
sub Subtraction (second - top) sub
mul Multiplication mul
div Integer division div
mod Modulo mod

Examples

Simple Hello World

welcome !
welcome d
welcome l
welcome r
welcome o
welcome W
welcome 32
welcome o
welcome l
welcome l
welcome e
welcome H
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce

Advanced Hello World (with loop)

asciify Hello World!
( end
stop
)
( print
pop
introduce
run loop
)
( loop
length
notempty print end
)
run loop

Countdown 15 to 0

welcome 16
( end
pop
welcome E
welcome n
welcome d
reverse
introduce
introduce
introduce
)
( loop
welcome 1
sub
clone
introduce #
welcome 10
introduce
notempty loop end
)
run loop

Truth Machine

get ascii
welcome 48
sub
( isZero
introduce #
)
( isNot
clone
introduce #
run isNot
)
notempty isNot isZero

Number Comparison

welcome 10
welcome 5
( greater
asciify First is greater
stop
)
( lessequal
asciify Second is greater or equal
stop
)
if 0 greater 1 greater lessequal

String reverse

asciify === Reversing program ===
( end
)
( print
pop
introduce
run loop
)
( loop
length
notempty print end
)
run loop
pop
welcome 10
introduce
get string
reverse
run loop

Working calculator(no floats)

# Calculator
get int
get int
get ascii
( plus
pop
pop
add
introduce #
)
( minus
pop
pop
sub
introduce #
)
( multiply
pop
pop
mul
introduce #
)
( divide
pop
pop
div
introduce #
)
( modulo
pop
pop
mod
introduce #
)
( end
stop
)
( print
pop
introduce
run loop
)
( loop
length
notempty print end
)
( error
pop
pop
pop
pop
asciify Sorry, operation doesn't exist
run loop
)
( check5
pop
welcome %
if 0 equals 1 modulo error
)
( check4
pop
welcome /
if 0 equals 1 divide check5
)
( check3
pop
welcome *
if 0 equals 1 multiply check4
)
( check2
pop
welcome -
if 0 equals 1 minus check3
)
welcome +
if 0 equals 1 plus check2

FizzBuzz

( end
)
( FIZZ
pop
asciify Fizz
introduce
introduce
introduce
introduce
run loop
)
( BUZZ
pop
asciify Buzz
introduce
introduce
introduce
introduce
run loop
)
( FIZZB
pop
asciify FizzBuzz
introduce
introduce
introduce
introduce
introduce
introduce
introduce
introduce
run loop
)
( print
pop
clone
introduce #
run loop
)
( c5
pop
clone
welcome 5
mod
notempty print BUZZ
)
( c3
pop
clone
welcome 3
mod
notempty c5 FIZZ
)
( c15
pop
clone
welcome 15
mod
notempty c3 FIZZB
)
( loop
welcome 1
add
welcome 10
introduce
welcome 100
if 1 greater 0 end c15
)
welcome 0
run loop

Implementation