Discuss Scratch

Jens
Scratcher
100+ posts

Snap! user discussion

yes. The error message is quite clear about that. I've specifically written that error message for this case, so you get it in plain English.
MrGoldsClass
New to Scratch
2 posts

Snap! user discussion

Whats the best way to share the changing location of a sprite between sprites?

Thanks!
liam48D
Scratcher
1000+ posts

Snap! user discussion

MrGoldsClass wrote:

Whats the best way to share the changing location of a sprite between sprites?

Thanks!
Probably with parent/child sprite relationships.. I'm not sure of the best way to explain it. Jens?

202e-202e-202e-202e-202e UNI-CODE~~~~~
xly
Scratcher
100+ posts

Snap! user discussion

MrGoldsClass wrote:

Whats the best way to share the changing location of a sprite between sprites?

Thanks!
You can try this, see:
http://snap.berkeley.edu/snapsource/snap.html#present:Username=xleroy&ProjectName=oopxl
liam48D
Scratcher
1000+ posts

Snap! user discussion

Um..

(60 second limit got me again D:)

202e-202e-202e-202e-202e UNI-CODE~~~~~
bharvey
Scratcher
1000+ posts

Snap! user discussion

liam48D wrote:

Um..
Thanks for keeping up with the rest of the forum for us!

liam48D
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

liam48D wrote:

Um..
Thanks for keeping up with the rest of the forum for us!
No problem. I /unread all of the Advanced Topics (and also Developing Scratch Extensions and Open Source Projects) at least twice a day.

(only the bold forum topics, i.e. topics that have posts I haven't looked at yet)

202e-202e-202e-202e-202e UNI-CODE~~~~~
Hardmath123
Scratcher
1000+ posts

Snap! user discussion

liam48D, your avatar is missing a lambda extrusion.
liam48D
Scratcher
1000+ posts

Snap! user discussion

Hardmath123 wrote:

liam48D, your avatar is missing a lambda extrusion.
It's not Alonzo, it's Gobo..

I'm making a project with a bunch of new style profile pictures based on the Scratch mottos.

202e-202e-202e-202e-202e UNI-CODE~~~~~
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Snap! user discussion

Hello, in an attempt to understand Y combinator, I am attempting to recreate Btilly's code, here: http://stackoverflow.com/questions/93526/what-is-a-y-combinator

I am writing an anonymous function which uses the Y combinator to call itself, and report a factorial. The entire curried function is placed in a say block, so the sprite can produce output. However, the report block is a stack block, and the call block's ring can only accept reporter statements. Aside from making a named custom reporter, how can I use the report block?

The fact that the block that returns a value is a stack block, and therefore cannot be called, only ran, is very ironic.
luoleo000
Scratcher
5 posts

Snap! user discussion

Check out this collab:

Google In Scratch
Jonathan50
Scratcher
1000+ posts

Snap! user discussion

Chibi-Matoran wrote:

Hello, in an attempt to understand Y combinator, I am attempting to recreate Btilly's code, here: http://stackoverflow.com/questions/93526/what-is-a-y-combinator

I am writing an anonymous function which uses the Y combinator to call itself, and report a factorial. The entire curried function is placed in a say block, so the sprite can produce output. However, the report block is a stack block, and the call block's ring can only accept reporter statements. Aside from making a named custom reporter, how can I use the report block?

The fact that the block that returns a value is a stack block, and therefore cannot be called, only ran, is very ironic.
I thought Y combinator was a company that (donated to? somethinged? invested in? uhh) startups.

Not yet a Knight of the Mu Calculus.
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Snap! user discussion

Jonathan50 wrote:

Chibi-Matoran wrote:

Hello, in an attempt to understand Y combinator, I am attempting to recreate Btilly's code, here: http://stackoverflow.com/questions/93526/what-is-a-y-combinator

I am writing an anonymous function which uses the Y combinator to call itself, and report a factorial. The entire curried function is placed in a say block, so the sprite can produce output. However, the report block is a stack block, and the call block's ring can only accept reporter statements. Aside from making a named custom reporter, how can I use the report block?

The fact that the block that returns a value is a stack block, and therefore cannot be called, only ran, is very ironic.
I thought Y combinator was a company that (donated to? somethinged? invested in? uhh) startups.
The Y Combinator is something from lambda calculus, which I *kind of* understand, but am still trying to grasp. It's basically a way to get an anonymous function to call itself recursively, by accepting itself as a parameter. I'm hoping that using Snap! will help me. I think that the company was named after the lambda concept.
gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Snap! user discussion

Wait, I made a dumb mistake. I don't need the report block, because I can simply insert the expression to return into the ring.
bharvey
Scratcher
1000+ posts

Snap! user discussion

Chibi-Matoran wrote:

However, the report block is a stack block, and the call block's ring can only accept reporter statements. Aside from making a named custom reporter, how can I use the report block?
It would definitely simplify our lives if every block reported a value, as in Lisp. And, even though you were able to solve your problem by just calling an expression, sometimes you do need to call a multi-step script that ends with a report block. To do so, drag a command-shaped ring from the top of the Operators palette into the existing ring slot in CALL, and it'll replace the reporter-shaped one.

Note: Snap! uses applicative order evaluation, and so technically you can't use the Y combinator itself; you have to use the more complicated applicative-order variant. But for most purposes you can just use

which, technically, isn't a combinator at all, but gets the job done.

Jonathan50 wrote:

I thought Y combinator was a company that (donated to? somethinged? invested in? uhh) startups.
The company, which invests in startups, was founded by Paul Graham, who made his fortune by getting software projects running a lot faster than his competitors, because he wrote it in Lisp. See http://www.paulgraham.com/avg.html for example. Anyway, he named the company after the lambda calculus recursion operator.

gdpr533f604550b2f20900645890
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Chibi-Matoran wrote:

However, the report block is a stack block, and the call block's ring can only accept reporter statements. Aside from making a named custom reporter, how can I use the report block?
It would definitely simplify our lives if every block reported a value, as in Lisp. And, even though you were able to solve your problem by just calling an expression, sometimes you do need to call a multi-step script that ends with a report block.
In some other programming languages, functions can be called as stand-alone statements even if they return values. Though this would fundamentally change Snap!, perhaps stack blocks and reporters could both be used as statements or expressions? If a process which doesn't return a value is used in an expression, Snap! could send an error like “Void isn't an acceptable type for this block.”
bharvey
Scratcher
1000+ posts

Snap! user discussion

Chibi-Matoran wrote:

Though this would fundamentally change Snap!, perhaps stack blocks and reporters could both be used as statements or expressions?
Yeah, but that would totally jettison our Scratch heritage. Even though I like to say "Snap! is Scheme disguised as Scratch," it really is Scratch, too. It helps that kids come to Snap! already knowing how to do a lot of things in it.

The metaphor of stack blocks snapping into each other like Lego bricks would vanish, among other things, which means we lose the way the interface prevents many syntax errors.

Basically, I'd love it for my own projects, but we'd end up with a language nobody else would use, probably. Well, you and me, I guess.

djdolphin
Scratcher
1000+ posts

Snap! user discussion

djdolphin wrote:

I'll have to ask my parents if I can go to Scratch Day again.
I finally got a somewhat concrete answer. “Probably.”

!
bharvey
Scratcher
1000+ posts

Snap! user discussion

djdolphin wrote:

“Probably.”
Yay! Just assume it's a yes and as soon as tickets are available, tell them you need their credit card…

nathalierun
Scratcher
7 posts

Snap! user discussion

Hello,

I am a french teacher (from Reunion Island) and I love your adaptation of Scratch to make our own blocks.

I don't find the “set color effect” anywhere in the “Looks” scripts.
I wanted to adapt this project https://scratch.mit.edu/projects/982045 and I don't know how to do.

I have to present Snap to other teachers on next wednesday.

Thank's for any help.

Nathalie

Powered by DjangoBB