Miriam Ruiz
random thoughts on technology and life











{July 04, 2012}   Scratch in Debian

Scratch has finally reached Debian repositories. Scratch is a programming learning environment created by the Lifelong Kindergarten Group at the MIT Media Lab designed to be accessible by young learners (over 8 years old). Scratch makes it easy to create your own interactive stories, animations, games, music, and art through a visual interface based on blocks. Thus, beginners can get results without having to learn to write syntactically correct code first. It is powerful enough to have even been adopted as an entry-level computer language in computer science programs at different universities.

Scratch makes use of pieces of code embedded in different blocks that are shaped like puzzle pieces. That way, programming consists on putting different blocks together, which gives immediate visual feedback to the programmer about the correctness of the syntax: If the pieces fit together, then the expression is valid. Scratch programming system is so nice and easy that has been the inspiration of other systems such as MIT App Inventor or Google Blocky.

Scratch animations consist of sprites that are animated by dragging the corresponent blocks into the Scripts area of the Scratch interface. Multiple sprites can be created and interact with one another. Each of the sprites can have different looks (called “costumes” in Scratch). You can use built-in sprites, load them from files, or draw your own using a drawing tool integrated in the environment.

Scratch itself is coded in Squeak, a Smalltalk implementation derived from Smalltalk-80.

The Scratch 1.4 source went GPLv2 on March, but there were some incompatibilites with the Squeak Virtual Machine currently in Wheezy that had to be resolved first. Luckily we were able to solve them, with the help of the Scratch and the Squeak guys, so I’m happy to say that Scrach is finally available from Debian repositories.

Note: If any Scratch derivatives (such as BYOB or Panther) also need to be ported to the current version of Squeak, they should have a look at the comments in the Scratch ITP, and especially to the script uploaded by Bert Freudenberg, that replaces 90 indexed primitive declarations (removed in later versions of Squeak VM) with their named counterpart.

Note 2: This wouldn’t have been possible without all the great work and effort made by Amos Blanton and many others. Lots of thanks!



John Kim says:

Wow, this is a bold step forward for aspiring computer-minded kids! With its children-friendly interface and bold ui, it makes Linux a more viable option for students!

There is yet a new task ahead of us: to introduce it to schools.



John Kim says:

Wow, this is a bold step forward for aspiring computer-minded kids! With its children-friendly interface and the bold UI, Scratch looks like a viable option for students interested in coding in the future.

The next task is to push it for use to our schools.



Emre Sevinç says:

This is the coolest piece of news I’ve heard today! Kudos to everyone who helped this happen.



Myra says:

This is an important step! Thanks for your work!

I have two questions:

1) Is there any chance of getting this into Wheezy? Sid is too far out and unstable for me to consider using.

2) Is this the version of Scratch that you can download from the website, that does not support Lego WeDo, or the version from http://ubuntuone.com/p/vp0/ that does support Lego WeDo?



Carl Gundel says:

What about Squeak/Pharo? Are these also included in Linux distros these days?



Miry says:

Myra: According to http://packages.qa.debian.org/s/scratch.html , it should migrate to Wheezy in 4 days, if nothing (serious bugs) prevents it.

About the second question, http://packages.debian.org/wheezy/squeak-plugins-scratch includes the plugin so.WeDoPlugin ( http://packages.debian.org/wheezy/i386/squeak-plugins-scratch/filelist ), so it should work. I don’t have a WeDo kit right now at hand to test it, so if you could confirm whether it really does work or not with WeDo I would be grateful :)



Miry says:

Carl: Pharo ( http://www.pharo-project.org ) doesn’t seem to be included in Debian at the moment ( http://packages.debian.org/pharo ). It seems that some people are working on porting Scratch to Pharo, though ( http://code.google.com/p/scat/ ). It will be nice when they achieve it :)



Myra says:

OK, I’ve had more time to investigate WeDo. Actually, I’m using Scratch under both squeeze and wheezy, but on the Raspberry Pi. I discovered only a couple of days ago that we are using a packaged version that you made! It didn’t work with WeDo, and with the help of Alex Bradbury, we found out why and how to fix it.

It’s a permissions problem. The version of Scratch that I referred to (the one at http://ubuntuone.com/p/vp0/) fixes this by using a udev rule. Specifically, they added a file
/lib/udev/rules.d/40-scratch.rules
with the following contents:
ATTRS{idVendor}==”0694″, ATTRS{idProduct}==”0003″, SUBSYSTEMS==”usb”, ACTION==”add”, MODE=”0666″, GROUP=”plugdev”
This makes the Lego WeDo USB hub readable and writable by the user, as long as the user is in the plugdev group.

Doing this on my Raspberry Pi under wheezy made WeDo work! The additional motor control blocks popped up, and I can control my WeDo models. However it did not fix the problem in squeeze. Since the RPi is going to be moving towards wheezy as its recommended distro, we figured that was good enough.

Is there any chance you can incorporate this change into your package?



Eugenia Núñez says:

Muchas gracias Miriam! El año pasado, inntenté instalarlo en Debian Squeeze y no lo logré. Con tus aporte el problema fue superado y muchos chicos y maestros en Buenos Aires podremos disfrutar de Scratch.



Norberto Mazurk says:

Hi there, There’s no doubt that your web site may be having browser compatibility issues. Whenever I look at your site in Safari, it looks fine however, when opening in IE, it’s got some overlapping issues. I just wanted to give you a quick heads up! Aside from that, wonderful blog!



Ms.G says:

Hi,

I am a middle-school teacher who’s been using LEGO WeDo systems with Scratch on Windows, but I’m trying to introduce Linux.
(so that I can re-purpose old computers, plus encourage more kids & educators & parents to try Linux)

I am having trouble with the USB connection part, I think. Maybe you can help?

I installed the Ubermix (Ubuntu) distro on 2 older Dell Latitude D610′s, and the WeDo USB connection does NOT seem to be working/recognized on either laptop. (The special blocks do NOT auto-appear in Scratch 1.4, nor does any sensor or motor work, even if I make the blocks appear by using the menu, then put them in a program. And yes, I tried all of the USB ports.)

I tried adding the “40-scratch.rules” file as specified above, but no change.

Any other clues/help you could offer?

I really liked the overall kid-friendly package of the Ubermix distro, plus everything else just worked, so I’m hoping to make it work (and be able to share how), but I would be willing to try other distros. Should I just try Wheezy, or do you recommend any other particular packages for young kids?

BTW I have got one Raspberry Pi and it worked just fine with Scratch+WeDo.

Any help would be appreciated!
~ Ms. G
Teacher in Texas



Miry says:

What version of squeak-plugins-scratch are you using? There were issues with the versions previous to 1.4.0.2~svn.r83-2 due to some udev misconfiguration, so my first try would be to upgrade that package to this version. If you’re using Wheezy, the version there is still 1.4.0.2~svn.r83-1, without the fix. It is already fixed in Jessie and, of course, in Sid. If you’re using Ubuntu, Precise still included 1.4.0.2~svn.r83-1, whereas Quantal already has 1.4.0.2~svn.r83-2 (which should work).

Please keep me informed whether this fixed the issue for you.



Leave a Reply


about

This is a personal webpage that belongs to Miriam Ruiz.
If you want to contact her, you can do at:
webmistress(at)miriamruiz(dot)es.

pages
categories
archive
twitter
calendar
December 2014
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  
credits
WikiLeaks

La Lista de Sinde
en isoHunt