Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Obscure - The brand-new, Turing-Complete, easy to use programming language
- mybearworld
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#280)That'd be a very boring quine though
A quine is a program that outputs its source code. A program that consists of log quine and outputs quine doesn't qualify.
A program that consists of quine and outputs quine does, since the program and the output are the same.
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
there's no javascript inbuilt function to output fizzbuzz, you have to write it yourselfCan we have a statement called “quine” and it outputs “quine”. That would make it easyIf you need any new features for it, I'll happily add them. Thinking about how to make a quine in Obscure, but not sure exactly how I should go about it.
same goes for this
- DifferentDance8
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Plus, if blubby4 needs to make a quine using only one line then there's always HQ9+there's no javascript inbuilt function to output fizzbuzz, you have to write it yourselfCan we have a statement called “quine” and it outputs “quine”. That would make it easyIf you need any new features for it, I'll happily add them. Thinking about how to make a quine in Obscure, but not sure exactly how I should go about it.
same goes for this
- 50_scratch_tabs
- Scratcher
500+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
I tried to talk more about quines but my post contains unsuitable language. Maybe I will reword it later, but I don't have enough time for that right now.
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
bumppppppppppp
- 8to16
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
code not working, can you help plz
# Calculate pi.
# Based on https://en.scratch-wiki.info/wiki/Approximating_Pi
set pi to 4
set refresh to 1
while 1 = 1
set refresh to {refresh} + 2
set pi to {pi - 4 / refreshes}
set refresh to {refresh} + 2
set pi to {pi} + 4 / {refreshes}
out {pi}
delay 0.1
end
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
yeah, expressions don't support mathematical operations code not working, can you help plz# Calculate pi.
# Based on https://en.scratch-wiki.info/wiki/Approximating_Pi
set pi to 4
set refresh to 1
while 1 = 1
set refresh to {refresh} + 2
set pi to {pi - 4 / refreshes}
set refresh to {refresh} + 2
set pi to {pi} + 4 / {refreshes}
out {pi}
delay 0.1
end
this is wrong:
set one to 1
out {one + 1}
this is correct:
set one to 1
add {one} 1 as one
out {one}
Last edited by i_eat_coffee (Sept. 21, 2024 12:39:02)
- dumorando
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
you should use indexeddb/localforage rather than localstorage so you can store code with large data built into it as localstorage has a 5 mb limit
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
bump
- BigNate469
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Feature suggestion: some way to color output text
- breakfast_for_dinner
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#291)ansi-style or just a specific selection of colors?
Feature suggestion: some way to color output text
- BigNate469
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Be able to set the color of any given out or outl function to any arbitrary hex code (or, because this is implemented in JS and HTML, possibly anything CSS recognizes as a color)(#291)ansi-style or just a specific selection of colors?
Feature suggestion: some way to color output text
Also being able to control either a DOM or similar (like the contents of an iframe) or draw things (as one can in JS using the Canvas API) would be nice.
Last edited by BigNate469 (Sept. 23, 2024 21:15:13)
- breakfast_for_dinner
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#293)“hey bro i'm gonna make an obscure interpreter”
or, because this is implemented in JS and HTML, possibly anything CSS recognizes as a color
“um bro you need to make a css interpreter for it then”
""
- BigNate469
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
HTMLElement.style.color(#293)“hey bro i'm gonna make an obscure interpreter”
or, because this is implemented in JS and HTML, possibly anything CSS recognizes as a color
“um bro you need to make a css interpreter for it then”
""
after taking a quick look at the source code, this is why the text is green in the first place
- breakfast_for_dinner
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#295)“okay bro i'm gonna make the css interpreter for my obscure interpreter”
HTMLElement.style.color
“um bro you need a javascript interpreter for your css interpreter”
""
- 50_scratch_tabs
- Scratcher
500+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
(#295)Partially the reason why errors clear screen; I made a mod where it doesn't clear the screen when it errors, and the out turned red.
HTMLElement.style.color
- blubby4
- Scratcher
100+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
2 minor bugs I found:
if foo > 0
end
end
gives the error
Error: Unknown command: end
instead of what you'd expect
Unexpected ‘end’ without matching block.
also,
if a
gives the rather cryptic error
TypeError: part.match(…) is null
seemingly originating from line 90
if foo > 0
end
end
gives the error
Error: Unknown command: end
instead of what you'd expect
Unexpected ‘end’ without matching block.
also,
if a
gives the rather cryptic error
TypeError: part.match(…) is null
seemingly originating from line 90
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
Should I make a github repo?
Hey, you know what would be nice
an extensions tab like Scratch, with community-built extensions over the Javascript interpreter
it would be fun to have sounds, canvases, heck–even the first Obscure website framework!!
Hey, you know what would be nice
an extensions tab like Scratch, with community-built extensions over the Javascript interpreter
it would be fun to have sounds, canvases, heck–even the first Obscure website framework!!
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
aight no more contest entries so imma just rate them w breakfast rq
- i_eat_coffee
- Scratcher
1000+ posts
Obscure - The brand-new, Turing-Complete, easy to use programming language
2024 Contest Results (Tie?)
5 projects have been rated by Breakfast & Coffee
TOP OF THE LIST:
https://scratch.mit.edu/discuss/post/8123260/
davidtheplatform created an awesome brainf interpreter
50_scratch_tabs created an awesome tic tac toe game
https://scratch.mit.edu/discuss/post/8122762/
I honestly cannot decide which project takes the crown, the brainf interpreter had so much effort put into it and it works flawlessly, while the tic tac toe game is really well made - a visual game without a canvas, simply using text. (they had to create a parser for the board that figures out what goes where)
Although the brainf interpreter probably actually took a lot longer and I think is the first working interpreter of a real programming language in Obscure. It's really impressive
I'll think about it, and I'll post the results tomorrow.
5 projects have been rated by Breakfast & Coffee
TOP OF THE LIST:
https://scratch.mit.edu/discuss/post/8123260/
davidtheplatform created an awesome brainf interpreter
50_scratch_tabs created an awesome tic tac toe game
https://scratch.mit.edu/discuss/post/8122762/
I honestly cannot decide which project takes the crown, the brainf interpreter had so much effort put into it and it works flawlessly, while the tic tac toe game is really well made - a visual game without a canvas, simply using text. (they had to create a parser for the board that figures out what goes where)
Although the brainf interpreter probably actually took a lot longer and I think is the first working interpreter of a real programming language in Obscure. It's really impressive
I'll think about it, and I'll post the results tomorrow.