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

Re: A new Scratch; pre-alpha-this-will-hurt release

Thu Jan 23, 2014 8:18 pm

Lots of improvements to the drag/drop is making NuScratch work much better. Hope to get another release out this week.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Jan 28, 2014 8:17 pm

New release to try out; much improved script tile dragging makes life a bit nicer.

http://www.raspberrypi.org/NuScratch2.tgz

Usual extraction and startup -
'tar xzvf NuScratch2.tgz'
should create a NScratch directory
'cd NScratch'
'./NuScratch.sh' to run it.

Next attack is on entering text in the argument tiles, then you'll be able build scripts from, er, scratch.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Jan 28, 2014 10:44 pm

Works fine for me :)

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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20707
Joined: Sat Jul 30, 2011 7:41 pm

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Jan 28, 2014 10:55 pm

For those who may know the answer...I've implemented a HW cursor for the Raspi running under X, but for some reason, the only app I have tried that doesn't work correctly is Scratch. It doesn't seem to send the cursor bitmap for updating to the Scratch cursor, so is stuck on the last cursor it was using when it went in to the scratch window.

Anyone know if scratch does something odd with its cursor, or have any idea where in the code that might be done so I can investigate?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Jan 29, 2014 1:16 am

simplesi wrote:Works fine for me :)

Simon
Excellent. The good (but weird) news is that in fact typing into the argument tiles ought to work - it's just that the text cursor/highlighting is fubar'd. I think I have an answer for that coming up soon.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Jan 29, 2014 1:22 am

jamesh wrote:For those who may know the answer...I've implemented a HW cursor for the Raspi running under X, but for some reason, the only app I have tried that doesn't work correctly is Scratch. It doesn't seem to send the cursor bitmap for updating to the Scratch cursor, so is stuck on the last cursor it was using when it went in to the scratch window.

Anyone know if scratch does something odd with its cursor, or have any idea where in the code that might be done so I can investigate?
Hmm. There's a fair bit of code relating to cursors under X (and indeed on almost all platforms except RISC OS, which does things close to 'properly') in the relevant platform specific Squeak VM files. If you have the Squeak vm source code around, look at platforms/unix/vm-dispaly-x11/sqUnixX11.c - if you don't, email me directly at tim at rowledge dot org and I can point you to the relevant places.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Jan 29, 2014 5:10 am

New release out, and unfortunateley I have no spare time till the weekend. I will post feedback then.

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Jan 29, 2014 7:34 am

I can type into arguments - not very smoothly but it does work for me

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

Metaja
Posts: 8
Joined: Thu Jan 30, 2014 10:02 am

Re: A new Scratch; pre-alpha-this-will-hurt release

Thu Jan 30, 2014 7:56 pm

If you are interested with BYOB, you could try Phratch: http://www.raspberrypi.org/phpBB3/viewt ... 64#p496764

Best regards

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Sat Feb 01, 2014 10:05 am

Hello,

some remarks on NuScratch-rel2. This is not a 'full test', just some observations.

Editing values in boxes
- as already mentioned, there is no cursor visible. But editing is basically working.

Dragging boxes into a forever loop
- worked most times. One time I lost this box (not showing up inside forever). But obviously it was there, could drag it out.

Sensing, touching colors
- When you click into the color square, you get the pipette tool. Selecting a color from the stage works, but the color square is not updated.

Timer
- In Sensing, display the timer on stage. It should display in tenth second resolution. But on stage display is increasing width/decreasing width every second (or so). Looks as if there is a formatting problem for number value.

Font contrast
- in current raspbian scratch, font inside blocks is quite bright. In test release, fonts have less contrast.

Mouse over text
- in current 1.4, you have mouse over text on green flag (and other elements) ,missing in test release.

Screen events
- drag operators, sqrt(10) to script area. Just as an isolated block. Click this block, and it will display the calculated value.
Click the background, and the calculated value does not disappear. In scratch 1.4, the value disappears when clicking background. This is, I admit, not a very serious problem.

Sound
- choose cat, sounds, let it meow and I had to unpower the pi, as it was frozen. Remote login (ssh) not possible.

Please be aware that I did not mention all the things successfully tested. Overall impression is that quality has improved.
Right clicks still not working, so I could not look into the remote connections to my sensors.

Some other thoughts:
A test management software with test cases and problem reports would be useful. Maybe you could address this to the RPi foundation to (temporarily) set this up.
I have looked to find some automated test tools like 'sikuli' to build some 'repeat something thousand times' to search for memory leaks. Does not run on RPi. In my school workshop, I have one team clicking like champions but observing some squeak popups now and then. Therefor I wanted to simulate heavy usage... Unfortunately I could not stop them clicking the popups away.
Do you have an idea what could be used ? On windows and 1.4 from MIT, I have set this up and found some strange behavior in right click events. Worked some times, failed intermittend, Looks as button press time is changing. Strange.

Have a nice weekend !
Gerhard

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Feb 04, 2014 1:49 am

Thanks for such thorough testing Gerhard! I appreciate people being willing to take the time.

The first three things you mention all turned out to be due to the same, very simple to fix mistake. The rather bouncy timer display is definitely something to do with text formatting of Floats.

Mouse-over text I hadn't noticed at all. Added to my list.
The displayed result of clicking on a tile disappears after a short while rather than a click on the background; that actually works on oldScratch too, but the background click is an additional dismiss-me signal.
Sound - hmm. Nothing has changed at all there. A complete lock-up almost has to be device driver type of problem, surely?

There's another release coming soon...
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20707
Joined: Sat Jul 30, 2011 7:41 pm

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Feb 04, 2014 9:16 am

Hi Tim,

who is the best person to talk to re: Squeak code? Got a question on the mouse cursor handling. In \Squeak-4.10.2.2614-src\unix\vm-display-X11\sqUnixX11.c there is the following code which sets up the ARGB cursor I use in the HW cursor code.

But you can see that it is dependant on a set of defines, and I cannot find any of them in the code! So, I am guessing this code is not built in (but am not sure). So need to know what's going on here.

Code: Select all

static sqInt display_ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)
{
#if defined(HAVE_LIBXRENDER) && (RENDER_MAJOR > 0 || RENDER_MINOR >= 5)
  int eventbase, errorbase;
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Feb 05, 2014 4:07 am

jamesh wrote:But you can see that it is dependant on a set of defines, and I cannot find any of them in the code! So, I am guessing this code is not built in (but am not sure). So need to know what's going on here.[/code]
This is where life with unix gets to be fun (for certain strange and unusual definitions of the word 'fun') and you have to play with CMake (or autoconf etc) to build the makefiles by running lots of test programs to find the values of about a googol of defines, library versions, whether or not certain faciities exist in that particular OS release and probably the phase of the moon comes into it somewhere.

All that stuff in the squeakvm.org pages about configuring and building is now going to haunt you. Take a look at it, see if it makes sense and let me know how it goes. Assuming you are UK based I can probably point you to a more local helper...
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20707
Joined: Sat Jul 30, 2011 7:41 pm

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Feb 05, 2014 9:12 am

timrowledge wrote:
jamesh wrote:But you can see that it is dependant on a set of defines, and I cannot find any of them in the code! So, I am guessing this code is not built in (but am not sure). So need to know what's going on here.[/code]
This is where life with unix gets to be fun (for certain strange and unusual definitions of the word 'fun') and you have to play with CMake (or autoconf etc) to build the makefiles by running lots of test programs to find the values of about a googol of defines, library versions, whether or not certain faciities exist in that particular OS release and probably the phase of the moon comes into it somewhere.

All that stuff in the squeakvm.org pages about configuring and building is now going to haunt you. Take a look at it, see if it makes sense and let me know how it goes. Assuming you are UK based I can probably point you to a more local helper...
Cambridge, UK

I am also looking at the X code for the HW cursor. Squeak appears not the use the ARGB cursor that all the other apps use (which is what I refer to in above post), but uses the older interface. Unfortunately the X documentation/code is awful, and I am having trouble figuring out how the hell the old API works - make no sense to me whatsoever. Think that is though a better approach than hacking Squeak (although Squeak would benefit from using the ARGB cursor I think) as it will ensure any other apps will also work.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
joan
Posts: 13578
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Feb 05, 2014 11:16 am

ghp wrote: ...
Some other thoughts:
A test management software with test cases and problem reports would be useful. Maybe you could address this to the RPi foundation to (temporarily) set this up.
I have looked to find some automated test tools like 'sikuli' to build some 'repeat something thousand times' to search for memory leaks. Does not run on RPi. In my school workshop, I have one team clicking like champions but observing some squeak popups now and then. Therefor I wanted to simulate heavy usage... Unfortunately I could not stop them clicking the popups away.
...
xdotool?

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Fri Feb 07, 2014 6:49 pm

@ joan

Hello,

I will have a look, thank you.

Gerhard

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20707
Joined: Sat Jul 30, 2011 7:41 pm

Re: A new Scratch; pre-alpha-this-will-hurt release

Sat Feb 08, 2014 9:42 am

jamesh wrote:
timrowledge wrote:
jamesh wrote:But you can see that it is dependant on a set of defines, and I cannot find any of them in the code! So, I am guessing this code is not built in (but am not sure). So need to know what's going on here.[/code]
This is where life with unix gets to be fun (for certain strange and unusual definitions of the word 'fun') and you have to play with CMake (or autoconf etc) to build the makefiles by running lots of test programs to find the values of about a googol of defines, library versions, whether or not certain faciities exist in that particular OS release and probably the phase of the moon comes into it somewhere.

All that stuff in the squeakvm.org pages about configuring and building is now going to haunt you. Take a look at it, see if it makes sense and let me know how it goes. Assuming you are UK based I can probably point you to a more local helper...
Cambridge, UK

I am also looking at the X code for the HW cursor. Squeak appears not the use the ARGB cursor that all the other apps use (which is what I refer to in above post), but uses the older interface. Unfortunately the X documentation/code is awful, and I am having trouble figuring out how the hell the old API works - make no sense to me whatsoever. Think that is though a better approach than hacking Squeak (although Squeak would benefit from using the ARGB cursor I think) as it will ensure any other apps will also work.
I've sorted out the problem now so the HW cursor now works in Scratch as well as general desktop app. Hope to release something next week.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Sun Feb 09, 2014 3:19 am

jamesh wrote: I've sorted out the problem now so the HW cursor now works in Scratch as well as general desktop app. Hope to release something next week.
Well done! I look forward to trying it out.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

eben
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 85
Joined: Sun Jul 17, 2011 11:54 am

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Feb 11, 2014 1:10 pm

Posting this on Tim's behalf now I've had a chance to upload his tarball to the Raspberry Pi servers. A new release of NuScratch is now available for your testing pleasure. High- and low-lights include:
  • The menus, both menubar and pop up, work (though some actions caused by them don’t yet).
  • Building scripts and editing them is working decently, though I can very occasionally manage to end up with a tile being its own owner, which doesn’t end well. If I could reliably replicate the problem I;d have a chance of fixing it…
  • Since pop-up menus work you can add comments to scripts.
  • Sound occasionally goes horribly wrong; again, not reliably. The symptom is a total machine lockup - not UI, no access via ssh terminal on my iMac, nothing. Reboot is the only answer. This is ALSA sound, just in case you know of any problems with it.
  • Attempting to exit via the File->Quit doesn’t work so use the mouse logo upper-left to get its Quit entry.
  • i18n still not working.
  • Quarter size & full-screen neither.
Come and get it here

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Feb 11, 2014 5:31 pm

A key interest with this release is in digging out everything that doesn't work exactly as original Scratch does. Please tell us about any action that doesn't match, any script that behaves differently.

I know that some of the popup menu actions are broken but I also know I don't know anywhere near all of them. Give everything a go and let me know about the failures.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Tue Feb 11, 2014 8:15 pm

Hello,

testcase: forever loop enlarges as needed to embrace blocks.
drag two blocks to script area and connect.
drag 'forever' block towards the two blocks. Lower half is disappearing.
2014-02-11-204237_1920x1080_scrot.png
2014-02-11-204237_1920x1080_scrot.png (1.19 KiB) Viewed 6355 times
When dragging the blocks out, the system stops.

testcase: snap in range
have a block on stage
drag another block below. When in snap range, a white bar is appearing. Drop block just outside snap range. The distance to block is a little bit larger then in scratch 1.4. prox 15 percent. I noticed and confirmed by measuring.

testcase: banana alpha background (already reported)
have a dark background
open banana.
The background is not alpha, but white. You see the rectangle.

testcase: variable creation, and value set
create a variable, variable is diplayed on stage
drag 'set variable to 0 to script area. All further steps are executed with this single 'set' block.
fill in variable 4, doubleclick block: variable on screen is updated
fill in value 7777, doubleclick block, variable on screen is not correctly displayed (area not resized)

testcase: display/hide variables
in variables pallette, the variables have checkboxes to hide/display.
Works for atomic variables.
Does not always work for lists. I have lists with 60 entries, when clicking into the checkbox, the list on stage is dis- or appearing (ok) but the checkbox is not always marked. Seems to depend on doubleclick speed. Fast clicks: list appearing/disappearing, but checkmark missing. Slow clicks (press-wait-release) seem to work better for the checkmark.

rightclick is not working. I get fancy colored bullets all around.
What I could not test due to this:
- comments in script
- rearrange scripts
- large display of variable
- export list variables, import list variables
- start mesh (rightclick in sensing, remote blocks)
[edit:] just discovered that mouse middle button is acting like right click,. New worlds to test tomorrow.
[edit:] enabling remote network connections, and then the system freezes. scratchClient reports connection success.

Fonts seem to be different. The 'say hello' is bold in 1.4, and less impressive in rel3.

Short test today. But I noticed the improvements. Variables, operators, pen movement, stamp, did not mention each and any click successfully clicked this hour.

regards
Gerhard

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Feb 12, 2014 12:49 am

Gerhard, thanks again for you careful testing. It's just what we need; everybody needs a copy editor for these things, we can never spit our own mistookes.

Glad you noticed the middle-button for menus thing. For a production release I'll make either right or middle produce menus.
It's actually the norm for Smalltalk system over history (like RISC OS, of course) and the right button 'fancy coloured bullets' is actually the Halo. Those bullets scattered around are very useful; for example the pale plus spanner lets you get an assortment of inspectors. The blue swirly one lets you rotate almost anything. In fact you can rotate text windows and keep typing!

Special thanks for finding a test case for the block-drag-lockup. I'd seen it a couple of times but never spotted the pattern. I should be able to work out what is messing up now. The immediate problem is that the block you are dragging things it is its owner and you get an inconvenient loop.

Your point about double-click speed seems to connect to a generic problem I see with keyboard and mouse events occasionally being missed. My favourite test case is Asteroid Blaster, where you can almost always end up with your spaceship spinning furiously, ignoring cursor key presses to stop it. What works (usually) is pressing the key to rotate in there same direction again; with luck that gets you a properly noticed key-up event.

So far today I've been able to fix the shift-click in the menu bar making for rather annoying access to a mini-editor that lets you edit the menu headings. Nice in some places but not here. Also the sprite menu items 'resize this sprite' and 'rotate this sprite' now work, and the little handle goes away as it should (that was a fun thing to make work cleanly!). And we can now grab part of the screen for a costume and export the sprites.

Please keep testing and reporting!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Wed Feb 12, 2014 8:44 pm

Let me add another minor observation:
2014-02-12-213304_1920x1080_scrot.png
2014-02-12-213304_1920x1080_scrot.png (1.78 KiB) Viewed 6055 times
You see the comment boxes, top scratch 1.4, bottom rel3. The problem is the small rect top right.

Regards, Gerhard

I have to stop testing now. Next week a new school workshop is starting, and the training materials need some refinement. If you want to have a look, go to my website. Most of the things are in german, but focus is on scratch and connecting hardware to it.

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Sat Feb 15, 2014 9:53 am

Hello,
some compatibility testing.
Project created on windows with 1.4.
Moved to raspberry, runs in rasp-scratch 1.4 and rasp-scratch-rel3.
opened in rasp-scratch-1.4, saved, open in rasp-scratch-rel3 and 'reading' stays there for ever or till my next power bill is arriving or I 'ctrl-C' NuScratch3.sh.
Looks as if rasp-scratch-1.4 adds some features which rel3 does not like.

By the way, nice cpu-load-chart from this script (rel3)
cpu_load.png
cpu_load.png (316 Bytes) Viewed 5809 times
.
For comparison, see the 1.4-chart also
cpu_load_1-4.png
cpu_load_1-4.png (316 Bytes) Viewed 5789 times
regards
Gerhard
Attachments
object_touching.zip
scratch project created on windows scratch 1.4
(40.98 KiB) Downloaded 876 times

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

Re: A new Scratch; pre-alpha-this-will-hurt release

Sat Feb 15, 2014 10:26 pm

ghp wrote:Hello,
some compatibility testing.
Project created on windows with 1.4.
Moved to raspberry, runs in rasp-scratch 1.4 and rasp-scratch-rel3.
opened in rasp-scratch-1.4, saved, open in rasp-scratch-rel3 and 'reading' stays there for ever or till my next power bill is arriving or I 'ctrl-C' NuScratch3.sh.
Looks as if rasp-scratch-1.4 adds some features which rel3 does not like.
I *think* that this is the same issue that affected the old system a month or so ago; I haven't brought forward all the fixes as yet.

It's the next job after finding out why that CBlock dragging goes wrong. I have actually been able to prove it isn't something I did but some deep aspect of the event/update cycle that has changed between Squeak2.8 & 4.4; imagine that, over a course of 10 years some changes were made. The cheek of it!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Scratch”