esolang

WeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeBasic

An epidemic with one number of infections, and now it has If, While and Print.

None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Hello World!

The idea

None1 made WeeB in 2023 on top of Weeeeeeeeeeeeeeeeeeeeeeeeeeeeee, a language about virus epidemics with one accumulator, the number of infections, and no loops at all. WeeB keeps every command of that language and adds BASIC around it. There are If and Else, While, Do and Loop, Print "..." for text and Input for numbers. The only thing a condition can look at is still the number of infections, from 0 to 255.

The machine

LineDoes
Infect person Deinfect personAdd one, subtract one (wrapping)
Reinfect 65 personsSet to 65
Bulk infect InputRead a byte, read a number
Check number of infectionsPrint as a character
Print Print "text"Print the number and a space, print text
If Number Of Infections > 3 Then ... Else ... End IfBranch
While ... ... End WhileLoop while the condition holds
Do ... Loop While ...Loop at least once

Conditions use =, <>, < or > and the spaces are required. Lines starting with Start epidemic or Delevop vaccine are comments.

Example

The cat reads and prints one byte at a time until it has printed a newline, which is 10, so it echoes one…
Expected: hi there

The cat reads and prints one byte at a time until it has printed a newline, which is 10, so it echoes one line.

Further

Ideas it shows

Also in Jokes

Write your own in Run Convert a program from WeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeBasic

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run weeeeeeeeeeeeeeeeeeeeeeeeeeeeeebasic -e 'Print "Hello World!"'
shib manual weeeeeeeeeeeeeeeeeeeeeeeeeeeeeebasic

Source

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

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

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