Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Obscure - The brand-new, Turing-Complete, easy to use programming language
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
it'd be really really hard to fix the bugs in the expression parser after thatThat's the suggestion, make it valid, so it sets/creates a variable with the name of what's stored in the {}Error: Invalid variable assignment: set {var1} as barTBH, I had a brain fart and didn't realise you could concatenate variables like that. It might make it simpler if you removed concatenation, because it can be accomplished withAdded the first 3, I've been trying to make a quine, but I've run into some problems. Here's a list of what I think should be added:
- Escaping brackets like \{ and \}
- Variable concatenation (concat <value1> <value2> as <variable>)
- Outputting without a new line (outl, maybe?)
- Functions
the functions will be a bit more tricky because currently, all blocks cannot be nested, so i'd focus on that before adding anything new
https://obscure.glitch.me/docsset variable as {foo}{bar}
Edit: also, outl doesn't output anything if it's the first out instruction!
Edit again: I just had a terrible idea, what if you could use braces to set the name of a variable being assigned as the contents of the variable. That was a terrible explanation, so here is some code:set var1 as foo
set {var1} as bar // equivalent to set foo as bar
out {foo} // outputs bar
Which then led me onto another suggestion: comments pls
lol
also thanks for the bug report
ill remove the join function too
also
comments exist
just not after a line
only on newlines
# hello
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Hmm…. Could you, when parsing a line, do a pre-processing step, where braces and the enclosed variables are removed and replace with the contents, e.g:it'd be really really hard to fix the bugs in the expression parser after thatThat's the suggestion, make it valid, so it sets/creates a variable with the name of what's stored in the {}. And you can create lists -snippy-
also
comments exist
just not after a line
only on newlines
# hello
set foo as bar
set {foo} as hello
out bar
# outputs hello
1. move to the line:
set {foo} as hello
2. replace variables with their values:
set {foo} as hello -> set bar as hello
3. evaluate line
(and eval, by just putting {code_variable} on a new line)
Last edited by blubby4 (Sept. 2, 2024 21:15:00)
- ThisIsTemp1
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Do you have a timeline on arrays?
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
yeah, they will be added in about, give or take, 5 minutes Do you have a timeline on arrays?
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Done:yeah, they will be added in about, give or take, 5 minutes Do you have a timeline on arrays?
array a b c d as alphabet
out The 3rd letter of the alphabet is {alphabet:3}!
- 50_scratch_tabs
- Scratcher
500+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#64)LOL, 5 minutes too late for me! I had already started a project with v1,v2,v3,v4,v5,v6,v7…but that's cool.
they will be added in about, give or take, 5 minutes
Is there an easy way to set a specific item of an array?
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
How do you index an array with a variable?Done:yeah, they will be added in about, give or take, 5 minutes Do you have a timeline on arrays?array a b c d as alphabet
out The 3rd letter of the alphabet is {alphabet:3}!
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
^ i just quickly coded an array function and updated the expression parser, there are still many features to add such as concat, index, reverse, join, etc.
but i will add those tomorrow as it's getting kinda late
lmk if u have any other suggestions, and don't forget about the contest!!
https://obscure.glitch.me/contest
but i will add those tomorrow as it's getting kinda late
lmk if u have any other suggestions, and don't forget about the contest!!
https://obscure.glitch.me/contest
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Did you read my earlier idea about a line preprocessor? ^ i just quickly coded an array function and updated the expression parser, there are still many features to add such as concat, index, reverse, join, etc.
but i will add those tomorrow as it's getting kinda late
lmk if u have any other suggestions, and don't forget about the contest!!
https://obscure.glitch.me/contest
- mybearworld
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
The last two sample projects just say “Error: evaluateCondition is not defined”
Last edited by mybearworld (Sept. 2, 2024 21:40:47)
- ThisIsTemp1
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Can you do
add [] to [list v]in this?
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Yikes, @i_eat_coffee, you removed the function evaluateCondition and you have 2 evaluateExpression functions! The last two sample projects just say “Error: evaluateCondition is not defined”
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
^^ patched, except that the “if” and “while” blocks literally just do not work
the source code is public on glitch if anyone wants to try debugging it while i'm asleep, but its getting late now so tomorrow ill fix it (probably at 5am for US)
the source code is public on glitch if anyone wants to try debugging it while i'm asleep, but its getting late now so tomorrow ill fix it (probably at 5am for US)
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
i fixed if/while but i have to work on nesting because it's buggy
man
coding sucks
man
coding sucks
- Sir-Cats-A-Lot
- Scratcher
28 posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
I am not touching “glitch” again after… let's just say…
Try it out: https://obscure.glitch.me/
I want to see what fun stuff y'all come up with
Obscure is a brand new programming language that I created
It's currently still in development, but works for the most part
To try it out:
1. Enter the website, you will see 3 sample projects
2. Open any project or create a new one to try it out
3. In the editor, you can click “Run” to run the project
4. You can also hit “Save” to save it, every project is stored
in your browser and will be there when you enter the page again
5. The full guide that shows all functions & their explanation is
on the navigation bar, called the Documentation
Please share on this topic any fun games or apps you make!
T H E I N C I D E N T
- SevenGuy777
- Scratcher
24 posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
idk actuallyhow would that workmaybe you should add thatyou don't? How do you draw stuff?
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
I'm working on my own interpreter for the language, and I've got it working, I just have to implement more statements (add, date, etc) and if/while loops.
I implemented the preprocessor idea though, so this code:
outputs:
Aaaaannndd: Eval!
I implemented the preprocessor idea though, so this code:
set foo as bar
set barber as 1
out {foo}
out {{foo}ber}
outputs:
bar
1
Aaaaannndd: Eval!
set eval as out Yippee!
{eval}
Yippee!
Last edited by blubby4 (Sept. 2, 2024 23:22:01)
- ominouswolf
- Scratcher
63 posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Man i need to keep track of this post more.
Last edited by ominouswolf (Sept. 3, 2024 00:00:42)
- BigNate469
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
out test
Unsurprisingly [code] tags don't recognize “obscure” as a valid language to highlight
- ominouswolf
- Scratcher
63 posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
I would like to participate in the Contest by the way. Even though I'm probably gonna forget it tomorrow as schools coming soon. Plus, my obscure and unique idea has been thought of… But I need to add things to arrays, or have the preprocessing thing.
- Discussion Forums
- » Advanced Topics
- » Obscure - The brand-new, Turing-Complete, easy to use programming language