No ha hagut massa activitat des del post del Bernat (gràcies Bernat!) però això nomès ha estat al blog. Dins del món real, el GTS ha continuat treballant com sempre, o més si cal.
L'Scorer del Bernat ja es fa servir a l'Escola Mestral de Sant Feliu de Llobregat. Així doncs, ja tenim nens aprenent música gràcies a Squeak! A més, continua treballant fort en el seu TFC basat en Seaside: EduTech. Els que hem vist els seus progressos estem certament impressionats pel que es pot fer amb una bona eina (vull dir Seaside) si ets prou hàbil (vull dir en Bernat).
La Marina encara no ho sap, però un munt de nens i no tan nens aprendran Smalltalk gràcies a ella. Al Citilab estem planejant tota una renovació dels nostres cursos de programació basada en la seva feina. De moment, i fent servir les darreres versions de Pharo (Closures Inside), els nostres robots Arduino es mouen sobre rodes, detecten parets, encenen leds i xiulen melodies, diguèssim, tolerables. Tot plegat es farà públic durant el curs 2009/10. Abans, però, ho ha de defensar en forma de projecte fí de carrera.
Les sessions del GTS han continuat sent molt interessants. En Ray ens va explicar nocions bàsiques d'AIDA, l'altre framework Web per a Smalltalk. Molt interessant. A mi personalment m'agradaria poder tenir temps per conèixer bé tots dos frameworks. En Jose va dedicar una sessió més a insistir sobre Polymorph. Aquesta, lamentablement, me la vaig perdre, però considerant la nostra descarada preferència per Pharo, conèixer bé Polymorph és una necessitat.
Vaig començar una sèrie de sessions dedicada als processos dins d'Squeak, basant-me sobre tot en el capítol 9 del llibre francès Squeak programmation de Xavier Briffault, i també en el capítol 15 del llibre blau. Una cosa és certa, des de que les closures estan implementades com cal, jugar amb processos és molt més agradable. A un Squeak amb les closures sense arreglar proveu d'executar (al workspace per exemple):
| s p1 p2 |
s := SharedQueue new: 20.
p1 := [1 to: 10 do: [:i | s nextPut: i. Processor yield.]] newProcess.
p2 := [11 to: 20 do: [:i | s nextPut: i. Processor yield.]] newProcess.
p1 priority: Processor activePriority - 1.
p2 priority: Processor activePriority - 1.
p1 resume. p2 resume.
s inspect. i compareu el resultat que obteniu amb el que veieu desprès de fer:
| s p1 p2 |
s := SharedQueue new: 20.
p1 := [(1 to: 10) do: [:i | s nextPut: i. Processor yield.]] newProcess.
p2 := [(11 to: 20) do: [:i | s nextPut: i. Processor yield.]] newProcess.
p1 priority: Processor activePriority - 1.
p2 priority: Processor activePriority - 1.
p1 resume. p2 resume.
s inspect. i vinga, a pensar!
La cosa té a veure amb l'implementació defectuosa de les closures a Squeak (com vaig saber gràcies a alguns membres de la comunitat Squeak, que van respondre dins d'squeak-dev als meus dubtes; moltes gràcies a tots ells). Naturalment aquest codi no suposa cap mal de cap quan l'executem a les darreres versions de Pharo. Ens vam deixar per explicar un exemple clàssic, el del sopar dels filòsofs. No sé quan podré tornar-m'hi a posar, però ho acabaré explicant.
Un correu del Juan Miguel a la llista del grup va propiciar una sessió sobre la Reflexió en Smalltalk, amb èmfasi especial en la interceptació de missatges. Basant-nos en les transparències Reflection, del curs open source del Prof. Oscar Nierstrasz vam estar fent un repàs a la darrera lliçó del curs de POOS, que alguns membres del grup tenien (ejem!) una mica oblidada. Les característiques reflexives d'Smalltalk són sorprenents (fixeu-vos en aquest article de fa vint anys!) i, encara que pertanyen clarament al coneixement avançat del llenguatge, posar-s'hi com abans millor fa que l'experiència Smalltalk sigui molt més divertida. I d'això es tracta, no?
Finalment, deixeu-me recordar-vos que, si us interessa l'ensenyament de la programació per a nens i nenes, no us perdeu les nostres activitats del dissabte dia 16 de maig al matí (vegeu l'anunci): el congrès Programa 2009 i la festa del Dia d'Scratch.
English:
There hasn't been too much activity since the post from Bernat (cheers Bernat!) but that has only been on the Blog. Within the real world, the GTS has gone on working as usual...
Bernat's Scorer is already getting well used at the school Escola Mestral de Sant Feliu de Llobregat. Thus, we already have kids learning music thanks to Squeak! On top of that, he's continuing to work hard in his final project degree based in Seaside: EduTech. Those of us that have seen his work-in-progress are certainly well impressed with what can be done with a good tool (a.k.a Seaside) if you are clever enough (a.k.a. Bernat).
Marina doesn't know it yet, but a horde of adults and kids will learn Smalltalk thanks to her. At Citilab we're planning a total overhaul of our programming courses based on her work. So far, and using the latest versions of Pharo (Closures Inside), our Arduino robots can move around on wheels, they detect walls, they light LED's and whistle - let's just say - tolerable, melodies. All in all, we'll make it public sometime during 2009/10. However, beforehand, it has to be defended as her final project degree.
The GTS sessions have continued being very interesting. Ray outlined to us basic notions of AIDA, the other web framework for Smalltalk. Very interesting. I personally would be pleased to have the time to get to grips with both of the frameworks. Jose dedicated another session to pushing Polymorph even further. Unfortunately I missed that one, but considering our barefaced and cheeky preference for Pharo, getting to grips with Polymorph is a necessity.
I began a series of sessions dedicated to processes within Squeak, with the thrust of it being based on chapter 9 of the french book Squeak programmation by Xavier Briffault, and also chapter 15 of the blue book. One thing is certain, since closures are implemented as it needed to be, playing with processes is a whole lot more agreeable. For a Squeak with closures without fixing have a go at executing:
| s p1 p2 |
s := SharedQueue new: 20.
p1 := [1 to: 10 do: [:i | s nextPut: i. Processor yield.]] newProcess.
p2 := [11 to: 20 do: [:i | s nextPut: i. Processor yield.]] newProcess.
p1 priority: Processor activePriority - 1.
p2 priority: Processor activePriority - 1.
p1 resume. p2 resume.
s inspect. and compare the result that you end up with after doing:
| s p1 p2 |
s := SharedQueue new: 20.
p1 := [(1 to: 10) do: [:i | s nextPut: i. Processor yield.]] newProcess.
p2 := [(11 to: 20) do: [:i | s nextPut: i. Processor yield.]] newProcess.
p1 priority: Processor activePriority - 1.
p2 priority: Processor activePriority - 1.
p1 resume. p2 resume.
s inspect. and there you are, get your head round that!
It all has something to do with defective implementing of closures in Squeak (as I found out thanks to some members of the Squeak community, who replied within squeak-dev to my queries; many thanks to them all). Naturally that code doesn't cause a headache executed to the latest versions of Pharo. We ended up leaving out a classic example, the dining philosophers problem. I don't know when I'll be able to put it again but I'll end up telling it.
An email from Juan Miguel to the group-list instigated a session on Reflection in Smalltalk, with a special emphasis on intercepting messages. Based on the slides Reflection, from Prof. Oscar Nierstrasz open source course, we were going back over the last lesson of the POOS course, which was lost in the mists of time by some members of the group (mentioning no names!). The reflexive characteristics of Smalltalk are surprising (pay attention to this twenty years old paper!), even though they clearly belong to advanced knowledge of the language, getting down to it at the earliest possible opportunity makes the Smalltalk experience a whole lot more fun. And that surely is the point, isn't it?
Finally, let me remind you that, if you are interested in the teaching of programming for kids, do not miss our activities for Saturday 16th May in the morning (see this ad): the Programa'09 congress and the Scratch Day fiesta.