Discuss Scratch

i_eat_coffee
Scratcher
1000+ posts

Obscure - The brand-new, Turing-Complete, easy to use programming language

blubby4 wrote:

i_eat_coffee wrote:

blubby4 wrote:

i_eat_coffee wrote:

blubby4 wrote:

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
Added the first 3,
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/docs
TBH, 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 with
set 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
Error: Invalid variable assignment: set {var1} as bar

lol
also thanks for the bug report
ill remove the join function too
That's the suggestion, make it valid, so it sets/creates a variable with the name of what's stored in the {}
it'd be really really hard to fix the bugs in the expression parser after that
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

i_eat_coffee wrote:

blubby4 wrote:

i_eat_coffee wrote:

-snippy-
That'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
it'd be really really hard to fix the bugs in the expression parser after that
also
comments exist
just not after a line
only on newlines
# hello
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:
set foo as bar
set {foo} as hello
out bar
# outputs hello
On reaching line 2, the evaluation would go something like:
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
(this would allow for pointers and lists)
(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

ThisIsTemp1 wrote:

Do you have a timeline on arrays?
yeah, they will be added in about, give or take, 5 minutes
i_eat_coffee
Scratcher
1000+ posts

Obscure - The brand-new, Turing-Complete, easy to use programming language

i_eat_coffee wrote:

ThisIsTemp1 wrote:

Do you have a timeline on arrays?
yeah, they will be added in about, give or take, 5 minutes
Done:

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

i_eat_coffee wrote:

(#64)
they will be added in about, give or take, 5 minutes
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.
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

i_eat_coffee wrote:

i_eat_coffee wrote:

ThisIsTemp1 wrote:

Do you have a timeline on arrays?
yeah, they will be added in about, give or take, 5 minutes
Done:

array a b c d as alphabet

out The 3rd letter of the alphabet is {alphabet:3}!
How do you index an array with a variable?
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
blubby4
Scratcher
100+ posts

Obscure - The brand-new, Turing-Complete, easy to use programming language

i_eat_coffee wrote:

^ 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
Did you read my earlier idea about a line preprocessor?
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

mybearworld wrote:

The last two sample projects just say “Error: evaluateCondition is not defined”
Yikes, @i_eat_coffee, you removed the function evaluateCondition and you have 2 evaluateExpression functions!
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)
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
Sir-Cats-A-Lot
Scratcher
28 posts

Obscure - The brand-new, Turing-Complete, easy to use programming language

i_eat_coffee wrote:


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!
I am not touching “glitch” again after… let's just say…

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

i_eat_coffee wrote:

SevenGuy777 wrote:

i_eat_coffee wrote:

lemoncello1205 wrote:

How do you draw stuff?
you don't?
maybe you should add that
how would that work
idk actually
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:
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.

Powered by DjangoBB