Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » BlueFun: Simple esoteric programming language
- i_eat_coffee
-
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/
Edit: please discuss here https://scratch.mit.edu/discuss/topic/697123/
Last edited by i_eat_coffee (July 10, 2023 07:52:51)
- mybearworld
-
1000+ posts
BlueFun: Simple esoteric programming language
Is there an interpreter/compiler?
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
Yes, there is a very unstable interpreter. I'm going to release it soon! Is there an interpreter/compiler?
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
INTERPRETER IS HERE: [REDACTED]
Last edited by i_eat_coffee (July 3, 2023 19:51:54)
- ajskateboarder
-
1000+ posts
BlueFun: Simple esoteric programming language
Is this made with ChatGPT?
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
No. The interpreter source code is here: Is this made with ChatGPT?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
-
500+ posts
BlueFun: Simple esoteric programming language
How is “simple” and “esoteric” in the same phrase? Just wondering…
- Steve0Greatness
-
1000+ posts
BlueFun: Simple esoteric programming language
Contrary to most beliefs, esoteric does not mean complicated. How is “simple” and “esoteric” in the same phrase? Just wondering…
es·o·ter·icEsoteric Meaning
adjective
intended for or likely to be understood by only a small number of people with a specialized knowledge or interest.
“esoteric philosophical debates”
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
-
500+ posts
BlueFun: Simple esoteric programming language
Oh…I get it now. Thanks for clarifying!Contrary to most beliefs, esoteric does not mean complicated. How is “simple” and “esoteric” in the same phrase? Just wondering…es·o·ter·icEsoteric Meaning
adjective
intended for or likely to be understood by only a small number of people with a specialized knowledge or interest.
“esoteric philosophical debates”
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.
- mlcreater
-
1000+ posts
BlueFun: Simple esoteric programming language
More important suggestions:
Less 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.
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
-
1000+ posts
BlueFun: Simple esoteric programming language
Something about this language seems familiar to me…
- DifferentDance8
-
1000+ posts
BlueFun: Simple esoteric programming language
What seems familiar about this language? Something about this language seems familiar to me…
- gilbert_given_189
-
1000+ posts
BlueFun: Simple esoteric programming language
The loop command, write and break for printing, and the res variable for results.What seems familiar about this language? Something about this language seems familiar to me…
These are features that another language (or,should I say another family of language) shares.
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
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. ……
- resetting variables when “Run” is clicked, so that “defInCase” is more reliable
Working on those. string operations like Scratch's length of () and letter () of ()
I'll take everything else into consideration. Thanks!
Indeed, it is an advanced dialect of bundle. Something about this language seems familiar to me…
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
Follow-up: Whoops, I may have misunderstood your request.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. ……
- resetting variables when “Run” is clicked, so that “defInCase” is more reliable
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
-
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
-
1000+ posts
BlueFun: Simple esoteric programming language
Writing nothing looks like this:
It can also look like this:
Writing a space looks like this:
Writing five spaces looks like this:
Writing three spaces looks like this:
Writing seventy-two spaces looks like this:
write
write
write
write
write
write
- Steve0Greatness
-
1000+ posts
BlueFun: Simple esoteric programming language
Why did you redact it? INTERPRETER IS HERE: [REDACTED]
- i_eat_coffee
-
1000+ posts
BlueFun: Simple esoteric programming language
https://scratch.mit.edu/discuss/topic/697123/Why did you redact it? INTERPRETER IS HERE: [REDACTED]
- DifferentDance8
-
1000+ posts
BlueFun: Simple esoteric programming language
Post and suggestion bump. (maybe in your website you should make a forums thing like scratch) Maybe you should add a "[string1] contains [string2]" condition to the if command? Helps with making chatbots.
- Discussion Forums
- » Advanced Topics
-
» BlueFun: Simple esoteric programming language