NoError

From Esolang
Jump to navigation Jump to search

NoError is a stack based esolang created by User:Brain Boy 53. It is designed to have accept any string of ascii characters from ascii value 32 (" ") to ascii value 126 ("~") and ascii value 9 ("/t"). IF YOU FIND AN ERROR, GO TO THE TALK PAGE AND SEND AN ERROR REPORT IN THE GOOGLE FORM.

Commands

A space is a nop.

An exclamation mark pops the top value of the stack and pushes a 1 if the value popped is a 0, and pushes a 1 otherwise.

A quotation mark toggles stringmode, exactly like it does in Befunge.

A hashtag pops two values, a and b, and if a is 0, jump forwards b + 1 characters.

A dollar sign duplicates the top value on the stack.

A percentage sign pops two values, a and b, and pushes a mod b. If b is 0, a 0 is pushed.

An ampersand pops two values, a and b, and pushes a 1 if neither a nor b are 0, otherwise, it pushes a 0.

An apostrophe pops the top value off the stack.

A left parenthesis pops a value, a, and jumps forward in the code a + 1 characters.

A right parenthesis pops a value, a, and jumps backward in the code a - 1 characters.

An asterisk pops two values, a and b, and pushes their product.

A plus pops two values, a and b, and pushes their sum.

A comma pops the top value from the stack, and outputs it's corresponding ascii character mod 128.

A minus pops two values, a and b, and pushes a-b.

A period pops the top value from the stack, and outputs it as an integer.

A slash pops two values, a and b, and pushes a/b rounded to the nearest integer. If b is 0, a 0 is pushed.

The numbers 0-9 push their value onto the stack.

A colon gets input from the user and pushes it to the stack. If the user doesn't write an integer, the program prints, (Input a number this time) and takes another input. If the user types an integer this time, the program pushes it to the stack, but if not, the program asks for an integer again, the same way it did previously until the user inputs an integer.

A semi-colon does the same thing as a colon but with a single character, and says (Input a single character this time) if the user doesn't type a single character.

A less than sign will pop two values, a and b, and push a 1 if a is less than b, otherwise it pushes a 0.

An equal sign will pop two values, a and b, and push a 1 if a is equal to b, otherwise it pushes a 0.

A greater than sign will pop two values, a and b, and push a 1 is a is greater than b, otherwise it pushed a 0.

A question mark will print the stack as a list. It is a debug command.

An at sign pops two values, a and b, and if a is 0, it goes to place b + 1 in the code.

A left bracket, pops one value, and goes to spot of the value popped in the code + 2.

A back slash swaps the top two values.

A right bracket goes to the beginning of the code.

An uptick clears the stack.

An underscore prints a random character.

A grave accent runs a random command.

A left brace pops two values, a and b, and swaps values a and b in the stack counting from the top of the stack.

A right brace puts the top value of the stack at the bottom.

A pipe ends the program

A tilde pops a random number from 0 to 9 to the top of a stack.

Moduoles

Moduoles are upper and lowercase letters. Lowercase moduoles, mini moduoles, have small program snippets, while uppercase letters, program moduoles, are fully fleshed out programs.

Mini Moduoles

Mini Moduoles
Letter Use NoError Program Equivalent
a Adds one to the top value of the stack 1+
b Turns the top two values into binary values \!!\!!
c Pushes the top value of the stack and pushes it's cube. $$**
d Subtracts one from the top value of the stack 01-+
e Pops the top value from the stack, and ends the program if it is a 0. !1#|
f Duplicates the top two values of the stack. (Ex. the stack goes from x y to x y x y.) \$13{$23{
g Exactly like the "[", but without that weird "+2" quirk. 2-[
h Does a random operation a random-ish amount of times, and shows the stack between each random operation. 0$`?07-#
i Creates NoError code that is six characters long. ______
j H mini moduole, but it doesn't show the list. 0$`06-#
k Starts a comment 0"
l Ends a comment "'$!07-#

Popping from an empty stack gives a 0.

Sometimes the interpreter says, "Something went wrong with the ___ command" Since it is in the specifications, though, it's not an error.

Going to a negative valued position in the code, makes the code go to the beginning.

Example Programs

Hello, World!

"!dlroW ,olleH",$!07-#

Here's one with no letters:

56+3*91+$*$8+$6+$3-91+8*7+48*56+4*91+$$*+1+$3-$$7-98*,$!07-#

Cat

5-;,#

Truth Machine

:$.$!08-#

Infinite Loop

 ]

Note that the space in the beginning is necessary. Here's a randomly generated infinite loop.

]( @>8;&*'@@/#:4,\5<\[!2/5%"*!5-93):@)/$*\4#8655.%6@[8^>:$?]]591.:9:6 64 )?*24$4-= ]0,!%2[><-**$=.*%.9!*#)>6#0<>=;;-.$8+?1"&;() ,";".([$1]5(6:9>"*!;.),=#;99 *\];></5,-$!=*6<"1%"745?3);];>->9%%)$82?2&<)]:+/5<5),.?3#=)20&<4./)%>31%-04=0*5'/@509!(87#-#(=6[*&>'@,;>&):=:#1'/,,3![<2,\);[/#?,?<^(,8!\6["'=(!$3);+6-8#?^3#.\#[.$,0>>2*[1@.05:07#&3]?0*\'=#&@&$2*9\66&83':3 %*>;.-[;+, '*!);:5&\4<!=,@,,;295?+238+?%#]76831;1!(170=+\6'-914?6=5>9,-#<\::(;,$1?#7?:0+8!?];@#,6@>#.5/4$ @; 95$#:].#9-*9*"&[\'3&;$^)7;,<""*.^$'<^=%\?&][/,7]1[8' ([=1#$"" 6*.*&<?@\;%)5::>:'43'#(88$%('<1- >@4613%*(7064>76/5] ;0)2)-8:5,+#+2&4@$3)#)<)>2/+17(>%'1$/^06%;7/?=<'3=3&04:9#^9%:]&4)*"1^??*[,@!;*1.3)<"&6:,>1#$;&-.8![,3 ^ -:=)/&2;0-.*5].3)&]'1=%]5]3+%35[1!??"1;+/0-08,*1$4*=[45;>'^68>7.%+0,;*1%956>!]#'+&+,]4;]8%[@?7@^!]"-6\3 '4113#<('+ ]>40'>([=^3\$:,35#'%" ]!;#*.(9(%-)'17<2!]6>@%&/\@0<3'!:5,:])7<,==!4$]6$]\%>18,$4=#3,[*@30437[:;9,2*19)3=*5=^!'.9;(96%-,32[<@=:37)+%"\@^0\@$!11$(33,(+74-=#]?$]["'-92:=>]!(>0:\6<4#,28=[:)+ ^>.1[/#

External Resources

Python interpreter