Discuss Scratch

Hardmath123
Scratcher
1000+ posts

Snap! user discussion

Jens, could you explain the not-remembering-frames thing? I don't understand why REPEAT (10) doesn't work “correctly” but (10) TIMES does.

A cool example would be to use the “coroutine” pattern to have composable generators like SICP streams.
bharvey
Scratcher
1000+ posts

Snap! user discussion

There's the threads example in the manual:

http://snap.berkeley.edu/snapsource/snap.html#present:Username=bh&ProjectName=threads

As you know, I think the display of the continuation of reporters is all wrong. It should be the whole rest of the script, same as for commands.

djdolphin
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Yes. BirdBrain (who make the Finch and Hummingbird robots) have made an iOS one, dunno about Android yet.
Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one.

!
bharvey
Scratcher
1000+ posts

Snap! user discussion

djdolphin wrote:

Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one.
They also made a plain Snap!. Is it not available in the Apple Store?

djdolphin
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

djdolphin wrote:

Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one.
They also made a plain Snap!. Is it not available in the Apple Store?
Snap for Hummingbird is the only app that comes up when I search “snap birdbrain”. There's no plain Snap! in the list of apps from the same developer either.

!
bharvey
Scratcher
1000+ posts

Snap! user discussion

djdolphin wrote:

There's no plain Snap! in the list of apps from the same developer either.
Looking into it…

Jonathan50
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

djdolphin wrote:

Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one.
They also made a plain Snap!. Is it not available in the Apple Store?
The GNU (A)GPL is incompatible with the iOS app store TOS.

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

Snap! user discussion

Jonathan50 wrote:

The GNU (A)GPL is incompatible with the iOS app store TOS.
Oh? Say more. This would be a problem for the Hummingbird version too; it's essentially the same code.

Jonathan50
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Jonathan50 wrote:

The GNU (A)GPL is incompatible with the iOS app store TOS.
Oh? Say more. This would be a problem for the Hummingbird version too; it's essentially the same code.
https://www.fsf.org/blogs/licensing/more-about-the-app-store-gpl-enforcement

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

Snap! user discussion

Thanks.

We hereby license BirdBrain Technologies, Inc., to use code from Snap! in their products "Snap! for iOS“ and ”Hummingbird Snap!“ with the understanding that they will follow the terms of the AGPL to the extent allowed by their obligations to Apple, Inc.

We hereby declare that ”Snap! for iOS“ and ”Snap!“ are two separate Products, despite sharing code, and that users of ”Snap! for iOS“ are granted a license to use, modify, and redistribute ”Snap!“ under the terms of the AGPL, regardless of any conditions Apple may impose on users of ”Snap! for iOS"; we do this without acknowledging that Apple has a legal right to impose such conditions.

There, will that do?

Last edited by bharvey (Jan. 24, 2016 23:43:14)


Jonathan50
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Thanks.

We hereby license BirdBrain Technologies, Inc., to use code from Snap! in their products "Snap! for iOS“ and ”Hummingbird Snap!“ with the understanding that they will follow the terms of the AGPL to the extent allowed by their obligations to Apple, Inc.

We hereby declare that ”Snap! for iOS“ and ”Snap!“ are two separate Products, despite sharing code, and that users of ”Snap! for iOS“ are granted a license to use, modify, and redistribute ”Snap!“ under the terms of the AGPL, regardless of any conditions Apple may impose on users of ”Snap! for iOS"; we do this without acknowledging that Apple has a legal right to impose such conditions.

There, will that do?
IANAL, but probably…
(do you need permission from contributors? maybe)

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

Snap! user discussion

Jonathan50 wrote:

do you need permission from contributors? maybe
Yes, that's the problem. To distribute AGPL apps on the App Store, you need all your contributors to explicitly give permission to do so. Which is really boring!

tosh · slowly becoming a grown-up adult and very confused about it
bharvey
Scratcher
1000+ posts

Snap! user discussion

Jonathan50 wrote:

(do you need permission from contributors? maybe)
Shhh…..

Actually I'm pretty sure I'm the most free-software zealous of the contributors; Jens would have been happy with an MIT License or none at all.

Spooikypok_Dev
Scratcher
100+ posts

Snap! user discussion

Hi, i have got a question: why is Snapp! (The compiler) so slow?
Spooikypok_Dev
Scratcher
100+ posts

Snap! user discussion

Imagine Snap! and Scratch fusioned…
frodewin
Scratcher
500+ posts

Snap! user discussion

I did some performance tests for Scratch and Snap!

What else than the Amiga Boing Ball Demo would fit here:
Scratch: https://scratch.mit.edu/projects/95733645
Snap!: http://snap.berkeley.edu/snapsource/snap.html#present:Username=frodewin&ProjectName=Boing%20Ball%20Demo
Phosphorus:http://phosphorus.github.io/#95733645

Prime number testing, pure number crunching without graphics:
Scratch: https://scratch.mit.edu/projects/93448586/
Snap!: http://snap.berkeley.edu/snapsource/snap.html#present:Username=frodewin&ProjectName=primetest
Phosphorus:http://phosphorus.github.io/#93448586

Jens provided a project where a sprite is stamped 12345 times:
Scratch: https://scratch.mit.edu/projects/95932974 (remix that does vector and bitmap)
Snap: http://snap.berkeley.edu/snapsource/snap.html#present:Username=jens&ProjectName=stamp%20like%20crazy&editMode&noRun
Phosphorus:http://phosphorus.github.io/#95932974

Boing Ball results:
Grid drawing: Scratch 1.9s vs Snap! 2.9s
Ball travel time: Scratch 5.2s vs Snap! 10.4s

with “prefer smooth animations” enabled the Snap! times are 7.5s and 22.8s

Prime number testing: (I used the number 75173027329)
Scratch 1.17s vs Snap! 9.5s

I also checked the scratch projects with the phosphorus player (which runs in Javascript):
The boing ball is approximately the same speed:
http://phosphorus.github.io/#95733645

The prime test only takes 0.07 seconds with phosphorus
http://phosphorus.github.io/#93448586

Stamping a vector sprite:
Scratch: 12.7s
Snap: 0.6s
Phosphorus: 0.2s

Stamping a bitmap sprite:
Scratch: 1.77s
Snap: 0.6s
Phosphorus: 1.04s

I measured under Windows 7, Firefox 44.0, Flash 20.0

According to the results Scratch is faster than Snap! for pen drawing, sprite animation and number crunching. Snap! is faster for stamping.

*Edit 1* redid measurements according to Brian's tips.
*Edit 2* added measurements from Jen's stamping test.

Last edited by frodewin (Jan. 29, 2016 10:28:02)




You can also find my best projects here or stop at my profile and say hi!
bharvey
Scratcher
1000+ posts

Snap! user discussion


frodewin wrote:

According to the results Snap! was a factor 4 to 8 slower, even in the non-graphical tasks. Did I write bad code or is this the actual performance?
Probably you just don't know the secret incantations.

1. If your project is graphics-intensive or UI-intensive, try going to the Settings menu (with the picture of the gear) and choose “Prefer smooth animations.” If that speeds it up, you're done. Otherwise, unclick “prefer smooth animations” and go to step 2.

2. If your project is compute-intensive with little or no graphics, shift-click the green flag to enter Turbo Mode. If all the computation is in one script, you can do even better by enclosing the script in a WARP block.

One or the other of those should help a lot. Oh, and if you have list watchers on the stage, turn them off.

Last edited by bharvey (Jan. 28, 2016 07:33:18)


liam48D
Scratcher
1000+ posts

Snap! user discussion

http://snap.berkeley.edu/ is giving me 403 forbidden errors.

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

Snap! user discussion

liam48D wrote:

http://snap.berkeley.edu/ is giving me 403 forbidden errors.
Same!
WooHooBoy
Scratcher
1000+ posts

Snap! user discussion

ChocolatePi wrote:

liam48D wrote:

http://snap.berkeley.edu/ is giving me 403 forbidden errors.
Same!
Same here

considered harmful

Powered by DjangoBB