DEV Community

Cover image for 🌀 SNUSP — The Language That Treats Code Like a Maze with Mirrors
Pʀᴀɴᴀᴠ
Pʀᴀɴᴀᴠ

Posted on

🌀 SNUSP — The Language That Treats Code Like a Maze with Mirrors

What is SNUSP?

SNUSP is an esoteric programming language created by Ben Olmstead. It belongs to the same family as Befunge and Hexagony — languages where execution moves across a 2D grid instead of line by line. However, SNUSP introduces one unique twist: mirrors.

Execution can reflect off symbols, bounce back in different directions, or even create recursive subroutines using directional escape characters.

The name "SNUSP" refers to a fictional mental-stimulation device (from Momus’s fictional world), matching the language’s theme of confusing but intellectually playful execution.


Specs

Language Type: Esoteric / 2D execution

Creator: Ben Olmstead

Execution Model: Pointer moves through a character grid

Syntax: Directional arrows, mirrors, stack ops

Purpose: Puzzle programming and instruction-chaos


CODE EXAMPLE (Hello World)

A SNUSP Hello World program (compressed version):

v"Hello, World!"<.:@
>:::::::::::::::^
Enter fullscreen mode Exit fullscreen mode

This outputs:

Hello, World!

The mirrors control movement back and forth across the string.


How It Works

  • The pointer moves in the grid and follows characters.
  • Key instructions include:
    • > < ^ v — direction
    • + - — stack arithmetic
    • : — duplicate top of stack
    • \ / — mirrors that bounce execution
    • @ — halt program
  • Strings push ASCII values onto the stack until execution exits string mode.
  • Conditional flow is created not with keywords, but with spatial layout and reflection.

SNUSP programs often look like circuit diagrams more than code.


Strengths

  • Visually interesting and fun once learned.
  • More structured than Befunge, while still chaotic.
  • Encourages thinking spatially, logically, and geometrically.
  • Supports recursion, loops, branching, and full logic.

Weaknesses

  • Hard to debug if control flow loops incorrectly.
  • Programs quickly become mazes of arrows, symbols, and mirrored paths.
  • Documentation and ecosystem are limited.
  • Not suitable for conventional programming tasks.

Where to Run

SNUSP interpreters exist on:

  • TIO.run
  • Esolang community web tools
  • GitHub experimental interpreters

Some editors visualize pointer movement to aid debugging.


Should You Learn It?

For normal coding: No

For puzzle programming or esolang mastery: Yes

For exploring non-linear execution flow: Absolutely

For clean, readable code: Never


Summary

SNUSP takes the grid-based execution model of esoteric languages and enhances it with direction reflection and spatial control. The result is a language that feels like solving — or building — a maze where the instructions themselves steer execution. It’s chaotic, clever, and undeniably creative, earning a respected place in the esolang community.

Top comments (0)