Posts Tagged ‘Squeak’

Code Club: The Dynabook Vision Alive and Well

March 13th, 2013 1 comment

This video reminds me of those great stories about kids at PARC… They are using Scratch to teach children how to use their Dynabooks :)

From the teachers (Alan Kay has obviously developed a mind control device):

“We’d like the outcome of Code Club to be a whole generation that understands… how to make [computers] do what they want, so they can create their own tools and their own games”

“I really wanted to get the kids… learning how to make things work, [rather] than just being consumers”

From a student:

“It’s really good for learning… before we were just… moving around, but… now we know how to make proper games”

“Our mission… to give every child in the UK the chance to learn to code.

It is our aim to have a Code Club in 25% of primary schools in the UK by the end of 2014″

Metacello: Conditional Loading

February 1st, 2013 No comments


The most frequent use case I have is for pending bug fixes. Imagine this… you find a bug in Pharo that you need fixed to progress on your project, so you fix it. Now, you’ll need the fix to be present anywhere your project is loaded, so what do you do while waiting for the fix to be integrated? You’re obviously not about to manually file in changesets when you have a powerful tool like Metacello! And anyway, you don’t want to have to edit the scripts for your continuous integration server.


I’ve found two ways I like to handle this scenario. I’ll show the (slightly) easier one first.

Method #1 – #customProjectAttributes

This is the method to use for Monticello packages

1. Make sure your configuration has #customProjectAttributes

Depending on the version of Metacello that was used to create your ConfigurationOfMyProject, you may have to add this method (which is easy enough).

In ConfigurationOfMyProject>>project, if you see the following two statements:

	"Construct Metacello project"
	constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self.
	project := constructor project.

Change them to the following:

	project := MetacelloMCProject new projectAttributes: self customProjectAttributes. 
	constructor := (Smalltalk at: #MetacelloVersionConstructor) on: self project: project.
2. Define your custom attributes

#customProjectAttributes will return a collection of symbols that will be added to the Metacello platform symbols e.g. #’squeak4.4′ or #’pharo2.0.x’. The following is for the bug fix example we discussed earlier. The general process is a) declare a condition that let’s you know the fix hasn’t been applied in this image (e.g. a class is not present or DNU a message), and if true, add an attribute declaring that (e.g. #’PharoIssue6300′, as below).

	| requiresPharoFix6300 requiresPharoFix6382 attributes |
	attributes := OrderedCollection new.
	requiresPharoFix6300 := (Morph canUnderstand: #hasKeymapCategoryNamed:) not.
	requiresPharoFix6300 ifTrue: [ attributes add: #'PharoIssue6300' ].
	^ attributes.
3. Finally, add fixes to your baseline

With this method, they must be packaged with Monticello. See method #2 below if you have to use changesets or .st files

	spec for: #'PharoIssue6300' do: [
	spec package: 'SLICE-Issue-6300-Detach-keymaping-shortcuts' with: [
		spec repository: '' ].
	spec package: 'VimPharo' with: [ spec requires: #'SLICE-Issue-6300-Detach-keymaping-shortcuts' ] ].


Method #2 – #preLoadDoIt:

This is the method to use for changesets or .st files

1. Add a #preLoadDoIt: to your baseline

For example:

	spec for: #'common' do: [
		spec blessing: #'baseline'.
		spec preLoadDoIt: #preLoad.
2. Define your callback

This method is going to look much like #customProjectAttributes in method #1. The main difference is, since Metacello can not handle file-ins, you will load the code right in this method instead of delegating, as in the following example:

	| shouldFixIssue7294 |
	shouldFixIssue7294 := (EventHandler canUnderstand: #keyStrokeRecipient) not.
	shouldFixIssue7294 ifTrue: [ '/path/to/issue7294.cs' asFileReference fileIn. ].


So when would you want to use method #2? For one, you may already have a changeset handy. But the other reason is time decay. In Pharo, for example, because of the rapid pace of development, the package you fixed may have another fix applied first. Now, loading your version may silently replace those changes (this is what happens in the MC browser, I assume Metcello works the same way). I’m actually still figuring out the tradeoffs here for myself. For now, I default to method #1 unless I have a specific reason for #2.


So there you have a simple pattern to conditionally load packages or code files in a Metacello configuration

Hope it helps!

Categories: Pharo, Squeak Tags: , , ,

Downloading the Squeak VM

June 16th, 2010 No comments

I wanted to download a the latest Squeak Mac virtual machine from  I knew that I had to connect as a guest via FTP, but it took a while for me to figure out how to accomplish this (seemingly simple) task.

From what I gathered from forums, Finder is not a good option to get files via FTP (although there seem to be workarounds).  When I tried Terminal, I kept getting a mysterious error (are there any other kinds with computers, lol): “bind: Invalid command `rl_complete’.”  In addition to being totally useless in telling me what was going on, there wasn’t any info online.  Thanks to the fickle gods, the error disappeared just as mysteriously.  The command ended up being:

ftp -a



With the second option, you enter your email address when prompted for a password (this seems to happen automatically with the first one).

The remaining steps were (at the ftp command prompt):

  1. binary
  2. get “Squeak”

And that was that, the file was downloaded into my home directory!

Categories: Mac, Squeak Tags: , ,

Why Apple and Microsoft can’t touch Squeak Smalltalk

April 27th, 2010 2 comments

Life in Mac / Windows

Software is hard… and buggy.  We all know that.  Unfortunately, in mainstream systems, there’s very little we can do about it, except maybe file a bug that disappears into the bureaucracy of a major corporation, probably never to be heard from again.

The Squeak Life

I’m using an application called ScriptManager to keep some simple notes.  Here’s a little screenshot:

Now as software is wont to do, as soon as I went to save a profound (and long) note, an error occurred:

“What the heck is that!?” you say.  “I can get cryptic error messages quite easily in Windows, thank you very much.”  Except, this is no ordinary error message – it’s a debugger opened on the application’s code, so I can see exactly what went wrong.  I can do this because all code – from the lowest level graphics and file libraries, to whole applications – is available to me to change as I please.  And it’s all in the same simple, revolutionary (old) language – Smalltalk.  I don’t have to chase the application’s C++ to the libraries’ C to… well what difference does it make – I would’ve given up already.

But in Squeak, within 2 minutes, I had fixed the error and recovered my note.

You see, by flipping through the call stack, the debugger showed me exactly which object had gone south.  I was able to open and inspect this object in another tool:

It was immediately obvious that a nil entry had been stored in a set, which is not allowed.  Right in the tool, I was able to delete the key:

And I was back on track – no work lost!  How does that compare to your last error in OS X or Windows?

n.b. I was using a variant of Squeak called Pharo.  All this info applies to all versions of Squeak.

Categories: Smalltalk Tags: ,

BDD in Squeak Smalltalk: An exploration

April 27th, 2010 4 comments

Coming from Ruby, I’m obsessed with Behavior Driven Development.  The community (e.g. Rspec, Cucumber) is alive, and there is a body of practices to follow.

Since TDD was born in Smalltalk, I expected to find the same energy and guidance in Squeak.  Squeak represents the most profound, empowering environment I’ve ever seen (I will never go back to C, C++, or even Ruby – which misses the boat by not being a living system).  However, the testing situation seems frozen in the early days.

My intention is to create do a series of experiments, which will lead to BDD best-practices in Squeak.  My vision is code that is pulled into existence by what matters to its users, that is easy to understand, and easy to change.

I’ll keep you posted…

windows 7 product key

windows 7 product key

windows 7 key generator

windows 7 key generator

free winrar download

free winrar download

winzip activation code

winzip activation code

free winrar

free winrar

winzip free download

winzip free download

winrar free download

winrar free download

winrar download free

winrar download free

winzip free download full version

winzip free download full version

windows 7 activation crack

windows7 activation crack

windows 7 crack

windows 7 crack

free winzip

free winzip