Discuss Scratch

dimasik5472
New Scratcher
2 posts

Snap! user discussion

Has anyone done tic-tac-toe? I can not and I want to see the script
bharvey
Teacher
1000+ posts

Snap! user discussion

dimasik5472 wrote:

Has anyone done tic-tac-toe? I can not and I want to see the script
Would you like to share what you've tried? You can find lots of tic-tac-toe programs in Scratch, but it's best if you get your own working.
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Snap! user discussion

Am I able to restrict the scope of an upvar to the custom block?
Can I have a variadic sequence of tokens in the custom block?
{
} where (foo) = [] (bar) = []@delInput@addInput ::variables
(upvar) = [] would be repeated.
bharvey
Teacher
1000+ posts

Snap! user discussion

Chibi-Matoran wrote:

Am I able to restrict the scope of an upvar to the custom block?
Can I have a variadic sequence of tokens in the custom block?
Short answer: no and no.

The scope of an upvar was one of the arguments Jens won. His view is that an upvar is a kind of script variable, and so its scope extends to the end of the script in which it appears. He compromised by agreeing that a later declaration of a script var/upvar with the same name makes a new, distinct variable, which is important if you export a lambda using the upvar.

As for a variadic grouping, we both want that, but haven't worked out a notation we're happy with. One of those things on the “after OOP is done” list.
Programaster20
Scratcher
99 posts

Snap! user discussion

Im trying to import a game i made in scratch to snap but it won't work. can someone help?
djdolphin
Scratcher
1000+ posts

Snap! user discussion

Programaster20 wrote:

Im trying to import a game i made in scratch to snap but it won't work. can someone help?
I'm assuming you're using Snapin8r2? Are you getting an error message?
TruDev
Scratcher
80 posts

Snap! user discussion

I'm sorry if this question has been asked before, but when Scratch 3.0, which will also be HTML5, happens, where will Snap! go? Will it stay Morphic.js? Or will it be a pure Scratch 3.0 mod based on the blockly architecture?

Also, should we share Snap! projects on this thread? Like, XML?
TruDev
Scratcher
80 posts

Snap! user discussion

Also, bump please.
bharvey
Teacher
1000+ posts

Snap! user discussion

TruDev wrote:

I'm sorry if this question has been asked before, but when Scratch 3.0, which will also be HTML5, happens, where will Snap! go? Will it stay Morphic.js? Or will it be a pure Scratch 3.0 mod based on the blockly architecture?
Our development is independent from Scratch. I can't imagine Jens ever abandoning Morphic!

Also, should we share Snap! projects on this thread? Like, XML?
If you have a project you think will be generally useful, sure. People have done it. But if you're just pining for a social-media site, it's coming, likely this summer if the back end mods are on schedule.

Also, bump please.
What, you went two minutes without an answer and you're feeling neglected?
BookOwl
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

TruDev wrote:

I'm sorry if this question has been asked before, but when Scratch 3.0, which will also be HTML5, happens, where will Snap! go? Will it stay Morphic.js? Or will it be a pure Scratch 3.0 mod based on the blockly architecture?
Our development is independent from Scratch. I can't imagine Jens ever abandoning Morphic!
If he did it would probably decrease its battery usage. Running Snap! in Firefox will run my laptop's battery from 100% to 30% in a couple hours.
bharvey
Teacher
1000+ posts

Snap! user discussion

BookOwl wrote:

If he did it would probably decrease its battery usage. Running Snap! in Firefox will run my laptop's battery from 100% to 30% in a couple hours.
Noted.
_nix
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

BookOwl wrote:

If he did it would probably decrease its battery usage. Running Snap! in Firefox will run my laptop's battery from 100% to 30% in a couple hours.
Noted.
For what it's worth, that's somewhat true here; maybe not to as huge of an extent, though. It still sucks battery power noticeably more than simply browsing Scratch forums or any other non-news website, but that's probably to be expected when you're working with a whole block-based programming environment.. (Scratch 2.0 definitely eats battery power more than Snap!, mind you! )
bharvey
Teacher
1000+ posts

Snap! user discussion

_nix wrote:

(Scratch 2.0 definitely eats battery power more than Snap!, mind you! )
Ah. So, is there some reason to think that Blockly would do better?
BookOwl
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

_nix wrote:

(Scratch 2.0 definitely eats battery power more than Snap!, mind you! )
Ah. So, is there some reason to think that Blockly would do better?
It's using native SVG and HTML instead of canvas or Flash, so hopefully the browser can do a better job at rendering it fast without using too much energy than JS could. This is all just speculation on my part though, so take it with a grain of salt.
frodewin
Scratcher
500+ posts

Snap! user discussion

bharvey wrote:

Also, should we share Snap! projects on this thread? Like, XML?
If you have a project you think will be generally useful, sure. People have done it. But if you're just pining for a social-media site, it's coming, likely this summer if the back end mods are on schedule.

Awesome, looking very much forward to this! I think this will greatly push development of Snap! projects.
BookOwl
Scratcher
1000+ posts

Snap! user discussion

Feature request: Whenever an error happens while executing a block, the block editor for that block should pop up and the primitive that caused the error should be highlighted.

Last edited by BookOwl (June 14, 2017 18:36:57)

bharvey
Teacher
1000+ posts

Snap! user discussion

BookOwl wrote:

Feature request: Whenever an error happens while executing a block, the block editor for that block should pop up and the primitive that caused the error should be highlighted.
Yeah, I know. We need a lot of work on debugging support.

Jens has expressed some reservations about popping up editor windows because the sprite that caused the error may not be the sprite you're looking at, so it could be complicated and/or confusing. But we'll find a way to meet that objection if necessary.
bharvey
Teacher
1000+ posts

Snap! user discussion

BookOwl wrote:

It's using native SVG and HTML instead of canvas or Flash, so hopefully the browser can do a better job at rendering it fast without using too much energy than JS could. This is all just speculation on my part though, so take it with a grain of salt.
Quoth Jens, if it responds in a lively manner to things that happen, then the scheduler is running all the time.

It's not the drawing that keeps the processor busy, which keeps it hot, which drains the battery, I think.

(Edited to make it more clear where my paraphrase of Jens stops and my own blathering starts.)

(2nd edit: Jens also says that if you don't use the generic hat block, Snap! can sometimes recognize that nothing is running and just redisplay once in a while.)

Last edited by bharvey (June 15, 2017 14:00:17)

TruDev
Scratcher
80 posts

Snap! user discussion

bharvey wrote:

Our development is independent from Scratch. I can't imagine Jens ever abandoning Morphic!

Well, Morphic was abandoned by the ST about 4 years ago, so why did Jens port it to JS? If Morphic were better, the ST would have ported it to Flash. Also, We should do a Snap! (Morphic.js) vs. blockly efficiency test.

If you have a project you think will be generally useful, sure. People have done it. But if you're just pining for a social-media site, it's coming, likely this summer if the back end mods are on schedule.

Great!

What, you went two minutes without an answer and you're feeling neglected?

No, I just wanted to make Snap! more popular by using a bump.
TruDev
Scratcher
80 posts

Snap! user discussion

Also, I had an idea…

bharvey wrote:

Chibi-Matoran wrote:

Am I able to restrict the scope of an upvar to the custom block?
Can I have a variadic sequence of tokens in the custom block?
Short answer: no and no.

The scope of an upvar was one of the arguments Jens won. His view is that an upvar is a kind of script variable, and so its scope extends to the end of the script in which it appears. He compromised by agreeing that a later declaration of a script var/upvar with the same name makes a new, distinct variable, which is important if you export a lambda using the upvar.

As for a variadic grouping, we both want that, but haven't worked out a notation we're happy with. One of those things on the “after OOP is done” list.


(variadic grouping ((a↑) = (b) ...) :: grey stack) :: control hat //sorry about the red, didn't cooperate
where a and b would be lists of inputs. But a list of upvars…?

Powered by DjangoBB