squeak by example - fosdem08
DESCRIPTION
Lightning talk (20 min) I gave at Fosdem in february 2008 in Brussels, to announce Squeak by Example and make a little noise around Smalltalk. Resources… - http://www.SqueakByExample.org - Alto pictures from http://ftp.squeak.org/Media/ - the font is Jan Gerner's Yanone Kaffeesatz: http://fonts.info/info/en_yanone-kaffeesatz.htmTRANSCRIPT
![Page 1: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/1.jpg)
Squeakby Example
A. Black, S. Ducasse, O. Nierstrasz,Damien Pollet
www.squeakbyexample.org
![Page 2: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/2.jpg)
![Page 3: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/3.jpg)
“I invented the termObject-Oriented,and I can tell you
I did not have C++ in mind.”
— Alan Kay
![Page 4: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/4.jpg)
Everything isan Object
![Page 5: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/5.jpg)
Objects livein an image
![Page 6: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/6.jpg)
shot with debugger, explorer,workspace
![Page 7: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/7.jpg)
example: aNumber"This is a method that illustrates every part of the Smalltalk method syntax. It has unary, binary, and keyword messages, declares arguments and temporaries, accesses an instance variable and a global variable, uses literals (array, character, symbol, string, integer, float), uses the pseudo variables true, false, nil, self, and super, and has sequence, assignment, return and cascade. It has both zero argument and one argument blocks. It doesn’t do anything useful, though."
| x |true & false not & (nil isNil) ifFalse: [ self halt ].x := y + super size.#( $a #a 'a' 1 1.0 ) do: [ :each |
Transcriptshow: each class name ;show: each printString ].
^ x < aNumber
![Page 8: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/8.jpg)
Method invocationis late bound
![Page 9: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/9.jpg)
Methodsare public
![Page 10: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/10.jpg)
Instance variablesare private
![Page 11: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/11.jpg)
Single inheritance
![Page 12: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/12.jpg)
Garbage collection
![Page 13: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/13.jpg)
Everything iswritten in Smalltalk
![Page 14: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/14.jpg)
Control structuresare just methods
![Page 15: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/15.jpg)
do: aBlock 1 to: self size do: [:index | aBlock value: (self at: index)]
![Page 16: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/16.jpg)
Java for-each (JSR 201)dec. 2002 – sep. 2004
![Page 17: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/17.jpg)
What you need
VM Image
Sources Changes
![Page 18: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/18.jpg)
What you get
![Page 19: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/19.jpg)
![Page 20: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/20.jpg)
3.10 image soonbetter tools
modularizationgreen unit tests
![Page 21: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/21.jpg)
![Page 22: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/22.jpg)
the heretic web framework
✓interactive web applications✓backtracking✓components
– REST and pretty URLs for free– templates
![Page 23: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/23.jpg)
renderContentOn: html html heading: count. html anchor callback: [ self increase ]; with: '++'. html space. html anchor callback: [ self decrease ]; with: '--'
![Page 24: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/24.jpg)
![Page 25: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/25.jpg)
2.8 releasefasterlighter
supported by major Smalltalk vendors: Cincom, Gemstone
![Page 26: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/26.jpg)
GNU Smalltalk
![Page 27: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/27.jpg)
![Page 28: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/28.jpg)
3.0.1 released last monthnew syntax for classes*.star package format
Seaside ported as of last night :-)
![Page 29: Squeak by Example - Fosdem08](https://reader034.vdocuments.site/reader034/viewer/2022051609/547ea7afb379595e2b8b554a/html5/thumbnails/29.jpg)
getting startedquick tourfirst applicationsyntaxmessages
programmingobjectstoolstestingbasic classes
collectionsstreamsGUImetaclasses
get the PDF or buy the booktry Smalltalk and have fun!
www.squeakbyexample.org
www.squeak.org#squeak on freenode
www.seaside.stsmalltalk.gnu.org