Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Snap! user discussion
- Hardmath123
-
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.
A cool example would be to use the “coroutine” pattern to have composable generators like SICP streams.
- bharvey
-
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.
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.
![](http://cs.berkeley.edu/~bh/sig5.png)
- djdolphin
-
1000+ posts
Snap! user discussion
Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one. Yes. BirdBrain (who make the Finch and Hummingbird robots) have made an iOS one, dunno about Android yet.
![](http://cdn.scratch.mit.edu/scratchr2/static/__29cebbddad1a2303315dedb62fd76793__/djangobb_forum/img/smilies/hmm.png)
!
- bharvey
-
1000+ posts
Snap! user discussion
They also made a plain Snap Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one. !. Is it not available in the Apple Store?
![](http://cs.berkeley.edu/~bh/sig5.png)
- djdolphin
-
1000+ posts
Snap! user discussion
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.They also made a plain Snap Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one. !. Is it not available in the Apple Store?
![](http://cdn.scratch.mit.edu/scratchr2/static/__29cebbddad1a2303315dedb62fd76793__/djangobb_forum/img/smilies/hmm.png)
!
- bharvey
-
1000+ posts
Snap! user discussion
Looking into it… There's no plain Snap! in the list of apps from the same developer either.
![](http://cs.berkeley.edu/~bh/sig5.png)
- Jonathan50
-
1000+ posts
Snap! user discussion
The GNU (A)GPL is incompatible with the iOS app store TOS.They also made a plain Snap Is that the one called “Snap for Hummingbird”? I don't have a Hummingbird, and it doesn't seem to work without one. !. Is it not available in the Apple Store?
Not yet a Knight of the Mu Calculus.
- bharvey
-
1000+ posts
Snap! user discussion
Oh? Say more. This would be a problem for the Hummingbird version too; it's essentially the same code. The GNU (A)GPL is incompatible with the iOS app store TOS.
![](http://cs.berkeley.edu/~bh/sig5.png)
- Jonathan50
-
1000+ posts
Snap! user discussion
https://www.fsf.org/blogs/licensing/more-about-the-app-store-gpl-enforcementOh? Say more. This would be a problem for the Hummingbird version too; it's essentially the same code. The GNU (A)GPL is incompatible with the iOS app store TOS.
Not yet a Knight of the Mu Calculus.
- bharvey
-
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?
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)
![](http://cs.berkeley.edu/~bh/sig5.png)
- Jonathan50
-
1000+ posts
Snap! user discussion
IANAL, but probably… 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?
(do you need permission from contributors? maybe)
Not yet a Knight of the Mu Calculus.
- blob8108
-
1000+ posts
Snap! user discussion
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! do you need permission from contributors? maybe
- bharvey
-
1000+ posts
Snap! user discussion
Shhh….. (do you need permission from contributors? maybe)
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.
![](http://cs.berkeley.edu/~bh/sig5.png)
- Spooikypok_Dev
-
100+ posts
Snap! user discussion
Hi, i have got a question: why is Snapp! (The compiler) so slow?
- frodewin
-
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.
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)
- bharvey
-
1000+ posts
Snap! user discussion
Probably you just don't know the secret incantations. 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?
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)
![](http://cs.berkeley.edu/~bh/sig5.png)
- liam48D
-
1000+ posts
Snap! user discussion
http://snap.berkeley.edu/ is giving me 403 forbidden errors.
202e-202e-202e-202e-202e UNI-CODE~~~~~
- ChocolatePi
-
1000+ posts
Snap! user discussion
http://snap.berkeley.edu/ is giving me 403 forbidden errors.Same!
- WooHooBoy
-
1000+ posts
Snap! user discussion
Same herehttp://snap.berkeley.edu/ is giving me 403 forbidden errors.Same!
considered harmful