esolang

CreativeScript

Four macros and a batch file that runs them.

Mihai Popa, 2024 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello, world!

The idea

Mihai Popa made CreativeScript in 2024 as the successor of his mLang, which read one line from its arguments. CreativeScript reads a whole file. It has no loops and no conditions, so every program is a fixed list of things to print. Its files end in .cs, the same as C#.

The machine

MacroDoes
say! textPrint the text and a line feed
set! name valueSet a variable
add! a b nameSet the variable to a + b
out! namePrint the variable and a line feed

The interpreter on the specification is a Windows batch file that splits each line into four words. So say! prints at most three words; the rest of the line is lost. A line with an unknown macro prints an E01 error and the program goes on.

Example

Expected: 15
Expected: one two three

Further

Ideas it shows

Also in Jokes

Write your own in Run Convert a program from CreativeScript

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: creativescript.

Command line

shib run creativescript -e 'say! Hello, world!'
shib manual creativescript

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/creativescript.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org