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.

DinoSAUR

From Esolang
Jump to navigation Jump to search

DinoSAUR is a golfing language designed to be "Smaller thAn yoUr souRce code" as to mock cheating golflangs, hence the acronym. It is also intended that if compiled as a flat binary, the flat binary will inflate to be larger than the DinoSAUR source.

Instructions and Syntax

DinoSAUR uses prefix syntax, like in LISP. Brackets, whenever mentioned, are always square brackets for blocks and curvy (like these) for lists.

DinoSAUR ISA
Character Action + Arguments
+ Increment (var)
- Decrement (var)
* Double (var)
/ Halve (var)
> Print (var)
< Input (var)
+ Add (var, var)
- Subtract (var, var)
* Multiply (var, var)
/ Divide (var, var)
% Modulo (var, var)
^ Square (var)
@ Square root (var)
, Push (var)
. Pop (var)
? Define variable as (var, num)
> If variable is larger than number (var, num, block)
< If variable is smaller than number (var, num, block)
= If variable is equal to number (var, num, block)
! If variable is equal to 0 (var, block)
~ Logical NOT (var)
& Logical AND (var, var)
^ Logical OR (var, var)
$ Infinite loop
! While-ify if-statement (bracket-less block)
: Halt (var)
; Else (block)
# Define function (var)
[NUM] Push constant

Examples

Hello World

>"Hello world!":0

Fizzbuzz

?x1!>100x[!%x15[>"Fizzbuzz"];!%x3[>"Fizz"];!%x5[>"Buzz"];[>x]]:x

Cat

?x1!~!x[<x>x]:0

Infinite Loop

$

Infinite Loop (non-cheating)

!!0[]: