From frank.shearar at gmail.com Sat Oct 1 02:02:28 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Sat Oct 1 02:02:32 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On Sep 30, 2016 09:50, "Nicolas Cellier" wrote: > > > > 2016-09-30 14:57 GMT+02:00 Jakob Reschke : >> >> Hello, >> >> Looks good to me as an outline. I have the following comments, >> questions or doubts: >> >> 1. Currently, for me it does not feel like "entering" or "leaving" an >> Environment, as that works with dynamic scoping in a block. So step 8 >> could turn out to be void. >> >> 2. Since all of this should go into a workspace, not into the browser, >> what is the shortest applicable snippet of code that, given a source >> code string and a class, creates a new method in that class? >> >> 3. I am not sure what will happen if you attempt to create a subclass >> that has the same name as another imported class. Generally, >> evaluating Superclass subclass: #Subclass ... a second time will >> replace the former Subclass by the new Subclass. 'myEnvironment' would >> have imported Hello from Smalltalk globals, so an "old" Hello is >> already visible. We have to check that evaluating the subclass >> expression will not try to update that existing Hello class, but >> create a new one instead. Here, the "shallow" lookup mechanism would >> be needed. >> > Don't import: Smalltalk globals entirely, just from: Smalltalk globals import: #Transcript. > and #Object too, depending in which environment you'll evaluate the message for creating the class... > >> >> Once I have figured out 2. I will try out and check 3. ;-) >> >> Kind regards, >> Jakob >> > > Here is a snippet that works, but is not especially short. > > | createHelloClass createHelloMethod english spanish | > > "Straight but verbose code to create a Hello class and compile a say method. > There's one trick: Environment current, otherwise Compiler would evaluate in nil class environment, not good" > createHelloClass := [Object subclass: #Hello > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'Test']. > createHelloMethod := [:greeting | > | methodSource sourceCode | > methodSource := 'say Transcript cr; show: ' , greeting printString. > sourceCode := 'Hello class compile: ' , methodSource printString , ' classified: ' , 'test' printString. > Compiler evaluate: sourceCode environment: Environment current]. > > "Create the english and spanish environments" > english := Smalltalk globals. > spanish := Environment withName: 'Spanish'. > spanish importSelf. > spanish from: english import: #Transcript. > > "Create the class and compile the method in each environment:" > > [createHelloClass value. > createHelloMethod value: 'Hello world'] on: CurrentEnvironment do: [:exc | exc resume: english]. > > [createHelloClass value. > createHelloMethod value: 'Buenos dias'] on: CurrentEnvironment do: [:exc | exc resume: spanish]. > > "Greet" > Compiler evaluate: 'Hello say' environment: english. > Compiler evaluate: 'Hello say' environment: spanish. > Compiler evaluate: 'Hello say' environment: english. > > "Cleanup" > [Compiler evaluate: 'Hello removeFromSystem' environment: Environment current] on: CurrentEnvironment do: [:exc | exc resume: english]. > [Compiler evaluate: 'Hello removeFromSystem' environment: Environment current] on: CurrentEnvironment do: [:exc | exc resume: spanish]. > > Yes, a DynamicVariable: > CurrentEnvironment value: english during: ["load something"]. > would be nicer than: > ["load something"] on: CurrentEnvironment do: [:exc | exc resume: english]. > Otherwise we coulf fileIn some chunk format stream thru en EnvironmentLoader for: english... I wrote Control to do pretty much that: give a nice interface through which to create and change delimited dynamic variables (and delimited continuations). I would link to it (it's on SS3) but my phone is a bit limited... frank >> 2016-09-30 13:29 GMT+02:00 H. Hirzel : >> > Starting a new thread, culled from the thread 'What are environments for'. >> > >> > There are many more good questions and thoughts in the thread 'What >> > are environments for' but this thread is just about what the subject >> > says: >> > >> > How to create a 'Hello world' example for environments >> > >> > --Hannes >> > >> > On 9/29/16, David T. Lewis wrote: >> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >> >>> On 9/29/16, Jakob Reschke wrote: >> >>> > Hi Nicolas, >> >>> > >> >>> > First, thank you for answering me in the other thread. >> >>> > >> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >> >>> > : >> >>> >> Without clear goals or vision, fixing could essentially mean "let >> >>> >> Environment be transparent", that is let it remain a promise, a >> >>> >> potential, >> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of >> >>> >> over-engineered nice piece of code that might serve later. OK this >> >>> >> sounds >> >>> >> like a mandatory first step. >> > >> > >> >>> > I don't quite get what you mean by transparent, other than fixing it >> >>> > and enhancing the documentation to shed some light on what it is, why >> >>> > it is there and how to use it. >> > .. >> > ... >> > >> >>> Another maybe simple use case could be to have a project specific >> >>> environment set up when you enter a project >> >>> (http://wiki.squeak.org/squeak/1020). >> >>> >> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >> >>> >> >>> 1) Subclass MorphicProject --- MyMorphicProject >> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >> >>> 4) ... some more adaptations ..... to enter a new Environment -- how? >> >>> >> >> >> >> I like this idea a lot. >> >> >> >> I would love to see a simple "hello world!" level example of Environments. >> >> If someone could make an EnvironmentsDemoProject that opens a new project >> >> with >> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', >> >> I think it might really help me to understand how to use Environments. >> >> >> >> Dave >> > >> > So let's focus on a 'hello world' example for environments and do it >> > _slowly_ step by step so that people can catch up with the issues. >> > >> > >> > >> > Outline of steps of a 'Hello world' environments example >> > ============================================= >> > >> > Steps >> > >> > >> > 1. subclass Object with a #Hello class. >> > >> > 2. compile a class method #say the method should write 'Hello' to the Transcript >> > >> > 3. run >> > Hello say >> > >> > The result should be 'Hello' on the Transcript >> > >> > >> > 4. create a new Environment called "myEnvironment". >> > >> > 5. import the Smalltalk environmnet into myEnvironment >> > >> > 6. subclass Object with a #Hello class in myEnvironment >> > >> > 7. compile a method #say the method should write 'Buenas dias' to the Transcript >> > >> > run >> > Hello say >> > >> > Result should be >> > >> > 30-Sept-2016 >> > >> > Starting a new thread, culled from the thread 'What are environments for'. >> > >> > There are many more good questions and thoughts in the thread 'What >> > are environments for' but this thread is just about what the subject >> > says: >> > >> > How to create a 'Hello world' example for environments >> > >> > --Hannes >> > >> > On 9/29/16, David T. Lewis wrote: >> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >> >>> On 9/29/16, Jakob Reschke wrote: >> >>> > Hi Nicolas, >> >>> > >> >>> > First, thank you for answering me in the other thread. >> >>> > >> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >> >>> > : >> >>> >> Without clear goals or vision, fixing could essentially mean "let >> >>> >> Environment be transparent", that is let it remain a promise, a >> >>> >> potential, >> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of >> >>> >> over-engineered nice piece of code that might serve later. OK this >> >>> >> sounds >> >>> >> like a mandatory first step. >> > >> > >> >>> > I don't quite get what you mean by transparent, other than fixing it >> >>> > and enhancing the documentation to shed some light on what it is, why >> >>> > it is there and how to use it. >> > .. >> > ... >> > >> >>> Another maybe simple use case could be to have a project specific >> >>> environment set up when you enter a project >> >>> (http://wiki.squeak.org/squeak/1020). >> >>> >> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >> >>> >> >>> 1) Subclass MorphicProject --- MyMorphicProject >> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >> >>> 4) ... some more adaptations ..... to enter a new Environment -- how? >> >>> >> >> >> >> I like this idea a lot. >> >> >> >> I would love to see a simple "hello world!" level example of Environments. >> >> If someone could make an EnvironmentsDemoProject that opens a new project >> >> with >> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', >> >> I think it might really help me to understand how to use Environments. >> >> >> >> Dave >> > >> > So let's focus on a 'hello world' example for environments and do it >> > _slowly_ step by step so that people can catch up with the issues. >> > >> > >> > >> > Outline of steps of a 'Hello world' environments example >> > ============================================= >> > >> > Steps >> > >> > >> > 1. subclass Object with a #Hello class. >> > >> > 2. compile a class method #say the method should write 'Hello' to the Transcript >> > >> > 3. run >> > Hello say >> > >> > The result should be 'Hello' on the Transcript >> > >> > >> > 4. create a new Environment called "myEnvironment". >> > >> > 5. import the Smalltalk environmnet into myEnvironment >> > >> > 6. subclass Object with a #Hello class in myEnvironment >> > >> > 7. compile a method #say the method should write 'Buenas dias' to the Transcript >> > >> > run >> > Hello say >> > >> > The result should be 'Buenas dias' on the Transcript >> > >> > >> > 8. Leave environment called 'myEnvironment' >> > >> > >> > 9. run >> > Hello say >> > >> > The result should be this time 'Hello' on the Transcript >> > >> > >> > >> > Any comments on these steps? >> > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160930/21304582/attachment.htm From lecteur at zogotounga.net Sat Oct 1 07:05:24 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Oct 1 07:05:19 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <6e1e57ac-f43b-6417-dc73-5ef7558b4c0e@zogotounga.net> > In 15 years, I think I've had just one name collision between classes > of different packages (neither of which used prefixes). I think I > simply renamed one of them. Dynamic system. With Environments, I > would still have had to write some code to do various > imports/exports/renames, etc.. and so it doesn't actually save me any > development effort. I guess it boils down to letting me keep pretty, > but ambiguous, names in the code. But, I actually prefer prefixes... > > Not trying to be a party pooper, but complexity is commonplace, > simplicity is rare. If we still have a simple system, we should value > that aspect and try to keep it that way. At least _optionally_... +1 Stef From hannes.hirzel at gmail.com Sat Oct 1 10:13:54 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Oct 1 10:13:57 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Good, so let's wait until next week.... --Hannes P.S. Another thing is that we need glossary entries on the swiki for - delimited dynamic variables - delimited continuations On 10/1/16, Frank Shearar wrote: > On Sep 30, 2016 09:50, "Nicolas Cellier" > > wrote: >> >> >> >> 2016-09-30 14:57 GMT+02:00 Jakob Reschke : >>> >>> Hello, >>> >>> Looks good to me as an outline. I have the following comments, >>> questions or doubts: >>> >>> 1. Currently, for me it does not feel like "entering" or "leaving" an >>> Environment, as that works with dynamic scoping in a block. So step 8 >>> could turn out to be void. >>> >>> 2. Since all of this should go into a workspace, not into the browser, >>> what is the shortest applicable snippet of code that, given a source >>> code string and a class, creates a new method in that class? >>> >>> 3. I am not sure what will happen if you attempt to create a subclass >>> that has the same name as another imported class. Generally, >>> evaluating Superclass subclass: #Subclass ... a second time will >>> replace the former Subclass by the new Subclass. 'myEnvironment' would >>> have imported Hello from Smalltalk globals, so an "old" Hello is >>> already visible. We have to check that evaluating the subclass >>> expression will not try to update that existing Hello class, but >>> create a new one instead. Here, the "shallow" lookup mechanism would >>> be needed. >>> >> Don't import: Smalltalk globals entirely, just from: Smalltalk globals > import: #Transcript. >> and #Object too, depending in which environment you'll evaluate the > message for creating the class... >> >>> >>> Once I have figured out 2. I will try out and check 3. ;-) >>> >>> Kind regards, >>> Jakob >>> >> >> Here is a snippet that works, but is not especially short. >> >> | createHelloClass createHelloMethod english spanish | >> >> "Straight but verbose code to create a Hello class and compile a say > method. >> There's one trick: Environment current, otherwise Compiler would > evaluate in nil class environment, not good" >> createHelloClass := [Object subclass: #Hello >> instanceVariableNames: '' >> classVariableNames: '' >> poolDictionaries: '' >> category: 'Test']. >> createHelloMethod := [:greeting | >> | methodSource sourceCode | >> methodSource := 'say Transcript cr; show: ' , greeting printString. >> sourceCode := 'Hello class compile: ' , methodSource printString , ' > classified: ' , 'test' printString. >> Compiler evaluate: sourceCode environment: Environment current]. >> >> "Create the english and spanish environments" >> english := Smalltalk globals. >> spanish := Environment withName: 'Spanish'. >> spanish importSelf. >> spanish from: english import: #Transcript. >> >> "Create the class and compile the method in each environment:" >> >> [createHelloClass value. >> createHelloMethod value: 'Hello world'] on: CurrentEnvironment do: [:exc > | exc resume: english]. >> >> [createHelloClass value. >> createHelloMethod value: 'Buenos dias'] on: CurrentEnvironment do: [:exc > | exc resume: spanish]. >> >> "Greet" >> Compiler evaluate: 'Hello say' environment: english. >> Compiler evaluate: 'Hello say' environment: spanish. >> Compiler evaluate: 'Hello say' environment: english. >> >> "Cleanup" >> [Compiler evaluate: 'Hello removeFromSystem' environment: Environment > current] on: CurrentEnvironment do: [:exc | exc resume: english]. >> [Compiler evaluate: 'Hello removeFromSystem' environment: Environment > current] on: CurrentEnvironment do: [:exc | exc resume: spanish]. >> >> Yes, a DynamicVariable: >> CurrentEnvironment value: english during: ["load something"]. >> would be nicer than: >> ["load something"] on: CurrentEnvironment do: [:exc | exc resume: > english]. >> Otherwise we coulf fileIn some chunk format stream thru en > EnvironmentLoader for: english... > > I wrote Control to do pretty much that: give a nice interface through which > to create and change delimited dynamic variables (and delimited > continuations). I would link to it (it's on SS3) but my phone is a bit > limited... > > frank > >>> 2016-09-30 13:29 GMT+02:00 H. Hirzel : >>> > Starting a new thread, culled from the thread 'What are environments > for'. >>> > >>> > There are many more good questions and thoughts in the thread 'What >>> > are environments for' but this thread is just about what the subject >>> > says: >>> > >>> > How to create a 'Hello world' example for environments >>> > >>> > --Hannes >>> > >>> > On 9/29/16, David T. Lewis wrote: >>> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >>> >>> On 9/29/16, Jakob Reschke wrote: >>> >>> > Hi Nicolas, >>> >>> > >>> >>> > First, thank you for answering me in the other thread. >>> >>> > >>> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >>> >>> > : >>> >>> >> Without clear goals or vision, fixing could essentially mean "let >>> >>> >> Environment be transparent", that is let it remain a promise, a >>> >>> >> potential, >>> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit >>> >>> >> of >>> >>> >> over-engineered nice piece of code that might serve later. OK >>> >>> >> this >>> >>> >> sounds >>> >>> >> like a mandatory first step. >>> > >>> > >>> >>> > I don't quite get what you mean by transparent, other than fixing > it >>> >>> > and enhancing the documentation to shed some light on what it is, > why >>> >>> > it is there and how to use it. >>> > .. >>> > ... >>> > >>> >>> Another maybe simple use case could be to have a project specific >>> >>> environment set up when you enter a project >>> >>> (http://wiki.squeak.org/squeak/1020). >>> >>> >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >>> >>> >>> >>> 1) Subclass MorphicProject --- MyMorphicProject >>> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >>> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >>> >>> 4) ... some more adaptations ..... to enter a new Environment -- >>> >>> how? >>> >>> >>> >> >>> >> I like this idea a lot. >>> >> >>> >> I would love to see a simple "hello world!" level example of > Environments. >>> >> If someone could make an EnvironmentsDemoProject that opens a new > project >>> >> with >>> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> > 'moo', >>> >> I think it might really help me to understand how to use >>> >> Environments. >>> >> >>> >> Dave >>> > >>> > So let's focus on a 'hello world' example for environments and do it >>> > _slowly_ step by step so that people can catch up with the issues. >>> > >>> > >>> > >>> > Outline of steps of a 'Hello world' environments example >>> > ============================================= >>> > >>> > Steps >>> > >>> > >>> > 1. subclass Object with a #Hello class. >>> > >>> > 2. compile a class method #say the method should write 'Hello' to the > Transcript >>> > >>> > 3. run >>> > Hello say >>> > >>> > The result should be 'Hello' on the Transcript >>> > >>> > >>> > 4. create a new Environment called "myEnvironment". >>> > >>> > 5. import the Smalltalk environmnet into myEnvironment >>> > >>> > 6. subclass Object with a #Hello class in myEnvironment >>> > >>> > 7. compile a method #say the method should write 'Buenas dias' to the > Transcript >>> > >>> > run >>> > Hello say >>> > >>> > Result should be >>> > >>> > 30-Sept-2016 >>> > >>> > Starting a new thread, culled from the thread 'What are environments > for'. >>> > >>> > There are many more good questions and thoughts in the thread 'What >>> > are environments for' but this thread is just about what the subject >>> > says: >>> > >>> > How to create a 'Hello world' example for environments >>> > >>> > --Hannes >>> > >>> > On 9/29/16, David T. Lewis wrote: >>> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >>> >>> On 9/29/16, Jakob Reschke wrote: >>> >>> > Hi Nicolas, >>> >>> > >>> >>> > First, thank you for answering me in the other thread. >>> >>> > >>> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >>> >>> > : >>> >>> >> Without clear goals or vision, fixing could essentially mean "let >>> >>> >> Environment be transparent", that is let it remain a promise, a >>> >>> >> potential, >>> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit >>> >>> >> of >>> >>> >> over-engineered nice piece of code that might serve later. OK >>> >>> >> this >>> >>> >> sounds >>> >>> >> like a mandatory first step. >>> > >>> > >>> >>> > I don't quite get what you mean by transparent, other than fixing > it >>> >>> > and enhancing the documentation to shed some light on what it is, > why >>> >>> > it is there and how to use it. >>> > .. >>> > ... >>> > >>> >>> Another maybe simple use case could be to have a project specific >>> >>> environment set up when you enter a project >>> >>> (http://wiki.squeak.org/squeak/1020). >>> >>> >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >>> >>> >>> >>> 1) Subclass MorphicProject --- MyMorphicProject >>> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >>> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >>> >>> 4) ... some more adaptations ..... to enter a new Environment -- >>> >>> how? >>> >>> >>> >> >>> >> I like this idea a lot. >>> >> >>> >> I would love to see a simple "hello world!" level example of > Environments. >>> >> If someone could make an EnvironmentsDemoProject that opens a new > project >>> >> with >>> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> > 'moo', >>> >> I think it might really help me to understand how to use >>> >> Environments. >>> >> >>> >> Dave >>> > >>> > So let's focus on a 'hello world' example for environments and do it >>> > _slowly_ step by step so that people can catch up with the issues. >>> > >>> > >>> > >>> > Outline of steps of a 'Hello world' environments example >>> > ============================================= >>> > >>> > Steps >>> > >>> > >>> > 1. subclass Object with a #Hello class. >>> > >>> > 2. compile a class method #say the method should write 'Hello' to the > Transcript >>> > >>> > 3. run >>> > Hello say >>> > >>> > The result should be 'Hello' on the Transcript >>> > >>> > >>> > 4. create a new Environment called "myEnvironment". >>> > >>> > 5. import the Smalltalk environmnet into myEnvironment >>> > >>> > 6. subclass Object with a #Hello class in myEnvironment >>> > >>> > 7. compile a method #say the method should write 'Buenas dias' to the > Transcript >>> > >>> > run >>> > Hello say >>> > >>> > The result should be 'Buenas dias' on the Transcript >>> > >>> > >>> > 8. Leave environment called 'myEnvironment' >>> > >>> > >>> > 9. run >>> > Hello say >>> > >>> > The result should be this time 'Hello' on the Transcript >>> > >>> > >>> > >>> > Any comments on these steps? >>> > >>> >> >> >> >> > From eancaer at gmail.com Sat Oct 1 12:14:23 2016 From: eancaer at gmail.com (Edwin Ancaer) Date: Sat Oct 1 12:20:16 2016 Subject: [squeak-dev] Re: New, faster RISC OS Squeak In-Reply-To: <1475003432560-4917270.post@n4.nabble.com> References: <5113DB10.5030400@gmail.com> <3535DA7F-09DF-47CF-AF11-DECA190AD89B@rowledge.org> <51140748.4070706@gmail.com> <7E411575-069C-4793-BB79-0993A4C4C2ED@rowledge.org> <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> <1474545273132-4916592.post@n4.nabble.com> <268E4112-C9FE-49F2-9370-F1E5073B4D58@rowledge.org> <1475003432560-4917270.post@n4.nabble.com> Message-ID: <1475324063669-4917695.post@n4.nabble.com> Hello, I just tried with a newly installed RiscOS, but the result remained the same. I tried to reset the settings from Display Manager, Colours: 256 Resolution: 1280 * 720 Frame Rate: 76 Hz The error still occurs. Kind regards, -- View this message in context: http://forum.world.st/New-faster-RISC-OS-Squeak-tp4668295p4917695.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From craig at blackpagedigital.com Sat Oct 1 13:07:48 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sat Oct 1 13:08:32 2016 Subject: [squeak-dev] NaN ~= NaN? Message-ID: Hi-- In latest Squeak, (Float NaN) is not equivalent to itself. Is this a bug? thanks, -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From jakob.reschke at student.hpi.de Sat Oct 1 13:17:50 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Sat Oct 1 13:18:20 2016 Subject: [squeak-dev] NaN ~= NaN? In-Reply-To: References: Message-ID: Hi, I would guess not: http://stackoverflow.com/questions/1565164/what-is-the-rationale-for-all-comparisons-returning-false-for-ieee754-nan-values Best regards, Jakob 2016-10-01 15:07 GMT+02:00 Craig Latta : > > Hi-- > > In latest Squeak, (Float NaN) is not equivalent to itself. Is this > a bug? > > > thanks, > > -C > > -- > Craig Latta > Black Page Digital > Amsterdam | San Francisco > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > From squeaklist at gmail.com Sat Oct 1 14:22:30 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Sat Oct 1 14:22:33 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: +1 On Saturday, October 1, 2016, H. Hirzel wrote: > Good, so let's wait until next week.... > > --Hannes > > > P.S. Another thing is that we need glossary entries on the swiki for > - delimited dynamic variables > - delimited continuations > > On 10/1/16, Frank Shearar > wrote: > > On Sep 30, 2016 09:50, "Nicolas Cellier" > > > > > wrote: > >> > >> > >> > >> 2016-09-30 14:57 GMT+02:00 Jakob Reschke >: > >>> > >>> Hello, > >>> > >>> Looks good to me as an outline. I have the following comments, > >>> questions or doubts: > >>> > >>> 1. Currently, for me it does not feel like "entering" or "leaving" an > >>> Environment, as that works with dynamic scoping in a block. So step 8 > >>> could turn out to be void. > >>> > >>> 2. Since all of this should go into a workspace, not into the browser, > >>> what is the shortest applicable snippet of code that, given a source > >>> code string and a class, creates a new method in that class? > >>> > >>> 3. I am not sure what will happen if you attempt to create a subclass > >>> that has the same name as another imported class. Generally, > >>> evaluating Superclass subclass: #Subclass ... a second time will > >>> replace the former Subclass by the new Subclass. 'myEnvironment' would > >>> have imported Hello from Smalltalk globals, so an "old" Hello is > >>> already visible. We have to check that evaluating the subclass > >>> expression will not try to update that existing Hello class, but > >>> create a new one instead. Here, the "shallow" lookup mechanism would > >>> be needed. > >>> > >> Don't import: Smalltalk globals entirely, just from: Smalltalk globals > > import: #Transcript. > >> and #Object too, depending in which environment you'll evaluate the > > message for creating the class... > >> > >>> > >>> Once I have figured out 2. I will try out and check 3. ;-) > >>> > >>> Kind regards, > >>> Jakob > >>> > >> > >> Here is a snippet that works, but is not especially short. > >> > >> | createHelloClass createHelloMethod english spanish | > >> > >> "Straight but verbose code to create a Hello class and compile a say > > method. > >> There's one trick: Environment current, otherwise Compiler would > > evaluate in nil class environment, not good" > >> createHelloClass := [Object subclass: #Hello > >> instanceVariableNames: '' > >> classVariableNames: '' > >> poolDictionaries: '' > >> category: 'Test']. > >> createHelloMethod := [:greeting | > >> | methodSource sourceCode | > >> methodSource := 'say Transcript cr; show: ' , greeting printString. > >> sourceCode := 'Hello class compile: ' , methodSource printString , ' > > classified: ' , 'test' printString. > >> Compiler evaluate: sourceCode environment: Environment current]. > >> > >> "Create the english and spanish environments" > >> english := Smalltalk globals. > >> spanish := Environment withName: 'Spanish'. > >> spanish importSelf. > >> spanish from: english import: #Transcript. > >> > >> "Create the class and compile the method in each environment:" > >> > >> [createHelloClass value. > >> createHelloMethod value: 'Hello world'] on: CurrentEnvironment do: [:exc > > | exc resume: english]. > >> > >> [createHelloClass value. > >> createHelloMethod value: 'Buenos dias'] on: CurrentEnvironment do: [:exc > > | exc resume: spanish]. > >> > >> "Greet" > >> Compiler evaluate: 'Hello say' environment: english. > >> Compiler evaluate: 'Hello say' environment: spanish. > >> Compiler evaluate: 'Hello say' environment: english. > >> > >> "Cleanup" > >> [Compiler evaluate: 'Hello removeFromSystem' environment: Environment > > current] on: CurrentEnvironment do: [:exc | exc resume: english]. > >> [Compiler evaluate: 'Hello removeFromSystem' environment: Environment > > current] on: CurrentEnvironment do: [:exc | exc resume: spanish]. > >> > >> Yes, a DynamicVariable: > >> CurrentEnvironment value: english during: ["load something"]. > >> would be nicer than: > >> ["load something"] on: CurrentEnvironment do: [:exc | exc resume: > > english]. > >> Otherwise we coulf fileIn some chunk format stream thru en > > EnvironmentLoader for: english... > > > > I wrote Control to do pretty much that: give a nice interface through > which > > to create and change delimited dynamic variables (and delimited > > continuations). I would link to it (it's on SS3) but my phone is a bit > > limited... > > > > frank > > > >>> 2016-09-30 13:29 GMT+02:00 H. Hirzel >: > >>> > Starting a new thread, culled from the thread 'What are environments > > for'. > >>> > > >>> > There are many more good questions and thoughts in the thread 'What > >>> > are environments for' but this thread is just about what the subject > >>> > says: > >>> > > >>> > How to create a 'Hello world' example for environments > >>> > > >>> > --Hannes > >>> > > >>> > On 9/29/16, David T. Lewis > > wrote: > >>> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: > >>> >>> On 9/29/16, Jakob Reschke > wrote: > >>> >>> > Hi Nicolas, > >>> >>> > > >>> >>> > First, thank you for answering me in the other thread. > >>> >>> > > >>> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > >>> >>> > >: > >>> >>> >> Without clear goals or vision, fixing could essentially mean > "let > >>> >>> >> Environment be transparent", that is let it remain a promise, a > >>> >>> >> potential, > >>> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit > >>> >>> >> of > >>> >>> >> over-engineered nice piece of code that might serve later. OK > >>> >>> >> this > >>> >>> >> sounds > >>> >>> >> like a mandatory first step. > >>> > > >>> > > >>> >>> > I don't quite get what you mean by transparent, other than fixing > > it > >>> >>> > and enhancing the documentation to shed some light on what it is, > > why > >>> >>> > it is there and how to use it. > >>> > .. > >>> > ... > >>> > > >>> >>> Another maybe simple use case could be to have a project specific > >>> >>> environment set up when you enter a project > >>> >>> (http://wiki.squeak.org/squeak/1020). > >>> >>> > >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 > >>> >>> > >>> >>> 1) Subclass MorphicProject --- MyMorphicProject > >>> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph > >>> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph > >>> >>> 4) ... some more adaptations ..... to enter a new Environment -- > >>> >>> how? > >>> >>> > >>> >> > >>> >> I like this idea a lot. > >>> >> > >>> >> I would love to see a simple "hello world!" level example of > > Environments. > >>> >> If someone could make an EnvironmentsDemoProject that opens a new > > project > >>> >> with > >>> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> > > 'moo', > >>> >> I think it might really help me to understand how to use > >>> >> Environments. > >>> >> > >>> >> Dave > >>> > > >>> > So let's focus on a 'hello world' example for environments and do it > >>> > _slowly_ step by step so that people can catch up with the issues. > >>> > > >>> > > >>> > > >>> > Outline of steps of a 'Hello world' environments example > >>> > ============================================= > >>> > > >>> > Steps > >>> > > >>> > > >>> > 1. subclass Object with a #Hello class. > >>> > > >>> > 2. compile a class method #say the method should write 'Hello' to the > > Transcript > >>> > > >>> > 3. run > >>> > Hello say > >>> > > >>> > The result should be 'Hello' on the Transcript > >>> > > >>> > > >>> > 4. create a new Environment called "myEnvironment". > >>> > > >>> > 5. import the Smalltalk environmnet into myEnvironment > >>> > > >>> > 6. subclass Object with a #Hello class in myEnvironment > >>> > > >>> > 7. compile a method #say the method should write 'Buenas dias' to the > > Transcript > >>> > > >>> > run > >>> > Hello say > >>> > > >>> > Result should be > >>> > > >>> > 30-Sept-2016 > >>> > > >>> > Starting a new thread, culled from the thread 'What are environments > > for'. > >>> > > >>> > There are many more good questions and thoughts in the thread 'What > >>> > are environments for' but this thread is just about what the subject > >>> > says: > >>> > > >>> > How to create a 'Hello world' example for environments > >>> > > >>> > --Hannes > >>> > > >>> > On 9/29/16, David T. Lewis > > wrote: > >>> >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: > >>> >>> On 9/29/16, Jakob Reschke > wrote: > >>> >>> > Hi Nicolas, > >>> >>> > > >>> >>> > First, thank you for answering me in the other thread. > >>> >>> > > >>> >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > >>> >>> > >: > >>> >>> >> Without clear goals or vision, fixing could essentially mean > "let > >>> >>> >> Environment be transparent", that is let it remain a promise, a > >>> >>> >> potential, > >>> >>> >> whithout too many side effects... Not exactly YAGNI, just a bit > >>> >>> >> of > >>> >>> >> over-engineered nice piece of code that might serve later. OK > >>> >>> >> this > >>> >>> >> sounds > >>> >>> >> like a mandatory first step. > >>> > > >>> > > >>> >>> > I don't quite get what you mean by transparent, other than fixing > > it > >>> >>> > and enhancing the documentation to shed some light on what it is, > > why > >>> >>> > it is there and how to use it. > >>> > .. > >>> > ... > >>> > > >>> >>> Another maybe simple use case could be to have a project specific > >>> >>> environment set up when you enter a project > >>> >>> (http://wiki.squeak.org/squeak/1020). > >>> >>> > >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 > >>> >>> > >>> >>> 1) Subclass MorphicProject --- MyMorphicProject > >>> >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph > >>> >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph > >>> >>> 4) ... some more adaptations ..... to enter a new Environment -- > >>> >>> how? > >>> >>> > >>> >> > >>> >> I like this idea a lot. > >>> >> > >>> >> I would love to see a simple "hello world!" level example of > > Environments. > >>> >> If someone could make an EnvironmentsDemoProject that opens a new > > project > >>> >> with > >>> >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> > > 'moo', > >>> >> I think it might really help me to understand how to use > >>> >> Environments. > >>> >> > >>> >> Dave > >>> > > >>> > So let's focus on a 'hello world' example for environments and do it > >>> > _slowly_ step by step so that people can catch up with the issues. > >>> > > >>> > > >>> > > >>> > Outline of steps of a 'Hello world' environments example > >>> > ============================================= > >>> > > >>> > Steps > >>> > > >>> > > >>> > 1. subclass Object with a #Hello class. > >>> > > >>> > 2. compile a class method #say the method should write 'Hello' to the > > Transcript > >>> > > >>> > 3. run > >>> > Hello say > >>> > > >>> > The result should be 'Hello' on the Transcript > >>> > > >>> > > >>> > 4. create a new Environment called "myEnvironment". > >>> > > >>> > 5. import the Smalltalk environmnet into myEnvironment > >>> > > >>> > 6. subclass Object with a #Hello class in myEnvironment > >>> > > >>> > 7. compile a method #say the method should write 'Buenas dias' to the > > Transcript > >>> > > >>> > run > >>> > Hello say > >>> > > >>> > The result should be 'Buenas dias' on the Transcript > >>> > > >>> > > >>> > 8. Leave environment called 'myEnvironment' > >>> > > >>> > > >>> > 9. run > >>> > Hello say > >>> > > >>> > The result should be this time 'Hello' on the Transcript > >>> > > >>> > > >>> > > >>> > Any comments on these steps? > >>> > > >>> > >> > >> > >> > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161001/bae151e0/attachment.htm From commits at source.squeak.org Sat Oct 1 20:19:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 1 20:19:48 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1043.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1043.mcz ==================== Summary ==================== Name: Kernel-nice.1043 Author: nice Time: 1 October 2016, 10:19:12.37443 pm UUID: d29f9c07-edc8-4add-9b99-e889fd2be32a Ancestors: Kernel-nice.1042 Fix (10 raisedTo: 600) nthRoot: 300. It did incorrectly return 126.0 instead of 100. =============== Diff against Kernel-nice.1042 =============== Item was changed: ----- Method: Integer>>nthRootTruncated: (in category 'mathematical functions') ----- nthRootTruncated: aPositiveInteger "Answer the integer part of the nth root of the receiver." + | guess guessToTheNthMinusOne nextGuess | - | guess guessToTheNthMinusOne delta | self = 0 ifTrue: [^0]. self negative ifTrue: [aPositiveInteger even ifTrue: [ ArithmeticError signal: 'Negative numbers don''t have even roots.' ]. ^(self negated nthRootTruncated: aPositiveInteger) negated]. guess := 1 bitShift: self highBitOfMagnitude + aPositiveInteger - 1 // aPositiveInteger. [ guessToTheNthMinusOne := guess raisedTo: aPositiveInteger - 1. + nextGuess := (aPositiveInteger - 1 * guess * guessToTheNthMinusOne + self) // (guessToTheNthMinusOne * aPositiveInteger). + nextGuess = guess ] whileFalse: + [ guess := nextGuess ]. + ( guess raisedTo: aPositiveInteger) > self ifTrue: - delta := (guess * guessToTheNthMinusOne - self) // (guessToTheNthMinusOne * aPositiveInteger). - delta = 0 ] whileFalse: - [ guess := guess - delta ]. - ( (guess := guess - 1) raisedTo: aPositiveInteger) > self ifTrue: [ guess := guess - 1 ]. ^guess! From frank.shearar at gmail.com Sat Oct 1 21:08:13 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Sat Oct 1 21:08:17 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 30 September 2016 at 14:36, Chris Muller wrote: > >> I don't like the idea of CurrentEnvironment at all. IMO global state > >> stinks. > >> It would mean that a lotta behavior would change by simply switching one > >> shared variable... > >> I see it more like a not so clever workaround to make tools still work > in > >> presence of environments with minimal changes. > > > > > > Global state does indeed stink, which is why Environments is so nice, > > because "global" isn't global anymore. > > This deserves some qualification. Its true that writable globals > stink, you never know what state its going to be in, and updating it > introduces contention, etc. However, Class names don't suddenly point > to a different class object within the context of a running > application, and no one ever replaces Smalltalk with a new instance. > These globals are just "there" -- read-only bindings which don't > suffer the stinky issues associated with writable globals. > > I'm glad Nicolas started the other thread asking "what's it for?" To > me, that's the most important question -- is there something actually > truly useful gained in exchange for complicating the language and > tools? Is it only about everyone being able to have elegant, > prefix-less class names all loaded into one image? Most of the > use-cases mentioned in this and the other threads were just "cool ways > to handle a one-off problem." > > For the real world, we have been wanting smaller, more modular images. > The conditions of having less code and responsibility in those smaller > images bodes them less likely to benefit from Environments. Multiple > small images passing messages over the network lets those Smalltalk > applications run on multiple processor cores, compared to one > monolithic image with all the code loaded and disambiguated via a > hierarchy of Environment imports/exports and running on just one > process core. > > In 15 years, I think I've had just one name collision between classes > of different packages (neither of which used prefixes). I think I > simply renamed one of them. Dynamic system. With Environments, I > would still have had to write some code to do various > imports/exports/renames, etc.. and so it doesn't actually save me any > development effort. I guess it boils down to letting me keep pretty, > but ambiguous, names in the code. But, I actually prefer prefixes... > > Not trying to be a party pooper, but complexity is commonplace, > simplicity is rare. If we still have a simple system, we should value > that aspect and try to keep it that way. At least _optionally_... > > Best, > Chris > Well, there's simple, and there's simplistic, and these are not the same thing. Environments abstracts, and makes uniform, the binding of names to variables (which includes classes and globals). Instead of the single, and therefore specialised, and therefore apt to make klunky, mapping of names to things, the implementing of Environments focuses attention on a often neglected part of programming. But I've had these discussions before, and I don't have the energy to pursue them, therefore I don't really have a voice in the matter. I am, however, sick to death of things being invented in Smalltalk, only to die in its birthplace, while the rest of the world sees value, and wholeheartedly takes up the concept. I'm not saying you're doing this now, Chris, but I have often, often heard people in the Squeak community say "oh, it was Too Complicated, it Wasn't Simple, Not Worth It" while Ruby, Perl, Clojure, Fortress, Scala all say "yep, great idea, thanks!". frank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161001/a933d3fe/attachment-0001.htm From commits at source.squeak.org Sat Oct 1 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Oct 1 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161001215502.20847.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068989.html Name: Kernel-nice.1043 Ancestors: Kernel-nice.1042 Fix (10 raisedTo: 600) nthRoot: 300. It did incorrectly return 126.0 instead of 100. ============================================= From hannes.hirzel at gmail.com Sat Oct 1 22:00:14 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Oct 1 22:00:18 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Frank, you write 'Environments abstracts, and makes uniform, the binding of names to variables (which includes classes and globals). the implementing of Environments focuses attention on a often neglected part of programming.' This is what we are looking for. An explanation of the _concept_ behind environments. This concept is not obvious for most people here on the list...... On 10/1/16, Frank Shearar wrote: > On 30 September 2016 at 14:36, Chris Muller wrote: > >> >> I don't like the idea of CurrentEnvironment at all. IMO global state >> >> stinks. >> >> It would mean that a lotta behavior would change by simply switching >> >> one >> >> shared variable... >> >> I see it more like a not so clever workaround to make tools still work >> in >> >> presence of environments with minimal changes. >> > >> > >> > Global state does indeed stink, which is why Environments is so nice, >> > because "global" isn't global anymore. >> >> This deserves some qualification. Its true that writable globals >> stink, you never know what state its going to be in, and updating it >> introduces contention, etc. However, Class names don't suddenly point >> to a different class object within the context of a running >> application, and no one ever replaces Smalltalk with a new instance. >> These globals are just "there" -- read-only bindings which don't >> suffer the stinky issues associated with writable globals. >> >> I'm glad Nicolas started the other thread asking "what's it for?" To >> me, that's the most important question -- is there something actually >> truly useful gained in exchange for complicating the language and >> tools? Is it only about everyone being able to have elegant, >> prefix-less class names all loaded into one image? Most of the >> use-cases mentioned in this and the other threads were just "cool ways >> to handle a one-off problem." >> >> For the real world, we have been wanting smaller, more modular images. >> The conditions of having less code and responsibility in those smaller >> images bodes them less likely to benefit from Environments. Multiple >> small images passing messages over the network lets those Smalltalk >> applications run on multiple processor cores, compared to one >> monolithic image with all the code loaded and disambiguated via a >> hierarchy of Environment imports/exports and running on just one >> process core. >> >> In 15 years, I think I've had just one name collision between classes >> of different packages (neither of which used prefixes). I think I >> simply renamed one of them. Dynamic system. With Environments, I >> would still have had to write some code to do various >> imports/exports/renames, etc.. and so it doesn't actually save me any >> development effort. I guess it boils down to letting me keep pretty, >> but ambiguous, names in the code. But, I actually prefer prefixes... >> >> Not trying to be a party pooper, but complexity is commonplace, >> simplicity is rare. If we still have a simple system, we should value >> that aspect and try to keep it that way. At least _optionally_... >> >> Best, >> Chris >> > > Well, there's simple, and there's simplistic, and these are not the same > thing. Environments abstracts, and makes uniform, the binding of names to > variables (which includes classes and globals). Instead of the single, and > therefore specialised, and therefore apt to make klunky, mapping of names > to things, the implementing of Environments focuses attention on a often > neglected part of programming. > > But I've had these discussions before, and I don't have the energy to > pursue them, therefore I don't really have a voice in the matter. > > I am, however, sick to death of things being invented in Smalltalk, only to > die in its birthplace, while the rest of the world sees value, and > wholeheartedly takes up the concept. I'm not saying you're doing this now, > Chris, but I have often, often heard people in the Squeak community say > "oh, it was Too Complicated, it Wasn't Simple, Not Worth It" while Ruby, > Perl, Clojure, Fortress, Scala all say "yep, great idea, thanks!". > > frank > From lecteur at zogotounga.net Sat Oct 1 23:42:21 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Oct 1 23:42:11 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> > This is what we are looking for. An explanation of the _concept_ > behind environments. This concept is not obvious for most people here > on the list...... Right. I have been asking for documentation, and got silence for an answer. How serious is that ? We need to RTFM. Stef From jakob.reschke at student.hpi.de Sun Oct 2 10:51:54 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Sun Oct 2 10:52:18 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <22683d78652341e9a13782d2f32a58bc@MX2015-DAG2.hpi.uni-potsdam.de> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <22683d78652341e9a13782d2f32a58bc@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-10-02 1:42 GMT+02:00 St?phane Rollandin : > We need to RTFM. Apparently, we first have to WTFM (or expand and refactor it at least). What is already there are the class comment in Environment and these Wiki pages: http://wiki.squeak.org/squeak/6218 http://wiki.squeak.org/squeak/6219 http://wiki.squeak.org/squeak/6220 ...and some mailing list threads that contain previous discussions or code snippets: http://forum.world.st/Environments-td4636629.html http://forum.world.st/The-Inbox-Monticello-fbs-581-mcz-td4731884.html (...and probably others...) But for various reasons already mentioned, that did not suffice for me to get started using Environments, and it seems I am not the only one. Besides, I do not consider the mailing list archives a good place for documentation, especially if one does not know the right search keywords. Jakob From commits at source.squeak.org Sun Oct 2 13:14:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 2 13:14:57 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1044.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1044.mcz ==================== Summary ==================== Name: Kernel-nice.1044 Author: nice Time: 2 October 2016, 3:14:21.098209 pm UUID: ee2cb17e-948a-4227-836c-bcb58e3f26c7 Ancestors: Kernel-nice.1043 Fix two more problems with nthRoot: 1) last fix introduced a possibility of infinite loop where guess and nextGuess would alternate around the solution 2) contrarily to what was written in comment, the result was not rounded to nearest Float but subject to double-rounding problem. =============== Diff against Kernel-nice.1043 =============== Item was changed: ----- Method: Integer>>nthRoot: (in category 'mathematical functions') ----- nthRoot: aPositiveInteger "Answer the nth root of the receiver. Answer an Integer if root is exactly this Integer, else answer the Float nearest the exact root." + | guess excess scaled nBits | - | guess p | - guess := self nthRootRounded: aPositiveInteger. + excess := (guess raisedTo: aPositiveInteger) - self. + excess = 0 ifTrue: [ ^ guess ]. - (guess raisedTo: aPositiveInteger) = self - ifTrue: [ ^ guess ]. + nBits := Float precision - guess highBitOfMagnitude. + nBits <= 0 ifTrue: [ ^(Fraction numerator: guess * 4 - excess sign denominator: 4) asFloat]. - p := Float precision - guess highBitOfMagnitude. - p < 0 ifTrue: [ ^ guess asFloat ]. + scaled := self << (nBits * aPositiveInteger). + guess := scaled nthRootRounded: aPositiveInteger. + excess := (guess raisedTo: aPositiveInteger) - scaled. + ^(Fraction numerator: guess * 4 - excess sign denominator: 1 << (nBits + 2)) asFloat! - guess := self << (p * aPositiveInteger) nthRootRounded: aPositiveInteger. - ^(guess / (1 << p)) asFloat! Item was changed: ----- Method: Integer>>nthRootTruncated: (in category 'mathematical functions') ----- nthRootTruncated: aPositiveInteger "Answer the integer part of the nth root of the receiver." | guess guessToTheNthMinusOne nextGuess | self = 0 ifTrue: [^0]. self negative ifTrue: [aPositiveInteger even ifTrue: [ ArithmeticError signal: 'Negative numbers don''t have even roots.' ]. ^(self negated nthRootTruncated: aPositiveInteger) negated]. guess := 1 bitShift: self highBitOfMagnitude + aPositiveInteger - 1 // aPositiveInteger. [ guessToTheNthMinusOne := guess raisedTo: aPositiveInteger - 1. nextGuess := (aPositiveInteger - 1 * guess * guessToTheNthMinusOne + self) // (guessToTheNthMinusOne * aPositiveInteger). + nextGuess >= guess ] whileFalse: - nextGuess = guess ] whileFalse: [ guess := nextGuess ]. ( guess raisedTo: aPositiveInteger) > self ifTrue: [ guess := guess - 1 ]. ^guess! From commits at source.squeak.org Sun Oct 2 13:19:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 2 13:19:53 2016 Subject: [squeak-dev] The Trunk: KernelTests-nice.313.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.313.mcz ==================== Summary ==================== Name: KernelTests-nice.313 Author: nice Time: 2 October 2016, 3:19:37.781599 pm UUID: e6139cfd-b985-42d5-9f24-ffeb0ce8cf6c Ancestors: KernelTests-mt.311 Test edge cases of Integer>>nthRoot: =============== Diff against KernelTests-mt.311 =============== Item was added: + ----- Method: IntegerTest>>testNthRootExactnessForHugeValue (in category 'tests - mathematical functions') ----- + testNthRootExactnessForHugeValue + self assert: ((10 raisedTo: 600) nthRoot: 300) classAndValueEquals: 100. + self assert: ((10 raisedTo: 600) + 1 nthRoot: 300) classAndValueEquals: 100.0! Item was added: + ----- Method: IntegerTest>>testNthRootImmuneToDoubleRounding (in category 'tests - mathematical functions') ----- + testNthRootImmuneToDoubleRounding + "Use a specially crafted number for causing double rounding. + Solution is 10...01.1 - verySmallQuantity. + Where verySmallQuantity is approximately 1/53/(1<<53). + If the verySmallQuantity is not taken into account, then solution is rounded to 10....010" + | exponent crafted root highPrecisionRoot | + exponent := 4. + crafted := (1 << Float precision + 3 raisedTo: exponent) - 1. + root := crafted nthRoot: exponent. + highPrecisionRoot := (crafted << (exponent squared * Float precision * 4) nthRootRounded: exponent) / (1 << (exponent * Float precision * 4)). + self assert: (root asFraction - highPrecisionRoot) abs < (root predecessor asFraction - highPrecisionRoot) abs. + + "Same with the other sign. + Solution is 10...00.1 + verySmallQuantity." + crafted := (1 << Float precision + 1 raisedTo: exponent) + 1. + root := crafted nthRoot: exponent. + highPrecisionRoot := (crafted << (exponent squared * Float precision * 4) nthRootRounded: exponent) / (1 << (exponent * Float precision * 4)). + self assert: (root asFraction - highPrecisionRoot) abs < (root successor asFraction - highPrecisionRoot) abs.! From lewis at mail.msen.com Sun Oct 2 14:48:00 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Oct 2 14:48:02 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1043.mcz In-Reply-To: <201610012019.u91KJlIP054467@shell.msen.com> References: <201610012019.u91KJlIP054467@shell.msen.com> Message-ID: <20161002144800.GA51418@shell.msen.com> On Sat, Oct 01, 2016 at 08:19:27PM +0000, commits@source.squeak.org wrote: > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-nice.1043.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.1043 > Author: nice > Time: 1 October 2016, 10:19:12.37443 pm > UUID: d29f9c07-edc8-4add-9b99-e889fd2be32a > Ancestors: Kernel-nice.1042 > > Fix (10 raisedTo: 600) nthRoot: 300. > It did incorrectly return 126.0 instead of 100. > Can you say anything about the underlying cause of this problem? I saw it in my 64-bit image, but not in my 32-bit image. The Kernel-nice.1042 update resolved the problem in my 64-bit image, but I find that when I revert to Kernel-tfel.1040, the problem does not come back. Strange... Thanks, Dave From nicolas.cellier.aka.nice at gmail.com Sun Oct 2 16:06:24 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sun Oct 2 16:06:28 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1043.mcz In-Reply-To: <20161002144800.GA51418@shell.msen.com> References: <201610012019.u91KJlIP054467@shell.msen.com> <20161002144800.GA51418@shell.msen.com> Message-ID: 2016-10-02 16:48 GMT+02:00 David T. Lewis : > On Sat, Oct 01, 2016 at 08:19:27PM +0000, commits@source.squeak.org wrote: > > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > > http://source.squeak.org/trunk/Kernel-nice.1043.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-nice.1043 > > Author: nice > > Time: 1 October 2016, 10:19:12.37443 pm > > UUID: d29f9c07-edc8-4add-9b99-e889fd2be32a > > Ancestors: Kernel-nice.1042 > > > > Fix (10 raisedTo: 600) nthRoot: 300. > > It did incorrectly return 126.0 instead of 100. > > > > Can you say anything about the underlying cause of this problem? I saw it > in my 64-bit image, but not in my 32-bit image. The Kernel-nice.1042 update > resolved the problem in my 64-bit image, but I find that when I revert > to Kernel-tfel.1040, the problem does not come back. Strange... > > Thanks, > Dave > > Hi Dave, I don't see why there would be any difference between 32 and 64 bits image. The problem lies in the Newton-Raphson algorithm: xn+1 = xn - (f(xn)-y)/(f'(xn)) for f(x) = x^p, the convergence is very slow when p is high because derivative is p*x^(p-1). But we did store the integer part of decrement: delta := (guess * guessToTheNthMinusOne - self) // (guessToTheNthMinusOne * aPositiveInteger). Initial guess is 128, delta=2, then 126 delta<1, so the initial algorithm was stuck. So I truncated xn+1 instead of truncating the delta and iterated until xn+1=xn. But the correction above was wrong, because we can have guess and nextGuess from each side of nth-root, and never reach an integer fix point, but rather x(n+2)=x(n+1) - 1 and x(n+1) = x(n) + 1. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161002/3348e21c/attachment.htm From lewis at mail.msen.com Sun Oct 2 17:46:16 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Oct 2 17:46:19 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1043.mcz In-Reply-To: References: <201610012019.u91KJlIP054467@shell.msen.com> <20161002144800.GA51418@shell.msen.com> Message-ID: <20161002174616.GA76412@shell.msen.com> On Sun, Oct 02, 2016 at 06:06:24PM +0200, Nicolas Cellier wrote: > 2016-10-02 16:48 GMT+02:00 David T. Lewis : > > > On Sat, Oct 01, 2016 at 08:19:27PM +0000, commits@source.squeak.org wrote: > > > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > > > http://source.squeak.org/trunk/Kernel-nice.1043.mcz > > > > > > ==================== Summary ==================== > > > > > > Name: Kernel-nice.1043 > > > Author: nice > > > Time: 1 October 2016, 10:19:12.37443 pm > > > UUID: d29f9c07-edc8-4add-9b99-e889fd2be32a > > > Ancestors: Kernel-nice.1042 > > > > > > Fix (10 raisedTo: 600) nthRoot: 300. > > > It did incorrectly return 126.0 instead of 100. > > > > > > > Can you say anything about the underlying cause of this problem? I saw it > > in my 64-bit image, but not in my 32-bit image. The Kernel-nice.1042 update > > resolved the problem in my 64-bit image, but I find that when I revert > > to Kernel-tfel.1040, the problem does not come back. Strange... > > > > Thanks, > > Dave > > > > Hi Dave, > I don't see why there would be any difference between 32 and 64 bits image. > The problem lies in the Newton-Raphson algorithm: > > xn+1 = xn - (f(xn)-y)/(f'(xn)) > > for f(x) = x^p, the convergence is very slow when p is high because > derivative is p*x^(p-1). > But we did store the integer part of decrement: > > delta := (guess * guessToTheNthMinusOne - self) // > (guessToTheNthMinusOne * aPositiveInteger). > > Initial guess is 128, delta=2, then 126 delta<1, so the initial algorithm > was stuck. > > So I truncated xn+1 instead of truncating the delta and iterated until > xn+1=xn. > > But the correction above was wrong, because we can have guess and nextGuess > from each side of nth-root, and never reach an integer fix point, but > rather x(n+2)=x(n+1) - 1 and x(n+1) = x(n) + 1. > Thank you for the explanation, I understand the issue better now. The thing that is strange to me is that when I revert Integer>>nthRootTruncated: back to the old version from 2011, the problem does not come back. Instead I now get the expected result: (10 raisedTo: 600) nthRoot: 300. ==> 100.0 I can no longer find an image on my hard drive that has this problem of answering 126 instead of the the expected 100. But I know that I did see the problem before. Dave From gerardo.santana at gmail.com Sun Oct 2 21:53:01 2016 From: gerardo.santana at gmail.com (=?UTF-8?Q?Gerardo_Santana_G=C3=B3mez_Garrido?=) Date: Sun Oct 2 21:53:04 2016 Subject: [squeak-dev] Squeak works on OpenBSD Message-ID: I'm happy to let you know that Squeak/Spur can now run on OpenBSD 6.0/amd64. The relevant changes have been made available to https://github.com/OpenSmalltalk/opensmalltalk-vm I look forward to meet more Clog developers to share some ideas to improve the build toolchain and code portability. Regards. -- Gerardo Santana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161002/6aea0127/attachment.htm From commits at source.squeak.org Sun Oct 2 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Oct 2 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161002215502.8227.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068990.html Name: Kernel-nice.1044 Ancestors: Kernel-nice.1043 Fix two more problems with nthRoot: 1) last fix introduced a possibility of infinite loop where guess and nextGuess would alternate around the solution 2) contrarily to what was written in comment, the result was not rounded to nearest Float but subject to double-rounding problem. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/068991.html Name: KernelTests-nice.313 Ancestors: KernelTests-mt.311 Test edge cases of Integer>>nthRoot: ============================================= From brasspen at gmail.com Sun Oct 2 22:07:57 2016 From: brasspen at gmail.com (Chris Cunnington) Date: Sun Oct 2 22:08:03 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments Message-ID: <25339d39-ccac-430f-f9c1-7eed58eccc44@gmail.com> I not sure if I've gone off the rails here, but it keeps working for me. Chris "acquire a Squeak6.0alpha and create an Environment" env := Environment withName: 'WbSrvr'. env importSelf. "load WebClient-Core into Environment" chunkcode := ReadWriteStream on: (String new: 1000). SystemOrganizer default fileOutCategory: 'WebClient-Core' on: chunkcode initializing: true. chunkcode reset. env fileIn: chunkcode announcing: 'Load Environment'. "start WebServer in environment" Compiler evaluate: 'WebServer exampleBrowse' environment: env. "go to WebServer class>exampleBrowse in a Browser and change port to 8888, then start" WebServer exampleBrowse "open tabs in" http://localhost:9999 http://localhost:8888 "to see the port in the Environment is still 9999" env explore. "highlight WebServer in #declarations and explore" self class methodDictionary "toggle #exampleBrowse and see the port is 9999" "for added fun, go to Process class>>#forContext:priority: and add" newProcess env: Environment current. "start again from the top, this time, explore the WebServer processes in ProcessBrowser to see both Environments are Smalltalk. I have no idea what that means. I would have thought the WebServer instance started with WbSrvr environment would be in a WbSrvr process." From tim at rowledge.org Sun Oct 2 23:21:31 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun Oct 2 23:21:34 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> Message-ID: > On 01-10-2016, at 4:42 PM, St?phane Rollandin wrote: > >> This is what we are looking for. An explanation of the _concept_ >> behind environments. This concept is not obvious for most people here >> on the list...... > > Right. I have been asking for documentation, and got silence for an answer. How serious is that ? We need to RTFM. There must of course be a decent manual (or collection of writings that constitute a manual) because *nobody* would do something stupid like adding a bunch of code that doesn?t have an obvious reason for being or an explanation of how to use it, or examples. It just couldn?t happen. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Four wheels move the body. Two wheels move the soul From lecteur at zogotounga.net Mon Oct 3 05:49:14 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Mon Oct 3 05:49:02 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> Message-ID: <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> > There must of course be a decent manual (or collection of writings that constitute a manual) because *nobody* would do something stupid like adding a bunch of code that doesn?t have an obvious reason for being or an explanation of how to use it, or examples. It just couldn?t happen. Ok, I know this is Squeak's tradition. The fact is I'm genuinely interested in Environments, as I used to be interested in Traits but never did anything with it because of the missing support. What a waste. Stef From edgardec2005 at gmail.com Mon Oct 3 10:43:04 2016 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Mon Oct 3 10:43:10 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> Message-ID: We should go Cuis simpler Smalltalk. We NEED a Kernel and a Core Squeak without experiments. And people should be able to load Traits or Environments or SeeWhatCoolIsThese if they choose to do so. And the rest of us live without pain. By the way Alejandro Reimondo have his old Fenix image builder as subclass of Environments of Dan Ingalls and Guille Polito and Pharo guys have his Kernel building tool as kind of Environments . Edgar > On Oct 3, 2016, at 02:49, St?phane Rollandin wrote: > > >> There must of course be a decent manual (or collection of writings that constitute a manual) because *nobody* would do something stupid like adding a bunch of code that doesn?t have an obvious reason for being or an explanation of how to use it, or examples. It just couldn?t happen. > > Ok, I know this is Squeak's tradition. > > The fact is I'm genuinely interested in Environments, as I used to be interested in Traits but never did anything with it because of the missing support. > > What a waste. > > > Stef > > From leves at caesar.elte.hu Mon Oct 3 12:26:13 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Oct 3 12:26:18 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> Message-ID: On Mon, 3 Oct 2016, Edgar De Cleene wrote: > We should go Cuis simpler Smalltalk. Sure. Just port Squeak on top of Cuis without losing functionality and performance. Levente > We NEED a Kernel and a Core Squeak without experiments. > And people should be able to load Traits or Environments or SeeWhatCoolIsThese if they choose to do so. > And the rest of us live without pain. > > By the way Alejandro Reimondo have his old Fenix image builder as subclass of Environments of Dan Ingalls and Guille Polito and Pharo guys have his Kernel building tool as kind of Environments . > > Edgar > >> On Oct 3, 2016, at 02:49, St?phane Rollandin wrote: >> >> >>> There must of course be a decent manual (or collection of writings that constitute a manual) because *nobody* would do something stupid like adding a bunch of code that doesn?t have an obvious reason for being or an explanation of how to use it, or examples. It just couldn?t happen. >> >> Ok, I know this is Squeak's tradition. >> >> The fact is I'm genuinely interested in Environments, as I used to be interested in Traits but never did anything with it because of the missing support. >> >> What a waste. >> >> >> Stef >> >> > > > From jakob.reschke at student.hpi.de Mon Oct 3 12:34:57 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Oct 3 12:35:22 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: Message-ID: Hi Chris, I can confirm that this works. Curious, it seems like #evaluate:environment: implicitly looks up names in the default Environment as a fallback. The created WbSrvr Environment does not have a binding for Object: env valueOf: #Object => nil. But: Compiler evaluate: 'Object' environment: env => Object Compiler evaluate: 'Object environment' environment: env => Smalltalk Compiler evaluate: 'WebServer environment' environment: env => WbSrvr That is probably the kind of stuff that must be documented. As for the "for added fun" part: In my image there is no accessor for the Process environment (and it is not a fully-fledged Environment instance, but a Dictionary, when you use Process>>environmentAt: and friends), so I had to add that accessor myself. Anyway, while the names in the compiled string are evaluated in the given Environment (including the implicit fallback), the `Environment current` placed in Process class>>forContext:priority: will search the dynamic environment. But #evaluate:environment: does not seem to install an appropriate Exception handler for CurrentEnvironment, so Environment current will return the default Smalltalk Envirionment. If I change the invocation in Compiler>>evaluteCue:ifFail: to [value := cue receiver withArgs: (cue context ifNil: [#()] ifNotNil: [{cue context}]) executeMethod: method] on: CurrentEnvironment do: [:n | n resume: aCue environment]. then the WbSrvr process does get WbSrvr as its environment. Best regards, Jakob 2016-10-03 0:07 GMT+02:00 Chris Cunnington : > I not sure if I've gone off the rails here, but it keeps working for me. > > Chris > > > "acquire a Squeak6.0alpha and create an Environment" > env := Environment withName: 'WbSrvr'. > env importSelf. > > "load WebClient-Core into Environment" > chunkcode := ReadWriteStream on: (String new: 1000). > SystemOrganizer default fileOutCategory: 'WebClient-Core' on: chunkcode > initializing: true. > chunkcode reset. > env fileIn: chunkcode announcing: 'Load Environment'. > > "start WebServer in environment" > Compiler evaluate: 'WebServer exampleBrowse' environment: env. > > "go to WebServer class>exampleBrowse in a Browser and change port to > 8888, then start" > WebServer exampleBrowse > > "open tabs in" > http://localhost:9999 > http://localhost:8888 > > "to see the port in the Environment is still 9999" > env explore. > "highlight WebServer in #declarations and explore" > self class methodDictionary > "toggle #exampleBrowse and see the port is 9999" > > "for added fun, go to Process class>>#forContext:priority: and add" > newProcess env: Environment current. > > "start again from the top, this time, explore the WebServer processes in > ProcessBrowser to see both Environments are Smalltalk. I have no idea > what that means. I would have thought the WebServer instance started > with WbSrvr environment would be in a WbSrvr process." > > > From brasspen at gmail.com Mon Oct 3 14:44:41 2016 From: brasspen at gmail.com (Chris Cunnington) Date: Mon Oct 3 14:44:47 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments Message-ID: <9bb10bd1-2a2d-1569-22e0-29a342ea18e6@gmail.com> >I can confirm that this works. Curious, it seems like >#evaluate:environment: implicitly looks up names in the default >Environment as a fallback. The created WbSrvr Environment does not >have a binding for Object: > env valueOf: #Object => nil. >But: > Compiler evaluate: 'Object' environment: env => Object > Compiler evaluate: 'Object environment' environment: env => Smalltalk > Compiler evaluate: 'WebServer environment' environment: env => WbSrvr >That is probably the kind of stuff that must be documented. I don't know that it's a fallback. I think an Environment only has access to the policy you give it. More specifically to what the Compiler is allowed to see. And an Environment cannot exist without being compiled. I think that's what the binding policy is. In Nicolas's example he had: spanish := Environment withName: 'Spanish'. spanish importSelf. spanish from: english import: #Transcript. I think the #importSelf creates an AllNamePolicy and the #from:import: an ExplicitNamePolicy. If you take the last line out (#from:import:) his example works just the same. I don't think you need to specify you want Transcript. The compiler can see it already from the #importSelf in the AllNamePolicy. So, your three examples basically make sense to me. I think your line of reasoning is solid, though, because understanding the nature of the barrier between Environments is both essential and at the moment pretty hazy. I just want to say 'fallback' may be the wrong word. It can only fall back on any policy it's given and AllNamePolicy doesn't sound too discriminating. I think that may be what's happening. I guess the compiler doesn't check to see if what you want to do is possible. It just plays along or shrugs. If there were tests for an Environment or the the compiler acted like C and said "I see what you're trying to do there, but that's not going to happen." Then the nature of the barrier between environments would become tactile. The errors would teach the nature of the barrier. >As for the "for added fun" part: In my image there is no accessor for >the Process environment (and it is not a fully-fledged Environment >instance, but a Dictionary, when you use Process>>environmentAt: and >friends), so I had to add that accessor myself. Right, yea. Exactly. I just used the "add accessors" menu item to add it. I noticed somebody wrote into Process an #env ivar already, and it looked unused, so I supposed I could employ it when each process is initialized. Then I could inspect a process in the ProcessBrowser. Your change to Compiler>>evaluteCue:ifFail: looks great. I'm looking forward to trying that out. I had a feeling that if I threw that question out there that a better programmer could solve that. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161003/f47167ee/attachment.htm From jakob.reschke at student.hpi.de Mon Oct 3 15:48:52 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Oct 3 15:49:16 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: Message-ID: 2016-10-03 16:44 GMT+02:00 Chris Cunnington : > Your change to Compiler>>evaluteCue:ifFail: looks great. I'm looking forward > to trying that out. Thank you, but I doubt that my change is really correct. You might want to compile an expression in Environment A and evaluate it in Environment B (like the Monticello loading methods: they are compiled in the default Environment, but it would be nice if they installed the methods from the loaded package into the current dynamic Environment). Since #evalueCue:ifFail: is called not only by #evaluate:environment:, that dynamic Environment binding should probably go "outside". You could also place that [ ... ] on: CurrentEnvironment do: ... around the `Compiler evaluate: 'WebServer exampleBrowse' environment: env.` do-it to gain the same effect. This is not required for the fileIn because it happens underway in EnvironmentLoader>>evaluate:logged:. From bert at freudenbergs.de Mon Oct 3 16:06:09 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Oct 3 16:06:12 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: References: Message-ID: On Sun, Oct 2, 2016 at 11:53 PM, Gerardo Santana G?mez Garrido < gerardo.santana@gmail.com> wrote: > I'm happy to let you know that Squeak/Spur can now run on OpenBSD > 6.0/amd64. > Excellent! - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161003/5e7b8b4f/attachment.htm From tim at rowledge.org Mon Oct 3 18:38:13 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 3 18:38:17 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> Message-ID: > On 02-10-2016, at 10:49 PM, St?phane Rollandin wrote: > > >> There must of course be a decent manual (or collection of writings that constitute a manual) because *nobody* would do something stupid like adding a bunch of code that doesn?t have an obvious reason for being or an explanation of how to use it, or examples. It just couldn?t happen. > > Ok, I know this is Squeak's tradition. > > The fact is I'm genuinely interested in Environments, as I used to be interested in Traits but never did anything with it because of the missing support. > > What a waste. Exactly my problem. This was a lot of work and involved a lot of deep futzing and must have had some serious discussion about the design, intent, implementation and usage before anyone agreed to bring it into the main system - surely? Without tool support, examples, descriptions and so on it will end up the same way as Traits and so many other neat ideas. It doesn?t matter a damn how good an idea is - if it can?t be described so other people can make sense of it and use it (hmm, we could call it ?documentation?) then it doesn?t exist in any meaningful sense. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SD: Self Destruct From ma.chris.m at gmail.com Mon Oct 3 21:01:25 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Oct 3 21:02:09 2016 Subject: [squeak-dev] trunk: Painter morph and object catalog broken Message-ID: I updated a stock 5.1 image just to be sure -- attempting to use Squeak's Painter morph or open its object catalog results in various MNU's. I assume this is part of the Etoys import, how's it going? Thanks, Chris From eliot.miranda at gmail.com Tue Oct 4 01:31:40 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 4 01:31:43 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: References: Message-ID: Hi Gerardo, On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido < gerardo.santana@gmail.com> wrote: > I'm happy to let you know that Squeak/Spur can now run on OpenBSD > 6.0/amd64. > > The relevant changes have been made available to https://github.com/ > OpenSmalltalk/opensmalltalk-vm > That's great news, thanks! I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. > I look forward to meet more Clog developers to share some ideas to improve > the build toolchain and code portability. > As I said, I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. Regards. > -- > Gerardo Santana > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161003/f559a324/attachment.htm From gerardo.santana at gmail.com Tue Oct 4 07:26:50 2016 From: gerardo.santana at gmail.com (=?UTF-8?Q?Gerardo_Santana_G=C3=B3mez_Garrido?=) Date: Tue Oct 4 07:26:53 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: References: Message-ID: Hi Eliot! that makes sense. In the mean time, if there are no concerns about them, can you commit the changes to platforms/unix ? They're in the same pull request. On Mon, Oct 3, 2016 at 8:31 PM, Eliot Miranda wrote: > Hi Gerardo, > > On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido < > gerardo.santana@gmail.com> wrote: > >> I'm happy to let you know that Squeak/Spur can now run on OpenBSD >> 6.0/amd64. >> >> The relevant changes have been made available to >> https://github.com/OpenSmalltalk/opensmalltalk-vm >> > > That's great news, thanks! I wonder if instead of changing the > build.linux* build files, which has the possibility of reaching something, > it would be better to add build.openbsd32x86 et al. > > > >> I look forward to meet more Clog developers to share some ideas to >> improve the build toolchain and code portability. >> > > As I said, I wonder if instead of changing the build.linux* build files, > which has the possibility of reaching something, it would be better to add > build.openbsd32x86 et al. > > Regards. >> -- >> Gerardo Santana >> > > _,,,^..^,,,_ > best, Eliot > > > > -- Gerardo Santana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161004/04fa1682/attachment.htm From gerardo.santana at gmail.com Tue Oct 4 07:28:53 2016 From: gerardo.santana at gmail.com (=?UTF-8?Q?Gerardo_Santana_G=C3=B3mez_Garrido?=) Date: Tue Oct 4 07:28:57 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: References: Message-ID: that makes sense. In the mean time, if there are no concerns about them, can you commit the changes to platforms/unix ? They're in the same pull request. Thanks in advance. On Mon, Oct 3, 2016 at 8:31 PM, Eliot Miranda wrote: > Hi Gerardo, > > On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido < > gerardo.santana@gmail.com> wrote: > >> I'm happy to let you know that Squeak/Spur can now run on OpenBSD >> 6.0/amd64. >> >> The relevant changes have been made available to >> https://github.com/OpenSmalltalk/opensmalltalk-vm >> > > That's great news, thanks! I wonder if instead of changing the > build.linux* build files, which has the possibility of reaching something, > it would be better to add build.openbsd32x86 et al. > > > >> I look forward to meet more Clog developers to share some ideas to >> improve the build toolchain and code portability. >> > > As I said, I wonder if instead of changing the build.linux* build files, > which has the possibility of reaching something, it would be better to add > build.openbsd32x86 et al. > > Regards. >> -- >> Gerardo Santana >> > > _,,,^..^,,,_ > best, Eliot > > > > -- Gerardo Santana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161004/bf48b934/attachment.htm From craig at blackpagedigital.com Tue Oct 4 09:14:42 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Tue Oct 4 09:15:12 2016 Subject: [squeak-dev] re: Environment declarations vs bindings In-Reply-To: References: Message-ID: Hi-- We don't need a system dictionary at all. We can make each class responsible for its own name literal, use subclass/metaclass references for reachability, and make all other globals the responsibility of some class. Every class can have any name; the execution machinery doesn't care. Other metadata about classes (e.g., author) can be used to disambiguate their names when compiling sources. We can store all that metadata in a module system, to manage the history of all versions of all classes and methods in the system. The Naiad module system that I wrote[1] implements this. I've adapted it to the latest Squeak and plan to release it this month. -C [1] http://thiscontext.com/naiad -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at blackpagedigital.com Tue Oct 4 09:14:49 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Tue Oct 4 09:15:16 2016 Subject: [squeak-dev] re: Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <8f3d68e4-bea8-98c8-9785-aed16e0b75bf@zogotounga.net> <272bde66-04e4-dd1d-2f1d-e9796e731d7d@zogotounga.net> Message-ID: Hi-- Edgar writes: > We NEED a Kernel and a Core Squeak without experiments. And people > should be able to load Traits or Environments or SeeWhatCoolIsThese > if they choose to do so. And the rest of us live without pain. > > By the way Alejandro Reimondo have his old Fenix image builder as > subclass of Environments of Dan Ingalls and Guille Polito and Pharo > guys have his Kernel building tool as kind of Environments. I have adapted the Naiad module system[1] to the latest Squeak, and plan to release it this month. Naiad enables loading and unloading modules, so you can maintain a minimal system without experiments. -C [1] http://thiscontext.com/naiad -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From edgardec2005 at gmail.com Tue Oct 4 10:45:44 2016 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Tue Oct 4 10:45:59 2016 Subject: [squeak-dev] re: Environment declarations vs bindings In-Reply-To: Message-ID: Glad see you still work on this On 10/4/16, 6:14 AM, "Craig Latta" wrote: > I have adapted the Naiad module system[1] to the latest Squeak, and > plan to release it this month. Naiad enables loading and unloading > modules, so you can maintain a minimal system without experiments. > > > -C > > [1] http://thiscontext.com/naiad From timfelgentreff at gmail.com Tue Oct 4 13:46:09 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Tue Oct 4 13:46:24 2016 Subject: [squeak-dev] trunk: Painter morph and object catalog broken In-Reply-To: References: Message-ID: The catalog and the painter morph should work in a trunk image. What MNUs do you see? On Mon, 3 Oct 2016 at 23:02 Chris Muller wrote: > I updated a stock 5.1 image just to be sure -- attempting to use > Squeak's Painter morph or open its object catalog results in various > MNU's. > > I assume this is part of the Etoys import, how's it going? > > Thanks, > Chris > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161004/e5b107e0/attachment.htm From eliot.miranda at gmail.com Tue Oct 4 17:31:44 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 4 17:31:49 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: References: Message-ID: <7F8E4909-FAF2-4D23-97D3-476F79E1F06A@gmail.com> Hi Gerardo, yes, as soon as you update the code re RTLD_NODELETE as per my comment, ok? _,,,^..^,,,_ (phone) > On Oct 4, 2016, at 12:28 AM, Gerardo Santana G?mez Garrido wrote: > > that makes sense. > > In the mean time, if there are no concerns about them, can you commit the changes to platforms/unix ? They're in the same pull request. > > Thanks in advance. > >> On Mon, Oct 3, 2016 at 8:31 PM, Eliot Miranda wrote: >> Hi Gerardo, >> >>> On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido wrote: >>> I'm happy to let you know that Squeak/Spur can now run on OpenBSD 6.0/amd64. >>> >>> The relevant changes have been made available to https://github.com/OpenSmalltalk/opensmalltalk-vm >> >> That's great news, thanks! I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. >> >> >>> I look forward to meet more Clog developers to share some ideas to improve the build toolchain and code portability. >> >> As I said, I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. >> >>> Regards. >>> -- >>> Gerardo Santana >> >> _,,,^..^,,,_ >> best, Eliot > > > > -- > Gerardo Santana > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161004/d1e7b0c4/attachment.htm From Das.Linux at gmx.de Tue Oct 4 17:38:14 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 4 17:38:16 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: <7F8E4909-FAF2-4D23-97D3-476F79E1F06A@gmail.com> References: <7F8E4909-FAF2-4D23-97D3-476F79E1F06A@gmail.com> Message-ID: <5C074E0E-0E10-4106-93F8-FFD2EF14C692@gmx.de> On 04.10.2016, at 19:31, Eliot Miranda wrote: > Hi Gerardo, > > yes, as soon as you update the code re RTLD_NODELETE as per my comment, ok? I think the RTLD_NODELETE code (Or better, the now Introduced RTLD_MODE) is ok :) > > _,,,^..^,,,_ (phone) > > On Oct 4, 2016, at 12:28 AM, Gerardo Santana G?mez Garrido wrote: > >> that makes sense. >> >> In the mean time, if there are no concerns about them, can you commit the changes to platforms/unix ? They're in the same pull request. >> >> Thanks in advance. >> >> On Mon, Oct 3, 2016 at 8:31 PM, Eliot Miranda wrote: >> Hi Gerardo, >> >> On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido wrote: >> I'm happy to let you know that Squeak/Spur can now run on OpenBSD 6.0/amd64. >> >> The relevant changes have been made available to https://github.com/OpenSmalltalk/opensmalltalk-vm >> >> That's great news, thanks! I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. >> >> >> I look forward to meet more Clog developers to share some ideas to improve the build toolchain and code portability. >> >> As I said, I wonder if instead of changing the build.linux* build files, which has the possibility of reaching something, it would be better to add build.openbsd32x86 et al. >> >> Regards. >> -- >> Gerardo Santana >> >> _,,,^..^,,,_ >> best, Eliot >> >> >> >> >> >> >> -- >> Gerardo Santana >> > From asqueaker at gmail.com Tue Oct 4 21:41:38 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 4 21:42:21 2016 Subject: [squeak-dev] trunk: Painter morph and object catalog broken In-Reply-To: References: Message-ID: It looks like its related to a some Preferences which used to be on the Preferences class, but have since been scattered throughout various different places in the system. For example, attempting to use the "find" button in the Object Catalog, with term "paint", I end up in the debugger, in PDA>>#openAsMorphIn: which is trying to send "Preferences browseWithDragNDrop". I guess that preference was moved to "SystemBrowser browseWithDragNDrop". I can, however, see the "Paint" icon in the catalog, but dragging it onto the desktop results in a similar error (I think) for #useBiggerPaintingBox... On Tue, Oct 4, 2016 at 8:46 AM, Tim Felgentreff wrote: > The catalog and the painter morph should work in a trunk image. What MNUs do > you see? > > On Mon, 3 Oct 2016 at 23:02 Chris Muller wrote: >> >> I updated a stock 5.1 image just to be sure -- attempting to use >> Squeak's Painter morph or open its object catalog results in various >> MNU's. >> >> I assume this is part of the Etoys import, how's it going? >> >> Thanks, >> Chris >> > > > From asqueaker at gmail.com Tue Oct 4 22:03:32 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 4 22:04:15 2016 Subject: [squeak-dev] re: Environment declarations vs bindings In-Reply-To: References: Message-ID: Hi Craig, you mentioned making each class responsible for its own name literal, which is fine for when you have a reference to a class and want to know its name. How about the use-case when all you have is a name String, but want to get the (correct) Class object? Are your suggesting to enumerate all classes (which wouldn't take long) and selecting the ones with the referenced name, instead of always only doing a Dictionary lookup (which assumes one name--> to one Class). You mentioned using other fields for disambiguation, so enumerate all classes, selecting the ones whose names match the string, and if there are any other disambiguating clues, use them to auto-select. Is this a correct jist of what you mean? I'm looking forward to your release! On Tue, Oct 4, 2016 at 4:14 AM, Craig Latta wrote: > > Hi-- > > We don't need a system dictionary at all. We can make each class > responsible for its own name literal, use subclass/metaclass references > for reachability, and make all other globals the responsibility of some > class. Every class can have any name; the execution machinery doesn't > care. Other metadata about classes (e.g., author) can be used to > disambiguate their names when compiling sources. We can store all that > metadata in a module system, to manage the history of all versions of > all classes and methods in the system. > > The Naiad module system that I wrote[1] implements this. I've > adapted it to the latest Squeak and plan to release it this month. > > > -C > > [1] http://thiscontext.com/naiad > > -- > Craig Latta > Black Page Digital > Amsterdam | San Francisco > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > From craig at blackpagedigital.com Wed Oct 5 08:57:58 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Wed Oct 5 08:58:33 2016 Subject: [squeak-dev] re: enumerating classes with Naiad (was "Environment declarations vs bindings") In-Reply-To: References: Message-ID: Hi Chris-- > How about the use-case when all you have is a name String, but want to > get the (correct) Class object? Are you suggesting to > enumerate all classes (which wouldn't take long) and selecting > the ones with the referenced name, instead of always only doing a > Dictionary lookup (which assumes one name--> to one Class). Yes indeed; we free ourselves of the one-class-per-name assumption (and from even having to think about class namespaces), at that slight cost. Also, if you want to do some reflection which doesn't require getting direct class object references (e.g., "How many classes have this name?"), you can do the enumeration entirely within the history database, in parallel with whatever else you're doing in the main memory where your class objects are. (Naiad uses a second, minimal, live object memory as a history database, replacing the changes and sources files. The history has "editions": all the metadata for all versions of classes and methods in the system. Most of the questions that development tools ask can be answered by editions. In fact, class and method editions stand in for classes and methods with the traditional code browsers, unbeknownst to them. This enables low-network-traffic remote browsing; editions have a compact binary representation and are self-contained, eliminating extended back-and-forth remote messaging with the classes and methods they describe.) There's also the cost of interacting with the history database over the network (typically within localhost) instead of a filesystem, but I find it worthwhile, especially since some history-related work can be parallelized. > You mentioned using other fields for disambiguation, so enumerate all > classes, selecting the ones whose names match the string, and if there > are any other disambiguating clues, use them to auto-select. Is this > a correct jist of what you mean? That's right. If you only care about current class versions, you would enumerate live class objects. If you wanted to enumerate over all past and present class versions, you would delegate to the history database, which would enumerate the class editions. > I'm looking forward to your release! Thanks! -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From gerardo.santana at gmail.com Thu Oct 6 01:39:31 2016 From: gerardo.santana at gmail.com (=?UTF-8?Q?Gerardo_Santana_G=C3=B3mez_Garrido?=) Date: Thu Oct 6 01:39:34 2016 Subject: [squeak-dev] Squeak works on OpenBSD In-Reply-To: <5C074E0E-0E10-4106-93F8-FFD2EF14C692@gmx.de> References: <7F8E4909-FAF2-4D23-97D3-476F79E1F06A@gmail.com> <5C074E0E-0E10-4106-93F8-FFD2EF14C692@gmx.de> Message-ID: Hi Eliot, I didn't delete any call. I just conditionally omit RTLD_NODELETE when the OS is OpenBSD. It should not affect any other OS. On Tue, Oct 4, 2016 at 12:38 PM, Tobias Pape wrote: > > On 04.10.2016, at 19:31, Eliot Miranda wrote: > > > Hi Gerardo, > > > > yes, as soon as you update the code re RTLD_NODELETE as per my > comment, ok? > > I think the RTLD_NODELETE code (Or better, the now Introduced RTLD_MODE) > is ok :) > > > > > _,,,^..^,,,_ (phone) > > > > On Oct 4, 2016, at 12:28 AM, Gerardo Santana G?mez Garrido < > gerardo.santana@gmail.com> wrote: > > > >> that makes sense. > >> > >> In the mean time, if there are no concerns about them, can you commit > the changes to platforms/unix ? They're in the same pull request. > >> > >> Thanks in advance. > >> > >> On Mon, Oct 3, 2016 at 8:31 PM, Eliot Miranda > wrote: > >> Hi Gerardo, > >> > >> On Sun, Oct 2, 2016 at 2:53 PM, Gerardo Santana G?mez Garrido < > gerardo.santana@gmail.com> wrote: > >> I'm happy to let you know that Squeak/Spur can now run on OpenBSD > 6.0/amd64. > >> > >> The relevant changes have been made available to https://github.com/ > OpenSmalltalk/opensmalltalk-vm > >> > >> That's great news, thanks! I wonder if instead of changing the > build.linux* build files, which has the possibility of reaching something, > it would be better to add build.openbsd32x86 et al. > >> > >> > >> I look forward to meet more Clog developers to share some ideas to > improve the build toolchain and code portability. > >> > >> As I said, I wonder if instead of changing the build.linux* build > files, which has the possibility of reaching something, it would be better > to add build.openbsd32x86 et al. > >> > >> Regards. > >> -- > >> Gerardo Santana > >> > >> _,,,^..^,,,_ > >> best, Eliot > >> > >> > >> > >> > >> > >> > >> -- > >> Gerardo Santana > >> > > > > > -- Gerardo Santana -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161005/4ac2d2c5/attachment.htm From commits at source.squeak.org Thu Oct 6 16:19:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 6 16:19:53 2016 Subject: [squeak-dev] The Trunk: Help-Squeak-CorePackages-pre.1.mcz Message-ID: Patrick Rein uploaded a new version of Help-Squeak-CorePackages to project The Trunk: http://source.squeak.org/trunk/Help-Squeak-CorePackages-pre.1.mcz ==================== Summary ==================== Name: Help-Squeak-CorePackages-pre.1 Author: pre Time: 6 October 2016, 6:15:21.412487 pm UUID: fd531696-fd5a-344d-b269-0a45c3609f20 Ancestors: Introduces a new help topic which adds short descriptions for every core package as an overview and first point of information for someone not familiar with the image. ==================== Snapshot ==================== SystemOrganization addCategory: #'Help-Squeak-CorePackages'! CustomHelp subclass: #SqueakCorePackagesHelp instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Help-Squeak-CorePackages'! ----- Method: SqueakCorePackagesHelp class>>bookName (in category 'as yet unclassified') ----- bookName ^ 'Core Packages'! ----- Method: SqueakCorePackagesHelp class>>chronology (in category 'pages') ----- chronology "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #chronology" ^(HelpTopic title: 'Chronology' contents: 'Everything related to time, time spans, durations, time stamps, etc. For the subtleties of the single classes read the class comments of: Duration, Timespan, and DateAndTime. !! ]style[(138 8 2 8 6 11 2),LDuration Comment;,,LTimespan Comment;,,LDateAndTime Comment;,!!' readStream nextChunkText) key: #chronology! ----- Method: SqueakCorePackagesHelp class>>collections (in category 'pages') ----- collections "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #collections" ^(HelpTopic title: 'Collections' contents: 'Everything related to working with multiple objects such as Array, String (Collection of characters), Stream, Set, and Dictionary.!! ]style[(60 5 2 6 29 6 2 3 6 10 1),dArray browse;;,,dString browse;;,,dStream browse;;,,dSet browse;;,,dDictionary browse;;,!!' readStream nextChunkText) key: #collections! ----- Method: SqueakCorePackagesHelp class>>compiler (in category 'pages') ----- compiler "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #compiler" ^(HelpTopic title: 'Compiler' contents: 'This package contains the Squeak Smalltalk compiler. It includes a Scanner, Parser, and Compiler. In order to restore source code from byte code., it also includes a Decompiler. !! ]style[(67 7 2 6 6 8 70 10 2),dScanner browse;;,,dParser browse;;,,dCompiler browse;;,,dDecompiler browse;;,!!' readStream nextChunkText) key: #compiler! ----- Method: SqueakCorePackagesHelp class>>files (in category 'pages') ----- files "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #files" ^(HelpTopic title: 'Files' contents: 'The Files package provides access to the local file system through streams. It contains the FileDirectory class for listing and navigating folders. Besides the usual synchronous API it also provides a AsyncFile class for asynchronous reading from files.!! ]style[(92 14 96 9 43),dFileDirectory browse;;,,LAsyncFile Comment;,!!' readStream nextChunkText) key: #files! ----- Method: SqueakCorePackagesHelp class>>graphics (in category 'as yet unclassified') ----- graphics "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #graphics" ^(HelpTopic title: 'Graphics' contents: 'This package includes core classes for Smalltalk graphic objects as well as facilities and applications for operating on graphic objects. Key classes include Form and BitBlt. It further includes classes for rendering fonts and reading png, gif, or jpeg files.!! ]style[(158 4 5 6 87),dForm browse;;,,dBitBlt browse;;,!!' readStream nextChunkText) key: #graphics! ----- Method: SqueakCorePackagesHelp class>>kernel (in category 'pages') ----- kernel "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #kernel" ^HelpTopic title: 'Kernel' contents: 'This package provides the most basic Smalltalk objects. It contains classes for: Code compilation, class (hierarchy) (re-)definition, basic exception handling, process scheduling and synchronization, user input events, and primitive types such as numbers and Boolean values.!!' readStream nextChunkText! ----- Method: SqueakCorePackagesHelp class>>network (in category 'pages') ----- network "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #network" ^(HelpTopic title: 'Network' contents: 'The network package provides means to fetch network resources. Includes support for UDP, TCP, HTTP, FTP, Telnet, SMTP, and POP3. Some of them are implemented as Sockets, others are implemented as Protocol clients. Additionally, it includes classes for handling URIs, Urls, email addresses, and UUIDs. If SqueakSSL is installed properly it can also provide HTTPS support.!! ]style[(161 6 94 3 30 5 73),LSocket Hierarchy;,,LURI Comment;,,dUUID browse;;,!!' readStream nextChunkText) key: #network! ----- Method: SqueakCorePackagesHelp class>>pages (in category 'as yet unclassified') ----- pages ^ self class selectors copyWithoutAll: #(bookName pages)! ----- Method: SqueakCorePackagesHelp class>>sound (in category 'pages') ----- sound "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #sound" ^(HelpTopic title: 'Sound' contents: 'The sound package manages audible output and reading various sound file formats. It includes support for FM, WAVE, and MIDI. It also includes classes for synthesizing sound. Try for example: (AbstractSound majorScaleOn: PluckedSound default) play!! ]style[(191 55),d(AbstractSound majorScaleOn: PluckedSound default) play;;!!' readStream nextChunkText) key: #sound! ----- Method: SqueakCorePackagesHelp class>>system (in category 'pages') ----- system "This method was automatically generated. Edit it using:" "SqueakCorePackagesHelp edit: #system" ^(HelpTopic title: 'System' contents: 'The System package includes classes dealing with code change notifications, object events, weak arrays and finalization, object serialization, and the concept of projects. It also provides general system infrastructure such as the AppRegistry or classes for localization. Additionally, it includes the SmalltalkImage class which can be accessed through Smalltalk.!! ]style[(232 11 61 14 37 9 1),LAppRegistry Comment;,,LSmalltalkImage Comment;,,dSmalltalk inspect;;,!!' readStream nextChunkText) key: #system! SqueakCorePackagesHelp subclass: #SqueakFurtherCorePackagesHelp instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Help-Squeak-CorePackages'! ----- Method: SqueakFurtherCorePackagesHelp class>>balloonPackage (in category 'as yet unclassified') ----- balloonPackage "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #balloonPackage" ^(HelpTopic title: 'Balloon' contents: 'The Balloon package provides an engine for complex 2-D graphic objects and fast 2-D graphics rendering including anti-aliasing. It was originally written to render Flash. The main interface is BalloonCanvas which is used to render Morphs using the BalloonEngine. It also provides the FillStyle classes which enable gradient or form fill styles for Morphs. It has nothing to do with the Balloon help concept which shows help texts on mouse over.!! ]style[(193 13 239),dBalloonCanvas browse;;,!!' readStream nextChunkText) key: #balloonPackage! ----- Method: SqueakFurtherCorePackagesHelp class>>bookName (in category 'as yet unclassified') ----- bookName ^ 'Further'! ----- Method: SqueakFurtherCorePackagesHelp class>>commandLine (in category 'as yet unclassified') ----- commandLine "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #commandLine" ^(HelpTopic title: 'CommandLine' contents: 'The CommandLine package provides classes for running Squeak in headless mode while dealing with events requiring user input. Essentially, it introduces a special ToolSet (CommandLineToolSet) which handles tool requests.!! ]style[(162 7 2 18 30),dToolSet browse;;,,dCommandLineToolSet browse;;,!!' readStream nextChunkText) key: #commandLine! ----- Method: SqueakFurtherCorePackagesHelp class>>etoys (in category 'pages') ----- etoys "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #etoys" ^HelpTopic title: 'Etoys' contents: 'The Etoys package includes all of the Etoys system with extended Morphs, a tile-based scripting language user interface and interpreter, and several applications based upon that. This package also includes the Kedama project which provides means to create simulations with large numbers of objects based on a columnar storage.!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>monticello (in category 'pages') ----- monticello "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #monticello" ^(HelpTopic title: 'Monticello' contents: 'The Monticello package implements the infastructure and tools for working with the Monticello version control system. The package is split up into several categories: Monticello version control abstractions, serialization logic, repository management, tools, and monticello configuration management. Monticello configurations denote a combination of version from different packages which form a consistent state together.!!' readStream nextChunkText) key: #monticello! ----- Method: SqueakFurtherCorePackagesHelp class>>morphicExtras (in category 'pages') ----- morphicExtras "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #morphicExtras" ^(HelpTopic title: 'MorphicExtras' contents: 'MorphicExtras contains a collection of additional Morphs which are either graphical tools or provide an extended API, such as the BookMorph class. Many of these can be found in the Objects tool. Additionally, it includes extensions to the Morphic UI such as Flaps. !! ]style[(130 9 42 12 72),dBookMorph browse;;,,dObjectsTool newStandAlone openInWorld;;,!!' readStream nextChunkText) key: #morphicExtras! ----- Method: SqueakFurtherCorePackagesHelp class>>multilingual (in category 'as yet unclassified') ----- multilingual "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #multilingual" ^(HelpTopic title: 'Multilingual' contents: 'The Multilingual package adds support for multiple languages to Squeak. This includes the capabilities to import text in different encodings (think copy-and-paste), and render all kinds of fonts. An interesting multilingual method of the String class is #encodedCharSetAt:. !!' readStream nextChunkText) key: #multilingual! ----- Method: SqueakFurtherCorePackagesHelp class>>nebraska (in category 'as yet unclassified') ----- nebraska "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #nebraska" ^(HelpTopic title: 'Nebraska' contents: 'Nebraska is a toolkit for building remote interactions with Morphic in Squeak. It is modelled somewhat after Kansas, although as yet it''s a much simpler system. There is a shared world on some server on a network, and other people can connect to that world from afar. Whenever the shared world tries to draw to its screen, it sends drawing commands across the network. Whenever a user tries to perform a mouse or keyboard interaction, those interactions are forwarded to the server where a RemoteControlledHand acts on their behalf. See also http://wiki.squeak.org/squeak/1356!! ]style[(543 34),Rhttp://wiki.squeak.org/squeak/1356;!!' readStream nextChunkText) key: #nebraska! ----- Method: SqueakFurtherCorePackagesHelp class>>packageInfoPage (in category 'pages') ----- packageInfoPage "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #packageInfoPage" ^(HelpTopic title: 'PackageInfo' contents: 'The PackageInfo package provides classes providing a view on the classes in the system with respect to packages. These objects are only cached and represent no stored information. For more information look into the PackageInfo class.!! ]style[(215 11 7),LPackageInfo Comment;,!!' readStream nextChunkText) key: #packageInfoPage! ----- Method: SqueakFurtherCorePackagesHelp class>>pages (in category 'as yet unclassified') ----- pages ^ self class selectors copyWithoutAll: #(bookName pages)! ----- Method: SqueakFurtherCorePackagesHelp class>>preferenceBrowser (in category 'pages') ----- preferenceBrowser "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #preferenceBrowser" ^HelpTopic title: 'PreferenceBrowser' contents: 'The PreferenceBrowser package contains the implementation of the preference browser tool which is currently only available in Morphic and thus does not reside with the ToolBuilder-based tools.!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>protocols (in category 'as yet unclassified') ----- protocols "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #protocols" ^(HelpTopic title: 'Protocols' contents: 'This package deals with vocabularies as they are used in Etoys. A vocabulary is the set of words understood by an object when viewed from Etoys. You can see examples of vocabularies in methods named ''additionsTo[some vocabulary category name]''. Most of the methods behind a vocabulary term are implemented in Player which then often forward them to an implementation in its costume (often a Morph). See also: http://wiki.squeak.org/squeak/3944!! ]style[(411 34),Rhttp://wiki.squeak.org/squeak/3944;!!' readStream nextChunkText) key: #protocols! ----- Method: SqueakFurtherCorePackagesHelp class>>releaseBuilder (in category 'pages') ----- releaseBuilder "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #releaseBuilder" ^HelpTopic title: 'ReleaseBuilder' contents: 'This package contains the script for preparing a new release from a trunk image.!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>servicesPage (in category 'pages') ----- servicesPage "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #servicesPage" ^(HelpTopic title: 'Services' contents: 'Services are a concept for extending menus. You can register a service for a menu/application. A good starting point is the ServiceProvider.!! ]style[(124 15 1),LServiceProvider Comment;,!!' readStream nextChunkText) key: #servicesPage! ----- Method: SqueakFurtherCorePackagesHelp class>>shout (in category 'as yet unclassified') ----- shout "This method was automatically generated. Edit it using:" "ShoutHelp edit: #introduction" ^HelpTopic title: 'Shout' contents: 'The Shout package provides parsing and syntax highlighting for Smalltalk code. It can be used to create alternative highlighting mechanisms. !! ]style[(141)f1!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>squeakSSL (in category 'pages') ----- squeakSSL "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #squeakSSL" ^HelpTopic title: 'SqueakSSL' contents: 'The SqueakSSL provides the SecureSocket class which enables SSL encrpyted connections. For this to work the SqueakSSL plugin has to be installed. !!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>st80 (in category 'as yet unclassified') ----- st80 "This method was automatically generated. Edit it using:" "ST80Help edit: #introduction" ^HelpTopic title: 'ST80' contents: 'The ST80 package bundles the MVC tool implementations in Squeak. They can be used through opening a MVC project. This is useful for example for debugging Morphic projects.!! ]style[(171)f1!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>systemReporter (in category 'pages') ----- systemReporter "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #systemReporter" ^HelpTopic title: 'SystemReporter' contents: 'SystemReporter provides the tool with the same name which provides information on the system such as VM or image versions, hardware information, or access to the debug log.!! ]style[(28 4 140),dSystemReporter open;;,!!' readStream nextChunkText! ----- Method: SqueakFurtherCorePackagesHelp class>>tests (in category 'pages') ----- tests "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #tests" ^(HelpTopic title: 'Tests' contents: 'This package includes tests for many parts of the core system where core packages do not provide tests themselves.!!' readStream nextChunkText) key: #tests! ----- Method: SqueakFurtherCorePackagesHelp class>>trueType (in category 'pages') ----- trueType "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #trueType" ^(HelpTopic title: 'TrueType' contents: 'The TrueType package includes classes for handling TrueType fonts. It provides domain abstractions as well as classes for importing TrueType fonts from files. A starting point is the TTCFont class.!! ]style[(183 7 7),LTTCFont Comment;,!!' readStream nextChunkText) key: #trueType! ----- Method: SqueakFurtherCorePackagesHelp class>>updateStream (in category 'pages') ----- updateStream "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #updateStream" ^(HelpTopic title: 'UpdateStream' contents: 'This package provides scripts for updating all core packages within the image from a server. All these scripts are on the class side of UpdateStreamDownloader. !! ]style[(136 22 2),dUpdateStreamDownloader browse;;,!!' readStream nextChunkText) key: #updateStream! ----- Method: SqueakFurtherCorePackagesHelp class>>versionNumber (in category 'pages') ----- versionNumber "This method was automatically generated. Edit it using:" "SqueakFurtherCorePackagesHelp edit: #versionNumber" ^HelpTopic title: 'VersionNumber' contents: 'This package includes domain specific code for handling version numbers either as a single VersionNumber or as a VersionHistory. It is used in the SqueakMap package.!! ]style[(91 13 9 14 39),LVersionNumber Comment;,,LVersionHistory Comment;,!!' readStream nextChunkText! SqueakCorePackagesHelp subclass: #SqueakUsefulCorePackagesHelp instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Help-Squeak-CorePackages'! ----- Method: SqueakUsefulCorePackagesHelp class>>bookName (in category 'as yet unclassified') ----- bookName ^ 'Commonly Used'! ----- Method: SqueakUsefulCorePackagesHelp class>>compression (in category 'pages') ----- compression "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #compression" ^(HelpTopic title: 'Compression' contents: 'The Compression package provides classes for dealing with compressed files or compressed data in general. Compression-Archives contains most of the file-handling classes (for example Archive). Compression-Streams provides streams which can compress data written to them. !! ]style[(183 7 81),dArchive browse;;,!!' readStream nextChunkText) key: #compression! ----- Method: SqueakUsefulCorePackagesHelp class>>installer (in category 'pages') ----- installer "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #installer" ^(HelpTopic title: 'Installer' contents: 'This package provides the Installer tool which can be used to install packages from various sources including Monticello or SqueakMap. !!' readStream nextChunkText) key: #installer! ----- Method: SqueakUsefulCorePackagesHelp class>>morphic (in category 'pages') ----- morphic "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #morphic" ^HelpTopic title: 'Morphic' contents: 'Morphic contains the Morphic UI framework including event handling, basic drawing of Morphs, and the implementation of the Morphic UI. The main API is in the Morph class and the event loop of the framework can be found in WorldState. The package also includes several example Morphs such as the ClickExerciser. The main entrance point for working with Morphs is by composing or subclassing Morph subclasses.!! ]style[(222 10 65 14 82 5 12),dWorldState browse;;,,dClickExerciser new openInWorld;;,,dMorph browse;;,!!' readStream nextChunkText! ----- Method: SqueakUsefulCorePackagesHelp class>>pages (in category 'as yet unclassified') ----- pages ^ self class selectors copyWithoutAll: #(bookName pages)! ----- Method: SqueakUsefulCorePackagesHelp class>>regex (in category 'as yet unclassified') ----- regex "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #regex" ^(HelpTopic title: 'Regex' contents: 'Regex provides a regex matching engine. It is mainly used through the interface exposed on String objects. See the *Regex-Core category on String. For the syntax of Squeak regular expressions see: RxParser class>>#a:introduction: and the subsequent methods on RxParser class. For more involved usages of regular expressions see the Regex-Core class category.!! ]style[(139 6 53 32 129),dString browse;;,,LRxParser class>>#a:introduction:;,!!' readStream nextChunkText) key: #regex! ----- Method: SqueakUsefulCorePackagesHelp class>>squeakMap (in category 'as yet unclassified') ----- squeakMap "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #squeakMap" ^(HelpTopic title: 'SM' contents: 'This package contains the model and the UI of SqueakMap, which is a repository for packages and applications in Squeak. You can access the SqueakMap catalog from the Apps menu item. Information on how to use SqueakMap can be found here: http://wiki.squeak.org/squeak/2726 The server resides at: http://http://map.squeak.org/ You can get an account to publish packages at: http://map.squeak.org/newaccount!!' readStream nextChunkText) key: #squeakMap! ----- Method: SqueakUsefulCorePackagesHelp class>>sunit (in category 'as yet unclassified') ----- sunit "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #sunit" ^(HelpTopic title: 'SUnit and SUnitGUI' contents: 'The SUnit package provides testing abstractions for unit tests. These comply to the XUnit testing model. The common use case is to subclass TestCase. However, SUnit-Extensions also contains TestCases for special use cases. The rest of the API is explained in SUnit-Tests. SUnitGUI contains the definition of the SUnit TestRunner which you can find in the world menu or the docking bar under Tools.!! ]style[(141 8 250),Rcode://TestCase;,!!' readStream nextChunkText) key: #sunit! ----- Method: SqueakUsefulCorePackagesHelp class>>toolBuilder (in category 'as yet unclassified') ----- toolBuilder "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #toolBuilder" ^(HelpTopic title: 'ToolBuilder' contents: 'ToolBuilder provides means to describe graphical user interfaces independently from the actual graphics framework used (e.g. MVC or Morphic). Examples of tools built with it are the Debugger, the system browser, or the monticello repository browser. To read about how to build tools start reading the ToolBuilder class comment.!! ]style[(182 8 112 11 15)f1,dDebugger browse;;,f1,LToolBuilder Comment;,f1!!' readStream nextChunkText) key: #toolBuilder! ----- Method: SqueakUsefulCorePackagesHelp class>>traitsPage (in category 'as yet unclassified') ----- traitsPage "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #traitsPage" ^(HelpTopic title: 'Traits' contents: 'Traits are an additional composition and reuse concept in Squeak allowing sideways composition of behavior. Traits are similar to MixIns. You can read about them here: http://scg.unibe.ch/archive/papers/Scha03aTraits.pdf!! ]style[(168 52)f1,Rhttp://scg.unibe.ch/archive/papers/Scha03aTraits.pdf;!!' readStream nextChunkText) key: #traitsPage! ----- Method: SqueakUsefulCorePackagesHelp class>>xml (in category 'as yet unclassified') ----- xml "This method was automatically generated. Edit it using:" "SqueakUsefulCorePackagesHelp edit: #xml" ^(HelpTopic title: 'XML' contents: 'This package provides classes for parsing XML files. You can implement your own Parser by subclassing the XMLParser class.!! ]style[(106 9 7)f1,dXMLParser browse;;,f1!!' readStream nextChunkText) key: #xml! From commits at source.squeak.org Thu Oct 6 16:34:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 6 16:34:22 2016 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-pre.146.mcz Message-ID: Patrick Rein uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-pre.146.mcz ==================== Summary ==================== Name: MonticelloConfigurations-pre.146 Author: pre Time: 6 October 2016, 6:34:12.000487 pm UUID: fb8e5e56-8586-1943-b186-e48db629e1da Ancestors: MonticelloConfigurations-mt.145 Removes the Post button which is based on an API which does not exist anymore and re-names the Store button to Save to be consistent with Monticello vocabulary. =============== Diff against MonticelloConfigurations-mt.145 =============== Item was changed: ----- Method: MCConfigurationBrowser>>buttonSpecs (in category 'morphic ui') ----- buttonSpecs ^ #(('Add' addDependency 'Add a dependency') ('Update' updateMenu 'Update dependencies') ('Install' installMenu 'Load/Merge/Upgrade into image') ('Up' up 'Move item up in list' canMoveUp) ('Down' down 'Move item down in list' canMoveDown) ('Remove' remove 'Remove item' canRemove) + ('Save' store 'Store the configuration to a repository') - ('Store' store 'store configuration') - ('Post' post 'Post this configuration to an update stream') )! From commits at source.squeak.org Thu Oct 6 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 6 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161006215502.30740.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068992.html Name: Help-Squeak-CorePackages-pre.1 Ancestors: Introduces a new help topic which adds short descriptions for every core package as an overview and first point of information for someone not familiar with the image. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/068993.html Name: MonticelloConfigurations-pre.146 Ancestors: MonticelloConfigurations-mt.145 Removes the Post button which is based on an API which does not exist anymore and re-names the Store button to Save to be consistent with Monticello vocabulary. ============================================= From lewis at mail.msen.com Fri Oct 7 01:03:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 7 01:03:46 2016 Subject: [squeak-dev] The Trunk: Help-Squeak-CorePackages-pre.1.mcz In-Reply-To: <201610061619.u96GJqUD076046@shell.msen.com> References: <201610061619.u96GJqUD076046@shell.msen.com> Message-ID: <20161007010344.GA62421@shell.msen.com> On Thu, Oct 06, 2016 at 04:19:46PM +0000, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Help-Squeak-CorePackages to project The Trunk: > http://source.squeak.org/trunk/Help-Squeak-CorePackages-pre.1.mcz > > ==================== Summary ==================== > > Name: Help-Squeak-CorePackages-pre.1 > Author: pre > Time: 6 October 2016, 6:15:21.412487 pm > UUID: fd531696-fd5a-344d-b269-0a45c3609f20 > Ancestors: > > Introduces a new help topic which adds short descriptions for every core package as an overview and first point of information for someone not familiar with the image. > Very nice! I like this. Dave From commits at source.squeak.org Fri Oct 7 07:08:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 7 07:08:36 2016 Subject: [squeak-dev] The Trunk: UpdateStream-pre.8.mcz Message-ID: Patrick Rein uploaded a new version of UpdateStream to project The Trunk: http://source.squeak.org/trunk/UpdateStream-pre.8.mcz ==================== Summary ==================== Name: UpdateStream-pre.8 Author: pre Time: 7 October 2016, 9:08:28.891404 am UUID: 068ac226-4fee-8d4c-82a8-602d55d4f067 Ancestors: UpdateStream-mt.7 Remove post method which was used in the MonticelloConfigurations tool =============== Diff against UpdateStream-mt.7 =============== Item was removed: - ----- Method: MCConfigurationBrowser>>post (in category '*UpdateStream') ----- - post - "Take the current configuration and post an update" - | name update managers names choice | - (self checkRepositories and: [self checkDependencies]) ifFalse: [^self]. - name := UIManager default - request: 'Update name (.cs) will be appended):' - initialAnswer: self configuration suggestedNameOfNextVersion. - name isEmpty ifTrue:[^self]. - self configuration name: name. - update := MCPseudoFileStream on: (String new: 100). - update localName: name, '.cs'. - update nextPutAll: '"Change Set: ', name. - update cr; nextPutAll: 'Date: ', Date today printString. - update cr; nextPutAll: 'Author: Posted by Monticello'. - update cr; cr; nextPutAll: 'This is a configuration map created by Monticello."'. - - update cr; cr; nextPutAll: '(MCConfiguration fromArray: #'. - self configuration fileOutOn: update. - update nextPutAll: ') upgrade.'. - update position: 0. - - managers := Smalltalk at: #UpdateManager ifPresent:[:mgr| mgr allRegisteredManagers]. - managers ifNil:[managers := #()]. - managers size > 0 ifTrue:[ - | servers index | - servers := ServerDirectory groupNames asSortedArray. - names := (managers collect:[:each| each packageVersion]), servers. - index := UIManager default chooseFrom: names lines: {managers size}. - index = 0 ifTrue:[^self]. - index <= managers size ifTrue:[ - | mgr | - mgr := managers at: index. - ^mgr publishUpdate: update. - ]. - choice := names at: index. - ] ifFalse:[ - names := ServerDirectory groupNames asSortedArray. - choice := UIManager default chooseFrom: names values: names. - choice == nil ifTrue: [^ self]. - ]. - (ServerDirectory serverInGroupNamed: choice) putUpdate: update.! From commits at source.squeak.org Fri Oct 7 16:27:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 7 16:27:45 2016 Subject: [squeak-dev] The Trunk: EToys-eem.267.mcz Message-ID: Eliot Miranda uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-eem.267.mcz ==================== Summary ==================== Name: EToys-eem.267 Author: eem Time: 7 October 2016, 9:25:48.070927 am UUID: 76f37085-fb1e-4d89-ad91-7b470d3133f6 Ancestors: EToys-tfel.266 Remove an undeclared from cleanUpEtoysGarbage (make the reference to SkObject soft). =============== Diff against EToys-tfel.266 =============== Item was changed: ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- cleanUpEtoysGarbage "Project cleanUpEtoysGarbage" "All these should eventuall go away and be fixed, but for now we have this here." Smalltalk garbageCollect. "Clear weak message sends to remove modal windows from worlds that are closing." (WeakMessageSend allInstances select: [:wm | (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. "Clear the weak dictionary on the class side that keeps node state around in the rewriter" KedamaEvaluatorNodeState initialize. "Clear the KedamaEvaluator that holds on to the last Kedama world" ScriptEditorMorph setDefaultEvaluator. "Clear the hard references to player classes, " (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. Player withAllSubclasses select: [:c | c isSystemDefined not] thenDo: [:c | c superclass removeSubclass: c]. "Clear the paste buffer" HandMorph initialize. "Clear the reference to the project tree in SkObject" + Smalltalk at: #SkObject ifPresent: [:cls| cls initialize]. - SkObject initialize. PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p flushPlayerListCache]]. + Smalltalk garbageCollect! - Smalltalk garbageCollect.! From hannes.hirzel at gmail.com Fri Oct 7 18:59:32 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Oct 7 18:59:35 2016 Subject: [squeak-dev] [BUG]MorphicModel2247(Object)>>doesNotUnderstand: #copyUniClassWith: Message-ID: Hello When I drop an Instance of a PasteUpMorph into the ProjectView window of another project I get the error message below. This is in a 5.1beta image but with the updates applied so that it is similar to the release image (I assume). This also happens in 6.0alpha most recent update but not allways. Any suggestions how I can fix this? Is a subclass of MorphicModel a UniClass? How can I detect a UniClass? --Hannes VM: unix - Smalltalk Image: Squeak5.1rc2 [latest update: #16535] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/user/sq5.1.beta-F/Squeak5.1beta-16420-32bit-r3397-All-in-One.app/Contents/Resources Trusted Dir /home/user/sq5.1.beta-F/Squeak5.1beta-16420-32bit-r3397-All-in-One.app/Contents/Resources/secure Untrusted Dir /home/user/sq5.1.beta-F/Squeak5.1beta-16420-32bit-r3397-All-in-One.app/Contents/Resources/My Squeak MorphicModel2247(Object)>>doesNotUnderstand: #copyUniClassWith: Receiver: a MorphicModel2247(2217950) Arguments and temporary variables: aMessage: copyUniClassWith: a DeepCopier exception: MessageNotUnderstood: MorphicModel2247>>copyUniClassWith: resumeValue: nil Receiver's instance variables: bounds: 0@0 corner: 200@100 owner: nil submorphs: #() fullBounds: nil color: Color transparent extension: a MorphExtension (2831207) [other: (borderStyle -> a SimpleBorder)]...etc... borderWidth: 2 borderColor: Color yellow model: nil slotName: nil open: false MorphicModel2247(Object)>>veryDeepCopyWith: Receiver: a MorphicModel2247(2217950) Arguments and temporary variables: deepCopier: a DeepCopier class: MorphicModel2247 index: nil sub: nil subAss: nil new: a MorphicModel2247(3918826) uc: nil sup: nil has: nil mine: nil xx: nil xxLimiT: nil Receiver's instance variables: bounds: 0@0 corner: 200@100 owner: nil submorphs: #() fullBounds: nil color: Color transparent extension: a MorphExtension (2831207) [other: (borderStyle -> a SimpleBorder)]...etc... borderWidth: 2 borderColor: Color yellow model: nil slotName: nil open: false MorphicModel2247(Morph)>>veryDeepCopyWith: Receiver: a MorphicModel2247(2217950) Arguments and temporary variables: deepCopier: a DeepCopier Receiver's instance variables: bounds: 0@0 corner: 200@100 owner: nil submorphs: #() fullBounds: nil color: Color transparent extension: a MorphExtension (2831207) [other: (borderStyle -> a SimpleBorder)]...etc... borderWidth: 2 borderColor: Color yellow model: nil slotName: nil open: false PasteUpMorph(Object)>>veryDeepCopyWith: Receiver: a PasteUpMorph(3556218) Arguments and temporary variables: deepCopier: a DeepCopier class: PasteUpMorph index: 10 sub: a MorphicModel2247(2217950) subAss: nil new: a PasteUpMorph(553920) uc: nil sup: PasteUpMorph has: false mine: #('presenter' 'model' 'cursor' 'padding' 'backgroundMorph' 'turtleTrailsF...etc... xx: 12 xxLimiT: 13 Receiver's instance variables: bounds: 23@48 corner: 663@528 owner: a PasteUpMorph4(3881707) [world] submorphs: {a TextMorph(1743569) . a TextMorph(932412) . a TextMorph...etc... fullBounds: 23@48 corner: 663@528 color: (Color r: 0.825 g: 0.825 b: 0.825) extension: a MorphExtension (2902375) [sticky] [other: (creationDate -> 26 Se...etc... borderWidth: 1 borderColor: (Color r: 0.861 g: 1 b: 0.722) presenter: nil model: a MorphicModel2247(2217950) cursor: 1 padding: 3 backgroundMorph: nil turtleTrailsForm: nil turtlePen: nil lastTurtlePositions: nil isPartsBin: nil indicateCursor: nil wantsMouseOverHalos: nil worldState: nil griddingOn: nil PasteUpMorph(Morph)>>veryDeepCopyWith: Receiver: a PasteUpMorph(3556218) Arguments and temporary variables: deepCopier: a DeepCopier Receiver's instance variables: bounds: 23@48 corner: 663@528 owner: a PasteUpMorph4(3881707) [world] submorphs: {a TextMorph(1743569) . a TextMorph(932412) . a TextMorph...etc... fullBounds: 23@48 corner: 663@528 color: (Color r: 0.825 g: 0.825 b: 0.825) extension: a MorphExtension (2902375) [sticky] [other: (creationDate -> 26 Se...etc... borderWidth: 1 borderColor: (Color r: 0.861 g: 1 b: 0.722) presenter: nil model: a MorphicModel2247(2217950) cursor: 1 padding: 3 backgroundMorph: nil turtleTrailsForm: nil turtlePen: nil lastTurtlePositions: nil isPartsBin: nil indicateCursor: nil wantsMouseOverHalos: nil worldState: nil griddingOn: nil PasteUpMorph>>veryDeepCopyWith: Receiver: a PasteUpMorph(3556218) Arguments and temporary variables: deepCopier: a DeepCopier Receiver's instance variables: bounds: 23@48 corner: 663@528 owner: a PasteUpMorph4(3881707) [world] submorphs: {a TextMorph(1743569) . a TextMorph(932412) . a TextMorph...etc... fullBounds: 23@48 corner: 663@528 color: (Color r: 0.825 g: 0.825 b: 0.825) extension: a MorphExtension (2902375) [sticky] [other: (creationDate -> 26 Se...etc... borderWidth: 1 borderColor: (Color r: 0.861 g: 1 b: 0.722) presenter: nil model: a MorphicModel2247(2217950) cursor: 1 padding: 3 backgroundMorph: nil turtleTrailsForm: nil turtlePen: nil lastTurtlePositions: nil isPartsBin: nil indicateCursor: nil wantsMouseOverHalos: nil worldState: nil griddingOn: nil PasteUpMorph(Object)>>veryDeepCopy Receiver: a PasteUpMorph(3556218) Arguments and temporary variables: copier: a DeepCopier new: nil Receiver's instance variables: bounds: 23@48 corner: 663@528 owner: a PasteUpMorph4(3881707) [world] submorphs: {a TextMorph(1743569) . a TextMorph(932412) . a TextMorph...etc... fullBounds: 23@48 corner: 663@528 color: (Color r: 0.825 g: 0.825 b: 0.825) extension: a MorphExtension (2902375) [sticky] [other: (creationDate -> 26 Se...etc... borderWidth: 1 borderColor: (Color r: 0.861 g: 1 b: 0.722) presenter: nil model: a MorphicModel2247(2217950) cursor: 1 padding: 3 backgroundMorph: nil turtleTrailsForm: nil turtlePen: nil lastTurtlePositions: nil isPartsBin: nil indicateCursor: nil wantsMouseOverHalos: nil worldState: nil griddingOn: nil ProjectViewMorph>>acceptDroppingMorph:event: Receiver: a ProjectViewMorph(3378337) Arguments and temporary variables: morphToDrop: a PasteUpMorph(3556218) evt: [384@639 dropEvent] myCopy: nil smallR: nil Receiver's instance variables: bounds: 237@582 corner: 527@750 owner: a SystemWindow(1423013) submorphs: {an AlignmentMorph(589206)} fullBounds: 237@582 corner: 527@750 color: Color blue extension: a MorphExtension (799113) [other: (layoutFrame -> a LayoutFrame) (l...etc... image: Form(290x168x32) project: a MorphicProject4 (Susanna) in a PasteUpMorph4(722271) [world] lastProjectThumbnail: Form(237x165x32) ProjectViewMorph(Morph)>>handleDropMorph: Receiver: a ProjectViewMorph(3378337) Arguments and temporary variables: anEvent: [384@639 dropEvent] aMorph: a PasteUpMorph(3556218) localPt: 382.0@896.0 Receiver's instance variables: bounds: 237@582 corner: 527@750 owner: a SystemWindow(1423013) submorphs: {an AlignmentMorph(589206)} fullBounds: 237@582 corner: 527@750 color: Color blue extension: a MorphExtension (799113) [other: (layoutFrame -> a LayoutFrame) (l...etc... image: Form(290x168x32) project: a MorphicProject4 (Susanna) in a PasteUpMorph4(722271) [world] lastProjectThumbnail: Form(237x165x32) DropEvent>>sentTo: Receiver: [384@639 dropEvent] Arguments and temporary variables: anObject: a ProjectViewMorph(3378337) Receiver's instance variables: timeStamp: nil source: a HandMorph(3246282) position: 384@639 contents: a PasteUpMorph(3556218) wasHandled: true ProjectViewMorph(Morph)>>handleEvent: Receiver: a ProjectViewMorph(3378337) Arguments and temporary variables: anEvent: [384@639 dropEvent] filteredEvent: [384@639 dropEvent] Receiver's instance variables: bounds: 237@582 corner: 527@750 owner: a SystemWindow(1423013) submorphs: {an AlignmentMorph(589206)} fullBounds: 237@582 corner: 527@750 color: Color blue extension: a MorphExtension (799113) [other: (layoutFrame -> a LayoutFrame) (l...etc... image: Form(290x168x32) project: a MorphicProject4 (Susanna) in a PasteUpMorph4(722271) [world] lastProjectThumbnail: Form(237x165x32) MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: Receiver: a MorphicEventDispatcher Arguments and temporary variables: anEvent: [384@639 dropEvent] aHandler: a ProjectViewMorph(3378337) aMorph: a ProjectViewMorph(3378337) result: #rejected filteredEvent: [384@639 dropEvent] Receiver's instance variables: lastType: #dropEvent lastDispatch: #dispatchDropEvent:with: MorphicEventDispatcher>>dispatchDropEvent:with: Receiver: a MorphicEventDispatcher Arguments and temporary variables: anEvent: [384@639 dropEvent] aMorph: a ProjectViewMorph(3378337) Receiver's instance variables: lastType: #dropEvent lastDispatch: #dispatchDropEvent:with: MorphicEventDispatcher>>dispatchEvent:with: Receiver: a MorphicEventDispatcher Arguments and temporary variables: anEvent: [384@639 dropEvent] aMorph: a ProjectViewMorph(3378337) Receiver's instance variables: lastType: #dropEvent lastDispatch: #dispatchDropEvent:with: ProjectViewMorph(Morph)>>processEvent:using: Receiver: a ProjectViewMorph(3378337) Arguments and temporary variables: anEvent: [384@639 dropEvent] defaultDispatcher: a MorphicEventDispatcher filteredEvent: [384@639 dropEvent] Receiver's instance variables: bounds: 237@582 corner: 527@750 owner: a SystemWindow(1423013) submorphs: {an AlignmentMorph(589206)} fullBounds: 237@582 corner: 527@750 color: Color blue extension: a MorphExtension (799113) [other: (layoutFrame -> a LayoutFrame) (l...etc... image: Form(290x168x32) project: a MorphicProject4 (Susanna) in a PasteUpMorph4(722271) [world] lastProjectThumbnail: Form(237x165x32) [] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: Receiver: a MorphicEventDispatcher Arguments and temporary variables: < Receiver's instance variables: lastType: #dropEvent lastDispatch: #dispatchDropEvent:with: Array(SequenceableCollection)>>do: Receiver: {a ProjectViewMorph(3378337) . an AlignmentMorph(668587) . a TopLeftGripMorph(1687623) . a...etc... Arguments and temporary variables: aBlock: [closure] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: index: 1 indexLimiT: 10 Receiver's instance variables: {a ProjectViewMorph(3378337) . an AlignmentMorph(668587) . a TopLeftGripMorph(1687623) . a...etc... SystemWindow(Morph)>>submorphsDo: Receiver: a SystemWindow(1423013) Arguments and temporary variables: aBlock: [closure] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: Receiver's instance variables: bounds: 232@555 corner: 532@755 owner: a PasteUpMorph4(3881707) [world] submorphs: {a ProjectViewMorph(3378337) . an AlignmentMorph(668587) . a TopLeftGripMorph...etc... fullBounds: 232@555 corner: 533@756 color: (Color r: 0.795 g: 0.795 b: 0.795) extension: a MorphExtension (1997163) [other: (layoutProperties -> a TableLayo...etc... borderWidth: 1 borderColor: (Color r: 0.495 g: 0.495 b: 0.495) model: a MorphicProject4 (Susanna) in a PasteUpMorph4(722271) [world] slotName: nil open: false labelString: 'Susanna' stripes: {a RectangleMorph(148868) . a RectangleMorph(2226645)} label: a StringMorph(407595)'Susanna' closeBox: a SystemWindowButton(3350927) collapseBox: a SystemWindowButton(3737571) paneMorphs: {a ProjectViewMorph(3378337)} paneRects: nil collapsedFrame: nil fullFrame: 232@555 corner: 532@755 isCollapsed: false isActive: true isLookingFocused: false menuBox: a SystemWindowButton(3485309) mustNotClose: false labelWidgetAllowance: 83 updatablePanes: #() allowReframeHandles: true labelArea: an AlignmentMorph(668587) expandBox: a SystemWindowButton(2744585) MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: Receiver: a MorphicEventDispatcher Arguments and temporary variables: < Receiver's instance variables: lastType: #dropEvent lastDispatch: #dispatchDropEvent:with: --- The full stack --- MorphicModel2247(Object)>>doesNotUnderstand: #copyUniClassWith: MorphicModel2247(Object)>>veryDeepCopyWith: MorphicModel2247(Morph)>>veryDeepCopyWith: PasteUpMorph(Object)>>veryDeepCopyWith: PasteUpMorph(Morph)>>veryDeepCopyWith: PasteUpMorph>>veryDeepCopyWith: PasteUpMorph(Object)>>veryDeepCopy ProjectViewMorph>>acceptDroppingMorph:event: ProjectViewMorph(Morph)>>handleDropMorph: DropEvent>>sentTo: ProjectViewMorph(Morph)>>handleEvent: MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: MorphicEventDispatcher>>dispatchDropEvent:with: MorphicEventDispatcher>>dispatchEvent:with: ProjectViewMorph(Morph)>>processEvent:using: [] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: Array(SequenceableCollection)>>do: SystemWindow(Morph)>>submorphsDo: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: MorphicEventDispatcher>>dispatchDropEvent:with: MorphicEventDispatcher>>dispatchEvent:with: SystemWindow(Morph)>>processEvent:using: [] in MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: Array(SequenceableCollection)>>do: PasteUpMorph4(Morph)>>submorphsDo: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: MorphicEventDispatcher>>dispatchDropEvent:with: MorphicEventDispatcher>>dispatchEvent:with: PasteUpMorph4(Morph)>>processEvent:using: [] in PasteUpMorph4(PasteUpMorph)>>processEvent:using: BlockClosure>>ensure: PasteUpMorph4(PasteUpMorph)>>processEvent:using: PasteUpMorph4(Morph)>>processEvent: [] in [] in [] in HandMorph>>sendEvent:focus:clear: BlockClosure>>ensure: DropEvent(MorphicEvent)>>becomeActiveDuring: [] in [] in HandMorph>>sendEvent:focus:clear: BlockClosure>>ensure: HandMorph>>becomeActiveDuring: [] in HandMorph>>sendEvent:focus:clear: BlockClosure>>ensure: PasteUpMorph4(PasteUpMorph)>>becomeActiveDuring: HandMorph>>sendEvent:focus:clear: HandMorph>>sendEvent:focus: [] in HandMorph>>dropMorph:event: BlockClosure>>ensure: HandMorph>>dropMorph:event: [] in HandMorph>>dropMorphs: Array(SequenceableCollection)>>reverseDo: HandMorph(Morph)>>submorphsReverseDo: HandMorph>>dropMorphs: HandMorph>>handleEvent: HandMorph>>processEvents [] in WorldState>>doOneCycleNowFor: Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph4(PasteUpMorph)>>doOneCycle -- and more not shown -- From commits at source.squeak.org Fri Oct 7 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 7 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161007215502.3344.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068994.html Name: UpdateStream-pre.8 Ancestors: UpdateStream-mt.7 Remove post method which was used in the MonticelloConfigurations tool ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/068995.html Name: EToys-eem.267 Ancestors: EToys-tfel.266 Remove an undeclared from cleanUpEtoysGarbage (make the reference to SkObject soft). ============================================= From wwokwilliam at gmail.com Sun Oct 9 21:40:59 2016 From: wwokwilliam at gmail.com (william341) Date: Sun Oct 9 21:47:50 2016 Subject: [squeak-dev] Algerion does NOT work on 5.1 Message-ID: <1476049259355-4918522.post@n4.nabble.com> Installation proceeds as usual, but on activation freezes until esc is pressed. When alt+space is pressed, nothing happens. No error or screen shows. -- View this message in context: http://forum.world.st/Algerion-does-NOT-work-on-5-1-tp4918522.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lists at fniephaus.com Sun Oct 9 21:56:21 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Sun Oct 9 21:56:36 2016 Subject: [squeak-dev] Algerion does NOT work on 5.1 In-Reply-To: <1476049259355-4918522.post@n4.nabble.com> References: <1476049259355-4918522.post@n4.nabble.com> Message-ID: On Sun, Oct 9, 2016 at 11:47 PM william341 wrote: > Installation proceeds as usual, but on activation freezes until esc is > pressed. When alt+space is pressed, nothing happens. No error or screen > shows. > You might want to give this one a try: https://github.com/HPI-SWA-Teaching/Algernon-Launcher Fabio > > > > -- > View this message in context: > http://forum.world.st/Algerion-does-NOT-work-on-5-1-tp4918522.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161009/a65b80e8/attachment.htm From slp5591 at me.com Mon Oct 10 17:13:08 2016 From: slp5591 at me.com (glenpaling) Date: Mon Oct 10 17:20:05 2016 Subject: [squeak-dev] Squeak Does Not Run on MAC OS Sierra Message-ID: <1476119588757-4918570.post@n4.nabble.com> I foolishly updated my Macs to the latest OS (Sierra) without checking for compatibility with Squeak. No recent (all Cog?) VMs will work. The VM launches but no window appears. The problem appears to be addressed in OpenSmalltalk macOS Sierra Support issue #39 (https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/39). It's marked as 'Closed'. Are there plans to include this fix in the official Squeak release? I see that I can download and build my own VM from the Open Smalltalk site but I've never done this before, it looks a little ominous.... Perhaps a note in Squeak News and on the Squeak website would help to warn other users that they will not be able to run Squeak if they upgrade their OS. Glen -- View this message in context: http://forum.world.st/Squeak-Does-Not-Run-on-MAC-OS-Sierra-tp4918570.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Mon Oct 10 17:56:41 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Oct 10 17:56:46 2016 Subject: [squeak-dev] Squeak Does Not Run on MAC OS Sierra In-Reply-To: <1476119588757-4918570.post@n4.nabble.com> References: <1476119588757-4918570.post@n4.nabble.com> Message-ID: Hi Glen, You can give the latest automatically built VM a try: https://bintray.com/opensmalltalk/vm/cog/201610042023#files It probably includes the fix for that issue, but it may have some other bugs. Levente On Mon, 10 Oct 2016, glenpaling wrote: > I foolishly updated my Macs to the latest OS (Sierra) without checking for > compatibility with Squeak. No recent (all Cog?) VMs will work. The VM > launches but no window appears. The problem appears to be addressed in > OpenSmalltalk macOS Sierra Support issue #39 > (https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/39). It's marked > as 'Closed'. Are there plans to include this fix in the official Squeak > release? > > I see that I can download and build my own VM from the Open Smalltalk site > but I've never done this before, it looks a little ominous.... > > Perhaps a note in Squeak News and on the Squeak website would help to warn > other users that they will not be able to run Squeak if they upgrade their > OS. > > Glen > > > > -- > View this message in context: http://forum.world.st/Squeak-Does-Not-Run-on-MAC-OS-Sierra-tp4918570.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From btc at openinworld.com Mon Oct 10 23:27:02 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Oct 10 23:27:26 2016 Subject: [squeak-dev] Squeak Does Not Run on MAC OS Sierra In-Reply-To: <1476119588757-4918570.post@n4.nabble.com> References: <1476119588757-4918570.post@n4.nabble.com> Message-ID: Pharo had the same problem, which users report as successfully fixed. However the last response I see says... > he has to copy it into /Applications because otherwise Sierra copy it into a sandbox (then it does not find sources). You can search 'Sierra' on forum.world.st for more info. cheers -ben On Tue, Oct 11, 2016 at 1:13 AM, glenpaling wrote: > I foolishly updated my Macs to the latest OS (Sierra) without checking for > compatibility with Squeak. No recent (all Cog?) VMs will work. The VM > launches but no window appears. The problem appears to be addressed in > OpenSmalltalk macOS Sierra Support issue #39 > (https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/39). It's marked > as 'Closed'. Are there plans to include this fix in the official Squeak > release? > > I see that I can download and build my own VM from the Open Smalltalk site > but I've never done this before, it looks a little ominous.... > > Perhaps a note in Squeak News and on the Squeak website would help to warn > other users that they will not be able to run Squeak if they upgrade their > OS. > > Glen > > > > -- > View this message in context: http://forum.world.st/Squeak-Does-Not-Run-on-MAC-OS-Sierra-tp4918570.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From giovanni at corriga.net Tue Oct 11 22:23:14 2016 From: giovanni at corriga.net (Giovanni Corriga) Date: Tue Oct 11 22:23:19 2016 Subject: [squeak-dev] UK Smalltalk User Group Meeting - Monday, October 24th Message-ID: Hi, The next meeting of the UK Smalltalk User Group Meeting will be on Monday, October 24th. We'll meet at our usual venue The Counting House (http://www.the-counting- house.com/) at 7pm. If you'd like to join us, you can just show up at the pub. You can also sign up in advance at the meeting's Meetup page: https://www.meetup.com/UKSTUG/events/233683243/ . Thanks, Giovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161011/53b53bc1/attachment.htm From commits at source.squeak.org Wed Oct 12 19:11:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 12 19:11:03 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1045.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1045.mcz ==================== Summary ==================== Name: Kernel-eem.1045 Author: eem Time: 12 October 2016, 12:10:33.006651 pm UUID: d91d38c6-bb5b-4fcd-a28b-1bdbc867a33e Ancestors: Kernel-nice.1044 Add support for creating DoubleByte (isShorts) and DoubleWord (isLongs) variable classes. =============== Diff against Kernel-nice.1044 =============== Item was changed: ----- Method: Behavior>>isBytes (in category 'testing') ----- isBytes + "Answer whether the receiver's instances have indexed 8-bit integer instance variables. - "Answer whether the receiver has 8-bit instance variables. Above Cog Spur the class format is <5 bits inst spec><16 bits inst size> where the 5-bit inst spec is 0 = 0 sized objects (UndefinedObject True False et al) 1 = non-indexable objects with inst vars (Point et al) 2 = indexable objects with no inst vars (Array et al) 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al) 4 = weak indexable objects with inst vars (WeakArray et al) 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron) 6 = unused 7 = immediates (SmallInteger, Character) 8 = unused 9 = 64-bit indexable 10-11 = 32-bit indexable (Bitmap) 12-15 = 16-bit indexable 16-23 = 8-bit indexable 24-31 = compiled methods (CompiledMethod)" ^self instSpec >= 16! Item was added: + ----- Method: Behavior>>isLongs (in category 'testing') ----- + isLongs + "Answer whether the receiver's instances have indexed 64-bit integer instance variables. + Above Cog Spur the class format is + <5 bits inst spec><16 bits inst size> + where the 5-bit inst spec is + 0 = 0 sized objects (UndefinedObject True False et al) + 1 = non-indexable objects with inst vars (Point et al) + 2 = indexable objects with no inst vars (Array et al) + 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al) + 4 = weak indexable objects with inst vars (WeakArray et al) + 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron) + 6 = unused + 7 = immediates (SmallInteger, Character) + 8 = unused + 9 = 64-bit indexable + 10-11 = 32-bit indexable (Bitmap) + 12-15 = 16-bit indexable + 16-23 = 8-bit indexable + 24-31 = compiled methods (CompiledMethod)" + ^self instSpec = 9! Item was added: + ----- Method: Behavior>>isShorts (in category 'testing') ----- + isShorts + "Answer whether the receiver's instances have indexed 16-bit integer instance variables. + Above Cog Spur the class format is + <5 bits inst spec><16 bits inst size> + where the 5-bit inst spec is + 0 = 0 sized objects (UndefinedObject True False et al) + 1 = non-indexable objects with inst vars (Point et al) + 2 = indexable objects with no inst vars (Array et al) + 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al) + 4 = weak indexable objects with inst vars (WeakArray et al) + 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron) + 6 = unused + 7 = immediates (SmallInteger, Character) + 8 = unused + 9 = 64-bit indexable + 10-11 = 32-bit indexable (Bitmap) + 12-15 = 16-bit indexable + 16-23 = 8-bit indexable + 24-31 = compiled methods (CompiledMethod)" + ^self instSpec = 12! Item was changed: ----- Method: Behavior>>isWords (in category 'testing') ----- isWords + "Answer whether the receiver's instances have indexed 32-bit integer instance variables. + Above Cog Spur the class format is + <5 bits inst spec><16 bits inst size> + where the 5-bit inst spec is + 0 = 0 sized objects (UndefinedObject True False et al) + 1 = non-indexable objects with inst vars (Point et al) + 2 = indexable objects with no inst vars (Array et al) + 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al) + 4 = weak indexable objects with inst vars (WeakArray et al) + 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron) + 6 = unused + 7 = immediates (SmallInteger, Character) + 8 = unused + 9 = 64-bit indexable + 10-11 = 32-bit indexable (Bitmap) + 12-15 = 16-bit indexable + 16-23 = 8-bit indexable + 24-31 = compiled methods (CompiledMethod)" + ^self instSpec = 10! - "Answer true if the receiver is made of 32-bit instance variables." - - ^self isBytes not! Item was changed: ----- Method: Class>>variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class (the receiver) in which the subclass is to + have indexable 8-bit byte-sized nonpointer variables." + ^ClassBuilder new - have indexable byte-sized nonpointer variables." - ^(ClassBuilder new) superclass: self variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s + category: cat! - category: cat - ! Item was changed: ----- Method: Class>>variableByteSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- variableByteSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class (the receiver) in which the subclass is to + have indexable 8-bit byte-sized nonpointer variables." - have indexable byte-sized nonpointer variables." | newClass copyOfOldClass | copyOfOldClass := self copy. newClass := self variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat. newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. SystemChangeNotifier uniqueInstance classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass! - ^newClass - ! Item was added: + ----- Method: Class>>variableDoubleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleByteSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable 16-bit double byte-sized nonpointer variables." + ^ClassBuilder new + superclass: self + variableDoubleByteSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: Class>>variableDoubleByteSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleByteSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable 16-bit double byte-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableDoubleByteSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable 64-bit word-sized nonpointer variables." + ^ClassBuilder new + superclass: self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable 64-bit word-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass! Item was changed: ----- Method: Class>>variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class (the receiver) in which the subclass is to + have indexable 32-bit word-sized nonpointer variables." + ^ClassBuilder new - have indexable word-sized nonpointer variables." - ^(ClassBuilder new) superclass: self variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s + category: cat! - category: cat - ! Item was changed: ----- Method: Class>>variableWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- variableWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class (the receiver) in which the subclass is to + have indexable 32-bit word-sized nonpointer variables." - have indexable word-sized nonpointer variables." | newClass copyOfOldClass | copyOfOldClass := self copy. newClass := self variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat. newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. SystemChangeNotifier uniqueInstance classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass ! - ^newClass - ! Item was changed: ----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass + variableByteSubclass: t instanceVariableNames: f - variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a subclass of an + existing class in which the subclass is to have indexable 8-bit byte-sized nonpointer variables." - "This is the standard initialization message for creating a new class as a - subclass of an existing class in which the subclass is to - have indexable byte-sized nonpointer variables." | oldClassOrNil actualType env | + aClass instSize > 0 - (aClass instSize > 0) ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. + (aClass isVariable and: [aClass isBytes not]) + ifTrue: [^self error: 'cannot make an 8-bit byte subclass of a class with 16, 32 or 64 bit fields']. - (aClass isVariable and: [aClass isWords]) - ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. oldClassOrNil := aClass environment at: t ifAbsent:[nil]. actualType := (oldClassOrNil notNil and: [oldClassOrNil typeOfClass == #compiledMethod]) ifTrue: [#compiledMethod] ifFalse: [#bytes]. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: actualType instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableDoubleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableDoubleByteSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a subclass of an + existing class in which the subclass is to have indexable 16-bit-sized nonpointer variables." + | oldClassOrNil env | + aClass instSize > 0 + ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. + (aClass isVariable and: [aClass isShorts not]) + ifTrue: [^self error: 'cannot make a 16-bit short subclass of a class with 8, 32 or 64 bit fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #shorts + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a subclass of an + existing class in which the subclass is to have indexable 16-bit-sized nonpointer variables." + | oldClassOrNil env | + aClass instSize > 0 + ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. + (aClass isVariable and: [aClass isLongs not]) + ifTrue: [^self error: 'cannot make a 64-bit long subclass of a class with 8, 16 or 32 bit fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #longs + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was changed: ----- Method: ClassBuilder>>superclass:variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a subclass of an + existing class in which the subclass is to have indexable 32-bit word-sized nonpointer variables." - "This is the standard initialization message for creating a new class as a - subclass of an existing class in which the subclass is to - have indexable word-sized nonpointer variables." | env | + aClass instSize > 0 - (aClass instSize > 0) ifTrue: [^self error: 'cannot make a word subclass of a class with named fields']. + (aClass isVariable and: [aClass isWords not]) + ifTrue: [^self error: 'cannot make a 32-bit word subclass of a class with 8, 16 or 64 bit fields']. - (aClass isVariable and: [aClass isBytes]) - ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields']. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: #words instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! From commits at source.squeak.org Wed Oct 12 21:55:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 12 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161012215501.7675.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068996.html Name: Kernel-eem.1045 Ancestors: Kernel-nice.1044 Add support for creating DoubleByte (isShorts) and DoubleWord (isLongs) variable classes. ============================================= From slp5591 at me.com Thu Oct 13 01:10:06 2016 From: slp5591 at me.com (glenpaling) Date: Thu Oct 13 01:17:17 2016 Subject: [squeak-dev] Re: Squeak Does Not Run on MAC OS Sierra In-Reply-To: References: <1476119588757-4918570.post@n4.nabble.com> Message-ID: <1476321006166-4918780.post@n4.nabble.com> Thanks Levente, that worked. Glen -- View this message in context: http://forum.world.st/Squeak-Does-Not-Run-on-MAC-OS-Sierra-tp4918570p4918780.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolas.cellier.aka.nice at gmail.com Thu Oct 13 18:26:11 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 13 18:26:15 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1045.mcz In-Reply-To: <57fe8acc.e613370a.230f3.6ee3SMTPIN_ADDED_MISSING@mx.google.com> References: <57fe8acc.e613370a.230f3.6ee3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Eliot, did you see related changes in inbox? 2016-10-12 21:10 GMT+02:00 : > Eliot Miranda uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-eem.1045.mcz > > ==================== Summary ==================== > > Name: Kernel-eem.1045 > Author: eem > Time: 12 October 2016, 12:10:33.006651 pm > UUID: d91d38c6-bb5b-4fcd-a28b-1bdbc867a33e > Ancestors: Kernel-nice.1044 > > Add support for creating DoubleByte (isShorts) and DoubleWord (isLongs) > variable classes. > > =============== Diff against Kernel-nice.1044 =============== > > Item was changed: > ----- Method: Behavior>>isBytes (in category 'testing') ----- > isBytes > + "Answer whether the receiver's instances have indexed 8-bit > integer instance variables. > - "Answer whether the receiver has 8-bit instance variables. > Above Cog Spur the class format is > <5 bits inst spec><16 bits inst size> > where the 5-bit inst spec is > 0 = 0 sized objects (UndefinedObject True > False et al) > 1 = non-indexable objects with inst vars > (Point et al) > 2 = indexable objects with no inst vars > (Array et al) > 3 = indexable objects with inst vars > (MethodContext AdditionalMethodState et al) > 4 = weak indexable objects with inst vars > (WeakArray et al) > 5 = weak non-indexable objects with inst > vars (ephemerons) (Ephemeron) > 6 = unused > 7 = immediates (SmallInteger, Character) > 8 = unused > 9 = 64-bit indexable > 10-11 = 32-bit indexable (Bitmap) > 12-15 = 16-bit indexable > 16-23 = 8-bit indexable > 24-31 = compiled methods (CompiledMethod)" > ^self instSpec >= 16! > > Item was added: > + ----- Method: Behavior>>isLongs (in category 'testing') ----- > + isLongs > + "Answer whether the receiver's instances have indexed 64-bit > integer instance variables. > + Above Cog Spur the class format is > + <5 bits inst spec><16 bits inst size> > + where the 5-bit inst spec is > + 0 = 0 sized objects (UndefinedObject True > False et al) > + 1 = non-indexable objects with inst vars > (Point et al) > + 2 = indexable objects with no inst vars > (Array et al) > + 3 = indexable objects with inst vars > (MethodContext AdditionalMethodState et al) > + 4 = weak indexable objects with inst vars > (WeakArray et al) > + 5 = weak non-indexable objects with inst > vars (ephemerons) (Ephemeron) > + 6 = unused > + 7 = immediates (SmallInteger, Character) > + 8 = unused > + 9 = 64-bit indexable > + 10-11 = 32-bit indexable (Bitmap) > + 12-15 = 16-bit indexable > + 16-23 = 8-bit indexable > + 24-31 = compiled methods (CompiledMethod)" > + ^self instSpec = 9! > > Item was added: > + ----- Method: Behavior>>isShorts (in category 'testing') ----- > + isShorts > + "Answer whether the receiver's instances have indexed 16-bit > integer instance variables. > + Above Cog Spur the class format is > + <5 bits inst spec><16 bits inst size> > + where the 5-bit inst spec is > + 0 = 0 sized objects (UndefinedObject True > False et al) > + 1 = non-indexable objects with inst vars > (Point et al) > + 2 = indexable objects with no inst vars > (Array et al) > + 3 = indexable objects with inst vars > (MethodContext AdditionalMethodState et al) > + 4 = weak indexable objects with inst vars > (WeakArray et al) > + 5 = weak non-indexable objects with inst > vars (ephemerons) (Ephemeron) > + 6 = unused > + 7 = immediates (SmallInteger, Character) > + 8 = unused > + 9 = 64-bit indexable > + 10-11 = 32-bit indexable (Bitmap) > + 12-15 = 16-bit indexable > + 16-23 = 8-bit indexable > + 24-31 = compiled methods (CompiledMethod)" > + ^self instSpec = 12! > > Item was changed: > ----- Method: Behavior>>isWords (in category 'testing') ----- > isWords > + "Answer whether the receiver's instances have indexed 32-bit > integer instance variables. > + Above Cog Spur the class format is > + <5 bits inst spec><16 bits inst size> > + where the 5-bit inst spec is > + 0 = 0 sized objects (UndefinedObject True > False et al) > + 1 = non-indexable objects with inst vars > (Point et al) > + 2 = indexable objects with no inst vars > (Array et al) > + 3 = indexable objects with inst vars > (MethodContext AdditionalMethodState et al) > + 4 = weak indexable objects with inst vars > (WeakArray et al) > + 5 = weak non-indexable objects with inst > vars (ephemerons) (Ephemeron) > + 6 = unused > + 7 = immediates (SmallInteger, Character) > + 8 = unused > + 9 = 64-bit indexable > + 10-11 = 32-bit indexable (Bitmap) > + 12-15 = 16-bit indexable > + 16-23 = 8-bit indexable > + 24-31 = compiled methods (CompiledMethod)" > + ^self instSpec = 10! > - "Answer true if the receiver is made of 32-bit instance variables." > - > - ^self isBytes not! > > Item was changed: > ----- Method: Class>>variableByteSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > variableByteSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 8-bit byte-sized nonpointer variables." > + ^ClassBuilder new > - have indexable byte-sized nonpointer variables." > - ^(ClassBuilder new) > superclass: self > variableByteSubclass: t > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > + category: cat! > - category: cat > - ! > > Item was changed: > ----- Method: Class>>variableByteSubclass:uses:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > variableByteSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 8-bit byte-sized nonpointer variables." > - have indexable byte-sized nonpointer variables." > > | newClass copyOfOldClass | > copyOfOldClass := self copy. > newClass := self > variableByteSubclass: t > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat. > > newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > SystemChangeNotifier uniqueInstance > classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass! > - ^newClass > - ! > > Item was added: > + ----- Method: Class>>variableDoubleByteSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > + variableDoubleByteSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 16-bit double byte-sized nonpointer variables." > + ^ClassBuilder new > + superclass: self > + variableDoubleByteSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was added: > + ----- Method: Class>>variableDoubleByteSubclass: > uses:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'subclass creation') ----- > + variableDoubleByteSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 16-bit double byte-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableDoubleByteSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 64-bit word-sized nonpointer variables." > + ^ClassBuilder new > + superclass: self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass: > uses:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'subclass creation') ----- > + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 64-bit word-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass! > > Item was changed: > ----- Method: Class>>variableWordSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > variableWordSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 32-bit word-sized nonpointer variables." > + ^ClassBuilder new > - have indexable word-sized nonpointer variables." > - ^(ClassBuilder new) > superclass: self > variableWordSubclass: t > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > + category: cat! > - category: cat > - ! > > Item was changed: > ----- Method: Class>>variableWordSubclass:uses:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > variableWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class (the receiver) in which the subclass > is to > + have indexable 32-bit word-sized nonpointer variables." > - have indexable word-sized nonpointer variables." > > | newClass copyOfOldClass | > copyOfOldClass := self copy. > newClass := self > variableWordSubclass: t > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat. > > newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > SystemChangeNotifier uniqueInstance > classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass ! > - ^newClass > - ! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableByteSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > superclass: aClass > + variableByteSubclass: t instanceVariableNames: f > - variableByteSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a subclass of an > + existing class in which the subclass is to have indexable 8-bit > byte-sized nonpointer variables." > - "This is the standard initialization message for creating a new > class as a > - subclass of an existing class in which the subclass is to > - have indexable byte-sized nonpointer variables." > | oldClassOrNil actualType env | > + aClass instSize > 0 > - (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a byte subclass of a > class with named fields']. > + (aClass isVariable and: [aClass isBytes not]) > + ifTrue: [^self error: 'cannot make an 8-bit byte subclass > of a class with 16, 32 or 64 bit fields']. > - (aClass isVariable and: [aClass isWords]) > - ifTrue: [^self error: 'cannot make a byte subclass of a > class with word fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a byte subclass of a > class with pointer fields']. > oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > actualType := (oldClassOrNil notNil > and: [oldClassOrNil typeOfClass == > #compiledMethod]) > ifTrue: [#compiledMethod] > ifFalse: [#bytes]. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: actualType > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableDoubleByteSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > + superclass: aClass > + variableDoubleByteSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a subclass of an > + existing class in which the subclass is to have indexable > 16-bit-sized nonpointer variables." > + | oldClassOrNil env | > + aClass instSize > 0 > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with named fields']. > + (aClass isVariable and: [aClass isShorts not]) > + ifTrue: [^self error: 'cannot make a 16-bit short subclass > of a class with 8, 32 or 64 bit fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with pointer fields']. > + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #shorts > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > + superclass: aClass > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a subclass of an > + existing class in which the subclass is to have indexable > 16-bit-sized nonpointer variables." > + | oldClassOrNil env | > + aClass instSize > 0 > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with named fields']. > + (aClass isVariable and: [aClass isLongs not]) > + ifTrue: [^self error: 'cannot make a 64-bit long subclass > of a class with 8, 16 or 32 bit fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with pointer fields']. > + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #longs > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableWordSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > superclass: aClass > variableWordSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a subclass of an > + existing class in which the subclass is to have indexable 32-bit > word-sized nonpointer variables." > - "This is the standard initialization message for creating a new > class as a > - subclass of an existing class in which the subclass is to > - have indexable word-sized nonpointer variables." > | env | > + aClass instSize > 0 > - (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a word subclass of a > class with named fields']. > + (aClass isVariable and: [aClass isWords not]) > + ifTrue: [^self error: 'cannot make a 32-bit word subclass > of a class with 8, 16 or 64 bit fields']. > - (aClass isVariable and: [aClass isBytes]) > - ifTrue: [^self error: 'cannot make a word subclass of a > class with byte fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a word subclass of a > class with pointer fields']. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: #words > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161013/d66b9be4/attachment-0001.htm From eliot.miranda at gmail.com Thu Oct 13 22:15:28 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 13 22:15:31 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1045.mcz In-Reply-To: References: <57fe8acc.e613370a.230f3.6ee3SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Thanks for the heads up, Nicolas, I hadn't noticed. I'll merge asap. On Thu, Oct 13, 2016 at 11:26 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > Hi Eliot, > did you see related changes in inbox? > > 2016-10-12 21:10 GMT+02:00 : > >> Eliot Miranda uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-eem.1045.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-eem.1045 >> Author: eem >> Time: 12 October 2016, 12:10:33.006651 pm >> UUID: d91d38c6-bb5b-4fcd-a28b-1bdbc867a33e >> Ancestors: Kernel-nice.1044 >> >> Add support for creating DoubleByte (isShorts) and DoubleWord (isLongs) >> variable classes. >> >> =============== Diff against Kernel-nice.1044 =============== >> >> Item was changed: >> ----- Method: Behavior>>isBytes (in category 'testing') ----- >> isBytes >> + "Answer whether the receiver's instances have indexed 8-bit >> integer instance variables. >> - "Answer whether the receiver has 8-bit instance variables. >> Above Cog Spur the class format is >> <5 bits inst spec><16 bits inst size> >> where the 5-bit inst spec is >> 0 = 0 sized objects (UndefinedObject True >> False et al) >> 1 = non-indexable objects with inst vars >> (Point et al) >> 2 = indexable objects with no inst vars >> (Array et al) >> 3 = indexable objects with inst vars >> (MethodContext AdditionalMethodState et al) >> 4 = weak indexable objects with inst vars >> (WeakArray et al) >> 5 = weak non-indexable objects with inst >> vars (ephemerons) (Ephemeron) >> 6 = unused >> 7 = immediates (SmallInteger, Character) >> 8 = unused >> 9 = 64-bit indexable >> 10-11 = 32-bit indexable (Bitmap) >> 12-15 = 16-bit indexable >> 16-23 = 8-bit indexable >> 24-31 = compiled methods (CompiledMethod)" >> ^self instSpec >= 16! >> >> Item was added: >> + ----- Method: Behavior>>isLongs (in category 'testing') ----- >> + isLongs >> + "Answer whether the receiver's instances have indexed 64-bit >> integer instance variables. >> + Above Cog Spur the class format is >> + <5 bits inst spec><16 bits inst size> >> + where the 5-bit inst spec is >> + 0 = 0 sized objects (UndefinedObject True >> False et al) >> + 1 = non-indexable objects with inst vars >> (Point et al) >> + 2 = indexable objects with no inst vars >> (Array et al) >> + 3 = indexable objects with inst vars >> (MethodContext AdditionalMethodState et al) >> + 4 = weak indexable objects with inst vars >> (WeakArray et al) >> + 5 = weak non-indexable objects with inst >> vars (ephemerons) (Ephemeron) >> + 6 = unused >> + 7 = immediates (SmallInteger, Character) >> + 8 = unused >> + 9 = 64-bit indexable >> + 10-11 = 32-bit indexable (Bitmap) >> + 12-15 = 16-bit indexable >> + 16-23 = 8-bit indexable >> + 24-31 = compiled methods (CompiledMethod)" >> + ^self instSpec = 9! >> >> Item was added: >> + ----- Method: Behavior>>isShorts (in category 'testing') ----- >> + isShorts >> + "Answer whether the receiver's instances have indexed 16-bit >> integer instance variables. >> + Above Cog Spur the class format is >> + <5 bits inst spec><16 bits inst size> >> + where the 5-bit inst spec is >> + 0 = 0 sized objects (UndefinedObject True >> False et al) >> + 1 = non-indexable objects with inst vars >> (Point et al) >> + 2 = indexable objects with no inst vars >> (Array et al) >> + 3 = indexable objects with inst vars >> (MethodContext AdditionalMethodState et al) >> + 4 = weak indexable objects with inst vars >> (WeakArray et al) >> + 5 = weak non-indexable objects with inst >> vars (ephemerons) (Ephemeron) >> + 6 = unused >> + 7 = immediates (SmallInteger, Character) >> + 8 = unused >> + 9 = 64-bit indexable >> + 10-11 = 32-bit indexable (Bitmap) >> + 12-15 = 16-bit indexable >> + 16-23 = 8-bit indexable >> + 24-31 = compiled methods (CompiledMethod)" >> + ^self instSpec = 12! >> >> Item was changed: >> ----- Method: Behavior>>isWords (in category 'testing') ----- >> isWords >> + "Answer whether the receiver's instances have indexed 32-bit >> integer instance variables. >> + Above Cog Spur the class format is >> + <5 bits inst spec><16 bits inst size> >> + where the 5-bit inst spec is >> + 0 = 0 sized objects (UndefinedObject True >> False et al) >> + 1 = non-indexable objects with inst vars >> (Point et al) >> + 2 = indexable objects with no inst vars >> (Array et al) >> + 3 = indexable objects with inst vars >> (MethodContext AdditionalMethodState et al) >> + 4 = weak indexable objects with inst vars >> (WeakArray et al) >> + 5 = weak non-indexable objects with inst >> vars (ephemerons) (Ephemeron) >> + 6 = unused >> + 7 = immediates (SmallInteger, Character) >> + 8 = unused >> + 9 = 64-bit indexable >> + 10-11 = 32-bit indexable (Bitmap) >> + 12-15 = 16-bit indexable >> + 16-23 = 8-bit indexable >> + 24-31 = compiled methods (CompiledMethod)" >> + ^self instSpec = 10! >> - "Answer true if the receiver is made of 32-bit instance >> variables." >> - >> - ^self isBytes not! >> >> Item was changed: >> ----- Method: Class>>variableByteSubclass:in >> stanceVariableNames:classVariableNames:poolDictionaries:category: (in >> category 'subclass creation') ----- >> variableByteSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 8-bit byte-sized nonpointer variables." >> + ^ClassBuilder new >> - have indexable byte-sized nonpointer variables." >> - ^(ClassBuilder new) >> superclass: self >> variableByteSubclass: t >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> + category: cat! >> - category: cat >> - ! >> >> Item was changed: >> ----- Method: Class>>variableByteSubclass:us >> es:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> variableByteSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 8-bit byte-sized nonpointer variables." >> - have indexable byte-sized nonpointer variables." >> >> | newClass copyOfOldClass | >> copyOfOldClass := self copy. >> newClass := self >> variableByteSubclass: t >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat. >> >> newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> SystemChangeNotifier uniqueInstance >> classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass! >> - ^newClass >> - ! >> >> Item was added: >> + ----- Method: Class>>variableDoubleByteSubcl >> ass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> + variableDoubleByteSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 16-bit double byte-sized nonpointer variables." >> + ^ClassBuilder new >> + superclass: self >> + variableDoubleByteSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was added: >> + ----- Method: Class>>variableDoubleByteSubclass:uses: >> instanceVariableNames:classVariableNames:poolDictionaries:category: (in >> category 'subclass creation') ----- >> + variableDoubleByteSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 16-bit double byte-sized nonpointer variables." >> + >> + | newClass copyOfOldClass | >> + copyOfOldClass := self copy. >> + newClass := self >> + variableDoubleByteSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat. >> + >> + newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> + SystemChangeNotifier uniqueInstance >> + classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass! >> >> Item was added: >> + ----- Method: Class>>variableDoubleWordSubcl >> ass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> + variableDoubleWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 64-bit word-sized nonpointer variables." >> + ^ClassBuilder new >> + superclass: self >> + variableDoubleWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was added: >> + ----- Method: Class>>variableDoubleWordSubclass:uses: >> instanceVariableNames:classVariableNames:poolDictionaries:category: (in >> category 'subclass creation') ----- >> + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 64-bit word-sized nonpointer variables." >> + >> + | newClass copyOfOldClass | >> + copyOfOldClass := self copy. >> + newClass := self >> + variableDoubleWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat. >> + >> + newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> + SystemChangeNotifier uniqueInstance >> + classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass! >> >> Item was changed: >> ----- Method: Class>>variableWordSubclass:in >> stanceVariableNames:classVariableNames:poolDictionaries:category: (in >> category 'subclass creation') ----- >> variableWordSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 32-bit word-sized nonpointer variables." >> + ^ClassBuilder new >> - have indexable word-sized nonpointer variables." >> - ^(ClassBuilder new) >> superclass: self >> variableWordSubclass: t >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> + category: cat! >> - category: cat >> - ! >> >> Item was changed: >> ----- Method: Class>>variableWordSubclass:us >> es:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> variableWordSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable 32-bit word-sized nonpointer variables." >> - have indexable word-sized nonpointer variables." >> >> | newClass copyOfOldClass | >> copyOfOldClass := self copy. >> newClass := self >> variableWordSubclass: t >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat. >> >> newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> SystemChangeNotifier uniqueInstance >> classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass ! >> - ^newClass >> - ! >> >> Item was changed: >> ----- Method: ClassBuilder>>superclass:varia >> bleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> superclass: aClass >> + variableByteSubclass: t instanceVariableNames: f >> - variableByteSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a subclass of an >> + existing class in which the subclass is to have indexable 8-bit >> byte-sized nonpointer variables." >> - "This is the standard initialization message for creating a new >> class as a >> - subclass of an existing class in which the subclass is to >> - have indexable byte-sized nonpointer variables." >> | oldClassOrNil actualType env | >> + aClass instSize > 0 >> - (aClass instSize > 0) >> ifTrue: [^self error: 'cannot make a byte subclass of a >> class with named fields']. >> + (aClass isVariable and: [aClass isBytes not]) >> + ifTrue: [^self error: 'cannot make an 8-bit byte subclass >> of a class with 16, 32 or 64 bit fields']. >> - (aClass isVariable and: [aClass isWords]) >> - ifTrue: [^self error: 'cannot make a byte subclass of a >> class with word fields']. >> (aClass isVariable and: [aClass isPointers]) >> ifTrue: [^self error: 'cannot make a byte subclass of a >> class with pointer fields']. >> oldClassOrNil := aClass environment at: t ifAbsent:[nil]. >> actualType := (oldClassOrNil notNil >> and: [oldClassOrNil typeOfClass == >> #compiledMethod]) >> ifTrue: [#compiledMethod] >> ifFalse: [#bytes]. >> env := CurrentEnvironment signal ifNil: [aClass environment]. >> ^self >> name: t >> inEnvironment: env >> subclassOf: aClass >> type: actualType >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat! >> >> Item was added: >> + ----- Method: ClassBuilder>>superclass:varia >> bleDoubleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> + superclass: aClass >> + variableDoubleByteSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a subclass of an >> + existing class in which the subclass is to have indexable >> 16-bit-sized nonpointer variables." >> + | oldClassOrNil env | >> + aClass instSize > 0 >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with named fields']. >> + (aClass isVariable and: [aClass isShorts not]) >> + ifTrue: [^self error: 'cannot make a 16-bit short >> subclass of a class with 8, 32 or 64 bit fields']. >> + (aClass isVariable and: [aClass isPointers]) >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with pointer fields']. >> + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. >> + env := CurrentEnvironment signal ifNil: [aClass environment]. >> + ^self >> + name: t >> + inEnvironment: env >> + subclassOf: aClass >> + type: #shorts >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was added: >> + ----- Method: ClassBuilder>>superclass:varia >> bleDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> + superclass: aClass >> + variableDoubleWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a subclass of an >> + existing class in which the subclass is to have indexable >> 16-bit-sized nonpointer variables." >> + | oldClassOrNil env | >> + aClass instSize > 0 >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with named fields']. >> + (aClass isVariable and: [aClass isLongs not]) >> + ifTrue: [^self error: 'cannot make a 64-bit long subclass >> of a class with 8, 16 or 32 bit fields']. >> + (aClass isVariable and: [aClass isPointers]) >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with pointer fields']. >> + oldClassOrNil := aClass environment at: t ifAbsent:[nil]. >> + env := CurrentEnvironment signal ifNil: [aClass environment]. >> + ^self >> + name: t >> + inEnvironment: env >> + subclassOf: aClass >> + type: #longs >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was changed: >> ----- Method: ClassBuilder>>superclass:varia >> bleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> superclass: aClass >> variableWordSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a subclass of an >> + existing class in which the subclass is to have indexable 32-bit >> word-sized nonpointer variables." >> - "This is the standard initialization message for creating a new >> class as a >> - subclass of an existing class in which the subclass is to >> - have indexable word-sized nonpointer variables." >> | env | >> + aClass instSize > 0 >> - (aClass instSize > 0) >> ifTrue: [^self error: 'cannot make a word subclass of a >> class with named fields']. >> + (aClass isVariable and: [aClass isWords not]) >> + ifTrue: [^self error: 'cannot make a 32-bit word subclass >> of a class with 8, 16 or 64 bit fields']. >> - (aClass isVariable and: [aClass isBytes]) >> - ifTrue: [^self error: 'cannot make a word subclass of a >> class with byte fields']. >> (aClass isVariable and: [aClass isPointers]) >> ifTrue: [^self error: 'cannot make a word subclass of a >> class with pointer fields']. >> env := CurrentEnvironment signal ifNil: [aClass environment]. >> ^self >> name: t >> inEnvironment: env >> subclassOf: aClass >> type: #words >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat! >> >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161013/59a2026d/attachment.htm From bstjean at yahoo.com Thu Oct 13 22:22:35 2016 From: bstjean at yahoo.com (Benoit St-Jean) Date: Thu Oct 13 22:22:38 2016 Subject: [squeak-dev] 64 bit integer arithmetic References: <982128025.602630.1476397355679.ref@mail.yahoo.com> Message-ID: <982128025.602630.1476397355679@mail.yahoo.com> I was wondering if the 64-bit VM (such as the one for Squeak 5.1) will support 64-bit integer arithmetic with primitives for positive integers.? Right now, 64 positive integers support bitwise operations but through code (LargePositiveInteger).? Any plan to move those calculations/operations to primitives to speed things up?? That would be so wonderful and nice for someone like me wanting to fully use a 64-bit architecture & Squeak/Cog/Pharo/Whatever/VM for a chess engine project!?----------------- Beno?t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161013/00042c41/attachment.htm From commits at source.squeak.org Thu Oct 13 23:14:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 13 23:14:54 2016 Subject: [squeak-dev] The Trunk: Collections-eem.717.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.717.mcz ==================== Summary ==================== Name: Collections-eem.717 Author: eem Time: 13 October 2016, 4:14:34.323953 pm UUID: ff6f9273-5077-47f9-b660-0cdd4b184bb1 Ancestors: Collections-dtl.716 Revise upwards the cross-over in SequenceableCollection>>atAllPut: at which point to move from a simple loop using at:put: to connivance using replaceFrom:to:with:startingAt:. Add a comment that includes the code to actually test this, instead of simply claiming without support. =============== Diff against Collections-dtl.716 =============== Item was changed: ----- Method: SequenceableCollection>>atAllPut: (in category 'accessing') ----- atAllPut: anObject "Put anObject at every one of the receiver's indices." | size | + (size := self size) > 50 "first method faster for larger sizes; see below" - (size := self size) > 26 "first method faster from 27 accesses and on" ifTrue: [self from: 1 to: size put: anObject] + ifFalse: [1 to: size do: [:index | self at: index put: anObject]] + + "Here's code to test what's a good cross over." + "(1 to: 3) collect: + [:j| + { Array. ByteArray. FloatArray. WordArray } collect: + [:class| | a e | + a := class new: 250. + e := a at: 1. + (1 to: a size) detect: + [:n| | t1 t2 | + t1 := [1 to: 1000 do: [:i| a from: 1 to: n put: e]] timeToRun. + t2 := [1 to: 1000 do: [:i| 1 to: n do: [:index | a at: index put: e]]] timeToRun. + t1 < t2]]]" + "32-bit Spur x86 #(#(69 54 9 63) #(64 52 10 55) #(63 53 9 61))" + "64-bit Spur x86-64 #(#(63 50 10 55) #(60 48 10 54) #(63 44 9 50))"! - ifFalse: [1 to: size do: [:index | self at: index put: anObject]]! From eliot.miranda at gmail.com Fri Oct 14 15:29:13 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 14 15:29:19 2016 Subject: [squeak-dev] Re: large images In-Reply-To: <7137FC96-B90B-4DE7-B45C-907173DBCE01@tudorgirba.com> References: <0933128d-c33e-d4c0-705a-b05f4ea2d4b8@refactoryworkers.com> <7137FC96-B90B-4DE7-B45C-907173DBCE01@tudorgirba.com> Message-ID: <1A734802-8408-42C0-8730-DCE94D67B55A@gmail.com> Hi Both, let me try again :-/ > On Oct 8, 2016, at 10:49 AM, Tudor Girba wrote: > > Nice! > > I put Eliot in CC :). > > @Eliot: John was playing with some large images and I asked him if he could save/load to see what happens. The report is below. Nice job :). > > Doru > > >> On Oct 8, 2016, at 7:48 PM, John Brant wrote: >> >> I loaded my model (6.8GiB on linux), saved the image (7.2GB), and started the image. It all worked. It took a few minutes to load the image, but it worked. It takes ~15 seconds to quit an image that large. I'm not sure what quit is doing, but it appears to be dependent on the image size. Regrettably the squeak vm does a full gc on snapshot, and then, unavoidably, it does a scan of all contexts in the heap, changing any with machine code pcs to have bytecode pcs so that the image can be restarted on a different version/platform. It then writes the heap segments to the file. I guess the scan could be folded into the gc. This is a long time to wait! The gc makes sense only as a way of voiding new space; image loading is simplified only having to load old space segments. It does /not/ make sense semantically because and finalization actions it triggers cannot be responded to until after the snapshot. Instead, it makes much more sense for the image to invoke a full gc immediately prior to snapshot, and drain the finalization queue (something I guess will happen implicitly due to finalization process priority). This means that expected finalization activities such as flushing and closing output files will actually take place. The existing architecture effectively throws these actions away. Both squeak and pharo communities could do well to discuss this and agree on an approach. >> >> >> John Brant > > -- > www.tudorgirba.com > www.feenk.com > > "Every thing has its own flow." > > > > > From eliot.miranda at gmail.com Fri Oct 14 18:13:52 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Oct 14 18:13:59 2016 Subject: [squeak-dev] name in various FooTheme class>>#createFoo methods Message-ID: Hi Marcel, I see the "name is shadowed" warning from methods such as CommunityTheme class>>#createDark "self createDark apply." | name | name := 'Community (dark)'. ^ (self named: name) in: [:theme | theme merge: (self named: 'Squeak') overwrite: true. theme name: name. "General morph stuff." theme ... and I thought to correct them but then thought that they don't need the name ten var at all, and hence realised they could be auto generated. Are they? Is it safe to edit them to rename name to e.g. themeName, or even to eliminate the temp var altogether? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161014/639ccfa2/attachment.htm From tim at rowledge.org Fri Oct 14 19:50:58 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Oct 14 19:51:03 2016 Subject: [squeak-dev] BorderedMorph initialisation, trackColorFrom: bug Message-ID: <88B26E1D-E5D6-4C1A-901C-A186A54DDC5A@rowledge.org> I?ve just been working out why the assorted Scratch dialogboxes seem to have lost the inset borders on all their string input submorphs. Since the #inset borderColor doesn?t actually create the border style stuff until rather later in the process, and trapping it in the wrong place whacks one with the emergency evaluator, this was fun. Like chewing on chocolate coated razor blades kind of fun. Anyway, so far as I can see there are two recent changes related to this in SimpleBorder a) #trackColorFrom: was altered to simplify it and now does nothing if ?baseColor? is non-nil. b) the #initialize method was altered to make baseColor default to transparent. Thus unless you explicitly set the base color in some fashion the prior behaviour of the border tracking the color of some morph in its owner chain is blocked. It also breaks the simple last example usage in the class comment since the resulting morph has not visible border. My solution is to just leave the baseColor out of the initialize method. That appears to make Scratch happy, doesn?t seem to cause any problem with any other usage I can spot and seems the right thing to do. Absent objections with accompanying good reasons I?ll push it out later on. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: JUM: Jeer at User's Mistake From nicolas.cellier.aka.nice at gmail.com Fri Oct 14 21:09:51 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Oct 14 21:09:54 2016 Subject: [squeak-dev] 64 bit integer arithmetic In-Reply-To: <982128025.602630.1476397355679@mail.yahoo.com> References: <982128025.602630.1476397355679.ref@mail.yahoo.com> <982128025.602630.1476397355679@mail.yahoo.com> Message-ID: But the 32bits VM is already dealing with 64 bits integers specially. Take + for example. SmallInteger>>+ calls primitive: 1 (that is primitiveAdd) LargePositiveInteger>>+ calls primitive: 21 (that is primitiveAddLargeIntegers) Integer>>+ call digitAdd: which calls primitive: 'primDigitAdd' module:'LargeIntegers' So what happens if you peform 1<<63+1 ? It calls primitive: 21 which is doing this: primitiveAddLargeIntegers "Primitive arithmetic operations for large integers in 64 bit range" | a b result oopResult aIsNegative bIsNegative resultIsNegative oopArg oopRcvr | oopArg := self stackValue: 0. oopRcvr := self stackValue: 1. aIsNegative := self isNegativeIntegerValueOf: oopRcvr. bIsNegative := self isNegativeIntegerValueOf: oopArg. a := self magnitude64BitValueOf: oopRcvr. b := self magnitude64BitValueOf: oopArg. self successful ifFalse:[^nil]. (aIsNegative = bIsNegative) ifTrue: ["Protect against overflow" a > (16rFFFFFFFFFFFFFFFF - b) ifTrue: [self primitiveFail. ^nil]. result := a + b. resultIsNegative := aIsNegative] ifFalse: [(a >= b) ifTrue: [result := a - b. resultIsNegative := aIsNegative] ifFalse: [result := b - a. resultIsNegative := bIsNegative]]. oopResult := self magnitude64BitIntegerFor: result neg: resultIsNegative. self successful ifTrue:[self pop: 2 thenPush: oopResult]. So you see, it just perform 64 bits arithmetic primitively. However, if you do 1+(1<<63), then you invoke: primitiveAdd self pop2AndPushIntegerIfOK: (self stackIntegerValue: 1) + (self stackIntegerValue: 0) That will fail because the argument is not a SmallInteger. Then you fallback to Integer>>+ which invokes digitAdd: The only thing that changes with 64bits spur VM is that SmallInteger have 61bits and can represent any int in ((1<<60) negated to: (1<<60-1)). So 1+(1<<59) would still be a SmallInteger, but the other examples above would run unchanged. 2016-10-14 0:22 GMT+02:00 Benoit St-Jean : > I was wondering if the 64-bit VM (such as the one for Squeak 5.1) will > support 64-bit integer arithmetic with primitives for positive integers. > Right now, 64 positive integers support bitwise operations but through code > (LargePositiveInteger). Any plan to move those calculations/operations to > primitives to speed things up? > > That would be so wonderful and nice for someone like me wanting to fully > use a 64-bit architecture & Squeak/Cog/Pharo/Whatever/VM for a chess engine > project! > > ----------------- > Beno?t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero". (A. Einstein) > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161014/085a5b06/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Oct 14 21:28:19 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Oct 14 21:28:24 2016 Subject: [squeak-dev] 64 bit integer arithmetic In-Reply-To: References: <982128025.602630.1476397355679.ref@mail.yahoo.com> <982128025.602630.1476397355679@mail.yahoo.com> Message-ID: Note that what I wrote for + is not exactly what's going on, because + has a special bytecode and would first invoke interpreter bytecodePrimAdd | rcvr arg result | rcvr := self internalStackValue: 1. arg := self internalStackValue: 0. (objectMemory areIntegers: rcvr and: arg) ifTrue: [result := (objectMemory integerValueOf: rcvr) + (objectMemory integerValueOf: arg). (objectMemory isIntegerValue: result) ifTrue: [self internalPop: 2 thenPush: (objectMemory integerObjectOf: result). ^ self fetchNextBytecode "success"]] ifFalse: [self initPrimCall. self externalizeIPandSP. self primitiveFloatAdd: rcvr toArg: arg. self internalizeIPandSP. self successful ifTrue: [^ self fetchNextBytecode "success"]]. messageSelector := self specialSelector: 0. argumentCount := 1. self normalSend And this is not accounting for JIT which is inlining some of those primitives: genPrimitiveAdd | jumpNotSI jumpOvfl | cogit mclassIsSmallInteger ifFalse: [^UnimplementedPrimitive]. cogit genLoadArgAtDepth: 0 into: Arg0Reg. cogit MoveR: Arg0Reg R: ClassReg. jumpNotSI := self genJumpNotSmallInteger: Arg0Reg scratchReg: TempReg. self genRemoveSmallIntegerTagsInScratchReg: ClassReg. cogit AddR: ReceiverResultReg R: ClassReg. jumpOvfl := cogit JumpOverflow: 0. cogit MoveR: ClassReg R: ReceiverResultReg. cogit genPrimReturn. jumpOvfl jmpTarget: (jumpNotSI jmpTarget: cogit Label). ^CompletePrimitive Or if you are after bit ops, here is an extract of the primitive table that is not currently used in the image: (34 primitiveBitAndLargeIntegers) (35 primitiveBitOrLargeIntegers) (36 primitiveBitXorLargeIntegers) So you might want to implement LargePositiveInteger>>bitAnd: arg ^super bitAnd: arg and see if it already speed things up for you. 2016-10-14 23:09 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > But the 32bits VM is already dealing with 64 bits integers specially. > Take + for example. > SmallInteger>>+ calls primitive: 1 (that is primitiveAdd) > LargePositiveInteger>>+ calls primitive: 21 (that is > primitiveAddLargeIntegers) > Integer>>+ call digitAdd: which calls primitive: 'primDigitAdd' > module:'LargeIntegers' > > So what happens if you peform 1<<63+1 ? > It calls primitive: 21 which is doing this: > primitiveAddLargeIntegers > "Primitive arithmetic operations for large integers in 64 bit range" > | a b result oopResult aIsNegative bIsNegative resultIsNegative oopArg > oopRcvr | > > > > > > oopArg := self stackValue: 0. > oopRcvr := self stackValue: 1. > aIsNegative := self isNegativeIntegerValueOf: oopRcvr. > bIsNegative := self isNegativeIntegerValueOf: oopArg. > a := self magnitude64BitValueOf: oopRcvr. > b := self magnitude64BitValueOf: oopArg. > self successful ifFalse:[^nil]. > (aIsNegative = bIsNegative) > ifTrue: > ["Protect against overflow" > a > (16rFFFFFFFFFFFFFFFF - b) ifTrue: [self primitiveFail. > ^nil]. > result := a + b. > resultIsNegative := aIsNegative] > ifFalse: > [(a >= b) > ifTrue: > [result := a - b. > resultIsNegative := aIsNegative] > ifFalse: > [result := b - a. > resultIsNegative := bIsNegative]]. > oopResult := self magnitude64BitIntegerFor: result neg: > resultIsNegative. > self successful ifTrue:[self pop: 2 thenPush: oopResult]. > > So you see, it just perform 64 bits arithmetic primitively. > > However, if you do 1+(1<<63), then you invoke: > primitiveAdd > > self pop2AndPushIntegerIfOK: (self stackIntegerValue: 1) + (self > stackIntegerValue: 0) > > That will fail because the argument is not a SmallInteger. Then you > fallback to Integer>>+ which invokes digitAdd: > > The only thing that changes with 64bits spur VM is that SmallInteger have > 61bits and can represent any int in ((1<<60) negated to: (1<<60-1)). So > 1+(1<<59) would still be a SmallInteger, but the other examples above would > run unchanged. > > > > 2016-10-14 0:22 GMT+02:00 Benoit St-Jean : > >> I was wondering if the 64-bit VM (such as the one for Squeak 5.1) will >> support 64-bit integer arithmetic with primitives for positive integers. >> Right now, 64 positive integers support bitwise operations but through code >> (LargePositiveInteger). Any plan to move those calculations/operations to >> primitives to speed things up? >> >> That would be so wonderful and nice for someone like me wanting to fully >> use a 64-bit architecture & Squeak/Cog/Pharo/Whatever/VM for a chess engine >> project! >> >> ----------------- >> Beno?t St-Jean >> Yahoo! Messenger: bstjean >> Twitter: @BenLeChialeux >> Pinterest: benoitstjean >> Instagram: Chef_Benito >> IRC: lamneth >> Blogue: endormitoire.wordpress.com >> "A standpoint is an intellectual horizon of radius zero". (A. Einstein) >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161014/b98b3e20/attachment-0001.htm From commits at source.squeak.org Fri Oct 14 21:55:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Oct 14 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161014215501.24038.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068997.html Name: Collections-eem.717 Ancestors: Collections-dtl.716 Revise upwards the cross-over in SequenceableCollection>>atAllPut: at which point to move from a simple loop using at:put: to connivance using replaceFrom:to:with:startingAt:. Add a comment that includes the code to actually test this, instead of simply claiming without support. ============================================= From lewis at mail.msen.com Fri Oct 14 22:34:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 14 22:35:49 2016 Subject: [squeak-dev] Re: large images In-Reply-To: <1A734802-8408-42C0-8730-DCE94D67B55A@gmail.com> References: <0933128d-c33e-d4c0-705a-b05f4ea2d4b8@refactoryworkers.com> <7137FC96-B90B-4DE7-B45C-907173DBCE01@tudorgirba.com> <1A734802-8408-42C0-8730-DCE94D67B55A@gmail.com> Message-ID: <20161014223444.GA77395@shell.msen.com> Hi, Let's measure where the time is going before we fix it. I have saved V3 images of that size and more, and it takes a very long time to write the image file independent of any GC or finalization actions that need to happen. We should measure this on a large Spur image save, but I suspect that the dominant factor will turn out to be the time that it takes to flush all those gigabytes out to storage. Garbage collection and finalization actions might be just round-off error. Dave On Fri, Oct 14, 2016 at 08:29:13AM -0700, Eliot Miranda wrote: > Hi Both, > > let me try again :-/ > > > On Oct 8, 2016, at 10:49 AM, Tudor Girba wrote: > > > > Nice! > > > > I put Eliot in CC :). > > > > @Eliot: John was playing with some large images and I asked him if he could save/load to see what happens. The report is below. Nice job :). > > > > Doru > > > > > >> On Oct 8, 2016, at 7:48 PM, John Brant wrote: > >> > >> I loaded my model (6.8GiB on linux), saved the image (7.2GB), and started the image. It all worked. It took a few minutes to load the image, but it worked. It takes ~15 seconds to quit an image that large. I'm not sure what quit is doing, but it appears to be dependent on the image size. > > Regrettably the squeak vm does a full gc on snapshot, and then, unavoidably, it does a scan of all contexts in the heap, changing any with machine code pcs to have bytecode pcs so that the image can be restarted on a different version/platform. It then writes the heap segments to the file. > > I guess the scan could be folded into the gc. This is a long time to wait! > > The gc makes sense only as a way of voiding new space; image loading is simplified only having to load old space segments. It does /not/ make sense semantically because and finalization actions it triggers cannot be responded to until after the snapshot. > > Instead, it makes much more sense for the image to invoke a full gc immediately prior to snapshot, and drain the finalization queue (something I guess will happen implicitly due to finalization process priority). This means that expected finalization activities such as flushing and closing output files will actually take place. The existing architecture effectively throws these actions away. > > Both squeak and pharo communities could do well to discuss this and agree on an approach. > > > >> > >> > >> John Brant > > > > -- > > www.tudorgirba.com > > www.feenk.com > > > > "Every thing has its own flow." > > > > > > > > > > From bstjean at yahoo.com Fri Oct 14 22:41:39 2016 From: bstjean at yahoo.com (Benoit St-Jean) Date: Fri Oct 14 22:41:49 2016 Subject: [squeak-dev] 64 bit integer arithmetic In-Reply-To: References: <982128025.602630.1476397355679.ref@mail.yahoo.com> <982128025.602630.1476397355679@mail.yahoo.com> Message-ID: <1212769611.723241.1476484899939@mail.yahoo.com> But there are many instances, especially when dealing with bit manipulation, where there is a huge penalty.? On most occasions, SmallInteger are 3 times faster than LargePositiveInteger.? And in my very particular case (bitboards for a chess engine), using all 64 bits is a must. To clearly see my problem, try this : | n timeSmall timeLarge | small1 := 1 << 59. small2 := 1 << 49. large1 := 1 << 60. large2 := 1 << 62. n := 100000000. timeSmall := Time millisecondsToRun: [n timesRepeat: [ small1 bitXor:? small2]]. timeLarge := Time millisecondsToRun: [n timesRepeat: [ large1 bitXor:? large2]]. Transcript cr;show: 'Time LargePositiveInteger : ', timeLarge printString. Transcript cr;show: 'Time SmallInteger : ', timeSmall printString. I get this result: Time LargePositiveInteger : 11028 Time SmallInteger : 3315?----------------- Beno?t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) From: Nicolas Cellier To: Benoit St-Jean ; The general-purpose Squeak developers list Sent: Friday, October 14, 2016 5:09 PM Subject: Re: [squeak-dev] 64 bit integer arithmetic But the 32bits VM is already dealing with 64 bits integers specially. Take + for example. SmallInteger>>+ calls primitive: 1 (that is primitiveAdd) LargePositiveInteger>>+ calls primitive: 21 (that is primitiveAddLargeIntegers) Integer>>+ call digitAdd: which calls primitive: 'primDigitAdd' module:'LargeIntegers' So what happens if you peform 1<<63+1 ? It calls primitive: 21 which is doing this: primitiveAddLargeIntegers ??? "Primitive arithmetic operations for large integers in 64 bit range" ??? | a b result oopResult aIsNegative bIsNegative resultIsNegative oopArg oopRcvr | ??? ??? ??? ??? ??? oopArg := self stackValue: 0. ??? oopRcvr := self stackValue: 1. ??? aIsNegative := self isNegativeIntegerValueOf: oopRcvr. ??? bIsNegative := self isNegativeIntegerValueOf: oopArg. ??? a := self magnitude64BitValueOf: oopRcvr. ??? b := self magnitude64BitValueOf: oopArg. ??? self successful ifFalse:[^nil]. ??? (aIsNegative = bIsNegative) ??? ??? ifTrue: ??? ??? ??? ["Protect against overflow" ??? ??? ??? a > (16rFFFFFFFFFFFFFFFF - b) ifTrue: [self primitiveFail. ^nil]. ??? ??? ??? result := a + b. ??? ??? ??? resultIsNegative := aIsNegative] ??? ??? ifFalse: ??? ??? ??? [(a >= b) ??? ??? ??? ??? ifTrue: ??? ??? ??? ??? ??? [result := a - b. ??? ??? ??? ??? ??? resultIsNegative := aIsNegative] ??? ??? ??? ??? ifFalse: ??? ??? ??? ??? ??? [result := b - a. ??? ??? ??? ??? ??? resultIsNegative := bIsNegative]]. ??? oopResult := self magnitude64BitIntegerFor: result neg: resultIsNegative. ??? self successful ifTrue:[self pop: 2 thenPush: oopResult]. So you see, it just perform 64 bits arithmetic primitively. However, if you do 1+(1<<63), then you invoke: primitiveAdd ??? self pop2AndPushIntegerIfOK: (self stackIntegerValue: 1) + (self stackIntegerValue: 0) That will fail because the argument is not a SmallInteger. Then you fallback to Integer>>+ which invokes digitAdd: The only thing that changes with 64bits spur VM is that SmallInteger have 61bits and can represent any int in ((1<<60) negated to: (1<<60-1)). So 1+(1<<59) would still be a SmallInteger, but the other examples above would run unchanged. 2016-10-14 0:22 GMT+02:00 Benoit St-Jean : I was wondering if the 64-bit VM (such as the one for Squeak 5.1) will support 64-bit integer arithmetic with primitives for positive integers.? Right now, 64 positive integers support bitwise operations but through code (LargePositiveInteger).? Any plan to move those calculations/operations to primitives to speed things up?? That would be so wonderful and nice for someone like me wanting to fully use a 64-bit architecture & Squeak/Cog/Pharo/Whatever/VM for a chess engine project!?----------------- Beno?t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161014/19ba97a0/attachment.htm From leves at caesar.elte.hu Sat Oct 15 09:37:23 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Oct 15 09:37:28 2016 Subject: [squeak-dev] name in various FooTheme class>>#createFoo methods In-Reply-To: References: Message-ID: On Fri, 14 Oct 2016, Eliot Miranda wrote: > Hi Marcel, > ? ? I see the "name is shadowed" warning from methods such as? > > CommunityTheme class>>#createDark > "self createDark apply." > | name | > name := 'Community (dark)'. > ^ (self named: name) in: [:theme | > theme merge: (self named: 'Squeak') overwrite: true. > theme name: name. > "General morph stuff." > theme > ... > > and I thought to correct them but then thought that they don't need the name ten var at all, and hence realised they could be auto generated.? Are > they?? Is it safe to edit them to rename name to e.g. themeName, or even to eliminate the temp var altogether? Totally irrelevant, but what's the point of using #in: when a temporary variable would do it? Levente > > _,,,^..^,,,_ > best,?Eliot > > From leves at caesar.elte.hu Sat Oct 15 09:59:33 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Oct 15 09:59:37 2016 Subject: [squeak-dev] 64 bit integer arithmetic In-Reply-To: <1212769611.723241.1476484899939@mail.yahoo.com> References: <982128025.602630.1476397355679.ref@mail.yahoo.com> <982128025.602630.1476397355679@mail.yahoo.com> <1212769611.723241.1476484899939@mail.yahoo.com> Message-ID: On Fri, 14 Oct 2016, Benoit St-Jean wrote: > But there are many instances, especially when dealing with bit manipulation, where there is a huge penalty.? On most occasions, SmallInteger are 3 > times faster than LargePositiveInteger.? And in my very particular case (bitboards for a chess engine), using all 64 bits is a must. > > > To clearly see my problem, try this : > > | n timeSmall timeLarge | > small1 := 1 << 59. > small2 := 1 << 49. > large1 := 1 << 60. > large2 := 1 << 62. > > n := 100000000. > timeSmall := Time millisecondsToRun: [n timesRepeat: [ small1 bitXor:? small2]]. > timeLarge := Time millisecondsToRun: [n timesRepeat: [ large1 bitXor:? large2]]. > Transcript cr;show: 'Time LargePositiveInteger : ', timeLarge printString. > Transcript cr;show: 'Time SmallInteger : ', timeSmall printString. You'd get more accurate results if you were to use an inlined loop (e.g 1 to: n do: [ :i | small1 bitXor: small2 ]). If you don't need such accuracy, then it's easier to use #bench. I did some quick measurements with the primitives suggested by Nicolas, and for example primitive 36 is 3.8 times quicker than primDigitBitXor for 64-bit LargePositiveIntegers. For larger ones primitive 36 becomes too slow. Perhaps the code of the two should be merged. I suspect that the performance of primDigitBitXor suffers from incomplete inlining because it's in a module. Levente > > I get this result: > > Time LargePositiveInteger : 11028 > Time SmallInteger : 3315 > ? > ----------------- > Beno?t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) > > > __________________________________________________________________________________________________________________________________________________ > From: Nicolas Cellier > To: Benoit St-Jean ; The general-purpose Squeak developers list > Sent: Friday, October 14, 2016 5:09 PM > Subject: Re: [squeak-dev] 64 bit integer arithmetic > > But the 32bits VM is already dealing with 64 bits integers specially. > Take + for example. > SmallInteger>>+ calls primitive: 1 (that is primitiveAdd) > LargePositiveInteger>>+ calls primitive: 21 (that is primitiveAddLargeIntegers) > Integer>>+ call digitAdd: which calls primitive: 'primDigitAdd' module:'LargeIntegers' > > So what happens if you peform 1<<63+1 ? > It calls primitive: 21 which is doing this: > primitiveAddLargeIntegers > ??? "Primitive arithmetic operations for large integers in 64 bit range" > ??? | a b result oopResult aIsNegative bIsNegative resultIsNegative oopArg oopRcvr | > ??? > ??? > ??? > ??? > > ??? oopArg := self stackValue: 0. > ??? oopRcvr := self stackValue: 1. > ??? aIsNegative := self isNegativeIntegerValueOf: oopRcvr. > ??? bIsNegative := self isNegativeIntegerValueOf: oopArg. > ??? a := self magnitude64BitValueOf: oopRcvr. > ??? b := self magnitude64BitValueOf: oopArg. > ??? self successful ifFalse:[^nil]. > ??? (aIsNegative = bIsNegative) > ??? ??? ifTrue: > ??? ??? ??? ["Protect against overflow" > ??? ??? ??? a > (16rFFFFFFFFFFFFFFFF - b) ifTrue: [self primitiveFail. ^nil]. > ??? ??? ??? result := a + b. > ??? ??? ??? resultIsNegative := aIsNegative] > ??? ??? ifFalse: > ??? ??? ??? [(a >= b) > ??? ??? ??? ??? ifTrue: > ??? ??? ??? ??? ??? [result := a - b. > ??? ??? ??? ??? ??? resultIsNegative := aIsNegative] > ??? ??? ??? ??? ifFalse: > ??? ??? ??? ??? ??? [result := b - a. > ??? ??? ??? ??? ??? resultIsNegative := bIsNegative]]. > ??? oopResult := self magnitude64BitIntegerFor: result neg: resultIsNegative. > ??? self successful ifTrue:[self pop: 2 thenPush: oopResult]. > > So you see, it just perform 64 bits arithmetic primitively. > > However, if you do 1+(1<<63), then you invoke: > primitiveAdd > > ??? self pop2AndPushIntegerIfOK: (self stackIntegerValue: 1) + (self stackIntegerValue: 0) > > That will fail because the argument is not a SmallInteger. Then you fallback to Integer>>+ which invokes digitAdd: > > The only thing that changes with 64bits spur VM is that SmallInteger have 61bits and can represent any int in ((1<<60) negated to: (1<<60-1)). So > 1+(1<<59) would still be a SmallInteger, but the other examples above would run unchanged. > > > > 2016-10-14 0:22 GMT+02:00 Benoit St-Jean : > I was wondering if the 64-bit VM (such as the one for Squeak 5.1) will support 64-bit integer arithmetic with primitives for positive > integers.? Right now, 64 positive integers support bitwise operations but through code (LargePositiveInteger).? Any plan to move those > calculations/operations to primitives to speed things up?? > > That would be so wonderful and nice for someone like me wanting to fully use a 64-bit architecture & Squeak/Cog/Pharo/Whatever/VM for a > chess engine project! > ? > ----------------- > Beno?t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero".? (A. Einstein) > > > > > > > > From asqueaker at gmail.com Sat Oct 15 16:03:53 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 15 16:04:36 2016 Subject: [squeak-dev] name in various FooTheme class>>#createFoo methods In-Reply-To: References: Message-ID: I used to use #in: a lot so my methods could be one elegant hierarchical expression. Then one day you changed one of my methods to do temporary assignment with comment that it creates a unncessary block activation which could slow down performance. That's when I stopped using #in:. I didn't realize there was a performance cost. On Sat, Oct 15, 2016 at 4:37 AM, Levente Uzonyi wrote: > On Fri, 14 Oct 2016, Eliot Miranda wrote: > >> Hi Marcel, >> I see the "name is shadowed" warning from methods such as >> >> CommunityTheme class>>#createDark >> "self createDark apply." >> | name | >> name := 'Community (dark)'. >> ^ (self named: name) in: [:theme | >> theme merge: (self named: 'Squeak') overwrite: true. >> theme name: name. >> "General morph stuff." >> theme >> ... >> >> and I thought to correct them but then thought that they don't need the >> name ten var at all, and hence realised they could be auto generated. Are >> they? Is it safe to edit them to rename name to e.g. themeName, or even >> to eliminate the temp var altogether? > > > Totally irrelevant, but what's the point of using #in: when a temporary > variable would do it? > > Levente > >> >> _,,,^..^,,,_ >> best, Eliot >> > > > From ken.squeak101 at yahoo.com Sat Oct 15 16:31:05 2016 From: ken.squeak101 at yahoo.com (ken.squeak101@yahoo.com) Date: Sat Oct 15 16:33:53 2016 Subject: [squeak-dev] Hello References: <76619333.271368.1476549065073.ref@mail.yahoo.com> Message-ID: <76619333.271368.1476549065073@mail.yahoo.com> Hello all! Taking some great advice, i created a new email to use with this list. This is also a test to see if anything goes through. Cheers,Ken -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161015/c9585fb7/attachment.htm From Das.Linux at gmx.de Sat Oct 15 17:12:44 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Oct 15 17:12:49 2016 Subject: [squeak-dev] name in various FooTheme class>>#createFoo methods In-Reply-To: References: Message-ID: <76C65E62-8C50-422B-B487-0B5401676CFC@gmx.de> On 15.10.2016, at 18:03, Chris Muller wrote: > I used to use #in: a lot so my methods could be one elegant > hierarchical expression. > > Then one day you changed one of my methods to do temporary assignment > with comment that it creates a unncessary block activation which could > slow down performance. > > That's when I stopped using #in:. I didn't realize there was a > performance cost. > Wouldn't it be great if there wasn't? Best regards -Tobias > > On Sat, Oct 15, 2016 at 4:37 AM, Levente Uzonyi wrote: >> On Fri, 14 Oct 2016, Eliot Miranda wrote: >> >>> Hi Marcel, >>> I see the "name is shadowed" warning from methods such as >>> >>> CommunityTheme class>>#createDark >>> "self createDark apply." >>> | name | >>> name := 'Community (dark)'. >>> ^ (self named: name) in: [:theme | >>> theme merge: (self named: 'Squeak') overwrite: true. >>> theme name: name. >>> "General morph stuff." >>> theme >>> ... >>> >>> and I thought to correct them but then thought that they don't need the >>> name ten var at all, and hence realised they could be auto generated. Are >>> they? Is it safe to edit them to rename name to e.g. themeName, or even >>> to eliminate the temp var altogether? >> >> >> Totally irrelevant, but what's the point of using #in: when a temporary >> variable would do it? >> >> Levente >> >>> >>> _,,,^..^,,,_ >>> best, Eliot >>> >> >> >> > From leves at caesar.elte.hu Sat Oct 15 21:11:01 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Oct 15 21:11:06 2016 Subject: [squeak-dev] name in various FooTheme class>>#createFoo methods In-Reply-To: <76C65E62-8C50-422B-B487-0B5401676CFC@gmx.de> References: <76C65E62-8C50-422B-B487-0B5401676CFC@gmx.de> Message-ID: On Sat, 15 Oct 2016, Tobias Pape wrote: > > On 15.10.2016, at 18:03, Chris Muller wrote: > >> I used to use #in: a lot so my methods could be one elegant >> hierarchical expression. >> >> Then one day you changed one of my methods to do temporary assignment >> with comment that it creates a unncessary block activation which could >> slow down performance. >> >> That's when I stopped using #in:. I didn't realize there was a >> performance cost. >> > > Wouldn't it be great if there wasn't? It would be nice, but that's hardly possible. But my point was that #in: here just makes the code harder to read. I just checked my Trunk image, and I found that it's full of similar uses of #in:. There are very few places where a temporary variable wouldn't be feasable. Levente > Best regards > -Tobias > >> >> On Sat, Oct 15, 2016 at 4:37 AM, Levente Uzonyi wrote: >>> On Fri, 14 Oct 2016, Eliot Miranda wrote: >>> >>>> Hi Marcel, >>>> I see the "name is shadowed" warning from methods such as >>>> >>>> CommunityTheme class>>#createDark >>>> "self createDark apply." >>>> | name | >>>> name := 'Community (dark)'. >>>> ^ (self named: name) in: [:theme | >>>> theme merge: (self named: 'Squeak') overwrite: true. >>>> theme name: name. >>>> "General morph stuff." >>>> theme >>>> ... >>>> >>>> and I thought to correct them but then thought that they don't need the >>>> name ten var at all, and hence realised they could be auto generated. Are >>>> they? Is it safe to edit them to rename name to e.g. themeName, or even >>>> to eliminate the temp var altogether? >>> >>> >>> Totally irrelevant, but what's the point of using #in: when a temporary >>> variable would do it? >>> >>> Levente >>> >>>> >>>> _,,,^..^,,,_ >>>> best, Eliot >>>> >>> >>> >>> >> > > > From robert.w.withers at gmail.com Sun Oct 16 23:22:04 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Sun Oct 16 23:22:07 2016 Subject: [squeak-dev] Announce: whisper updated Message-ID: <612f7bf3-aaf1-8f49-634f-6e6305658f86@gmail.com> Folks, I have updated whisper or SecureSession to provide Java/Squeak/Pharo interoperability. I am no longer able to access the Cryptography repo so I cannot push code, but the squeak/pharo code is in the squeak-pharo directory in the whisper github project. Here is the GitPages link: https://robertwithers.github.io/whisper, with all other links. whisper is osi Layer 5 SecureSession with modern crypto: Java/Squeak/Pharo interoperability. * flips normative osi layer 5 and 6 on its head: now, 5 is crypto and 6 is session state resumption * 3-way DH-2048/RSA-2048/RSAPublicKey ASN1DER encoding * 256-bit AES/CBC/PKCS7Padding, 128-bit IV, 160-bit SHA1 E&M * PBEEncryptorAES-256 with PBKDF2WithHmacSHA1 Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161016/5ab000b2/attachment.htm From bernhard at pieber.com Mon Oct 17 17:38:48 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Mon Oct 17 17:38:47 2016 Subject: [squeak-dev] Faster directory enumeration? Message-ID: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> Dear Squeakers, I want to count files with a certain extension in a folder recursively. Here is the code I use: | dir count runtime | count := 0. dir := FileDirectory on: '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. runtime := Time millisecondsToRun: [ dir directoryTreeDo: [:each | (each last name endsWith: '.emlx') ifTrue: [count := count + 1]]]. {count. runtime}. #(289747 66109) As you can see it finds 289.747 files and it takes about 66 seconds. Is there any faster way to do this given the current VM primitives? The reason I ask is that the equivalent Python code takes between 1.5 and 6 seconds. :-/ #!/usr/local/bin/python3 import os import time path = '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' print(path) start = time.time() emlx = 0 for dirpath, dirnames, filenames in os.walk(path): for filename in filenames: if filename.endswith('.emlx'): emlx += 1 runtime = time.time() - start print(emlx, runtime) It seems to have to do with an optimized os.scandir() function, described here: https://www.python.org/dev/peps/pep-0471/ Cheers, Bernhard From lewis at mail.msen.com Mon Oct 17 17:56:24 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Oct 17 17:56:25 2016 Subject: [squeak-dev] Faster directory enumeration? In-Reply-To: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> References: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> Message-ID: <42906.136.2.1.171.1476726984.squirrel@webmail.msen.com> It is probably far too bit-rotted to be of any use now, but here is what I came up with 15 years ago to improve this: http://wiki.squeak.org/squeak/2274 I did briefly look at this again a couple of years ago, and put the updates on SqueakSource. But I think I found that the directory primitives are nowhere near as big a win now as they were 15 years ago. Nevertheless it may still be of some interest. Dave > Dear Squeakers, > > I want to count files with a certain extension in a folder recursively. > Here is the code I use: > > | dir count runtime | > count := 0. > dir := FileDirectory on: > '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. > runtime := Time millisecondsToRun: [ > dir directoryTreeDo: [:each | > (each last name endsWith: '.emlx') ifTrue: [count := count + 1]]]. > {count. runtime}. #(289747 66109) > > As you can see it finds 289.747 files and it takes about 66 seconds. Is > there any faster way to do this given the current VM primitives? > > The reason I ask is that the equivalent Python code takes between 1.5 and > 6 seconds. :-/ > > #!/usr/local/bin/python3 > import os > import time > > path = > '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' > > print(path) > > start = time.time() > emlx = 0 > for dirpath, dirnames, filenames in os.walk(path): > for filename in filenames: > if filename.endswith('.emlx'): > emlx += 1 > > runtime = time.time() - start > > print(emlx, runtime) > > It seems to have to do with an optimized os.scandir() function, described > here: https://www.python.org/dev/peps/pep-0471/ > > Cheers, > Bernhard > > > From bernhard at pieber.com Mon Oct 17 18:35:32 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Mon Oct 17 18:35:32 2016 Subject: [squeak-dev] Faster directory enumeration? In-Reply-To: <42906.136.2.1.171.1476726984.squirrel@webmail.msen.com> References: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> <42906.136.2.1.171.1476726984.squirrel@webmail.msen.com> Message-ID: <1413D1C2-1099-4CF1-B639-9386A4337714@pieber.com> Hi Dave, Thanks for the answer. I guess I would need to build the latest version of the plugin myself, right? (I am on macOS Sierra.) I could load DirectoryPlugin. However, VMConstruction-Plugins-DirectoryPlugin needs InterpreterPlugin available. Bernhard > Am 17.10.2016 um 19:56 schrieb David T. Lewis : > > It is probably far too bit-rotted to be of any use now, but here is what I > came up with 15 years ago to improve this: > > http://wiki.squeak.org/squeak/2274 > > I did briefly look at this again a couple of years ago, and put the > updates on SqueakSource. But I think I found that the directory primitives > are nowhere near as big a win now as they were 15 years ago. Nevertheless > it may still be of some interest. > > Dave > >> Dear Squeakers, >> >> I want to count files with a certain extension in a folder recursively. >> Here is the code I use: >> >> | dir count runtime | >> count := 0. >> dir := FileDirectory on: >> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. >> runtime := Time millisecondsToRun: [ >> dir directoryTreeDo: [:each | >> (each last name endsWith: '.emlx') ifTrue: [count := count + 1]]]. >> {count. runtime}. #(289747 66109) >> >> As you can see it finds 289.747 files and it takes about 66 seconds. Is >> there any faster way to do this given the current VM primitives? >> >> The reason I ask is that the equivalent Python code takes between 1.5 and >> 6 seconds. :-/ >> >> #!/usr/local/bin/python3 >> import os >> import time >> >> path = >> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' >> >> print(path) >> >> start = time.time() >> emlx = 0 >> for dirpath, dirnames, filenames in os.walk(path): >> for filename in filenames: >> if filename.endswith('.emlx'): >> emlx += 1 >> >> runtime = time.time() - start >> >> print(emlx, runtime) >> >> It seems to have to do with an optimized os.scandir() function, described >> here: https://www.python.org/dev/peps/pep-0471/ >> >> Cheers, >> Bernhard >> >> >> > > > From commits at source.squeak.org Mon Oct 17 19:31:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 17 19:31:03 2016 Subject: [squeak-dev] The Trunk: Tools-eem.730.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.730.mcz ==================== Summary ==================== Name: Tools-eem.730 Author: eem Time: 17 October 2016, 12:29:51.991505 pm UUID: 34a02f77-e6db-4ae1-af45-dbf885667ebc Ancestors: Tools-tfel.729 Browser robustness when e.g. revert package removes a class definitioon and so self selectedClass evaluates to nil. =============== Diff against Tools-tfel.729 =============== Item was changed: ----- Method: Browser>>didCodeChangeElsewhere (in category 'self-updating') ----- didCodeChangeElsewhere + super didCodeChangeElsewhere ifTrue: + [^true]. + self classDefinitionIndicated ifFalse: + [^false]. + ^self metaClassIndicated + ifFalse: + [classDefinition ~= (self selectedClass ifNotNil: [:selectedClass| selectedClass definition])] + ifTrue: + [metaClassDefinition ~= (self selectedClass ifNotNil: [:selectedClass| selectedClass theMetaClass definition])]! - ^ super didCodeChangeElsewhere or: [self classDefinitionIndicated - and: [self metaClassIndicated - ifFalse: [classDefinition ~= self selectedClass definition] - ifTrue: [metaClassDefinition ~= self selectedClass theMetaClass definition]]]! From commits at source.squeak.org Mon Oct 17 19:48:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 17 19:48:44 2016 Subject: [squeak-dev] The Trunk: Monticello-eem.649.mcz Message-ID: Eliot Miranda uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-eem.649.mcz ==================== Summary ==================== Name: Monticello-eem.649 Author: eem Time: 17 October 2016, 12:48:18.49536 pm UUID: 0309f626-9ab4-43ee-a31e-031794753283 Ancestors: Monticello-mt.648 Fix Monticello for 16-bit and 64-bit integer arrays. =============== Diff against Monticello-mt.648 =============== Item was changed: ----- Method: MCClassDefinition>>kindOfSubclass (in category 'printing') ----- kindOfSubclass type = #normal ifTrue: [^' subclass: ']. type = #variable ifTrue: [^' variableSubclass: ']. type = #bytes ifTrue: [^' variableByteSubclass: ']. type = #compiledMethod ifTrue: [^' variableByteSubclass: ' ]. + type = #shorts ifTrue: [^' variableDoubleByteSubclass: ']. type = #words ifTrue: [^' variableWordSubclass: ']. + type = #longs ifTrue: [^' variableDoubleWordSubclass: ']. type = #weak ifTrue: [^' weakSubclass: ' ]. type = #ephemeron ifTrue: [^' ephemeronSubclass: ' ]. type = #immediate ifTrue: [^' immediateSubclass: ' ]. self error: 'Unrecognized class type' ! From lewis at mail.msen.com Mon Oct 17 20:17:32 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Oct 17 20:17:35 2016 Subject: [squeak-dev] Faster directory enumeration? In-Reply-To: <1413D1C2-1099-4CF1-B639-9386A4337714@pieber.com> References: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> <42906.136.2.1.171.1476726984.squirrel@webmail.msen.com> <1413D1C2-1099-4CF1-B639-9386A4337714@pieber.com> Message-ID: <52242.136.2.1.171.1476735452.squirrel@webmail.msen.com> Hi Bernhard, InterpreterPlugin is part of the VMMaker package, so you would need to be working in an image with VMMaker loaded (maybe one of the prepared image from Eliot's site). I should have checked my own notes before replying - I cannot explain the reason for this, but it seems that the readdir() primitives no longer provided any performance benefit when I tested them a couple of years ago. Here is what I wrote in the summary on http://www.squeaksource.com/DirectoryPlugin: Performance characteristics have changed significantly since Squeak circa 2003. The readdir() primitives no longer provide any benefit, but the file testing primitives still yield a couple orders of magnitude improvement for some functions. So ... I guess that some additional profiling would be in order. Dave > Hi Dave, > > Thanks for the answer. I guess I would need to build the latest version of > the plugin myself, right? (I am on macOS Sierra.) > > I could load DirectoryPlugin. However, > VMConstruction-Plugins-DirectoryPlugin needs InterpreterPlugin available. > > Bernhard > >> Am 17.10.2016 um 19:56 schrieb David T. Lewis : >> >> It is probably far too bit-rotted to be of any use now, but here is what >> I >> came up with 15 years ago to improve this: >> >> http://wiki.squeak.org/squeak/2274 >> >> I did briefly look at this again a couple of years ago, and put the >> updates on SqueakSource. But I think I found that the directory >> primitives >> are nowhere near as big a win now as they were 15 years ago. >> Nevertheless >> it may still be of some interest. >> >> Dave >> >>> Dear Squeakers, >>> >>> I want to count files with a certain extension in a folder recursively. >>> Here is the code I use: >>> >>> | dir count runtime | >>> count := 0. >>> dir := FileDirectory on: >>> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. >>> runtime := Time millisecondsToRun: [ >>> dir directoryTreeDo: [:each | >>> (each last name endsWith: '.emlx') ifTrue: [count := count + 1]]]. >>> {count. runtime}. #(289747 66109) >>> >>> As you can see it finds 289.747 files and it takes about 66 seconds. Is >>> there any faster way to do this given the current VM primitives? >>> >>> The reason I ask is that the equivalent Python code takes between 1.5 >>> and >>> 6 seconds. :-/ >>> >>> #!/usr/local/bin/python3 >>> import os >>> import time >>> >>> path = >>> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' >>> >>> print(path) >>> >>> start = time.time() >>> emlx = 0 >>> for dirpath, dirnames, filenames in os.walk(path): >>> for filename in filenames: >>> if filename.endswith('.emlx'): >>> emlx += 1 >>> >>> runtime = time.time() - start >>> >>> print(emlx, runtime) >>> >>> It seems to have to do with an optimized os.scandir() function, >>> described >>> here: https://www.python.org/dev/peps/pep-0471/ >>> >>> Cheers, >>> Bernhard >>> >>> >>> >> >> >> > > From eliot.miranda at gmail.com Mon Oct 17 21:19:24 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Oct 17 21:19:27 2016 Subject: [squeak-dev] Faster directory enumeration? In-Reply-To: <52242.136.2.1.171.1476735452.squirrel@webmail.msen.com> References: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> <42906.136.2.1.171.1476726984.squirrel@webmail.msen.com> <1413D1C2-1099-4CF1-B639-9386A4337714@pieber.com> <52242.136.2.1.171.1476735452.squirrel@webmail.msen.com> Message-ID: On Mon, Oct 17, 2016 at 1:17 PM, David T. Lewis wrote: > Hi Bernhard, > > InterpreterPlugin is part of the VMMaker package, so you would need to be > working in an image with VMMaker loaded (maybe one of the prepared image > from Eliot's site). > There aren't any. There is a script in the image subdirectory of http://www.github.com/opensmalltalk/vm which builds one; see image/buildspurtrunkvmmakerimage.sh I should have checked my own notes before replying - I cannot explain the > reason for this, but it seems that the readdir() primitives no longer > provided any performance benefit when I tested them a couple of years ago. > > Here is what I wrote in the summary on > http://www.squeaksource.com/DirectoryPlugin: > > Performance characteristics have changed significantly since Squeak circa > 2003. The readdir() primitives no longer provide any benefit, but the file > testing primitives still yield a couple orders of magnitude improvement > for some functions. > > > So ... I guess that some additional profiling would be in order. > > Dave > > > > Hi Dave, > > > > Thanks for the answer. I guess I would need to build the latest version > of > > the plugin myself, right? (I am on macOS Sierra.) > > > > I could load DirectoryPlugin. However, > > VMConstruction-Plugins-DirectoryPlugin needs InterpreterPlugin > available. > > > > Bernhard > > > >> Am 17.10.2016 um 19:56 schrieb David T. Lewis : > >> > >> It is probably far too bit-rotted to be of any use now, but here is what > >> I > >> came up with 15 years ago to improve this: > >> > >> http://wiki.squeak.org/squeak/2274 > >> > >> I did briefly look at this again a couple of years ago, and put the > >> updates on SqueakSource. But I think I found that the directory > >> primitives > >> are nowhere near as big a win now as they were 15 years ago. > >> Nevertheless > >> it may still be of some interest. > >> > >> Dave > >> > >>> Dear Squeakers, > >>> > >>> I want to count files with a certain extension in a folder recursively. > >>> Here is the code I use: > >>> > >>> | dir count runtime | > >>> count := 0. > >>> dir := FileDirectory on: > >>> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0- > E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. > >>> runtime := Time millisecondsToRun: [ > >>> dir directoryTreeDo: [:each | > >>> (each last name endsWith: '.emlx') ifTrue: [count := count > + 1]]]. > >>> {count. runtime}. #(289747 66109) > >>> > >>> As you can see it finds 289.747 files and it takes about 66 seconds. Is > >>> there any faster way to do this given the current VM primitives? > >>> > >>> The reason I ask is that the equivalent Python code takes between 1.5 > >>> and > >>> 6 seconds. :-/ > >>> > >>> #!/usr/local/bin/python3 > >>> import os > >>> import time > >>> > >>> path = > >>> '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0- > E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' > >>> > >>> print(path) > >>> > >>> start = time.time() > >>> emlx = 0 > >>> for dirpath, dirnames, filenames in os.walk(path): > >>> for filename in filenames: > >>> if filename.endswith('.emlx'): > >>> emlx += 1 > >>> > >>> runtime = time.time() - start > >>> > >>> print(emlx, runtime) > >>> > >>> It seems to have to do with an optimized os.scandir() function, > >>> described > >>> here: https://www.python.org/dev/peps/pep-0471/ > >>> > >>> Cheers, > >>> Bernhard > >>> > >>> > >>> > >> > >> > >> > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161017/0e99d736/attachment-0001.htm From commits at source.squeak.org Mon Oct 17 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Oct 17 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161017215502.6910.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/068998.html Name: Morphic-tpr.1312 Ancestors: Morphic-mt.1295, Morphic-tfel.1311 Setting the border's baseColor in SimpleBorder>>initialize prevents #trackColorFrom: ever working to set the border color to suit the owner morph. So don't default baseColor. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/068999.html Name: Tools-eem.730 Ancestors: Tools-tfel.729 Browser robustness when e.g. revert package removes a class definitioon and so self selectedClass evaluates to nil. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069000.html Name: Monticello-eem.649 Ancestors: Monticello-mt.648 Fix Monticello for 16-bit and 64-bit integer arrays. ============================================= From leves at caesar.elte.hu Mon Oct 17 23:30:41 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Oct 17 23:30:45 2016 Subject: [squeak-dev] Faster directory enumeration? In-Reply-To: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> References: <92AE7D8C-A54E-4DA9-94BF-76F857836678@pieber.com> Message-ID: The whole image-side code starting from #directoryTreeDo: could use some optimization, but that would only make it at most 1.5x faster. If I were you, I'd use OSProcess and execute this: find directory -name '*.exml' It's not that nice, but it shouldn't take more than a second to find the files. Levente On Mon, 17 Oct 2016, Bernhard Pieber wrote: > Dear Squeakers, > > I want to count files with a certain extension in a folder recursively. Here is the code I use: > > | dir count runtime | > count := 0. > dir := FileDirectory on: '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox'. > runtime := Time millisecondsToRun: [ > dir directoryTreeDo: [:each | > (each last name endsWith: '.emlx') ifTrue: [count := count + 1]]]. > {count. runtime}. #(289747 66109) > > As you can see it finds 289.747 files and it takes about 66 seconds. Is there any faster way to do this given the current VM primitives? > > The reason I ask is that the equivalent Python code takes between 1.5 and 6 seconds. :-/ > > #!/usr/local/bin/python3 > import os > import time > > path = '/Users/bernhard/Library/Mail/V4/D77E3582-7EBE-4B5A-BFE0-E30BF6AE995F/Smalltalk.mbox/Squeak.mbox' > > print(path) > > start = time.time() > emlx = 0 > for dirpath, dirnames, filenames in os.walk(path): > for filename in filenames: > if filename.endswith('.emlx'): > emlx += 1 > > runtime = time.time() - start > > print(emlx, runtime) > > It seems to have to do with an optimized os.scandir() function, described here: https://www.python.org/dev/peps/pep-0471/ > > Cheers, > Bernhard > > > > From robert.w.withers at gmail.com Tue Oct 18 00:46:12 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Tue Oct 18 00:46:13 2016 Subject: [squeak-dev] Wait, Squeak is a cat? Message-ID: http://www.ted.com/talks/rachel_botsman_the_currency_of_the_new_economy_is_trust :_) From casimiro.barreto at gmail.com Tue Oct 18 18:55:46 2016 From: casimiro.barreto at gmail.com (Casimiro de Almeida Barreto) Date: Tue Oct 18 18:55:53 2016 Subject: [squeak-dev] =?utf-8?q?Something_like_Woden_for_squeak_=28since_t?= =?utf-8?q?he_old_OpenGL_is_not_working_anymore=2E=2E=2E=29=C2=B7?= Message-ID: <0e4f2b73-e984-3770-1ce6-759cef56f26f@gmail.com> Is there something like Woden in squeak 5.1? OpenGL not working because B3DAccelerator is not build into current cogvm. Best regards, Casimiro -- The information contained in this message is confidential and intended to the recipients specified in the headers. If you received this message by error, notify the sender immediately. The unauthorized use, disclosure, copy or alteration of this message are strictly forbidden and subjected to civil and criminal sanctions. == This email may be signed using PGP key *ID: 0x4134A417* -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161018/e450c9d9/attachment.htm From robert.w.withers at gmail.com Tue Oct 18 20:43:04 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Tue Oct 18 20:43:04 2016 Subject: [squeak-dev] anyone with admin rights to squeaksource that can help me? Message-ID: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> I asked before if my password could be reset on squeaksource but I never heard anything back. Is anyone doing admin there or does anyone know who I could contact that may know or may be able to help me, off list? It would be beneficial to my effort. Kind regards, Rob From eliot.miranda at gmail.com Tue Oct 18 22:16:29 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 18 22:16:33 2016 Subject: =?UTF-8?Q?Re=3A_=5Bsqueak=2Ddev=5D_Something_like_Woden_for_squeak_=28si?= =?UTF-8?Q?nce_the_old_OpenGL_is_not_working_anymore=2E=2E=2E=29=C2=B7?= In-Reply-To: <0e4f2b73-e984-3770-1ce6-759cef56f26f@gmail.com> References: <0e4f2b73-e984-3770-1ce6-759cef56f26f@gmail.com> Message-ID: Hi Casimiro, On Tue, Oct 18, 2016 at 11:55 AM, Casimiro de Almeida Barreto < casimiro.barreto@gmail.com> wrote: > Is there something like Woden in squeak 5.1? OpenGL not working because > B3DAccelerator is not build into current cogvm. > Are you sure? These are my local builds (and read after): McStalker.oscogvm$ grep B3DAcce `findgit build.* -name plugins.*` build.linux32ARMv6/pharo.cog.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux32ARMv6/squeak.cog.spur/plugins.ext:#B3DAcceleratorPlugin \ build.linux32x86/pharo.cog.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.cog.spur.immutability/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.cog.v3/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.sista.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.stack.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux32x86/squeak.stack.v3/plugins.ext:B3DAcceleratorPlugin \ build.linux64x64/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ build.linux64x64/squeak.cog.spur.immutability/plugins.ext:B3DAcceleratorPlugin \ build.linux64x64/squeak.stack.spur/plugins.ext:B3DAcceleratorPlugin \ build.macos32x86/pharo.cog.spur/plugins.ext:# B3DAcceleratorPlugin \ build.macos32x86/pharo.stack.spur/plugins.ext:# B3DAcceleratorPlugin \ build.macos32x86/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ build.macos32x86/squeak.cog.spur+immutability/plugins.int:# B3DAcceleratorPlugin \ build.macos32x86/squeak.cog.v3/plugins.int:# B3DAcceleratorPlugin \ build.macos32x86/squeak.sista.spur/plugins.int:# B3DAcceleratorPlugin \ build.macos32x86/squeak.stack.spur/plugins.int:# B3DAcceleratorPlugin \ build.macos32x86/squeak.stack.v3/plugins.int:# B3DAcceleratorPlugin \ build.macos64x64/pharo.cog.spur/plugins.ext:# B3DAcceleratorPlugin \ build.macos64x64/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ build.macos64x64/squeak.cog.spur.immutability/plugins.int:# B3DAcceleratorPlugin \ build.macos64x64/squeak.sista.spur/plugins.int:# B3DAcceleratorPlugin \ build.macos64x64/squeak.stack.spur/plugins.int:# B3DAcceleratorPlugin \ build.win32x86/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin \ build.win32x86/squeak.cog.v3/plugins.int:B3DAcceleratorPlugin \ build.win32x86/squeak.stack.spur/plugins.int:B3DAcceleratorPlugin \ build.win32x86/squeak.stack.v3/plugins.int:B3DAcceleratorPlugin \ build.win64x64/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin \ build.win64x64/squeak.stack.spur/plugins.int:B3DAcceleratorPlugin \ McStalker.oscogvm$ find products/ -name 'B3*' products//assert/phcogspurlinux/lib/squeak/5.0-201610040118/B3DAcceleratorPlugin products//assert/phcogspurlinuxht/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//assert/phcogspurlinuxhtRPi/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//assert/sqcogspurlinuxht/lib/squeak/5.0-201610040118/B3DAcceleratorPlugin products//debug/phcogspurlinux/lib/squeak/5.0-201610040118/B3DAcceleratorPlugin products//debug/phcogspurlinuxht/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//debug/phcogspurlinuxhtRPi/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//debug/sqcogspurlinuxht/lib/squeak/5.0-201610040118/B3DAcceleratorPlugin products//phcogspurlinuxht/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//phcogspurlinuxhtRPi/lib/pharo/5.0-201610040118/B3DAcceleratorPlugin products//sqcogspurlinuxht/lib/squeak/5.0-201610040118/B3DAcceleratorPlugin So if the host build system is correctly configured the B3DAcceleratorPlugin is indeed built and included. Best regards, > > > Casimiro > > -- > The information contained in this message is confidential and intended to > the recipients specified in the headers. If you received this message by > error, notify the sender immediately. The unauthorized use, disclosure, > copy or alteration of this message are strictly forbidden and subjected to > civil and criminal sanctions. > > == > > This email may be signed using PGP key *ID: 0x4134A417* > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161018/4a414b17/attachment.htm From lewis at mail.msen.com Tue Oct 18 23:58:24 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 18 23:58:26 2016 Subject: [squeak-dev] anyone with admin rights to squeaksource that can help me? In-Reply-To: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> References: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> Message-ID: <20161018235824.GA3067@shell.msen.com> On Tue, Oct 18, 2016 at 04:43:04PM -0400, Robert Withers wrote: > I asked before if my password could be reset on squeaksource but I never > heard anything back. Is anyone doing admin there or does anyone know who > I could contact that may know or may be able to help me, off list? It > would be beneficial to my effort. > Hi Rob, It must have been lost in the email ether. I replied to your earlier request here: http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-September/191889.html Please check your inbox for private email from me on September 18 with the new password. If you don't have it, I can reset it again. Let me know, Dave From robert.w.withers at gmail.com Wed Oct 19 00:06:18 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Wed Oct 19 00:06:18 2016 Subject: [squeak-dev] anyone with admin rights to squeaksource that can help me? In-Reply-To: <20161018235824.GA3067@shell.msen.com> References: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> <20161018235824.GA3067@shell.msen.com> Message-ID: <55127d27-8b50-fe57-4fab-0b4cb602c682@gmail.com> Hi Dave, Yes, I am sorry to say I lost it with a recent undoable cleanup of my email account, including my trash folder. I was too aggressive. I get so many emails I must have overlooked it when I did so on 9/30. That would be super if you could reset it again. Thank you. Rob On 10/18/2016 7:58 PM, David T. Lewis wrote: > On Tue, Oct 18, 2016 at 04:43:04PM -0400, Robert Withers wrote: >> I asked before if my password could be reset on squeaksource but I never >> heard anything back. Is anyone doing admin there or does anyone know who >> I could contact that may know or may be able to help me, off list? It >> would be beneficial to my effort. >> > Hi Rob, > > It must have been lost in the email ether. I replied to your earlier request here: > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-September/191889.html > > Please check your inbox for private email from me on September 18 with the new > password. If you don't have it, I can reset it again. > > Let me know, > Dave > > From lewis at mail.msen.com Wed Oct 19 00:41:02 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Oct 19 00:41:06 2016 Subject: [squeak-dev] anyone with admin rights to squeaksource that can help me? In-Reply-To: <55127d27-8b50-fe57-4fab-0b4cb602c682@gmail.com> References: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> <20161018235824.GA3067@shell.msen.com> <55127d27-8b50-fe57-4fab-0b4cb602c682@gmail.com> Message-ID: <20161019004102.GB9681@shell.msen.com> New password sent in private email. Dave On Tue, Oct 18, 2016 at 08:06:18PM -0400, Robert Withers wrote: > Hi Dave, > > Yes, I am sorry to say I lost it with a recent undoable cleanup of my > email account, including my trash folder. I was too aggressive. I get so > many emails I must have overlooked it when I did so on 9/30. That would > be super if you could reset it again. > > Thank you. > > Rob > > > On 10/18/2016 7:58 PM, David T. Lewis wrote: > >On Tue, Oct 18, 2016 at 04:43:04PM -0400, Robert Withers wrote: > >>I asked before if my password could be reset on squeaksource but I never > >>heard anything back. Is anyone doing admin there or does anyone know who > >>I could contact that may know or may be able to help me, off list? It > >>would be beneficial to my effort. > >> > >Hi Rob, > > > >It must have been lost in the email ether. I replied to your earlier > >request here: > > > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-September/191889.html > > > >Please check your inbox for private email from me on September 18 with the > >new > >password. If you don't have it, I can reset it again. > > > >Let me know, > >Dave > > > > > From charlie.robbats at gmail.com Wed Oct 19 01:41:54 2016 From: charlie.robbats at gmail.com (Charlie Robbats) Date: Wed Oct 19 01:41:56 2016 Subject: [squeak-dev] anyone with admin rights to squeaksource that can help me? In-Reply-To: <20161019004102.GB9681@shell.msen.com> References: <5163cefc-b798-9f4d-b341-8c66d9af1fe7@gmail.com> <20161018235824.GA3067@shell.msen.com> <55127d27-8b50-fe57-4fab-0b4cb602c682@gmail.com> <20161019004102.GB9681@shell.msen.com> Message-ID: <62998828-1856-9aff-53ef-41a717a5180b@gmail.com> Thank you Dave On 10/18/2016 8:41 PM, David T. Lewis wrote: > New password sent in private email. > > Dave > > On Tue, Oct 18, 2016 at 08:06:18PM -0400, Robert Withers wrote: >> Hi Dave, >> >> Yes, I am sorry to say I lost it with a recent undoable cleanup of my >> email account, including my trash folder. I was too aggressive. I get so >> many emails I must have overlooked it when I did so on 9/30. That would >> be super if you could reset it again. >> >> Thank you. >> >> Rob >> >> >> On 10/18/2016 7:58 PM, David T. Lewis wrote: >>> On Tue, Oct 18, 2016 at 04:43:04PM -0400, Robert Withers wrote: >>>> I asked before if my password could be reset on squeaksource but I never >>>> heard anything back. Is anyone doing admin there or does anyone know who >>>> I could contact that may know or may be able to help me, off list? It >>>> would be beneficial to my effort. >>>> >>> Hi Rob, >>> >>> It must have been lost in the email ether. I replied to your earlier >>> request here: >>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-September/191889.html >>> >>> Please check your inbox for private email from me on September 18 with the >>> new >>> password. If you don't have it, I can reset it again. >>> >>> Let me know, >>> Dave >>> >>> From commits at source.squeak.org Wed Oct 19 15:35:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 19 15:35:09 2016 Subject: [squeak-dev] The Trunk: Kernel-tfel.1046.mcz Message-ID: Tim Felgentreff uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-tfel.1046.mcz ==================== Summary ==================== Name: Kernel-tfel.1046 Author: tfel Time: 19 October 2016, 5:34:18.991659 pm UUID: 12ebf345-b919-2845-8147-56a8b2f4cae4 Ancestors: Kernel-eem.1045 Improve performance of large integer fallback code for multiplication and division with small integers, by avoiding recalculating SmallInteger>>digitLength a lot of times. (This yields a 3x speedup in some integer heavy shootout benchmarks like pidigits for RSqueak, where we don't have a LargeIntegers plugin) =============== Diff against Kernel-eem.1045 =============== Item was changed: ----- Method: Integer>>digitDiv:neg: (in category 'private') ----- digitDiv: arg neg: ng "Answer with an array of (quotient, remainder)." + | quo rem ql d div dh dnh dl qhi qlo j l hi lo r3 a t divDigitLength remDigitLength | - | quo rem ql d div dh dnh dl qhi qlo j l hi lo r3 a t | arg = 0 ifTrue: [^ (ZeroDivide dividend: self) signal]. "TFEI added this line" l := self digitLength - arg digitLength + 1. l <= 0 ifTrue: [^ Array with: 0 with: self]. "shortcut against #highBit" d := 8 - arg lastDigit highBitOfByte. div := arg digitLshift: d. + divDigitLength := div digitLength + 1. + div := div growto: divDigitLength. - div := div growto: div digitLength + 1. "shifts so high order word is >=128" rem := self digitLshift: d. rem digitLength = self digitLength ifTrue: [rem := rem growto: self digitLength + 1]. + remDigitLength := rem digitLength. "makes a copy and shifts" quo := Integer new: l neg: ng. + dl := divDigitLength - 1. - dl := div digitLength - 1. "Last actual byte of data" ql := l. dh := div digitAt: dl. dnh := dl = 1 ifTrue: [0] ifFalse: [div digitAt: dl - 1]. 1 to: ql do: [:k | "maintain quo*arg+rem=self" "Estimate rem/div by dividing the leading to bytes of rem by dh." "The estimate is q = qhi*16+qlo, where qhi and qlo are nibbles." + j := remDigitLength + 1 - k. - j := rem digitLength + 1 - k. "r1 := rem digitAt: j." (rem digitAt: j) = dh ifTrue: [qhi := qlo := 15 "i.e. q=255"] ifFalse: ["Compute q = (r1,r2)//dh, t = (r1,r2)\\dh. Note that r1,r2 are bytes, not nibbles. Be careful not to generate intermediate results exceeding 13 bits." "r2 := (rem digitAt: j - 1)." t := ((rem digitAt: j) bitShift: 4) + ((rem digitAt: j - 1) bitShift: -4). qhi := t // dh. t := (t \\ dh bitShift: 4) + ((rem digitAt: j - 1) bitAnd: 15). qlo := t // dh. t := t \\ dh. "Next compute (hi,lo) := q*dnh" hi := qhi * dnh. lo := qlo * dnh + ((hi bitAnd: 15) bitShift: 4). hi := (hi bitShift: -4) + (lo bitShift: -8). lo := lo bitAnd: 255. "Correct overestimate of q. Max of 2 iterations through loop -- see Knuth vol. 2" r3 := j < 3 ifTrue: [0] ifFalse: [rem digitAt: j - 2]. [(t < hi or: [t = hi and: [r3 < lo]]) and: ["i.e. (t,r3) < (hi,lo)" qlo := qlo - 1. lo := lo - dnh. lo < 0 ifTrue: [hi := hi - 1. lo := lo + 256]. hi >= dh]] whileTrue: [hi := hi - dh]. qlo < 0 ifTrue: [qhi := qhi - 1. qlo := qlo + 16]]. "Subtract q*div from rem" l := j - dl. a := 0. + 1 to: divDigitLength do: - 1 to: div digitLength do: [:i | hi := (div digitAt: i) * qhi. lo := a + (rem digitAt: l) - ((hi bitAnd: 15) bitShift: 4) - ((div digitAt: i) * qlo). rem digitAt: l put: lo - (lo // 256 * 256). "sign-tolerant form of (lo bitAnd: 255)" a := lo // 256 - (hi bitShift: -4). l := l + 1]. a < 0 ifTrue: ["Add div back into rem, decrease q by 1" qlo := qlo - 1. l := j - dl. a := 0. + 1 to: divDigitLength do: - 1 to: div digitLength do: [:i | a := (a bitShift: -8) + (rem digitAt: l) + (div digitAt: i). rem digitAt: l put: (a bitAnd: 255). l := l + 1]]. + quo digitAt: ql + 1 - k put: (qhi bitShift: 4) - quo digitAt: quo digitLength + 1 - k put: (qhi bitShift: 4) + qlo]. rem := rem digitRshift: d bytes: 0 lookfirst: dl. ^ Array with: quo with: rem! Item was changed: ----- Method: Integer>>digitMultiply:neg: (in category 'private') ----- digitMultiply: arg neg: ng + | selfLen argLen prod prodLen carry digit k ab | - | prod prodLen carry digit k ab | + argLen := arg digitLength. + (argLen = 1 and: [(arg digitAt: 1) - (arg digitLength = 1 and: [(arg digitAt: 1) = 0]) ifTrue: [^ 0]. + selfLen := self digitLength. + (selfLen = 1 and: [(self digitAt: 1) - (self digitLength = 1 and: [(self digitAt: 1) = 0]) ifTrue: [^ 0]. + prodLen := selfLen + argLen. - prodLen := self digitLength + arg digitLength. prod := Integer new: prodLen neg: ng. "prod starts out all zero" + 1 to: selfLen do: [:i | (digit := self digitAt: i) ~= 0 - 1 to: self digitLength do: [:i | (digit := self digitAt: i) ~= 0 ifTrue: [k := i. carry := 0. "Loop invariant: 0<=carry<=0377, k=i+j-1" + 1 to: argLen do: - 1 to: arg digitLength do: [:j | ab := (arg digitAt: j) * digit + carry + (prod digitAt: k). carry := ab bitShift: -8. prod digitAt: k put: (ab bitAnd: 255). k := k + 1]. prod digitAt: k put: carry]]. ^ prod normalize! From bert at freudenbergs.de Wed Oct 19 16:41:30 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 19 16:41:33 2016 Subject: =?UTF-8?Q?Re=3A_=5Bsqueak=2Ddev=5D_Something_like_Woden_for_squeak_=28si?= =?UTF-8?Q?nce_the_old_OpenGL_is_not_working_anymore=2E=2E=2E=29=C2=B7?= In-Reply-To: References: <0e4f2b73-e984-3770-1ce6-759cef56f26f@gmail.com> Message-ID: On Wed, Oct 19, 2016 at 12:16 AM, Eliot Miranda wrote: > Hi Casimiro, > > On Tue, Oct 18, 2016 at 11:55 AM, Casimiro de Almeida Barreto < > casimiro.barreto@gmail.com> wrote: > >> Is there something like Woden in squeak 5.1? OpenGL not working because >> B3DAccelerator is not build into current cogvm. >> > > Are you sure? These are my local builds (and read after): > Looks like they are indeed commented out in the unix ARM and Mac Squeak builds (see lines starting with #): > build.linux32ARMv6/squeak.cog.spur/plugins.ext:#B3DAcceleratorPlugin \ > commented out, maybe because of ARM? > build.linux32x86/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ > build.linux64x64/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ > built on x86 and x64 linux > build.macos32x86/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ > commented out, maybe because of carbon? > build.macos64x64/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ > commented out, maybe because of carbon? > build.win32x86/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin \ > build.win64x64/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin > built on x86 and x64 Windows > So if the host build system is correctly configured the > B3DAcceleratorPlugin is indeed built and included. > Guess we need to configure it correctly then :) Btw, I think commenting out parts of a continued line (ending in backslash \) is not a good idea. Better to move the comment to a separate line. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161019/0c64223f/attachment.htm From eliot.miranda at gmail.com Wed Oct 19 18:52:57 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 19 18:53:00 2016 Subject: =?UTF-8?Q?Re=3A_=5Bsqueak=2Ddev=5D_Something_like_Woden_for_squeak_=28si?= =?UTF-8?Q?nce_the_old_OpenGL_is_not_working_anymore=2E=2E=2E=29=C2=B7?= In-Reply-To: References: <0e4f2b73-e984-3770-1ce6-759cef56f26f@gmail.com> Message-ID: On Wed, Oct 19, 2016 at 9:41 AM, Bert Freudenberg wrote: > On Wed, Oct 19, 2016 at 12:16 AM, Eliot Miranda > wrote: > >> Hi Casimiro, >> >> On Tue, Oct 18, 2016 at 11:55 AM, Casimiro de Almeida Barreto < >> casimiro.barreto@gmail.com> wrote: >> >>> Is there something like Woden in squeak 5.1? OpenGL not working because >>> B3DAccelerator is not build into current cogvm. >>> >> >> Are you sure? These are my local builds (and read after): >> > > Looks like they are indeed commented out in the unix ARM and Mac Squeak > builds (see lines starting with #): > > >> build.linux32ARMv6/squeak.cog.spur/plugins.ext:#B3DAcceleratorPlugin \ >> > > commented out, maybe because of ARM? > > >> build.linux32x86/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ >> > build.linux64x64/squeak.cog.spur/plugins.ext:B3DAcceleratorPlugin \ >> > > built on x86 and x64 linux > > >> build.macos32x86/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ >> > > commented out, maybe because of carbon? > > >> build.macos64x64/squeak.cog.spur/plugins.int:# B3DAcceleratorPlugin \ >> > > commented out, maybe because of carbon? > > >> build.win32x86/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin \ >> > build.win64x64/squeak.cog.spur/plugins.int:B3DAcceleratorPlugin >> > > built on x86 and x64 Windows > > >> So if the host build system is correctly configured the >> B3DAcceleratorPlugin is indeed built and included. >> > > Guess we need to configure it correctly then :) > > Btw, I think commenting out parts of a continued line (ending in backslash > \) is not a good idea. Better to move the comment to a separate line. > Yes, I hate this feature. Any volunteers willing to fix it? As a request we would like plugins.int and plugins.ext to both me normal files, composed of separate lines not terminated by a backslash, where any line not beginning with a # names a plugin to be built. This affects numerous clients in the build system on linux (autoconf) but only the Makefiles on Win and Mac builds. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161019/959a71f0/attachment.htm From commits at source.squeak.org Wed Oct 19 19:30:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 19 19:30:34 2016 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-bf.147.mcz Message-ID: Bert Freudenberg uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-bf.147.mcz ==================== Summary ==================== Name: MonticelloConfigurations-bf.147 Author: bf Time: 19 October 2016, 9:30:22.470476 pm UUID: b1d019c1-7569-4ea8-8f6a-aac4b395beca Ancestors: MonticelloConfigurations-pre.146 During update, log error instead of stopping. =============== Diff against MonticelloConfigurations-pre.146 =============== Item was changed: ----- Method: MCConfiguration>>depsSatisfying:versionDo:displayingProgress: (in category 'private') ----- depsSatisfying: selectBlock versionDo: verBlock displayingProgress: progressString | count selectedVersions cleanWorkingCopies | self cacheAllFileNamesDuring: [ self repositories do: [ :eachRepository | MCRepositoryGroup default addRepository: eachRepository ]. "First, download selected versions" count := 0. selectedVersions := OrderedCollection new. self withProgress: progressString in: self dependencies do: [ :dep | | verName repo | verName := dep versionInfo name. self class extraProgressInfo ifTrue: [ ProgressNotification signal: '' extra: 'Downloading ' , verName ]. repo := self repositories detect: [ :eachRepository | eachRepository includesVersionNamed: verName ] ifNone: [ self logError: 'Version ' , verName , ' not found in any repository'. self logError: 'Aborting'. ^ count ]. (selectBlock value: dep) ifTrue: [ | version | version := self versionNamed: verName for: dep from: repo. version ifNil: [ self logError: 'Could not download version ' , verName , ' from ' , repo description. self logError: 'Aborting'. ^ count ]. dep package workingCopy newRepositoryGroupIfDefault. "fix old working copies" dep package workingCopy repositoryGroup addRepository: repo. selectedVersions add: version]]. "Then, process only those definitions that moved from one package to another, to avoid order dependence" cleanWorkingCopies := MCWorkingCopy allManagers reject: [ :wc | wc modified ]. MCReorganizationPreloader preloadMovesBetween: selectedVersions. "Finally, load/merge selected versions" self withProgress: progressString in: selectedVersions do: [ :version | self logUpdate: version package with: version. self class extraProgressInfo ifTrue: [ ProgressNotification signal: '' extra: 'Installing ' , version info name ]. verBlock value: version. count := count + 1 ]. "Clean up packages made dirty by MCReorganizationPreloader" + cleanWorkingCopies do: [ :wc | wc modified ifTrue: [[wc checkModified] on: Error do: [:ex | self logWarning: ex description] ]]. - cleanWorkingCopies do: [ :wc | wc modified ifTrue: [wc checkModified] ]. ]. ^ count! From commits at source.squeak.org Wed Oct 19 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Oct 19 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161019215502.19470.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/069001.html Name: Kernel-tfel.1046 Ancestors: Kernel-eem.1045 Improve performance of large integer fallback code for multiplication and division with small integers, by avoiding recalculating SmallInteger>>digitLength a lot of times. (This yields a 3x speedup in some integer heavy shootout benchmarks like pidigits for RSqueak, where we don't have a LargeIntegers plugin) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069002.html Name: MonticelloConfigurations-bf.147 Ancestors: MonticelloConfigurations-pre.146 During update, log error instead of stopping. ============================================= From nicolas.cellier.aka.nice at gmail.com Thu Oct 20 16:40:26 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 20 16:40:30 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work Message-ID: The default behavior is to rely on ^self size = 0. But default size is doing too much (it iterates over all elements). It's OK for most of our classes which know very well about their size and override #size. It's not OK for an eventually lazy or infinite subclass. I realized this by answering http://stackoverflow.com/questions/40149826/is-there-a-construct-like-iterate-iterable-if-it-has-elements-else -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/c46e8b3c/attachment.htm From eliot.miranda at gmail.com Thu Oct 20 17:26:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 20 17:26:56 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: Message-ID: Nicolas, On Thu, Oct 20, 2016 at 9:40 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > The default behavior is to rely on ^self size = 0. > But default size is doing too much (it iterates over all elements). > It's OK for most of our classes which know very well about their size and > override #size. > It's not OK for an eventually lazy or infinite subclass. > Good catch. Change it! isEmpty self do: [:element| ^false]. ^true > I realized this by answering http://stackoverflow.com/ > questions/40149826/is-there-a-construct-like-iterate- > iterable-if-it-has-elements-else > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/81196060/attachment.htm From eliot.miranda at gmail.com Thu Oct 20 18:23:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 20 18:23:30 2016 Subject: [squeak-dev] sorting array-like collections Message-ID: Hi All, sorted: for Array is OK, but for Array-like subclasses of ArrayedCollection it's suboptimal. For example: 32-bit Mac OS X 2.2GHz Core i7 MBP [| samples r samplesArray | samples := Bitmap new: 256 * 1024. r := Random new. 1 to: samples size do: [:i| samples at: i put: (r next * (1 << 32)) asInteger - 1]. samplesArray := samples asArray. (1 to: 3) collect: [:i| {[samples sorted] timeToRun. [samplesArray sorted] timeToRun}] #(#(266 243) #(293 239) #(413 247))] 64-bit Mac OS X 2.2GHz Core i7 MBP | samples r samplesArray | samples := Bitmap new: 256 * 1024. r := Random new. 1 to: samples size do: [:i| samples at: i put: (r next * (1 << 32)) asInteger - 1]. samplesArray := samples asArray. (1 to: 3) collect: [:i| {[samples sorted] timeToRun. [samplesArray sorted] timeToRun}] #(#(143 134) #(300 133) #(141 137)) My point is about the difference in sorting speed for Array vs Bitmap, but before that note that 64-bit is faster to sort because there are fewer 32-bit to LargePositiveInteger conversions, but the difference between the Bitmap vs Array sort is larger on 64-bit because the 64-bit generation scavenger has a performance problem (which is why I'm looking at the above, fixing the VM profiler to work for 64-bit address spaces). What's going on here is that Array's sorted: is Array>>#sorted: aSortBlockOrNil ^self copy sort: aSortBlockOrNil but for other subclasses of ArrayedCollection it is Collection>>#sorted: aSortBlockOrNil ^self asArray sort: aSortBlockOrNil so there is a slow copy of the Bitmap or ByteArray to an Array with equivalent elements, but a shallow copy (which is fast) in Array>>#sorted: to sort an Array. When you look at the timings above you can see that when a GC occurs due to the slow copy it takes much longer to sort the Bitmap, and that it always takes longer to sort the Bitmap than the Array. For many subclasses of ArrayedCollection, essentially everything other than the RunArrays and CompiledMethod, which are specialised, there is no need to convert to an Array, and a direct access to a shallow copy would work just as well. So shouldn't we instead implement this as ArrayedCollection>>#sorted: aSortBlockOrNil ^self copy sort: aSortBlockOrNil and in subclasses that are exceptions override as e.g. RunArray>>#sorted: aSortBlockOrNil ^self asArray sort: aSortBlockOrNil SparseLargeArray>>#sorted: aSortBlockOrNil something much cleverer.... ? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/8ec3847b/attachment-0001.htm From commits at source.squeak.org Thu Oct 20 19:38:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 19:38:47 2016 Subject: [squeak-dev] The Trunk: Monticello-nice.649.mcz Message-ID: Nicolas Cellier uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-nice.649.mcz ==================== Summary ==================== Name: Monticello-nice.649 Author: nice Time: 20 September 2016, 11:05:23.764791 pm UUID: 21077de5-41b3-4bd4-99ee-93cb5aca0301 Ancestors: Monticello-mt.648 Support for half and double word variable subclasses =============== Diff against Monticello-mt.648 =============== Item was changed: ----- Method: MCClassDefinition>>kindOfSubclass (in category 'printing') ----- kindOfSubclass type = #normal ifTrue: [^' subclass: ']. type = #variable ifTrue: [^' variableSubclass: ']. type = #bytes ifTrue: [^' variableByteSubclass: ']. type = #compiledMethod ifTrue: [^' variableByteSubclass: ' ]. + type = #shorts ifTrue: [^' variableHalfWordSubclass: ']. type = #words ifTrue: [^' variableWordSubclass: ']. + type = #longs ifTrue: [^' variableDoubleWordSubclass: ']. type = #weak ifTrue: [^' weakSubclass: ' ]. type = #ephemeron ifTrue: [^' ephemeronSubclass: ' ]. type = #immediate ifTrue: [^' immediateSubclass: ' ]. self error: 'Unrecognized class type' ! Item was changed: ----- Method: MCStReader>>typeOfSubclass: (in category 'as yet unclassified') ----- typeOfSubclass: aSymbol #( (subclass: normal) (variableSubclass: variable) (variableByteSubclass: bytes) + (variableHalfWordSubclass: shorts) (variableWordSubclass: words) + (variableDoubleWordSubclass: longs) (weakSubclass: weak) (ephemeronSubclass: ephemeron) (immediateSubclass: immediate) ) do: [:ea | ea first = aSymbol ifTrue: [^ ea second]]. self error: 'Unrecognized class definition'! From commits at source.squeak.org Thu Oct 20 19:40:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 19:40:45 2016 Subject: [squeak-dev] The Trunk: Monticello-nice.650.mcz Message-ID: Nicolas Cellier uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-nice.650.mcz ==================== Summary ==================== Name: Monticello-nice.650 Author: nice Time: 20 October 2016, 9:40:29.118416 pm UUID: a672602e-278e-4480-b569-362600f892da Ancestors: Monticello-nice.649, Monticello-eem.649 Merge eem.649 and nice.649 for 16bits and 64bits integer array. Adopt Eliot's "DoubleByte" rather than "HalfWord" =============== Diff against Monticello-nice.649 =============== Item was changed: ----- Method: MCClassDefinition>>kindOfSubclass (in category 'printing') ----- kindOfSubclass type = #normal ifTrue: [^' subclass: ']. type = #variable ifTrue: [^' variableSubclass: ']. type = #bytes ifTrue: [^' variableByteSubclass: ']. type = #compiledMethod ifTrue: [^' variableByteSubclass: ' ]. + type = #shorts ifTrue: [^' variableDoubleByteSubclass: ']. - type = #shorts ifTrue: [^' variableHalfWordSubclass: ']. type = #words ifTrue: [^' variableWordSubclass: ']. type = #longs ifTrue: [^' variableDoubleWordSubclass: ']. type = #weak ifTrue: [^' weakSubclass: ' ]. type = #ephemeron ifTrue: [^' ephemeronSubclass: ' ]. type = #immediate ifTrue: [^' immediateSubclass: ' ]. self error: 'Unrecognized class type' ! Item was changed: ----- Method: MCStReader>>typeOfSubclass: (in category 'as yet unclassified') ----- typeOfSubclass: aSymbol #( (subclass: normal) (variableSubclass: variable) (variableByteSubclass: bytes) + (variableDoubleByteSubclass: shorts) - (variableHalfWordSubclass: shorts) (variableWordSubclass: words) (variableDoubleWordSubclass: longs) (weakSubclass: weak) (ephemeronSubclass: ephemeron) (immediateSubclass: immediate) ) do: [:ea | ea first = aSymbol ifTrue: [^ ea second]]. self error: 'Unrecognized class definition'! From commits at source.squeak.org Thu Oct 20 19:49:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 19:49:48 2016 Subject: [squeak-dev] The Trunk: KernelTests-nice.312.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.312.mcz ==================== Summary ==================== Name: KernelTests-nice.312 Author: nice Time: 20 September 2016, 11:02:44.892325 pm UUID: 20bb751e-7ac1-4e91-8437-9f2cdcb8df5c Ancestors: KernelTests-mt.311 ClassBuilder tests for half and double word variable subclasses =============== Diff against KernelTests-mt.311 =============== Item was added: + ----- Method: ClassBuilderTest>>makeDoubleWordVariableSubclassOf: (in category 'utilities') ----- + makeDoubleWordVariableSubclassOf: aClass + ^ aClass variableDoubleWordSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was added: + ----- Method: ClassBuilderTest>>makeHalfWordVariableSubclassOf: (in category 'utilities') ----- + makeHalfWordVariableSubclassOf: aClass + ^ aClass variableHalfWordSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was changed: ----- Method: ClassBuilderTest>>testByteVariableSubclass (in category 'testing - format') ----- testByteVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableByteSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" subClass := self makeByteVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testDoubleWordVariableSubclass (in category 'testing - format') ----- + testDoubleWordVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableDoubleWordSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isDoubleWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isWords). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeDoubleWordVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isDoubleWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isWords). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testHalfWordVariableSubclass (in category 'testing - format') ----- + testHalfWordVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableHalfWordSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isHalfWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isDoubleWords). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeHalfWordVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isHalfWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isDoubleWords). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was changed: ----- Method: ClassBuilderTest>>testWordVariableSubclass (in category 'testing - format') ----- testWordVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableWordSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. subClass := self makeWordVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. ] ensure:[self cleanup].! From commits at source.squeak.org Thu Oct 20 19:58:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 19:58:28 2016 Subject: [squeak-dev] The Trunk: KernelTests-nice.314.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-nice.314.mcz ==================== Summary ==================== Name: KernelTests-nice.314 Author: nice Time: 20 October 2016, 9:58:13.488357 pm UUID: 20ecfbfa-83c2-4e4c-a272-93619cccc78c Ancestors: KernelTests-nice.313, KernelTests-nice.312 Merge nice.312 (tests for 16 and 64 bits integer array) Adopt Eliot's protocol: HalfWord -> DoubleByte isHalfWords -> isShorts isDoubleWords -> isLongs =============== Diff against KernelTests-nice.313 =============== Item was added: + ----- Method: ClassBuilderTest>>makeDoubleByteVariableSubclassOf: (in category 'utilities') ----- + makeDoubleByteVariableSubclassOf: aClass + ^ aClass variableDoubleByteSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was added: + ----- Method: ClassBuilderTest>>makeDoubleWordVariableSubclassOf: (in category 'utilities') ----- + makeDoubleWordVariableSubclassOf: aClass + ^ aClass variableDoubleWordSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was changed: ----- Method: ClassBuilderTest>>testByteVariableSubclass (in category 'testing - format') ----- testByteVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableByteSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isShorts). + self deny: (subClass isLongs). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" subClass := self makeByteVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isShorts). + self deny: (subClass isLongs). subClass removeFromSystem. self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testDoubleByteVariableSubclass (in category 'testing - format') ----- + testDoubleByteVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableDoubleByteSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isShorts). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isLongs). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeDoubleByteVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isShorts). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isLongs). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testDoubleWordVariableSubclass (in category 'testing - format') ----- + testDoubleWordVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableDoubleWordSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isLongs). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isShorts). + self deny: (subClass isWords). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeDoubleWordVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isLongs). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isShorts). + self deny: (subClass isWords). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was changed: ----- Method: ClassBuilderTest>>testWordVariableSubclass (in category 'testing - format') ----- testWordVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableWordSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isShorts). + self deny: (subClass isLongs). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. subClass := self makeWordVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isShorts). + self deny: (subClass isLongs). subClass removeFromSystem. ] ensure:[self cleanup].! From commits at source.squeak.org Thu Oct 20 20:00:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:00:21 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1039.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1039.mcz ==================== Summary ==================== Name: Kernel-nice.1039 Author: nice Time: 20 September 2016, 11:00:27.302558 pm UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f Ancestors: Kernel-bf.1038 Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited. =============== Diff against Kernel-bf.1038 =============== Item was added: + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- + isDoubleWords + "Answer true if the receiver is made of 64-bit instance variables." + + ^self instSpec = 2r1001! Item was added: + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- + isHalfWords + "Answer true if the receiver is made of 16-bit instance variables." + + ^(self instSpec bitAnd: 2r11100) = 2r1100! Item was changed: ----- Method: Behavior>>isWords (in category 'testing') ----- isWords "Answer true if the receiver is made of 32-bit instance variables." + ^(self instSpec bitAnd: 2r11110) = 2r1010! - ^self isBytes not! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable double-word-sized nonpointer variables." + ^(ClassBuilder new) + superclass: self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat + ! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable double-word-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass + ! Item was added: + ----- Method: Class>>variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableHalfWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable half-word-sized nonpointer variables." + ^(ClassBuilder new) + superclass: self + variableHalfWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat + ! Item was added: + ----- Method: Class>>variableHalfWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableHalfWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable half-word-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableHalfWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass! Item was changed: ----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class in which the subclass is to have indexable byte-sized nonpointer variables." | oldClassOrNil actualType env | (aClass instSize > 0) ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. (aClass isVariable and: [aClass isWords]) ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with half word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with double word fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. oldClassOrNil := aClass environment at: t ifAbsent:[nil]. actualType := (oldClassOrNil notNil and: [oldClassOrNil typeOfClass == #compiledMethod]) ifTrue: [#compiledMethod] ifFalse: [#bytes]. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: actualType instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class in which the subclass is to + have indexable double-word-sized nonpointer variables." + | env | + (aClass instSize > 0) + ifTrue: [^self error: 'cannot make a double word subclass of a class with named fields']. + (aClass isVariable and: [aClass isBytes]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with half word fields']. + (aClass isVariable and: [aClass isWords]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with word fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with pointer fields']. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #longs + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableHalfWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class in which the subclass is to + have indexable half-word-sized nonpointer variables." + | env | + (aClass instSize > 0) + ifTrue: [^self error: 'cannot make a half word subclass of a class with named fields']. + (aClass isVariable and: [aClass isBytes]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isWords]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with double word fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with pointer fields']. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #shorts + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was changed: ----- Method: ClassBuilder>>superclass:variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class in which the subclass is to have indexable word-sized nonpointer variables." | env | (aClass instSize > 0) ifTrue: [^self error: 'cannot make a word subclass of a class with named fields']. (aClass isVariable and: [aClass isBytes]) ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a word subclass of a class with half word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a word subclass of a class with double word fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields']. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: #words instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! From commits at source.squeak.org Thu Oct 20 20:00:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:00:27 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1040.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1040.mcz ==================== Summary ==================== Name: Kernel-nice.1040 Author: nice Time: 20 September 2016, 11:16:58.635456 pm UUID: 02e2c754-2964-4b4a-8f91-102bd6c3a92d Ancestors: Kernel-nice.1039 Prefer HalfWord to DoubleByte =============== Diff against Kernel-nice.1039 =============== Item was changed: ----- Method: Behavior>>kindOfSubclass (in category 'testing class hierarchy') ----- kindOfSubclass "Answer a String that is the keyword that describes the receiver's kind of subclass, either a regular subclass, a variableSubclass, a variableByteSubclass, a variableWordSubclass, a weakSubclass, an ephemeronSubclass or an immediateSubclass. c.f. typeOfClass & instSpec" ^(#(' subclass: ' ' subclass: ' ' variableSubclass: ' ' variableSubclass: ' ' weakSubclass: ' ' ephemeronSubclass: ' nil ' immediateSubclass: ' nil ' variableDoubleWordSubclass: ' ' variableWordSubclass: ' nil + ' variableHalfWordSubclass: ' nil nil nil - ' variableDoubleByteSubclass: ' nil nil nil ' variableByteSubclass: ' nil nil nil nil nil nil nil ' variableByteSubclass: ' nil nil nil nil nil nil nil ) at: self instSpec + 1) ifNil: [self error: 'invalid class type']! From commits at source.squeak.org Thu Oct 20 20:01:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:01:09 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1041.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1041.mcz ==================== Summary ==================== Name: Kernel-nice.1041 Author: nice Time: 21 September 2016, 9:06:09.983013 pm UUID: 80f9f68f-fad8-42d7-b1bc-bfa1ee876629 Ancestors: Kernel-nice.1040 The last bits of intSpec are zero, so no need to mask it. Those bits are used in instances only - see intSpec comment. =============== Diff against Kernel-nice.1040 =============== Item was changed: ----- Method: Behavior>>isHalfWords (in category 'testing') ----- isHalfWords "Answer true if the receiver is made of 16-bit instance variables." + ^self instSpec = 2r1100! - ^(self instSpec bitAnd: 2r11100) = 2r1100! Item was changed: ----- Method: Behavior>>isWords (in category 'testing') ----- isWords "Answer true if the receiver is made of 32-bit instance variables." + ^self instSpec = 2r1010! - ^(self instSpec bitAnd: 2r11110) = 2r1010! From commits at source.squeak.org Thu Oct 20 20:08:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:08:45 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1047.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1047.mcz ==================== Summary ==================== Name: Kernel-nice.1047 Author: nice Time: 20 October 2016, 10:07:24.06516 pm UUID: a8f40d9d-7e18-4ae4-99ce-a3144357602d Ancestors: Kernel-tfel.1046, Kernel-nice.1041 Merge nice.1041 changes for 16/64 bits integer array By now all changes are superseded by Eliot's HalfWord -> DoubleByte isHalfWords -> isShorts isDoubleWords -> isLongs =============== Diff against Kernel-tfel.1046 =============== From eliot.miranda at gmail.com Thu Oct 20 20:10:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 20 20:10:44 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1039.mcz In-Reply-To: <58092259.d5a3370a.843e8.e693SMTPIN_ADDED_MISSING@mx.google.com> References: <58092259.d5a3370a.843e8.e693SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Nicolas, I thought that there had been a conversation about this and that Bert had expressed a preference for DoubleByte and DoubleWord. Hence I kept to that. If I'm mistaken forgive me. But personally I don't like HalfWord. t's as ambiguous as word. At least DoubleByte is not ambiguous. On Thu, Oct 20, 2016 at 12:59 PM, wrote: > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-nice.1039.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.1039 > Author: nice > Time: 20 September 2016, 11:00:27.302558 pm > UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f > Ancestors: Kernel-bf.1038 > > Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are > possible in Spur format, but yet not exploited. > > =============== Diff against Kernel-bf.1038 =============== > > Item was added: > + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- > + isDoubleWords > + "Answer true if the receiver is made of 64-bit instance variables." > + > + ^self instSpec = 2r1001! > > Item was added: > + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- > + isHalfWords > + "Answer true if the receiver is made of 16-bit instance variables." > + > + ^(self instSpec bitAnd: 2r11100) = 2r1100! > > Item was changed: > ----- Method: Behavior>>isWords (in category 'testing') ----- > isWords > "Answer true if the receiver is made of 32-bit instance variables." > > + ^(self instSpec bitAnd: 2r11110) = 2r1010! > - ^self isBytes not! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable double-word-sized nonpointer variables." > + ^(ClassBuilder new) > + superclass: self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat > + ! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass: > uses:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'subclass creation') ----- > + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable double-word-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass > + ! > > Item was added: > + ----- Method: Class>>variableHalfWordSubclass:instanceVariableNames: > classVariableNames:poolDictionaries:category: (in category 'subclass > creation') ----- > + variableHalfWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable half-word-sized nonpointer variables." > + ^(ClassBuilder new) > + superclass: self > + variableHalfWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat > + ! > > Item was added: > + ----- Method: Class>>variableHalfWordSubclass:uses: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'subclass creation') ----- > + variableHalfWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class (the receiver) in which the subclass > is to > + have indexable half-word-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableHalfWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableByteSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > superclass: aClass > variableByteSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class in which the subclass is to > have indexable byte-sized nonpointer variables." > | oldClassOrNil actualType env | > (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a byte subclass of a > class with named fields']. > (aClass isVariable and: [aClass isWords]) > ifTrue: [^self error: 'cannot make a byte subclass of a > class with word fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with half word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with double word fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a byte subclass of a > class with pointer fields']. > oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > actualType := (oldClassOrNil notNil > and: [oldClassOrNil typeOfClass == > #compiledMethod]) > ifTrue: [#compiledMethod] > ifFalse: [#bytes]. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: actualType > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > + superclass: aClass > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class in which the subclass is to > + have indexable double-word-sized nonpointer variables." > + | env | > + (aClass instSize > 0) > + ifTrue: [^self error: 'cannot make a double word subclass > of a class with named fields']. > + (aClass isVariable and: [aClass isBytes]) > + ifTrue: [^self error: 'cannot make a double word subclass > of a class with byte fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a double word subclass > of a class with half word fields']. > + (aClass isVariable and: [aClass isWords]) > + ifTrue: [^self error: 'cannot make a double word subclass > of a class with word fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a double word subclass > of a class with pointer fields']. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #longs > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableHalfWordSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > + superclass: aClass > + variableHalfWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new > class as a > + subclass of an existing class in which the subclass is to > + have indexable half-word-sized nonpointer variables." > + | env | > + (aClass instSize > 0) > + ifTrue: [^self error: 'cannot make a half word subclass of > a class with named fields']. > + (aClass isVariable and: [aClass isBytes]) > + ifTrue: [^self error: 'cannot make a half word subclass of > a class with byte fields']. > + (aClass isVariable and: [aClass isWords]) > + ifTrue: [^self error: 'cannot make a half word subclass of > a class with word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a half word subclass of > a class with double word fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a half word subclass of > a class with pointer fields']. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #shorts > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableWordSubclass: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'public') ----- > superclass: aClass > variableWordSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new > class as a > subclass of an existing class in which the subclass is to > have indexable word-sized nonpointer variables." > | env | > (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a word subclass of a > class with named fields']. > (aClass isVariable and: [aClass isBytes]) > ifTrue: [^self error: 'cannot make a word subclass of a > class with byte fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a word subclass of a > class with half word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a word subclass of a > class with double word fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a word subclass of a > class with pointer fields']. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: #words > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/df9c9415/attachment.htm From commits at source.squeak.org Thu Oct 20 20:19:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:19:08 2016 Subject: [squeak-dev] The Trunk: Collections-nice.717.mcz Message-ID: Nicolas Cellier uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-nice.717.mcz ==================== Summary ==================== Name: Collections-nice.717 Author: nice Time: 21 September 2016, 9:43:43.472517 pm UUID: f94b2210-9435-4dce-81d4-fe6fb57b3ec7 Ancestors: Collections-dtl.716 Introduce HalfWordArray and DoubleWordArray for positive 16 bits and 64 bits integer elements. =============== Diff against Collections-dtl.716 =============== Item was added: ==== ERROR === Error: Unrecognized class type 20 October 2016 8:19:05.725 pm VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(DoubleWordArray) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeAddition: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Thu Oct 20 20:19:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:19:25 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.268.mcz Message-ID: Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-nice.268.mcz ==================== Summary ==================== Name: CollectionsTests-nice.268 Author: nice Time: 21 September 2016, 9:46:42.419239 pm UUID: 13ee237c-8a1d-46b4-870c-86fcb2aaddbd Ancestors: CollectionsTests-pre.267 Provide some tests for half-word, word and double-word arrays (positive 16, 32 and 64 bits integer elements). At time of writing, half and double words require VM improvments. =============== Diff against CollectionsTests-pre.267 =============== Item was added: + ClassTestCase subclass: #DoubleWordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! + + !DoubleWordArrayTest commentStamp: 'nice 9/21/2016 21:09' prior: 0! + DoubleWordArrayTest are SUnit tests for DoubleWordArray. + ! Item was added: + ----- Method: DoubleWordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (DoubleWordArray new: 1) byteSize = 8 "8 bytes are 64 bits"! Item was added: + ----- Method: DoubleWordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [DoubleWordArray with: -1] raise: Error! Item was added: + ----- Method: DoubleWordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 64 - 1. + self assert: (DoubleWordArray with: maxValue) first = maxValue. + self should: [DoubleWordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: DoubleWordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: DoubleWordArray new bytesPerElement = 8 "8 bytes are 64 bits"! Item was added: + ----- Method: DoubleWordArrayTest>>testSomeValues (in category 'testing') ----- + testSomeValues + | dwArray int next | + next := [:x | x - 3 * x sqrtFloor + 5]. + int := 0. + dwArray := DoubleWordArray new: 1. + [int highBit < 64] + whileTrue: + [dwArray at: 1 put: int. + self assert: (dwArray at: 1) = int. + int := next value: int]. + self should: [dwArray at: 1 put: int] raise: Error! Item was added: + ClassTestCase subclass: #HalfWordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! + + !HalfWordArrayTest commentStamp: 'nice 9/21/2016 21:08' prior: 0! + HalfWordArrayTest are SUnit tests for HalfWordArray. + ! Item was added: + ----- Method: HalfWordArrayTest>>testAllPossibleValues (in category 'testing') ----- + testAllPossibleValues + | halfWordArray | + halfWordArray := (1 to: 65535) as: HalfWordArray. + 1 to: halfWordArray size do: [:i | + self assert: (halfWordArray at: i) = i]! Item was added: + ----- Method: HalfWordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (HalfWordArray new: 1) byteSize = 2 "2 bytes are 16 bits"! Item was added: + ----- Method: HalfWordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [HalfWordArray with: -1] raise: Error! Item was added: + ----- Method: HalfWordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 16 - 1. + self assert: (HalfWordArray with: maxValue) first = maxValue. + self should: [HalfWordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: HalfWordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: HalfWordArray new bytesPerElement = 2 "2 bytes are 16 bits"! Item was added: + ClassTestCase subclass: #WordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! Item was added: + ----- Method: WordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (WordArray new: 1) byteSize = 4 "4 bytes are 32 bits"! Item was added: + ----- Method: WordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [WordArray with: -1] raise: Error! Item was added: + ----- Method: WordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 32 - 1. + self assert: (WordArray with: maxValue) first = maxValue. + self should: [WordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: WordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: WordArray new bytesPerElement = 4 "4 bytes are 32 bits"! Item was added: + ----- Method: WordArrayTest>>testSomeValues (in category 'testing') ----- + testSomeValues + | wArray int next | + next := [:x | x - 3 * x sqrtFloor + 5]. + int := 0. + wArray := WordArray new: 1. + [int highBit < 32] + whileTrue: + [wArray at: 1 put: int. + self assert: (wArray at: 1) = int. + int := next value: int]. + self should: [wArray at: 1 put: int] raise: Error! From commits at source.squeak.org Thu Oct 20 20:24:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:24:21 2016 Subject: [squeak-dev] The Trunk: Collections-nice.718.mcz Message-ID: Nicolas Cellier uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-nice.718.mcz ==================== Summary ==================== Name: Collections-nice.718 Author: nice Time: 20 October 2016, 10:23:53.462294 pm UUID: 13d0b4c6-3da0-48a4-bf4e-789740593810 Ancestors: Collections-nice.717, Collections-eem.717 Merge nice-717 for providing HalfWordArray and DoubleWordArray Rename HalfWord -> DoubleByte according to Eliot's protocol =============== Diff against Collections-nice.717 =============== Item was added: ==== ERROR === Error: Unrecognized class type 20 October 2016 8:24:19.448 pm VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(DoubleByteArray) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #DoubleByteArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #shorts comment: 'HalfWordArrays store 16-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(DoubleByteArray) Arguments and temporary variables: Receiver's instance variables: name: #DoubleByteArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #shorts comment: 'HalfWordArrays store 16-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(DoubleByteArray) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #DoubleByteArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #shorts comment: 'HalfWordArrays store 16-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(DoubleByteArray) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeAddition: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Thu Oct 20 20:25:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:25:37 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.269.mcz Message-ID: Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-nice.269.mcz ==================== Summary ==================== Name: CollectionsTests-nice.269 Author: nice Time: 20 October 2016, 10:25:24.313721 pm UUID: dca0539f-a0a3-4f11-951b-84d5a3d4cd6a Ancestors: CollectionsTests-nice.268 Rename HalfWord -> DoubleByte according to Eliot's protocol =============== Diff against CollectionsTests-nice.268 =============== Item was added: + ClassTestCase subclass: #DoubleByteArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! + + !DoubleByteArrayTest commentStamp: 'nice 9/21/2016 21:08' prior: 0! + HalfWordArrayTest are SUnit tests for HalfWordArray. + ! Item was added: + ----- Method: DoubleByteArrayTest>>testAllPossibleValues (in category 'testing') ----- + testAllPossibleValues + | doubleByteArray | + doubleByteArray := (1 to: 65535) as: DoubleByteArray. + 1 to: doubleByteArray size do: [:i | + self assert: (doubleByteArray at: i) = i]! Item was added: + ----- Method: DoubleByteArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (DoubleByteArray new: 1) byteSize = 2 "2 bytes are 16 bits"! Item was added: + ----- Method: DoubleByteArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [DoubleByteArray with: -1] raise: Error! Item was added: + ----- Method: DoubleByteArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 16 - 1. + self assert: (DoubleByteArray with: maxValue) first = maxValue. + self should: [DoubleByteArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: DoubleByteArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: DoubleByteArray new bytesPerElement = 2 "2 bytes are 16 bits"! Item was removed: - ClassTestCase subclass: #HalfWordArrayTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'CollectionsTests-Arrayed'! - - !HalfWordArrayTest commentStamp: 'nice 9/21/2016 21:08' prior: 0! - HalfWordArrayTest are SUnit tests for HalfWordArray. - ! Item was removed: - ----- Method: HalfWordArrayTest>>testAllPossibleValues (in category 'testing') ----- - testAllPossibleValues - | halfWordArray | - halfWordArray := (1 to: 65535) as: HalfWordArray. - 1 to: halfWordArray size do: [:i | - self assert: (halfWordArray at: i) = i]! Item was removed: - ----- Method: HalfWordArrayTest>>testByteSize (in category 'testing') ----- - testByteSize - self assert: (HalfWordArray new: 1) byteSize = 2 "2 bytes are 16 bits"! Item was removed: - ----- Method: HalfWordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- - testCannotPutNegativeValue - self should: [HalfWordArray with: -1] raise: Error! Item was removed: - ----- Method: HalfWordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- - testCannotPutTooLargeValue - | maxValue | - maxValue := 1 << 16 - 1. - self assert: (HalfWordArray with: maxValue) first = maxValue. - self should: [HalfWordArray with: maxValue + 1] raise: Error! Item was removed: - ----- Method: HalfWordArrayTest>>testElementSize (in category 'testing') ----- - testElementSize - self assert: HalfWordArray new bytesPerElement = 2 "2 bytes are 16 bits"! From commits at source.squeak.org Thu Oct 20 20:29:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:29:26 2016 Subject: [squeak-dev] The Trunk: Collections-nice.719.mcz Message-ID: Nicolas Cellier uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-nice.719.mcz ==================== Summary ==================== Name: Collections-nice.719 Author: nice Time: 20 October 2016, 10:28:18.384751 pm UUID: a873d200-0ee0-4297-aebd-510f92ea243c Ancestors: Collections-nice.718 Let reversed preserve Interval class. Handle the case of empty Interval specially (preserve the bounds). =============== Diff against Collections-nice.718 =============== Item was added: + ----- Method: Interval>>reversed (in category 'converting') ----- + reversed + self isEmpty ifTrue: [^stop to: start by: step negated]. + ^self last to: start by: step negated! From commits at source.squeak.org Thu Oct 20 20:31:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 20:32:00 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-nice.270.mcz Message-ID: Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-nice.270.mcz ==================== Summary ==================== Name: CollectionsTests-nice.270 Author: nice Time: 20 October 2016, 10:31:45.375142 pm UUID: d2833ae6-3419-4cf0-b2af-12ee49046e20 Ancestors: CollectionsTests-nice.269 Test Interval reversed and sum =============== Diff against CollectionsTests-nice.269 =============== Item was added: + ----- Method: IntervalTest>>testReversed (in category 'tests') ----- + testReversed + self assert: (3 to: 10) reversed = (10 to: 3 by: -1). + self assert: (3 to: 11 by: 4) reversed = (11 to: 3 by: -4). + self assert: (3 to: 12 by: 4) reversed = (11 to: 3 by: -4).! Item was added: + ----- Method: IntervalTest>>testReversedEmpty (in category 'tests') ----- + testReversedEmpty + self assert: (4 to: 3) reversed = (3 to: 4 by: -1). + self assert: (4 to: 3 by: 5) reversed = (3 to: 4 by: -5).! Item was added: + ----- Method: IntervalTest>>testSum (in category 'tests') ----- + testSum + 1 to: 10 do: [:i | + | int | + int := -3 to: i-1*5-3 by: 5. + self assert: int asArray sum = int sum. + self assert: int reversed sum = int sum]! From Das.Linux at gmx.de Thu Oct 20 20:40:47 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 20 20:40:53 2016 Subject: [squeak-dev] please delay usage of source.squeak.org Message-ID: <5A41D85C-44B6-48D5-A4BE-63F22FE4EFB4@gmx.de> Dear all, we're about to switch over source.squeak.org to the new infrastructure, safe a few minor adjustments. Please cease commit to source.squeak.org until Chris or a Box-admin says we're go again :) Thanks and best regards -Tobias (Somehow managing the infrastructure switch) From nicolas.cellier.aka.nice at gmail.com Thu Oct 20 20:47:21 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 20 20:47:25 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1039.mcz In-Reply-To: References: <58092259.d5a3370a.843e8.e693SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Eliot, I don't remember about this conversation. Anyway I was on the process of adopting DoubleByte, so this was only transitory. I perfectly agree about Words... Even without quitting own Squeak world this is already highly polymorphic: There are virtual machine words (sizeof void *) There are image words (sizeof Oop) Above two matches on Cog & Spur VM, but as you said 32bits image on 64bits image could be interesting. There are variableWord collections (allways 32bits) and now variableDoubleWords... 2016-10-20 22:10 GMT+02:00 Eliot Miranda : > Nicolas, > > I thought that there had been a conversation about this and that Bert > had expressed a preference for DoubleByte and DoubleWord. Hence I kept to > that. If I'm mistaken forgive me. But personally I don't like HalfWord. > t's as ambiguous as word. At least DoubleByte is not ambiguous. > > On Thu, Oct 20, 2016 at 12:59 PM, wrote: > >> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-nice.1039.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-nice.1039 >> Author: nice >> Time: 20 September 2016, 11:00:27.302558 pm >> UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f >> Ancestors: Kernel-bf.1038 >> >> Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which >> are possible in Spur format, but yet not exploited. >> >> =============== Diff against Kernel-bf.1038 =============== >> >> Item was added: >> + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- >> + isDoubleWords >> + "Answer true if the receiver is made of 64-bit instance >> variables." >> + >> + ^self instSpec = 2r1001! >> >> Item was added: >> + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- >> + isHalfWords >> + "Answer true if the receiver is made of 16-bit instance >> variables." >> + >> + ^(self instSpec bitAnd: 2r11100) = 2r1100! >> >> Item was changed: >> ----- Method: Behavior>>isWords (in category 'testing') ----- >> isWords >> "Answer true if the receiver is made of 32-bit instance >> variables." >> >> + ^(self instSpec bitAnd: 2r11110) = 2r1010! >> - ^self isBytes not! >> >> Item was added: >> + ----- Method: Class>>variableDoubleWordSubcl >> ass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> + variableDoubleWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable double-word-sized nonpointer variables." >> + ^(ClassBuilder new) >> + superclass: self >> + variableDoubleWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat >> + ! >> >> Item was added: >> + ----- Method: Class>>variableDoubleWordSubclass:uses: >> instanceVariableNames:classVariableNames:poolDictionaries:category: (in >> category 'subclass creation') ----- >> + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable double-word-sized nonpointer variables." >> + >> + | newClass copyOfOldClass | >> + copyOfOldClass := self copy. >> + newClass := self >> + variableDoubleWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat. >> + >> + newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> + SystemChangeNotifier uniqueInstance >> + classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass >> + ! >> >> Item was added: >> + ----- Method: Class>>variableHalfWordSubclas >> s:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> + variableHalfWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable half-word-sized nonpointer variables." >> + ^(ClassBuilder new) >> + superclass: self >> + variableHalfWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat >> + ! >> >> Item was added: >> + ----- Method: Class>>variableHalfWordSubclas >> s:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'subclass creation') ----- >> + variableHalfWordSubclass: t uses: aTraitCompositionOrArray >> instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class (the receiver) in which the >> subclass is to >> + have indexable half-word-sized nonpointer variables." >> + >> + | newClass copyOfOldClass | >> + copyOfOldClass := self copy. >> + newClass := self >> + variableHalfWordSubclass: t >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat. >> + >> + newClass setTraitComposition: aTraitCompositionOrArray >> asTraitComposition. >> + SystemChangeNotifier uniqueInstance >> + classDefinitionChangedFrom: copyOfOldClass to: newClass. >> + ^newClass! >> >> Item was changed: >> ----- Method: ClassBuilder>>superclass:varia >> bleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> superclass: aClass >> variableByteSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class in which the subclass is to >> have indexable byte-sized nonpointer variables." >> | oldClassOrNil actualType env | >> (aClass instSize > 0) >> ifTrue: [^self error: 'cannot make a byte subclass of a >> class with named fields']. >> (aClass isVariable and: [aClass isWords]) >> ifTrue: [^self error: 'cannot make a byte subclass of a >> class with word fields']. >> + (aClass isVariable and: [aClass isHalfWords]) >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with half word fields']. >> + (aClass isVariable and: [aClass isDoubleWords]) >> + ifTrue: [^self error: 'cannot make a byte subclass of a >> class with double word fields']. >> (aClass isVariable and: [aClass isPointers]) >> ifTrue: [^self error: 'cannot make a byte subclass of a >> class with pointer fields']. >> oldClassOrNil := aClass environment at: t ifAbsent:[nil]. >> actualType := (oldClassOrNil notNil >> and: [oldClassOrNil typeOfClass == >> #compiledMethod]) >> ifTrue: [#compiledMethod] >> ifFalse: [#bytes]. >> env := CurrentEnvironment signal ifNil: [aClass environment]. >> ^self >> name: t >> inEnvironment: env >> subclassOf: aClass >> type: actualType >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat! >> >> Item was added: >> + ----- Method: ClassBuilder>>superclass:varia >> bleDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> + superclass: aClass >> + variableDoubleWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class in which the subclass is to >> + have indexable double-word-sized nonpointer variables." >> + | env | >> + (aClass instSize > 0) >> + ifTrue: [^self error: 'cannot make a double word subclass >> of a class with named fields']. >> + (aClass isVariable and: [aClass isBytes]) >> + ifTrue: [^self error: 'cannot make a double word subclass >> of a class with byte fields']. >> + (aClass isVariable and: [aClass isHalfWords]) >> + ifTrue: [^self error: 'cannot make a double word subclass >> of a class with half word fields']. >> + (aClass isVariable and: [aClass isWords]) >> + ifTrue: [^self error: 'cannot make a double word subclass >> of a class with word fields']. >> + (aClass isVariable and: [aClass isPointers]) >> + ifTrue: [^self error: 'cannot make a double word subclass >> of a class with pointer fields']. >> + env := CurrentEnvironment signal ifNil: [aClass environment]. >> + ^self >> + name: t >> + inEnvironment: env >> + subclassOf: aClass >> + type: #longs >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was added: >> + ----- Method: ClassBuilder>>superclass:varia >> bleHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> + superclass: aClass >> + variableHalfWordSubclass: t instanceVariableNames: f >> + classVariableNames: d poolDictionaries: s category: cat >> + "This is the standard initialization message for creating a new >> class as a >> + subclass of an existing class in which the subclass is to >> + have indexable half-word-sized nonpointer variables." >> + | env | >> + (aClass instSize > 0) >> + ifTrue: [^self error: 'cannot make a half word subclass >> of a class with named fields']. >> + (aClass isVariable and: [aClass isBytes]) >> + ifTrue: [^self error: 'cannot make a half word subclass >> of a class with byte fields']. >> + (aClass isVariable and: [aClass isWords]) >> + ifTrue: [^self error: 'cannot make a half word subclass >> of a class with word fields']. >> + (aClass isVariable and: [aClass isDoubleWords]) >> + ifTrue: [^self error: 'cannot make a half word subclass >> of a class with double word fields']. >> + (aClass isVariable and: [aClass isPointers]) >> + ifTrue: [^self error: 'cannot make a half word subclass >> of a class with pointer fields']. >> + env := CurrentEnvironment signal ifNil: [aClass environment]. >> + ^self >> + name: t >> + inEnvironment: env >> + subclassOf: aClass >> + type: #shorts >> + instanceVariableNames: f >> + classVariableNames: d >> + poolDictionaries: s >> + category: cat! >> >> Item was changed: >> ----- Method: ClassBuilder>>superclass:varia >> bleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: >> (in category 'public') ----- >> superclass: aClass >> variableWordSubclass: t instanceVariableNames: f >> classVariableNames: d poolDictionaries: s category: cat >> "This is the standard initialization message for creating a new >> class as a >> subclass of an existing class in which the subclass is to >> have indexable word-sized nonpointer variables." >> | env | >> (aClass instSize > 0) >> ifTrue: [^self error: 'cannot make a word subclass of a >> class with named fields']. >> (aClass isVariable and: [aClass isBytes]) >> ifTrue: [^self error: 'cannot make a word subclass of a >> class with byte fields']. >> + (aClass isVariable and: [aClass isHalfWords]) >> + ifTrue: [^self error: 'cannot make a word subclass of a >> class with half word fields']. >> + (aClass isVariable and: [aClass isDoubleWords]) >> + ifTrue: [^self error: 'cannot make a word subclass of a >> class with double word fields']. >> (aClass isVariable and: [aClass isPointers]) >> ifTrue: [^self error: 'cannot make a word subclass of a >> class with pointer fields']. >> env := CurrentEnvironment signal ifNil: [aClass environment]. >> ^self >> name: t >> inEnvironment: env >> subclassOf: aClass >> type: #words >> instanceVariableNames: f >> classVariableNames: d >> poolDictionaries: s >> category: cat! >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/6288619b/attachment.htm From nicolas.cellier.aka.nice at gmail.com Thu Oct 20 20:49:48 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 20 20:49:51 2016 Subject: [squeak-dev] The Trunk: Collections-nice.718.mcz In-Reply-To: <580927f8.2430ed0a.e154a.bd63SMTPIN_ADDED_MISSING@mx.google.com> References: <580927f8.2430ed0a.e154a.bd63SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Ah, we might have to change the server? 2016-10-20 22:24 GMT+02:00 : > Nicolas Cellier uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-nice.718.mcz > > ==================== Summary ==================== > > Name: Collections-nice.718 > Author: nice > Time: 20 October 2016, 10:23:53.462294 pm > UUID: 13d0b4c6-3da0-48a4-bf4e-789740593810 > Ancestors: Collections-nice.717, Collections-eem.717 > > Merge nice-717 for providing HalfWordArray and DoubleWordArray > > Rename HalfWord -> DoubleByte according to Eliot's protocol > > =============== Diff against Collections-nice.717 =============== > > Item was added: > ==== ERROR === > > Error: Unrecognized class type > > 20 October 2016 8:24:19.448 pm > > VM: unix - a SmalltalkImage > Image: Squeak3.11alpha [latest update: #8824] > > SecurityManager state: > Restricted: false > FileAccess: true > SocketAccess: true > Working Dir /home/squeaksource > Trusted Dir /home/squeaksource/secure > Untrusted Dir /home/squeaksource/My Squeak > > MCClassDefinition(Object)>>error: > Receiver: a MCClassDefinition(DoubleByteArray) > Arguments and temporary variables: > aString: 'Unrecognized class type' > Receiver's instance variables: > name: #DoubleByteArray > superclassName: #ArrayedCollection > variables: an OrderedCollection() > category: #'Collections-Arrayed' > type: #shorts > comment: 'HalfWordArrays store 16-bit unsigned > Integer values.' > commentStamp: 'nice 9/20/2016 23:37' > traitComposition: nil > classTraitComposition: nil > > MCClassDefinition>>kindOfSubclass > Receiver: a MCClassDefinition(DoubleByteArray) > Arguments and temporary variables: > > Receiver's instance variables: > name: #DoubleByteArray > superclassName: #ArrayedCollection > variables: an OrderedCollection() > category: #'Collections-Arrayed' > type: #shorts > comment: 'HalfWordArrays store 16-bit unsigned > Integer values.' > commentStamp: 'nice 9/20/2016 23:37' > traitComposition: nil > classTraitComposition: nil > > MCClassDefinition>>printDefinitionOn: > Receiver: a MCClassDefinition(DoubleByteArray) > Arguments and temporary variables: > stream: a WriteStream > Receiver's instance variables: > name: #DoubleByteArray > superclassName: #ArrayedCollection > variables: an OrderedCollection() > category: #'Collections-Arrayed' > type: #shorts > comment: 'HalfWordArrays store 16-bit unsigned > Integer values.' > commentStamp: 'nice 9/20/2016 23:37' > traitComposition: nil > classTraitComposition: nil > > [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: > Receiver: a MCDiffyTextWriter > Arguments and temporary variables: > definition: a WriteStream > s: a MCClassDefinition(DoubleByteArray) > Receiver's instance variables: > stream: a WriteStream > initStream: nil > > > --- The full stack --- > MCClassDefinition(Object)>>error: > MCClassDefinition>>kindOfSubclass > MCClassDefinition>>printDefinitionOn: > [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > String class(SequenceableCollection class)>>new:streamContents: > String class(SequenceableCollection class)>>streamContents: > MCDiffyTextWriter(MCTextWriter)>>chunkContents: > MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: > MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: > MCClassDefinition>>accept: > [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: > String class(SequenceableCollection class)>>new:streamContents: > String class(SequenceableCollection class)>>streamContents: > MCDiffyTextWriter(MCTextWriter)>>visitInFork: > MCDiffyTextWriter>>writePatchFrom:to: > MCDiffyTextWriter>>writeAddition: > [] in MCDiffyTextWriter>>writePatch: > SortedCollection(OrderedCollection)>>do: > MCDiffyTextWriter>>writePatch: > SSDiffyTextWriter>>writePatch: > [] in SSDiffyTextWriter>>writeVersion:for: > BlockClosure>>on:do: > SSDiffyTextWriter>>writeVersion:for: > [] in SSEMailSubscription>>versionAdded:to: > BlockClosure>>on:do: > SSEMailSubscription>>versionAdded:to: > [] in [] in SSProject>>versionAdded: > [] in BlockClosure>>newProcess > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/fb13dfb7/attachment.htm From nicolas.cellier.aka.nice at gmail.com Thu Oct 20 20:52:08 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 20 20:52:11 2016 Subject: [squeak-dev] please delay usage of source.squeak.org In-Reply-To: <5A41D85C-44B6-48D5-A4BE-63F22FE4EFB4@gmx.de> References: <5A41D85C-44B6-48D5-A4BE-63F22FE4EFB4@gmx.de> Message-ID: Oups, I hope my last commits arrived in time 2016-10-20 22:40 GMT+02:00 Tobias Pape : > Dear all, > > we're about to switch over source.squeak.org to the new infrastructure, > safe a few minor adjustments. Please cease commit to source.squeak.org > until Chris or a Box-admin says we're go again :) > > Thanks and best regards > -Tobias > (Somehow managing the infrastructure switch) > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/8a33251b/attachment.htm From Das.Linux at gmx.de Thu Oct 20 21:01:30 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 20 21:01:33 2016 Subject: [squeak-dev] please delay usage of source.squeak.org In-Reply-To: References: <5A41D85C-44B6-48D5-A4BE-63F22FE4EFB4@gmx.de> Message-ID: On 20.10.2016, at 22:52, Nicolas Cellier wrote: > Oups, I hope my last commits arrived in time Yes, no problem, I think you have a few more minutes :) Best regards -Tobias > > 2016-10-20 22:40 GMT+02:00 Tobias Pape : > Dear all, > > we're about to switch over source.squeak.org to the new infrastructure, > safe a few minor adjustments. Please cease commit to source.squeak.org > until Chris or a Box-admin says we're go again :) > > Thanks and best regards > -Tobias > (Somehow managing the infrastructure switch) > > > From nicolas.cellier.aka.nice at gmail.com Thu Oct 20 21:04:51 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 20 21:04:54 2016 Subject: [squeak-dev] please delay usage of source.squeak.org In-Reply-To: References: <5A41D85C-44B6-48D5-A4BE-63F22FE4EFB4@gmx.de> Message-ID: Don't delay any longer, I have nothing that urgent ;) 2016-10-20 23:01 GMT+02:00 Tobias Pape : > > On 20.10.2016, at 22:52, Nicolas Cellier gmail.com> wrote: > > > Oups, I hope my last commits arrived in time > > Yes, no problem, I think you have a few more minutes :) > > Best regards > -Tobias > > > > > 2016-10-20 22:40 GMT+02:00 Tobias Pape : > > Dear all, > > > > we're about to switch over source.squeak.org to the new infrastructure, > > safe a few minor adjustments. Please cease commit to source.squeak.org > > until Chris or a Box-admin says we're go again :) > > > > Thanks and best regards > > -Tobias > > (Somehow managing the infrastructure switch) > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161020/acc7d5e9/attachment.htm From commits at source.squeak.org Thu Oct 20 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Oct 20 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20161020215502.21732.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-October/069003.html Name: Monticello-nice.649 Ancestors: Monticello-mt.648 Support for half and double word variable subclasses ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069004.html Name: Monticello-nice.650 Ancestors: Monticello-nice.649, Monticello-eem.649 Merge eem.649 and nice.649 for 16bits and 64bits integer array. Adopt Eliot's "DoubleByte" rather than "HalfWord" ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069005.html Name: KernelTests-nice.312 Ancestors: KernelTests-mt.311 ClassBuilder tests for half and double word variable subclasses ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069006.html Name: KernelTests-nice.314 Ancestors: KernelTests-nice.313, KernelTests-nice.312 Merge nice.312 (tests for 16 and 64 bits integer array) Adopt Eliot's protocol: HalfWord -> DoubleByte isHalfWords -> isShorts isDoubleWords -> isLongs ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069007.html Name: Kernel-nice.1039 Ancestors: Kernel-bf.1038 Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069008.html Name: Kernel-nice.1040 Ancestors: Kernel-nice.1039 Prefer HalfWord to DoubleByte ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069009.html Name: Kernel-nice.1041 Ancestors: Kernel-nice.1040 The last bits of intSpec are zero, so no need to mask it. Those bits are used in instances only - see intSpec comment. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069010.html Name: Kernel-nice.1047 Ancestors: Kernel-tfel.1046, Kernel-nice.1041 Merge nice.1041 changes for 16/64 bits integer array By now all changes are superseded by Eliot's HalfWord -> DoubleByte isHalfWords -> isShorts isDoubleWords -> isLongs ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069011.html Name: Collections-nice.717 Ancestors: Collections-dtl.716 Introduce HalfWordArray and DoubleWordArray for positive 16 bits and 64 bits integer elements. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069012.html Name: CollectionsTests-nice.268 Ancestors: CollectionsTests-pre.267 Provide some tests for half-word, word and double-word arrays (positive 16, 32 and 64 bits integer elements). At time of writing, half and double words require VM improvments. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069013.html Name: Collections-nice.718 Ancestors: Collections-nice.717, Collections-eem.717 Merge nice-717 for providing HalfWordArray and DoubleWordArray Rename HalfWord -> DoubleByte according to Eliot's protocol ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069014.html Name: CollectionsTests-nice.269 Ancestors: CollectionsTests-nice.268 Rename HalfWord -> DoubleByte according to Eliot's protocol ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069015.html Name: Collections-nice.719 Ancestors: Collections-nice.718 Let reversed preserve Interval class. Handle the case of empty Interval specially (preserve the bounds). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-October/069016.html Name: CollectionsTests-nice.270 Ancestors: CollectionsTests-nice.269 Test Interval reversed and sum ============================================= From lewis at mail.msen.com Fri Oct 21 00:32:39 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Oct 21 00:32:42 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1039.mcz In-Reply-To: References: <58092259.d5a3370a.843e8.e693SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <20161021003239.GA69192@shell.msen.com> The names Byte, HalfWord, Word, and DoubleWord sound good to me. The term "double-byte" is commonly used with reference to strings. Dave On Thu, Oct 20, 2016 at 01:10:41PM -0700, Eliot Miranda wrote: > Nicolas, > > I thought that there had been a conversation about this and that Bert > had expressed a preference for DoubleByte and DoubleWord. Hence I kept to > that. If I'm mistaken forgive me. But personally I don't like HalfWord. > t's as ambiguous as word. At least DoubleByte is not ambiguous. > > On Thu, Oct 20, 2016 at 12:59 PM, wrote: > > > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > > http://source.squeak.org/trunk/Kernel-nice.1039.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-nice.1039 > > Author: nice > > Time: 20 September 2016, 11:00:27.302558 pm > > UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f > > Ancestors: Kernel-bf.1038 > > > > Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are > > possible in Spur format, but yet not exploited. > > > > =============== Diff against Kernel-bf.1038 =============== > > From tmoldere at vub.ac.be Fri Oct 21 09:29:19 2016 From: tmoldere at vub.ac.be (Tim Molderez) Date: Fri Oct 21 09:29:21 2016 Subject: [squeak-dev] 2017: Call for papers Message-ID: <6d03e635-cee2-97c3-5fb0-b71e41061f8f@vub.ac.be> 2017 : The Art, Science, and Engineering of Programming April 3-6, 2017, Brussels, Belgium http://2017.programming-conference.org We started a new conference and journal focused on everything to do with programming, including the experience of programming. We call the conference for short. Paper submissions and publications are handled by the journal. Accepted papers must be presented at the conference. ******************************************************** CALL FOR PAPERS ******************************************************** 2017 accept scholarly papers including essays that advance the knowledge of programming. Almost anything about programming is in scope, but in each case there should be a clear relevance to the act and experience of programming. PAPER SUBMISSIONS: December 1, 2016 We accept submissions covering several areas of expertise. These areas include, but are not limited to: ? General-purpose programming ? Distributed systems programming ? Parallel and multi-core programming ? Graphics and GPU programming ? Security programming ? User interface programming ? Database programming ? Visual and live programming ? Data mining and machine learning programming ? Interpreters, virtual machines and compilers ? Modularity and separation of concerns ? Model-based development ? Metaprogramming and reflection ? Testing and debugging ? Program verification ? Programming education ? Programming environments ? Social coding ******************************************************** CALL FOR WORKSHOP PROPOSALS ******************************************************** To build a community and to foster an environment where participants can exchange ideas and experiences related to practical software development, ?Programming? will host a number of workshops, during the days before the main conference. The workshops will provide a collaborative forum to exchange recent and/or preliminary results, to conduct intensive discussions on a particular topic, or to coordinate efforts between representatives of a technical community. They are intended as a forum for lively discussion of innovative ideas, recent progress, or practical experience on programming and applied software development in general for specific aspects, specific problems, or domain-specific needs. We also encourage practical, hands-on workshops in which participants actually experience one or several aspects of practical software development. WORKSHOP PROPOSAL SUBMISSIONS: November 15, 2016 The duration of workshops is in general one day, but we encourage the submission of half-day workshop proposals on focused topics as well. In exceptional situations, e.g., for workshops that involve actual practice of programming-related activities, workshop organizers can request a 2 day workshop slot. If desired, the workshop proceedings can be published in the ACM Digital Library. ******************************************************** IMPORTANT DATES ******************************************************** Research paper submissions: December 1, 2016 Research paper first notifications: February 1, 2017 Research paper final notifications: March 7, 2017 Workshop proposals: November 15, 2016 PX 2017 workshop submissions: January 15, 2017 Poster abstract submissions: January 16, 2017 ******************************************************** ORGANIZATION ******************************************************** General Chair: Theo D'Hondt, Vrije Universiteit Brussel Local Organizing Chair: Wolfgang De Meuter, Vrije Universiteit Brussel Program Chair: Crista V. Lopes, University of California, Irvine Organizing Committee: J?rg Kienzle (workshops), McGill University Hidehiko Masuhara (demos), Tokyo Institute of Technology Ralf L?mmel (contest), University of Koblenz-Landau Jennifer Sartor (posters), Vrije Universiteit Brussel Tobias Pape (web technology), HPI - University of Potsdam Tim Molderez (publicity), Vrije Universiteit Brussel Program Committee: Andrew Black, Portland State University Shigeru Chiba, University of Tokyo Yvonne Coady, University of Victoria Robby Findler, Northwestern University Lidia Fuentes, Universidad de M?laga Richard Gabriel, IBM Research Elisa Gonzalez Boix, Vrije Universiteit Brussel Jeff Gray, University of Alabama Robert Hirschfeld, HPI - University of Potsdam Roberto Ierusalimschy, Pontif?cia Universidade Cat?lica do Rio de Janeiro J?rg Kienzle, McGill University Hidehiko Masuhara, Tokyo Institute of Technology Sasa Misailovic, University of Illinois at Urbana-Champaign Guido Salvaneschi, Technische Universit?t Darmstadt Mario S?dholt, Ecole des mines de Nantes Jurgen Vinju, Centrum Wiskunde & Informatica Tijs van der Storm, Centrum Wiskunde & Informatica ******************************************************** 2017 is kindly supported by: ACM in-cooperation ACM SIGPLAN in-cooperation ACM SIGSOFT in-cooperation AOSA Vrije Universiteit Brussel ******************************************************** For more information, visit http://2017.programming-conference.org From lecteur at zogotounga.net Fri Oct 21 09:50:50 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Fri Oct 21 09:50:54 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: Message-ID: <5925a1f5-361c-66c3-7fc5-c30881ea5d12@zogotounga.net> > isEmpty > self do: [:element| ^false]. > ^true Nice one. Stef From brasspen at gmail.com Fri Oct 21 15:28:28 2016 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Oct 21 15:28:37 2016 Subject: [squeak-dev] Xtreams: Debugging Grammars Message-ID: <68e9e4a0-fc67-9180-a16b-75050f8c36fc@gmail.com> >When I evaluate: > parser := PEGParser parserPEG parse: 'Grammar' stream: PEGParser grammarEmailAddress actor: PEGParserParser new. >I get: KeyNotFound: key 'quotedstring' not found in Dictionary >How am I supposed to debug that to find the typo in my giant string above?! Hi Sean, Your error is saying is that there is no key called 'quotedstring' in the dictionary in the grammar ivar of your parser. In each parser is a grammar ivar. It contains a dictionary. The values of the dictionary are graphs of compiled blocks. Each node of the graph is a block with arguments that are blocks that have arguments that are blocks, etc. It's a graph of compiled blocks. Try this. Add in PEGParser class. grammar3Names " a grammar to create a parser to sort three names as per page 24 of Grune's book Parsing Techniques (1990)" ^'Sentence <- NAME NAME <- "tom" / "dick" / "harry" ' Now execute this. (PEGParser parserBootstrap) parse: 'Grammar' stream: PEGParser grammar3Names reading actor: PEGParserGenerator new. That will show you the code that will create the dictionary in the grammar ivar. Now make a change. myparser := (PEGParser parserBootstrap) parse: 'Grammar' stream: PEGParser grammar3Names reading actor: PEGParserParser new. You generated the parser, not the code for the parser. To use the parser. myparser parse: 'Sentence' stream: 'harry' reading actor: nil Now let's look at the same thing in three ways. PEGParser>>#grammarPEG this is the grammar PEGParser>>#parserBootstrap this is the code generated by the PEGParserGenerator from grammarPEG PEGParser>>#parserPEG this is the parser returned by PEGParserParser from grammarPEG You will see that PEGParser parserBootstrap and PEGParser parserPEG are interchangeable anywhere. In fact, if the goal is to populate the grammar ivar with a dictionary to make a parser, then #parserPEG starts to grate on one's nerves, because you already have what you need in the grammar ivar by evaluating PEGParser parserBootstrap. #parserPEG compiles the grammarPEG using PEGParserParser into the grammar ivar to make a parser, but it's the exact same as what was already there. It's irritating. I'll release some examples in a package called Xtreamly some time before Christmas to help start understanding Xtreams-Parsing. HTH, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161021/ea4a3735/attachment-0001.htm From ma.chris.m at gmail.com Fri Oct 21 17:50:17 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Oct 21 17:51:00 2016 Subject: [squeak-dev] source.squeak.org is back up Message-ID: Tobias and I just completed the server upgrade for source.squeak.org. Everything looks fine, but please let us know if you encounter any issues. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161021/d3272243/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Oct 21 18:28:32 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Oct 21 18:28:36 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: References: Message-ID: I've ediited the configuration update-pre.394.mcm which had a nil repository, but maybe it's got nothing to do with infrastructure change... And I wanted to add my own configuration update-nice-395.mcm Unfortunately, it looks like MCM browser save button does not upload anything on server. 2016-10-21 19:50 GMT+02:00 Chris Muller : > Tobias and I just completed the server upgrade for source.squeak.org. > > Everything looks fine, but please let us know if you encounter any issues. > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161021/a347aa2a/attachment.htm From Das.Linux at gmx.de Fri Oct 21 18:40:00 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Oct 21 18:40:04 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: References: Message-ID: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> Hi, On 21.10.2016, at 20:28, Nicolas Cellier wrote: > I've ediited the configuration update-pre.394.mcm which had a nil repository, but maybe it's got nothing to do with infrastructure change... > And I wanted to add my own configuration update-nice-395.mcm > > Unfortunately, it looks like MCM browser save button does not upload anything on server. The front-server (alan) looks good. And also squeaksource's log said that the put worked. Chris, can you look whether you see something in the image? Best regards -Tobias From asqueaker at gmail.com Fri Oct 21 18:48:25 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 21 18:49:12 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> References: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> Message-ID: > Chris, can you look whether you see something in the image? Yes. From asqueaker at gmail.com Fri Oct 21 20:42:25 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Oct 21 20:43:07 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: References: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> Message-ID: None of the MCConfigs' got their "repository" variable populated in the conversion to the new image, I think because the class-schema changed and SqueakSource code uses ReferenceStream instead of SmartRefStream. So, I'm going to try exporting/importing with SmartRefStream and restart the server. I'll keep you posted. On Fri, Oct 21, 2016 at 1:48 PM, Chris Muller wrote: >> Chris, can you look whether you see something in the image? > > Yes. From monty2 at programmer.net Fri Oct 21 22:59:48 2016 From: monty2 at programmer.net (monty) Date: Fri Oct 21 22:59:52 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work Message-ID: All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. From asqueaker at gmail.com Sat Oct 22 01:07:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Oct 22 01:07:58 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: References: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> Message-ID: Okay, back up. Your configs should be good now Nicolas. Please let me know if you notice any other issues. - Chris PS -- There is something wrong with SmartRefStream, it could not get the object out of the old 3.11 image and into the new 5.1-based image, even with Bert's new enhancement, which did get it working with ReferenceStream. But since the schema changed, we couldn't use ReferenceStream. So, I actually had to load an old version of Ma Serializer in that image to export it, along with some hacking. Ugh. On Fri, Oct 21, 2016 at 3:42 PM, Chris Muller wrote: > None of the MCConfigs' got their "repository" variable populated in > the conversion to the new image, I think because the class-schema > changed and SqueakSource code uses ReferenceStream instead of > SmartRefStream. > > So, I'm going to try exporting/importing with SmartRefStream and > restart the server. > > I'll keep you posted. > > > On Fri, Oct 21, 2016 at 1:48 PM, Chris Muller wrote: >>> Chris, can you look whether you see something in the image? >> >> Yes. From eliot.miranda at gmail.com Sat Oct 22 03:26:54 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Oct 22 03:26:59 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: Message-ID: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Hi Monty, what happens if you add an isEmpty implement ration based in size to SequenceableCollection? _,,,^..^,,,_ (phone) > On Oct 21, 2016, at 3:59 PM, monty wrote: > > All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. > > Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. > From monty2 at programmer.net Sat Oct 22 04:48:08 2016 From: monty2 at programmer.net (monty) Date: Sat Oct 22 04:48:12 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> References: , <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Putting #size-based implementations in abstract Collection subclasses negates the lazy collection benefit and still penalizes non-abstract direct Collection subclasses like CharacterSet and any user-defined direct Collection subclass implemented using composition with forwarding to a concrete collection. If the default linear complexity of #size and #isEmpty bothers you so much, make #size a subclassResponsiblity like #do: instead of suddenly penalizing collections whose authors actually did the right thing by providing a non-linear #size implementation. > Sent: Friday, October 21, 2016 at 11:26 PM > From: "Eliot Miranda" > To: "The general-purpose Squeak developers list" > Subject: Re: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work > > Hi Monty, > > what happens if you add an isEmpty implement ration based in size to SequenceableCollection? > > _,,,^..^,,,_ (phone) > > > On Oct 21, 2016, at 3:59 PM, monty wrote: > > > > All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. > > > > Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. > > > > From nicolas.cellier.aka.nice at gmail.com Sat Oct 22 12:41:05 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Oct 22 12:41:08 2016 Subject: [squeak-dev] source.squeak.org is back up In-Reply-To: References: <3A035271-99CE-4297-B9C6-7237C532980C@gmx.de> Message-ID: Thanks, seems OK by now. 2016-10-22 3:07 GMT+02:00 Chris Muller : > Okay, back up. Your configs should be good now Nicolas. Please let > me know if you notice any other issues. > > - Chris > > PS -- There is something wrong with SmartRefStream, it could not get > the object out of the old 3.11 image and into the new 5.1-based image, > even with Bert's new enhancement, which did get it working with > ReferenceStream. But since the schema changed, we couldn't use > ReferenceStream. So, I actually had to load an old version of Ma > Serializer in that image to export it, along with some hacking. Ugh. > > > > On Fri, Oct 21, 2016 at 3:42 PM, Chris Muller wrote: > > None of the MCConfigs' got their "repository" variable populated in > > the conversion to the new image, I think because the class-schema > > changed and SqueakSource code uses ReferenceStream instead of > > SmartRefStream. > > > > So, I'm going to try exporting/importing with SmartRefStream and > > restart the server. > > > > I'll keep you posted. > > > > > > On Fri, Oct 21, 2016 at 1:48 PM, Chris Muller > wrote: > >>> Chris, can you look whether you see something in the image? > >> > >> Yes. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161022/31143ae3/attachment.htm From nicolas.cellier.aka.nice at gmail.com Sat Oct 22 12:42:43 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Oct 22 12:42:48 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Please retry with latest trunk version. 2016-10-22 6:48 GMT+02:00 monty : > Putting #size-based implementations in abstract Collection subclasses > negates the lazy collection benefit and still penalizes non-abstract direct > Collection subclasses like CharacterSet and any user-defined direct > Collection subclass implemented using composition with forwarding to a > concrete collection. If the default linear complexity of #size and #isEmpty > bothers you so much, make #size a subclassResponsiblity like #do: instead > of suddenly penalizing collections whose authors actually did the right > thing by providing a non-linear #size implementation. > > > Sent: Friday, October 21, 2016 at 11:26 PM > > From: "Eliot Miranda" > > To: "The general-purpose Squeak developers list" squeakfoundation.org> > > Subject: Re: [squeak-dev] Re: The defaullt implementation of isEmpty > might do too much work > > > > Hi Monty, > > > > what happens if you add an isEmpty implement ration based in size to > SequenceableCollection? > > > > _,,,^..^,,,_ (phone) > > > > > On Oct 21, 2016, at 3:59 PM, monty wrote: > > > > > > All non-trivial collections implement #size or inherit a custom > implementation, usually just as a return of an inst var. Your #do:-based > one is 3x as slow in my tests, so you've now made #isEmpty slower for every > collection that implements #size just to benefit ones whose careless > authors didn't and so the implementors of lazy collections have one fewer > message to override. > > > > > > Do not do this. People already avoid #ifEmpty: and related messages > where performance matters and shouldn't have to avoid #isEmpty too. > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161022/b2953d01/attachment.htm From jakob.reschke at student.hpi.de Sat Oct 22 21:07:08 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Sat Oct 22 21:07:33 2016 Subject: [squeak-dev] DateAndTime>>offset: returns different instant Message-ID: Hi all, the comment in DateAndTime>>offset: reads: > Answer a equivalent to the receiver but with its local time > being offset from UTC by offset. But the result of #offset: does not represent the same instant of time: dt := DateAndTime now. dt " 2016-10-22T22:18:12.003779+02:00" dt offset: 3 hours " 2016-10-22T22:18:12.003779+03:00" dt = (dt offset: 3 hours) "false" In Pharo, things behave differently: dt := DateAndTime now. "2016-10-22T22:21:07.097583+02:00" dt offset: 3 hours. "2016-10-22T23:21:07.097583+03:00" dt = (dt offset: 3 hours) "true" ...thus portability is broken. Looks like #utcOffset: does what #offset: seemed to promise in my understanding: dt = (dt utcOffset: 3 hours) "true" So, in my effort of porting some code from Pharo to Squeak, I have to replace offset: by utcOffset:. Is the comment in #offset: inaccurate, or did I misunderstand it? Would you agree that a clarification would be helpful? Was DateAndTime handling ever portable? Best regards, Jakob From tim at rowledge.org Mon Oct 24 00:18:10 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 24 00:18:04 2016 Subject: [squeak-dev] MQTT for Squeak? Message-ID: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> I?m having all sorts of fun making some weather station and environmental sensors with assorted Pi and ESP8266 boards and I need a nice way to make the sensor nodes report back to base. Since the ESP8266 modules don?t run squeak (shame!) I?m using Arduino-c++ (blech) on them, and since the weather sensor code already existed in python (double-blech) I?m using that on the weather-pi board. I?ve been recommended to look at MQTT as a way to bind them all together and from what little sense I can make of the assorted stuff that googling had lead me to (good grief, so much acronym laden gibberish) it looks like it might do the job. Googling for a squeak mqtt package has revealed nothing thus far so I?m now appealing to the list for any news. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- O! Plus! Perge! Aio! Hui! Hem! = Oh! More! Go on! Yes! Ooh! Ummm! From btc at openinworld.com Mon Oct 24 01:01:18 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Oct 24 01:01:42 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> Message-ID: On Mon, Oct 24, 2016 at 8:18 AM, tim Rowledge wrote: > I?m having all sorts of fun making some weather station and environmental sensors with assorted Pi and ESP8266 boards and I need a nice way to make the sensor nodes report back to base. Since the ESP8266 modules don?t run squeak (shame!) I?m using Arduino-c++ (blech) on them, and since the weather sensor code already existed in python (double-blech) I?m using that on the weather-pi board. I?ve been recommended to look at MQTT as a way to bind them all together and from what little sense I can make of the assorted stuff that googling had lead me to (good grief, so much acronym laden gibberish) it looks like it might do the job. > > Googling for a squeak mqtt package has revealed nothing thus far so I?m now appealing to the list for any news. Sven did a RabbitMQ client for Pharo, and maybe such non-gui stuff is close enough to Squeak to adapt... https://github.com/svenvc/docs/blob/master/neo/stamp.md RabbitMQ has a MQTT adaptor... https://www.rabbitmq.com/mqtt.html but this article notes some detractions depending on your use case... https://scargill.wordpress.com/2015/01/02/a-world-of-mqtt-on-esp8266/ cheers -ben From monty2 at programmer.net Mon Oct 24 04:36:46 2016 From: monty2 at programmer.net (monty) Date: Mon Oct 24 04:36:47 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> , Message-ID: The latest trunk has numerous custom #isEmpty implementations, but that doesn't help custom collections outside the image not inheriting one. I maintain cross-platform projects that have such collections, like XPath with XPathFunctionSet or the BitmapCharacterSet package it relies on. Both are Collection subclasses, and now I feel like I should add this: isEmpty ^ self size = 0 to every single collection I maintain. Why not just make #size a subclassResponsibility or add abstract superclasses for lazy or infinite collections that implement #isEmpty using #do: and change #size to shouldNotImplement? >Sent: Saturday, October 22, 2016 at 8:42 AM >From: "Nicolas Cellier" >To: "The general-purpose Squeak developers list" >Subject: Re: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work > >Please retry with latest trunk version. > >2016-10-22 6:48 GMT+02:00 monty :Putting #size-based implementations in abstract Collection subclasses negates the lazy collection benefit and still penalizes non-abstract direct Collection subclasses like CharacterSet and any user-defined direct Collection subclass implemented using composition with forwarding to a concrete collection. If the default linear complexity of #size and #isEmpty bothers you so much, make #size a subclassResponsiblity like #do: instead of suddenly penalizing collections whose authors actually did the right thing by providing a non-linear #size implementation. > >> Sent: Friday, October 21, 2016 at 11:26 PM >> From: "Eliot Miranda" >> To: "The general-purpose Squeak developers list" >> Subject: Re: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work > >> >> Hi Monty, >> >> what happens if you add an isEmpty implement ration based in size to SequenceableCollection? >> >> _,,,^..^,,,_ (phone) >> >> > On Oct 21, 2016, at 3:59 PM, monty wrote: >> > >> > All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. >> > >> > Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. >> > >> >> From goran at krampe.se Mon Oct 24 07:57:53 2016 From: goran at krampe.se (=?UTF-8?Q?G=c3=b6ran_Krampe?=) Date: Mon Oct 24 07:57:57 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> Message-ID: <19043738-cbd0-c460-3634-7e4784119d05@krampe.se> Hey! On 10/24/2016 02:18 AM, tim Rowledge wrote: > I?m having all sorts of fun making some weather station and > environmental sensors with assorted Pi and ESP8266 boards and I need > a nice way to make the sensor nodes report back to base. Since the > ESP8266 modules don?t run squeak (shame!) I?m using Arduino-c++ > (blech) on them, and since the weather sensor code already existed in > python (double-blech) I?m using that on the weather-pi board. I?ve > been recommended to look at MQTT as a way to bind them all together > and from what little sense I can make of the assorted stuff that > googling had lead me to (good grief, so much acronym laden gibberish) > it looks like it might do the job. MQTT is indeed a very good easy protocol, it's simply publish/subscribe on topics - but it's designed for low bandwidth and IoT etc. I have written some articles on using MQTT with our Evothings (where I work) tool (making Cordova mobile apps using js). > Googling for a squeak mqtt package has revealed nothing thus far so > I?m now appealing to the list for any news. Mmm, I haven't hacked up an MQTT library - BUT... I did hack up a NATS library just a few weeks back. There are several open source MQTT servers around (VerneMQ is nice) that are easy to fire up - and you also have WebSockets support (we use the Paho library). Perhaps you could port Paho? Not sure if the code is nice enough to read. regards, G?ran From bert at freudenbergs.de Mon Oct 24 08:31:22 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Oct 24 08:31:25 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: On Monday, 24 October 2016, monty wrote: > Why not just make #size a subclassResponsibility or add abstract > superclasses for lazy or infinite collections that implement #isEmpty using > #do: and change #size to shouldNotImplement? > Because #do: is the only method required to be overridden by Collection subclasses. All other methods are implemented in terms of #do:. So yes, if your Collection subclass has an optimized implementation for #isEmpty, then provide it. That is a small price to pay for making a class work optimally across different code bases. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161024/43efcbda/attachment.htm From timfelgentreff at gmail.com Mon Oct 24 11:37:43 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Mon Oct 24 11:37:59 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org Message-ID: Hi, I cannot commit anything to trunk, connections time out right at the end of the upload. Can anyone check the server? cheers, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161024/5d38af3a/attachment.htm From nicolas.cellier.aka.nice at gmail.com Mon Oct 24 12:16:19 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Oct 24 12:16:23 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org In-Reply-To: References: Message-ID: I see file Etoys-tfel.268.mcz listed but access also times out... Also there seem to be no more diff generated in the mailing list? 2016-10-24 13:37 GMT+02:00 Tim Felgentreff : > Hi, > > I cannot commit anything to trunk, connections time out right at the end > of the upload. Can anyone check the server? > > cheers, > Tim > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161024/25ff0563/attachment.htm From nicolas.cellier.aka.nice at gmail.com Mon Oct 24 12:20:01 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Mon Oct 24 12:20:04 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org In-Reply-To: References: Message-ID: And I can browse it thru web interface http://source.squeak.org/trunk/EToys-tfel.268.diff 2016-10-24 14:16 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > I see file Etoys-tfel.268.mcz listed but access also times out... > Also there seem to be no more diff generated in the mailing list? > > 2016-10-24 13:37 GMT+02:00 Tim Felgentreff : > >> Hi, >> >> I cannot commit anything to trunk, connections time out right at the end >> of the upload. Can anyone check the server? >> >> cheers, >> Tim >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161024/68c04118/attachment.htm From Das.Linux at gmx.de Mon Oct 24 12:24:16 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Oct 24 12:24:20 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org In-Reply-To: References: Message-ID: On 24.10.2016, at 14:16, Nicolas Cellier wrote: > I see file Etoys-tfel.268.mcz listed but access also times out... > Also there seem to be no more diff generated in the mailing list? yes, not configured yet. sry > > 2016-10-24 13:37 GMT+02:00 Tim Felgentreff : > Hi, > > I cannot commit anything to trunk, connections time out right at the end of the upload. Can anyone check the server? > > cheers, > Tim > > > > > From tim at rowledge.org Mon Oct 24 17:12:42 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 24 17:12:37 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> Message-ID: Thanks Ben, > On 23-10-2016, at 6:01 PM, Ben Coman wrote: > [snip] > Sven did a RabbitMQ client for Pharo, and maybe such non-gui stuff is > close enough to Squeak to adapt... > https://github.com/svenvc/docs/blob/master/neo/stamp.md > > RabbitMQ has a MQTT adaptor... > https://www.rabbitmq.com/mqtt.html More than half of what I read there went so far over my head I couldn?t even see contrails. STOMP? Multiple plugins for a system that claims to be really simple and small? Argh! Maybe if I look into the code it might make some sense. > > but this article notes some detractions depending on your use case... > https://scargill.wordpress.com/2015/01/02/a-world-of-mqtt-on-esp8266/ Happily my use case is about as simple as I could imagine; several devices - probably one Pi and a bunch of ESP8266 nodes - publishing some small amounts of data every 15 minutes or so, and one recipient wanting to get that data to make pretty graphs and stuff. AIUI that means having a broker in the middle. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Change is inevitable....except from vending machines. From tim at rowledge.org Mon Oct 24 17:31:12 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 24 17:31:05 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <19043738-cbd0-c460-3634-7e4784119d05@krampe.se> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <19043738-cbd0-c460-3634-7e4784119d05@krampe.se> Message-ID: <3C2B80DA-4F30-4143-BD8C-2A56DAD3FEE4@rowledge.org> > On 24-10-2016, at 12:57 AM, G?ran Krampe wrote: > > Hey! Yo! > [snip] > > MQTT is indeed a very good easy protocol, it's simply publish/subscribe on topics - but it's designed for low bandwidth and IoT etc. I have written some articles on using MQTT with our Evothings (where I work) tool (making Cordova mobile apps using js). > >> Googling for a squeak mqtt package has revealed nothing thus far so >> I?m now appealing to the list for any news. > > Mmm, I haven't hacked up an MQTT library - BUT... I did hack up a NATS library just a few weeks back. And NATS is ? So many acronyms, so little TOT[1] > > There are several open source MQTT servers around (VerneMQ is nice) that are easy to fire up Goodness me. Erlang? Session balancing? Reporting to Graphite? I just love how the VerneMQ github .md starts with ?an extremely simple and lightweight? and then shortly after has a long list of very much not simple nor lightweight features. I guess if one is digging into all this it probably all starts to seem terribly mundane after a while. > - and you also have WebSockets support (we use the Paho library). Looks like we have WebSockets in 5.1; all the tests seems to be happy in TestRunner at least. > > Perhaps you could port Paho? Not sure if the code is nice enough to read. AFAICT it?s 2000 lines of JS, which may actually count as simple. It would help if I read JS of course, which I don?t. Hey, I have an idea - Marcel! Isn?t this a perfect thing for one of your students to tackle? So much stuff at HPI seems to be working with things across the net. Just imagine the things that could be done with a squeak mqtt wotsit to talk from Etoys or NuScratch to, well, whatever. tim [1] TLA Overload Tolerance[2] [2] Too many Letter Acronym -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Ne auderis delere orbem rigidum meum! = Don't you dare erase my hard disk! From ron at usmedrec.com Mon Oct 24 18:00:08 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Mon Oct 24 18:00:40 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <3C2B80DA-4F30-4143-BD8C-2A56DAD3FEE4@rowledge.org> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <19043738-cbd0-c460-3634-7e4784119d05@krampe.se> <3C2B80DA-4F30-4143-BD8C-2A56DAD3FEE4@rowledge.org> Message-ID: <149e01d22e20$757308b0$60591a10$@usmedrec.com> From: tim Rowledge Sent: Monday, October 24, 2016 1:31 PM > On 24-10-2016, at 12:57 AM, G?ran Krampe wrote: > > Hey! Yo! > [snip] > > MQTT is indeed a very good easy protocol, it's simply publish/subscribe on topics - but it's designed for low bandwidth and IoT etc. I have written some articles on using MQTT with our Evothings (where I work) tool (making Cordova mobile apps using js). > >> Googling for a squeak mqtt package has revealed nothing thus far so >> I?m now appealing to the list for any news. > > Mmm, I haven't hacked up an MQTT library - BUT... I did hack up a NATS library just a few weeks back. And NATS is ? [Ron Teitelbaum] http://nats.io/ From eliot.miranda at gmail.com Mon Oct 24 18:56:17 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Oct 24 18:56:22 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: On Mon, Oct 24, 2016 at 1:31 AM, Bert Freudenberg wrote: > On Monday, 24 October 2016, monty wrote: > >> Why not just make #size a subclassResponsibility or add abstract >> superclasses for lazy or infinite collections that implement #isEmpty using >> #do: and change #size to shouldNotImplement? >> > > Because #do: is the only method required to be overridden by Collection > subclasses. All other methods are implemented in terms of #do:. > +1 > So yes, if your Collection subclass has an optimized implementation for > #isEmpty, then provide it. That is a small price to pay for making a class > work optimally across different code bases. > > - Bert - > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161024/3684cd16/attachment.htm From tonyg at ccs.neu.edu Mon Oct 24 19:16:28 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Mon Oct 24 19:16:31 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> Message-ID: <7f7ba8eb-fc52-5c32-52c6-1aa8d9a9e770@ccs.neu.edu> On 10/24/2016 01:12 PM, tim Rowledge wrote: > Happily my use case is about as simple as I could imagine; several > devices - probably one Pi and a bunch of ESP8266 nodes - publishing > some small amounts of data every 15 minutes or so, and one recipient > wanting to get that data to make pretty graphs and stuff. AIUI that > means having a broker in the middle. Can your devices make HTTP requests? I'd POST the data to something in the middle, and GET it from the rendering bit. (Or use the filesystem directly, if the rendering bit is conveniently located at the same place as the POST-receiving server.) You might find the recently-published W3C PubSub draft of interest: https://www.w3.org/TR/pubsub/ Regards, Tony From tim at rowledge.org Mon Oct 24 19:29:21 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 24 19:29:19 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <7f7ba8eb-fc52-5c32-52c6-1aa8d9a9e770@ccs.neu.edu> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <7f7ba8eb-fc52-5c32-52c6-1aa8d9a9e770@ccs.neu.edu> Message-ID: > On 24-10-2016, at 12:16 PM, Tony Garnock-Jones wrote: > > On 10/24/2016 01:12 PM, tim Rowledge wrote: >> Happily my use case is about as simple as I could imagine; several >> devices - probably one Pi and a bunch of ESP8266 nodes - publishing >> some small amounts of data every 15 minutes or so, and one recipient >> wanting to get that data to make pretty graphs and stuff. AIUI that >> means having a broker in the middle. > > Can your devices make HTTP requests? Oh definitely; Raspberry Pi are real computers. ESP8266 things are tiny and faintly Arduino-like but my goodness, people make them do amazing things for $3. I have one on my desk right now that just has a DHT22 temp/humidity sensor attached, running a simple REST server that returns JSON data. Squeak?s Json class talks to it perfectly well and of course a plain ol?webbrowser can simply connect to the IP address on port 80 to get the raw json text. It?s just code from https://openhomeautomation.net/connect-esp8266-raspberry-pi/ > > I'd POST the data to something in the middle, and GET it from the > rendering bit. (Or use the filesystem directly, if the rendering bit is > conveniently located at the same place as the POST-receiving server.) I have to admit to having thought of doing the direct thing earlier but my interest in mqtt was piqued by discussions with a fellow Makerspace member. We had a kids drop-in-make over the weekend and one of the ?classes? was making pine derby cars. Some of the kids went all out to make them beautiful and I started thinking it might be nice to add LED head/tail lights. Then it occurred to me that for $3 we could add an ESP and control those lights from wifi. Then we got carried away and realised that for 50c you could add a piezo speaker and do horn and motor noises. And crash noises too I guess. Then it grew to having the sloped track equipped with a couple of electromagnets to hold the cars in place and release them simultaneously to start the race. Since the ESP does mqtt very easily (apparently!) it seems an obvious thing to consider. There seems to be a lot of fun stuff one could do given an mqtt wotsit for Squeak, not to mention Scratch & Etoys. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim It said, "Insert disk #3," but only two will fit! From tim at rowledge.org Mon Oct 24 19:45:59 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Oct 24 19:45:53 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <7f7ba8eb-fc52-5c32-52c6-1aa8d9a9e770@ccs.neu.edu> Message-ID: Oh, I?ve found a plain C version that might make enough sense to me. https://eclipse.org/paho/clients/c/ and code at https://github.com/eclipse/paho.mqtt.c tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim New: It comes in different colors from the previous version. From lewis at mail.msen.com Tue Oct 25 00:59:16 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 25 00:59:19 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> Message-ID: <20161025005916.GA6362@shell.msen.com> On Mon, Oct 24, 2016 at 10:12:42AM -0700, tim Rowledge wrote: > Thanks Ben, > > > On 23-10-2016, at 6:01 PM, Ben Coman wrote: > > [snip] > > > Sven did a RabbitMQ client for Pharo, and maybe such non-gui stuff is > > close enough to Squeak to adapt... > > https://github.com/svenvc/docs/blob/master/neo/stamp.md > > > > RabbitMQ has a MQTT adaptor... > > https://www.rabbitmq.com/mqtt.html > > More than half of what I read there went so far over my head I couldn???t even see contrails. STOMP? Multiple plugins for a system that claims to be really simple and small? Argh! Maybe if I look into the code it might make some sense. > > > > > but this article notes some detractions depending on your use case... > > https://scargill.wordpress.com/2015/01/02/a-world-of-mqtt-on-esp8266/ > > Happily my use case is about as simple as I could imagine; several devices - probably one Pi and a bunch of ESP8266 nodes - publishing some small amounts of data every 15 minutes or so, and one recipient wanting to get that data to make pretty graphs and stuff. AIUI that means having a broker in the middle. > If I can believe what I a reading here: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Introduction then the actual protocol is straightforward, and could be implemented in Smalltalk directly. I have done a number of projects like that, mainly in Java but inspired by a design that was originally done in Smalltalk. If you put it together with classes to represent the messages that you want to read and write on the network, along with a bunch of unit tests to convince yourself that you did it right, then the result is simple and reliable and much better than anything you could implement with a VM plugin or FFI to a library that somebody else wrote. I am assuming that that the "broker" is something that you downloaded from the internet and run on your Raspberry Pi, so that all you really need is a way for Squeak to read and write the messages that interact with the broker. Dave From asqueaker at gmail.com Tue Oct 25 02:07:39 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 25 02:08:23 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Normally its the Subclasses where implementation-specific optimizations are done, not in the top abstractions. At the level of Collection, the code should be elegant, expressive, and defining of the responsibilities by the messages it sends. #size is something of Collection, period, there is nothing wrong with sending it, and checking size = 0 is more elegant than a block activation with non-local return. As a community that respects its user base, we need to consider the *type* of damage that "Change it!" could cause to existing production applications. These applications were built on the expressive implementation, but now they'll be sending #do: to that SQLCollection instead of #size, which will cause the database to retrieve a full ResultSet, send it back to the client, just so it can answer #isEmpty. Its this kind of "silent" damage that is the worst. Because its invisible, not a an error, not a blow up. Just an degradation in performance (ironic, given our motive here) which, believably, would not be caught in testing. I agree with Monty. Collection is abstract, there will never be an instance of it. No self-respecting subclass needs this optimized, and trying to optimize it way up there forces too many assumptions about implementation. It makes the code less expressive while silently inflicting potentially performance-killing pain onto legacy applications until they're forced to sprinkle duplicate #isEmpty implementations all about.. On Mon, Oct 24, 2016 at 3:31 AM, Bert Freudenberg wrote: > On Monday, 24 October 2016, monty wrote: >> >> Why not just make #size a subclassResponsibility or add abstract >> superclasses for lazy or infinite collections that implement #isEmpty using >> #do: and change #size to shouldNotImplement? > > > Because #do: is the only method required to be overridden by Collection > subclasses. All other methods are implemented in terms of #do:. > > So yes, if your Collection subclass has an optimized implementation for > #isEmpty, then provide it. That is a small price to pay for making a class > work optimally across different code bases. > > - Bert - > > > From asqueaker at gmail.com Tue Oct 25 03:18:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 25 03:18:59 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Since Smalltalk-80, sends to #do: have been considered expensive, and sends to #size, inexpensive. And so it has been okay for applications which defined their own Collection subclasses, to add a few milliseconds of cost to something that's already considered expensive (#do:), and not to something which is expected to be fast (#size). ** For 30 years applications were built on these assumptions. Even I did it in Magma. #isEmpty was built on that assumption. Subclass implementors have seemed to agree to these assumptions too, and made their implementations true to them.. May we please reconsider this change? On Mon, Oct 24, 2016 at 9:07 PM, Chris Muller wrote: > Normally its the Subclasses where implementation-specific > optimizations are done, not in the top abstractions. At the level of > Collection, the code should be elegant, expressive, and defining of > the responsibilities by the messages it sends. #size is something of > Collection, period, there is nothing wrong with sending it, and > checking size = 0 is more elegant than a block activation with > non-local return. > > As a community that respects its user base, we need to consider the > *type* of damage that "Change it!" could cause to existing production > applications. These applications were built on the expressive > implementation, but now they'll be sending #do: to that SQLCollection > instead of #size, which will cause the database to retrieve a full > ResultSet, send it back to the client, just so it can answer #isEmpty. > > Its this kind of "silent" damage that is the worst. Because its > invisible, not a an error, not a blow up. Just an degradation in > performance (ironic, given our motive here) which, believably, would > not be caught in testing. > > I agree with Monty. Collection is abstract, there will never be an > instance of it. No self-respecting subclass needs this optimized, and > trying to optimize it way up there forces too many assumptions about > implementation. It makes the code less expressive while silently > inflicting potentially performance-killing pain onto legacy > applications until they're forced to sprinkle duplicate #isEmpty > implementations all about.. > > On Mon, Oct 24, 2016 at 3:31 AM, Bert Freudenberg wrote: >> On Monday, 24 October 2016, monty wrote: >>> >>> Why not just make #size a subclassResponsibility or add abstract >>> superclasses for lazy or infinite collections that implement #isEmpty using >>> #do: and change #size to shouldNotImplement? >> >> >> Because #do: is the only method required to be overridden by Collection >> subclasses. All other methods are implemented in terms of #do:. >> >> So yes, if your Collection subclass has an optimized implementation for >> #isEmpty, then provide it. That is a small price to pay for making a class >> work optimally across different code bases. >> >> - Bert - >> >> >> From monty2 at programmer.net Tue Oct 25 04:33:23 2016 From: monty2 at programmer.net (monty) Date: Tue Oct 25 04:33:26 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> , Message-ID: Except #do: isn't the only method required to be overridden. #add: and #remove:ifAbsent: are also abstract. > Sent: Monday, October 24, 2016 at 4:31 AM > From: "Bert Freudenberg" > To: "The general-purpose Squeak developers list" > Subject: Re: [squeak-dev] The defaullt implementation of isEmpty might do too much work > On Monday, 24 October 2016, monty wrote:Why not just make #size a subclassResponsibility or add abstract superclasses for lazy or infinite collections that implement #isEmpty using #do: and change #size to shouldNotImplement? > > Because #do: is the only method required to be overridden by Collection subclasses. All other methods are implemented in terms of #do:. > > So yes, if your Collection subclass has an optimized implementation for #isEmpty, then provide it. That is a small price to pay for making a class work optimally across different code bases. > > - Bert - From nicolas.cellier.aka.nice at gmail.com Tue Oct 25 08:30:10 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 25 08:30:14 2016 Subject: [squeak-dev] autopsy of a nasty environment bug Message-ID: "Create a foreign environment importing all from Smalltalk globals" foreign := Environment withName: #Foreign. foreign exportSelf. foreign import: Smalltalk globals. "Bind a new global" fooKey := #ClassVarScopeFoo. fooValue := Smalltalk globals at: fooKey put: Object basicNew. fooBinding := Smalltalk globals bindingOf: fooKey. self assert: (foreign bindingOf: fooKey) == fooBinding. "Unbind the global: it is moved to, and shared by both undeclared" Smalltalk globals removeKey: fooKey. self assert: (Smalltalk globals undeclared associationAt: fooKey) == fooBinding. self assert: (foreign undeclared associationAt: fooKey) == fooBinding. "Create a class var: the undeclared binding is moved to classPool. This is questionable, it was a global with potentially larger/different scope." parent := Object subclass: #ClassVarScopeParent instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Dummy-Tests-Class'. child := parent subclass: #ClassVarScopeChild instanceVariableNames: '' classVariableNames: 'ClassVarScopeFoo' poolDictionaries: '' category: 'Dummy-Tests-Class'. self assert: (child classPool associationAt: fooKey) == fooBinding. "The global is no more in Smalltalk globals undeclared" self assert: (Smalltalk globals undeclared includesKey: fooKey) not. "But it is still in foreign undeclared" self assert: (foreign undeclared associationAt: fooKey) == fooBinding. "Rebind a new global" fooValue := Smalltalk globals at: fooKey put: Object basicNew. globalFooBinding := Smalltalk globals bindingOf: fooKey. "The binding has been removed from foreign undeclared" self assert: (foreign undeclared includesKey: fooKey) not. self assert: (foreign bindingOf: fooKey) == globalFooBinding. "But because #showBinding: did use a becomeForward: the class pool and global bindings are now surprisingly fused. That explains that a foreign environment importing Smalltalk globals is enough to make ClassVarScopeTest fail" self assert: globalFooBinding == fooBinding. self assert: (child classPool associationAt: fooKey) == globalFooBinding. "save our souls" classes := { child. parent }. child := parent := nil. classes do: [ :each | each removeFromChanges; removeFromSystemUnlogged ]. classes := nil. Smalltalk globals removeKey: fooKey. foreign destroy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/48e183d5/attachment.htm From bert at freudenbergs.de Tue Oct 25 11:03:43 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Oct 25 11:03:46 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: On Tue, Oct 25, 2016 at 6:33 AM, monty wrote: > Except #do: isn't the only method required to be overridden. #add: and > #remove:ifAbsent: are also abstract. > Only for extensible subclasses. These *can not* be implemented in terms of #do: so they have to be implemented in a subclass. Collection provides a maximum of protocol with a minimum of methods required to be overridden. This discussion is besides the point though. I was just pointing out that requiring #size or #isEmpty to be a subclass responsibility is not a good idea, because they can and should be implemented in terms of #do:. Whether #isEmpty should be implemented in terms of #size is a wholly different issue. Chris has some valid points about historical performance trade-offs which are worth discussing. My take is that if we don't know *anything* about the subclass, we have to assume that #size can be way more expensive than a single iteration of #do: (e.g. a linked list). So using #do: is the sensible default implementation for #isEmpty. If OTOH a subclass has a very expensive #do:, then it's reasonable to assume that it would avoid doing much work if it is in fact empty. If a Collection subclass did rely on an implementation detail of its superclass performance-wise then this is unfortunate, but easy to fix by implementing #isEmpty in terms of #size. We shouldn't let that get in the way of making our base libraries more elegant. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/f406006f/attachment.htm From nicolas.cellier.aka.nice at gmail.com Tue Oct 25 13:11:28 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 25 13:11:32 2016 Subject: [squeak-dev] Re: autopsy of a nasty environment bug In-Reply-To: References: Message-ID: Some lessons from this snippet: - if several undeclared share the same binding, then we should rebind all at once, not just some - the undeclared shall better point weakly to the bindings, letting them being garbaged collected if possible - what do we expect when we have two unrelated bindings #Foo->nil in envA undeclared and envB undeclared, then import envA into envB (envB import: envA)? I would expect (envB undeclared associationAt: #Foo) becomeForward: (envA undeclared associationAt: #Foo)... - moving a binding from undeclared to some classPool/sharedPool (PoolDictionary) is completely ignoring the variable scope by now, which may lead to erroneous re-binding. I don't see obvious solution for the last point (testing that all references to the binding are reachable by the defining class scope thru methodDictionary and subclasses methodDictionary?). For PoolDictionary, it's even more tough (going thru all classes sharing this poolDictionary). I didn't see any attempt at handling the case when both environment A & B declare a variable Foo, and environment C imports both A and B... This is another problem but may lead to other requirements on undeclared handling. 2016-10-25 10:30 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > "Create a foreign environment importing all from Smalltalk globals" > foreign := Environment withName: #Foreign. > foreign exportSelf. > foreign import: Smalltalk globals. > > "Bind a new global" > fooKey := #ClassVarScopeFoo. > fooValue := Smalltalk globals at: fooKey put: Object basicNew. > fooBinding := Smalltalk globals bindingOf: fooKey. > self assert: (foreign bindingOf: fooKey) == fooBinding. > > "Unbind the global: it is moved to, and shared by both undeclared" > Smalltalk globals removeKey: fooKey. > self assert: (Smalltalk globals undeclared associationAt: fooKey) == > fooBinding. > self assert: (foreign undeclared associationAt: fooKey) == fooBinding. > > "Create a class var: the undeclared binding is moved to classPool. > This is questionable, it was a global with potentially > larger/different scope." > parent := Object > subclass: #ClassVarScopeParent > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'Dummy-Tests-Class'. > child := parent > subclass: #ClassVarScopeChild > instanceVariableNames: '' > classVariableNames: 'ClassVarScopeFoo' > poolDictionaries: '' > category: 'Dummy-Tests-Class'. > self assert: (child classPool associationAt: fooKey) == fooBinding. > > "The global is no more in Smalltalk globals undeclared" > self assert: (Smalltalk globals undeclared includesKey: fooKey) not. > "But it is still in foreign undeclared" > self assert: (foreign undeclared associationAt: fooKey) == fooBinding. > > "Rebind a new global" > fooValue := Smalltalk globals at: fooKey put: Object basicNew. > globalFooBinding := Smalltalk globals bindingOf: fooKey. > > "The binding has been removed from foreign undeclared" > self assert: (foreign undeclared includesKey: fooKey) not. > self assert: (foreign bindingOf: fooKey) == globalFooBinding. > > "But because #showBinding: did use a becomeForward: the class pool and > global bindings are now surprisingly fused. > That explains that a foreign environment importing Smalltalk globals > is enough to make ClassVarScopeTest fail" > self assert: globalFooBinding == fooBinding. > self assert: (child classPool associationAt: fooKey) == > globalFooBinding. > > "save our souls" > classes := { child. parent }. > child := parent := nil. > classes do: [ :each | > each > removeFromChanges; > removeFromSystemUnlogged ]. > classes := nil. > Smalltalk globals removeKey: fooKey. > foreign destroy. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/b9639c47/attachment.htm From asqueaker at gmail.com Tue Oct 25 19:45:41 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Oct 25 19:46:24 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: > My take is that if we don't know *anything* about the subclass, we have to > assume that #size can be way more expensive than a single iteration of #do: > (e.g. a linked list). I don't understand this. How could #size ever be "way more expensive" than a single iteration of #do:? Based on the implementation in Collection, that's impossible.. > So using #do: is the sensible default implementation > for #isEmpty. If OTOH a subclass has a very expensive #do:, then it's > reasonable to assume that it would avoid doing much work if it is in fact > empty. > > If a Collection subclass did rely on an implementation detail of its > superclass performance-wise then this is unfortunate, Well that's precisely what this change does! We're trying to fix some hypothetical subclass to "rely" on this implementation detail way up in Collection.. > but easy to fix by > implementing #isEmpty in terms of #size. You ignored the "silent damage" argument, that someone wouldn't even KNOW it needs fixing. Besides, the fix should be made in the subclass which doesn't have a fast #size. Folks there is NO BASIS at the level of Collection for assuming that do: [ : each | ^ false ] is faster than ^self size=0. In fact, the proper assumption is the opposite -- that #size is the optimized method, not #do:. > We shouldn't let that get in the > way of making our base libraries more elegant. It makes them LESS elegant, because of 1) the violation of the assumption that #size is faster than #do:, plus 2) the associated duplication of code that will be required across multiple subclasses just to recover that original faster implementation, which they used to inherit. Doesn't that matter? I don't think the burden of proof should be on the legacy method, but on the new implementation which purports some improvement. This change sounded good in the ivory towser, but can anyone identify *one single place* in the real-world where this change is beneficial? Because the detractors are potentially very real... From Das.Linux at gmx.de Tue Oct 25 20:03:31 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 25 20:03:37 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: On 25.10.2016, at 21:45, Chris Muller wrote: > Folks there is NO BASIS at the level of Collection for assuming that > do: [ : each | ^ > false ] is faster than ^self size=0. In fact, the proper assumption > is the opposite -- that #size is the optimized method, not #do:. I don't understand on what _either_ performance-assumption is grounded. Since I've apparently not been around since the early years of either ST-80 or Squeak, can someone enlighten me here? Both ways seem somewhat reasonable: `self size = 0` is simple, easy to understand on first sight and said here to be more expensive than `self do: [:ea | ^false]`, which is clever[1], possibly needs a double-take (or comment), but has a certain appeal of wholeness[2]. Best regards -Tobias [1]: sadly, cleverness in software typically is a drawback. [2]: I mean, the minimalism that is possible by just using/providing #do: somehow conveys closure/completeness From tim at rowledge.org Tue Oct 25 20:14:18 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Oct 25 20:14:23 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: > On 25-10-2016, at 1:03 PM, Tobias Pape wrote: > [1]: sadly, cleverness in software typically is a drawback. Important point here; since debugging typically requires more cleverness than writing, making the code as clever as possible almost guarantees it cannot be debugged. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- An 8086 in a StrongARM environment. From tim at rowledge.org Tue Oct 25 20:19:16 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Oct 25 20:19:20 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <20161025005916.GA6362@shell.msen.com> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> Message-ID: <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> > On 24-10-2016, at 5:59 PM, David T. Lewis wrote: > > If I can believe what I a reading here: > > http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Introduction > > then the actual protocol is straightforward, and could be implemented in Smalltalk > directly. I?m hoping the claims for simplicity are correct! Certainly it can?t be horrendously complex because there just wouldn?t be room for it on a tiny thing like a ESP8266 otherwise. (And think for a moment - that?s a ?tiny? thing that has a 32bit 80MHz cpu with 64Kb of code ram and 96Kb of data ram and wifi. We would have killed for that much not so very long ago) > I am assuming that that the "broker" is something that you downloaded from the internet > and run on your Raspberry Pi, so that all you really need is a way for Squeak to read > and write the messages that interact with the broker. Pretty much, at least for now. I suppose one might want a broker in squeak some day just because. I guess I?ll read more and see if I can recall anything about using sockets - a subject that has always confused me more than a bit. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: LAG: Load and Garble From eliot.miranda at gmail.com Tue Oct 25 20:49:13 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 25 20:49:20 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Hi Tobias, Hi All, On Tue, Oct 25, 2016 at 1:03 PM, Tobias Pape wrote: > > On 25.10.2016, at 21:45, Chris Muller wrote: > > > Folks there is NO BASIS at the level of Collection for assuming that > > do: [ : each | ^ > > false ] is faster than ^self size=0. In fact, the proper assumption > > is the opposite -- that #size is the optimized method, not #do:. > > I don't understand on what _either_ performance-assumption is grounded. > Since I've apparently not been around since the early years of either > ST-80 or Squeak, can someone enlighten me here? > > Both ways seem somewhat reasonable: > `self size = 0` is simple, easy to understand on first sight and said > here to be more expensive than `self do: [:ea | ^false]`, which is clever[1], possibly needs a > double-take (or comment), but has a certain appeal of wholeness[2]. > self size = 0 doesn't work for infinite collections. The suggested implementation of isEmpty does indeed require a comment (I didn't implement it) but it does work for infinite collections. The suggested implementation os isEmpty is also faster than elf size = 0 for any collection of sufficient size. For example: | b n | b := Bag someInstance. n := 100000. { b size. [1 to: n do: [:ign| b isEmptyOId]] timeToRun. [1 to: n do: [:ign| b isEmpty]] timeToRun } #(20402 3293 21) and the cut off is quite low: | n | n := 10000. ((1 to: 10) collect: [:iguana| (1 to: SmallInteger maxVal) detect: [:i| b := (1 to: i) asBag. [1 to: n do: [:ign| b isEmptyOId]] timeToRun > [1 to: n do: [:ign| b isEmpty]] timeToRun]]) average asFloat 4.9 So for collections that are 5 elements or more the "clever" implementation is faster. Best regards > -Tobias > > [1]: sadly, cleverness in software typically is a drawback. > [2]: I mean, the minimalism that is possible by just using/providing #do: > somehow conveys closure/completeness > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/8dbf28ac/attachment-0001.htm From eliot.miranda at gmail.com Tue Oct 25 20:54:52 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Oct 25 20:54:56 2016 Subject: [squeak-dev] New protocols dialog Message-ID: Hats off to whoever (Marcel?) implemented the new protocol selection dialog such that one no longer as to select "new..." and interact with a second dialog and can merely type the new protocol right there. This has been bugging me for years. Thank you! _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/b4e7649c/attachment.htm From nicolas.cellier.aka.nice at gmail.com Tue Oct 25 21:35:41 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 25 21:35:44 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Hi, Chris, Monty, Tim, did you see the implementation of Collection>>size? size "Answer how many elements the receiver contains." | tally | tally := 0. self do: [:each | tally := tally + 1]. ^ tally Let's forget a minute about specific subclasses. Does iterating over the whole collection is really the best idea for implementing isEmpty? When we implement a message in Collection, we should think in term of Collection, not Interval, Set nor Array. We're talking of several things here: - universality of the default implementation: we don't need to know about the size to tell if empty not all collection have a known size - optimization: old implementation is fast for collections having an optimized size, catastrophic for others. new implementation is reasonably fast, and full optimization can be restored with a few 1-liner. - cleverness: IMO this is not more clever than, and quite logically connected to implementation of size I agree that having several implementations for the sake of optimization is not ideal. That's what would have curbed my enthusiasm. Though I doubt about any noticeable slowdown in anything else than micro-benchmarks. 2016-10-25 22:49 GMT+02:00 Eliot Miranda : > Hi Tobias, Hi All, > > On Tue, Oct 25, 2016 at 1:03 PM, Tobias Pape wrote: > >> >> On 25.10.2016, at 21:45, Chris Muller wrote: >> >> > Folks there is NO BASIS at the level of Collection for assuming that >> > do: [ : each | ^ >> > false ] is faster than ^self size=0. In fact, the proper assumption >> > is the opposite -- that #size is the optimized method, not #do:. >> >> I don't understand on what _either_ performance-assumption is grounded. >> Since I've apparently not been around since the early years of either >> ST-80 or Squeak, can someone enlighten me here? >> >> Both ways seem somewhat reasonable: >> `self size = 0` is simple, easy to understand on first sight and said >> here to be more expensive than > > `self do: [:ea | ^false]`, which is clever[1], possibly needs a >> double-take (or comment), but has a certain appeal of wholeness[2]. >> > > self size = 0 doesn't work for infinite collections. The suggested > implementation of isEmpty does indeed require a comment (I didn't implement > it) but it does work for infinite collections. The suggested implementation > os isEmpty is also faster than elf size = 0 for any collection of > sufficient size. > > For example: > > | b n | > b := Bag someInstance. > n := 100000. > { b size. [1 to: n do: [:ign| b isEmptyOId]] timeToRun. [1 to: n do: > [:ign| b isEmpty]] timeToRun } #(20402 3293 21) > > and the cut off is quite low: > > > | n | > n := 10000. > ((1 to: 10) collect: > [:iguana| > (1 to: SmallInteger maxVal) detect: > [:i| > b := (1 to: i) asBag. > [1 to: n do: [:ign| b isEmptyOId]] timeToRun > [1 to: n do: [:ign| b > isEmpty]] timeToRun]]) average asFloat 4.9 > > So for collections that are 5 elements or more the "clever" implementation > is faster. > > Best regards >> -Tobias >> >> [1]: sadly, cleverness in software typically is a drawback. >> [2]: I mean, the minimalism that is possible by just using/providing #do: >> somehow conveys closure/completeness >> > > > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161025/a9eab4b4/attachment.htm From ma.chris.m at gmail.com Tue Oct 25 21:54:52 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Oct 25 21:55:35 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Hi Tobias and Eliot, >> > Folks there is NO BASIS at the level of Collection for assuming that >> > do: [ : each | ^ >> > false ] is faster than ^self size=0. In fact, the proper assumption >> > is the opposite -- that #size is the optimized method, not #do:. >> >> I don't understand on what _either_ performance-assumption is grounded. Exactly. The original basis for making this change is groundless. > self size = 0 doesn't work for infinite collections. What's an infinite collection, and why wouldn't self size = 0 work for its #isEmpty? I assume it will need to override #size, so if it answers Float infinity then #isEmpty is false. What's not working? And, irregardless, custom collections like that define what THEY need to work properly (e.g., #size, #isEmpty, whatever) in their own class, not going changing 30-year old base library code to make themselves work.. > The suggested implementation of isEmpty does indeed require a comment (I didn't implement it) but it does work for infinite collections. The suggested implementation os isEmpty is also faster than elf size = 0 for any collection of sufficient size. > > For example: > > | b n | > b := Bag someInstance. > n := 100000. > { b size. [1 to: n do: [:ign| b isEmptyOId]] timeToRun. [1 to: n do: [:ign| b isEmpty]] timeToRun } #(20402 3293 21) > > and the cut off is quite low: > > > | n | > n := 10000. > ((1 to: 10) collect: > [:iguana| > (1 to: SmallInteger maxVal) detect: > [:i| > b := (1 to: i) asBag. > [1 to: n do: [:ign| b isEmptyOId]] timeToRun > [1 to: n do: [:ign| b isEmpty]] timeToRun]]) average asFloat 4.9 > > So for collections that are 5 elements or more the "clever" implementation is faster. Then add Bag>>#isEmpty, don't change Collection>>#isEmpty, because it changes a 30-year old assumption about how #isEmpty works for every other kind of Collection. From nicolas.cellier.aka.nice at gmail.com Tue Oct 25 22:54:10 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Oct 25 22:54:13 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org In-Reply-To: References: Message-ID: 2016-10-24 14:24 GMT+02:00 Tobias Pape : > > On 24.10.2016, at 14:16, Nicolas Cellier gmail.com> wrote: > > > I see file Etoys-tfel.268.mcz listed but access also times out... > > Also there seem to be no more diff generated in the mailing list? > > yes, not configured yet. > sry > > Hi Tobias, could it be restored soon? That's the most usefull thing in the trunk update/review process. without it, we're blind and naked... > > > > 2016-10-24 13:37 GMT+02:00 Tim Felgentreff : > > Hi, > > > > I cannot commit anything to trunk, connections time out right at the end > of the upload. Can anyone check the server? > > > > cheers, > > Tim > > > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/5f2a2b80/attachment.htm From Das.Linux at gmx.de Tue Oct 25 23:09:39 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 25 23:09:44 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: <03E302A0-3173-48F9-AE6B-A40B27A7F02B@gmx.de> On 25.10.2016, at 23:54, Chris Muller wrote: > Hi Tobias and Eliot, > >>>> Folks there is NO BASIS at the level of Collection for assuming that >>>> do: [ : each | ^ >>>> false ] is faster than ^self size=0. In fact, the proper assumption >>>> is the opposite -- that #size is the optimized method, not #do:. >>> >>> I don't understand on what _either_ performance-assumption is grounded. > > Exactly. The original basis for making this change is groundless. No Chris, I said I don't understand _both_ assumptions. > >> self size = 0 doesn't work for infinite collections. > > What's an infinite collection, For example, a generator? or a right-open interval? [...] >> ts or more the "clever" implementation is faster. > > Then add Bag>>#isEmpty, don't change Collection>>#isEmpty, because it > changes a 30-year old assumption about how #isEmpty works for every > other kind of Collection. Kent Beck gives this example for 'Simple Delegation': Object subclass: #Vector instanceVariableNames: ?elements? Vector>>do: aBlock elements do: aBlock It seems the #do:-based implementation is 'more correct' here. I found no other recommendation in either Beck's or Thomas' style guides. To _me_ this suggests that what you perceive as 30-year-old-assumption is not as universal as '#do: should suffice'. Best regards -Tobias From Das.Linux at gmx.de Tue Oct 25 23:11:21 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Oct 25 23:11:25 2016 Subject: [squeak-dev] Connection timeouts committing to source.squeak.org In-Reply-To: References: Message-ID: <0651C274-756F-457A-AFAF-D1E35080A287@gmx.de> On 26.10.2016, at 00:54, Nicolas Cellier wrote: > > > 2016-10-24 14:24 GMT+02:00 Tobias Pape : > > On 24.10.2016, at 14:16, Nicolas Cellier wrote: > > > I see file Etoys-tfel.268.mcz listed but access also times out... > > Also there seem to be no more diff generated in the mailing list? > > yes, not configured yet. > sry > > > Hi Tobias, > could it be restored soon? > That's the most usefull thing in the trunk update/review process. > without it, we're blind and naked... It's in the works. Sadly, getting mail right isn't easy. I have however some mails that bounced in my possession, I'll forward them shortly. The rest, as I said, Work In Progress, sorry. Best regards -Tobias > > > > > > 2016-10-24 13:37 GMT+02:00 Tim Felgentreff : > > Hi, > > > > I cannot commit anything to trunk, connections time out right at the end of the upload. Can anyone check the server? > > > > cheers, > > Tim > > > > > > > > > > > > > > From lewis at mail.msen.com Tue Oct 25 23:42:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Oct 25 23:42:57 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: Message-ID: <20161025234255.GA49147@shell.msen.com> On Sat, Oct 22, 2016 at 12:59:48AM +0200, monty wrote: > All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. > > Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. I like Eliot's new implementation, in part because it teaches the reader something about how iteration works. It is still simple enough for an inexperienced person to read, but it also challenges the reader to think about the control flow. That said, I suspect that Monty and Chris are among the people with the most real-world experience in dealing with performance on very large collections. So, I would like to ask from a strictly practical point of view, does the change that we are discussing here cause real-world problems for Gemstone and Magma applications? Does the change make the maintenance of large collection classes more difficult for cross-dialect portability? Are there any collection classes (especially in Gemstone and Magma) that become slower in a real-world measurable sense as a result of this change? Dave From smalltalker2 at mac.com Wed Oct 26 02:17:56 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Wed Oct 26 02:18:00 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: <20161025234255.GA49147@shell.msen.com> References: <20161025234255.GA49147@shell.msen.com> Message-ID: +1. Sent from my iPhone > On Oct 25, 2016, at 16:42, David T. Lewis wrote: > >> On Sat, Oct 22, 2016 at 12:59:48AM +0200, monty wrote: >> All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. >> >> Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. > > I like Eliot's new implementation, in part because it teaches the reader something > about how iteration works. It is still simple enough for an inexperienced person > to read, but it also challenges the reader to think about the control flow. > > That said, I suspect that Monty and Chris are among the people with the most > real-world experience in dealing with performance on very large collections. > > So, I would like to ask from a strictly practical point of view, does the change > that we are discussing here cause real-world problems for Gemstone and Magma > applications? > > Does the change make the maintenance of large collection classes more difficult > for cross-dialect portability? > > Are there any collection classes (especially in Gemstone and Magma) that become > slower in a real-world measurable sense as a result of this change? > > Dave > > From asqueaker at gmail.com Wed Oct 26 04:40:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 04:41:13 2016 Subject: [squeak-dev] The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <31FBDF99-A8BF-4F61-B79B-4C2ADCA82038@gmail.com> Message-ID: Hi Nicolas, I understand the angle you are seeing this from, but these we distill these points down, we end up with no real-world value; but some unintended negatives, in fact.. > did you see the implementation of Collection>>size? > > size > "Answer how many elements the receiver contains." > > | tally | > tally := 0. > self do: [:each | tally := tally + 1]. > ^ tally > > Let's forget a minute about specific subclasses. > Does iterating over the whole collection is really the best idea for > implementing isEmpty? Asking this question is already assuming too much. Collection>>#isEmpty should not be optimized in terms of another method two sends away. Collection is the ivory tower which only codifies the elegant definitions of the general behaviors. We should let the subclasses be concerned with the nitty-gritty implementation details needed to go crazy with their (less elegant) optimizations. **We shouldn't try to make performance optimizations in Collection. > When we implement a message in Collection, we should think in term of > Collection, not Interval, Set nor Array. The old implementation already was implemented in terms of Collection. > We're talking of several things here: > - universality of the default implementation: The old implementation was universal. #size always has and always will be part of Collection. > we don't need to know about the size to tell if empty Not any more than we need to avoid it. Not any more than we need to initiate a #do: enumeration (which is very expensive for some). > not all collection have a known size So what will happen if they're sent #size then? If #shouldNotImplement then they will override #isEmpty. > - optimization: > old implementation is fast for collections having an optimized size, > catastrophic for others. Those are more rare, they should override #isEmpty for their specific needs. > new implementation is reasonably fast, and full optimization can be > restored with a few 1-liner. "Reasonably fast" for which subclass? We can't ignore the subclasses. > - cleverness: > IMO this is not more clever than, and quite logically connected to > implementation of size > > I agree that having several implementations for the sake of optimization is > not ideal. It told me something was amiss with this change. Too many subclasses disagree. > That's what would have curbed my enthusiasm. > Though I doubt about any noticeable slowdown in anything else than > micro-benchmarks. The SQLCollection example would be a large degradation. ----- It all distills down to slightly-negative. We should revert it. From asqueaker at gmail.com Wed Oct 26 04:42:24 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 04:43:07 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: <20161025234255.GA49147@shell.msen.com> References: <20161025234255.GA49147@shell.msen.com> Message-ID: I agreed that it looked good in the ivory tower. The thing is, there are these real-world detractors which we should not igore. To save my old fingers, let me just summarize them from the earlier posts. In summary: - it provides no known material benefit - it could affect unsuspecting legacy application performance materially, and in an insidious way - it's an anomalous usage of the API which works against performance expectations about #size and #do:. - the justification for this change (performance optimization) in Collection is not valid in the first place. No real-world positives, just negatives or zeros. Please revert. On Tue, Oct 25, 2016 at 6:42 PM, David T. Lewis wrote: > On Sat, Oct 22, 2016 at 12:59:48AM +0200, monty wrote: >> All non-trivial collections implement #size or inherit a custom implementation, usually just as a return of an inst var. Your #do:-based one is 3x as slow in my tests, so you've now made #isEmpty slower for every collection that implements #size just to benefit ones whose careless authors didn't and so the implementors of lazy collections have one fewer message to override. >> >> Do not do this. People already avoid #ifEmpty: and related messages where performance matters and shouldn't have to avoid #isEmpty too. > > I like Eliot's new implementation, in part because it teaches the reader something > about how iteration works. It is still simple enough for an inexperienced person > to read, but it also challenges the reader to think about the control flow. > > That said, I suspect that Monty and Chris are among the people with the most > real-world experience in dealing with performance on very large collections. > > So, I would like to ask from a strictly practical point of view, does the change > that we are discussing here cause real-world problems for Gemstone and Magma > applications? > > Does the change make the maintenance of large collection classes more difficult > for cross-dialect portability? > > Are there any collection classes (especially in Gemstone and Magma) that become > slower in a real-world measurable sense as a result of this change? > > Dave > > From craig at blackpagedigital.com Wed Oct 26 09:00:44 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Wed Oct 26 09:01:40 2016 Subject: [squeak-dev] re: MQTT for Squeak? In-Reply-To: <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> Message-ID: Hi Tim-- > ...I guess I?ll read more and see if I can recall anything about > using sockets - a subject that has always confused me more than a bit. I'd be happy to help if you like. Also, the WebSockets support in Squeak works fine. I use it heavily in the upcoming release of Context. -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From Das.Linux at gmx.de Wed Oct 26 11:34:52 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:34:54 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: Begin forwarded message: > > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: Tests-nice.357.mcz > Message-Id: > > Nicolas Cellier uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-nice.357.mcz > > ==================== Summary ==================== > > Name: Tests-nice.357 > Author: nice > Time: 24 October 2016, 6:55:45.875833 pm > UUID: e92aa9b0-5e9c-7742-8bfd-8daaf6662145 > Ancestors: Tests-mt.356 > > We must explicitely import #Object from Smalltalk globals when we want to compile method accessing Object into another environment. > > =============== Diff against Tests-mt.356 =============== > > Item was changed: > ----- Method: EnvironmentTest>>testStoreDomesticValue (in category 'compiling tests') ----- > testStoreDomesticValue > "Create a class that implements #doStore. > (see the comment in #storeValueMethod.) > Send the message, then examine the results. > The two values should be identical." > > | griffle values | > env importSelf. > + env from: Smalltalk globals import: #Object. > self createClass: #Griffle. > env bind: #Plonk to: value. > > griffle := env at: #Griffle. > griffle compile: self storeValueMethod. > values := griffle new doStore. > > self assert: values isArray. > self assert: values size = 2. > self assert: values first == values last. > self assert: (env valueOf: #Plonk) == values first! > > Item was changed: > ----- Method: EnvironmentTest>>testStoreImportedValue (in category 'compiling tests') ----- > testStoreImportedValue > "Create a class that implements #doStore. > Import #Plonk from another environment. > (see the comment in #storeValueMethod.) > Send the message, then examine the results. > The two values should be identical." > > | griffle foreign values | > self createClass: #Griffle. > foreign := Environment withName: #Foreign. > foreign exportSelf. > foreign at: #Plonk put: 'v1'. > env from: foreign import: #Plonk. > + env from: Smalltalk globals import: #Object. > > griffle := env at: #Griffle. > griffle compile: self storeValueMethod. > values := griffle new doStore. > > self assert: values isArray. > self assert: values size = 2. > self assert: values first == values last. > self assert: (foreign at: #Plonk) == values first! > From Das.Linux at gmx.de Wed Oct 26 11:35:17 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:35:18 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: Begin forwarded message: > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: EToys-tfel.268.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.268.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.268 > Author: tfel > Time: 24 October 2016, 11:33:16.574614 am > UUID: ea95b449-4d49-994b-a6b1-0b9d17104ab0 > Ancestors: EToys-eem.267 > > - refactor addInstVarNames: to go through Player class>>addInstVarName: > - small cleanups > > =============== Diff against EToys-eem.267 =============== > > Item was changed: > ----- Method: Class>>addInstVarNames: (in category '*Etoys-Squeakland-instance variables') ----- > addInstVarNames: aCollection > > | newInstVarString | > newInstVarString := self instanceVariablesString. > aCollection do: > [:varName | (self instVarNames includes: varName) ifFalse: [newInstVarString := newInstVarString , ' ' , varName]]. > + ^ self addInstVarName: newInstVarString > - ^(ClassBuilder new) > - name: self name > - inEnvironment: self environment > - subclassOf: superclass > - type: self typeOfClass > - instanceVariableNames: newInstVarString > - classVariableNames: self classVariablesString > - poolDictionaries: self sharedPoolsString > - category: self category > ! > > Item was added: > + ----- Method: Player class>>addInstVarName: (in category 'organization') ----- > + addInstVarName: aString > + > + ^(ClassBuilder new) > + name: self name > + inEnvironment: (self environment import: Smalltalk globals) > + subclassOf: self superclass > + type: self typeOfClass > + instanceVariableNames: self instanceVariablesString, ' ', aString > + classVariableNames: self classVariablesString > + poolDictionaries: self sharedPoolsString > + category: self category > + ! > > Item was changed: > ----- Method: Player class>>environment (in category 'organization') ----- > environment > > ^ self isUniClass > ifTrue: [(Environment withName: 'EtoysUserDefinedTempEnvironment') > + at: self name asSymbol put: self; > + importSelf; > - at: self name put: self; > yourself] > ifFalse: [super environment]! > > Item was changed: > ----- Method: Preferences class>>cambridge (in category '*Etoys-Squeakland-themes') ----- > cambridge > "A theme for Squeakland and OLPC project" > "Preferences cambridge" > "This method has three parts. Don't forget to look at the stuff at the bottom." > > self setPreferencesFrom: #( > (allowCelesteTell false) > (alternativeScrollbarLook true) > (alternativeWindowLook true) > (annotationPanes true) > (automaticKeyGeneration true) > (biggerHandles true) > (blinkParen false) > (browseWithDragNDrop true) > (canRecordWhilePlaying true) > (classicNavigatorEnabled false) > (compactViewerFlaps true) > (enableLocalSave false) > (escapeKeyProducesMenu false) > (eToyFriendly true) > (eToyLoginEnabled true) > (extraDebuggerButtons false) > (gradientMenu false) > (haloTransitions false) > (honorDesktopCmdKeys true) > (includeSoundControlInNavigator true) > (magicHalos false) > (menuAppearance3d false) > (menuKeyboardControl false) > (modalColorPickers true) > (mouseOverHalos false) > (mvcProjectsAllowed false) > (preserveTrash true) > (projectViewsInWindows false) > (promptForUpdateServer false) > (propertySheetFromHalo false) > (roundedMenuCorners false) > (roundedWindowCorners false) > (securityChecksEnabled true) > + (standaloneSecurityChecksEnabled true) > + (duplicateControlAndAltKeys true) > (showDirectionHandles false) > (showDirectionForSketches true) > (showProjectNavigator false) > (showSecurityStatus false) > (soundQuickStart true) "see setPlatformPreferences" > (soundReverb false) > (soundStopWhenDone true) "see setPlatformPreferences" > (startInUntrustedDirectory true) > (sugarAutoSave false) > (swapControlAndAltKeys false) "see setPlatformPreferences" > (uniqueNamesInHalos true) > (unlimitedPaintArea false) > (useArtificialSweetenerBar true) > (useBiggerPaintingBox true) > (useFormsInPaintBox false) > (useLocale true) > (usePangoRenderer false) > (usePlatformFonts false) > (usePopUpArrows true) > (warnAboutInsecureContent false) > > "The following is to make sure the default is set properly." > > (abbreviatedBrowserButtons false) > (allowEtoyUserCustomEvents false) > (alphabeticalProjectMenu false) > (alternativeBrowseIt false) > (alternativeButtonsInScrollBars false) > (alternativeWindowBoxesLook true) > (alwaysHideHScrollbar false) > (alwaysShowConnectionVocabulary false) > (alwaysShowHScrollbar false) > (alwaysShowVScrollbar true) > (ansiAssignmentOperatorWhenPrettyPrinting true) > (areaFillsAreTolerant false) > (areaFillsAreVeryTolerant false) > (autoAccessors false) > (automaticFlapLayout true) > (automaticPlatformSettings true) "enables setPlatformPreferences" > (automaticViewerPlacement true) > (balloonHelpEnabled true) > (balloonHelpInMessageLists false) > (batchPenTrails false) > (biggerCursors true) > (browserNagIfNoClassComment true) > (browserShowsPackagePane false) > (browseWithPrettyPrint false) > (capitalizedReferences true) > (caseSensitiveFinds false) > (cautionBeforeClosing false) > (celesteHasStatusPane false) > (celesteShowsAttachmentsFlag false) > (changeSetVersionNumbers true) > (checkForSlips true) > (checkForUnsavedProjects true) > (classicNewMorphMenu false) > (clickOnLabelToEdit false) > (cmdDotEnabled true) > (collapseWindowsInPlace false) > (colorWhenPrettyPrinting false) > (compressFlashImages false) > (confirmFirstUseOfStyle true) > (conversionMethodsAtFileOut false) > (cpuWatcherEnabled false) > (debugHaloHandle false) > (debugPrintSpaceLog false) > (debugShowDamage false) > (decorateBrowserButtons true) > (defaultFileOutFormatMacRoman false) > (diffsInChangeList true) > (diffsWithPrettyPrint false) > (dismissAllOnOptionClose false) > (dismissEventTheatreUponPublish true) > (dragNDropWithAnimation false) > (dropProducesWatcher true) > (duplicateControlAndAltKeys false) > (easySelection false) > (enableInternetConfig false) > (enablePortraitMode false) > (enableVirtualOLPCDisplay false) > (expandedPublishing true) > (extractFlashInHighestQuality false) > (extractFlashInHighQuality true) > (fastDragWindowForMorphic true) > (fenceEnabled true) > (fenceSoundEnabled false) > (fullScreenLeavesDeskMargins true) > (gradientScrollBars true) > (haloEnclosesFullBounds false) > (higherPerformance false) > (ignoreStyleIfOnlyBold true) > (implicitSelfInTiles false) > (inboardScrollbars true) > (infiniteUndo false) > (keepTickingWhilePainting false) > (logDebuggerStackToFile true) > (menuButtonInToolPane false) > (menuColorFromWorld false) > (menuWithIcons true) > (morphicProgressStyle true) > (mouseOverForKeyboardFocus false) > (navigatorOnLeftEdge true) > (noviceMode false) > (okToReinitializeFlaps true) > (oliveHandleForScriptedObjects false) > (optionalButtons true) > (passwordsOnPublish false) > (personalizedWorldMenu true) > (postscriptStoredAsEPS false) > (printAlternateSyntax false) > (projectsSentToDisk false) > (projectZoom true) > (readDocumentAtStartup true) > (restartAlsoProceeds false) > (reverseWindowStagger true) > (rotationAndScaleHandlesInPaintBox false) > (scrollBarsNarrow false) > (scrollBarsOnRight true) > (scrollBarsWithoutMenuButton false) > (selectionsMayShrink true) > (selectiveHalos true) > (showAdvancedNavigatorButtons false) > (showBoundsInHalo false) > (showDeprecationWarnings false) > (showFlapsWhenPublishing false) > (showLinesInHierarchyViews true) > (showSharedFlaps true) > (signProjectFiles true) > (simpleMenus false) > (slideDismissalsToTrash true) > (smartUpdating true) > (soundsEnabled true) > (swapMouseButtons false) > (systemWindowEmbedOK false) > (tabAmongFields true) > (testRunnerShowAbstractClasses false) > (thoroughSenders true) > (tileTranslucentDrag true) > (timeStampsInMenuTitles true) > (translationWithBabel false) > (turnOffPowerManager false) > (twentyFourHourFileStamps true) > (twoSidedPoohTextures true) > (typeCheckingInTileScripting true) > (unifyNestedProgressBars true) > (uniTilesClassic true) > (universalTiles false) > (updateFromServerAtStartup false) > (updateSavesFile false) > (useButtonPropertiesToFire false) > (useFileList2 true) > (useSmartLabels false) > (useUndo true) > (useVectorVocabulary false) > (viewersInFlaps true) > (warnIfNoChangesFile false) > (warnIfNoSourcesFile false) > (warningForMacOSFileNameLength false) > (wordStyleCursorMovement true) > > ). > > Preferences setPreference: #haloTheme toValue: #iconicHaloSpecifications. > ! > > Item was changed: > ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- > cleanUpEtoysGarbage > "Project cleanUpEtoysGarbage" > "All these should eventuall go away and be fixed, but for now we have this here." > Smalltalk garbageCollect. > "Clear weak message sends to remove modal windows from worlds that are closing." > (WeakMessageSend allInstances select: [:wm | > (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. > "Clear the weak dictionary on the class side that keeps node state around in the rewriter" > KedamaEvaluatorNodeState initialize. > "Clear the KedamaEvaluator that holds on to the last Kedama world" > ScriptEditorMorph setDefaultEvaluator. > "Clear the hard references to player classes, " > (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | > Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. > Player withAllSubclasses > select: [:c | c isSystemDefined not] > + thenDo: [:c | > + c theNonMetaClass superclass removeSubclass: c theNonMetaClass. > + c theMetaClass superclass removeSubclass: c theMetaClass]. > - thenDo: [:c | c superclass removeSubclass: c]. > "Clear the paste buffer" > HandMorph initialize. > "Clear the reference to the project tree in SkObject" > + (Smalltalk classNamed: 'SkObject') ifNotNil: [:c | c initialize]. > - Smalltalk at: #SkObject ifPresent: [:cls| cls initialize]. > PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p flushPlayerListCache]]. > Smalltalk garbageCollect! > > Item was added: > + ----- Method: ReleaseBuilderSqueakland class>>intermediatePrepareForUsers (in category 'scripts') ----- > + intermediatePrepareForUsers > + "self intermediatePrepareForUsers" > + Project cleanUpEtoysGarbage. > + Smalltalk zapAllOtherProjects. > + Project cleanUpEtoysGarbage. > + ReleaseBuilder clearCaches. > + ObjectScanner new. "clear ObjectScanner's class pool" > + ExternalSettings registerClient: ServerDirectory. > + Project cleanUpEtoysGarbage. > + ReleaseBuilderSqueakland configureDesktop. > + ReleaseBuilderSqueakland setPreferences. > + Model useColorfulWindows: true.! > From Das.Linux at gmx.de Wed Oct 26 11:35:44 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:35:46 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: <1EEB8B5C-9274-4FD5-8838-0A98EB707AB6@gmx.de> Begin forwarded message: > Date: Tue, 25 Oct 2016 08:31:34 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: EToys-tfel.269.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.269.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.269 > Author: tfel > Time: 24 October 2016, 12:41:29.211614 pm > UUID: a11b6d00-95c1-054a-8ea6-237af529c724 > Ancestors: EToys-tfel.268 > > remove unused methods > > =============== Diff against EToys-tfel.268 =============== > > Item was removed: > - ObjectRepresentativeMorph subclass: #ClassRepresentativeMorph > - instanceVariableNames: 'classRepresented' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Scripting'! > > Item was removed: > - StandardScriptingSystem subclass: #EToySystem > - instanceVariableNames: '' > - classVariableNames: 'EToyVersion EToyVersionDate' > - poolDictionaries: '' > - category: 'Etoys-Experimental'! > - > - !EToySystem commentStamp: '' prior: 0! > - A global object holding onto properties and code of the overall E-toy system of the moment. Its code is entirely held on the class side; the class is never instantiated.! > > Item was removed: > - ----- Method: EToySystem class>>cleanUp: (in category 'class initialization') ----- > - cleanUp: aggressive > - > - aggressive ifTrue: [ > - StandardScriptingSystem removeUnreferencedPlayers. > - Player removeUninstantiatedSubclassesSilently. > - Project allMorphicProjects do: [:mp | mp world dumpPresenter]. > - Preferences removePreference: #allowEtoyUserCustomEvents.]! > > Item was removed: > - ----- Method: EToySystem class>>cleanupsForRelease (in category 'development support') ----- > - cleanupsForRelease > - "Miscellaneous space cleanups to do before a release." > - "EToySystem cleanupsForRelease" > - > - Socket deadServer: ''. "Don't reveal any specific server name" > - HandMorph initialize. "free cached ColorChart" > - PaintBoxMorph initialize. "forces Prototype to let go of extra things it might hold" > - Smalltalk globals removeKey: #AA ifAbsent: []. > - Smalltalk globals removeKey: #BB ifAbsent: []. > - Smalltalk globals removeKey: #CC ifAbsent: []. > - Smalltalk globals removeKey: #DD ifAbsent: []. > - Smalltalk globals removeKey: #Temp ifAbsent: []. > - > - ScriptingSystem reclaimSpace. > - Smalltalk cleanOutUndeclared. > - Smalltalk reclaimDependents. > - Smalltalk removeEmptyMessageCategories. > - Symbol rehash. > - ! > > Item was removed: > - ----- Method: EToySystem class>>fixComicCharacters (in category 'misc') ----- > - fixComicCharacters > - "EToySystem fixComicCharacters" > - ((TextConstants at: #ComicBold) fontAt: 3) characterFormAt: $_ put: > - (Form > - extent: 9@16 > - depth: 1 > - fromArray: #( 0 0 0 134217728 402653184 805306368 2139095040 4278190080 2139095040 805306368 402653184 134217728 0 0 0 0) > - offset: 0@0). > - > - ((TextConstants at: #ComicBold) fontAt: 3) characterFormAt: $1 put: > - (Form > - extent: 5@16 > - depth: 1 > - fromArray: #( 0 0 0 0 1610612736 3758096384 3758096384 1610612736 1610612736 1610612736 1610612736 4026531840 4026531840 0 0 0) > - offset: 0@0). > - > - > - ((TextConstants at: #ComicBold) fontAt: 3) characterFormAt: $2 put: > - (Form > - extent: 6@16 > - depth: 1 > - fromArray: #( 0 0 0 0 1879048192 4160749568 2550136832 939524096 1879048192 3758096384 3221225472 4160749568 4160749568 0 0 0) > - offset: 0@0). > - > - > - ((TextConstants at: #ComicBold) fontAt: 3) characterFormAt: $4 put: > - (Form > - extent: 7@16 > - depth: 1 > - fromArray: #( 0 0 0 0 134217728 402653184 402653184 939524096 1476395008 4227858432 4227858432 402653184 402653184 0 0 0) > - offset: 0@0). > - > - ((TextConstants at: #ComicBold) fontAt: 3) characterFormAt: $j put: > - (Form > - extent: 4@16 > - depth: 1 > - fromArray: #( 0 0 0 0 1610612736 1610612736 0 1610612736 1610612736 1610612736 1610612736 1610612736 1610612736 1610612736 3758096384 3221225472) > - offset: 0@0). > - > - ! > > Item was removed: > - ----- Method: EToySystem class>>loadJanForms (in category 'development support') ----- > - loadJanForms > - "EToySystem loadJanForms" > - > - | aReferenceStream newFormDict | > - aReferenceStream := ReferenceStream fileNamed: 'JanForms'. > - newFormDict := aReferenceStream next. > - aReferenceStream close. > - newFormDict associationsDo: > - [:assoc | Imports default importImage: assoc value named: assoc key]! > > Item was removed: > - ----- Method: EToySystem class>>methodsToStripForExternalRelease (in category 'external release') ----- > - methodsToStripForExternalRelease > - "Answer a list of triplets #(className, class/instance, methodName) of methods to be stripped in an external release." > - ^ #( > - (EToySystem class prepareRelease) > - (EToySystem class previewEToysOn:) > - )! > > Item was removed: > - ----- Method: EToySystem class>>prepareRelease (in category 'stripped') ----- > - prepareRelease > - self codeStrippedOut: '2.3External'! > > Item was removed: > - ----- Method: EToySystem class>>previewEToysOn: (in category 'stripped') ----- > - previewEToysOn: arg1 > - self codeStrippedOut: '2.3External'! > > Item was removed: > - Object subclass: #ExternalSemaphoreTable > - instanceVariableNames: '' > - classVariableNames: 'ProtectTable' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-System-Support'! > - > - !ExternalSemaphoreTable commentStamp: '' prior: 0! > - By John M McIntosh johnmci@smalltalkconsulting.com > - This class was written to mange the external semaphore table. When I was writing a Socket test server I discovered various race conditions on the access to the externalSemaphore table. This new class uses class side methods to restrict access using a mutex semaphore. It seemed cleaner to deligate the reponsibility here versus adding more code and another class variable to SystemDictionary > - > - Note that in Smalltalk recreateSpecialObjectsArray we still directly play with the table.! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>clearExternalObjects (in category 'accessing') ----- > - clearExternalObjects > - "Clear the array of objects that have been registered for use in non-Smalltalk code." > - > - ProtectTable critical: [Smalltalk specialObjectsArray at: 39 put: Array new]. > - ! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>externalObjects (in category 'accessing') ----- > - externalObjects > - ^ProtectTable critical: [Smalltalk specialObjectsArray at: 39].! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>initialize (in category 'initialize') ----- > - initialize > - ProtectTable := Semaphore forMutualExclusion! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>registerExternalObject: (in category 'accessing') ----- > - registerExternalObject: anObject > - ^ ProtectTable critical: [self safelyRegisterExternalObject: anObject] > - ! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>safelyRegisterExternalObject: (in category 'accessing') ----- > - safelyRegisterExternalObject: anObject > - "Register the given object in the external objects array and return its index. If it is already there, just return its index." > - > - | objects firstEmptyIndex obj sz newObjects | > - objects := Smalltalk specialObjectsArray at: 39. > - > - "find the first empty slot" > - firstEmptyIndex := 0. > - 1 to: objects size do: [:i | > - obj := objects at: i. > - obj == anObject ifTrue: [^ i]. "object already there, just return its index" > - (obj == nil and: [firstEmptyIndex = 0]) ifTrue: [firstEmptyIndex := i]]. > - > - "if no empty slots, expand the array" > - firstEmptyIndex = 0 ifTrue: [ > - sz := objects size. > - newObjects := objects species new: sz + 20. "grow linearly" > - newObjects replaceFrom: 1 to: sz with: objects startingAt: 1. > - firstEmptyIndex := sz + 1. > - Smalltalk specialObjectsArray at: 39 put: newObjects. > - objects := newObjects]. > - > - objects at: firstEmptyIndex put: anObject. > - ^ firstEmptyIndex > - ! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>safelyUnregisterExternalObject: (in category 'accessing') ----- > - safelyUnregisterExternalObject: anObject > - "Unregister the given object in the external objects array. Do nothing if it isn't registered. > - JMM change to return if we clear the element, since it should only appear once in the array" > - > - | objects | > - anObject ifNil: [^ self]. > - objects := Smalltalk specialObjectsArray at: 39. > - 1 to: objects size do: [:i | > - (objects at: i) == anObject ifTrue: > - [objects at: i put: nil. > - ^self]]. > - ! > > Item was removed: > - ----- Method: ExternalSemaphoreTable class>>unregisterExternalObject: (in category 'accessing') ----- > - unregisterExternalObject: anObject > - ProtectTable critical: [self safelyUnregisterExternalObject: anObject] > - ! > > Item was removed: > - Object subclass: #FreeTranslation > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-Network-TelNet WordNet'! > - > - !FreeTranslation commentStamp: '' prior: 0! > - Squeak interface to the translation server at www.freetranslation.com. Invoke it in any Squeak text pane by choosing 'translate it' from the shift-menu. Languages are set by the 'choose language; menu item of the shift menu. Or by changing (Preferences valueOfFlag: #languageTranslateFrom) and (Preferences valueOfFlag: #languageTranslateTo). > - See class method openScamperOn:. > - > - FreeTranslation openScamperOn: 'Why don''t you ever write anymore?' > - > - ! > > Item was removed: > - ----- Method: FreeTranslation class>>extract: (in category 'translation') ----- > - extract: aMimeDoc > - | pageSource str | > - "Extract the translated text from the web page" > - > - (aMimeDoc content beginsWith: 'error') ifTrue: [^ aMimeDoc content]. > - pageSource := aMimeDoc content. > - "brute force way to pull out the result" > - str := ReadStream on: pageSource. > - str match: 'Translation Results by Transparent Language'. > - str match: '

'. > - ^ str upToAll: '

'! > > Item was removed: > - ----- Method: FreeTranslation class>>openScamperOn: (in category 'scamper') ----- > - openScamperOn: currentSelection > - "Submit the string to the translation server at www.freetranslation.com. Ask it to translate from (Preferences parameterAt: #languageTranslateFrom) to (Preferences parameterAt: #languageTranslateTo). Display the results in a Scamper window, reusing the previous one if possible." > - > - | inputs scamperWindow from to | > - currentSelection size >= 10000 ifTrue: [^ self inform: 'Text selection is too long.']. > - from := Preferences parameterAt: #languageTranslateFrom ifAbsentPut: ['English']. > - to := Preferences parameterAt: #languageTranslateTo ifAbsentPut: ['German']. > - from = to ifTrue: > - [^ self inform: 'You asked to translate from ', from, ' to ', to, '.\' withCRs, > - 'Use "choose language" to set these.']. > - inputs := Dictionary new. > - inputs at: 'SrcText' put: (Array with: currentSelection). > - inputs at: 'Sequence' put: #('core'). > - inputs at: 'Mode' put: #('html'). > - inputs at: 'template' put: #('TextResult2.htm'). > - inputs at: 'Language' put: (Array with: from, '/', to). > - scamperWindow := (WebBrowser default ifNil: [^self]) newOrExistingOn: 'http://ets.freetranslation.com'. > - scamperWindow model submitFormWithInputs: inputs > - url: 'http://ets.freetranslation.com:5081' asUrl > - method: 'post'. > - scamperWindow activate. > - ! > > Item was removed: > - ----- Method: FreeTranslation class>>translate:from:to: (in category 'translation') ----- > - translate: aString from: fromLang to: toLang > - | inputs | > - "Submit the string to the translation server at www.freetranslation.com. Return the entire web page that freetranslation sends back." > - > - aString size >= 10000 ifTrue: [^ self inform: 'Text selection is too long.']. > - inputs := Dictionary new. > - inputs at: 'SrcText' put: (Array with: aString). > - inputs at: 'Sequence' put: #('core'). > - inputs at: 'Mode' put: #('html'). > - inputs at: 'template' put: #('TextResult2.htm'). > - inputs at: 'Language' put: (Array with: fromLang, '/', toLang). > - ^ 'http://ets.freetranslation.com:5081' asUrl postFormArgs: inputs. > - > - ! > > Item was removed: > - ----- Method: FreeTranslation class>>translatePanel:fromTo: (in category 'translation') ----- > - translatePanel: buttonPlayer fromTo: normalDirection > - | ow fromTM toTM fromLang toLang tt doc answer width | > - "Gather up all the info I need from the morphs in the button's owner and do the translation. Insert the results in a TextMorph. Use www.freeTranslation.com Refresh the banner ad. > - TextMorph with 'from' in the title is starting text. > - PopUpChoiceMorph with 'from' in the title is the starting language. > - TextMorph with 'from' in the title is place to put the answer. > - PopUpChoiceMorph with 'from' in the title is the target language. > - If normalDirection is false, translate the other direction." > - > - ow := buttonPlayer costume ownerThatIsA: PasteUpMorph. > - ow allMorphs do: [:mm | > - (mm isTextMorph) ifTrue: [ > - (mm knownName asString includesSubString: 'from') ifTrue: [ > - fromTM := mm]. > - (mm knownName asString includesSubString: 'to') ifTrue: [ > - toTM := mm]]. > - (mm isKindOf: PopUpChoiceMorph) ifTrue: [ > - (mm knownName asString includesSubString: 'from') ifTrue: [ > - fromLang := mm contents asString]. > - (mm owner knownName asString includesSubString: 'from') ifTrue: [ > - fromLang := mm contents asString]. > - (mm knownName asString includesSubString: 'to') ifTrue: [ > - toLang := mm contents asString]. > - (mm owner knownName asString includesSubString: 'to') ifTrue: [ > - toLang := mm contents asString]]]. > - normalDirection ifFalse: ["switch" > - tt := fromTM. fromTM := toTM. toTM := tt. > - tt := fromLang. fromLang := toLang. toLang := tt]. > - Cursor wait showWhile: [ > - doc := self translate: fromTM contents asString from: fromLang to: toLang. > - answer := self extract: doc]. "pull out the translated text" > - > - width := toTM width. > - toTM contents: answer wrappedTo: width. > - toTM changed.! > > Item was removed: > - AppRegistry subclass: #MorphicTextEditor > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-System-Applications'! > > Item was removed: > - AppRegistry subclass: #MvcTextEditor > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-System-Applications'! > - > - !MvcTextEditor commentStamp: 'tween 8/27/2004 12:24' prior: 0! > - A subclass of AppRegistry which allows the user, or Browser add-ons, to control which class is used when creating the code editing view in mvc Browsers! > > Item was removed: > - PrintableEncoder subclass: #PrintEncoder > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-MorphicExtras-Postscript Filters'! > > Item was removed: > - ----- Method: PrintEncoder class>>filterSelector (in category 'configuring') ----- > - filterSelector > - ^#printOnStream:! > > Item was removed: > - PrintableEncoder subclass: #StoreEncoder > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-MorphicExtras-Postscript Filters'! > > Item was removed: > - ----- Method: StoreEncoder class>>filterSelector (in category 'configuring') ----- > - filterSelector > - ^#storeOnStream:. > - ! > From Das.Linux at gmx.de Wed Oct 26 11:36:01 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:36:02 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: <7800C11F-9A01-466F-8145-B1981C0522C0@gmx.de> Begin forwarded message: > Date: Tue, 25 Oct 2016 08:32:04 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: EToys-tfel.270.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.270.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.270 > Author: tfel > Time: 24 October 2016, 1:35:27.841614 pm > UUID: 932b296e-7b57-1845-b76e-2dcfde371c97 > Ancestors: EToys-tfel.269 > > allow distance/angleTo my own turtle kind, excepting myself > > =============== Diff against EToys-tfel.269 =============== > > Item was changed: > ----- Method: KedamaTurtleVectorPlayer2 class>>primGetAngleToX:toY:xArray:yArray:resultInto: (in category 'as yet unclassified') ----- > primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result > > + | ppx ppy x y ret currentDist minDist nearestNeighbour skipSelf | > - | ppx ppy x y ret currentDist minDist nearestNeighbour | > > "^ KedamaPlugin doPrimitive: #vectorGetAngleTo." > > ppx := pX. > ppy := pY. > + skipSelf := pX == xArray. > 1 to: result size do: [:index | > pX isCollection ifTrue: [ > + nearestNeighbour := index. > minDist := SmallInteger maxVal. > 1 to: pX size do: [:index2 | > + ((index2 == index) & skipSelf) ifFalse: [ > + ppx := pX at: index2. > + ppy := pY at: index2. > + currentDist := ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. > + currentDist < minDist ifTrue: [ > + minDist := currentDist. > + nearestNeighbour := index2]]]. > - ppx := pX at: index2. > - ppy := pY at: index2. > - currentDist := ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. > - currentDist < minDist ifTrue: [ > - minDist := currentDist. > - nearestNeighbour := index2]]. > ppx := pX at: nearestNeighbour. > ppy := pY at: nearestNeighbour. > ]. > x := ppx - (xArray at: index). > y := ppy - (yArray at: index). > ret := (x@y) theta radiansToDegrees + 90.0. > ret > 360.0 ifTrue: [ret := ret - 360.0]. > result at: index put: ret. > ]. > ^ result. > ! > > Item was changed: > ----- Method: KedamaTurtleVectorPlayer2 class>>primGetDistanceToX:toY:xArray:yArray:resultInto: (in category 'as yet unclassified') ----- > primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result > > + | ppx ppy tempMin skipSelf | > - | ppx ppy tempMin | > > "^ KedamaPlugin doPrimitive: #vectorGetDistanceTo." > > ppx := pX. > ppy := pY. > + skipSelf := pX == xArray. > 1 to: result size do: [:index | > pX isCollection ifTrue: [ > tempMin := SmallInteger maxVal. > 1 to: pX size do: [:index2 | > + ((index2 == index) & skipSelf) ifFalse: [ > + ppx := pX at: index2. > + ppy := pY at: index2. > + tempMin := tempMin min: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt] > - ppx := pX at: index2. > - ppy := pY at: index2. > - tempMin := tempMin min: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. > ]. > self flag: #todo. "should really also remember the other side index to re-use inside the script" > result at: index put: tempMin. > ] ifFalse: [ > result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. > ] > ]. > ^ result. > ! > > Item was changed: > ----- Method: KedamaTurtleVectorPlayer2>>getAngleTo: (in category 'player commands') ----- > getAngleTo: players > > | p xArray yArray result pX pY xy | > players isCollection ifFalse: [ > p := players > ]. > xArray := arrays at: 2. > yArray := arrays at: 3. > result := KedamaFloatArray new: self size. > players isCollection ifTrue: [ > pX := KedamaFloatArray new: players size. > pY := KedamaFloatArray new: players size. > 1 to: players size do: [:i | > xy := (players at: i) getXAndY. > pX at: i put: xy x. > pY at: i put: xy y. > ]. > ] ifFalse: [ > + p == self > + ifTrue: [ > + pX := p getX. > + pY := p getY] > + ifFalse: [ > + pX := p turtles getX. > + pY := p turtles getY] > - pX := p turtles getX. > - pY := p turtles getY. > ]. > ^ KedamaTurtleVectorPlayer2 primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. > > ! > > Item was changed: > ----- Method: KedamaTurtleVectorPlayer2>>getDistanceTo: (in category 'player commands') ----- > getDistanceTo: players > > | p xArray yArray result pX pY xy | > players isCollection ifFalse: [ > p := players > ]. > xArray := arrays at: 2. > yArray := arrays at: 3. > result := KedamaFloatArray new: self size. > players isCollection ifTrue: [ > pX := KedamaFloatArray new: players size. > pY := KedamaFloatArray new: players size. > 1 to: players size do: [:i | > xy := (players at: i) getXAndY. > pX at: i put: xy x. > pY at: i put: xy y. > ]. > ] ifFalse: [ > + p == self > + ifTrue: [ > + pX := p getX. > + pY := p getY] > + ifFalse: [ > + pX := p turtles getX. > + pY := p turtles getY] > - pX := p turtles getX. > - pY := p turtles getY. > ]. > ^ KedamaTurtleVectorPlayer2 primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. > ! > From Das.Linux at gmx.de Wed Oct 26 11:36:37 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:36:38 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: <0477E2D4-0D9D-4D34-B7AF-C854C4B87A85@gmx.de> Begin forwarded message: > Date: Tue, 25 Oct 2016 08:34:07 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: TrueType-tfel.47.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of TrueType to project The Trunk: > http://source.squeak.org/trunk/TrueType-tfel.47.mcz > > ==================== Summary ==================== > > Name: TrueType-tfel.47 > Author: tfel > Time: 24 October 2016, 11:50:46.672614 am > UUID: 36b598dd-88a8-824d-985b-8d70c82ba0ea > Ancestors: TrueType-tfel.46 > > fix an infinite loop when there is a cycle through (multiple) fallback fonts > > =============== Diff against TrueType-tfel.46 =============== > > Item was changed: > ----- Method: TTCFont>>widthOf: (in category 'public') ----- > widthOf: aCharacter > "This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation." > (self hasGlyphOf: aCharacter) ifFalse: [ > + (fallbackFont notNil and: [fallbackFont hasGlyphOf: aCharacter]) ifTrue: > + [^ fallbackFont widthOf: aCharacter]. > - fallbackFont ifNotNil: [^ fallbackFont widthOf: aCharacter]. > ^ 1 > ]. > ^(self formOf: aCharacter) width! > From Das.Linux at gmx.de Wed Oct 26 11:37:54 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:37:56 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: <4B31812C-B6E0-48FB-B34C-9CBF69EFD9E9@gmx.de> Begin forwarded message: > Date: Tue, 25 Oct 2016 20:53:12 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: Collections-eem.721.mcz > Message-Id: > > Eliot Miranda uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-eem.721.mcz > > ==================== Summary ==================== > > Name: Collections-eem.721 > Author: eem > Time: 25 October 2016, 1:52:30.584675 pm > UUID: 2bb84a66-90fc-4430-8da4-509fef3d7eb4 > Ancestors: Collections-nice.720 > > Comment an unexpectedly controversial method. > > =============== Diff against Collections-nice.720 =============== > > Item was changed: > ----- Method: Collection>>isEmpty (in category 'testing') ----- > isEmpty > + "Answer whether the receiver contains any elements. > + This implementation uses the do: block rather than > + self size = 0 since size may be implemented in terms > + of do:, and hence is slow for all but very small collections." > - "Answer whether the receiver contains any elements." > > self do: [:element | ^false]. > ^true! > From Das.Linux at gmx.de Wed Oct 26 11:38:41 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:38:42 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: Begin forwarded message: > Date: Tue, 25 Oct 2016 22:31:15 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: Collections-nice.722.mcz > Message-Id: > > Nicolas Cellier uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-nice.722.mcz > > ==================== Summary ==================== > > Name: Collections-nice.722 > Author: nice > Time: 26 October 2016, 12:27:56.637026 am > UUID: e951d8a8-3e64-4f5c-821a-6aad7a1955c4 > Ancestors: Collections-eem.721 > > Improve anyOne: don't perform an emptyCheck before extracting any element, that's useless: anyOne is an empty check by itself ;). Extract first if we can, then error if we can't. > > Correct DoubleByteArray comment (it's not HalfWordArray anymore) > > =============== Diff against Collections-eem.721 =============== > > Item was changed: > ----- Method: Collection>>anyOne (in category 'accessing') ----- > anyOne > "Answer a representative sample of the receiver. This method can > be helpful when needing to preinfer the nature of the contents of > semi-homogeneous collections." > > + self do: [:each | ^ each]. > + self errorEmptyCollection! > - self emptyCheck. > - self do: [:each | ^ each]! > > Item was changed: > ArrayedCollection variableDoubleByteSubclass: #DoubleByteArray > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'Collections-Arrayed'! > > + !DoubleByteArray commentStamp: 'nice 10/20/2016 23:23' prior: 0! > + DoubleByteArrays store 16-bit unsigned Integer values.! > - !DoubleByteArray commentStamp: 'nice 9/20/2016 23:37' prior: 0! > - HalfWordArrays store 16-bit unsigned Integer values.! > From Das.Linux at gmx.de Wed Oct 26 11:39:24 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:39:29 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: <3DABE50A-01AF-491D-9D2E-2FD29A0764C8@gmx.de> Begin forwarded message: > Date: Mon, 24 Oct 2016 09:42:22 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: EToys-tfel.268.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.268.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.268 > Author: tfel > Time: 24 October 2016, 11:33:16.574614 am > UUID: ea95b449-4d49-994b-a6b1-0b9d17104ab0 > Ancestors: EToys-eem.267 > > - refactor addInstVarNames: to go through Player class>>addInstVarName: > - small cleanups > > =============== Diff against EToys-eem.267 =============== > > Item was changed: > ----- Method: Class>>addInstVarNames: (in category '*Etoys-Squeakland-instance variables') ----- > addInstVarNames: aCollection > > | newInstVarString | > newInstVarString := self instanceVariablesString. > aCollection do: > [:varName | (self instVarNames includes: varName) ifFalse: [newInstVarString := newInstVarString , ' ' , varName]]. > + ^ self addInstVarName: newInstVarString > - ^(ClassBuilder new) > - name: self name > - inEnvironment: self environment > - subclassOf: superclass > - type: self typeOfClass > - instanceVariableNames: newInstVarString > - classVariableNames: self classVariablesString > - poolDictionaries: self sharedPoolsString > - category: self category > ! > > Item was added: > + ----- Method: Player class>>addInstVarName: (in category 'organization') ----- > + addInstVarName: aString > + > + ^(ClassBuilder new) > + name: self name > + inEnvironment: (self environment import: Smalltalk globals) > + subclassOf: self superclass > + type: self typeOfClass > + instanceVariableNames: self instanceVariablesString, ' ', aString > + classVariableNames: self classVariablesString > + poolDictionaries: self sharedPoolsString > + category: self category > + ! > > Item was changed: > ----- Method: Player class>>environment (in category 'organization') ----- > environment > > ^ self isUniClass > ifTrue: [(Environment withName: 'EtoysUserDefinedTempEnvironment') > + at: self name asSymbol put: self; > + importSelf; > - at: self name put: self; > yourself] > ifFalse: [super environment]! > > Item was changed: > ----- Method: Preferences class>>cambridge (in category '*Etoys-Squeakland-themes') ----- > cambridge > "A theme for Squeakland and OLPC project" > "Preferences cambridge" > "This method has three parts. Don't forget to look at the stuff at the bottom." > > self setPreferencesFrom: #( > (allowCelesteTell false) > (alternativeScrollbarLook true) > (alternativeWindowLook true) > (annotationPanes true) > (automaticKeyGeneration true) > (biggerHandles true) > (blinkParen false) > (browseWithDragNDrop true) > (canRecordWhilePlaying true) > (classicNavigatorEnabled false) > (compactViewerFlaps true) > (enableLocalSave false) > (escapeKeyProducesMenu false) > (eToyFriendly true) > (eToyLoginEnabled true) > (extraDebuggerButtons false) > (gradientMenu false) > (haloTransitions false) > (honorDesktopCmdKeys true) > (includeSoundControlInNavigator true) > (magicHalos false) > (menuAppearance3d false) > (menuKeyboardControl false) > (modalColorPickers true) > (mouseOverHalos false) > (mvcProjectsAllowed false) > (preserveTrash true) > (projectViewsInWindows false) > (promptForUpdateServer false) > (propertySheetFromHalo false) > (roundedMenuCorners false) > (roundedWindowCorners false) > (securityChecksEnabled true) > + (standaloneSecurityChecksEnabled true) > + (duplicateControlAndAltKeys true) > (showDirectionHandles false) > (showDirectionForSketches true) > (showProjectNavigator false) > (showSecurityStatus false) > (soundQuickStart true) "see setPlatformPreferences" > (soundReverb false) > (soundStopWhenDone true) "see setPlatformPreferences" > (startInUntrustedDirectory true) > (sugarAutoSave false) > (swapControlAndAltKeys false) "see setPlatformPreferences" > (uniqueNamesInHalos true) > (unlimitedPaintArea false) > (useArtificialSweetenerBar true) > (useBiggerPaintingBox true) > (useFormsInPaintBox false) > (useLocale true) > (usePangoRenderer false) > (usePlatformFonts false) > (usePopUpArrows true) > (warnAboutInsecureContent false) > > "The following is to make sure the default is set properly." > > (abbreviatedBrowserButtons false) > (allowEtoyUserCustomEvents false) > (alphabeticalProjectMenu false) > (alternativeBrowseIt false) > (alternativeButtonsInScrollBars false) > (alternativeWindowBoxesLook true) > (alwaysHideHScrollbar false) > (alwaysShowConnectionVocabulary false) > (alwaysShowHScrollbar false) > (alwaysShowVScrollbar true) > (ansiAssignmentOperatorWhenPrettyPrinting true) > (areaFillsAreTolerant false) > (areaFillsAreVeryTolerant false) > (autoAccessors false) > (automaticFlapLayout true) > (automaticPlatformSettings true) "enables setPlatformPreferences" > (automaticViewerPlacement true) > (balloonHelpEnabled true) > (balloonHelpInMessageLists false) > (batchPenTrails false) > (biggerCursors true) > (browserNagIfNoClassComment true) > (browserShowsPackagePane false) > (browseWithPrettyPrint false) > (capitalizedReferences true) > (caseSensitiveFinds false) > (cautionBeforeClosing false) > (celesteHasStatusPane false) > (celesteShowsAttachmentsFlag false) > (changeSetVersionNumbers true) > (checkForSlips true) > (checkForUnsavedProjects true) > (classicNewMorphMenu false) > (clickOnLabelToEdit false) > (cmdDotEnabled true) > (collapseWindowsInPlace false) > (colorWhenPrettyPrinting false) > (compressFlashImages false) > (confirmFirstUseOfStyle true) > (conversionMethodsAtFileOut false) > (cpuWatcherEnabled false) > (debugHaloHandle false) > (debugPrintSpaceLog false) > (debugShowDamage false) > (decorateBrowserButtons true) > (defaultFileOutFormatMacRoman false) > (diffsInChangeList true) > (diffsWithPrettyPrint false) > (dismissAllOnOptionClose false) > (dismissEventTheatreUponPublish true) > (dragNDropWithAnimation false) > (dropProducesWatcher true) > (duplicateControlAndAltKeys false) > (easySelection false) > (enableInternetConfig false) > (enablePortraitMode false) > (enableVirtualOLPCDisplay false) > (expandedPublishing true) > (extractFlashInHighestQuality false) > (extractFlashInHighQuality true) > (fastDragWindowForMorphic true) > (fenceEnabled true) > (fenceSoundEnabled false) > (fullScreenLeavesDeskMargins true) > (gradientScrollBars true) > (haloEnclosesFullBounds false) > (higherPerformance false) > (ignoreStyleIfOnlyBold true) > (implicitSelfInTiles false) > (inboardScrollbars true) > (infiniteUndo false) > (keepTickingWhilePainting false) > (logDebuggerStackToFile true) > (menuButtonInToolPane false) > (menuColorFromWorld false) > (menuWithIcons true) > (morphicProgressStyle true) > (mouseOverForKeyboardFocus false) > (navigatorOnLeftEdge true) > (noviceMode false) > (okToReinitializeFlaps true) > (oliveHandleForScriptedObjects false) > (optionalButtons true) > (passwordsOnPublish false) > (personalizedWorldMenu true) > (postscriptStoredAsEPS false) > (printAlternateSyntax false) > (projectsSentToDisk false) > (projectZoom true) > (readDocumentAtStartup true) > (restartAlsoProceeds false) > (reverseWindowStagger true) > (rotationAndScaleHandlesInPaintBox false) > (scrollBarsNarrow false) > (scrollBarsOnRight true) > (scrollBarsWithoutMenuButton false) > (selectionsMayShrink true) > (selectiveHalos true) > (showAdvancedNavigatorButtons false) > (showBoundsInHalo false) > (showDeprecationWarnings false) > (showFlapsWhenPublishing false) > (showLinesInHierarchyViews true) > (showSharedFlaps true) > (signProjectFiles true) > (simpleMenus false) > (slideDismissalsToTrash true) > (smartUpdating true) > (soundsEnabled true) > (swapMouseButtons false) > (systemWindowEmbedOK false) > (tabAmongFields true) > (testRunnerShowAbstractClasses false) > (thoroughSenders true) > (tileTranslucentDrag true) > (timeStampsInMenuTitles true) > (translationWithBabel false) > (turnOffPowerManager false) > (twentyFourHourFileStamps true) > (twoSidedPoohTextures true) > (typeCheckingInTileScripting true) > (unifyNestedProgressBars true) > (uniTilesClassic true) > (universalTiles false) > (updateFromServerAtStartup false) > (updateSavesFile false) > (useButtonPropertiesToFire false) > (useFileList2 true) > (useSmartLabels false) > (useUndo true) > (useVectorVocabulary false) > (viewersInFlaps true) > (warnIfNoChangesFile false) > (warnIfNoSourcesFile false) > (warningForMacOSFileNameLength false) > (wordStyleCursorMovement true) > > ). > > Preferences setPreference: #haloTheme toValue: #iconicHaloSpecifications. > ! > > Item was changed: > ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- > cleanUpEtoysGarbage > "Project cleanUpEtoysGarbage" > "All these should eventuall go away and be fixed, but for now we have this here." > Smalltalk garbageCollect. > "Clear weak message sends to remove modal windows from worlds that are closing." > (WeakMessageSend allInstances select: [:wm | > (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. > "Clear the weak dictionary on the class side that keeps node state around in the rewriter" > KedamaEvaluatorNodeState initialize. > "Clear the KedamaEvaluator that holds on to the last Kedama world" > ScriptEditorMorph setDefaultEvaluator. > "Clear the hard references to player classes, " > (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | > Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. > Player withAllSubclasses > select: [:c | c isSystemDefined not] > + thenDo: [:c | > + c theNonMetaClass superclass removeSubclass: c theNonMetaClass. > + c theMetaClass superclass removeSubclass: c theMetaClass]. > - thenDo: [:c | c superclass removeSubclass: c]. > "Clear the paste buffer" > HandMorph initialize. > "Clear the reference to the project tree in SkObject" > + (Smalltalk classNamed: 'SkObject') ifNotNil: [:c | c initialize]. > - Smalltalk at: #SkObject ifPresent: [:cls| cls initialize]. > PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p flushPlayerListCache]]. > Smalltalk garbageCollect! > > Item was added: > + ----- Method: ReleaseBuilderSqueakland class>>intermediatePrepareForUsers (in category 'scripts') ----- > + intermediatePrepareForUsers > + "self intermediatePrepareForUsers" > + Project cleanUpEtoysGarbage. > + Smalltalk zapAllOtherProjects. > + Project cleanUpEtoysGarbage. > + ReleaseBuilder clearCaches. > + ObjectScanner new. "clear ObjectScanner's class pool" > + ExternalSettings registerClient: ServerDirectory. > + Project cleanUpEtoysGarbage. > + ReleaseBuilderSqueakland configureDesktop. > + ReleaseBuilderSqueakland setPreferences. > + Model useColorfulWindows: true.! > From Das.Linux at gmx.de Wed Oct 26 11:39:41 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 11:39:42 2016 Subject: [squeak-dev] missed commit mails References: Message-ID: Begin forwarded message: > Date: Mon, 24 Oct 2016 09:50:47 0000 > From: commits@source.squeak.org > To: squeak-dev@lists.squeakfoundation.org, packages@lists.squeakfoundation.org > Reply-To: squeak-dev@lists.squeakfoundation.org > Subject: The Trunk: TrueType-tfel.47.mcz > Message-Id: > > Tim Felgentreff uploaded a new version of TrueType to project The Trunk: > http://source.squeak.org/trunk/TrueType-tfel.47.mcz > > ==================== Summary ==================== > > Name: TrueType-tfel.47 > Author: tfel > Time: 24 October 2016, 11:50:46.672614 am > UUID: 36b598dd-88a8-824d-985b-8d70c82ba0ea > Ancestors: TrueType-tfel.46 > > fix an infinite loop when there is a cycle through (multiple) fallback fonts > > =============== Diff against TrueType-tfel.46 =============== > > Item was changed: > ----- Method: TTCFont>>widthOf: (in category 'public') ----- > widthOf: aCharacter > "This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation." > (self hasGlyphOf: aCharacter) ifFalse: [ > + (fallbackFont notNil and: [fallbackFont hasGlyphOf: aCharacter]) ifTrue: > + [^ fallbackFont widthOf: aCharacter]. > - fallbackFont ifNotNil: [^ fallbackFont widthOf: aCharacter]. > ^ 1 > ]. > ^(self formOf: aCharacter) width! > From lists at fniephaus.com Wed Oct 26 13:11:14 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed Oct 26 13:11:27 2016 Subject: [squeak-dev] source.squeak.org down [EOM] Message-ID: -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/4c9e289f/attachment.htm From asqueaker at gmail.com Wed Oct 26 15:49:35 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 15:50:18 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: Just saw this and checked, it's up. Nothing in the logs, however, daemontools says its only been up for 9200 seconds, which corresponds to the time of your mail. Very strange.. Not sure if someone shut it down or something else.. On Wed, Oct 26, 2016 at 8:11 AM, Fabio Niephaus wrote: > > > > From lists at fniephaus.com Wed Oct 26 16:00:22 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed Oct 26 16:00:41 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: On Wed, Oct 26, 2016 at 5:50 PM Chris Muller wrote: > Just saw this and checked, it's up. Nothing in the logs, however, > daemontools says its only been up for 9200 seconds, which corresponds > to the time of your mail. Very strange.. Not sure if someone shut it > down or something else.. > Tobias apparently logged into the machine and saw the process hanging at 100% CPU. He decided to kill it after a few minutes and then it must have restarted automatically. But thanks for looking into this. > > On Wed, Oct 26, 2016 at 8:11 AM, Fabio Niephaus > wrote: > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/2e1e1d64/attachment.htm From bert at freudenbergs.de Wed Oct 26 16:35:42 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Oct 26 16:35:46 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: On Wed, Oct 26, 2016 at 6:42 AM, Chris Muller wrote: > I agreed that it looked good in the ivory tower. The thing is, there > are these real-world detractors which we should not igore. To save my > old fingers, let me just summarize them from the earlier posts. In > summary: > > - it provides no known material benefit > Having an O(1) runtime vs O(n) is a very large material benefit. Collection>>size is O(n) so it's not a good base for #isEmpty. > - it could affect unsuspecting legacy application performance > materially, and in an insidious way > If you have performance problems, profile. > - it's an anomalous usage of the API which works against performance > expectations about #size and #do:. > The performance expectation of both #size and #do: in Collection is O(n). And there is nothing "anomalous" in using #do:, quite to the contrary, #do: is the *essence* of a collection of objects. > - the justification for this change (performance optimization) in > Collection is not valid in the first place. > It is very valid optimization given the implementation of Collection>>size. > No real-world positives, just negatives or zeros. Please revert. > Quite the opposite. It's a major improvement in basic API. Yes, you will have to provide an optimized #isEmpty now, because you relied on an implementation detail of a superclass. But there never was a contract that #isEmpty needs to be implemented in terms of #size. The new implementation makes much more sense for an arbitrary abstract Collection, so I'd like to see it stay. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/b37629dc/attachment.htm From asqueaker at gmail.com Wed Oct 26 17:08:57 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 17:10:16 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: Whoa, please don't kill the process! It isn't hung, its building the historical index. It will be using 100% CPU for the next few weeks. Performance will be slightly degraded until then but the system should be accessible. Thanks for your patience, it will be worth it -- at the end we'll finally have a permanently integrated MC history for every method and class definition. On Wed, Oct 26, 2016 at 11:00 AM, Fabio Niephaus wrote: > > On Wed, Oct 26, 2016 at 5:50 PM Chris Muller wrote: >> >> Just saw this and checked, it's up. Nothing in the logs, however, >> daemontools says its only been up for 9200 seconds, which corresponds >> to the time of your mail. Very strange.. Not sure if someone shut it >> down or something else.. > > > Tobias apparently logged into the machine and saw the process hanging at > 100% CPU. He decided to kill it after a few minutes and then it must have > restarted automatically. > But thanks for looking into this. > >> >> >> On Wed, Oct 26, 2016 at 8:11 AM, Fabio Niephaus >> wrote: >> > >> > >> > >> > >> > > > From frank.shearar at gmail.com Wed Oct 26 17:42:19 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed Oct 26 17:42:23 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: On 26 October 2016 at 09:35, Bert Freudenberg wrote: > On Wed, Oct 26, 2016 at 6:42 AM, Chris Muller wrote: > >> I agreed that it looked good in the ivory tower. The thing is, there >> are these real-world detractors which we should not igore. To save my >> old fingers, let me just summarize them from the earlier posts. In >> summary: >> >> - it provides no known material benefit >> > > Having an O(1) runtime vs O(n) is a very large material benefit. > Collection>>size is O(n) so it's not a good base for #isEmpty. > > >> - it could affect unsuspecting legacy application performance >> materially, and in an insidious way >> > > If you have performance problems, profile. > > >> - it's an anomalous usage of the API which works against performance >> expectations about #size and #do:. >> > > The performance expectation of both #size and #do: in Collection is O(n). > And there is nothing "anomalous" in using #do:, quite to the contrary, #do: > is the *essence* of a collection of objects. > > >> - the justification for this change (performance optimization) in >> Collection is not valid in the first place. >> > > It is very valid optimization given the implementation of Collection>>size. > > >> No real-world positives, just negatives or zeros. Please revert. >> > > Quite the opposite. It's a major improvement in basic API. > > Yes, you will have to provide an optimized #isEmpty now, because you > relied on an implementation detail of a superclass. But there never was a > contract that #isEmpty needs to be implemented in terms of #size. The new > implementation makes much more sense for an arbitrary abstract Collection, > so I'd like to see it stay. > +1. Especially since we've seen examples of Collections where #size just doesn't make sense: generators, Actor-style mailboxes, Xtreams (and, by extension, all reactive APIs). Which is exactly why in C# an IEnumerable (a Collection) doesn't even have a Count method. (It's added as an extension, and People Know(tm) to be careful using it on an abstract collection.) Really, to be properly Ivory Tower, and Elegant, Collection's #size should be removed. And as Eliot correctly points out, the only elegant way to ask a Collection about which you know nothing, whether it has any elements, is to _evaluate its first value_. I can't give real world Smalltalk experience reports, but I can say, with many burn marks to prove it, that asking an abstract collection of things for its size, is a terrible idea. frank > - Bert - > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/62d2eb78/attachment.htm From asqueaker at gmail.com Wed Oct 26 18:41:28 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 18:42:13 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: I don't wish to belabor, but you completely ignored all of my (and Monty's) arguments. Yes, there *is* a sort-of "contract" that #isEmpty should be implemented in terms of #size, and not #do:, that is now being violated. I explained why earlier and you even said it was a point worth discussing, but never did. The comment that was added to Collection>>#isEmpty advertises the flawed thinking. The flaws with all of your other statements were addressed in prior posts, too. I don't know why any of the advocates for this change couldn't address or even acknowledge those arguments. Even the comment that was added to Collection>>#isEmpty advertises the flawed thinking. I hope someone will go back and really _read_ the arguments being made in this thread. Just saw Franks note. Same thing.. :( On Wed, Oct 26, 2016 at 11:35 AM, Bert Freudenberg wrote: > On Wed, Oct 26, 2016 at 6:42 AM, Chris Muller wrote: >> >> I agreed that it looked good in the ivory tower. The thing is, there >> are these real-world detractors which we should not igore. To save my >> old fingers, let me just summarize them from the earlier posts. In >> summary: >> >> - it provides no known material benefit > > > Having an O(1) runtime vs O(n) is a very large material benefit. > Collection>>size is O(n) so it's not a good base for #isEmpty. > >> >> - it could affect unsuspecting legacy application performance >> materially, and in an insidious way > > > If you have performance problems, profile. > >> >> - it's an anomalous usage of the API which works against performance >> expectations about #size and #do:. > > > The performance expectation of both #size and #do: in Collection is O(n). > And there is nothing "anomalous" in using #do:, quite to the contrary, #do: > is the *essence* of a collection of objects. > >> >> - the justification for this change (performance optimization) in >> Collection is not valid in the first place. > > > It is very valid optimization given the implementation of Collection>>size. > >> >> No real-world positives, just negatives or zeros. Please revert. > > > Quite the opposite. It's a major improvement in basic API. > > Yes, you will have to provide an optimized #isEmpty now, because you relied > on an implementation detail of a superclass. But there never was a contract > that #isEmpty needs to be implemented in terms of #size. The new > implementation makes much more sense for an arbitrary abstract Collection, > so I'd like to see it stay. > > - Bert - > > > > From Das.Linux at gmx.de Wed Oct 26 18:45:54 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 18:45:59 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: <7058E75F-5B2F-4B3C-9A05-B72669C27251@gmx.de> On 26.10.2016, at 19:08, Chris Muller wrote: > Whoa, please don't kill the process! mkay. From Das.Linux at gmx.de Wed Oct 26 18:51:57 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Oct 26 18:52:01 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: On 26.10.2016, at 19:08, Chris Muller wrote: > Whoa, please don't kill the process! It isn't hung, its building the > historical index. It will be using 100% CPU for the next few weeks. > Performance will be slightly degraded until then but the system should > be accessible. Thanks for your patience, it will be worth it -- at > the end we'll finally have a permanently integrated MC history for > every method and class definition. > > please note that the machine(s) need a restart very soon to upgrade its kernel (viz. patch a recent severe security hole) Best regards -Tobias > On Wed, Oct 26, 2016 at 11:00 AM, Fabio Niephaus wrote: >> >> On Wed, Oct 26, 2016 at 5:50 PM Chris Muller wrote: >>> >>> Just saw this and checked, it's up. Nothing in the logs, however, >>> daemontools says its only been up for 9200 seconds, which corresponds >>> to the time of your mail. Very strange.. Not sure if someone shut it >>> down or something else.. >> >> >> Tobias apparently logged into the machine and saw the process hanging at >> 100% CPU. He decided to kill it after a few minutes and then it must have >> restarted automatically. >> But thanks for looking into this. >> >>> >>> >>> On Wed, Oct 26, 2016 at 8:11 AM, Fabio Niephaus >>> wrote: >>>> >>>> >>>> >>>> >>> >> >> >> > From ma.chris.m at gmail.com Wed Oct 26 18:55:39 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Oct 26 18:56:23 2016 Subject: [squeak-dev] source.squeak.org down [EOM] In-Reply-To: References: Message-ID: Okay, it shoudn't be a problem, thanks for the note. On Wed, Oct 26, 2016 at 1:51 PM, Tobias Pape wrote: > > On 26.10.2016, at 19:08, Chris Muller wrote: > >> Whoa, please don't kill the process! It isn't hung, its building the >> historical index. It will be using 100% CPU for the next few weeks. >> Performance will be slightly degraded until then but the system should >> be accessible. Thanks for your patience, it will be worth it -- at >> the end we'll finally have a permanently integrated MC history for >> every method and class definition. >> >> > > please note that the machine(s) need a restart very soon to upgrade its kernel > (viz. patch a recent severe security hole) > > Best regards > -Tobias > >> On Wed, Oct 26, 2016 at 11:00 AM, Fabio Niephaus wrote: >>> >>> On Wed, Oct 26, 2016 at 5:50 PM Chris Muller wrote: >>>> >>>> Just saw this and checked, it's up. Nothing in the logs, however, >>>> daemontools says its only been up for 9200 seconds, which corresponds >>>> to the time of your mail. Very strange.. Not sure if someone shut it >>>> down or something else.. >>> >>> >>> Tobias apparently logged into the machine and saw the process hanging at >>> 100% CPU. He decided to kill it after a few minutes and then it must have >>> restarted automatically. >>> But thanks for looking into this. >>> >>>> >>>> >>>> On Wed, Oct 26, 2016 at 8:11 AM, Fabio Niephaus >>>> wrote: >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >>> >> > From eliot.miranda at gmail.com Wed Oct 26 19:21:15 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Oct 26 19:21:21 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: On Wed, Oct 26, 2016 at 11:41 AM, Chris Muller wrote: > I don't wish to belabor, but you completely ignored all of my (and > Monty's) arguments. Yes, there *is* a sort-of "contract" that > #isEmpty should be implemented in terms of #size, and not #do:, that > is now being violated. I explained why earlier and you even said it > was a point worth discussing, but never did. The comment that was > added to Collection>>#isEmpty advertises the flawed thinking. > I don't see any such contract. Collection has a contract; to be fully functional as a collection class the subclass must implement #do:. This is stated; #do: is a subclass responsibility of Collection. I see no stated contract that #isEmpty is implemented in terms of #size. Given that in Collection #size is implemented in terms of #do:, we are free to implement #isEmpty et al in terms either of #do: or of #size. The new implementation is better for large collections, works for infinite collections, and is hence to be preferred. > > The flaws with all of your other statements were addressed in prior > posts, too. I don't know why any of the advocates for this change > couldn't address or even acknowledge those arguments. Even the > comment that was added to Collection>>#isEmpty advertises the flawed > thinking. I hope someone will go back and really _read_ the arguments > being made in this thread. > I don't see what's special here. We've given arguments for the change; both Bert and Frank (effectively, in my view) refuted your arguments against the change. This is no different than other performance-related changes that have been made in the past. You have yet to present an example of code that is broken ny this change. Just saw Franks note. Same thing.. :( > Looked pretty cogent and on point to me. > > > > On Wed, Oct 26, 2016 at 11:35 AM, Bert Freudenberg > wrote: > > On Wed, Oct 26, 2016 at 6:42 AM, Chris Muller > wrote: > >> > >> I agreed that it looked good in the ivory tower. The thing is, there > >> are these real-world detractors which we should not igore. To save my > >> old fingers, let me just summarize them from the earlier posts. In > >> summary: > >> > >> - it provides no known material benefit > > > > > > Having an O(1) runtime vs O(n) is a very large material benefit. > > Collection>>size is O(n) so it's not a good base for #isEmpty. > > > >> > >> - it could affect unsuspecting legacy application performance > >> materially, and in an insidious way > > > > > > If you have performance problems, profile. > > > >> > >> - it's an anomalous usage of the API which works against performance > >> expectations about #size and #do:. > > > > > > The performance expectation of both #size and #do: in Collection is O(n). > > And there is nothing "anomalous" in using #do:, quite to the contrary, > #do: > > is the *essence* of a collection of objects. > > > >> > >> - the justification for this change (performance optimization) in > >> Collection is not valid in the first place. > > > > > > It is very valid optimization given the implementation of > Collection>>size. > > > >> > >> No real-world positives, just negatives or zeros. Please revert. > > > > > > Quite the opposite. It's a major improvement in basic API. > > > > Yes, you will have to provide an optimized #isEmpty now, because you > relied > > on an implementation detail of a superclass. But there never was a > contract > > that #isEmpty needs to be implemented in terms of #size. The new > > implementation makes much more sense for an arbitrary abstract > Collection, > > so I'd like to see it stay. > > > > - Bert - > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161026/08c58101/attachment-0001.htm From asqueaker at gmail.com Wed Oct 26 22:51:40 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Oct 26 22:52:23 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: Hi Eliot, I put a lot of effort to convey these arguments for the betterment of Squeak, I hope you'll oblige this last effort with an open and critical mind.. > I don't see any such contract. Collection has a contract; to be fully > functional as a collection class the subclass must implement #do:. This is > stated; #do: is a subclass responsibility of Collection. I see no stated > contract that #isEmpty is implemented in terms of #size. I said a "sort-of 'contract'", because the problem with this change is more about going against the universal reality of the Smalltalk environment and ecosystem, not against an explicit API contract. I made an explanation of this issue in my earlier post which began with "Since Smalltalk-80, sends to #do: ..." > Given that in > Collection #size is implemented in terms of #do:, we are free to implement > #isEmpty et al in terms either of #do: or of #size. The new implementation > is better for large collections, works for infinite collections, and is > hence to be preferred. If you understood that earlier post, then you understand why I believe we are NOT free to change Collection>>#isEmpty to operate in terms #do:, because we will have surreptitiously changed legacy applications which incur a much heavier cost with the #do: implementation. I provided a very plausible example of this (the SQLCollection) which should not be ignored. Now, I guess this change *already* did even slow down #isEmpty for some existing classes in the image(!!), to which Nicolas reponded to by copying-and-pasting the old implementation code into multiple classes in order to recover their original performance. Wow. In exchange for these blemishes, how many classes actually got benefit from inheriting the new implementation? Collection allSubclasses count: [ : each | (each lookupSelector: #size) methodClass = Collection] "0" So we're obviously not talking about benefit to any *in-image* kind of Collection, maybe just potential benefit to some... external application's Collection? But while hurting others..? Have we reached a point of enough diminishing returns yet? The reality is that #size is not only part of Smalltalk's original concept of a Collection since 30 years ago, but is universally expected to be fast, and Smalltalkers write there code under that assumption. That's why the responsibility should be on those unknown *exceptional* subclasses, the InfiniteCollection's or whatever, to deny their #size and provide their alternate #isEmpty's. Tallying it all up, we've got (-1) potential legacy impacts, (-1) all-new copy-and-pasted code in our core library, just so (+0) some exceptional-case external class MIGHT inherit this faster-for-them implementaiton rather than override it. I totally understand and agree with the ivory-tower arguments made in favor of this change, its just that in the practical world, it turns out to be a net negative. Best, Chris From lewis at mail.msen.com Thu Oct 27 00:46:56 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Oct 27 00:46:58 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: <20161027004656.GA17478@shell.msen.com> On Wed, Oct 26, 2016 at 05:51:40PM -0500, Chris Muller wrote: > > In exchange for these blemishes, how many classes actually got benefit > from inheriting the new implementation? > > Collection allSubclasses count: [ : each | (each > lookupSelector: #size) methodClass = Collection] "0" > Fair point. Every subclass of Collection reimplements #size in some way. Collection>>size is never actually used by any class in the image, and possibly not in any classes outside the image. So Collection>>size serves as documentation of the intent, and as a default implementation if someone were to implement a new subclass of Collection directly. Some subclasses (e.g. Bag) would have similar characteristics and would presumably benefit from the new #isEmpty implementation, but most seem to have #size implementations that do not degrade in performance as size increases. So Chris is raising a fair question. The new #isEmpty looks like it should be faster, but is it actually so in practice? Dave p.s. I personally still prefer the new implementation on aesthetic grounds. From nicolas.cellier.aka.nice at gmail.com Thu Oct 27 00:47:15 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 27 00:47:18 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1313.mcz In-Reply-To: References: Message-ID: Not sure if it's OK for anything else than leftFlush, but this one was upsetting me for a while (inspector panes are often narrow in debuggers) And +1000 thanks for restoring the review-by-mail feature while now providing full MC history 2016-10-27 2:35 GMT+02:00 : > Nicolas Cellier uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-nice.1313.mcz > > ==================== Summary ==================== > > Name: Morphic-nice.1313 > Author: nice > Time: 27 October 2016, 2:34:24.410239 am > UUID: b6649d12-cd6a-4957-94c0-ddc37d0f253a > Ancestors: Morphic-tpr.1312 > > Correct the text selection when extending down over a long word that was > rejected on next line. > > The scenario is when a long word following a space does not fit on the end > of line: it is displayed on next line. > If user click right after the space and extend the selection by dragging > down on next line, then the selection from left of next line to right of > space is not displayed. > > This is because the start CharacterBlock has its topLeft = space topRight > (+ eventual kern). > Fortunately, a simple <= test instead of < solves the problem. > > =============== Diff against Morphic-tpr.1312 =============== > > Item was changed: > ----- Method: NewParagraph>>displaySelectionInLine:on: (in category > 'display') ----- > displaySelectionInLine: line on: aCanvas > | leftX rightX w | > selectionStart ifNil: [^self]. "No selection" > aCanvas isShadowDrawing ifTrue: [ ^self ]. "don't draw > selection with shadow" > selectionStart = selectionStop > ifTrue: > ["Only show caret on line where clicked" > > selectionStart textLine ~= line ifTrue: [^self]] > ifFalse: > ["Test entire selection before or after here" > > (selectionStop stringIndex < line first > or: [selectionStart stringIndex > (line > last + 1)]) ifTrue: [^self]. "No selection on this line" > (selectionStop stringIndex = line first > and: [selectionStop textLine ~= line]) > ifTrue: [^self]. "Selection ends on line above" > (selectionStart stringIndex = (line last + 1) > and: [selectionStop textLine ~= line]) > ifTrue: [^self]]. "Selection begins on line below" > + leftX := (selectionStart stringIndex <= line first > - leftX := (selectionStart stringIndex < line first > ifTrue: [line ] > ifFalse: [selectionStart ])left. > rightX := (selectionStop stringIndex > (line last + 1) or: > [selectionStop stringIndex = (line > last + 1) > and: [selectionStop > textLine ~= line]]) > ifTrue: [line right] > ifFalse: [selectionStop left]. > selectionStart = selectionStop > ifTrue: [ > rightX := rightX + 1. > caretRect := (leftX-2) @ line top corner: > (rightX+2)@ line bottom. "sigh..." > self showCaret ifFalse: [^self]. > w := (Editor dumbbellCursor > ifTrue: [self displayDumbbellCursorOn: > aCanvas at: leftX in: line] > ifFalse: [self displaySimpleCursorOn: > aCanvas at: leftX in: line]). > caretRect := (leftX-w) @ line top corner: > (rightX+w)@ line bottom] > ifFalse: [ > caretRect := nil. > aCanvas fillRectangle: (leftX @ line top corner: > rightX @ line bottom) > color: (self focused ifTrue: [self > selectionColor] ifFalse: [self unfocusedSelectionColor])]! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/00829050/attachment.htm From asqueaker at gmail.com Thu Oct 27 01:37:12 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Oct 27 01:37:56 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1313.mcz In-Reply-To: References: Message-ID: Yaay, we've got mail! Thank you, Tobias. On Wed, Oct 26, 2016 at 7:35 PM, wrote: > Nicolas Cellier uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-nice.1313.mcz > > ==================== Summary ==================== > > Name: Morphic-nice.1313 > Author: nice > Time: 27 October 2016, 2:34:24.410239 am > UUID: b6649d12-cd6a-4957-94c0-ddc37d0f253a > Ancestors: Morphic-tpr.1312 > > Correct the text selection when extending down over a long word that was rejected on next line. > > The scenario is when a long word following a space does not fit on the end of line: it is displayed on next line. > If user click right after the space and extend the selection by dragging down on next line, then the selection from left of next line to right of space is not displayed. > > This is because the start CharacterBlock has its topLeft = space topRight (+ eventual kern). > Fortunately, a simple <= test instead of < solves the problem. > > =============== Diff against Morphic-tpr.1312 =============== > > Item was changed: > ----- Method: NewParagraph>>displaySelectionInLine:on: (in category 'display') ----- > displaySelectionInLine: line on: aCanvas > | leftX rightX w | > selectionStart ifNil: [^self]. "No selection" > aCanvas isShadowDrawing ifTrue: [ ^self ]. "don't draw selection with shadow" > selectionStart = selectionStop > ifTrue: > ["Only show caret on line where clicked" > > selectionStart textLine ~= line ifTrue: [^self]] > ifFalse: > ["Test entire selection before or after here" > > (selectionStop stringIndex < line first > or: [selectionStart stringIndex > (line last + 1)]) ifTrue: [^self]. "No selection on this line" > (selectionStop stringIndex = line first > and: [selectionStop textLine ~= line]) ifTrue: [^self]. "Selection ends on line above" > (selectionStart stringIndex = (line last + 1) > and: [selectionStop textLine ~= line]) ifTrue: [^self]]. "Selection begins on line below" > + leftX := (selectionStart stringIndex <= line first > - leftX := (selectionStart stringIndex < line first > ifTrue: [line ] > ifFalse: [selectionStart ])left. > rightX := (selectionStop stringIndex > (line last + 1) or: > [selectionStop stringIndex = (line last + 1) > and: [selectionStop textLine ~= line]]) > ifTrue: [line right] > ifFalse: [selectionStop left]. > selectionStart = selectionStop > ifTrue: [ > rightX := rightX + 1. > caretRect := (leftX-2) @ line top corner: (rightX+2)@ line bottom. "sigh..." > self showCaret ifFalse: [^self]. > w := (Editor dumbbellCursor > ifTrue: [self displayDumbbellCursorOn: aCanvas at: leftX in: line] > ifFalse: [self displaySimpleCursorOn: aCanvas at: leftX in: line]). > caretRect := (leftX-w) @ line top corner: (rightX+w)@ line bottom] > ifFalse: [ > caretRect := nil. > aCanvas fillRectangle: (leftX @ line top corner: rightX @ line bottom) > color: (self focused ifTrue: [self selectionColor] ifFalse: [self unfocusedSelectionColor])]! > > From craig at blackpagedigital.com Thu Oct 27 06:55:42 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Thu Oct 27 06:56:40 2016 Subject: [squeak-dev] SqueakJS-invoked Squeak installers Message-ID: Hi-- I've written some Squeak installers that are invoked by SqueakJS. When you visit [1], SqueakJS installs native Squeak on localhost and makes a remote-messaging connection to it. Please check it out and let me know how it goes. So far I've tested on macOS/{Chrome,Safari,Firefox}, Windows/{Edge,Chrome,Firefox}, and Linux/{Firefox,Chrome}. thanks! -C [1] http://blackpagedigital.com/squeak -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From karlramberg at gmail.com Thu Oct 27 09:04:54 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Oct 27 09:04:57 2016 Subject: [squeak-dev] The Trunk: ST80-nice.220.mcz In-Reply-To: References: Message-ID: Should the comment be changed here? Or is it still a hack ? Best, Karl On Thu, Oct 27, 2016 at 2:43 AM, wrote: > Nicolas Cellier uploaded a new version of ST80 to project The Trunk: > http://source.squeak.org/trunk/ST80-nice.220.mcz > > ==================== Summary ==================== > > Name: ST80-nice.220 > Author: nice > Time: 27 October 2016, 2:43:25.251747 am > UUID: e617501e-764e-4c9c-8c0c-a2a559e84940 > Ancestors: ST80-tfel.219 > > Remove an old Transcript show: remnant from horrorful text selection debug > session. > > =============== Diff against ST80-tfel.219 =============== > > Item was changed: > ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop > conditions') ----- > crossedX > characterIndex == nil ifFalse: [ > "If the last character of the last line is a space, > and it crosses the right margin, then locating > the character block after it is impossible without this > hack." > + characterIndex > text size ifTrue: [ > - characterIndex > text size ifTrue: [Transcript cr; > show:'here'. > lastIndex := characterIndex. > characterPoint := (nextLeftMargin ifNil: > [leftMargin]) @ (destY + line lineHeight). > ^true]]. > ^super crossedX! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/26ddb13b/attachment.htm From nicolas.cellier.aka.nice at gmail.com Thu Oct 27 09:10:16 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 27 09:10:21 2016 Subject: [squeak-dev] missed commit mails In-Reply-To: References: Message-ID: 2016-10-26 13:35 GMT+02:00 Tobias Pape : > > > Begin forwarded message: > > > From: commits@source.squeak.org > > To: squeak-dev@lists.squeakfoundation.org, packages@lists. > squeakfoundation.org > > Reply-To: squeak-dev@lists.squeakfoundation.org > > Subject: The Trunk: EToys-tfel.268.mcz > > Message-Id: > > > > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > > http://source.squeak.org/trunk/EToys-tfel.268.mcz > > > > ==================== Summary ==================== > > > > Name: EToys-tfel.268 > > Author: tfel > > Time: 24 October 2016, 11:33:16.574614 am > > UUID: ea95b449-4d49-994b-a6b1-0b9d17104ab0 > > Ancestors: EToys-eem.267 > > > > - refactor addInstVarNames: to go through Player class>>addInstVarName: > > - small cleanups > > > > =============== Diff against EToys-eem.267 =============== > > > > Item was changed: > > ----- Method: Class>>addInstVarNames: (in category > '*Etoys-Squeakland-instance variables') ----- > > addInstVarNames: aCollection > > > > | newInstVarString | > > newInstVarString := self instanceVariablesString. > > aCollection do: > > [:varName | (self instVarNames includes: varName) ifFalse: > [newInstVarString := newInstVarString , ' ' , varName]]. > > + ^ self addInstVarName: newInstVarString > > - ^(ClassBuilder new) > > - name: self name > > - inEnvironment: self environment > > - subclassOf: superclass > > - type: self typeOfClass > > - instanceVariableNames: newInstVarString > > - classVariableNames: self classVariablesString > > - poolDictionaries: self sharedPoolsString > > - category: self category > > ! > > > > Item was added: > > + ----- Method: Player class>>addInstVarName: (in category > 'organization') ----- > > + addInstVarName: aString > > + > > + ^(ClassBuilder new) > > + name: self name > > + inEnvironment: (self environment import: Smalltalk globals) > the import: above is going to be a problem ^^^^^^ - 1) there is no mechanism to prevent a policy/an observer to be added twice since Environment withName: will use a registered Environment we are going to apply env changes multiply - 2) this is going to trigger the Environment undeclared bugs: every SUnit test that add/remove a class var/global var will populate EtoysUserDefinedTempEnvironment undeclared forever... and this is going to trigger strange behaviour like false conflicts or fused bindings (ClassVarScopeTest failing) > + subclassOf: self superclass > > + type: self typeOfClass > > + instanceVariableNames: self instanceVariablesString, ' ', > aString > > + classVariableNames: self classVariablesString > > + poolDictionaries: self sharedPoolsString > > + category: self category > > + ! > > > > Item was changed: > > ----- Method: Player class>>environment (in category 'organization') > ----- > > environment > > > > ^ self isUniClass > > ifTrue: [(Environment withName: ' > EtoysUserDefinedTempEnvironment') > > + at: self name asSymbol put: self; > > + importSelf; > > - at: self name put: self; > > yourself] > > ifFalse: [super environment]! > > > > Item was changed: > > ----- Method: Preferences class>>cambridge (in category > '*Etoys-Squeakland-themes') ----- > > cambridge > > "A theme for Squeakland and OLPC project" > > "Preferences cambridge" > > "This method has three parts. Don't forget to look at the stuff > at the bottom." > > > > self setPreferencesFrom: #( > > (allowCelesteTell false) > > (alternativeScrollbarLook true) > > (alternativeWindowLook true) > > (annotationPanes true) > > (automaticKeyGeneration true) > > (biggerHandles true) > > (blinkParen false) > > (browseWithDragNDrop true) > > (canRecordWhilePlaying true) > > (classicNavigatorEnabled false) > > (compactViewerFlaps true) > > (enableLocalSave false) > > (escapeKeyProducesMenu false) > > (eToyFriendly true) > > (eToyLoginEnabled true) > > (extraDebuggerButtons false) > > (gradientMenu false) > > (haloTransitions false) > > (honorDesktopCmdKeys true) > > (includeSoundControlInNavigator true) > > (magicHalos false) > > (menuAppearance3d false) > > (menuKeyboardControl false) > > (modalColorPickers true) > > (mouseOverHalos false) > > (mvcProjectsAllowed false) > > (preserveTrash true) > > (projectViewsInWindows false) > > (promptForUpdateServer false) > > (propertySheetFromHalo false) > > (roundedMenuCorners false) > > (roundedWindowCorners false) > > (securityChecksEnabled true) > > + (standaloneSecurityChecksEnabled true) > > + (duplicateControlAndAltKeys true) > > (showDirectionHandles false) > > (showDirectionForSketches true) > > (showProjectNavigator false) > > (showSecurityStatus false) > > (soundQuickStart true) "see setPlatformPreferences" > > (soundReverb false) > > (soundStopWhenDone true) "see > setPlatformPreferences" > > (startInUntrustedDirectory true) > > (sugarAutoSave false) > > (swapControlAndAltKeys false) "see > setPlatformPreferences" > > (uniqueNamesInHalos true) > > (unlimitedPaintArea false) > > (useArtificialSweetenerBar true) > > (useBiggerPaintingBox true) > > (useFormsInPaintBox false) > > (useLocale true) > > (usePangoRenderer false) > > (usePlatformFonts false) > > (usePopUpArrows true) > > (warnAboutInsecureContent false) > > > > "The following is to make sure the default is set properly." > > > > (abbreviatedBrowserButtons false) > > (allowEtoyUserCustomEvents false) > > (alphabeticalProjectMenu false) > > (alternativeBrowseIt false) > > (alternativeButtonsInScrollBars false) > > (alternativeWindowBoxesLook true) > > (alwaysHideHScrollbar false) > > (alwaysShowConnectionVocabulary false) > > (alwaysShowHScrollbar false) > > (alwaysShowVScrollbar true) > > (ansiAssignmentOperatorWhenPrettyPrinting true) > > (areaFillsAreTolerant false) > > (areaFillsAreVeryTolerant false) > > (autoAccessors false) > > (automaticFlapLayout true) > > (automaticPlatformSettings true) "enables > setPlatformPreferences" > > (automaticViewerPlacement true) > > (balloonHelpEnabled true) > > (balloonHelpInMessageLists false) > > (batchPenTrails false) > > (biggerCursors true) > > (browserNagIfNoClassComment true) > > (browserShowsPackagePane false) > > (browseWithPrettyPrint false) > > (capitalizedReferences true) > > (caseSensitiveFinds false) > > (cautionBeforeClosing false) > > (celesteHasStatusPane false) > > (celesteShowsAttachmentsFlag false) > > (changeSetVersionNumbers true) > > (checkForSlips true) > > (checkForUnsavedProjects true) > > (classicNewMorphMenu false) > > (clickOnLabelToEdit false) > > (cmdDotEnabled true) > > (collapseWindowsInPlace false) > > (colorWhenPrettyPrinting false) > > (compressFlashImages false) > > (confirmFirstUseOfStyle true) > > (conversionMethodsAtFileOut false) > > (cpuWatcherEnabled false) > > (debugHaloHandle false) > > (debugPrintSpaceLog false) > > (debugShowDamage false) > > (decorateBrowserButtons true) > > (defaultFileOutFormatMacRoman false) > > (diffsInChangeList true) > > (diffsWithPrettyPrint false) > > (dismissAllOnOptionClose false) > > (dismissEventTheatreUponPublish true) > > (dragNDropWithAnimation false) > > (dropProducesWatcher true) > > (duplicateControlAndAltKeys false) > > (easySelection false) > > (enableInternetConfig false) > > (enablePortraitMode false) > > (enableVirtualOLPCDisplay false) > > (expandedPublishing true) > > (extractFlashInHighestQuality false) > > (extractFlashInHighQuality true) > > (fastDragWindowForMorphic true) > > (fenceEnabled true) > > (fenceSoundEnabled false) > > (fullScreenLeavesDeskMargins true) > > (gradientScrollBars true) > > (haloEnclosesFullBounds false) > > (higherPerformance false) > > (ignoreStyleIfOnlyBold true) > > (implicitSelfInTiles false) > > (inboardScrollbars true) > > (infiniteUndo false) > > (keepTickingWhilePainting false) > > (logDebuggerStackToFile true) > > (menuButtonInToolPane false) > > (menuColorFromWorld false) > > (menuWithIcons true) > > (morphicProgressStyle true) > > (mouseOverForKeyboardFocus false) > > (navigatorOnLeftEdge true) > > (noviceMode false) > > (okToReinitializeFlaps true) > > (oliveHandleForScriptedObjects false) > > (optionalButtons true) > > (passwordsOnPublish false) > > (personalizedWorldMenu true) > > (postscriptStoredAsEPS false) > > (printAlternateSyntax false) > > (projectsSentToDisk false) > > (projectZoom true) > > (readDocumentAtStartup true) > > (restartAlsoProceeds false) > > (reverseWindowStagger true) > > (rotationAndScaleHandlesInPaintBox false) > > (scrollBarsNarrow false) > > (scrollBarsOnRight true) > > (scrollBarsWithoutMenuButton false) > > (selectionsMayShrink true) > > (selectiveHalos true) > > (showAdvancedNavigatorButtons false) > > (showBoundsInHalo false) > > (showDeprecationWarnings false) > > (showFlapsWhenPublishing false) > > (showLinesInHierarchyViews true) > > (showSharedFlaps true) > > (signProjectFiles true) > > (simpleMenus false) > > (slideDismissalsToTrash true) > > (smartUpdating true) > > (soundsEnabled true) > > (swapMouseButtons false) > > (systemWindowEmbedOK false) > > (tabAmongFields true) > > (testRunnerShowAbstractClasses false) > > (thoroughSenders true) > > (tileTranslucentDrag true) > > (timeStampsInMenuTitles true) > > (translationWithBabel false) > > (turnOffPowerManager false) > > (twentyFourHourFileStamps true) > > (twoSidedPoohTextures true) > > (typeCheckingInTileScripting true) > > (unifyNestedProgressBars true) > > (uniTilesClassic true) > > (universalTiles false) > > (updateFromServerAtStartup false) > > (updateSavesFile false) > > (useButtonPropertiesToFire false) > > (useFileList2 true) > > (useSmartLabels false) > > (useUndo true) > > (useVectorVocabulary false) > > (viewersInFlaps true) > > (warnIfNoChangesFile false) > > (warnIfNoSourcesFile false) > > (warningForMacOSFileNameLength false) > > (wordStyleCursorMovement true) > > > > ). > > > > Preferences setPreference: #haloTheme toValue: > #iconicHaloSpecifications. > > ! > > > > Item was changed: > > ----- Method: Project class>>cleanUpEtoysGarbage (in category > '*Etoys-Squeakland-utilities') ----- > > cleanUpEtoysGarbage > > "Project cleanUpEtoysGarbage" > > "All these should eventuall go away and be fixed, but for now we > have this here." > > Smalltalk garbageCollect. > > "Clear weak message sends to remove modal windows from worlds that > are closing." > > (WeakMessageSend allInstances select: [:wm | > > (wm receiver isKindOf: PasteUpMorph) and: [wm selector = > #removeModalWindow]]) do: [:wm | wm receiver: nil]. > > "Clear the weak dictionary on the class side that keeps node state > around in the rewriter" > > KedamaEvaluatorNodeState initialize. > > "Clear the KedamaEvaluator that holds on to the last Kedama world" > > ScriptEditorMorph setDefaultEvaluator. > > "Clear the hard references to player classes, " > > (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: > [:name | > > Smalltalk forgetClass: (Smalltalk classNamed: name) logged: > false]. > > Player withAllSubclasses > > select: [:c | c isSystemDefined not] > > + thenDo: [:c | > > + c theNonMetaClass superclass removeSubclass: c > theNonMetaClass. > > + c theMetaClass superclass removeSubclass: c > theMetaClass]. > > - thenDo: [:c | c superclass removeSubclass: c]. > > "Clear the paste buffer" > > HandMorph initialize. > > "Clear the reference to the project tree in SkObject" > > + (Smalltalk classNamed: 'SkObject') ifNotNil: [:c | c initialize]. > > - Smalltalk at: #SkObject ifPresent: [:cls| cls initialize]. > > PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p > flushPlayerListCache]]. > > Smalltalk garbageCollect! > > > > Item was added: > > + ----- Method: ReleaseBuilderSqueakland class>>intermediatePrepareForUsers > (in category 'scripts') ----- > > + intermediatePrepareForUsers > > + "self intermediatePrepareForUsers" > > + Project cleanUpEtoysGarbage. > > + Smalltalk zapAllOtherProjects. > > + Project cleanUpEtoysGarbage. > > + ReleaseBuilder clearCaches. > > + ObjectScanner new. "clear ObjectScanner's class pool" > > + ExternalSettings registerClient: ServerDirectory. > > + Project cleanUpEtoysGarbage. > > + ReleaseBuilderSqueakland configureDesktop. > > + ReleaseBuilderSqueakland setPreferences. > > + Model useColorfulWindows: true.! > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/5cc8f622/attachment.htm From bert at freudenbergs.de Thu Oct 27 12:00:59 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Oct 27 12:01:02 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: On Thu, Oct 27, 2016 at 12:51 AM, Chris Muller wrote: > > In exchange for these blemishes, how many classes actually got benefit > from inheriting the new implementation? > | b | b := (1 to: 10000) asBag. [b isEmpty] bench before: : '5,540 per second. 181 microseconds per run.' now: '167,000 per second. 6 microseconds per run.' In my book that's a speedup worth having. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/b4c891e3/attachment.htm From lecteur at zogotounga.net Thu Oct 27 14:13:08 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Thu Oct 27 14:13:11 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: <519dbd78-e2ac-9a41-0da6-df1259040a8e@zogotounga.net> > there never was > a contract that #isEmpty needs to be implemented in terms of #size. The > new implementation makes much more sense for an arbitrary abstract > Collection, so I'd like to see it stay. > > - Bert - +1 Stef From ma.chris.m at gmail.com Thu Oct 27 16:50:51 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Oct 27 16:51:35 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: > | b | > b := (1 to: 10000) asBag. > [b isEmpty] bench > > before: : '5,540 per second. 181 microseconds per run.' > now: '167,000 per second. 6 microseconds per run.' > > In my book that's a speedup worth having. You're depending on the superclass implementation in Collection for that speedup. What did you say about that yesterday? Honestly, Bert, it almost feels like you're being intellectually dishonest. You chose the only one that got sped up and ignored all the ones that got slowed down. AND, you also ignored all the other points (again) which render the above point irrelevant. Sad. I give up. You "win". From hannes.hirzel at gmail.com Thu Oct 27 17:20:15 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Oct 27 17:20:18 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: Yes, in this case a series of tests across collection classes actually would be a proof. A single point measurement is not a statistically relevant result. --Hannes On 10/27/16, Chris Muller wrote: >> | b | >> b := (1 to: 10000) asBag. >> [b isEmpty] bench >> >> before: : '5,540 per second. 181 microseconds per run.' >> now: '167,000 per second. 6 microseconds per run.' >> >> In my book that's a speedup worth having. > > You're depending on the superclass implementation in Collection for > that speedup. What did you say about that yesterday? > > Honestly, Bert, it almost feels like you're being intellectually > dishonest. You chose the only one that got sped up and ignored all > the ones that got slowed down. AND, you also ignored all the other > points (again) which render the above point irrelevant. Sad. > > I give up. You "win". > > From eliot.miranda at gmail.com Thu Oct 27 17:36:58 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Oct 27 17:37:02 2016 Subject: [squeak-dev] Re: New protocols dialog In-Reply-To: References: Message-ID: On Tue, Oct 25, 2016 at 1:54 PM, Eliot Miranda wrote: > Hats off to whoever (Marcel?) implemented the new protocol selection > dialog such that one no longer as to select "new..." and interact with a > second dialog and can merely type the new protocol right there. This has > been bugging me for years. Thank you! > One frustration with the new dialog is that, at last on Mac OS X, whether focus is in the text input or in the list of protocols, the up and down arrow keys have no effect, so one has to go to the mouse in order to select a protocol. Any chance of fixing this? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/d2c53479/attachment.htm From robert.w.withers at gmail.com Thu Oct 27 18:02:51 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Thu Oct 27 18:02:50 2016 Subject: [squeak-dev] Re: Announce: whisper updated In-Reply-To: <612f7bf3-aaf1-8f49-634f-6e6305658f86@gmail.com> References: <612f7bf3-aaf1-8f49-634f-6e6305658f86@gmail.com> Message-ID: <2ea62630-2715-dc71-8f01-7faf4b36313e@gmail.com> Though the whisper code is currently language inter-inoperable, the latest code is being hosted on gitlab with International Rabbits, as voix-basse-mourde. Here is the code: https://gitlab.com/des-lapins-internationale. If you would like to help, Java could be brought forwards adding PBEReader/PBEWriter, dataEncoding negotiation, SecureSessionSpecification with filtered cryptoProtocolNames, dataEncoderNames, scopeMaker and the traceDomains to parameterize the server behavior. On the Smalltalk side, Whisper_json, Whisper_magma and Whisper_fuel could be implemented. Matching JSON on the Java side. FEC Reed-Solomon could be tested and repaired (it's broken). kerkkutatti is the Java code for remote promises and has the Smalltalk porcini code too. With Whisper's new SecureServerSpecification, the injection of a scopeMaker and encoder is all the config after push into the stack. Lots of work there on both sides, to get them talking. If you want to help, have a beer and I'll match you, let me know what you want to work on and I can add you as a gitlab rabbit. Best, Rob On 10/16/2016 7:22 PM, Robert Withers wrote: > > Folks, I have updated whisper or SecureSession to provide > Java/Squeak/Pharo interoperability. I am no longer able to access the > Cryptography repo so I cannot push code, but the squeak/pharo code is > in the squeak-pharo directory in the whisper github project. Here is > the GitPages link: https://robertwithers.github.io/whisper, with all > other links. > > whisper is osi Layer 5 SecureSession with modern crypto: > Java/Squeak/Pharo interoperability. > > * flips normative osi layer 5 and 6 on its head: now, 5 is > crypto and 6 is session state resumption > * 3-way DH-2048/RSA-2048/RSAPublicKey ASN1DER encoding > * 256-bit AES/CBC/PKCS7Padding, 128-bit IV, 160-bit SHA1 E&M > * PBEEncryptorAES-256 with PBKDF2WithHmacSHA1 > > Rob > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/ff215ae8/attachment.htm From hannes.hirzel at gmail.com Thu Oct 27 19:51:42 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Oct 27 19:51:45 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> Message-ID: Or to put it diffently: Bert supplied the first contribution in this thread which is about performance actually measuring performance...... More is welcome. On 10/27/16, H. Hirzel wrote: > Yes, in this case a series of tests across collection classes actually > would be a proof. A single point measurement is not a statistically > relevant result. > > --Hannes > > On 10/27/16, Chris Muller wrote: >>> | b | >>> b := (1 to: 10000) asBag. >>> [b isEmpty] bench >>> >>> before: : '5,540 per second. 181 microseconds per run.' >>> now: '167,000 per second. 6 microseconds per run.' >>> >>> In my book that's a speedup worth having. >> >> You're depending on the superclass implementation in Collection for >> that speedup. What did you say about that yesterday? >> >> Honestly, Bert, it almost feels like you're being intellectually >> dishonest. You chose the only one that got sped up and ignored all >> the ones that got slowed down. AND, you also ignored all the other >> points (again) which render the above point irrelevant. Sad. >> >> I give up. You "win". >> >> > From robert.w.withers at gmail.com Thu Oct 27 19:53:00 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Thu Oct 27 19:53:01 2016 Subject: [squeak-dev] Re: Announce: whisper updated In-Reply-To: <2ea62630-2715-dc71-8f01-7faf4b36313e@gmail.com> References: <612f7bf3-aaf1-8f49-634f-6e6305658f86@gmail.com> <2ea62630-2715-dc71-8f01-7faf4b36313e@gmail.com> Message-ID: <8c49e22f-fd35-5061-e11f-ef1e1f08d9e1@gmail.com> The code is broken, so I jumped the gun again! Its more than I thought with PBE iv problems. I rolled the code out of the Cryptography repo until I can get it straight. The vm issue can use this package to reproduce: http://jmp.sh/GWcI9rB. Sorry about that, Rob On 10/27/2016 2:02 PM, Robert Withers wrote: > > Though the whisper code is currently language inter-inoperable, the > latest code is being hosted on gitlab with International Rabbits, as > voix-basse-mourde. Here is the code: > https://gitlab.com/des-lapins-internationale. > > If you would like to help, Java could be brought forwards adding > PBEReader/PBEWriter, dataEncoding negotiation, > SecureSessionSpecification with filtered cryptoProtocolNames, > dataEncoderNames, scopeMaker and the traceDomains to parameterize the > server behavior. On the Smalltalk side, Whisper_json, Whisper_magma > and Whisper_fuel could be implemented. Matching JSON on the Java side. > FEC Reed-Solomon could be tested and repaired (it's broken). > > kerkkutatti is the Java code for remote promises and has the Smalltalk > porcini code too. With Whisper's new SecureServerSpecification, the > injection of a scopeMaker and encoder is all the config after push > into the stack. Lots of work there on both sides, to get them talking. > > If you want to help, have a beer and I'll match you, let me know what > you want to work on and I can add you as a gitlab rabbit. > > Best, > Rob > > On 10/16/2016 7:22 PM, Robert Withers wrote: >> >> Folks, I have updated whisper or SecureSession to provide >> Java/Squeak/Pharo interoperability. I am no longer able to access the >> Cryptography repo so I cannot push code, but the squeak/pharo code is >> in the squeak-pharo directory in the whisper github project. Here is >> the GitPages link: https://robertwithers.github.io/whisper, with all >> other links. >> >> whisper is osi Layer 5 SecureSession with modern crypto: >> Java/Squeak/Pharo interoperability. >> >> * flips normative osi layer 5 and 6 on its head: now, 5 is >> crypto and 6 is session state resumption >> * 3-way DH-2048/RSA-2048/RSAPublicKey ASN1DER encoding >> * 256-bit AES/CBC/PKCS7Padding, 128-bit IV, 160-bit SHA1 E&M >> * PBEEncryptorAES-256 with PBKDF2WithHmacSHA1 >> >> Rob >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/24ad9973/attachment.htm From nicolas.cellier.aka.nice at gmail.com Thu Oct 27 20:28:41 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 27 20:28:47 2016 Subject: [squeak-dev] The Inbox: Tools-nice.731.mcz In-Reply-To: References: Message-ID: Hi Tobias, Marcel Does it sound OK? 2016-10-27 22:23 GMT+02:00 : > Nicolas Cellier uploaded a new version of Tools to project The Inbox: > http://source.squeak.org/inbox/Tools-nice.731.mcz > > ==================== Summary ==================== > > Name: Tools-nice.731 > Author: nice > Time: 27 October 2016, 10:23:11.706603 pm > UUID: 31a047c7-9937-46f9-8710-1c38882f2a77 > Ancestors: Tools-eem.730 > > Fix the field menu of Set inspector. > > It's sent to a MenuMorph which DNU labels:. > Anyway, implementors of labels: do not expect alternate (selector action > selector acton ...) > > =============== Diff against Tools-eem.730 =============== > > Item was changed: > ----- Method: SetInspector>>mainFieldListMenu: (in category 'menu') > ----- > mainFieldListMenu: aMenu > > + ^ aMenu addList: #( > - ^ aMenu labels: #( > ('inspect' > inspectSelection) > ('copy name' > copyName) > ('objects pointing to this value' > objectReferencesToSelection) > ('refresh view' > update) > ('remove' > removeSelection) > - > ('basic inspect' > inspectBasic)); > yourself > ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/d6dd0226/attachment.htm From Das.Linux at gmx.de Thu Oct 27 20:42:20 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Oct 27 20:42:24 2016 Subject: [squeak-dev] The Inbox: Tools-nice.731.mcz In-Reply-To: References: Message-ID: <21F61009-B6FD-4B6C-B665-CF3EFED976BE@gmx.de> Hi, On 27.10.2016, at 22:28, Nicolas Cellier wrote: > Hi Tobias, Marcel > Does it sound OK? yes, good catch. #addList: (or #addTranslatedList: for that matter) is IMHO the way to go. Best regards -Tobias > > 2016-10-27 22:23 GMT+02:00 : > Nicolas Cellier uploaded a new version of Tools to project The Inbox: > http://source.squeak.org/inbox/Tools-nice.731.mcz > > ==================== Summary ==================== > > Name: Tools-nice.731 > Author: nice > Time: 27 October 2016, 10:23:11.706603 pm > UUID: 31a047c7-9937-46f9-8710-1c38882f2a77 > Ancestors: Tools-eem.730 > > Fix the field menu of Set inspector. > > It's sent to a MenuMorph which DNU labels:. > Anyway, implementors of labels: do not expect alternate (selector action selector acton ...) > > =============== Diff against Tools-eem.730 =============== > > Item was changed: > ----- Method: SetInspector>>mainFieldListMenu: (in category 'menu') ----- > mainFieldListMenu: aMenu > > + ^ aMenu addList: #( > - ^ aMenu labels: #( > ('inspect' inspectSelection) > ('copy name' copyName) > ('objects pointing to this value' objectReferencesToSelection) > ('refresh view' update) > ('remove' removeSelection) > - > ('basic inspect' inspectBasic)); > yourself > ! > > > > From nicolas.cellier.aka.nice at gmail.com Thu Oct 27 21:04:35 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Oct 27 21:04:38 2016 Subject: [squeak-dev] The Trunk: ST80-nice.220.mcz In-Reply-To: References: Message-ID: Hi Karl, Hack sounds like a good name to me. You can't imagine what a nest of stateful twisted tricky code modified during 30 years I had to patiently untangle... But it's very hard to remember all the details 3 years after... Fortunately, we have an electronic memory to assist us: If I dig thru the [The Trunk] commits threads in the mailing list it seems that on 2 October 2013: - the hack was already named "hack" before Graphics-nice.243.mcz - it was in generic code (for both Morphic/ST80) but dedicated to ST80 only - so I ported it back to a ST80 specific scanner in ST80-nice.152.mcz So, despite my initials and my opinion, the name "hack" here is not my own production, just a copy/paste ;) Now that trunk MC server also has a longer memory, you can see the text already present in CharacterBlockcanner>>crossedX version ar 12/15/2001. And I would not be much surprised that most code in this area comes from Xerox era, and Dan Ingalls himself. 2016-10-27 11:04 GMT+02:00 karl ramberg : > Should the comment be changed here? Or is it still a hack ? > > Best, > Karl > > On Thu, Oct 27, 2016 at 2:43 AM, wrote: > >> Nicolas Cellier uploaded a new version of ST80 to project The Trunk: >> http://source.squeak.org/trunk/ST80-nice.220.mcz >> >> ==================== Summary ==================== >> >> Name: ST80-nice.220 >> Author: nice >> Time: 27 October 2016, 2:43:25.251747 am >> UUID: e617501e-764e-4c9c-8c0c-a2a559e84940 >> Ancestors: ST80-tfel.219 >> >> Remove an old Transcript show: remnant from horrorful text selection >> debug session. >> >> =============== Diff against ST80-tfel.219 =============== >> >> Item was changed: >> ----- Method: CharacterBlockScannerForMVC>>crossedX (in category 'stop >> conditions') ----- >> crossedX >> characterIndex == nil ifFalse: [ >> "If the last character of the last line is a space, >> and it crosses the right margin, then locating >> the character block after it is impossible without this >> hack." >> + characterIndex > text size ifTrue: [ >> - characterIndex > text size ifTrue: [Transcript cr; >> show:'here'. >> lastIndex := characterIndex. >> characterPoint := (nextLeftMargin ifNil: >> [leftMargin]) @ (destY + line lineHeight). >> ^true]]. >> ^super crossedX! >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/3c6a16f3/attachment.htm From karlramberg at gmail.com Thu Oct 27 21:30:15 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Oct 27 21:30:18 2016 Subject: [squeak-dev] The Trunk: ST80-nice.220.mcz In-Reply-To: References: Message-ID: OK :-) Some of the layout stuff is really painful to debug Best, Karl On Thu, Oct 27, 2016 at 11:04 PM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > Hi Karl, > Hack sounds like a good name to me. > You can't imagine what a nest of stateful twisted tricky code modified > during 30 years I had to patiently untangle... > But it's very hard to remember all the details 3 years after... > Fortunately, we have an electronic memory to assist us: > If I dig thru the [The Trunk] commits threads in the mailing list it seems > that on 2 October 2013: > - the hack was already named "hack" before Graphics-nice.243.mcz > - it was in generic code (for both Morphic/ST80) but dedicated to ST80 only > - so I ported it back to a ST80 specific scanner in ST80-nice.152.mcz > > So, despite my initials and my opinion, the name "hack" here is not my own > production, just a copy/paste ;) > Now that trunk MC server also has a longer memory, you can see the text > already present in CharacterBlockcanner>>crossedX version ar 12/15/2001. > And I would not be much surprised that most code in this area comes from > Xerox era, and Dan Ingalls himself. > > > 2016-10-27 11:04 GMT+02:00 karl ramberg : > >> Should the comment be changed here? Or is it still a hack ? >> >> Best, >> Karl >> >> On Thu, Oct 27, 2016 at 2:43 AM, wrote: >> >>> Nicolas Cellier uploaded a new version of ST80 to project The Trunk: >>> http://source.squeak.org/trunk/ST80-nice.220.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: ST80-nice.220 >>> Author: nice >>> Time: 27 October 2016, 2:43:25.251747 am >>> UUID: e617501e-764e-4c9c-8c0c-a2a559e84940 >>> Ancestors: ST80-tfel.219 >>> >>> Remove an old Transcript show: remnant from horrorful text selection >>> debug session. >>> >>> =============== Diff against ST80-tfel.219 =============== >>> >>> Item was changed: >>> ----- Method: CharacterBlockScannerForMVC>>crossedX (in category >>> 'stop conditions') ----- >>> crossedX >>> characterIndex == nil ifFalse: [ >>> "If the last character of the last line is a space, >>> and it crosses the right margin, then locating >>> the character block after it is impossible without this >>> hack." >>> + characterIndex > text size ifTrue: [ >>> - characterIndex > text size ifTrue: [Transcript cr; >>> show:'here'. >>> lastIndex := characterIndex. >>> characterPoint := (nextLeftMargin ifNil: >>> [leftMargin]) @ (destY + line lineHeight). >>> ^true]]. >>> ^super crossedX! >>> >>> >>> >> >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161027/bf2a86e4/attachment.htm From tim at rowledge.org Thu Oct 27 21:34:53 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Oct 27 21:34:57 2016 Subject: [squeak-dev] The Trunk: ST80-nice.220.mcz In-Reply-To: References: Message-ID: > On 27-10-2016, at 2:30 PM, karl ramberg wrote: > > OK :-) > Some of the layout stuff is really painful to debug This turns out to be incorrect. In fact *all* that layout stuff is really painful to debug. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BFM: Branch on Full Moon From tim at rowledge.org Thu Oct 27 23:13:40 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Oct 27 23:13:46 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> Message-ID: <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Progress so far - Had fun loading up mosquitto & client stuff on a couple of Pi Got basics working - subscribe on one, publish on the other, woo-hoo! messages. Got equivalent client stuff on my ESP8266 (after loading arduino IDE and all the other gunge to support that) Re-wrote weather-sensor server python code (oh yuck. Have you actually seen python? ) to publish instread of using a RESTful server thingy. Load mosquitto on my mac-mini-server and use that as the broker. It kinda-sorta works nicely, except after a while (not yet worked out how long) the weather client crashes because the attempt to open up a connection that has worked several hundred times decides to fail. The error message 'socket.gaierror: [errno -2] name or service not known? doesn?t appear to lead to any readily comprehensible info. Wild guess right now is something to do with one or other machine going to sleep? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: COMB: Straighten Wires From monty2 at programmer.net Thu Oct 27 23:23:28 2016 From: monty2 at programmer.net (monty) Date: Thu Oct 27 23:23:34 2016 Subject: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work In-Reply-To: References: <20161025234255.GA49147@shell.msen.com> , Message-ID: Or just make Collection>>#size a subclassResponsibiliity! This will force implementors to give proper #size implementations that are usually O(1), which almost all do already. Bag could get the #do:-based #isEmpty as an optimization, or we could add a dedicated 'tally' inst var like other collections have and its #size could return that, making the default #size-based #isEmpty OK for it. This is a compromise that addresses the concerns about the default Collection>>#isEmpty degrading linearly without a constant #size and the concerns about harming the performance of existing libraries and applications with custom collections that assume Collection>>#isEmpty is #size-based. Please consider it. > From: "Bert Freudenberg" > To: "Chris Muller" , "The general-purpose Squeak developers list" > Subject: Re: [squeak-dev] Re: The defaullt implementation of isEmpty might do too much work > > On Thu, Oct 27, 2016 at 12:51 AM, Chris Muller wrote: > In exchange for these blemishes, how many classes actually got benefit > from inheriting the new implementation? > > | b | > b := (1 to: 10000) asBag. > [b isEmpty] bench > > before: : '5,540 per second. 181 microseconds per run.' > now: '167,000 per second. 6 microseconds per run.' > In my book that's a speedup worth having. > From tim at rowledge.org Sat Oct 29 04:16:25 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 29 04:16:28 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: Important document for mqtt - http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html An actually intelligible spec, just for a change. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: SNARF: System Normalize And Reset Flags From nicolas.cellier.aka.nice at gmail.com Sat Oct 29 19:08:40 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat Oct 29 19:08:44 2016 Subject: [squeak-dev] obsolete code version re-imported thru squeakland (overrides?) Message-ID: After seeing the post of Bert about ldexp http://croquetweak.blogspot.fr/2014/08/deconstructing-floats-frexp-and-ldexp.html I wanted to check what's in image. But I realized that current Squeak fallback code for Float>>timesTwoPower: is not OK. It's the version from Etoys-Squeakland corresponding to old squeak implementation The correct one should be that of Kernel-nice.900.mcz http://lists.squeakfoundation.org/pipermail/packages/2015-February/007538.html Fortunately it has been moved (duplicated) in-between in both subclasses, thus maybe the Squeakland one is not an override? I can't really trace what happened because it's hidden in the spur transition. But IMO it would be preferable to implement the Smalltalk one in Float only once, and rely on ^super timesTwoPower: in case of primitive failure. I saw some other instances of code that was fixed but reintroduced (like all the character scanner duplication). What's the strategy about it, can we touch Squeakland, or shall we refrain? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161029/169720b2/attachment.htm From tim at rowledge.org Sat Oct 29 22:37:09 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat Oct 29 22:37:15 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim taffeta - Welsh goats cheese From goran at krampe.se Sun Oct 30 10:07:14 2016 From: goran at krampe.se (=?UTF-8?Q?G=c3=b6ran_Krampe?=) Date: Sun Oct 30 10:07:19 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: Hey! On 10/30/2016 12:37 AM, tim Rowledge wrote: > And now I have my ESP8266 with DHT22 temp/humidity sensor publishing > ok. Arduino c++ is really quite an amazingly unpleasant language. We > need Smalltalk on these things! You can always help me with Spry! (sprylang.org) It's becoming a kind of Smalltalk, and it can easily run in very small spaces. I know that Espruino (the tiny js interpreter that runs on ESP8266) needs a similar amount of RAM etc that Spry does. In fact, I have already made an example where I almost made it all the way by wrapping Arduino libraries: https://github.com/gokr/ardunimo That shows an example in Nim linking happily with the Arduino libraries, but that means it would be trivially easy to expose it to Spry too. regards, G?ran From bert at freudenbergs.de Sun Oct 30 10:29:52 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Oct 30 10:29:55 2016 Subject: [squeak-dev] obsolete code version re-imported thru squeakland (overrides?) In-Reply-To: References: Message-ID: On Sat, Oct 29, 2016 at 9:08 PM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > After seeing the post of Bert about ldexp > http://croquetweak.blogspot.fr/2014/08/deconstructing- > floats-frexp-and-ldexp.html > > I wanted to check what's in image. > But I realized that current Squeak fallback code for Float>>timesTwoPower: > is not OK. > It's the version from Etoys-Squeakland corresponding to old squeak > implementation > > The correct one should be that of Kernel-nice.900.mcz > http://lists.squeakfoundation.org/pipermail/packages/2015- > February/007538.html > Fortunately it has been moved (duplicated) in-between in both subclasses, > thus maybe the Squeakland one is not an override? I can't really trace what > happened because it's hidden in the spur transition. > But IMO it would be preferable to implement the Smalltalk one in Float > only once, and rely on ^super timesTwoPower: in case of primitive failure. > > I saw some other instances of code that was fixed but reintroduced (like > all the character scanner duplication). What's the strategy about it, can > we touch Squeakland, or shall we refrain? > Touch it, absolutely :) - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161030/4949acfa/attachment.htm From craig at blackpagedigital.com Sun Oct 30 13:15:09 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sun Oct 30 13:15:35 2016 Subject: [squeak-dev] Happy 20th Birthday Squeak! Message-ID: Hi all-- Happy 20th birthday to us! It was twenty years ago that Dan Ingalls and the rest of Alan Kay's team announced Squeak to the world. You really changed things with this run at the fence. :) Thanks again! To celebrate, I've released version 7 alpha 1 of Context, an umbrella project for three other ones: Spoon (a minimal object memory), Naiad (a module system), and Tether (remote messaging). I've also released a fourth, Snowglobe (app streaming). I've written blog posts about each of them at thiscontext.com. I'll post the links in future threads. hooray! -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at blackpagedigital.com Sun Oct 30 13:15:54 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sun Oct 30 13:20:42 2016 Subject: [squeak-dev] Tether: remote messaging between Smalltalks with WebSockets Message-ID: Hi-- A look into Tether remote messaging with Smalltalk. https://tinyurl.com/j93af8r (blog.thiscontext.com) -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at blackpagedigital.com Sun Oct 30 13:15:28 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sun Oct 30 13:25:21 2016 Subject: [squeak-dev] SqueakJS changes its world with ThisWebpage Message-ID: Hi-- With the ascendancy of JavaScript, the common execution environment provided by web browsers is effectively another host operating system. SqueakJS is poised to do amazing things on the front end. https://tinyurl.com/gtrcnuz (blog.thiscontext.com) -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From btc at openinworld.com Sun Oct 30 13:26:26 2016 From: btc at openinworld.com (Ben Coman) Date: Sun Oct 30 13:26:50 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: On Sun, Oct 30, 2016 at 6:37 AM, tim Rowledge wrote: > And now I have my ESP8266 with DHT22 temp/humidity sensor publishing ok. Arduino c++ is really quite an amazingly unpleasant language. We need Smalltalk on these things! How small could we conceivably make the VM to fit on one of these...? https://www.arduino.cc/en/Products/Compare For example the Mega... MCU: 8-bit 16 MHz AVR EEPROM: 4kB RAM: 8kB FLASH: 256kB Current vm build product sizes... 4.1M phcogspurlinuxht/lib/.../pharo 4.8M sqcogspurlinuxht/lib/.../squeak 3.9M sqstkspurlinuxht/lib/.../squeak 1.2M sqstkspurlinuxhtminimal/lib/.../ That last one built without any internal nor external plugins. What areas might be attacked to feasibly improve on that, to the point it can meet rising hardware specs? The 8 bit-ness is probably a killer though (??) Maybe it would be better to port the VM to the ESP32... MCU: 32-bit 240 Mhz Tensilica Xtensa LX6 ROM: 448 KBytes for booting and core functions RAM: 520 KBytes FLASH: 4MB (per retail boards - 4 x 16 MBytes supported) https://www.sparkfun.com/products/13907 https://www.adafruit.com/products/3269 https://cdn-shop.adafruit.com/product-files/3269/esp32_datasheet_en_0.pdf Those specs look like they are getting close enough to consider possibility. How small might an extremely minimal image be that just toggles an LED? Hmmm.... I wonder where we might find someone both familiar with the MCU and positively inclined to Smalltalk? https://en.wikipedia.org/wiki/Tensilica Some general ESP32 info... http://hackaday.com/2016/10/04/how-to-get-started-with-the-esp32/ http://hackaday.com/2016/09/15/esp32-hands-on-awesome-promise/ http://esp32.net/ cheers -ben [1] From craig at blackpagedigital.com Sun Oct 30 13:15:41 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sun Oct 30 13:30:26 2016 Subject: [squeak-dev] Suspend in the browser, resume on the desktop. Message-ID: Hi-- Now that we can control a web browser with SqueakJS, we can escape from it to Cog. https://tinyurl.com/jqltou6 (blog.thiscontext.com) -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From tim at rowledge.org Sun Oct 30 18:08:52 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun Oct 30 18:08:55 2016 Subject: [squeak-dev] MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: > On 30-10-2016, at 3:07 AM, G?ran Krampe wrote: > > Hey! > > On 10/30/2016 12:37 AM, tim Rowledge wrote: >> And now I have my ESP8266 with DHT22 temp/humidity sensor publishing >> ok. Arduino c++ is really quite an amazingly unpleasant language. We >> need Smalltalk on these things! > > You can always help me with Spry! (sprylang.org) It?s interesting but I honestly don?t think I can cope with trying to learn another language at this point! My brain is both full and decaying. I think I need another dried-frog pill from the Bursar. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: DUL: Delete Utility Library From Lou at Keystone-Software.com Sun Oct 30 18:32:33 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Sun Oct 30 18:33:27 2016 Subject: [squeak-dev] Happy 20th Birthday Squeak! References: Message-ID: Congrats Squeak:)) Lou On Sun, 30 Oct 2016 14:15:09 +0100, Craig Latta wrote: > >Hi all-- > > Happy 20th birthday to us! It was twenty years ago that Dan Ingalls >and the rest of Alan Kay's team announced Squeak to the world. You >really changed things with this run at the fence. :) Thanks again! > > To celebrate, I've released version 7 alpha 1 of Context, an >umbrella project for three other ones: Spoon (a minimal object memory), >Naiad (a module system), and Tether (remote messaging). I've also >released a fourth, Snowglobe (app streaming). I've written blog posts >about each of them at thiscontext.com. I'll post the links in future >threads. > > > hooray! > >-C -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From asqueaker at gmail.com Sun Oct 30 20:42:35 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sun Oct 30 20:43:18 2016 Subject: [squeak-dev] SqueakJS-invoked Squeak installers In-Reply-To: References: Message-ID: Hi Craig, I'm interested in this. I tried it in a Ubuntu 14.04.4 LTS Desktop running on a Oracle VirtualBox. In the SqueakJS image, it put up an alert box saying "Please run the file I just downloaded". I wasn't sure where it downloaded it so clicked on the "Linux" link to download "squeak.sh" to my home directory. I then ran in a terminal window. At the bottom, it seemed to run into an issue, (possibly because of the uname of the VirtualBox?), here's the end of the terminal log: - Chris ============ ./squeak.sh .... inflating: Context-7.0-All-in-One/squeak.bat inflating: Context-7.0-All-in-One/squeak.sh Starting Squeak... cmm@vbox-ubuntu-desktop:~$ Error. Could not determine platform's libc path for VM. Try forcing $PLATFORMLIBDIR in /home/cmm/Context-7.0-All-in-One/Context-7.0-xxxxx-32bit-All-in-One.app/Contents/Linux-i686/bin/squeak, based on LIBC_SO. Please report what works to squeak [vm-dev] mail list. LIBC_SO= DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS" NAME="Ubuntu" VERSION="14.04.4 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.4 LTS" VERSION_ID="14.04" UNAME=Linux vbox-ubuntu-desktop 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux /home/cmm/Context-7.0-All-in-One/Context-7.0-xxxxx-32bit-All-in-One.app/Contents/Linux-i686/bin/squeak: 36: /home/cmm/Context-7.0-All-in-One/Context-7.0-xxxxx-32bit-All-in-One.app/Contents/Linux-i686/bin/squeak: [[: not found On Thu, Oct 27, 2016 at 1:55 AM, Craig Latta wrote: > > > Hi-- > > I've written some Squeak installers that are invoked by SqueakJS. > When you visit [1], SqueakJS installs native Squeak on localhost and > makes a remote-messaging connection to it. Please check it out and let > me know how it goes. So far I've tested on > macOS/{Chrome,Safari,Firefox}, Windows/{Edge,Chrome,Firefox}, and > Linux/{Firefox,Chrome}. > > > thanks! > > -C > > [1] http://blackpagedigital.com/squeak > > -- > Craig Latta > Black Page Digital > Amsterdam | San Francisco > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > > > From craig at blackpagedigital.com Sun Oct 30 21:30:51 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Sun Oct 30 21:31:33 2016 Subject: [squeak-dev] re: MQTT for Squeak? In-Reply-To: References: <83AC39E0-0322-4A82-9F88-80FA6AB71DA3@rowledge.org> <20161025005916.GA6362@shell.msen.com> <49C3FA8A-BC9C-4735-BB53-963117F9BA6C@rowledge.org> <01ADEEC3-B81F-4975-9BA2-3CB2F489FD9D@rowledge.org> Message-ID: Hi Ben-- > How small might an extremely minimal image be that just toggles an > LED? That's 1kB. -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From tim at rowledge.org Sun Oct 30 22:44:56 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun Oct 30 22:45:00 2016 Subject: [squeak-dev] Happy 20th Birthday Squeak! In-Reply-To: References: Message-ID: <1D56B69C-949F-4748-B7E0-37DA44611136@rowledge.org> > On 30-10-2016, at 6:15 AM, Craig Latta wrote: > > > Hi all-- > > Happy 20th birthday to us! Absolutely! We still have some Squeak badges available - details later. We have a donate button on the website. We have a damn good system to play in. We have a swiki that (always) needs updates and tidying. We have code that needs both commenting and documenting better. We have lots of fun stuff to do for the *next* 20 years... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Hardware: The parts of a computer system that can be kicked. From bert at freudenbergs.de Mon Oct 31 08:57:40 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Oct 31 08:57:43 2016 Subject: [squeak-dev] SqueakJS-invoked Squeak installers In-Reply-To: References: Message-ID: On Sunday, 30 October 2016, Chris Muller wrote: > > At the bottom, it seemed to run into an issue, (possibly because of > the uname of the VirtualBox?), here's the end of the terminal log: > > - Chris > > > 36: /home/cmm/Context-7.0-All-in-One/Context-7.0-xxxxx-32bit- > All-in-One.app/Contents/Linux-i686/bin/squeak: > [[: not found > Maybe a sh vs bash problem? - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161031/c406f6e3/attachment.htm From craig at blackpagedigital.com Mon Oct 31 10:38:41 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Mon Oct 31 10:39:32 2016 Subject: [squeak-dev] re: SqueakJS-invoked Squeak installers In-Reply-To: References: Message-ID: Hi Chris-- Well, not finding libc is a problem. Have you run Squeak successfully on that setup before? I don't think the uname matters, and I don't know what it means by "[[: not found". As for sh vs. bash, it should be running sh since the "#!/bin/sh" magic cookie is that beginning of the script. Thanks for trying it out! -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From craig at blackpagedigital.com Mon Oct 31 10:43:05 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Mon Oct 31 10:46:02 2016 Subject: [squeak-dev] App streaming with Snowglobe Message-ID: Hi-- Running a Squeak app is as easy as playing an online video... https://tinyurl.com/hblwdr2 (blog.thiscontext.com) -C -- Craig Latta Black Page Digital Amsterdam | San Francisco craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From lewis at mail.msen.com Mon Oct 31 15:57:08 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Oct 31 15:57:10 2016 Subject: [squeak-dev] re: SqueakJS-invoked Squeak installers In-Reply-To: References: Message-ID: <3044.136.1.1.165.1477929428.squirrel@webmail.msen.com> Most newer Linux distributions will have /bin/sh linked to something other than bash (motivated mainly by a recent security hole found in bash). A script that depends on bash features needs to explicitly invoke bash in the shebang line. Dave > > Hi Chris-- > > Well, not finding libc is a problem. Have you run Squeak > successfully on that setup before? I don't think the uname matters, and > I don't know what it means by "[[: not found". As for sh vs. bash, it > should be running sh since the "#!/bin/sh" magic cookie is that > beginning of the script. > > Thanks for trying it out! > > > -C > > -- > Craig Latta > Black Page Digital > Amsterdam | San Francisco > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > From casimiro.barreto at gmail.com Mon Oct 31 16:11:23 2016 From: casimiro.barreto at gmail.com (Casimiro de Almeida Barreto) Date: Mon Oct 31 16:11:44 2016 Subject: [squeak-dev] Happy 20th Birthday Squeak! In-Reply-To: References: Message-ID: <999e89a4-e0e7-1dad-08c5-0355ecdb4e9b@gmail.com> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 859 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20161031/309541dd/signature.pgp