timrowledge
Posts: 1270
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

nuScratch is now default scratch

Fri Dec 26, 2014 7:42 pm

As of the recent Raspbian updates the default Scratch is the default. Gulp.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: nuScratch is now default scratch

Fri Dec 26, 2014 11:37 pm

Gratulations to this christmas edition.

Regards
Gerhard

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 1:46 am

Not in sunny Lancashire its not :)

Still 20131213 with me

Even though I updated this morning - I re-updated and still the same

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4103
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 4:17 am

simplesi wrote:Not in sunny Lancashire its not :)

Still 20131213 with me

Even though I updated this morning - I re-updated and still the same

Simon
can confirm that Simon isn't telling porkies.

dist-upgrade'd this morning and scratch --version gives

Code: Select all

Executing: /usr/lib/squeak/4.10.2-2793/squeakvm -encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/scratch/plugins/:/usr/lib/squeak/4.10.2-2793/ -vm-sound-alsa /usr/share/scratch/Scratch20131203.image /home/pi/GnuCOBOL/contrib/--version

timrowledge
Posts: 1270
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 5:35 am

Well, that's interesting.
<Mad Thatcher Voice>I'll pass that on to the Appropriate Authorities and you'll be hearing from them... very soon...</Voice>
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 6:19 am

Hello, I installed a new SD card with vanilla raspbian.
Aside from scratch/squeak, there are also updates on the display drivers, which have shown some 15% better execution times in performance tests in june.

Got a new desktop feeling also, which forces me to update the 'introduction to pi' tutorial. The 'authorities' never worry on training materials ?

Regards,
Gerhard

User avatar
croston
Posts: 701
Joined: Sat Nov 26, 2011 12:33 pm
Location: Blackpool
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 8:08 am

Like the updated GUI, I suspect you need an extra command after dist-upgrade:

Code: Select all

sudo apt-get install nuscratch
Disclaimer: haven't tried this command yet - just spotted the new package yesterday when upgrading the GUI.

P.S. also in sunny Lancashire :P

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 8:45 am

Yes, you need to explicitly apt-get install nuscratch. It was left off the blog post for some reason.

jishiha
Posts: 5
Joined: Mon Oct 21, 2013 2:11 am

Re: nuScratch is now default scratch

Sat Dec 27, 2014 8:47 am

I have been trying NuScratch on the latest NOOBS.

Before, the following command that opens Scratch with a project file specified works with no problem, but now this does not work with NuScratch.

$ scratch --document "/home/pi/Documents/Scratch Projects/test.sb"

Is there any other way to open a specific project file?

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 9:34 am

The startup script 'scratch' in /usr/bin does not support command line switches (so far)
To run a certain scratch.sb, a workaround is

Code: Select all

/usr/bin/squeak-stack -vm-sound-alsa /usr/share/scratch/NuScratchBeta15.image --document /home/pi/Documents/scratch.sb
You find this command by 'cat /usr/bin/scratch'.

Regards
Gerhard

fruitoftheloom
Posts: 20140
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: nuScratch is now default scratch

Sat Dec 27, 2014 9:54 am

jishiha wrote:I have been trying NuScratch on the latest NOOBS.

Before, the following command that opens Scratch with a project file specified works with no problem, but now this does not work with NuScratch.

$ scratch --document "/home/pi/Documents/Scratch Projects/test.sb"

Is there any other way to open a specific project file?
Noobs is the Operating System installer, you are using Raspbian Wheezy Operating System ;)
adieu

Asus CS10 Chromebit / HP Envy 4500 Wireless Printer / Raspberry Pi Model 2B v1.1 / RealVNC Software...

User avatar
B.Goode
Posts: 8044
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: nuScratch is now default scratch

Sat Dec 27, 2014 10:22 am

Has anyone (Simon in particular) been able to verify the start-up and operation of ScratchGPIO with the new default version of Scratch?

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 10:46 am

Has anyone (Simon in particular) been able to verify the start-up and operation of ScratchGPIO with the new default version of Scratch?
I just need to get an alternative SD card setup with it on and test my installer scripts

The NuScratch RC/betas always physically worked fine so worst case is a tweak to the launcher

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

jishiha
Posts: 5
Joined: Mon Oct 21, 2013 2:11 am

Re: nuScratch is now default scratch

Sat Dec 27, 2014 12:32 pm

ghp wrote:The startup script 'scratch' in /usr/bin does not support command line switches (so far)
To run a certain scratch.sb, a workaround is

Code: Select all

/usr/bin/squeak-stack -vm-sound-alsa /usr/share/scratch/NuScratchBeta15.image --document /home/pi/Documents/scratch.sb
You find this command by 'cat /usr/bin/scratch'.

Regards
Gerhard
It worked!! Thank you so much.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 1:20 pm

Has anyone (Simon in particular) been able to verify the start-up and operation of ScratchGPIO with the new default version of Scratch?
All seems good :)

Simon

@Tim Please, please, please can you get rid of the "do you want to save" when nothings happened and I'm try to open an existing file :)
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 3:43 pm

I'm getting very high CPU usage just by loading in a medium script without even running it

https://www.dropbox.com/s/h2zn2kir4wwuz ... ng.sb?dl=0

On A+ with new GUI and LX Terminal open but doing nothing

Simon

PS Is there a method of having the old version available on a Pi to allow for comparisions on the same machine?
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 3:52 pm

Just tried loading Pong and that's worse!

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 3:58 pm

Asteroid - lower CPU than Pong on load
But shooting into corner has gone back to 3secs + on medium sized stage

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 4:15 pm

ok - I've sussed out that to run old Scratch - LX terminal - /usr/bin/scratch.old

I've had a think and a play - too many things have changed to make it a simple task of finding the CPU/slowness issue - asteroids runs better on new GUI/OldScratch than new GUI/NuScratch but not anywhere near my memory of how fast it was with old GUI/NuScratch

The GUI has changed - and also I believe the CPU monitor is different so it can't be trusted to give same results as before

We'll have to get a base old vanilla image (Pre Christmas) and then do some benchmarks

I'll try some real-world ones - gerhard can set his test suites on them :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sat Dec 27, 2014 7:09 pm

Right - took a base image from mid dec
tried asteroid out on that old gui old scratch

did the nuscratch update
tried asteroid out old gui nuscratch

updated to new gui
tried asteroid out new gui nuscratch

and finally
tried asteroid out new gui old scratch
Screen pics and vids
https://www.dropbox.com/s/8eez2ecatoj4i ... s.zip?dl=0

All seems to be in order except for asteroids newg nus being slightly slower than newg nus in medium display mode

But the hogging the CPU by just sitting there doesn't leave much left over to run normal scripts and no spare CPU cycles to utilise on a background Python handler prog!
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

bantammenace2012
Posts: 122
Joined: Mon May 28, 2012 12:18 pm

Re: nuScratch is now default scratch

Sat Dec 27, 2014 10:44 pm

Hi, I've been trying unsuccessfully to get things working all day with the new distro on my original A and B boards.
I can't get Sonic 2.2 to run at all and other software seems to be running painfully slowly. It makes me wonder whether there is a problem with the distro itself ?
I suggest you Scratch guys not to get too vexed as yet about the performance of NuScratch. tbh it was one of the only bits off software that did load quickly.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: nuScratch is now default scratch

Sun Dec 28, 2014 1:59 am

I suggest you Scratch guys not to get too vexed as yet about the performance of NuScratch
As a Scratch Master - its the ONLY thing that matters :)

I didn't even know you could use a Pi for other things :)

Why would you? :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: nuScratch is now default scratch

Sun Dec 28, 2014 6:47 pm

Hello,

had a quick look to the new distro's new scratch's performance. I used a simple loop, moving sprite back and forth, small delay of 0.1 sec included.
In stage mode, cpu load is prox 35%. In presentation mode, cpu load is 21%. CPU load is taken from 'top', which runs in a remote telnet session.
21% for a simple code is not bad, and the higher load in stage mode is due to the animations needed for stage mode (script animation, x, y positions).
For another example I found 52% in stage, 34% in presentation.

The details of the scripts do not matter here, the basic point is the difference between presentation mode and stage mode.

Side topic:
A common 'antipattern' in scratch code is moving sprites in loops and small steps and no delays involved. The 'asterioid' game is a typical example. The movement speed is hence given by driving the cpu to its limits. So the game runs faster on fast cpu, slower on small cpu. Adding more moving elements results in generally slower movements, compensated by larger steps. All kids in my school courses program this way, unfortunately. A better programming style is to use 'glide'-blocks instead of movements, which (pro) give predictable results, but (con) can not be easily interrupted and hence need much more architectural skills.

Some performance analysis to come, but needs some preparation.

Regards,
Gerhard

ghp
Posts: 1391
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: nuScratch is now default scratch

Sun Dec 28, 2014 8:59 pm

Performance results.

I compared:
- my test environment, where I tested the various scratch versions. Here I exercised 'old scratch' and nuscratch15
- an quite old sd card, from an experiment in 2013-8 or so
- THE NEW, the raspbian 2014-12-24 with nuscratch15 aka 2014-12-15

All environments have been different SD cards on same hardware. All running overclock with 1GHz, monitor locally (no vnc or alike). No other programs running in parallel except those provided in raspbian.

Results
perf_new.png
perf_new.png (20.01 KiB) Viewed 4407 times
The yellow columns show nuscratch15 on old and default scratch in THE NEW system.
The blue column is legacy scratch as a reference from my test system
The white color is an old system I found in my lab. A setup from Q3 2013. Was surprised to find 20131203 scratch on this card, did possibly an upgrade in between. On this card I didn't want to install my scratchClient software needed for the remote exercises, as I did not want to mess the python environment there. So no remote performance numbers.

In general, nuscratch15 is similar in performance on the test environment and THE NEW system; slight improvements in the move2 sample.
The numbers are execution times in sec for a given number of executions. Smaller is better.

Summary: similar performance of nuscratch15 in THE NEW environment, complex tests like move2 seem to run a little bit better.

Regards,
Gerhard

Edit: looked for a complex calculation performance test and found a nice list sorting example, quite complicated logic, long running and some parallel sprites. http://scratch.mit.edu/projects/257519/; converted this to 1.4 and slightly adjusted to make it test ready.

When lists are displayed, this takes a lot of cpu and runs slow:
THE NEW, presentation mode, 225 sec
scratch.old, presentation mode, 552 sec

Same example, but lists display hidden

THE NEW, presentation mode, 32 sec
scratch.old, presentation mode 41 sec

timrowledge
Posts: 1270
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: nuScratch is now default scratch

Mon Dec 29, 2014 11:19 pm

jishiha wrote:Before, the following command that opens Scratch with a project file specified works with no problem, but now this does not work with NuScratch.

$ scratch --document "/home/pi/Documents/Scratch Projects/test.sb"
Apologies for that; we didn't communicate sufficiently effectively and the wrong shell script got installed :oops:

You should be able to work around this by replacing /usr/bin/scratch with the old script and editing the

Code: Select all

'IMAGE="use/share/scratch....
line to have the correct image name, which is.. ah... err, well I don;t have that handy but I'm sure someone can enlighten us.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Scratch”