Discuss Scratch

i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

This topic has been closed because the website may be allowing private communication with the owner. Please refrain from linking it on Scratch. Thanks! -coffee
Edit: please discuss here https://scratch.mit.edu/discuss/topic/697123/

Last edited by i_eat_coffee (July 10, 2023 07:52:51)

mybearworld
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Is there an interpreter/compiler?
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

mybearworld wrote:

Is there an interpreter/compiler?
Yes, there is a very unstable interpreter. I'm going to release it soon!
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

INTERPRETER IS HERE: [REDACTED]

Last edited by i_eat_coffee (July 3, 2023 19:51:54)

ajskateboarder
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Is this made with ChatGPT?
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

ajskateboarder wrote:

Is this made with ChatGPT?
No. The interpreter source code is here: https://bluefun.glitch.me/run.js
I tried to ask ChatGPT to write some code for the interpreter and the code it made only returned errors each time.
TeenySpoon
Scratcher
500+ posts

BlueFun: Simple esoteric programming language

How is “simple” and “esoteric” in the same phrase? Just wondering…
Steve0Greatness
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

TeenySpoon wrote:

How is “simple” and “esoteric” in the same phrase? Just wondering…
Contrary to most beliefs, esoteric does not mean complicated.

Google wrote:

es·o·ter·ic
adjective
intended for or likely to be understood by only a small number of people with a specialized knowledge or interest.
“esoteric philosophical debates”
Esoteric Meaning
I believe you're misunderstanding of “esoteric” comes from most Esoteric Programming Languages(Esolangs) being overly-complicated like Malbolge(which apparently no human can make a program for) or Brain F.

However, in this case of the word esoteric, I believe OP(@i_eat_coffee) meant that it's not intended for very many people to use, and thus: it is esotoric.
TeenySpoon
Scratcher
500+ posts

BlueFun: Simple esoteric programming language

Steve0Greatness wrote:

TeenySpoon wrote:

How is “simple” and “esoteric” in the same phrase? Just wondering…
Contrary to most beliefs, esoteric does not mean complicated.

Google wrote:

es·o·ter·ic
adjective
intended for or likely to be understood by only a small number of people with a specialized knowledge or interest.
“esoteric philosophical debates”
Esoteric Meaning
I believe you're misunderstanding of “esoteric” comes from most Esoteric Programming Languages(Esolangs) being overly-complicated like Malbolge(which apparently no human can make a program for) or Brain F.

However, in this case of the word esoteric, I believe OP(@i_eat_coffee) meant that it's not intended for very many people to use, and thus: it is esotoric.
Oh…I get it now. Thanks for clarifying!
mlcreater
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

More important suggestions:
  • Put list indices through evaluateExpression so that a loop can use an array.
  • A variable or list element x might be zero, so don't check its existence as !x.
  • Fix “mul” and “div”: they both subtract instead of multiplying or dividing.
  • Use Number() instead of parseInt() so that we can have non-whole numbers.
parts of https://bluefun.glitch.me/run.js modified so they might work (?):
case "setArrValue":
  if (!arrays[tokens[1]]) render('Invalid array: ' + command, true);
  if (!(evaluateExpression(variables,tokens[2]) > 0)) render('Invalid array position: ' + command, true);
  arrays[tokens[1]][evaluateExpression(variables,tokens[2])-1] = evaluateExpression(variables, tokens.slice(3).join(' '));
  break;
case "getArrValue":
  if (!arrays[tokens[1]]) render('Invalid array: ' + command, true);
  if (!(evaluateExpression(variables,tokens[2]) > 0)) render('Invalid array position: ' + command, true);
  if (arrays[tokens[1]][evaluateExpression(variables,tokens[2])-1] === undefined) render('Invalid array value ' + command, true);
  variables.res = arrays[tokens[1]][evaluateExpression(variables,tokens[2])-1];
  break;
case "+":
  if (variables[tokens[1]] === undefined) render('Invalid variable: ' + command, true);
  if (variables[tokens[1]].toString() != '0' && !Number(variables[tokens[1]])) render('Variable must be a number: ' + command, true);
  variables[tokens[1]]++;
  break;
case "-":
  if (variables[tokens[1]] === undefined) render('Invalid variable: ' + command, true);
  if (variables[tokens[1]].toString() != '0' && !Number(variables[tokens[1]])) render('Variable must be a number: ' + command, true);
  variables[tokens[1]]--;
  break;
case "wait":
  if (Number(evaluateExpression(variables, tokens[1])) > 1 && Number(evaluateExpression(variables, tokens[1])) < 9) {
    await new Promise(r => setTimeout(r, evaluateExpression(variables, tokens[1]) * 1000));
  } else { render("Wait time must be between 1 to 9 seconds.", true); }
  break;
case "add":
  const add1 = evaluateExpression(variables, tokens[1]);
  const add2 = evaluateExpression(variables, tokens[2]);
  variables["res"] = Number(add1)+Number(add2);
  break;
case "sub":
  const sub1 = evaluateExpression(variables, tokens[1]);
  const sub2 = evaluateExpression(variables, tokens[2]);
  variables["res"] = Number(sub1)-Number(sub2);
  break;
case "mul":
  const mul1 = evaluateExpression(variables, tokens[1]);
  const mul2 = evaluateExpression(variables, tokens[2]);
  variables["res"] = Number(mul1)*Number(mul2);
  break;
case "div":
  const div1 = evaluateExpression(variables, tokens[1]);
  const div2 = evaluateExpression(variables, tokens[2]);
  variables["res"] = Number(div1)/Number(div2);
  break;

Less important suggestions:
  • resetting variables when “Run” is clicked, so that “defInCase” is more reliable
  • allowing “write” to print zero
  • letting “if” skip multiple lines: an optional extra parameter might be a number of lines to skip if the condition is false, or “{” to indicate if the condition is false, skip every command until finding the command “}”
  • “setArrValueInCase”
  • string operations like Scratch's length of () and letter () of ()
gilbert_given_189
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Something about this language seems familiar to me…
DifferentDance8
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

gilbert_given_189 wrote:

Something about this language seems familiar to me…
What seems familiar about this language?
gilbert_given_189
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

DifferentDance8 wrote:

gilbert_given_189 wrote:

Something about this language seems familiar to me…
What seems familiar about this language?
The loop command, write and break for printing, and the res variable for results.
These are features that another language (or,should I say another family of language) shares.
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

mlcreater wrote:


  • resetting variables when “Run” is clicked, so that “defInCase” is more reliable
That would make “defInCase” just useless, since it would act just like “def”. I made the command defInCase specially for loops so that users can set starting variables with ease while working with loops.

mlcreater wrote:

string operations like Scratch's length of () and letter () of ()
Working on those.
I'll take everything else into consideration. Thanks!

gilbert_given_189 wrote:

Something about this language seems familiar to me…
Indeed, it is an advanced dialect of bundle.
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

i_eat_coffee wrote:

mlcreater wrote:


  • resetting variables when “Run” is clicked, so that “defInCase” is more reliable
That would make “defInCase” just useless, since it would act just like “def”. I made the command defInCase specially for loops so that users can set starting variables with ease while working with loops.
Follow-up: Whoops, I may have misunderstood your request.
I added the following feature: When the “run” button is clicked, all variables will reset, however they won't reset each time a loop iterates.
DifferentDance8
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Maybe you should add a "[string1] contains [string2]" condition to the if command? Helps with making chatbots.
mybearworld
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Writing nothing looks like this:
write
It can also look like this:
write 
Writing a space looks like this:
write  
Writing five spaces looks like this:
write      
Writing three spaces looks like this:
write    
Writing seventy-two spaces looks like this:
write                                                                         
Steve0Greatness
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

i_eat_coffee wrote:

INTERPRETER IS HERE: [REDACTED]
Why did you redact it?
i_eat_coffee
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

Steve0Greatness wrote:

i_eat_coffee wrote:

INTERPRETER IS HERE: [REDACTED]
Why did you redact it?
https://scratch.mit.edu/discuss/topic/697123/
DifferentDance8
Scratcher
1000+ posts

BlueFun: Simple esoteric programming language

DifferentDance8 wrote:

Maybe you should add a "[string1] contains [string2]" condition to the if command? Helps with making chatbots.
Post and suggestion bump. (maybe in your website you should make a forums thing like scratch)

Powered by DjangoBB