bog prok

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

bog prok or /boʊ prʌk/ is a esolang created by User:Yayimhere based on a book cover

name

the name is a pun on the words book and programmeringssprog(danish for programming language). it is made by taking the first letter after the first o in programmeringssprog which is g. so we have og. so we put that into book so it becomes bogok. now we take the three letters before the second o in programmeringssprog we get pr. so we have pro. now we add that into book: bogprok. now add a space and we get bog prok. see! its a book programming language

concept

after looking at the book some of the code looks high level while some looks low level. so i chose memory to be low level to set up but high level to work with

memory

memory is stored in code(UTF-8 encoding). the bytes are extended infinitely to the left with zeros (however we ignore this when operating on the binary) and have a sign bit. however this only applies to memory sections. else numbers are represented as Hexadecimal

evaluation

Bog prok is evaluated lazily

commands

other

comments:

´ comment ´

begin program:

BEGIN

end program:

END

memory related

created a memory section which is skipped over. referenced with the line number of the top {:

BEGIN MEMORY SECTION
    memory here(yes must be indented)
END MEMORY SECTION

to make a variable(with null inside):

DO variable_name AS VARIABLE

and yo set it to a memory section. if the section is char(or one byte) its a single number but if its multiple its an array:

variable_name IS memory_section (bolean) ´the boolean is just if its true(TRUE) then variable_name is equal to memory_section and if its not for some reason put FALSE´

and to set a memory section to something new(will also restate all variables set to that section) which is any number data:

MOVE expression or value  memory section

computation

do arithmetic between variables or numbers (hexadecimal) which returns the value of the expresion(evaluated right to left but otherwise like normal math expressions):

A + B ´A plus B. for string it will append A to B´
A - B ´A minus B. wont work for string´
A · B ´A multiplied by B. create a string that is A repeated len(B) times´
A ÷ B ´A divided by B. wont work for string´

to create a string from numbers(all numbers are hexadecimal actually) where each value separated by /:

str{x/y/z/...} ´take the ascii values of each and append them into a string with x being first and the last value being the last char´

put that into a variable:

str.variable_name.var(string)

here are the operators that work on one number. this will also return the value. this is evaluated right to left as well:

;A ´reverse the binary of A´
~A ´flip the binary of A´
A± ´increment A´
A∓ ´decrement A´
:A ´return a string with A repeated twice´

these are some string operators:

A¿i ´return A index i´
^A ´only works for a single char. return it as a number(ascii value)´