!NULL

From Esolang
Jump to navigation Jump to search

!NULL is a unique programming language created in 2025. The name refers to the concept of NULL, which means nothing. The language makes "not null" (!NULL) into something functional.

Overview

!NULL uses a detailed command syntax where all commands follow this pattern:

!NULL{COMMAND}-:[parameters]

Commands

Output

  • PRNT - Print text
    • Syntax: !NULL{PRNT}-:["text"(Nt)]
    • N is an optional repetition count

Variables

  • ASK - Get user input
    • Syntax: !NULL{ASK}-:["prompt"{name("varname")}]
  • SMN - Show or summon a variable, function, or list
    • Syntax: !NULL{SMN}-:["varname"]

Lists

  • LST - Create a list
    • Syntax: !NULL{LST}-:["listname"{item1, item2, item3}]
  • RND - Pick a random element from a list
    • Syntax: !NULL{RND}-:["listname"{name("varname")}]

Control Flow

  • IF - Conditional execution
    • Syntax: !NULL{IF}-:[condition{command}]
    • Supports: ==, !=, >, <, >=, <=
  • ELIF - Else-if branch
  • ELSE - Else branch
  • LOOP - Loop execution

Functions

  • FUNC - Define a function
    • Syntax: !NULL{FUNC}-:["name"{command}]

File Operations

  • OPEN - Read a file
  • WRT - Write to a file
  • EDIT - Edit a file
  • RMV - Remove a file
  • PRMV - Remove a file (requires root access)
  • CPY - Copy a file

Math

  • CLCT - Calculate
    • Syntax: !NULL{CLCT}-:[a + b{name("result")}]
    • Supports: +, -, *, /

String Operations

  • UPER - Uppercase
  • LOWR - Lowercase
  • REVR - Reverse
  • CPTL - Capitalize

Timing

  • TIMR - Timer
  • CLDN - Sleep

System

  • EXT - Exit

Examples

Hello World

!NULL{PRNT}-:["Hello World"]

Number Guessing Game

!NULL{ASK}-:["Choose a Random Number: "{name("list")}]
!NULL{LST}-:["lis"{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}]
!NULL{RND}-:["lis"{name("name")}]
!NULL{SMN}-:[name]
!NULL{IF}-:[list == name{PRNT{"You Win"}}]

Implementation

The reference interpreter is written in Python and consists of over 600 lines.

Computational Class

!NULL is Turing-complete.