boxedLANG

From Esolang
Jump to navigation Jump to search
boxedLANG
Paradigm(s) imperative
Designed by User:Mc20000
Appeared in 2026
Type system weak
Memory system variable-based
Dimensions one-dimensional
Computational class Unknown
Reference implementation Python
Major implementations Nim
File extension(s) .bx

boxedLANG is a lightweight esoteric programming language made by User:Mc20000 in 2026. It was made for education and simple automation.

Language overview

This is still a work in progress. It may be changed in the future.

Commands

Here is how a command is structured:

<name> <vertical bar (|) separated arguments>

For example:

say hi!|0

If a string is passed as an argument, it must be replaced with a tilde (~) like this:

say hello,~world!|0

I/O

  • say <message>|<seconds> outputs the message to the console
  • ask <message> takes input from the console

Boxes

Boxes are named containers that can store data. They can be managed with these commands:

  • box <name>|<data> creates a box
  • del <name> deletes a box

They can be referenced to be used as an argument with this syntax:

$<name>

Math

  • math <name>|<value1>|<operation>|<value2> performs a math operation on 2 values.

Timing

  • wait <milliseconds> waits

Comments

Comments are ignored by the interpreter/compiler. They must start with //.

Examples

Hello, world!

say hello,~world!
ask what~is~your~name
say hello~$name

Truth-machine

box truth|0  //this line is just to catch errors and is not required
ask truth
mark 1
say $truth
jumpif $truth|==|1|1|m  //old "if $truth|==|1|jump|1|m"

Plushie-completeness proof

say 4|0
say 31|0
box var|2

Operating system


say booting~boxed-os~~ver~0.01~sky|1
ask login
ask password
box file-usr|usr:~$login~~~pwd:~$password

test lg|$login|admin|==|1|0
test in|$password|1234|==|1|0
math loggedin|$lg|$in|+
if $loggedin|==|2|jump|loggedin|m
say bad~login~or~error|0
say ending~os~loop|0
if $loggedin|!=|2|jump|loggedfail|m


premark app-calc //calculator app
ask #1
ask op
ask #2
math calc|$#1|$#2|$op
say $calc|0
jump boot|m


premark app-note //note app
premark app-notes
ask write(w)/read(r)~?
jump notes-:$?|m

premark notes-w //write a note
ask note~name
ask note
box note-:$name|$note
say done~writing|0
jump boot|m

premark notes-r //read a note
ask name
box name|note-:$name
say |0
say $name|0
say --------------|0
say $$name|0
say |0
jump boot|m


premark app-file //file app
premark app-files
ask read(r)/write(w)/del(d)~?
jump files-:$?|m

premark files-r
ask name
box name|file-:$name
say |0
say $name|0
say --------------|0
say $$name|0
say |0
jump boot|m

premark files-w
ask name
ask data
box file-:$name|$data
say done~writing|0
jump boot|m

premark files-d
ask name
ask are~you~sure~yes(y)/no(n)~?
box name|file-:$name
if $?|==|n|jump|boot|m
if $?|==|y|del|$name
say done~deleting|0
jump boot|m


premark app-end //end app
end now


premark boot 
ask name~of~app
jump app-$app|m
box name|
box data|
box note|
box ?|
jump boot|m
say error~loop~ended
end now

premark loggedin
say |0
say welcome~$login|0
say |0
jump boot|m

premark loggedfail
say loggin~fail
end now

External resources