Talk:Wizzcake

From Esolang
Jump to navigation Jump to search

Interpreter Bug? and a test program

This language has the interesting feature that you need to explore it to figure out usable commands, but it seems like arbitrary output is possible.

Unless there's supposed to be a trick (it's hard to tell with Joke langs), I think the interpreter has a bug in the output conditions for case 2 and case 8 if (stack.length == 1 && stack[0] != "") is never True, the first stack element is always "". Changing the empty stack to [] and both output conditions to if (stack.length > 0) seems to work better.

With that change I wrote a test program: an inputless ඞlang interpreter which is 83,845 repetitions of the word "baka", terminated by one "sus" to output "ඞ". It seemed easier than Hello World, and Wizzcake seems good at spitting out high Unicode chars.

Here's the code I ran in browser to figure out the repetitions:

i = 1;  // this is the count for how many times to repeat for the target char
a = -4889132; // "baka " does this to the reg
while (String.fromCharCode(Math.abs(a*i)*0.0149878) != "ඞ") { i += 1}

wizzcake("baka ".repeat(i) + "sus");


Salpynx (talk) 13:58, 10 March 2024 (UTC)

Updated the code

Oh yeah! Thanks for pointing that out. That is infact a bug and it has been patched! Thanks for your contribution to this coding langauge. I have added your program to the page!

Also using your code I was able to create a hello world program!

i = 1;  // this is the count for how many times to repeat for the target char
a = -4889132; // "baka " does this to the reg
for (const char of "Hello world") {
  i = 1; // reset i for each character
  while (String.fromCharCode(Math.abs(a * i) * 0.0149878) != char) {
    i += 1;
  }
  wizzcake("baka ".repeat(i) + "sus");
}

--RainbowDash (talk) 01:25, 11 March 2024 (UTC)