Discuss Scratch

mybearworld
Scratcher
1000+ posts

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

blubby4 wrote:

(#280)
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.
That'd be a very boring quine though
i_eat_coffee
Scratcher
1000+ posts

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

blubby4 wrote:

i_eat_coffee wrote:

50_scratch_tabs wrote:

Thinking about how to make a quine in Obscure, but not sure exactly how I should go about it.
If you need any new features for it, I'll happily add them.
Can we have a statement called “quine” and it outputs “quine”. That would make it easy
there's no javascript inbuilt function to output fizzbuzz, you have to write it yourself
same goes for this
DifferentDance8
Scratcher
1000+ posts

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

i_eat_coffee wrote:

blubby4 wrote:

i_eat_coffee wrote:

50_scratch_tabs wrote:

Thinking about how to make a quine in Obscure, but not sure exactly how I should go about it.
If you need any new features for it, I'll happily add them.
Can we have a statement called “quine” and it outputs “quine”. That would make it easy
there's no javascript inbuilt function to output fizzbuzz, you have to write it yourself
same goes for this
Plus, if blubby4 needs to make a quine using only one line then there's always HQ9+
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

8to16 wrote:

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
yeah, expressions don't support mathematical operations

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

BigNate469 wrote:

(#291)
Feature suggestion: some way to color output text
ansi-style or just a specific selection of colors?
BigNate469
Scratcher
1000+ posts

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

breakfast_for_dinner wrote:

BigNate469 wrote:

(#291)
Feature suggestion: some way to color output text
ansi-style or just a specific selection of colors?
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)

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

BigNate469 wrote:

(#293)
or, because this is implemented in JS and HTML, possibly anything CSS recognizes as a color
“hey bro i'm gonna make an obscure interpreter”
“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

breakfast_for_dinner wrote:

BigNate469 wrote:

(#293)
or, because this is implemented in JS and HTML, possibly anything CSS recognizes as a color
“hey bro i'm gonna make an obscure interpreter”
“um bro you need to make a css interpreter for it then”
""
HTMLElement.style.color

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

BigNate469 wrote:

(#295)
HTMLElement.style.color
“okay bro i'm gonna make the css interpreter for my obscure interpreter”
“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

BigNate469 wrote:

(#295)
HTMLElement.style.color
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.
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
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!!
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.

Powered by DjangoBB