We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Jezik

From Esolang
Jump to navigation Jump to search

Jezik (bos. Language, pronounced /jězik/) is a stack-based esolang made by User:Zopium, which is just your average esolang, but in the Bosnian language (but only on ijekavian speech :P). It's extension is .j

Instructions
Instruction Purpose
DODAJ BROJ [number] Pushes a decimal number onto the stack.
TRAŽI UNOS OD KORISNIKA Acts like the getch() function. If the character is a number it gets pushed onto the stack as a number, but if it's not a number the ASCII value gets pushed onto the stack.
UZMI DVA BROJA I ... Pops two numbers and decides what to do with them.
ISPRINTAJ REČENICU ... Basically an echo command. Also doesn't print out a line feed.
ISPRINTAJ BROJ ,,, Pops a number that's on top of the stack and prints it out.
ZAOKRUŽI BROJ Rounds a number that's on top of the stack.
DUPLICIRAJ BROJ Duplicates the top number.
STAVI PRETHODNI BROJ NA POZICIJI BROJA Basically a PUT command.
IZABERI BROJ KOJI JE NA POZICIJI BROJA Basically a PICK command.
DAJ NASUMICAN BROJ DO ZADNJEG BROJA Pops a number from the stack, and a random number with the maximum of that number gets pushed onto the stack.
DEFINIŠI LINIJU [line] Define a labeled line.
AKO JE BROJ ISTINIT SKOČI NA LINIJI [line] Pops a number, and jumps to a defined line if the number is truthy.
PRESTANI SE DERATI Terminates the program.

... and [] is required, ,,, is optional.

Anything that's not one of these instructions will be read as a comment.

Some arguments for instructions
Instruction Arguments
UZMI DVA BROJA I ... SABERI IH adds, ODUZMI IH subtracts, POMNOŽI IH multiplies, PODJELI IH divides, PODJELI IH I UZMI OSTATAK divides and gets the remainder, ZAMJENI IH SWAPs, VIDI DA LI SU JEDNAKI compares if they are equal, VIDI DA LI SU NEJEDNAKI compares if they are not equal, VIDI DA LI JE JEDAN MANJI compares if one is smaller than the other, VIDI DA LI JE JEDAN VEĆI compares if one is bigger than the other, OBAVI POBITNI AND NA NJIH does the bitwise AND, OBAVI POBITNI OR NA NJIH does the bitwise OR and OBAVI POBITNI XOR NA NJIH does the bitwise XOR. All else will throw an error.
ISPRINTAJ BROJ ,,, If KAO ASCII ZNAK is provided at the end, it will print the popped number as an ASCII character.

Examples

You can view all of the examples in the NodeJS implementation on Codeberg below.

Links

The NodeJS implementation on Codeberg