So the question is, do we get the Ulam spiral creation code snippet included in Squeak 4.4?
--Hannes
On 10/3/12, Jecel Assumpcao Jr. jecel@merlintec.com wrote:
Hannes. Hirzel wrote on Wed, 3 Oct 2012 14:45:45 +0200
Things which it illustrates are
- The compactness of the Smalltalk language
- How to modify code in a Workspace and execute it with 'do it'.
- The fact that you do not need to have 'deep' knowledge of Smalltalk
in order to adapt a piece of code. 4) It is like a 'poem'. A short self contained nice piece of code.
- Code can be executed directly in the mail window. Oh wait, that is
just me - the last Celeste user ;-)
-- Jecel
On 12 October 2012 12:48, H. Hirzel hannes.hirzel@gmail.com wrote:
So the question is, do we get the Ulam spiral creation code snippet included in Squeak 4.4?
You ask 4.4's release manager, who says "yes! and I'd like some covering text too please!"
frank
--Hannes
On 10/3/12, Jecel Assumpcao Jr. jecel@merlintec.com wrote:
Hannes. Hirzel wrote on Wed, 3 Oct 2012 14:45:45 +0200
Things which it illustrates are
- The compactness of the Smalltalk language
- How to modify code in a Workspace and execute it with 'do it'.
- The fact that you do not need to have 'deep' knowledge of Smalltalk
in order to adapt a piece of code. 4) It is like a 'poem'. A short self contained nice piece of code.
- Code can be executed directly in the mail window. Oh wait, that is
just me - the last Celeste user ;-)
-- Jecel
I propose to add something like the following to the 'welcome workspace'.
At the bottom, 'call to action :-) ,
cf Squeak web site discussion thread.
--Hannes /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The desktop background shows an prime spiral. Natural numbers are arranged in a spiral in a rectangular grid. The 1 is at the center. Primes are marked with a dot.
To see how this is done in Squeak Smalltalk a) select the following code, b) bring up the context menu and c) choose 'do it'.
Display restoreAfter: [ size := 400 squared. primes := (Integer primesUpTo: size) asSet. step := 1. length := 1. pen := Pen new turn: 90. [step < size] whileTrue: [ 2 timesRepeat: [ length timesRepeat: [ pen fillColor: ((primes includes: step) ifTrue: [Color black] ifFalse: [Color white]). pen go: 1. step := step + 1]. pen turn: -90]. length := length + 1]].
Ref: http://en.wikipedia.org/wiki/Ulam_spiral
On 12/5/12, Frank Shearar frank.shearar@gmail.com wrote:
On 12 October 2012 12:48, H. Hirzel hannes.hirzel@gmail.com wrote:
So the question is, do we get the Ulam spiral creation code snippet included in Squeak 4.4?
You ask 4.4's release manager, who says "yes! and I'd like some covering text too please!"
frank
--Hannes
On 10/3/12, Jecel Assumpcao Jr. jecel@merlintec.com wrote:
Hannes. Hirzel wrote on Wed, 3 Oct 2012 14:45:45 +0200
Things which it illustrates are
- The compactness of the Smalltalk language
- How to modify code in a Workspace and execute it with 'do it'.
- The fact that you do not need to have 'deep' knowledge of Smalltalk
in order to adapt a piece of code. 4) It is like a 'poem'. A short self contained nice piece of code.
- Code can be executed directly in the mail window. Oh wait, that is
just me - the last Celeste user ;-)
-- Jecel
On 2012-12-07, at 00:03, "H. Hirzel" hannes.hirzel@gmail.com wrote:
I propose to add something like the following to the 'welcome workspace'.
At the bottom, 'call to action :-) ,
cf Squeak web site discussion thread.
--Hannes /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The desktop background shows an prime spiral. Natural numbers are arranged in a spiral in a rectangular grid. The 1 is at the center. Primes are marked with a dot.
To see how this is done in Squeak Smalltalk a) select the following code, b) bring up the context menu and c) choose 'do it'.
Display restoreAfter: [ size := 400 squared. primes := (Integer primesUpTo: size) asSet. step := 1. length := 1. pen := Pen new turn: 90. [step < size] whileTrue: [ 2 timesRepeat: [ length timesRepeat: [ pen fillColor: ((primes includes: step) ifTrue: [Color black] ifFalse: [Color white]). pen go: 1. step := step + 1]. pen turn: -90]. length := length + 1]].
This version would be even less complex and one line shorter. But maybe a bit too sneaky? OTOH it demos fractional arithmetic, not a bad idea either:
Display restoreAfter: [ size := 400 squared. primes := (Integer primesUpTo: size) asSet. step := 1. length := 1. pen := Pen new turn: 90. [step < size] whileTrue: [ length timesRepeat: [ pen fillColor: ((primes includes: step) ifTrue: [Color black] ifFalse: [Color white]). pen go: 1. step := step + 1]. pen turn: -90. length := length + (1/2)]].
- Bert -
squeak-dev@lists.squeakfoundation.org