From uh at msc-ge.com Tue Jul 8 13:54:11 2008 From: uh at msc-ge.com (=?iso-8859-1?Q?=22H=FCbner=2C_Uwe=22?=) Date: Tue, 8 Jul 2008 13:54:11 +0200 Subject: [sbe-discussion] Squeak by Example: Some comments. Message-ID: <95EB2A2E71FA7A489A240AD5FF0E14D02F6BB2@msc-ex03.msc-ge.mscnet> As already mentioned on 'squeak-dev': Fantastic book! First of all: I started reading the book using the 'Squeak3.9.1-final-7075.image'. Later (chapter 3?) I used the 'Squeak3.9-final-7067.image'. The virtual machine I used (I'm working under Windows-XP) was the same that Squeakland 3.8-05 uses. To the authors: I would like to make some suggestions. You may find them usefull or not. Keep in mind: They are just suggestions! Sometimes after having got a bit confused, I could not even decide: Was my observation right or wrong? 1. Page 8: 'Do this.' May be there is a Squeak-Icon missing here? 2. Page 16: '... Sokoban by evaluating ...'. May be 'by evaluating' should be replaced with 'doing it'? 3. Page 20: Replace 'To scroll to now itself,' by 'Move the cursor to the list and'? 4. Page 20: Replace 'into the method finder,' by 'into the method finder, and press the RETURN key.'? Below? or above? the sentence starting with 'The method finder will suggest...' you may add 'Click on the found method in the middle pane on the left. The class will be displayed on the right pane.' 5. Page 23: After the section ending with '... and save your method.' you may add: 'The first time you do that, a window opens that asks for your initials. Type them and select Accept(s).' 6. Page 36: I made some mistakes typing method 2.4. After I was quite sure that there was no mistake left, it still didn't work. I selected the whole stuff, CMD-c (copy), closed the window, re-opened it again CMD-v (paste). CMD-s and it worked!!! 7. A simple typo: 'You have see how to...' 8. On page 59 I prefered to 'do' the examples: You may explain 'how' this can be done: Example (17 * 13 > 220)... [CMD-s. CMD-a. CMD-p] The three following examples? (in fact I only tried the third example?): a. Get a 'Transcript' out of the 'Tools'-Flap. b. CMD-s, CMD-a, CMD-d c. Transcript show: n 9. Still page 59: When trying to execute the next example , I got an error saying that the name 'n' was already used in this class. So I decided to using 'i' instead. a. Get a 'Transcript' out of the 'Tools'-Flap. b. CMD-s, CMD-a c. Transcript show: result Maybe you should use four(five) different variables in the examples. 10. Page 61: Started laughing finding 'Calvin & Hobbes' fans. That's it for today. Tomorrow I'm going to type in the rest of my remarks. Uwe MSC Vertriebs GmbH registered office : Stutensee Jurisdiction and registered Mannheim, Germany, HRB No. 10 3631 Managing Director: Manfred Schwarztrauber, Lothar K?mmerlin, R?diger Kuhn Gleichmann & Co. Electronics GmbH registered office : Frankenthal Jurisdiction and registered Ludwigshafen, Germany, HRB No. 21305 Managing Director: Manfred Schwarztrauber, Thomas Klein Obige Signatur/Disclaimer wurde automatisch durch OLXDisclaimer Agent angeh?ngt! http://www.gangl.de/url/OLXDisclaimer.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20080708/9ae5785e/attachment-0001.html From oscar at iam.unibe.ch Wed Jul 9 10:26:20 2008 From: oscar at iam.unibe.ch (Oscar Nierstrasz) Date: Wed, 9 Jul 2008 11:26:20 +0300 Subject: [sbe-discussion] Re: Squeak by Example: Some comments. In-Reply-To: <95EB2A2E71FA7A489A240AD5FF0E14D02F6BB2@msc-ex03.msc-ge.mscnet> References: <95EB2A2E71FA7A489A240AD5FF0E14D02F6BB2@msc-ex03.msc-ge.mscnet> Message-ID: <6BE2FFAD-3AC4-4C35-9926-82DE562839E6@iam.unibe.ch> Thanks Uwe! We will check all your comments and get back to you. - on On Jul 8, 2008, at 2:54 PM, H?bner, Uwe wrote: > As already mentioned on 'squeak-dev': Fantastic book! > > First of all: I started reading the book using the 'Squeak3.9.1- > final-7075.image'. > Later (chapter 3?) I used the 'Squeak3.9-final-7067.image'. The > virtual machine > I used (I'm working under Windows-XP) was the same that Squeakland > 3.8-05 > uses. > > To the authors: I would like to make some suggestions. You may find > them usefull > or not. Keep in mind: They are just suggestions! > Sometimes after having got a bit confused, I could not even decide: > Was my > observation right or wrong? > > 1. Page 8: 'Do this.' May be there is a Squeak-Icon missing here? > > 2. Page 16: '... Sokoban by evaluating ...'. May be 'by evaluating' > should be > replaced with 'doing it'? > > 3. Page 20: Replace 'To scroll to now itself,' by 'Move the cursor > to the list and'? > > 4. Page 20: Replace 'into the method finder,' by 'into the method > finder, and press the RETURN key.'? > > Below? or above? the sentence starting with 'The method finder will > suggest...' you may add > 'Click on the found method in the middle pane on the left. The class > will be displayed on the right pane.' > > 5. Page 23: After the section ending with '... and save your > method.' you may add: > 'The first time you do that, a window opens that asks for your > initials. Type them and select Accept(s).' > > 6. Page 36: I made some mistakes typing method 2.4. After I was > quite sure that there was no mistake left, > it still didn't work. I selected the whole stuff, CMD-c (copy), > closed the window, re-opened it again CMD-v > (paste). CMD-s and it worked!!! > > 7. A simple typo: 'You have see how to...' > > 8. On page 59 I prefered to 'do' the examples: You may explain 'how' > this can be done: > > Example (17 * 13 > 220)... > [CMD-s. CMD-a. CMD-p] > > The three following examples? (in fact I only tried the third > example?): > a. Get a 'Transcript' out of the 'Tools'-Flap. > b. CMD-s, CMD-a, CMD-d > c. Transcript show: n > > 9. Still page 59: When trying to execute the next example , I got an > error saying that the name 'n' > was already used in this class. So I decided to using 'i' instead. > a. Get a 'Transcript' out of the 'Tools'-Flap. > b. CMD-s, CMD-a > c. Transcript show: result > > Maybe you should use four(five) different variables in the examples. > > 10. Page 61: Started laughing finding 'Calvin & Hobbes' fans. > > That's it for today. Tomorrow I'm going to type in the rest of my > remarks. > > Uwe > > > MSC Vertriebs GmbH registered office : Stutensee Jurisdiction and > registered Mannheim, Germany, HRB No. 10 3631 Managing Director: > Manfred Schwarztrauber, Lothar K?mmerlin, R?diger Kuhn Gleichmann & > Co. Electronics GmbH registered office : Frankenthal Jurisdiction > and registered Ludwigshafen, Germany, HRB No. 21305 Managing > Director: Manfred Schwarztrauber, Thomas Klein > > Obige Signatur/Disclaimer wurde automatisch durch OLXDisclaimer > Agent angeh?ngt! > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From uh at msc-ge.com Wed Jul 9 16:36:51 2008 From: uh at msc-ge.com (=?iso-8859-1?Q?=22H=FCbner=2C_Uwe=22?=) Date: Wed, 9 Jul 2008 16:36:51 +0200 Subject: [sbe-discussion] Squeak by Example: Some comments (2). Message-ID: <95EB2A2E71FA7A489A240AD5FF0E14D032F288@msc-ex03.msc-ge.mscnet> 11. Page 82: You may add the following hint: 'Remember that you might 'execute' the code shown below. For that you have to type "Transcript show: " in front of each line. Certainly you first have to get a Transcript browser out of the Tools flap. 12. Page 96: May be there is an error in Figure 5.2: Shouldn't arrow '4' point to the method 'openInWorld'? 13. Page 113: The sentence 'If you deselect the currently selected class, so that no class is selected at all, the main browser pane will display a class creation template (Figure 6.4).' should be replaced by 'If you deselect the currently selected category (most left pane) and then re-select it again, the main browser pane will display a class creation template (Figure 6.4).'? 14. Page 119: The balloon appering when hoovering of the 'inheritance' button explained some different colours. 15. Page 121: May be you should give the hint 'If you click outside the list, it will go away and no variable browser will be created.' some sentences earlier. 16. Page 129: The System Browser shown in Figure 6.14 looks different as the default System Browser in the 'Squeak3.9-final-7067.image' 17. Page 129: 'Monticello will add SBE to its list of packages; the package entry will be marked with an asterisk to show that the version in the image has not yet been written to any repository.' : No. I had no asterisk at all! 18. Page 139: After the third Squeak-Icon: I had to 'Click [Restart]; Select each in the context window. Click on [Through] a few times until each reaches 7. That's it for now. Uwe MSC Vertriebs GmbH registered office : Stutensee Jurisdiction and registered Mannheim, Germany, HRB No. 10 3631 Managing Director: Manfred Schwarztrauber, Lothar K?mmerlin, R?diger Kuhn Gleichmann & Co. Electronics GmbH registered office : Frankenthal Jurisdiction and registered Ludwigshafen, Germany, HRB No. 21305 Managing Director: Manfred Schwarztrauber, Thomas Klein Obige Signatur/Disclaimer wurde automatisch durch OLXDisclaimer Agent angeh?ngt! http://www.gangl.de/url/OLXDisclaimer.html -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.iam.unibe.ch/pipermail/sbe-discussion/attachments/20080709/662ac2ed/attachment.html From stephane.ducasse at free.fr Thu Jul 10 07:56:29 2008 From: stephane.ducasse at free.fr (stephane ducasse) Date: Thu, 10 Jul 2008 07:56:29 +0200 Subject: [sbe-discussion] Fwd: [Squeak-fr] squeak pa l'exemple .. References: <70423B59-E988-44FA-A810-488B988CD771@gmail.com> Message-ID: Begin forwarded message: > From: Franck Wiatrowski > Date: July 9, 2008 10:55:50 PM CEDT > To: squeak-fr at lists.squeakfoundation.org > Subject: [Squeak-fr] squeak pa l'exemple .. > Reply-To: Squeak in french / Squeak en fran?ais > > > Bonjour ? tous, > > suite aux RMLL'08 j'ai eu une r?v?lation pour squeak et smalltalk . > J'ai achet? le livre "squeak pas l'exemple" et j'ai d?cid? > d'approfondir le sujet. Mais d?s le d?but j'ai rencontr? un soucis > assez ennuyeux: dans le premier chapitre du bouquin on voit comment > cr?er une m?thode simple : avec le system browser on entre dans la > class "StringTest" on cr?e la m?thode d?crite : testShout > self assert: ('Pas de panique' shout='PAS DE PANIQUE') > puis on doit lancer le test runner et lancer un test sur StringTest > (grossomodo), on doit en th?orie avoir une erreur en retour puisque > la m?thode n'est pas d?clarer ... mais voil? sur la version squeak > 3.9 (basic ou dev ou m?me en utilisant le framework seaside) on > obtient 2 erreurs (1 erreur et 1 failed) le failed c'est la m?thode > StringTest>>#testIndexOf qui la renvoie .. donc une r?action > diff?rente de ce qu'on devrait avoir si on suit le bouquin. Je tiens > ? pr?ciser que le comportement du test r?agit comme attendu en > utilisant une version 3.10 . J'esp?re ne pas trop flou mais je > d?bute et j'utilise peut ?tre pas la bonne terminologie. Merci ? > ceux qui saurait me > renseigner._______________________________________________ > Squeak-fr mailing list > Squeak-fr at lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr > From alexandre at bergel.eu Thu Jul 10 11:23:36 2008 From: alexandre at bergel.eu (Alexandre Bergel) Date: Thu, 10 Jul 2008 11:23:36 +0200 Subject: [sbe-discussion] Re: Fwd: [Squeak-fr] squeak pa l'exemple .. In-Reply-To: References: <70423B59-E988-44FA-A810-488B988CD771@gmail.com> Message-ID: Glad to hear this! It is good that you went to rmll. Cheers, Alexandre On 10 Jul 2008, at 07:56, stephane ducasse wrote: > > > Begin forwarded message: > >> From: Franck Wiatrowski >> Date: July 9, 2008 10:55:50 PM CEDT >> To: squeak-fr at lists.squeakfoundation.org >> Subject: [Squeak-fr] squeak pa l'exemple .. >> Reply-To: Squeak in french / Squeak en fran?ais >> >> >> Bonjour ? tous, >> >> suite aux RMLL'08 j'ai eu une r?v?lation pour squeak et smalltalk . >> J'ai achet? le livre "squeak pas l'exemple" et j'ai d?cid? >> d'approfondir le sujet. Mais d?s le d?but j'ai rencontr? un soucis >> assez ennuyeux: dans le premier chapitre du bouquin on voit comment >> cr?er une m?thode simple : avec le system browser on entre dans la >> class "StringTest" on cr?e la m?thode d?crite : testShout >> self assert: ('Pas de panique' shout='PAS DE PANIQUE') >> puis on doit lancer le test runner et lancer un test sur StringTest >> (grossomodo), on doit en th?orie avoir une erreur en retour puisque >> la m?thode n'est pas d?clarer ... mais voil? sur la version squeak >> 3.9 (basic ou dev ou m?me en utilisant le framework seaside) on >> obtient 2 erreurs (1 erreur et 1 failed) le failed c'est la m?thode >> StringTest>>#testIndexOf qui la renvoie .. donc une r?action >> diff?rente de ce qu'on devrait avoir si on suit le bouquin. Je tiens >> ? pr?ciser que le comportement du test r?agit comme attendu en >> utilisant une version 3.10 . J'esp?re ne pas trop flou mais je >> d?bute et j'utilise peut ?tre pas la bonne terminologie. Merci ? >> ceux qui saurait me >> renseigner._______________________________________________ >> Squeak-fr mailing list >> Squeak-fr at lists.squeakfoundation.org >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr >> > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. From serge.stinckwich at doesnotunderstand.org Mon Jul 14 22:48:24 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Mon, 14 Jul 2008 22:48:24 +0200 Subject: [sbe-discussion] About a new book Message-ID: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> Hi all, what do you think about the idea to reuse most of the chapters of SBE for a new book for using Squeak on OLPC ? The SBE is under a free licence so it should not be a problem. The idea is to teach developers how to create pedagogical applications for the Squeak OLPC version : screenshots should be adapted to the OLPC version, some chapter should be added : an introductory chapter about the OLPC, a chapter about EToys, maybe a chapter about an big pedagogical Squeak application like Dr Geo 2 (http://wiki.laptop.org/go/DrGeo) and a chapter about Squeak support for OLPC particularities like D-BUS (http://wiki.laptop.org/go/D-BUS). Best regards, -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From denker at iam.unibe.ch Tue Jul 15 08:58:09 2008 From: denker at iam.unibe.ch (Marcus Denker) Date: Tue, 15 Jul 2008 08:58:09 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> Message-ID: <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> On 14.07.2008, at 22:48, Serge Stinckwich wrote: > Hi all, > what do you think about the idea to reuse most of the chapters of SBE > for a new book for using Squeak on OLPC ? > The SBE is under a free licence so it should not be a problem. > I think this is a good idea. What I was already planning was to do a "OLPC Edition" of the book. This would have => a chapter that explains how to escape etoys in the OLPC version => a changeset with some/most of the stuff explained in the book At least the tests of the book need to be green... => new screenshots. => How to install Squeak 3.9 on the OLPC So this would not explain etoys... it would more be for people who want to "go deeper". But I think having a chapter then on etoys and on dr geo would fit as well... So: count me in for help. I think it will be nice to have an OLCP edition of the book. Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From serge.stinckwich at doesnotunderstand.org Wed Jul 16 11:58:13 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Wed, 16 Jul 2008 11:58:13 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> Message-ID: <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> 2008/7/15 Marcus Denker : > > On 14.07.2008, at 22:48, Serge Stinckwich wrote: > >> Hi all, >> what do you think about the idea to reuse most of the chapters of SBE >> for a new book for using Squeak on OLPC ? >> The SBE is under a free licence so it should not be a problem. >> > Hi Marcus, > I think this is a good idea. What I was already planning was to do a > "OLPC Edition" > of the book. This would have > => a chapter that explains how to escape etoys in the OLPC version What do mean by escape, just launch a Smalltalk Browser ;-) > => a changeset with some/most of the stuff explained in the book > At least the tests of the book need to be green... Maybe, we could push this changes to the EToys image. > => new screenshots. > => How to install Squeak 3.9 on the OLPC > > So this would not explain etoys... it would more be for people who want > to "go deeper". Yes, my idea was more : how to build pedagogical applications for Squeak on the OLPC platform. The problem is : should we propose to use the 3.9 or 3.10 image (but they are not part of the standard OLPC distribution) or stick with the somewhat buggy EToys image ? > But I think having a chapter then on etoys and on dr geo would fit as > well... > > So: count me in for help. I think it will be nice to have an OLCP > edition of the book. Ok, lets start to work of the chapter lists first. So what is the next step ? a new svn repository ? -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From serge.stinckwich at doesnotunderstand.org Thu Jul 17 00:06:27 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Thu, 17 Jul 2008 00:06:27 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> Message-ID: <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> 2008/7/16 Serge Stinckwich : > 2008/7/15 Marcus Denker : >> >> On 14.07.2008, at 22:48, Serge Stinckwich wrote: >> >>> Hi all, >>> what do you think about the idea to reuse most of the chapters of SBE >>> for a new book for using Squeak on OLPC ? >>> The SBE is under a free licence so it should not be a problem. >>> >> > > Hi Marcus, > >> I think this is a good idea. What I was already planning was to do a >> "OLPC Edition" >> of the book. This would have >> => a chapter that explains how to escape etoys in the OLPC version > > What do mean by escape, just launch a Smalltalk Browser ;-) > >> => a changeset with some/most of the stuff explained in the book >> At least the tests of the book need to be green... > > Maybe, we could push this changes to the EToys image. > >> => new screenshots. >> => How to install Squeak 3.9 on the OLPC >> >> So this would not explain etoys... it would more be for people who want >> to "go deeper". > > Yes, my idea was more : how to build pedagogical applications for > Squeak on the OLPC platform. > The problem is : should we propose to use the 3.9 or 3.10 image (but > they are not part of the standard OLPC distribution) or stick with the > somewhat buggy EToys image ? > >> But I think having a chapter then on etoys and on dr geo would fit as >> well... >> >> So: count me in for help. I think it will be nice to have an OLCP >> edition of the book. > > Ok, lets start to work of the chapter lists first. > Introduction to the OLPC platform An EToys tour A first Squeak application Syntax in a Nutshell Understanding message syntax The Smalltalk Object Model The Squeak Programming Environment SUnit Basic Classes Collections Streams Morphic Programming EToys Classes and Metaclasses Accessing OLPC platform from Squeak Into a complex Application : DrGeo 2 For the title of the book, some propositions : - Squeak by example - OLPC edition - Creating great OLPC applications with Squeak - Unleash the powser inside your OLPC with Squeak -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From denker at iam.unibe.ch Thu Jul 17 00:46:13 2008 From: denker at iam.unibe.ch (Marcus Denker) Date: Thu, 17 Jul 2008 00:46:13 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> Message-ID: <3237FD49-8ED7-4451-92CF-C962B4FE9557@iam.unibe.ch> On 17.07.2008, at 00:06, Serge Stinckwich wrote: >>> I think this is a good idea. What I was already planning was to do a >>> "OLPC Edition" >>> of the book. This would have >>> => a chapter that explains how to escape etoys in the OLPC >>> version >> >> What do mean by escape, just launch a Smalltalk Browser ;-) >> Yes, but it's a bit hidden I think. >>> => a changeset with some/most of the stuff explained in the >>> book >>> At least the tests of the book need to be green... >> >> Maybe, we could push this changes to the EToys image. >> Yes, that should be possible. >> Yes, my idea was more : how to build pedagogical applications for >> Squeak on the OLPC platform. >> The problem is : should we propose to use the 3.9 or 3.10 image (but >> they are not part of the standard OLPC distribution) or stick with >> the >> somewhat buggy EToys image ? >> Good question. We should first check how many tests fail. It would be best to use what is installed, and then expain how to get install other images. (Pharo, for example). > Introduction to the OLPC platform > An EToys tour > A first Squeak application > Syntax in a Nutshell > Understanding message syntax > The Smalltalk Object Model > The Squeak Programming Environment > SUnit > Basic Classes > Collections > Streams > Morphic > Programming EToys > Classes and Metaclasses > Accessing OLPC platform from Squeak > Into a complex Application : DrGeo 2 > Good! > > For the title of the book, some propositions : > - Squeak by example - OLPC edition I like that. > > - Creating great OLPC applications with Squeak > - Unleash the powser inside your OLPC with Squeak maybe that as a subtitle? I will set up a svn as soon as I come around doing it (tommorow, hopefully). Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From stephane.ducasse at free.fr Sun Jul 20 19:11:18 2008 From: stephane.ducasse at free.fr (stephane ducasse) Date: Sun, 20 Jul 2008 19:11:18 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> Message-ID: <6247EA0C-30A5-4B94-9DAC-3DAA866D5206@free.fr> I agree with marcus. The first simple things to do would be to run the book tests on XO and produce a SqueakByExample for XO. Stef On Jul 15, 2008, at 8:58 AM, Marcus Denker wrote: > > On 14.07.2008, at 22:48, Serge Stinckwich wrote: > >> Hi all, >> what do you think about the idea to reuse most of the chapters of SBE >> for a new book for using Squeak on OLPC ? >> The SBE is under a free licence so it should not be a problem. >> > > > I think this is a good idea. What I was already planning was to do a > "OLPC Edition" > of the book. This would have > => a chapter that explains how to escape etoys in the OLPC version > => a changeset with some/most of the stuff explained in the book > At least the tests of the book need to be green... > => new screenshots. > => How to install Squeak 3.9 on the OLPC > > So this would not explain etoys... it would more be for people who > want > to "go deeper". > > But I think having a chapter then on etoys and on dr geo would fit as > well... > > So: count me in for help. I think it will be nice to have an OLCP > edition of the book. > > Marcus > > > -- > Marcus Denker -- denker at iam.unibe.ch > http://www.iam.unibe.ch/~denker > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From denker at iam.unibe.ch Wed Jul 23 09:59:16 2008 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 23 Jul 2008 09:59:16 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> Message-ID: <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> On 17.07.2008, at 00:06, Serge Stinckwich wrote: >> >> >>> But I think having a chapter then on etoys and on dr geo would fit >>> as >>> well... >>> >>> So: count me in for help. I think it will be nice to have an OLCP >>> edition of the book. >> >> Ok, lets start to work of the chapter lists first. >> > > Introduction to the OLPC platform > An EToys tour > A first Squeak application > Syntax in a Nutshell > Understanding message syntax > The Smalltalk Object Model > The Squeak Programming Environment > SUnit > Basic Classes > Collections > Streams > Morphic > Programming EToys > Classes and Metaclasses > Accessing OLPC platform from Squeak > Into a complex Application : DrGeo 2 > I have added an svn project: https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/OlpcBook/ It's just a copy of the last book version. With some comments for new chapters in sbe.tex. Now I need to get svn configured... Do you have access already to the french repository? Who else would be interested in working on this? -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From serge.stinckwich at doesnotunderstand.org Wed Jul 23 11:13:08 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Wed, 23 Jul 2008 11:13:08 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> Message-ID: <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> 2008/7/23 Marcus Denker : > > On 17.07.2008, at 00:06, Serge Stinckwich wrote: >>> >>> >>>> But I think having a chapter then on etoys and on dr geo would fit >>>> as >>>> well... >>>> >>>> So: count me in for help. I think it will be nice to have an OLCP >>>> edition of the book. >>> >>> Ok, lets start to work of the chapter lists first. >>> >> >> Introduction to the OLPC platform >> An EToys tour >> A first Squeak application >> Syntax in a Nutshell >> Understanding message syntax >> The Smalltalk Object Model >> The Squeak Programming Environment >> SUnit >> Basic Classes >> Collections >> Streams >> Morphic >> Programming EToys >> Classes and Metaclasses >> Accessing OLPC platform from Squeak >> Into a complex Application : DrGeo 2 >> > > I have added an svn project: > > https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/OlpcBook/ > > It's just a copy of the last book version. With some comments for new > chapters > in sbe.tex. > > Now I need to get svn configured... > > Do you have access already to the french repository? Yes i already have access to the french repository. > Who else would be interested in working on this? I might ask Hilaire Fernandes if he is interested. I could also send a message to the EToys list. -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From serge.stinckwich at doesnotunderstand.org Wed Jul 23 11:22:19 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Wed, 23 Jul 2008 11:22:19 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> Message-ID: <1ea823c30807230222y42355328t6405a45bbb6d3564@mail.gmail.com> 2008/7/23 Serge Stinckwich : > 2008/7/23 Marcus Denker : >> >> On 17.07.2008, at 00:06, Serge Stinckwich wrote: >>>> >>>> >>>>> But I think having a chapter then on etoys and on dr geo would fit >>>>> as >>>>> well... >>>>> >>>>> So: count me in for help. I think it will be nice to have an OLCP >>>>> edition of the book. >>>> >>>> Ok, lets start to work of the chapter lists first. >>>> >>> >>> Introduction to the OLPC platform >>> An EToys tour >>> A first Squeak application >>> Syntax in a Nutshell >>> Understanding message syntax >>> The Smalltalk Object Model >>> The Squeak Programming Environment >>> SUnit >>> Basic Classes >>> Collections >>> Streams >>> Morphic >>> Programming EToys >>> Classes and Metaclasses >>> Accessing OLPC platform from Squeak >>> Into a complex Application : DrGeo 2 >>> >> >> I have added an svn project: >> >> https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/OlpcBook/ >> >> It's just a copy of the last book version. With some comments for new >> chapters >> in sbe.tex. >> >> Now I need to get svn configured... I remember there is a project on SqueakSource (down right now) about the book tests. You plan to use the same for the OLPC version ? -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From stephane.ducasse at free.fr Wed Jul 23 12:49:15 2008 From: stephane.ducasse at free.fr (stephane ducasse) Date: Wed, 23 Jul 2008 12:49:15 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> Message-ID: <383D71E1-9E4C-4E5F-B4D0-81988B18BA34@free.fr> for the tour on Etoy do not lose too much time. May be you get inspired by my chapter in the botsinc book. stef On Jul 23, 2008, at 9:59 AM, Marcus Denker wrote: > > On 17.07.2008, at 00:06, Serge Stinckwich wrote: >>> >>> >>>> But I think having a chapter then on etoys and on dr geo would fit >>>> as >>>> well... >>>> >>>> So: count me in for help. I think it will be nice to have an OLCP >>>> edition of the book. >>> >>> Ok, lets start to work of the chapter lists first. >>> >> >> Introduction to the OLPC platform >> An EToys tour >> A first Squeak application >> Syntax in a Nutshell >> Understanding message syntax >> The Smalltalk Object Model >> The Squeak Programming Environment >> SUnit >> Basic Classes >> Collections >> Streams >> Morphic >> Programming EToys >> Classes and Metaclasses >> Accessing OLPC platform from Squeak >> Into a complex Application : DrGeo 2 >> > > I have added an svn project: > > https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/OlpcBook/ > > It's just a copy of the last book version. With some comments for new > chapters > in sbe.tex. > > Now I need to get svn configured... > > Do you have access already to the french repository? > > Who else would be interested in working on this? > > > -- > Marcus Denker -- denker at iam.unibe.ch > http://www.iam.unibe.ch/~denker > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From denker at iam.unibe.ch Wed Jul 23 15:18:42 2008 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 23 Jul 2008 15:18:42 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807230222y42355328t6405a45bbb6d3564@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> <1ea823c30807230222y42355328t6405a45bbb6d3564@mail.gmail.com> Message-ID: <51512100-1F5B-4A95-8775-0412D188F791@iam.unibe.ch> On 23.07.2008, at 11:22, Serge Stinckwich wrote: > 20 > I remember there is a project on SqueakSource (down right now) about > the book tests. You plan to use the same for the OLPC version ? > The best would be to use the same tests. But there is already one problem: OLPC has no Monticello, and loading the current one did not work when I tried it (but I did not spend to much time on it yet) Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From denker at iam.unibe.ch Wed Jul 23 15:26:31 2008 From: denker at iam.unibe.ch (Marcus Denker) Date: Wed, 23 Jul 2008 15:26:31 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> Message-ID: <046ACB65-21C8-40A6-8CE7-1103FB1102C6@iam.unibe.ch> On 23.07.2008, at 11:13, Serge Stinckwich wrote: > >> >> https://www.iam.unibe.ch/scg/svn_repos/SqueakByExample/ >> OlpcBook/ >> >> It's just a copy of the last book version. With some comments for new >> chapters >> in sbe.tex. >> >> Now I need to get svn configured... >> >> Do you have access already to the french repository? > > Yes i already have access to the french repository. > Ok, you have now read/write access. >> Who else would be interested in working on this? > > I might ask Hilaire Fernandes if he is interested. I could also send a > message to the EToys list. Yes, that's a good idea. Marcus -- Marcus Denker -- denker at iam.unibe.ch http://www.iam.unibe.ch/~denker From serge.stinckwich at doesnotunderstand.org Wed Jul 23 15:30:01 2008 From: serge.stinckwich at doesnotunderstand.org (Serge Stinckwich) Date: Wed, 23 Jul 2008 15:30:01 +0200 Subject: [sbe-discussion] Re: About a new book In-Reply-To: <51512100-1F5B-4A95-8775-0412D188F791@iam.unibe.ch> References: <1ea823c30807141348n1b20b082r399cce399658f44@mail.gmail.com> <71FA9891-218D-4271-8A30-5557F4E69DF4@iam.unibe.ch> <1ea823c30807160258y63f547e5qbd6add6e73159f0d@mail.gmail.com> <1ea823c30807161506o40bf8041m133087d9d9480f1b@mail.gmail.com> <4AAED1E0-D646-4F96-8605-2E7BD97939FE@iam.unibe.ch> <1ea823c30807230213h4087a590jfb9c60caa8f6910c@mail.gmail.com> <1ea823c30807230222y42355328t6405a45bbb6d3564@mail.gmail.com> <51512100-1F5B-4A95-8775-0412D188F791@iam.unibe.ch> Message-ID: <1ea823c30807230630o4270c663y369dcad53bcfde39@mail.gmail.com> 2008/7/23 Marcus Denker : > > On 23.07.2008, at 11:22, Serge Stinckwich wrote: > >> 20 >> I remember there is a project on SqueakSource (down right now) about >> the book tests. You plan to use the same for the OLPC version ? >> > > The best would be to use the same tests. But there is already one > problem: OLPC has no Monticello, and loading the current one did not > work when I tried it (but I did not spend to much time on it yet) Hum ... we could provide the tests as changeset at the beginning. -- Serge Stinckwich Smalltalkers do: [:it | All with: Class, (And love: it)] http://blog.doesnotunderstand.org/ From klaus.witzel at cobss.com Wed Jul 30 14:36:30 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Wed, 30 Jul 2008 14:36:30 +0200 Subject: [sbe-discussion] Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers Message-ID: Hi, I've made a small example on how to use a Dictionary as Bag, for computing all divisior combinations of an integer. The background is from Ramanujan's highly composite numbers; two related links are included in the method comments, FWIW, another link (with refs) is - http://mathworld.wolfram.com/HighlyCompositeNumber.html The example source code is downloadable from - http://bugs.squeak.org/view.php?id=7137 Perhaps it fits between [Collection Iterators] and [Some Hints for using Collections]. The method features #at:put: #at:ifAbsent: and #inject:into: on a Dictionary used as Bag (and of course #gcd: ). Something else you need from me? Cheers, Klaus From stephane.ducasse at free.fr Wed Jul 30 22:41:49 2008 From: stephane.ducasse at free.fr (stephane ducasse) Date: Wed, 30 Jul 2008 22:41:49 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: References: Message-ID: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> Some texts :)? Stef On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: > Hi, > > I've made a small example on how to use a Dictionary as Bag, for > computing > all divisior combinations of an integer. The background is from > Ramanujan's highly composite numbers; two related links are included > in > the method comments, FWIW, another link (with refs) is > > - http://mathworld.wolfram.com/HighlyCompositeNumber.html > > The example source code is downloadable from > > - http://bugs.squeak.org/view.php?id=7137 > > Perhaps it fits between [Collection Iterators] and [Some Hints for > using > Collections]. The method features #at:put: #at:ifAbsent: and > #inject:into: > on a Dictionary used as Bag (and of course #gcd: ). > > Something else you need from me? > > Cheers, > Klaus > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From klaus.witzel at cobss.com Thu Jul 31 08:07:44 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Thu, 31 Jul 2008 08:07:44 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> Message-ID: On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: > Some texts :)? The following example employs a Dictionary as a Bag for computing the number of all *combinations* of *divisors* which divide an integer without remainer. The Dictionary's keys are the prime divisors and its values are the number of occurences found during the loop. When a new prime divisor is found, message #at:ifAbsent: initializes its value in the Bag to zero. Then message #at:put: increments the occurences in the Bag. Eventually the Bag's values are used in an #inject:into: message for computing *d* the number of all possible combinations. Note that this is Ramanujan's highly composite number *n* when the *d* is greater than for any smaller *n*. > Stef > On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: > >> Hi, >> >> I've made a small example on how to use a Dictionary as Bag, for >> computing >> all divisior combinations of an integer. The background is from >> Ramanujan's highly composite numbers; two related links are included >> in >> the method comments, FWIW, another link (with refs) is >> >> - http://mathworld.wolfram.com/HighlyCompositeNumber.html >> >> The example source code is downloadable from >> >> - http://bugs.squeak.org/view.php?id=7137 >> >> Perhaps it fits between [Collection Iterators] and [Some Hints for >> using >> Collections]. The method features #at:put: #at:ifAbsent: and >> #inject:into: >> on a Dictionary used as Bag (and of course #gcd: ). >> >> Something else you need from me? >> >> Cheers, >> Klaus >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From klaus.witzel at cobss.com Thu Jul 31 08:33:28 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Thu, 31 Jul 2008 08:33:28 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> Message-ID: On Thu, 31 Jul 2008 08:07:44 +0200, Klaus D. Witzel wrote: > On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: > >> Some texts :)? ... now with less typos and repetitions ... The following example employs a Dictionary as a Bag for computing the number *d* of all *combinations* of *divisors* which divide an integer *n* without remainder. The Dictionary's keys are the prime divisors and its values are the number of occurences found during the loop. Maintaining occurences of keys is how a Bag works. When a new prime divisor is found, message #at:ifAbsent: initializes its occurence to zero. Then message #at:put: increments the occurences. Eventually the occurences are used in an #inject:into: message for computing *d*. Note that *n* is Ramanujan's highly composite number when *d* is greater than for any smaller *n*. > >> Stef >> On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: >> >>> Hi, >>> >>> I've made a small example on how to use a Dictionary as Bag, for >>> computing >>> all divisior combinations of an integer. The background is from >>> Ramanujan's highly composite numbers; two related links are included >>> in >>> the method comments, FWIW, another link (with refs) is >>> >>> - http://mathworld.wolfram.com/HighlyCompositeNumber.html >>> >>> The example source code is downloadable from >>> >>> - http://bugs.squeak.org/view.php?id=7137 >>> >>> Perhaps it fits between [Collection Iterators] and [Some Hints for >>> using >>> Collections]. The method features #at:put: #at:ifAbsent: and >>> #inject:into: >>> on a Dictionary used as Bag (and of course #gcd: ). >>> >>> Something else you need from me? >>> >>> Cheers, >>> Klaus >>> _______________________________________________ >>> Sbe-discussion mailing list >>> Sbe-discussion at iam.unibe.ch >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >>> >> >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From black at cs.pdx.edu Thu Jul 31 14:21:33 2008 From: black at cs.pdx.edu (Andrew P. Black) Date: Thu, 31 Jul 2008 08:21:33 -0400 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> Message-ID: <976F8C93-D0A3-426A-93FD-ED71A6356CFC@cs.pdx.edu> Why not use a bag? On 31 Jul 2008, at 02:07, Klaus D. Witzel wrote: > On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: > >> Some texts :)? > > The following example employs a Dictionary as a Bag for computing the > number of all *combinations* of *divisors* which divide an integer > without > remainer. The Dictionary's keys are the prime divisors and its > values are > the number of occurences found during the loop. When a new prime > divisor > is found, message #at:ifAbsent: initializes its value in the Bag to > zero. > Then message #at:put: increments the occurences in the Bag. > Eventually the > Bag's values are used in an #inject:into: message for computing *d* > the > number of all possible combinations. Note that this is Ramanujan's > highly > composite number *n* when the *d* is greater than for any smaller *n*. > >> Stef >> On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: >> >>> Hi, >>> >>> I've made a small example on how to use a Dictionary as Bag, for >>> computing >>> all divisior combinations of an integer. The background is from >>> Ramanujan's highly composite numbers; two related links are included >>> ... From klaus.witzel at cobss.com Thu Jul 31 15:11:49 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Thu, 31 Jul 2008 15:11:49 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: <976F8C93-D0A3-426A-93FD-ED71A6356CFC@cs.pdx.edu> References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> <976F8C93-D0A3-426A-93FD-ED71A6356CFC@cs.pdx.edu> Message-ID: On Thu, 31 Jul 2008 14:21:33 +0200, Andrew P. Black wrote: > Why not use a bag? Ah, yes: that class is not present in every image. But of course if present it could be easily used. > On 31 Jul 2008, at 02:07, Klaus D. Witzel wrote: > >> On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: >> >>> Some texts :)? >> >> The following example employs a Dictionary as a Bag for computing the >> number of all *combinations* of *divisors* which divide an integer >> without >> remainer. The Dictionary's keys are the prime divisors and its >> values are >> the number of occurences found during the loop. When a new prime >> divisor >> is found, message #at:ifAbsent: initializes its value in the Bag to >> zero. >> Then message #at:put: increments the occurences in the Bag. >> Eventually the >> Bag's values are used in an #inject:into: message for computing *d* >> the >> number of all possible combinations. Note that this is Ramanujan's >> highly >> composite number *n* when the *d* is greater than for any smaller *n*. >> >>> Stef >>> On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: >>> >>>> Hi, >>>> >>>> I've made a small example on how to use a Dictionary as Bag, for >>>> computing >>>> all divisior combinations of an integer. The background is from >>>> Ramanujan's highly composite numbers; two related links are included >>>> ... > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion From klaus.witzel at cobss.com Thu Jul 31 15:37:03 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Thu, 31 Jul 2008 15:37:03 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> <976F8C93-D0A3-426A-93FD-ED71A6356CFC@cs.pdx.edu> Message-ID: On Thu, 31 Jul 2008 15:11:49 +0200, Klaus D. Witzel wrote: > On Thu, 31 Jul 2008 14:21:33 +0200, Andrew P. Black wrote: > >> Why not use a bag? > > Ah, yes: that class is not present in every image. But of course if > present it could be easily used. But I was thinking of MappedCollection instead of Bag when I wrote that :( Okay, will change the method so that it features use of a Bag instead of a Dictionary, update Mantis and email the changed text. >> On 31 Jul 2008, at 02:07, Klaus D. Witzel wrote: >> >>> On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: >>> >>>> Some texts :)? >>> >>> The following example employs a Dictionary as a Bag for computing the >>> number of all *combinations* of *divisors* which divide an integer >>> without >>> remainer. The Dictionary's keys are the prime divisors and its >>> values are >>> the number of occurences found during the loop. When a new prime >>> divisor >>> is found, message #at:ifAbsent: initializes its value in the Bag to >>> zero. >>> Then message #at:put: increments the occurences in the Bag. >>> Eventually the >>> Bag's values are used in an #inject:into: message for computing *d* >>> the >>> number of all possible combinations. Note that this is Ramanujan's >>> highly >>> composite number *n* when the *d* is greater than for any smaller *n*. >>> >>>> Stef >>>> On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: >>>> >>>>> Hi, >>>>> >>>>> I've made a small example on how to use a Dictionary as Bag, for >>>>> computing >>>>> all divisior combinations of an integer. The background is from >>>>> Ramanujan's highly composite numbers; two related links are included >>>>> ... >> _______________________________________________ >> Sbe-discussion mailing list >> Sbe-discussion at iam.unibe.ch >> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion > From klaus.witzel at cobss.com Thu Jul 31 17:26:16 2008 From: klaus.witzel at cobss.com (Klaus D. Witzel) Date: Thu, 31 Jul 2008 17:26:16 +0200 Subject: [sbe-discussion] Re: Using Dictionary as Bag, small example related to Ramanujan's highly composite numbers In-Reply-To: References: <1A1BBDD8-F80B-4498-8711-87F5EBB8217B@free.fr> <976F8C93-D0A3-426A-93FD-ED71A6356CFC@cs.pdx.edu> Message-ID: On Thu, 31 Jul 2008 15:37:03 +0200, Klaus D. Witzel wrote: > On Thu, 31 Jul 2008 15:11:49 +0200, Klaus D. Witzel wrote: > >> On Thu, 31 Jul 2008 14:21:33 +0200, Andrew P. Black wrote: >> >>> Why not use a bag? I checked with the ANSI spec and found nothing that seems to be usable for #inject:into: to provide the occurences per key of a Bag. But in Squeak (not in ANSI) there is #valuesAndCounts which answers the Dictionary wrapped by the Bag. Again checking with ANSI (while the doc is still open ;) aBag valuesAndCounts inject: something into: aBlock is supposed to pass "elements" to aBlock, whatever "elements" means; we know that it means the elements provided by #do: and that is not what the example wants from a Dictionary. So I think that I would have to do aBag valuesAndCounts values inject: something into: aBlock and that I don't like, in part not because of the lengthy explanation on why this has to be so. OTOH my example code has to be ANSI corrected to primesBag values inject: 1 into: aBlock Andy you asked, it's your decision. I would prefer a Dictionary over a Bag for the example but I'm flexible and will happily adapt SBE policy :) Cheers, Klaus >> Ah, yes: that class is not present in every image. But of course if >> present it could be easily used. > > But I was thinking of MappedCollection instead of Bag when I wrote that > :( > > Okay, will change the method so that it features use of a Bag instead of > a > Dictionary, update Mantis and email the changed text. > >>> On 31 Jul 2008, at 02:07, Klaus D. Witzel wrote: >>> >>>> On Wed, 30 Jul 2008 22:41:49 +0200, stephane ducasse wrote: >>>> >>>>> Some texts :)? >>>> >>>> The following example employs a Dictionary as a Bag for computing the >>>> number of all *combinations* of *divisors* which divide an integer >>>> without >>>> remainer. The Dictionary's keys are the prime divisors and its >>>> values are >>>> the number of occurences found during the loop. When a new prime >>>> divisor >>>> is found, message #at:ifAbsent: initializes its value in the Bag to >>>> zero. >>>> Then message #at:put: increments the occurences in the Bag. >>>> Eventually the >>>> Bag's values are used in an #inject:into: message for computing *d* >>>> the >>>> number of all possible combinations. Note that this is Ramanujan's >>>> highly >>>> composite number *n* when the *d* is greater than for any smaller *n*. >>>> >>>>> Stef >>>>> On Jul 30, 2008, at 2:36 PM, Klaus D. Witzel wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I've made a small example on how to use a Dictionary as Bag, for >>>>>> computing >>>>>> all divisior combinations of an integer. The background is from >>>>>> Ramanujan's highly composite numbers; two related links are included >>>>>> ... >>> _______________________________________________ >>> Sbe-discussion mailing list >>> Sbe-discussion at iam.unibe.ch >>> https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion >> > > > _______________________________________________ > Sbe-discussion mailing list > Sbe-discussion at iam.unibe.ch > https://www.iam.unibe.ch/mailman/listinfo/sbe-discussion