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.

Not quite vague anymore

From Esolang
Jump to navigation Jump to search

Not quite vague anymore is an esolang by User:Hammy made to fulfill the expectations of Vague. It has extra commands to hopefully make it Turing-complete.

Commands

Command Meaning
+ Add the top two values of the stack. If the top two values of the stack are booleans, call them a and b and push a OR b onto the stack.
- Decrement the top value of the stack. If the top value of the stack is a boolean, do a NOT operation on it.
! Print the top value of the stack as an ASCII character. If the top value of the stack is a boolean, print true or false based on the boolean's value.
> Go right, if in 2D mode.
< Go left, if in 2D mode.
& Bitwise NAND. If the top two values of the stack are booleans, do an actual NAND operation. You can use &- for AND.
= Befunge string mode until a ..
_ Pop the top value of the stack.
. Ends a =.
0 Push zero.
* Self modification. This is best explained in steps:
  1. Pop four values from the stack: pos, char, type and insert.
  2. Check the types: if pos and char are numbers and type and insert are booleans, go to the next step. Otherwise, throw an error.
  3. Check the value of type. If it is true, go to the next step. Otherwise, put insert and char back on the stack and go to step 5.
  4. Put the character with the ASCII value char at position pos in the code. If insert is true, it will not replace what is already there.
  5. Get the character in the code at position pos and push its ASCII value to the stack.

The reason why it is "discouraged" is because if you mess up ONE value, your code might break.

2 Enter 2D mode. If already in 2D mode, go up if currently going left and go down if currently going right.
1 Exit 2D mode.
t Push true.
f Push false.
( Loop while the top two values of the stack are equal.
) End a ( loop.
? Not in original Vague. Take input as ASCII and push to the stack.
# Not in original Vague. If the next character is a number, push it to the stack.
[] Not in original Vague. Create a lambda with the code inside and push it to the stack.
{} Not in original Vague. Put this before a lambda to determine what values it needs. The format is (type1)(type2)(type3).... The types are # for number, ? for boolean and \ for a lambda.
: Not in original Vague. Run the top value of the stack, if it is a lambda. If it has arguments, pop extra values from the stack.

Examples

Hello world

I'm pretty sure there could be a shorter one using loops or the * command, but who cares?

=!dlrow ,olleH.!!!!!!!!!!!!!

Self-modification example

tff0#9#3+*!x

This is a complicated way to print x. Of course, this is completely useless because =x.! is much shorter, but it serves as a good example.