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
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
| Line | Does |
|---|---|
Infect person Deinfect person | Add one, subtract one (wrapping) |
Reinfect 65 persons | Set to 65 |
Bulk infect Input | Read a byte, read a number |
Check number of infections | Print as a character |
Print Print "text" | Print the number and a space, print text |
If Number Of Infections > 3 Then ... Else ... End If | Branch |
While ... ... End While | Loop 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…
The cat reads and prints one byte at a time until it has printed a newline, which is 10, so it echoes one line.
Ideas it shows
See also
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 weeeeeeeeeeeeeeeeeeeeeeeeeeeeeebasicSource
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org