Squeak


14 posts
by jstout » Fri Jun 22, 2012 6:37 am
Squeak is basically Smalltalk, the language that was one of the first to use objects in a completely consistent way (and a major influence on the Ruby language) and the system that (arguably) was the impetus for the graphical user interfaces we see and use today.

In my opinion the development environment for Smalltalk (and hence Squeak), although developed in the late 70s and 80s, rivals many available today.
Posts: 9
Joined: Sat Dec 24, 2011 5:33 pm
by jstout » Fri Jun 22, 2012 6:54 am
Because of licensing issues (as I understand it) the Squeak that's installed on the images for the Pi is incomplete. Squeak compiles 'code' to bytecode which is then interpreted by a virtual machine.

The virtual machine is installed, plus its support files, but the image (the saved state of all the objects that makes up a Squeak system), the sources file (that holds the original source code for the image), and the changes file (that holds changes made to the reference system) are not, and have to be downloaded and installed from http://www.squeak.org.

This is a short shell script that does the installation of these missing files for you, so that when you select Squeak you run the Squeak system. It's not very fancy, no error checking, but I've tested it on the latest distribution (wheezy beta) and it works.

Code: Select all
echo "Fetching sources for Squeak..."
wget -r -O SqueakV41.sources.gz http://ftp.squeak.org/4.1/SqueakV41.sources.gz
echo "(g)Unzipping  sources.."
gunzip -f SqueakV41.sources.gz
echo "Fetching image and changes..."
wget -r -O Squeak-4.3-All-in-One.zip http://ftp.squeak.org/4.3/Squeak-4.3-All-in-One.zip
echo "Unzippping image and changes files..."
unzip -j -o Squeak-4.3-All-in-One.zip "Squeak-4.3-All-in-One.app/Contents/Resources/Squeak4.3.*"
echo "Moving sources, image, and changes files to Squeak directory..."
sudo mv  SqueakV41.sources /usr/share/squeak
sudo mv  Squeak4.3.image /usr/share/squeak
sudo mv  Squeak4.3.changes /usr/share/squeak


Let m know if you have any problems with this: I'm sure it can easily be adapted to other distributions that have the VM installed.
Posts: 9
Joined: Sat Dec 24, 2011 5:33 pm
by jstout » Fri Jun 22, 2012 7:22 am
    Before you buy a wireless keyboard and mouse, check the forums (any offers for a Microsoft Wireless Keyboard and Mouse 800?)
    /tmp on wheezy beta is not large enough to run the above script
    /boot on a image is viewable from a Windows machine
    /boot/config.txt lets you get the resolution of your display down to something you can run a monitors (as opposed to TVs)
    If you edit /boot/config.txt on a Windows machine use something like Notepad++ which 'knows' about Unix/Linux line endings (LF, not CRLF)
    Power seems to be a VERY important issue when getting everything working properly. I'm currently using a PSU for the Pi that I got with the Pi from RS, plus a power hub from Belkin, and everything seems OK, although I still get some odd characters from the Logitech wireless keyboard/mouse I've ended up using
    The internet in general and the forums on http://www.raspberrypi.org in particular are a life-saver. I'm of an age to be able to remember using a BBC B, Commodore Pet, Vic-20, C64 etc: how did we ever manage?
    Without MrEngMan's work on getting RTL8188cus WiFi adapters to work I'd have to do a wired connection to my router which would mean disconnecting my BT Vision box which wouldn't make me very popular
    The current directory is not on the path, so to execute something in the current directory make sure you type ./something
    chmod +x something makes ./something work
    Dillo is a much faster browser than Midori
Posts: 9
Joined: Sat Dec 24, 2011 5:33 pm
by ren41 » Tue Jun 26, 2012 7:28 pm
Thanks for the information regarding extra files - I did start a thread to say that Squeak & Scratch didn't work, but no-one has responded. I'll download them after dinner.

ren
Posts: 99
Joined: Sat May 26, 2012 8:00 pm
by ren41 » Tue Jun 26, 2012 7:41 pm
PS Midori is terrible, & I understand Dillo is very basic. I am praying for a successful port of Chromium to Wheezy (still sticking with Squeeze at the moment). Chromium provides an acceptable browsing experience on Squeeze so I am hoping once it's finally ported it will be even quicker on Wheezy.

Me too.... Dragon 32>BBC Micro (tried Apple, even then aimed at users) >BBC Master>Archimedes>A5000 (are these back to front? can't remember. Anyway we were running a full (small) office system on RiscOS) . Windows 95 (compatibility forced move to Windows & port of office system)>98>2000>XP>Windows7....running SBS4.5....2007.

New to Linux but need to get to grips with Apache, Perl scripts etc so I can learn & play at the same time!

ren
Posts: 99
Joined: Sat May 26, 2012 8:00 pm
by stevek_mcc » Sat Jan 05, 2013 1:52 am
Thanks for the script, I was a bit puzzled when Squeak just hung forever at the image selection dialog. When I copy-pasted your script from Midori to LXTerminal, the mv commands didn't work: there's some funny space character after mv that makes the shell say:
Code: Select all
sudo: mv : command not found

With that corrected, it all works fine for me on Wheezy (512MB model B, 2GB SD card). It's unsurprisingly a big slow, but since I know VisualWorks Smalltalk, it may still be the quickest way to do some tasks. E.g. I just wanted to scale a screenshot down, so rather than download ImageMagick or GIMP I did:

screenshot := ImageReadWriter formFromFileNamed: '/home/pi/2013-01-05-025204_1920x1080_scrot.png'.
smallScreenshot := screenshot scaledIntoFormOfSize: screenshot extent / 4.
PNGReadWriter putForm: smallScreenshot onFileNamed: '/home/pi/rpi.png'.

Looks like Midori is taking half the CPU cycles, so Squeak may be faster once I've finished this post...
Posts: 2
Joined: Sat Jan 05, 2013 1:14 am
by jburke71 » Sat Jan 05, 2013 4:53 pm
Unfortunately, I didn't find this post when I was searching the forms, and I ended up posting a set of manual instructions to get Squeak working (here: viewtopic.php?f=34&t=27931). I'm not sure I would put the libraries in /usr/share, but that's just my opinion/preference. In a multi-user environment, each person would want their own image file to work with, but since the RPI isn't usually being used in this way, then it's not a major issue.
User avatar
Posts: 14
Joined: Tue Oct 23, 2012 2:16 am
by timrowledge » Tue Jan 08, 2013 6:29 am
If anyone is interested in trying out Squeak on a less-annoying OS than *nix ;) , you might like to try out the RISC OS version that I've just resurrected. First, of course, you'll have to download RISC OS but a little reading of the relevant forum will let you work that out. Then just download http://www.rowledge.org/tim/squeak/Squeak3-9-RISCOS.zip and read the READMERIGHTNOW file.
"Compromise", says Professor Trefusis, "is stalling between two fools"
Posts: 396
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
by jburke71 » Wed Jan 09, 2013 9:42 pm
timrowledge wrote:If anyone is interested in trying out Squeak on a less-annoying OS than *nix ;) , you might like to try out the RISC OS version that I've just resurrected. First, of course, you'll have to download RISC OS but a little reading of the relevant forum will let you work that out. Then just download http://www.rowledge.org/tim/squeak/Squeak3-9-RISCOS.zip and read the READMERIGHTNOW file.


Worked like a charm. It seems a bit laggy on my device, but I believe that's due to the SD card speed (since it lags when it's looking up code in the browser). Much better response time than the raspian install I did. I was a bit surprised to be back in an image that had the drawers on the side, but it's not a major issue.

Thanks Tim.
User avatar
Posts: 14
Joined: Tue Oct 23, 2012 2:16 am
by timrowledge » Thu Jan 10, 2013 2:00 am
You're welcome.
Newer version of theVM with working millisecond timer module (thanks Rik Griffin!) is on my site at
http://www.rowledge.org/tim/squeak/Squeak3-9b-RISCOS.zip
I find a bit of interaction improvement by turning off menu and window corner rounding and balloon-help (the tooltips sorta thing). There is certainly still a lot of performance improvement to be pulled out of Morphic even after all these years.
"Compromise", says Professor Trefusis, "is stalling between two fools"
Posts: 396
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
by dr_d_gee » Tue Jan 15, 2013 2:01 pm
timrowledge wrote:You're welcome.
Newer version of theVM with working millisecond timer module (thanks Rik Griffin!) is on my site at
http://www.rowledge.org/tim/squeak/Squeak3-9b-RISCOS.zip


I tried downloading this zip file (twice) but it was corrupt. No issues with the previous version, though.
Posts: 79
Joined: Fri Jan 04, 2013 1:30 pm
by timrowledge » Thu Jan 17, 2013 1:43 am
I tried downloading this zip file (twice) but it was corrupt. No issues with the previous version, though.


Hmph. Dang, you're right. Wonder what on earth happened there. Let me see…
OK, fixed. That'll teach me to upload it with Interarchy on my iMac.
"Compromise", says Professor Trefusis, "is stalling between two fools"
Posts: 396
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
by timrowledge » Wed Jan 23, 2013 9:18 pm
RISC OS Squeak is now making nice noises, playing midi files etc so there'll be a new release soon to let people play with that. Scratch support is being improved next; then I hope to start on getting the VM right up to date with the Cog JIT VM. That ought to roughly triple performance on compute bound work.
"Compromise", says Professor Trefusis, "is stalling between two fools"
Posts: 396
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
by timrowledge » Mon Jan 28, 2013 5:47 am
As promised, see viewtopic.php?p=271839#p271839 to find out how to try a RISC OS Squeak with working sound output.
"Compromise", says Professor Trefusis, "is stalling between two fools"
Posts: 396
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island