esolang

StuLa

The Stupid Language. Every assignment is spelled with an arrow, a type letter and a dash.

CMinusMinus, 2019 · Turing complete: unknown · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, World!

The idea

CMinusMinus made StuLa in 2019. Its name is short for Stupid Language. It has variables, input and output, functions and imports, and it writes each of them in its own odd way. x<i-42 sets x to the number 42, x<+i-1 adds one, and x<s-42 sets it to the text 42 instead.

Read the story

A value goes into any text as =x!. A function is a block between func/<<name>> and <<>>, and it can only be called by assigning its result to a variable. It returns with two dots and some text.

The machine

LineDoes
X<i-1 X<s-1Set X to a number or to text
X<+i-1 X<-i-1 X<*i-1 X</i-1Arithmetic on X
X<+s-1Append text to X
X<v-ACopy the variable A
X<?-promptWrite the prompt and read a line
X<!-F & a & bCall F with arguments, keep what it returns
out:text/... out:line/...Write text, without or with a line break
..textReturn text from a function
[0] =X! =_!An argument, a variable and a space, inside any text
destroy #XDelete X

take, which imports functions from another file, is not implemented. Division gives a float, so 99 halved prints as 49.5.

Example

Hello World with a function.
Expected: The value of "x" is 42.

Hello World with a function. The function returns its text with .., and calling it is an assignment.

Expected: Hello, World!

The cat asks first. The prompt is written before the line is read, and =_! puts the space after the colon.

Expected: Input Something: hello

Further

Also in Jokes

Write your own in Run Convert a program from StuLa

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run stula -e 'out:line/Hello, World!'
shib manual stula

Source

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

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

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