Nebbish


Source code: cmdhandler.e | nebbish.ex


X01[:}+ix=b]; A program to calculate the nth Fibonacci number.
[[ij*P84*pj9=b]Ni9=b] A program to show a times table.

Overview

Nebbish is a stack-based golf language that uses one printable ASCII character per command. Unlike say, a language like Vyxal, with a command for everything, Nebbish aims to provide a modest set of primitives that combine to tackle golf-style problems orthagonally. The primary goal of the language is to make terse procedural code fun to write. Terseness itself is secondary.

Table of contents

Installation

Your first program

Commands

Arithmetic

Instruction Name Signature Examples
+ Add obj obj -- obj 11+ \ 2
123L2+ \ {3,4,5}
123LI456LT+ \ {5,7,9}
- Subtract obj obj -- obj 106L#7- \ 99
* Multiply obj obj -- obj
/ Divide obj obj -- obj
^ Power obj obj -- obj
% Mod obj obj -- obj
f Floor obj -- obj
A Abs obj -- obj
! Not obj -- obj

Stack

Instruction Name
: Dup
~ Swap
, Over
; Drop
I Intangibilize
T Tangibilize
} Bury
{ Exhume

List

Instruction Name
a Append
c Concat
l Length
L Listify
s Sum
S Sort
n Index
g Group

String

Instruction Name
" String mode
` Command mode

Loop

Instruction Name
[ Start loop
] End loop
b Break if
i Iteration index
j Deeper iteration index
k Deepest iteration index

Comparison

Instruction Name
= Equal
> Greater than
< Less than

Conditional execution

Instruction Name
? If
J Jump

Register

Instruction Name
x Copy from X
X Move to X
y Copy from Y
Y Move to Y

Output

Instruction Name
p Print
P Prettyprint
N Output newline

Miscellaneous

Instruction Name
d Dump
# Join Ints
r Random
\ Comment

Building

More to come soon!