We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Nonsense

From Esolang
Jump to navigation Jump to search

Nonsense is an esolang designed to be obfuscated and ready for golfing. It is a stack-based language inspired by FORTH.

Syntax

Nonsense begins with a blank stack and allows it to be filled. Programs are executed in a linear order except for the use of loops and conditionals.

Instructions

! begins a program, ? ends it, any number pushes it to the stack, p prints, A adds, S subtracts, M multiplies, D divides, m finds the modulo, i begins an if statement, nesting begins with X and ends with Y, the condition being encased in x and y, w begins a while statement, b pushes back n bytes based off the top of the stack, f pushes forwards n bytes, I takes input to push it, r returns the top of the stack, s swaps the two top parts of the stack, e is else, and comments begin with ;.

Examples

FizzBuzz

!0wx<100yX15sixm=0yX."Fizzbuzz"Y5sixm=0yX."Buzz"Y3sixm=0yX."Fizz"YeX.Y1AY0Mr?

Infinite Loop

!1b?

Truth Machine

!Iix1=yX2.1bYeX.rY?