From tim at rowledge.org Tue Mar 1 02:16:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Mar 1 02:16:07 2016 Subject: [squeak-dev] Raspberry Pi 3 & Squeak Message-ID: <9D9B2B03-9A96-474E-BD39-2BF5B7BF9AAC@rowledge.org> Yes, COG runs on Pi 3; no, not as an ARM64 application, nor does it generate ARM64 instructions. Yes, it could. Yes, it may well do so sometime soon; yes, one meeeeeeellion dollars. Performance is obviously improved over the Pi2. Not completely sure as yet since I have a prototype not a production machine. Pi 3 is still $35 plus tax/shipping/etc. See https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/ for details. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim All programmers are playwrights and all computers are lousy actors. From commits at source.squeak.org Tue Mar 1 03:15:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 03:15:11 2016 Subject: [squeak-dev] The Trunk: Network-eem.173.mcz Message-ID: Eliot Miranda uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-eem.173.mcz ==================== Summary ==================== Name: Network-eem.173 Author: eem Time: 29 February 2016, 7:14:37.642865 pm UUID: ea895f60-b473-4bd3-95b3-9dca79beeb9e Ancestors: Network-eem.172 If preemption does not yield then Socket>>sendData:count: cannot simply spin while failing to send any data. It must at least yield (but why does it not check for errors?). =============== Diff against Network-eem.172 =============== Item was changed: ----- Method: Socket>>sendData:count: (in category 'sending') ----- sendData: buffer count: n + "Send the amount of data from the given buffer." + | sent totalSent | + totalSent := 0. + [totalSent < n] whileTrue: + [sent := self sendSomeData: buffer startIndex: totalSent+1 count: n-totalSent. + totalSent := totalSent + sent. + sent = 0 ifTrue: "If no data was sent don't just sit here spinning hard..." + [Processor yield]].! - "Send the amount of data from the given buffer" - | sent | - sent := 0. - [sent < n] whileTrue:[ - sent := sent + (self sendSomeData: buffer startIndex: sent+1 count: (n-sent))].! From btc at openinworld.com Tue Mar 1 04:52:43 2016 From: btc at openinworld.com (Ben Coman) Date: Tue Mar 1 04:53:06 2016 Subject: [squeak-dev] Raspberry Pi 3 & Squeak In-Reply-To: <9D9B2B03-9A96-474E-BD39-2BF5B7BF9AAC@rowledge.org> References: <9D9B2B03-9A96-474E-BD39-2BF5B7BF9AAC@rowledge.org> Message-ID: On Tue, Mar 1, 2016 at 10:16 AM, tim Rowledge wrote: > Yes, COG runs on Pi 3; no, not as an ARM64 application, nor does it generate ARM64 instructions. Yes, it could. Yes, it may well do so sometime soon; yes, one meeeeeeellion dollars. > > Performance is obviously improved over the Pi2. Not completely sure as yet since I have a prototype not a production machine. > > Pi 3 is still $35 plus tax/shipping/etc. See https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/ for details. Great to hear. Coincidentally, I heard about the Pi3 last night and ordered one due to ship 7 march. Built-in wireless and more GPIO pins are nice. I found an interesting comparison of ARM A7 and A53 http://www.anandtech.com/show/8718/the-samsung-galaxy-note-4-exynos-review/3 Also I was suddenly disappointed that I had bought a Pine64, but I was happy to read this balanced report that it retains some advantages... http://forum.pine64.org/archive/index.php?thread-379.html cheers -ben From bert at freudenbergs.de Tue Mar 1 14:17:37 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 1 14:17:43 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> Message-ID: <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> On 29.02.2016, at 16:55, Chris Muller wrote: > > Incidentally, the update stream was _already_ broken before, and is > still is, due to DateAndTime>>#< using an underscore assignment? What? Didn?t I fix that in Kernel-bf.998? Btw this came from me enabling the syntaxHighlightingAsYouTypeLeftArrowAssignment preference assuming that it would show assignment arrows but store as colon-equals. Maybe we should get rid of that, or fix it to do just that. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160301/c2a82465/smime.bin From commits at source.squeak.org Tue Mar 1 16:28:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 16:28:13 2016 Subject: [squeak-dev] The Trunk: Morphic-topa.1090.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1090.mcz ==================== Summary ==================== Name: Morphic-topa.1090 Author: topa Time: 1 March 2016, 5:27:34.235871 pm UUID: 1e7c7560-918a-475f-b7dc-52504303fdf1 Ancestors: Morphic-mt.1089 Make keyStroke handling in SimpleHierarchicalListMorph more robust, so it can be used with most of the Tools' key handler methods. =============== Diff against Morphic-mt.1089 =============== Item was changed: ----- Method: SimpleHierarchicalListMorph>>keyStroke: (in category 'event handling') ----- keyStroke: event "Process potential command keys" (self scrollByKeyboard: event) ifTrue: [^ true]. event keyCharacter asciiValue < 32 ifTrue: [ ^ self specialKeyPressed: event keyCharacter asciiValue]. + " A lot of actions do not return a Boolean here (#messageListKey:from:, + #classListKey:from:, ...); even most #arrowKey:from: implementors do not. + Hence, we explicitely check for false and else assume truthieness" + ^ (self keyStrokeAction: event) ~~ false + ! - (self keyStrokeAction: event) ifTrue: [^ true]. - - ^ false! From commits at source.squeak.org Tue Mar 1 16:32:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 16:32:25 2016 Subject: [squeak-dev] The Trunk: Tools-topa.676.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.676.mcz ==================== Summary ==================== Name: Tools-topa.676 Author: topa Time: 1 March 2016, 5:32:00.896321 pm UUID: 9dd551d2-d6c4-4704-af6f-b3ec510732f8 Ancestors: Tools-topa.675 Generalize messageList callbacks to be usabe with message names, too. =============== Diff against Tools-topa.675 =============== Item was changed: ----- Method: Browser>>messageHelpAt: (in category 'message list') ----- messageHelpAt: anIndex "Show the first n lines of the sources code of the selected message." - - | source formatted iconHelp | - Preferences balloonHelpInMessageLists ifFalse: [^ nil]. self messageList size < anIndex ifTrue: [^ nil]. + ^ self messageHelpFor: (self messageList at: anIndex) + ! - - source := (self selectedClassOrMetaClass >> (self messageList at: anIndex)) getSource. - source lineCount > 5 ifTrue: [ - | sourceLines | - sourceLines := (source asString lines copyFrom: 1 to: 5) asOrderedCollection. - sourceLines add: ' [...]'. - source := sourceLines joinSeparatedBy: Character cr]. - - formatted := SHTextStylerST80 new - classOrMetaClass: self selectedClassOrMetaClass; - styledTextFor: source asText. - iconHelp := (self messageIconHelpAt: anIndex) ifNotEmpty: [:t | - t , Character cr, Character cr]. - ^ iconHelp asText - append: formatted; - yourself! Item was added: + ----- Method: Browser>>messageHelpFor: (in category 'message list') ----- + messageHelpFor: aSelector + "Show the first n lines of the sources code of the message behind aSelector." + + | source formatted iconHelp | + Preferences balloonHelpInMessageLists ifFalse: [^ nil]. + + source := (self selectedClassOrMetaClass >> aSelector) getSource. + source lineCount > 5 ifTrue: [ + | sourceLines | + sourceLines := (source asString lines copyFrom: 1 to: 5) asOrderedCollection. + sourceLines add: ' [...]'. + source := sourceLines joinSeparatedBy: Character cr]. + + formatted := SHTextStylerST80 new + classOrMetaClass: self selectedClassOrMetaClass; + styledTextFor: source asText. + iconHelp := (self messageIconHelpFor: aSelector) ifNotEmpty: [:t | + t , Character cr, Character cr]. + ^ iconHelp asText + append: formatted; + yourself! Item was changed: ----- Method: Browser>>messageIconAt: (in category 'message list') ----- messageIconAt: anIndex + ^ self messageIconFor: (self messageList at: anIndex)! - self class showMessageIcons - ifFalse: [^ nil]. - - ^ ToolIcons iconNamed: (ToolIcons - iconForClass: self selectedClassOrMetaClass - selector: (self messageList at: anIndex))! Item was added: + ----- Method: Browser>>messageIconFor: (in category 'message list') ----- + messageIconFor: aSelector + + self class showMessageIcons ifFalse: [^ nil]. + + ^ ToolIcons iconNamed: (ToolIcons + iconForClass: self selectedClassOrMetaClass + selector: aSelector)! Item was removed: - ----- Method: Browser>>messageIconHelpAt: (in category 'message list') ----- - messageIconHelpAt: anIndex - - self class showMessageIcons ifFalse: [^ String empty]. - - ^ ToolIconHelp iconHelpNamed: (ToolIcons - iconForClass: self selectedClassOrMetaClass - selector: (self messageList at: anIndex))! Item was added: + ----- Method: Browser>>messageIconHelpFor: (in category 'message list') ----- + messageIconHelpFor: aSelector + + self class showMessageIcons ifFalse: [^ String empty]. + + ^ ToolIconHelp iconHelpNamed: (ToolIcons + iconForClass: self selectedClassOrMetaClass + selector: aSelector)! Item was changed: ----- Method: Browser>>selectedMessageName: (in category 'message list') ----- selectedMessageName: aSelector "Make the given selector be the selected message name" | anIndex | anIndex := self messageList indexOf: aSelector. anIndex > 0 ifTrue: + [self messageListIndex: anIndex]. + self changed: #selectedMessageName. "inform interested parties"! - [self messageListIndex: anIndex]! From asqueaker at gmail.com Tue Mar 1 20:09:27 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 1 20:10:10 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> Message-ID: On Tue, Mar 1, 2016 at 8:17 AM, Bert Freudenberg wrote: > On 29.02.2016, at 16:55, Chris Muller wrote: >> >> Incidentally, the update stream was _already_ broken before, and is >> still is, due to DateAndTime>>#< using an underscore assignment? > > What? Didn?t I fix that in Kernel-bf.998? I'm referring to the update stream being broken. A stock Squeak5.0-15113 cannot currently be updated to latest trunk because of that underscore. I wanted to make sure Dave wasn't confusing that with his change. > Btw this came from me enabling the preference assuming that it would show assignment arrows but store as colon-equals. Maybe we should get rid of that, or fix it to do just that. +1 From eliot.miranda at gmail.com Tue Mar 1 20:14:10 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 1 20:14:14 2016 Subject: [squeak-dev] Re: Socket>>#sendData:count: does no error checking and hence locks up the system In-Reply-To: References: Message-ID: Hi All, one thing this lock-up suggests is that interrupting should interrupt all processes running at user priority, not just the uiProcess. Does that make sense? It does to me, but would be something I'd control by a preference for testing its effects. On Mon, Feb 29, 2016 at 7:23 PM, Eliot Miranda wrote: > Hi Levente, Hi All, > > I'm trying to investigate the socket issues in aio.c but have found a > much moire basic issue. With my recent changes to Network that more > carefully checked for errors the SocketTest>>testSocketReuse test appears > to lock up. In fact, the VM is fine, happily doing what it's being told by > Socket>>#sendData:count: > > Socket>>sendData: buffer count: n > "Send the amount of data from the given buffer" > | sent | > sent := 0. > [sent < n] whileTrue:[ > sent := sent + (self sendSomeData: buffer startIndex: sent+1 count: > (n-sent))]. > > The VM keeps trying to send data on a socket that is being reused and gets > an error from sendto, answers 0 as the number of bytes sent, as required, > but Socket>>#sendData:count: pays no heed and spins hard. Here's the > traces: > > The test is SocketTest>>testSocketReuse which spawns two processes, one to > send and one to receive data. Here are the processes: > > Process 0x48641f8 priority 40 > 0xbfec0498 M Socket>sendSomeData:startIndex:count:for: 0x4864d18: a(n) > Socket > 0xbfec04c0 M Socket>sendSomeData:startIndex:count: 0x4864d18: a(n) Socket > 0xbfec04ec M Socket>sendData:count: 0x4864d18: a(n) Socket > 0xbfec0520 I [] in SocketTest>testSocketReuse 0x4864dd0: a(n) SocketTest > 0xbfec0540 I [] in BlockClosure>newProcess 0x4864df0: a(n) BlockClosure > > Process 0x6543178 priority 40 > 0xbfec22c8 I [] in Delay>wait 0x4864ea0: a(n) Delay > 0xbfec22f0 I BlockClosure>ifCurtailed: 0x4864eb8: a(n) BlockClosure > 0xbfec2314 I Delay>wait 0x4864ea0: a(n) Delay > 0xbfec2340 I [] in SocketTest>testSocketReuse 0x4864dd0: a(n) SocketTest > 0xbfec2360 M BlockClosure>ensure: 0x4864fa8: a(n) BlockClosure > 0xbfec2390 I SocketTest>testSocketReuse 0x4864dd0: a(n) SocketTest > > Process 0x4864168 priority 40 > 0xbfec3438 I [] in DelayWaitTimeout>wait 0x48652f8: a(n) DelayWaitTimeout > 0xbfec3458 M BlockClosure>ensure: 0x4865378: a(n) BlockClosure > 0xbfec347c I DelayWaitTimeout>wait 0x48652f8: a(n) DelayWaitTimeout > 0xbfec34a0 I Semaphore>waitTimeoutMSecs: 0x48652e0: a(n) Semaphore > 0xbfec34c4 I Socket>waitForDataIfClosed: 0x4865408: a(n) Socket > 0xbfec34f0 I Socket>receiveDataInto:startingAt: 0x4865408: a(n) Socket > 0xbfec3520 I [] in SocketTest>testSocketReuse 0x4864dd0: a(n) SocketTest > 0xbfec3540 I [] in BlockClosure>newProcess 0x48654c0: a(n) BlockClosure > > And here's the VM spinning: > 15726 0 sqUnixSocket.c:1128 UDP sendData(11, 16) > 15726 0 sqUnixSocket.c:1134 UDP send failed 56 Socket is already > connected > 15726 0 sqUnixSocket.c:1128 UDP sendData(11, 16) > 15726 0 sqUnixSocket.c:1134 UDP send failed 56 Socket is already > connected > 15726 0 sqUnixSocket.c:1128 UDP sendData(11, 16) > 15726 0 sqUnixSocket.c:1134 UDP send failed 56 Socket is already > connected > ...etc... > > Ah!! Of course. Because I have changed the default scheduling semantics > in Squeak 5 to make preemption not a yield point, Socket>>#sendData:count: > never yields to the other processes. Previously when the Delay process > woke up this would implicitly yield the process spinning in > Socket>>#sendData:count:. > > So Socket>>#sendData:count: needs to do a yield if no data is sent. > However, shouldn't but also check for errors if no data is sent and do > something like return an error if it discovers, via > Socket>>primSocketError:, that the socket is not happy? > > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160301/e26ae89d/attachment.htm From asqueaker at gmail.com Tue Mar 1 20:15:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 1 20:16:12 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> Message-ID: > I'm referring to the update stream being broken. A stock > Squeak5.0-15113 cannot currently be updated to latest trunk because of > that underscore. I wanted to make sure Dave wasn't confusing that > with his change. Correction: Okay, I didn't realize we allowUnderscoreAssignments by default. Really, still? When I make my trunk image, I have been loading my own prefs to set my updateUrl to trunk for myself, but it also includes setting this off, and so that's why it was blowing up for me. From bert at freudenbergs.de Tue Mar 1 20:26:27 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 1 20:26:32 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> Message-ID: <2F905F4F-BDFF-4B1D-8D11-D8AAF4AFC7F8@freudenbergs.de> > On 01.03.2016, at 21:15, Chris Muller wrote: > >> I'm referring to the update stream being broken. A stock >> Squeak5.0-15113 cannot currently be updated to latest trunk because of >> that underscore. I wanted to make sure Dave wasn't confusing that >> with his change. > > Correction: Okay, I didn't realize we allowUnderscoreAssignments by > default. Really, still? > > When I make my trunk image, I have been loading my own prefs to set my > updateUrl to trunk for myself, but it also includes setting this off, > and so that's why it was blowing up for me. Yes we should change that pref. And it looks like the differ replaces underscore assignments by ansi assignments. Maybe that?s why I missed one line when publishing my fix ... Not entirely sure how to fix it since various subsequent versions of Kernel have been committed, and then the code has been moved to Chronology. Well, we at least should change the offending line in Chronology now. It?s in DateAndTime>><. Btw I?ve been thinking about how to get a ?proper? ancestry of Chronology and I guess the right thing would be to write a script that goes through all Kernel package versions, carves out a Kernel-Chronology package from it, and commits that. It could filter versions where no definition in Kernel-Chronology changed. The latest of those packages could then be adopted as ancestor of Chronology-Core. I don?t think we ever have done that kind of history surgery in Monticello, but it is something I?ve heard people do in git, for example. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160301/d9e319dd/smime.bin From asqueaker at gmail.com Tue Mar 1 20:28:03 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 1 20:28:47 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> Message-ID: ... and so I tried to load my personal preferences AFTER updating, but the removal of InputSensor has rendered all .prefs files unloadable... On Tue, Mar 1, 2016 at 2:15 PM, Chris Muller wrote: >> I'm referring to the update stream being broken. A stock >> Squeak5.0-15113 cannot currently be updated to latest trunk because of >> that underscore. I wanted to make sure Dave wasn't confusing that >> with his change. > > Correction: Okay, I didn't realize we allowUnderscoreAssignments by > default. Really, still? > > When I make my trunk image, I have been loading my own prefs to set my > updateUrl to trunk for myself, but it also includes setting this off, > and so that's why it was blowing up for me. From bert at freudenbergs.de Tue Mar 1 20:32:58 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 1 20:33:04 2016 Subject: [squeak-dev] Re: Socket>>#sendData:count: does no error checking and hence locks up the system In-Reply-To: References: Message-ID: On 01.03.2016, at 21:14, Eliot Miranda wrote: > > Hi All, > > one thing this lock-up suggests is that interrupting should interrupt all processes running at user priority, not just the uiProcess. Does that make sense? It does to me, but would be something I'd control by a preference for testing its effects. I thought it interrupted the active process? Wouldn?t that make most sense? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160301/5ce880b5/smime.bin From asqueaker at gmail.com Tue Mar 1 20:35:49 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 1 20:36:31 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-dtl.2.mcz In-Reply-To: <2F905F4F-BDFF-4B1D-8D11-D8AAF4AFC7F8@freudenbergs.de> References: <201602290205.u1T25W8k004077@shell.msen.com> <20160229021742.GA4835@shell.msen.com> <7A376BE3-611E-46B2-A3EC-A944EAC00568@freudenbergs.de> <2F905F4F-BDFF-4B1D-8D11-D8AAF4AFC7F8@freudenbergs.de> Message-ID: > And it looks like the differ replaces underscore assignments by ansi assignments. Maybe that?s why I missed one line when publishing my fix diffsWithPrettyPrint From eliot.miranda at gmail.com Tue Mar 1 21:20:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 1 21:20:45 2016 Subject: [Vm-dev] Re: [squeak-dev] Re: Socket>>#sendData:count: does no error checking and hence locks up the system In-Reply-To: References: Message-ID: On Tue, Mar 1, 2016 at 12:32 PM, Bert Freudenberg wrote: > > On 01.03.2016, at 21:14, Eliot Miranda wrote: > > > > Hi All, > > > > one thing this lock-up suggests is that interrupting should > interrupt all processes running at user priority, not just the uiProcess. > Does that make sense? It does to me, but would be something I'd control by > a preference for testing its effects. > > > I thought it interrupted the active process? Wouldn?t that make most sense? > Not necessarily. For example, in the test I referred to, testSocketReuse, the ui process (the process running the test) spawns two other processes that spin hard, one trying to write to a socket and one trying to read form a socket. If the socket code doesn't detect errors properly then these processes continue to spin hard. If one interrupts then /nothing/ appears to happen. The ui process is indeed interrupted, but because the other two processes continue to spin hard they shut out the notifier which doesn't appear. And even if the notifier did appear those processes would still be spinning hard, making it difficult for the user to interact with the notifier. So in this case it makes sense to interrupt all processes running at user priority. Arguably it makes sense to interrupt any and all processes running at or above user priority and below user interrupt priority. Usually there's only the ui process in this range, but occasionally there are more and errors can cause them to make an interrupt ineffective if it only interrupts the ui process. > - Bert - > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160301/49cf212d/attachment.htm From asqueaker at gmail.com Tue Mar 1 22:45:44 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 1 22:46:27 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk Message-ID: EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged Receiver: EventSensor Arguments and temporary variables: aMessage: swapMouseButtonsChanged exception: MessageNotUnderstood: EventSensor class>>swapMouseButtonsChanged resumeValue: nil Receiver's instance variables: superclass: Object methodDict: a MethodDictionary(#anyButtonPressed->(EventSensor>>#anyButtonPress...etc... format: 65545 instanceVariables: #('mouseButtons' 'mousePosition' 'keyboardBuffer' 'interrupt...etc... organization: ('accessing' eventQueue eventQueue: eventTicklerProcess flushAllB...etc... subclasses: nil name: #EventSensor classPool: a Dictionary(#ButtonDecodeTable->#[0 2 1 3 4 6 5 7 8 10 9 11 12 14 1...etc... sharedPools: an OrderedCollection(EventSensorConstants) environment: Smalltalk category: #'Kernel-Processes' Preference>>notifyInformeeOfChange Receiver: a Preference#swapMouseButtons false Arguments and temporary variables: Receiver's instance variables: name: #swapMouseButtons value: false defaultValue: false helpString: 'if true, swaps mouse buttons 2 and 3' localToProject: false categoryList: #(#general) changeInformee: EventSensor changeSelector: #swapMouseButtonsChanged type: #Boolean Preference>>togglePreferenceValue Receiver: a Preference#swapMouseButtons false Arguments and temporary variables: Receiver's instance variables: name: #swapMouseButtons value: false defaultValue: false helpString: 'if true, swaps mouse buttons 2 and 3' localToProject: false categoryList: #(#general) changeInformee: EventSensor changeSelector: #swapMouseButtonsChanged type: #Boolean [] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: evt: [367@82 mouseUp 99776] moreArgs: #() Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil BlockClosure>>ensure: Receiver: [closure] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: Arguments and temporary variables: aBlock: [closure] in CursorWithMask(Cursor)>>showWhile: complete: nil returnValue: nil Receiver's instance variables: outerContext: UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAct...etc... startpc: 62 numArgs: 0 CursorWithMask(Cursor)>>showWhile: Receiver: ((CursorWithMask extent: 16@16 depth: 1 fromArray: #( 2r0 2r10000000000000000000000...etc... Arguments and temporary variables: aBlock: [closure] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doBu...etc... oldcursor: ((CursorWithMask extent: 16@16 depth: 1 fromArray: #( 2r0 2r1...etc... Receiver's instance variables: bits: a Bitmap of length 16 width: 16 height: 16 depth: 1 offset: -1@ -1 maskForm: Form(16x16x1) UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: evt: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: evt: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil UpdatingThreePhaseButtonMorph>>mouseUp: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: evt: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: anEvent: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil MouseButtonEvent>>sentTo: Receiver: [367@82 mouseUp 99776] Arguments and temporary variables: anObject: 3PButton(#togglePreferenceValue 2512237) Receiver's instance variables: timeStamp: 99776 source: a HandMorph(3089952) type: #mouseUp buttons: 0 position: 367@82 handler: nil wasHandled: true whichButton: 4 UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: anEvent: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: Receiver: 3PButton(#togglePreferenceValue 2512237) Arguments and temporary variables: anEvent: [367@82 mouseUp 99776] Receiver's instance variables: bounds: 358@75 corner: 372@87 owner: a BorderedMorph(1400912) submorphs: #() fullBounds: 358@75 corner: 372@87 color: Color blue extension: nil image: ColorForm(12x12x1) offImage: ColorForm(12x12x1) pressedImage: ColorForm(12x12x1) state: #off target: a Preference#swapMouseButtons false actionSelector: #togglePreferenceValue arguments: #() actWhen: #buttonUp getSelector: #preferenceValue getArgument: nil [] in HandMorph>>sendFocusEvent:to:clear: Receiver: a HandMorph(3089952) Arguments and temporary variables: < Receiver's instance variables: bounds: 263@150 corner: 279@166 owner: a PasteUpMorph(2434915) [world] submorphs: #() fullBounds: 263@150 corner: 279@166 color: Color blue extension: a MorphExtension (2063753) [eventHandler = an EventHandler] mouseFocus: nil keyboardFocus: a TextMorphForEditView(3602329) eventListeners: nil mouseListeners: nil keyboardListeners: a WeakArray(a DockingBarMorph(968081) a PluggableSystemWindo...etc... mouseClickState: nil mouseOverHandler: a MouseOverHandler lastMouseEvent: [262@150 263@150 mouseMove 174509] targetOffset: 158@90 damageRecorder: a DamageRecorder cacheCanvas: nil cachedCanvasHasHoles: false temporaryCursor: nil temporaryCursorOffset: nil hardwareCursor: nil hasChanged: true savedPatch: nil userInitials: '' lastEventBuffer: #(1 174509 263 150 0 0 0 1) genieGestureProcessor: nil keyboardInterpreter: an UTF32InputInterpreter BlockClosure>>on:do: Receiver: [closure] in HandMorph>>sendFocusEvent:to:clear: Arguments and temporary variables: exception: Error handlerAction: [closure] in PasteUpMorph>>becomeActiveDuring: handlerActive: false Receiver's instance variables: outerContext: HandMorph>>sendFocusEvent:to:clear: startpc: 67 numArgs: 0 PasteUpMorph>>becomeActiveDuring: Receiver: a PasteUpMorph(2434915) [world] Arguments and temporary variables: aBlock: [closure] in HandMorph>>sendFocusEvent:to:clear: priorWorld: a PasteUpMorph(2434915) [world] priorHand: a HandMorph(3089952) priorEvent: [637@211 mouseOver red nil] Receiver's instance variables: bounds: 0@0 corner: 801@600 owner: nil submorphs: {a PluggableSystemWindow>sw...etc... fullBounds: 0@0 corner: 801@600 color: Color darkGray extension: a MorphExtension (3317156) [eventHandler = an EventHandler] [other:...etc... borderWidth: 0 borderColor: (Color r: 0.515 g: 0.181 b: 0.263) presenter: an EtoysPresenter (764729) model: a MorphicModel(1457048) cursor: 1 padding: 3 backgroundMorph: nil turtleTrailsForm: nil turtlePen: nil lastTurtlePositions: nil isPartsBin: nil indicateCursor: nil wantsMouseOverHalos: nil worldState: a WorldState griddingOn: nil HandMorph>>sendFocusEvent:to:clear: Receiver: a HandMorph(3089952) Arguments and temporary variables: anEvent: [637@211 mouseUp 99776] focusHolder: 3PButton(#togglePreferenceValue 2512237) aBlock: [closure] in HandMorph>>sendMouseEvent: w: a PasteUpMorph(2434915) [world] result: #(nil) Receiver's instance variables: bounds: 263@150 corner: 279@166 owner: a PasteUpMorph(2434915) [world] submorphs: #() fullBounds: 263@150 corner: 279@166 color: Color blue extension: a MorphExtension (2063753) [eventHandler = an EventHandler] mouseFocus: nil keyboardFocus: a TextMorphForEditView(3602329) eventListeners: nil mouseListeners: nil keyboardListeners: a WeakArray(a DockingBarMorph(968081) a PluggableSystemWindo...etc... mouseClickState: nil mouseOverHandler: a MouseOverHandler lastMouseEvent: [262@150 263@150 mouseMove 174509] targetOffset: 158@90 damageRecorder: a DamageRecorder cacheCanvas: nil cachedCanvasHasHoles: false temporaryCursor: nil temporaryCursorOffset: nil hardwareCursor: nil hasChanged: true savedPatch: nil userInitials: '' lastEventBuffer: #(1 174509 263 150 0 0 0 1) genieGestureProcessor: nil keyboardInterpreter: an UTF32InputInterpreter HandMorph>>sendEvent:focus:clear: Receiver: a HandMorph(3089952) Arguments and temporary variables: anEvent: [637@211 mouseUp 99776] focusHolder: 3PButton(#togglePreferenceValue 2512237) aBlock: [closure] in HandMorph>>sendMouseEvent: result: nil Receiver's instance variables: bounds: 263@150 corner: 279@166 owner: a PasteUpMorph(2434915) [world] submorphs: #() fullBounds: 263@150 corner: 279@166 color: Color blue extension: a MorphExtension (2063753) [eventHandler = an EventHandler] mouseFocus: nil keyboardFocus: a TextMorphForEditView(3602329) eventListeners: nil mouseListeners: nil keyboardListeners: a WeakArray(a DockingBarMorph(968081) a PluggableSystemWindo...etc... mouseClickState: nil mouseOverHandler: a MouseOverHandler lastMouseEvent: [262@150 263@150 mouseMove 174509] targetOffset: 158@90 damageRecorder: a DamageRecorder cacheCanvas: nil cachedCanvasHasHoles: false temporaryCursor: nil temporaryCursorOffset: nil hardwareCursor: nil hasChanged: true savedPatch: nil userInitials: '' lastEventBuffer: #(1 174509 263 150 0 0 0 1) genieGestureProcessor: nil keyboardInterpreter: an UTF32InputInterpreter HandMorph>>sendMouseEvent: Receiver: a HandMorph(3089952) Arguments and temporary variables: anEvent: [637@211 mouseUp 99776] Receiver's instance variables: bounds: 263@150 corner: 279@166 owner: a PasteUpMorph(2434915) [world] submorphs: #() fullBounds: 263@150 corner: 279@166 color: Color blue extension: a MorphExtension (2063753) [eventHandler = an EventHandler] mouseFocus: nil keyboardFocus: a TextMorphForEditView(3602329) eventListeners: nil mouseListeners: nil keyboardListeners: a WeakArray(a DockingBarMorph(968081) a PluggableSystemWindo...etc... mouseClickState: nil mouseOverHandler: a MouseOverHandler lastMouseEvent: [262@150 263@150 mouseMove 174509] targetOffset: 158@90 damageRecorder: a DamageRecorder cacheCanvas: nil cachedCanvasHasHoles: false temporaryCursor: nil temporaryCursorOffset: nil hardwareCursor: nil hasChanged: true savedPatch: nil userInitials: '' lastEventBuffer: #(1 174509 263 150 0 0 0 1) genieGestureProcessor: nil keyboardInterpreter: an UTF32InputInterpreter --- The full stack --- EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged Preference>>notifyInformeeOfChange Preference>>togglePreferenceValue [] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: BlockClosure>>ensure: CursorWithMask(Cursor)>>showWhile: UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: UpdatingThreePhaseButtonMorph>>mouseUp: UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: [] in HandMorph>>sendFocusEvent:to:clear: BlockClosure>>on:do: PasteUpMorph>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - HandMorph>>handleEvent: HandMorph>>processEvents [] in WorldState>>doOneCycleNowFor: Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in MorphicProject>>spawnNewProcess [] in BlockClosure>>newProcess From commits at source.squeak.org Tue Mar 1 22:55:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 22:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160301225503.6454.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-March/009465.html Name: Network-eem.173 Ancestors: Network-eem.172 If preemption does not yield then Socket>>sendData:count: cannot simply spin while failing to send any data. It must at least yield (but why does it not check for errors?). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009466.html Name: Morphic-topa.1090 Ancestors: Morphic-mt.1089 Make keyStroke handling in SimpleHierarchicalListMorph more robust, so it can be used with most of the Tools' key handler methods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009467.html Name: Tools-topa.676 Ancestors: Tools-topa.675 Generalize messageList callbacks to be usabe with message names, too. ============================================= From commits at source.squeak.org Tue Mar 1 23:25:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 23:25:45 2016 Subject: [squeak-dev] The Trunk: Morphic-topa.1091.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1091.mcz ==================== Summary ==================== Name: Morphic-topa.1091 Author: topa Time: 2 March 2016, 12:24:01.676712 am UUID: eb8276fa-d3ef-42e6-925f-9dd92ba97121 Ancestors: Morphic-topa.1090 Wee tiny cosmetic change to trees: Start tree-lines at indent-level 1, so tress with no children beyond the roots whatsoever look very similar to lists. =============== Diff against Morphic-topa.1090 =============== Item was removed: - ----- Method: IndentingListItemMorph>>drawLinesOn:lineColor: (in category 'drawing') ----- - drawLinesOn: aCanvas lineColor: lineColor - | hasToggle | - hasToggle := self hasToggle. - "Draw line from toggle to text" - self drawLineToggleToTextOn: aCanvas lineColor: lineColor hasToggle: hasToggle. - - "Draw the line from my toggle to the nextSibling's toggle" - self nextVisibleSibling ifNotNil: [ self drawLinesToNextSiblingOn: aCanvas lineColor: lineColor hasToggle: hasToggle ]. - - "If I have children and am expanded, draw a line to my first child" - (self firstVisibleChild notNil and: [ self isExpanded ]) - ifTrue: [ self drawLinesToFirstChildOn: aCanvas lineColor: lineColor]! Item was added: + ----- Method: IndentingListItemMorph>>drawLinesOn:lineColor:indentThreshold: (in category 'drawing') ----- + drawLinesOn: aCanvas lineColor: lineColor indentThreshold: aNumber + self indentLevel > aNumber ifTrue: [ + | hasToggle | + hasToggle := self hasToggle. + "Draw line from toggle to text" + self drawLineToggleToTextOn: aCanvas lineColor: lineColor hasToggle: hasToggle. + + "Draw the line from my toggle to the nextSibling's toggle" + self nextVisibleSibling ifNotNil: [ self drawLinesToNextSiblingOn: aCanvas lineColor: lineColor hasToggle: hasToggle ]]. + + "If I have children and am expanded, draw a line to my first child" + ((self firstVisibleChild notNil + and: [self isExpanded]) + and: [self firstVisibleChild indentLevel > aNumber]) + ifTrue: [ self drawLinesToFirstChildOn: aCanvas lineColor: lineColor ]! Item was changed: ----- Method: IndentingListItemMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | tRect sRect columnScanner columnLeft | self backgroundColor ifNotNil: [:c | aCanvas fillRectangle: self innerBounds color: c]. tRect := self toggleRectangle. self drawToggleOn: aCanvas in: tRect. + sRect := bounds withLeft: tRect right + self hMargin. - sRect := bounds withLeft: tRect right + 4. sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. (container columns isNil or: [(contents asString indexOf: Character tab) = 0]) ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: sRect left @ (self top + (self height - icon height // 2)). sRect := sRect left: sRect left + icon width + 2. ]. aCanvas drawString: contents asString in: sRect font: self fontToUse color: color. ] ifFalse: [ columnLeft := sRect left. columnScanner := ReadStream on: contents asString. container columns withIndexDo: [ :widthSpec :column | | columnRect columnData columnWidth | "Draw icon." column = self class iconColumnIndex ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: columnLeft @ (self top + (self height - icon height // 2)). columnLeft := columnLeft + icon width + 2]]. columnWidth := self widthOfColumn: column. columnRect := columnLeft @ sRect top extent: columnWidth @ sRect height. columnData := columnScanner upTo: Character tab. "Draw string." columnData ifNotEmpty: [ aCanvas drawString: columnData in: columnRect font: self fontToUse color: color]. "Compute next column offset." columnLeft := columnRect right + 5. column = 1 ifTrue: [columnLeft := columnLeft - tRect right + self left]. ]. ]! Item was changed: ----- Method: IndentingListItemMorph>>hMargin (in category 'accessing') ----- hMargin ^ 3! Item was changed: ----- Method: SimpleHierarchicalListMorph>>drawLinesOn: (in category 'drawing') ----- drawLinesOn: aCanvas | lColor | lColor := self lineColor. aCanvas transformBy: scroller transform clippingTo: scroller innerBounds during:[:clippedCanvas | scroller submorphs select: [:submorph | submorph visible] thenDo: [ :submorph | ((submorph isExpanded or: [clippedCanvas isVisible: submorph fullBounds] ) or: [ submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling]]) + ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor indentThreshold: 0] ] ] - ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor] ] ] smoothing: scroller smoothing. ! From commits at source.squeak.org Tue Mar 1 23:48:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 1 23:48:36 2016 Subject: [squeak-dev] The Trunk: Morphic-topa.1092.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1092.mcz ==================== Summary ==================== Name: Morphic-topa.1092 Author: topa Time: 2 March 2016, 12:47:32.674693 am UUID: c9c63a6f-3d27-472a-bb9d-b51d1f3eb218 Ancestors: Morphic-topa.1091 Adopt Tree (up/down/home/pg up/pg down) key handling to be more similar to List key handling. =============== Diff against Morphic-topa.1091 =============== Item was changed: ----- Method: SimpleHierarchicalListMorph>>arrowKey: (in category 'keyboard navigation') ----- arrowKey: asciiValue "Handle a keyboard navigation character. Answer true if handled, false if not." + | keyEvent max oldSelection nextSelection howManyItemsShowing | - | keyEvent | keyEvent := asciiValue. + max := self maximumSelection. + nextSelection := oldSelection := self getSelectionIndex. keyEvent = 31 ifTrue:["down" + nextSelection :=oldSelection + 1. + nextSelection > max ifTrue: [nextSelection := 1]]. - self setSelectionIndex: self getSelectionIndex+1. - ^true]. keyEvent = 30 ifTrue:["up" + nextSelection := oldSelection - 1. + nextSelection < 1 ifTrue: [nextSelection := max]]. - self setSelectionIndex: (self getSelectionIndex-1 max: 1). - ^true]. keyEvent = 1 ifTrue: ["home" + nextSelection := 1]. - self setSelectionIndex: 1. - ^true]. keyEvent = 4 ifTrue: ["end" + nextSelection := max]. + howManyItemsShowing := self numSelectionsInView. - self setSelectionIndex: scroller submorphs size. - ^true]. keyEvent = 11 ifTrue: ["page up" + nextSelection := 1 max: oldSelection - howManyItemsShowing]. - self setSelectionIndex: (self getSelectionIndex - self numSelectionsInView max: 1). - ^true]. keyEvent = 12 ifTrue: ["page down" + nextSelection := oldSelection + howManyItemsShowing min: max]. + + nextSelection = oldSelection ifFalse: [ + self setSelectionIndex: nextSelection. + ^ true]. + - self setSelectionIndex: self getSelectionIndex + self numSelectionsInView. - ^true]. keyEvent = 29 ifTrue:["right" selectedMorph ifNotNil:[ (selectedMorph canExpand and:[selectedMorph isExpanded not]) ifTrue:[self toggleExpandedState: selectedMorph] ifFalse:[self setSelectionIndex: self getSelectionIndex+1]. ]. ^true]. keyEvent = 28 ifTrue:["left" selectedMorph ifNotNil:[ (selectedMorph isExpanded) ifTrue:[self toggleExpandedState: selectedMorph] ifFalse:[self setSelectionIndex: (self getSelectionIndex-1 max: 1)]. ]. ^true]. ^false! From commits at source.squeak.org Wed Mar 2 00:16:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 2 00:16:39 2016 Subject: [squeak-dev] The Trunk: Tools-topa.677.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.677.mcz ==================== Summary ==================== Name: Tools-topa.677 Author: topa Time: 2 March 2016, 1:16:14.883018 am UUID: 00c00648-196c-4ecf-a540-50ac9d92c4b0 Ancestors: Tools-topa.676 pull up toggleBreakOnEntry and robustify things against missing compiled methods =============== Diff against Tools-topa.676 =============== Item was changed: ----- Method: Browser>>messageHelpFor: (in category 'message list') ----- messageHelpFor: aSelector "Show the first n lines of the sources code of the message behind aSelector." | source formatted iconHelp | Preferences balloonHelpInMessageLists ifFalse: [^ nil]. + source := (self selectedClassOrMetaClass compiledMethodAt: aSelector ifAbsent: [^ nil]) getSource. - source := (self selectedClassOrMetaClass >> aSelector) getSource. source lineCount > 5 ifTrue: [ | sourceLines | sourceLines := (source asString lines copyFrom: 1 to: 5) asOrderedCollection. sourceLines add: ' [...]'. source := sourceLines joinSeparatedBy: Character cr]. formatted := SHTextStylerST80 new classOrMetaClass: self selectedClassOrMetaClass; styledTextFor: source asText. iconHelp := (self messageIconHelpFor: aSelector) ifNotEmpty: [:t | t , Character cr, Character cr]. ^ iconHelp asText append: formatted; yourself! Item was removed: - ----- Method: Browser>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName]. - self changed: #messageList! Item was added: + ----- Method: CodeHolder>>toggleBreakOnEntry (in category 'breakpoints') ----- + toggleBreakOnEntry + "Install or uninstall a halt-on-entry breakpoint" + + | selectedMethod | + self selectedClassOrMetaClass ifNil: [ ^self]. + selectedMethod := self selectedClassOrMetaClass + compiledMethodAt: self selectedMessageName + ifAbsent: [^ self]. + selectedMethod hasBreakpoint + ifTrue: + [BreakpointManager unInstall: selectedMethod] + ifFalse: + [BreakpointManager + installInClass: self selectedClassOrMetaClass + selector: self selectedMessageName]. + self changed: #messageList! Item was removed: - ----- Method: Debugger>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName].! Item was removed: - ----- Method: MessageSet>>toggleBreakOnEntry (in category 'breakpoints') ----- - toggleBreakOnEntry - "Install or uninstall a halt-on-entry breakpoint" - - | selectedMethod | - self selectedClassOrMetaClass ifNil: [ ^self]. - selectedMethod := self selectedClassOrMetaClass >> self selectedMessageName. - selectedMethod hasBreakpoint - ifTrue: - [BreakpointManager unInstall: selectedMethod] - ifFalse: - [BreakpointManager - installInClass: self selectedClassOrMetaClass - selector: self selectedMessageName]. - self changed: #messageList! From lewis at mail.msen.com Wed Mar 2 00:35:09 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 2 00:35:15 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: References: Message-ID: <20160302003509.GA80892@shell.msen.com> It looks like the preference has changed. For the #swapMouseButtons preference, the changeSelector was #installMouseDecodeTable, but now the selector is #swapMouseButtonsChanged. If I inspect the preference and change its changeSelector back to the original #installMouseDecodeTable, the preference works again. I cannot find where the preference gets initialized, and I do not know why it changed, but this does seem to be the cause of the problem. Dave On Tue, Mar 01, 2016 at 04:45:44PM -0600, Chris Muller wrote: > EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged > Receiver: EventSensor > Arguments and temporary variables: > aMessage: swapMouseButtonsChanged > exception: MessageNotUnderstood: EventSensor class>>swapMouseButtonsChanged > resumeValue: nil > Receiver's instance variables: > superclass: Object > methodDict: a MethodDictionary(#anyButtonPressed->(EventSensor>>#anyButtonPress...etc... > format: 65545 > instanceVariables: #('mouseButtons' 'mousePosition' 'keyboardBuffer' > 'interrupt...etc... > organization: ('accessing' eventQueue eventQueue: eventTicklerProcess > flushAllB...etc... > subclasses: nil > name: #EventSensor > classPool: a Dictionary(#ButtonDecodeTable->#[0 2 1 3 4 6 5 7 8 10 9 > 11 12 14 1...etc... > sharedPools: an OrderedCollection(EventSensorConstants) > environment: Smalltalk > category: #'Kernel-Processes' > > Preference>>notifyInformeeOfChange > Receiver: a Preference#swapMouseButtons false > Arguments and temporary variables: > > Receiver's instance variables: > name: #swapMouseButtons > value: false > defaultValue: false > helpString: 'if true, swaps mouse buttons 2 and 3' > localToProject: false > categoryList: #(#general) > changeInformee: EventSensor > changeSelector: #swapMouseButtonsChanged > type: #Boolean > > Preference>>togglePreferenceValue > Receiver: a Preference#swapMouseButtons false > Arguments and temporary variables: > > Receiver's instance variables: > name: #swapMouseButtons > value: false > defaultValue: false > helpString: 'if true, swaps mouse buttons 2 and 3' > localToProject: false > categoryList: #(#general) > changeInformee: EventSensor > changeSelector: #swapMouseButtonsChanged > type: #Boolean > > [] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > evt: [367@82 mouseUp 99776] > moreArgs: #() > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > BlockClosure>>ensure: > Receiver: [closure] in > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > Arguments and temporary variables: > aBlock: [closure] in CursorWithMask(Cursor)>>showWhile: > complete: nil > returnValue: nil > Receiver's instance variables: > outerContext: UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAct...etc... > startpc: 62 > numArgs: 0 > > CursorWithMask(Cursor)>>showWhile: > Receiver: ((CursorWithMask > extent: 16@16 > depth: 1 > fromArray: #( > 2r0 > 2r10000000000000000000000...etc... > Arguments and temporary variables: > aBlock: [closure] in > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doBu...etc... > oldcursor: ((CursorWithMask > extent: 16@16 > depth: 1 > fromArray: #( > 2r0 > 2r1...etc... > Receiver's instance variables: > bits: a Bitmap of length 16 > width: 16 > height: 16 > depth: 1 > offset: -1@ -1 > maskForm: Form(16x16x1) > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > evt: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > evt: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > UpdatingThreePhaseButtonMorph>>mouseUp: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > evt: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > anEvent: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > MouseButtonEvent>>sentTo: > Receiver: [367@82 mouseUp 99776] > Arguments and temporary variables: > anObject: 3PButton(#togglePreferenceValue 2512237) > Receiver's instance variables: > timeStamp: 99776 > source: a HandMorph(3089952) > type: #mouseUp > buttons: 0 > position: 367@82 > handler: nil > wasHandled: true > whichButton: 4 > > UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > anEvent: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: > Receiver: 3PButton(#togglePreferenceValue 2512237) > Arguments and temporary variables: > anEvent: [367@82 mouseUp 99776] > Receiver's instance variables: > bounds: 358@75 corner: 372@87 > owner: a BorderedMorph(1400912) > submorphs: #() > fullBounds: 358@75 corner: 372@87 > color: Color blue > extension: nil > image: ColorForm(12x12x1) > offImage: ColorForm(12x12x1) > pressedImage: ColorForm(12x12x1) > state: #off > target: a Preference#swapMouseButtons false > actionSelector: #togglePreferenceValue > arguments: #() > actWhen: #buttonUp > getSelector: #preferenceValue > getArgument: nil > > [] in HandMorph>>sendFocusEvent:to:clear: > Receiver: a HandMorph(3089952) > Arguments and temporary variables: > < > Receiver's instance variables: > bounds: 263@150 corner: 279@166 > owner: a PasteUpMorph(2434915) [world] > submorphs: #() > fullBounds: 263@150 corner: 279@166 > color: Color blue > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > mouseFocus: nil > keyboardFocus: a TextMorphForEditView(3602329) > eventListeners: nil > mouseListeners: nil > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > PluggableSystemWindo...etc... > mouseClickState: nil > mouseOverHandler: a MouseOverHandler > lastMouseEvent: [262@150 263@150 mouseMove 174509] > targetOffset: 158@90 > damageRecorder: a DamageRecorder > cacheCanvas: nil > cachedCanvasHasHoles: false > temporaryCursor: nil > temporaryCursorOffset: nil > hardwareCursor: nil > hasChanged: true > savedPatch: nil > userInitials: '' > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > genieGestureProcessor: nil > keyboardInterpreter: an UTF32InputInterpreter > > BlockClosure>>on:do: > Receiver: [closure] in HandMorph>>sendFocusEvent:to:clear: > Arguments and temporary variables: > exception: Error > handlerAction: [closure] in PasteUpMorph>>becomeActiveDuring: > handlerActive: false > Receiver's instance variables: > outerContext: HandMorph>>sendFocusEvent:to:clear: > startpc: 67 > numArgs: 0 > > PasteUpMorph>>becomeActiveDuring: > Receiver: a PasteUpMorph(2434915) [world] > Arguments and temporary variables: > aBlock: [closure] in HandMorph>>sendFocusEvent:to:clear: > priorWorld: a PasteUpMorph(2434915) [world] > priorHand: a HandMorph(3089952) > priorEvent: [637@211 mouseOver red nil] > Receiver's instance variables: > bounds: 0@0 corner: 801@600 > owner: nil > submorphs: {a PluggableSystemWindow class>>sw...etc... > fullBounds: 0@0 corner: 801@600 > color: Color darkGray > extension: a MorphExtension (3317156) [eventHandler = an EventHandler] > [other:...etc... > borderWidth: 0 > borderColor: (Color r: 0.515 g: 0.181 b: 0.263) > presenter: an EtoysPresenter (764729) > model: a MorphicModel(1457048) > cursor: 1 > padding: 3 > backgroundMorph: nil > turtleTrailsForm: nil > turtlePen: nil > lastTurtlePositions: nil > isPartsBin: nil > indicateCursor: nil > wantsMouseOverHalos: nil > worldState: a WorldState > griddingOn: nil > > HandMorph>>sendFocusEvent:to:clear: > Receiver: a HandMorph(3089952) > Arguments and temporary variables: > anEvent: [637@211 mouseUp 99776] > focusHolder: 3PButton(#togglePreferenceValue 2512237) > aBlock: [closure] in HandMorph>>sendMouseEvent: > w: a PasteUpMorph(2434915) [world] > result: #(nil) > Receiver's instance variables: > bounds: 263@150 corner: 279@166 > owner: a PasteUpMorph(2434915) [world] > submorphs: #() > fullBounds: 263@150 corner: 279@166 > color: Color blue > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > mouseFocus: nil > keyboardFocus: a TextMorphForEditView(3602329) > eventListeners: nil > mouseListeners: nil > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > PluggableSystemWindo...etc... > mouseClickState: nil > mouseOverHandler: a MouseOverHandler > lastMouseEvent: [262@150 263@150 mouseMove 174509] > targetOffset: 158@90 > damageRecorder: a DamageRecorder > cacheCanvas: nil > cachedCanvasHasHoles: false > temporaryCursor: nil > temporaryCursorOffset: nil > hardwareCursor: nil > hasChanged: true > savedPatch: nil > userInitials: '' > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > genieGestureProcessor: nil > keyboardInterpreter: an UTF32InputInterpreter > > HandMorph>>sendEvent:focus:clear: > Receiver: a HandMorph(3089952) > Arguments and temporary variables: > anEvent: [637@211 mouseUp 99776] > focusHolder: 3PButton(#togglePreferenceValue 2512237) > aBlock: [closure] in HandMorph>>sendMouseEvent: > result: nil > Receiver's instance variables: > bounds: 263@150 corner: 279@166 > owner: a PasteUpMorph(2434915) [world] > submorphs: #() > fullBounds: 263@150 corner: 279@166 > color: Color blue > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > mouseFocus: nil > keyboardFocus: a TextMorphForEditView(3602329) > eventListeners: nil > mouseListeners: nil > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > PluggableSystemWindo...etc... > mouseClickState: nil > mouseOverHandler: a MouseOverHandler > lastMouseEvent: [262@150 263@150 mouseMove 174509] > targetOffset: 158@90 > damageRecorder: a DamageRecorder > cacheCanvas: nil > cachedCanvasHasHoles: false > temporaryCursor: nil > temporaryCursorOffset: nil > hardwareCursor: nil > hasChanged: true > savedPatch: nil > userInitials: '' > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > genieGestureProcessor: nil > keyboardInterpreter: an UTF32InputInterpreter > > HandMorph>>sendMouseEvent: > Receiver: a HandMorph(3089952) > Arguments and temporary variables: > anEvent: [637@211 mouseUp 99776] > Receiver's instance variables: > bounds: 263@150 corner: 279@166 > owner: a PasteUpMorph(2434915) [world] > submorphs: #() > fullBounds: 263@150 corner: 279@166 > color: Color blue > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > mouseFocus: nil > keyboardFocus: a TextMorphForEditView(3602329) > eventListeners: nil > mouseListeners: nil > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > PluggableSystemWindo...etc... > mouseClickState: nil > mouseOverHandler: a MouseOverHandler > lastMouseEvent: [262@150 263@150 mouseMove 174509] > targetOffset: 158@90 > damageRecorder: a DamageRecorder > cacheCanvas: nil > cachedCanvasHasHoles: false > temporaryCursor: nil > temporaryCursorOffset: nil > hardwareCursor: nil > hasChanged: true > savedPatch: nil > userInitials: '' > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > genieGestureProcessor: nil > keyboardInterpreter: an UTF32InputInterpreter > > > --- The full stack --- > EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged > Preference>>notifyInformeeOfChange > Preference>>togglePreferenceValue > [] in UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > BlockClosure>>ensure: > CursorWithMask(Cursor)>>showWhile: > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: > UpdatingThreePhaseButtonMorph>>mouseUp: > UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: > MouseButtonEvent>>sentTo: > UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: > UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: > [] in HandMorph>>sendFocusEvent:to:clear: > BlockClosure>>on:do: > PasteUpMorph>>becomeActiveDuring: > HandMorph>>sendFocusEvent:to:clear: > HandMorph>>sendEvent:focus:clear: > HandMorph>>sendMouseEvent: > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > HandMorph>>handleEvent: > HandMorph>>processEvents > [] in WorldState>>doOneCycleNowFor: > Array(SequenceableCollection)>>do: > WorldState>>handsDo: > WorldState>>doOneCycleNowFor: > WorldState>>doOneCycleFor: > PasteUpMorph>>doOneCycle > [] in MorphicProject>>spawnNewProcess > [] in BlockClosure>>newProcess From smalltalk at stefan-marr.de Wed Mar 2 09:46:15 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Wed Mar 2 09:46:22 2016 Subject: [squeak-dev] Call for Papers: 11th Workshop on Implementation, Compilation, Optimization of OO Languages, Programs and Systems Message-ID: <65B21C3F-8F4E-4F1C-AA45-867C11C0333E@stefan-marr.de> Call for Papers: ICOOOLPS?16 ============================ 11th Workshop on Implementation, Compilation, Optimization of OO Languages, Programs and Systems Co-located with ECOOP July 18, 2016, Rome, Italy URL: http://2016.ecoop.org/track/ICOOOLPS-2016 Twitter: @ICOOOLPS The ICOOOLPS workshop series brings together researchers and practitioners working in the field of language implementation and optimization. The goal of the workshop is to discuss emerging problems and research directions as well as new solutions to classic performance challenges. The topics of interest for the workshop include techniques for the implementation and optimization of a wide range of languages including but not limited to object-oriented ones. Furthermore, meta-compilation techniques or language-agnostic approaches are welcome, too. A non-exclusive list of topics follows: - implementation and optimization of fundamental languages features (from automatic memory management to zero-overhead metaprogramming) - runtime systems technology (libraries, virtual machines) - static, adaptive, and speculative optimizations and compiler techniques - meta-compilation techniques and language-agnostic approaches for the efficient implementation of languages - compilers (intermediate representations, offline and online optimizations,...) - empirical studies on language usage, benchmark design, and benchmarking methodology - resource-sensitive systems (real-time, low power, mobile, cloud) - studies on design choices and tradeoffs (dynamic vs. static compilation, heuristics vs. programmer input,...) - tooling support, debuggability and observability of languages as well as their implementations ### Workshop Format and Submissions This workshop welcomes the presentation and discussion of new ideas and emerging problems that give a chance for interaction and exchange. More mature work is welcome as part of a mini-conference format, too. We aim to interleave interactive brainstorming and demonstration sessions between the formal presentations to foster an active exchange of ideas. The workshop papers will be published either in the ACM DL or in the Dagstuhl LIPIcs ECOOP Workshop proceedings. Until further notice, please use the ACM SIGPLAN template with a 10pt font size: http://www.sigplan.org/Resources/Author/ - position and work-in-progress paper: 1-4 pages - technical paper: max. 10 pages - demos and posters: 1-page abstract For the submission, please use the HotCRP system: http://ssw.jku.at/icooolps/ ### Important Dates - abstract submission: April 11, 2016 - paper submission: April 15, 2016 - notification: May 13, 2016 - all deadlines: Anywhere on Earth (AoE), i.e., GMT/UTC?12:00 hour - workshop: July 18th, 2016 ### Program Committee Edd Barrett, King?s College London, UK Clement Bera, Inria Lille, France Maxime Chevalier-Boisvert, Universit? de Montr?al, Canada Tim Felgentreff, Hasso Plattner Institute, Germany Roland Ducournau, LIRMM, Universit? de Montpellier, France Elisa Gonzalez Boix, Vrije Universiteit Brussel, Belgium David Gregg, Trinity College Dublin, Ireland Matthias Grimmer, Johannes Kepler University Linz, Austria Michael Haupt, Oracle, Germany Richard Jones, University of Kent, UK Tomas Kalibera, Northeastern University, USA Hidehiko Masuhara, Tokyo Institute of Technology, Japan Tiark Rompf, Purdue University, USA Jennifer B. Sartor, Ghent University, Belgium Sam Tobin-Hochstadt, Indiana University, USA ### Workshop Organizers Stefan Marr, Johannes Kepler University Linz, Austria Eric Jul, University of Oslo, Norway For questions or concerns, please mail to stefan.marr at jku.at or contact us via https://twitter.com/icooolps. From karlramberg at gmail.com Wed Mar 2 11:10:02 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed Mar 2 11:10:05 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: <20160302003509.GA80892@shell.msen.com> References: <20160302003509.GA80892@shell.msen.com> Message-ID: The preference is made automatically. In ReleaseBuilder class setPreference Preference enable: #swapMouseButtons The preference is made if it is not in the image already. I think the #swapMouseButtonChanged is also made automatically and derived from the preference name if not set specifically. Best, Karl On Wed, Mar 2, 2016 at 1:35 AM, David T. Lewis wrote: > It looks like the preference has changed. For the #swapMouseButtons > preference, > the changeSelector was #installMouseDecodeTable, but now the selector is > #swapMouseButtonsChanged. > > If I inspect the preference and change its changeSelector back to the > original > #installMouseDecodeTable, the preference works again. > > I cannot find where the preference gets initialized, and I do not know why > it > changed, but this does seem to be the cause of the problem. > > Dave > > > > > On Tue, Mar 01, 2016 at 04:45:44PM -0600, Chris Muller wrote: > > EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged > > Receiver: EventSensor > > Arguments and temporary variables: > > aMessage: swapMouseButtonsChanged > > exception: MessageNotUnderstood: EventSensor > class>>swapMouseButtonsChanged > > resumeValue: nil > > Receiver's instance variables: > > superclass: Object > > methodDict: a > MethodDictionary(#anyButtonPressed->(EventSensor>>#anyButtonPress...etc... > > format: 65545 > > instanceVariables: #('mouseButtons' 'mousePosition' 'keyboardBuffer' > > 'interrupt...etc... > > organization: ('accessing' eventQueue eventQueue: eventTicklerProcess > > flushAllB...etc... > > subclasses: nil > > name: #EventSensor > > classPool: a Dictionary(#ButtonDecodeTable->#[0 2 1 3 4 6 5 7 8 10 9 > > 11 12 14 1...etc... > > sharedPools: an OrderedCollection(EventSensorConstants) > > environment: Smalltalk > > category: #'Kernel-Processes' > > > > Preference>>notifyInformeeOfChange > > Receiver: a Preference#swapMouseButtons false > > Arguments and temporary variables: > > > > Receiver's instance variables: > > name: #swapMouseButtons > > value: false > > defaultValue: false > > helpString: 'if true, swaps mouse buttons 2 and 3' > > localToProject: false > > categoryList: #(#general) > > changeInformee: EventSensor > > changeSelector: #swapMouseButtonsChanged > > type: #Boolean > > > > Preference>>togglePreferenceValue > > Receiver: a Preference#swapMouseButtons false > > Arguments and temporary variables: > > > > Receiver's instance variables: > > name: #swapMouseButtons > > value: false > > defaultValue: false > > helpString: 'if true, swaps mouse buttons 2 and 3' > > localToProject: false > > categoryList: #(#general) > > changeInformee: EventSensor > > changeSelector: #swapMouseButtonsChanged > > type: #Boolean > > > > [] in > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > evt: [367@82 mouseUp 99776] > > moreArgs: #() > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > BlockClosure>>ensure: > > Receiver: [closure] in > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > > Arguments and temporary variables: > > aBlock: [closure] in CursorWithMask(Cursor)>>showWhile: > > complete: nil > > returnValue: nil > > Receiver's instance variables: > > outerContext: > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAct...etc... > > startpc: 62 > > numArgs: 0 > > > > CursorWithMask(Cursor)>>showWhile: > > Receiver: ((CursorWithMask > > extent: 16@16 > > depth: 1 > > fromArray: #( > > 2r0 > > 2r10000000000000000000000...etc... > > Arguments and temporary variables: > > aBlock: [closure] in > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doBu...etc... > > oldcursor: ((CursorWithMask > > extent: 16@16 > > depth: 1 > > fromArray: #( > > 2r0 > > 2r1...etc... > > Receiver's instance variables: > > bits: a Bitmap of length 16 > > width: 16 > > height: 16 > > depth: 1 > > offset: -1@ -1 > > maskForm: Form(16x16x1) > > > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > evt: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > evt: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > UpdatingThreePhaseButtonMorph>>mouseUp: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > evt: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > anEvent: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > MouseButtonEvent>>sentTo: > > Receiver: [367@82 mouseUp 99776] > > Arguments and temporary variables: > > anObject: 3PButton(#togglePreferenceValue 2512237) > > Receiver's instance variables: > > timeStamp: 99776 > > source: a HandMorph(3089952) > > type: #mouseUp > > buttons: 0 > > position: 367@82 > > handler: nil > > wasHandled: true > > whichButton: 4 > > > > UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > anEvent: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: > > Receiver: 3PButton(#togglePreferenceValue 2512237) > > Arguments and temporary variables: > > anEvent: [367@82 mouseUp 99776] > > Receiver's instance variables: > > bounds: 358@75 corner: 372@87 > > owner: a BorderedMorph(1400912) > > submorphs: #() > > fullBounds: 358@75 corner: 372@87 > > color: Color blue > > extension: nil > > image: ColorForm(12x12x1) > > offImage: ColorForm(12x12x1) > > pressedImage: ColorForm(12x12x1) > > state: #off > > target: a Preference#swapMouseButtons false > > actionSelector: #togglePreferenceValue > > arguments: #() > > actWhen: #buttonUp > > getSelector: #preferenceValue > > getArgument: nil > > > > [] in HandMorph>>sendFocusEvent:to:clear: > > Receiver: a HandMorph(3089952) > > Arguments and temporary variables: > > < > > Receiver's instance variables: > > bounds: 263@150 corner: 279@166 > > owner: a PasteUpMorph(2434915) [world] > > submorphs: #() > > fullBounds: 263@150 corner: 279@166 > > color: Color blue > > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > > mouseFocus: nil > > keyboardFocus: a TextMorphForEditView(3602329) > > eventListeners: nil > > mouseListeners: nil > > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > > PluggableSystemWindo...etc... > > mouseClickState: nil > > mouseOverHandler: a MouseOverHandler > > lastMouseEvent: [262@150 263@150 mouseMove 174509] > > targetOffset: 158@90 > > damageRecorder: a DamageRecorder > > cacheCanvas: nil > > cachedCanvasHasHoles: false > > temporaryCursor: nil > > temporaryCursorOffset: nil > > hardwareCursor: nil > > hasChanged: true > > savedPatch: nil > > userInitials: '' > > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > > genieGestureProcessor: nil > > keyboardInterpreter: an UTF32InputInterpreter > > > > BlockClosure>>on:do: > > Receiver: [closure] in HandMorph>>sendFocusEvent:to:clear: > > Arguments and temporary variables: > > exception: Error > > handlerAction: [closure] in PasteUpMorph>>becomeActiveDuring: > > handlerActive: false > > Receiver's instance variables: > > outerContext: HandMorph>>sendFocusEvent:to:clear: > > startpc: 67 > > numArgs: 0 > > > > PasteUpMorph>>becomeActiveDuring: > > Receiver: a PasteUpMorph(2434915) [world] > > Arguments and temporary variables: > > aBlock: [closure] in HandMorph>>sendFocusEvent:to:clear: > > priorWorld: a PasteUpMorph(2434915) [world] > > priorHand: a HandMorph(3089952) > > priorEvent: [637@211 mouseOver red nil] > > Receiver's instance variables: > > bounds: 0@0 corner: 801@600 > > owner: nil > > submorphs: {a PluggableSystemWindow > class>>sw...etc... > > fullBounds: 0@0 corner: 801@600 > > color: Color darkGray > > extension: a MorphExtension (3317156) [eventHandler = an EventHandler] > > [other:...etc... > > borderWidth: 0 > > borderColor: (Color r: 0.515 g: 0.181 b: 0.263) > > presenter: an EtoysPresenter (764729) > > model: a MorphicModel(1457048) > > cursor: 1 > > padding: 3 > > backgroundMorph: nil > > turtleTrailsForm: nil > > turtlePen: nil > > lastTurtlePositions: nil > > isPartsBin: nil > > indicateCursor: nil > > wantsMouseOverHalos: nil > > worldState: a WorldState > > griddingOn: nil > > > > HandMorph>>sendFocusEvent:to:clear: > > Receiver: a HandMorph(3089952) > > Arguments and temporary variables: > > anEvent: [637@211 mouseUp 99776] > > focusHolder: 3PButton(#togglePreferenceValue 2512237) > > aBlock: [closure] in HandMorph>>sendMouseEvent: > > w: a PasteUpMorph(2434915) [world] > > result: #(nil) > > Receiver's instance variables: > > bounds: 263@150 corner: 279@166 > > owner: a PasteUpMorph(2434915) [world] > > submorphs: #() > > fullBounds: 263@150 corner: 279@166 > > color: Color blue > > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > > mouseFocus: nil > > keyboardFocus: a TextMorphForEditView(3602329) > > eventListeners: nil > > mouseListeners: nil > > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > > PluggableSystemWindo...etc... > > mouseClickState: nil > > mouseOverHandler: a MouseOverHandler > > lastMouseEvent: [262@150 263@150 mouseMove 174509] > > targetOffset: 158@90 > > damageRecorder: a DamageRecorder > > cacheCanvas: nil > > cachedCanvasHasHoles: false > > temporaryCursor: nil > > temporaryCursorOffset: nil > > hardwareCursor: nil > > hasChanged: true > > savedPatch: nil > > userInitials: '' > > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > > genieGestureProcessor: nil > > keyboardInterpreter: an UTF32InputInterpreter > > > > HandMorph>>sendEvent:focus:clear: > > Receiver: a HandMorph(3089952) > > Arguments and temporary variables: > > anEvent: [637@211 mouseUp 99776] > > focusHolder: 3PButton(#togglePreferenceValue 2512237) > > aBlock: [closure] in HandMorph>>sendMouseEvent: > > result: nil > > Receiver's instance variables: > > bounds: 263@150 corner: 279@166 > > owner: a PasteUpMorph(2434915) [world] > > submorphs: #() > > fullBounds: 263@150 corner: 279@166 > > color: Color blue > > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > > mouseFocus: nil > > keyboardFocus: a TextMorphForEditView(3602329) > > eventListeners: nil > > mouseListeners: nil > > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > > PluggableSystemWindo...etc... > > mouseClickState: nil > > mouseOverHandler: a MouseOverHandler > > lastMouseEvent: [262@150 263@150 mouseMove 174509] > > targetOffset: 158@90 > > damageRecorder: a DamageRecorder > > cacheCanvas: nil > > cachedCanvasHasHoles: false > > temporaryCursor: nil > > temporaryCursorOffset: nil > > hardwareCursor: nil > > hasChanged: true > > savedPatch: nil > > userInitials: '' > > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > > genieGestureProcessor: nil > > keyboardInterpreter: an UTF32InputInterpreter > > > > HandMorph>>sendMouseEvent: > > Receiver: a HandMorph(3089952) > > Arguments and temporary variables: > > anEvent: [637@211 mouseUp 99776] > > Receiver's instance variables: > > bounds: 263@150 corner: 279@166 > > owner: a PasteUpMorph(2434915) [world] > > submorphs: #() > > fullBounds: 263@150 corner: 279@166 > > color: Color blue > > extension: a MorphExtension (2063753) [eventHandler = an EventHandler] > > mouseFocus: nil > > keyboardFocus: a TextMorphForEditView(3602329) > > eventListeners: nil > > mouseListeners: nil > > keyboardListeners: a WeakArray(a DockingBarMorph(968081) a > > PluggableSystemWindo...etc... > > mouseClickState: nil > > mouseOverHandler: a MouseOverHandler > > lastMouseEvent: [262@150 263@150 mouseMove 174509] > > targetOffset: 158@90 > > damageRecorder: a DamageRecorder > > cacheCanvas: nil > > cachedCanvasHasHoles: false > > temporaryCursor: nil > > temporaryCursorOffset: nil > > hardwareCursor: nil > > hasChanged: true > > savedPatch: nil > > userInitials: '' > > lastEventBuffer: #(1 174509 263 150 0 0 0 1) > > genieGestureProcessor: nil > > keyboardInterpreter: an UTF32InputInterpreter > > > > > > --- The full stack --- > > EventSensor class(Object)>>doesNotUnderstand: #swapMouseButtonsChanged > > Preference>>notifyInformeeOfChange > > Preference>>togglePreferenceValue > > [] in > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > > BlockClosure>>ensure: > > CursorWithMask(Cursor)>>showWhile: > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>doButtonAction: > > UpdatingThreePhaseButtonMorph(ThreePhaseButtonMorph)>>mouseUp: > > UpdatingThreePhaseButtonMorph>>mouseUp: > > UpdatingThreePhaseButtonMorph(Morph)>>handleMouseUp: > > MouseButtonEvent>>sentTo: > > UpdatingThreePhaseButtonMorph(Morph)>>handleEvent: > > UpdatingThreePhaseButtonMorph(Morph)>>handleFocusEvent: > > [] in HandMorph>>sendFocusEvent:to:clear: > > BlockClosure>>on:do: > > PasteUpMorph>>becomeActiveDuring: > > HandMorph>>sendFocusEvent:to:clear: > > HandMorph>>sendEvent:focus:clear: > > HandMorph>>sendMouseEvent: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > HandMorph>>handleEvent: > > HandMorph>>processEvents > > [] in WorldState>>doOneCycleNowFor: > > Array(SequenceableCollection)>>do: > > WorldState>>handsDo: > > WorldState>>doOneCycleNowFor: > > WorldState>>doOneCycleFor: > > PasteUpMorph>>doOneCycle > > [] in MorphicProject>>spawnNewProcess > > [] in BlockClosure>>newProcess > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160302/f626df33/attachment.htm From commits at source.squeak.org Wed Mar 2 12:09:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 2 12:09:59 2016 Subject: [squeak-dev] The Trunk: Kernel-mt.1003.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.1003.mcz ==================== Summary ==================== Name: Kernel-mt.1003 Author: mt Time: 2 March 2016, 1:09:36.194111 pm UUID: 17eba02e-a573-4eb3-bcf6-dbb07fce130f Ancestors: Kernel-dtl.1002 Restores some missing messages in EventSensor. Provide the default callback for swapMouseButtons preference as expected by our preference system. =============== Diff against Kernel-dtl.1002 =============== Item was added: + ----- Method: EventSensor class>>duplicateControlAndAltKeys: (in category 'public') ----- + duplicateControlAndAltKeys: aBoolean + "EventSensor duplicateControlAndAltKeys: true" + + Preferences setPreference: #duplicateControlAndAltKeys toValue: aBoolean. + self installKeyDecodeTable + ! Item was added: + ----- Method: EventSensor class>>swapControlAndAltKeys: (in category 'public') ----- + swapControlAndAltKeys: aBoolean + "EventSensor swapControlAndAltKeys: true" + + Preferences setPreference: #swapControlAndAltKeys toValue: aBoolean. + self installKeyDecodeTable! Item was added: + ----- Method: EventSensor class>>swapMouseButtons: (in category 'public') ----- + swapMouseButtons: aBoolean + "EventSensor swapMouseButtons: true" + + Preferences setPreference: #swapMouseButtons toValue: aBoolean. + self installMouseDecodeTable.! Item was added: + ----- Method: EventSensor class>>swapMouseButtonsChanged (in category 'preference change notification') ----- + swapMouseButtonsChanged + + self installMouseDecodeTable.! From Marcel.Taeumel at hpi.de Wed Mar 2 11:44:41 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Mar 2 12:11:46 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> Message-ID: <1456919081387-4881981.post@n4.nabble.com> Hi, there! I restored some other messages that got lost and made it consistent with the key-duplication things in EventSensor: http://forum.world.st/The-Trunk-Kernel-mt-1003-mcz-td4881980.html Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4881981.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Mar 2 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 2 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160302225502.6627.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-March/009468.html Name: Morphic-topa.1091 Ancestors: Morphic-topa.1090 Wee tiny cosmetic change to trees: Start tree-lines at indent-level 1, so tress with no children beyond the roots whatsoever look very similar to lists. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009469.html Name: Morphic-topa.1092 Ancestors: Morphic-topa.1091 Adopt Tree (up/down/home/pg up/pg down) key handling to be more similar to List key handling. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009470.html Name: Tools-topa.677 Ancestors: Tools-topa.676 pull up toggleBreakOnEntry and robustify things against missing compiled methods ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009471.html Name: Kernel-mt.1003 Ancestors: Kernel-dtl.1002 Restores some missing messages in EventSensor. Provide the default callback for swapMouseButtons preference as expected by our preference system. ============================================= From commits at source.squeak.org Thu Mar 3 03:19:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 03:19:26 2016 Subject: [squeak-dev] The Trunk: System-eem.803.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.803.mcz ==================== Summary ==================== Name: System-eem.803 Author: eem Time: 2 March 2016, 7:18:21.713694 pm UUID: 934ce776-0717-469b-8818-300954393791 Ancestors: System-bf.802 Add getters that answer whether the VM supports immutability or multiple bytecode sets. =============== Diff against System-bf.802 =============== Item was added: + ----- Method: SmalltalkImage>>supportsImmutability (in category 'system attributes') ----- + supportsImmutability + "Answer whether the VM observes the per-object immutability flag and consequently + aborts writes to inst vars of, and fails primitives that attempt to write, to immutable objects." + "SmalltalkImage current supportsImmutability" + + ^(self vmParameterAt: 65) + ifNil: [false] + ifNotNil: + [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" + param isInteger "In newer VMs it is a set of integer flags, bit 1 of which is IMMUTABILITY" + ifTrue: [param anyMask: 2] + ifFalse: [false]]! Item was added: + ----- Method: SmalltalkImage>>supportsMultipleBytecodeSets (in category 'system attributes') ----- + supportsMultipleBytecodeSets + "Answer whether the VM supports multiple bytecodeSets." + "SmalltalkImage current supportsMultipleBytecodeSets" + + ^(self vmParameterAt: 65) + ifNil: [false] + ifNotNil: + [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" + param isInteger "In newer VMs it is a set of integer flags, bit 0 of which is MULTIPLE_BYTECODE_SETS" + ifTrue: [param anyMask: 1] + ifFalse: [param]]! From Das.Linux at gmx.de Thu Mar 3 08:10:10 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 3 08:10:15 2016 Subject: [squeak-dev] The Trunk: System-eem.803.mcz Message-ID: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> Hi all, Hi Eliot, Hi Cl?ment Well, you know I'm the opponent here regarding the Immutability naming. I hate that I have to come back to the naming thing here once again. But it is rather important for me, since I work on immutability concepts that are unlike what immutability would mean here. I think it is also important to know that immutability in most other languages means "it won't change whatsoever" (including OCaml[1], Racket[2], Haskell[3], or object-oriented programming in general[4]) Now, I see the need, usefulness, and practical implementation for objects that cannot be written and hence throw an error, which _then_ can be circumvented/made be writable. I'm all for it and I like it. Except for the name. As Cl?ment put it: "As argued on the virtual machine mailing list, we are talking about a write-barrier more than immutability itself." I would hence propose to name those objects locked objects with the accompanying Someone-tries-to-write-that-Error named ObjectIsLockedError and the state-change messages Object>>lock Object>>unlock and likewise the VM-information SmalltalkImage>>supportsLockedObjects I know, re-iterating this is tedious, but it will avoid unmet expectations by newcomers from other languages as well as name clashes with actual immutability implementations (how should we name those, then)? With apologies -Tobias [1]: http://typeocaml.com/2015/01/02/immutable/ [2]: a) http://docs.racket-lang.org/reference/pairs.html "Pairs are not mutable" b) http://docs.racket-lang.org/reference/strings.html [3]: https://wiki.haskell.org/A_brief_introduction_to_Haskell#Immutable_declarations [4]: https://en.wikipedia.org/wiki/Immutable_object On 03.03.2016, at 03:19, commits@source.squeak.org wrote: > Eliot Miranda uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-eem.803.mcz > > ==================== Summary ==================== > > Name: System-eem.803 > Author: eem > Time: 2 March 2016, 7:18:21.713694 pm > UUID: 934ce776-0717-469b-8818-300954393791 > Ancestors: System-bf.802 > > Add getters that answer whether the VM supports immutability or multiple bytecode sets. > > =============== Diff against System-bf.802 =============== > > Item was added: > + ----- Method: SmalltalkImage>>supportsImmutability (in category 'system attributes') ----- > + supportsImmutability > + "Answer whether the VM observes the per-object immutability flag and consequently > + aborts writes to inst vars of, and fails primitives that attempt to write, to immutable objects." > + "SmalltalkImage current supportsImmutability" > + > + ^(self vmParameterAt: 65) > + ifNil: [false] > + ifNotNil: > + [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" > + param isInteger "In newer VMs it is a set of integer flags, bit 1 of which is IMMUTABILITY" > + ifTrue: [param anyMask: 2] > + ifFalse: [false]]! > > Item was added: > + ----- Method: SmalltalkImage>>supportsMultipleBytecodeSets (in category 'system attributes') ----- > + supportsMultipleBytecodeSets > + "Answer whether the VM supports multiple bytecodeSets." > + "SmalltalkImage current supportsMultipleBytecodeSets" > + > + ^(self vmParameterAt: 65) > + ifNil: [false] > + ifNotNil: > + [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" > + param isInteger "In newer VMs it is a set of integer flags, bit 0 of which is MULTIPLE_BYTECODE_SETS" > + ifTrue: [param anyMask: 1] > + ifFalse: [param]]! > > From lecteur at zogotounga.net Thu Mar 3 09:14:14 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Thu Mar 3 09:14:16 2016 Subject: [squeak-dev] The Trunk: System-eem.803.mcz In-Reply-To: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> References: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> Message-ID: <56D80066.7050706@zogotounga.net> > Object>>lock > Object>>unlock #lock and #unlock are already used (notably in Morph). Stef From Marcel.Taeumel at hpi.de Thu Mar 3 09:07:17 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Mar 3 09:34:29 2016 Subject: [squeak-dev] Re: The Trunk: System-eem.803.mcz In-Reply-To: <56D80066.7050706@zogotounga.net> References: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> <56D80066.7050706@zogotounga.net> Message-ID: <1456996037616-4882191.post@n4.nabble.com> #activeWriteBarrier #deactivateWriteBarrier ? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-eem-803-mcz-tp4882138p4882191.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Thu Mar 3 10:05:13 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 3 10:05:16 2016 Subject: [squeak-dev] The Trunk: System-eem.803.mcz In-Reply-To: <56D80066.7050706@zogotounga.net> References: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> <56D80066.7050706@zogotounga.net> Message-ID: <2FAA7468-2407-4A55-9C24-9F06AF742FFC@gmx.de> On 03.03.2016, at 10:14, St?phane Rollandin wrote: > >> Object>>lock >> Object>>unlock > > #lock and #unlock are already used (notably in Morph). Oh, wow, how did I miss that :/ Best -Tobias From commits at source.squeak.org Thu Mar 3 10:22:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 10:22:44 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1093.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1093.mcz ==================== Summary ==================== Name: Morphic-mt.1093 Author: mt Time: 3 March 2016, 11:22:03.445273 am UUID: ca974de9-2076-4052-bf53-b723668933be Ancestors: Morphic-topa.1092 Makes tree widgets honor the mouse-over-for-keyboard-focus preference. Just like PluggableListMorphs do. Implementation comes from there. =============== Diff against Morphic-topa.1092 =============== Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: event + super mouseEnter: event. + + (SystemWindow allWindowsAcceptInput or: [Preferences mouseOverForKeyboardFocus]) + ifTrue: [event hand newKeyboardFocus: self].! - event hand newKeyboardFocus: self! From commits at source.squeak.org Thu Mar 3 16:13:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 16:13:21 2016 Subject: [squeak-dev] The Trunk: System-topa.804.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.804.mcz ==================== Summary ==================== Name: System-topa.804 Author: topa Time: 3 March 2016, 5:12:55.830954 pm UUID: cbcd913c-9bbb-41f1-b85e-82859d493748 Ancestors: System-eem.803 Use itemSelector for bith removed and recategorized events. =============== Diff against System-eem.803 =============== Item was changed: ----- Method: SmalltalkImage>>event: (in category 'sources, changes log') ----- event: anEvent "Hook for SystemChangeNotifier" anEvent isDoIt ifTrue: [^self logChange: anEvent item]. (anEvent itemKind = SystemChangeNotifier categoryKind) ifTrue: [ anEvent isAdded ifTrue: [^self logChange: 'SystemOrganization addCategory: ', anEvent item storeString]. anEvent isRemoved ifTrue: [^self logChange: 'SystemOrganization removeSystemCategory: ', anEvent item storeString]. anEvent isRenamed ifTrue: [^self logChange: 'SystemOrganization renameCategory: ', anEvent oldName storeString, ' toBe: ', anEvent newName storeString]. ]. (anEvent itemKind = SystemChangeNotifier classKind) ifTrue: [ anEvent item acceptsLoggingOfCompilation ifFalse: [^self]. anEvent isAdded ifTrue: [ self logChange: anEvent item definition. ]. anEvent isModified ifTrue: [^self logChange: anEvent item definition]. anEvent isRemoved ifTrue: [^self logChange: 'Smalltalk removeClassNamed: ' , anEvent item name storeString]. anEvent isRenamed ifTrue: [^self logChange: 'Smalltalk renameClassNamed: ', anEvent oldName storeString, ' as: ', anEvent newName storeString]. anEvent isRecategorized ifTrue: [^self logChange: 'SystemOrganization classify: ', anEvent item name storeString, ' under: ', anEvent itemCategory storeString]. ]. (anEvent itemKind = SystemChangeNotifier protocolKind) ifTrue: [ anEvent isAdded ifTrue: [^self logChange: anEvent itemClass name , ' organization addCategory: ' , anEvent itemProtocol storeString]. anEvent isRemoved ifTrue: [^self logChange: anEvent itemClass name , ' organization removeCategory: ' , anEvent itemProtocol storeString]. anEvent isRenamed ifTrue: [^self logChange: anEvent itemClass name , ' organization renameCategory: ' , anEvent oldName storeString, ' toBe: ', anEvent newName storeString]. ]. (anEvent itemKind = SystemChangeNotifier methodKind) ifTrue: [ anEvent itemClass acceptsLoggingOfCompilation ifFalse: [^self]. anEvent isRemoved ifTrue: [^self logChange: anEvent itemClass name , ' removeSelector: ' , anEvent itemSelector storeString]. anEvent isRecategorized ifTrue: [ + ^self logChange: anEvent itemClass name , ' organization classify: ', anEvent itemSelector storeString, ' under: ', anEvent itemProtocol storeString. - ^self logChange: anEvent itemClass name , ' organization classify: ', anEvent item selector storeString, ' under: ', anEvent itemProtocol storeString. ]. ].! From commits at source.squeak.org Thu Mar 3 16:14:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 16:14:15 2016 Subject: [squeak-dev] The Trunk: Graphics-tfel.328.mcz Message-ID: Tim Felgentreff uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tfel.328.mcz ==================== Summary ==================== Name: Graphics-tfel.328 Author: tfel Time: 3 March 2016, 5:13:19.231036 pm UUID: 820a35b1-5ebb-472c-a0af-cab2230b27f4 Ancestors: Graphics-tfel.327 Add a method to query if the Display is deferring updates =============== Diff against Graphics-tfel.327 =============== Item was added: + ----- Method: DisplayScreen class>>isDeferringUpdates (in category 'testing') ----- + isDeferringUpdates + + ^ DeferringUpdates == true! From tom.b.rushworth at gmail.com Thu Mar 3 16:46:44 2016 From: tom.b.rushworth at gmail.com (Tom Rushworth) Date: Thu Mar 3 16:44:31 2016 Subject: [squeak-dev] The Trunk: System-eem.803.mcz In-Reply-To: <2FAA7468-2407-4A55-9C24-9F06AF742FFC@gmx.de> References: <84655F90-AB61-47FD-A686-D12DAA580FBF@gmx.de> <56D80066.7050706@zogotounga.net> <2FAA7468-2407-4A55-9C24-9F06AF742FFC@gmx.de> Message-ID: <56D86A74.7080207@gmail.com> Maybe Object>>freeze Object>>melt ? On 16-03-03 02:05 , Tobias Pape wrote: > > On 03.03.2016, at 10:14, St?phane Rollandin wrote: > >> >>> Object>>lock >>> Object>>unlock >> >> #lock and #unlock are already used (notably in Morph). > > Oh, wow, how did I miss that :/ > > Best > -Tobias > -- Tom Rushworth From commits at source.squeak.org Thu Mar 3 19:10:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 19:10:27 2016 Subject: [squeak-dev] The Trunk: System-eem.805.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.805.mcz ==================== Summary ==================== Name: System-eem.805 Author: eem Time: 3 March 2016, 11:09:29.833994 am UUID: 97d0ca96-9146-4ba4-919d-75e74cd848ce Ancestors: System-topa.804 Rename supportsImmutability to supportsreadOnlyObjects to avoid conflicts with the deep immutability concept. Update commentary for vmParameterAt:[put:] to describe the current VM. =============== Diff against System-topa.804 =============== Item was removed: - ----- Method: SmalltalkImage>>supportsImmutability (in category 'system attributes') ----- - supportsImmutability - "Answer whether the VM observes the per-object immutability flag and consequently - aborts writes to inst vars of, and fails primitives that attempt to write, to immutable objects." - "SmalltalkImage current supportsImmutability" - - ^(self vmParameterAt: 65) - ifNil: [false] - ifNotNil: - [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" - param isInteger "In newer VMs it is a set of integer flags, bit 1 of which is IMMUTABILITY" - ifTrue: [param anyMask: 2] - ifFalse: [false]]! Item was changed: ----- Method: SmalltalkImage>>supportsMultipleBytecodeSets (in category 'system attributes') ----- supportsMultipleBytecodeSets "Answer whether the VM supports multiple bytecodeSets." "SmalltalkImage current supportsMultipleBytecodeSets" ^(self vmParameterAt: 65) ifNil: [false] ifNotNil: + [:param| "In older VMs this is a boolean answering the vm-internal MULTIPLE_BYTECODE_SETS define" + param isInteger "In newer VMs it is a set of integer flags, bit 0 of which is the vm-internal MULTIPLE_BYTECODE_SETS define" - [:param| "In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS" - param isInteger "In newer VMs it is a set of integer flags, bit 0 of which is MULTIPLE_BYTECODE_SETS" ifTrue: [param anyMask: 1] ifFalse: [param]]! Item was added: + ----- Method: SmalltalkImage>>supportsReadOnlyObjects (in category 'system attributes') ----- + supportsReadOnlyObjects + "Answer whether the VM observes the per-object read-only flag and consequently aborts + writes to inst vars of, and fails primitives that attempt to modify, read-only objects." + "SmalltalkImage current supportsReadOnlyObjects" + + ^(self vmParameterAt: 65) + ifNil: [false] + ifNotNil: + [:param| "In older VMs this is a boolean answering the vm-internal MULTIPLE_BYTECODE_SETS define" + param isInteger "In newer VMs it is a set of integer flags, bit 1 of which is the vm-internal IMMUTABILITY define" + ifTrue: [param anyMask: 2] + ifFalse: [false]]! Item was changed: ----- Method: SmalltalkImage>>vmParameterAt: (in category 'system attributes') ----- vmParameterAt: parameterIndex "parameterIndex is a positive integer corresponding to one of the VM's internal parameter/metric registers. Answer with the current value of that register. Fail if parameterIndex has no corresponding register. VM parameters are numbered as follows: 1 byte size of old-space (read-only) 2 byte size of young-space (read-only) 3 byte size of object memory (read-only) 4 allocationCount (read-only; nil in Cog VMs) 5 allocations between GCs (read-write; nil in Cog VMs) 6 survivor count tenuring threshold (read-write) 7 full GCs since startup (read-only) 8 total milliseconds in full GCs since startup (read-only) 9 incremental GCs since startup (read-only; scavenging GCs on Spur) 10 total milliseconds in incremental/scavenging GCs since startup (read-only) 11 tenures of surving objects since startup (read-only) + 12-19 specific to the translating VM (nil in Cog VMs) + 20 utc microseconds at VM start-up (actually at time initialization, which precedes image load) (newer Cog VMs only). + 21 root (remembered) table size (read-only) + 22 root (remembered) table overflows since startup (read-only) - 12-20 specific to the translating VM (nil in Cog VMs) - 21 root table size (read-only) - 22 root table overflows since startup (read-only) 23 bytes of extra memory to reserve for VM buffers, plugins, etc. 24 memory threshold above which to shrink object memory (read-write) 25 ammount to grow by when growing object memory (read-write) 26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds (read-write) 27 number of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking 28 number of times sweep loop iterated for current IGC/FGC (read-only) 29 number of times make forward loop iterated for current IGC/FGC (read-only) 30 number of times compact move loop iterated for current IGC/FGC (read-only) 31 number of grow memory requests (read-only) 32 number of shrink memory requests (read-only) 33 number of root table entries used for current IGC/FGC (read-only) 34 number of allocations done before current IGC/FGC (read-only) 35 number of survivor objects after current IGC/FGC (read-only) 36 millisecond clock when current IGC/FGC completed (read-only) 37 number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only) 38 milliseconds taken by current IGC (read-only) 39 Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only) 40 BytesPerWord for this image 41 imageFormatVersion for the VM 42 number of stack pages in use (Cog Stack VM only, otherwise nil) 43 desired number of stack pages (stored in image file header, max 65535; Cog VMs only, otherwise nil) 44 size of eden, in bytes (Cog VMs only, otherwise nil) 45 desired size of eden, in bytes (stored in image file header; Cog VMs only, otherwise nil) 46 size of machine code zone, in bytes (stored in image file header; Cog JIT VM only, otherwise nil) 47 desired size of machine code zone, in bytes (applies at startup only, stored in image file header; Cog JIT VM only) 48 various properties of the Cog VM as an integer encoding an array of bit flags. + Bit 0: tells the VM that the image's Process class has threadId as its 5th inst var (after nextLink, suspendedContext, priority & myList) + Bit 1: on Cog JIT VMs asks the VM to set the flag bit in interpreted methods - Bit 0: implies the image's Process class has threadId as its 3rd inst var (zero relative) - Bit 1: on Cog VMs asks the VM to set the flag bit in interpreted methods Bit 2: if set, preempting a process puts it to the head of its run queue, not the back, + i.e. preempting a process by a higher priority one will not cause the preempted process to yield - i.e. preempting a process by a higher one will not cause the process to yield to others at the same priority. + Bit 3: in a muilt-threaded VM, if set, the Window system will only be accessed from the first VM thread + Bit 4: in a Spur vm, if set, causes weaklings and ephemerons to be queued individually for finalization 49 the size of the external semaphore table (read-write; Cog VMs only) + 50-51 reserved for VM parameters that persist in the image (such as eden above) + 52 root (remembered) table maximum size (read-only) + 53 the number of oldSpace segments (Spur only, otherwise nil) - 50-53 reserved for VM parameters that persist in the image (such as eden above) 54 total size of free old space (Spur only, otherwise nil) 55 ratio of growth and image size at or above which a GC will be performed post scavenge (Spur only, otherwise nil) 56 number of process switches since startup (read-only) 57 number of ioProcessEvents calls since startup (read-only) 58 number of forceInterruptCheck (Cog VMs) or quickCheckInterruptCalls (non-Cog VMs) calls since startup (read-only) 59 number of check event calls since startup (read-only) 60 number of stack page overflows since startup (read-only; Cog VMs only) 61 number of stack page divorces since startup (read-only; Cog VMs only) 62 number of machine code zone compactions since startup (read-only; Cog VMs only) 63 milliseconds taken by machine code zone compactions since startup (read-only; Cog VMs only) 64 current number of machine code methods (read-only; Cog VMs only) + 65 In newer Cog VMs a set of flags describing VM features, + if non-zero bit 0 implies multiple bytecode set support; + if non-zero bit 0 implies read-only object support + (read-only; Cog VMs only; nil in older Cog VMs, a boolean answering multiple bytecode support in not so old Cog VMs) - 65 true if the VM supports multiple bytecode sets; (read-only; Cog VMs only; nil in older Cog VMs) 66 the byte size of a stack page in the stack zone (read-only; Cog VMs only) + 67 the maximum allowed size of old space in bytes, 0 implies no internal limit (Spur VMs only). + 68 - 69 reserved for more Cog-related info - 67 - 69 reserved for more Cog-related info 70 the value of VM_PROXY_MAJOR (the interpreterProxy major version number) 71 the value of VM_PROXY_MINOR (the interpreterProxy minor version number)" self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>vmParameterAt:put: (in category 'vm parameters') ----- vmParameterAt: parameterIndex put: newValue "parameterIndex is a positive integer corresponding to one of the VM's internal parameter/metric registers. Store newValue (a positive integer) into that register and answer with the previous value that was stored there. Fail if newValue is out of range, if parameterIndex has no corresponding register, or if the corresponding register is read-only. + As of early 2016 the parameters which can be set are - As of 2011-ish the parameters which can be set are 5 allocations between GCs (read-write; nil in Cog VMs) 6 survivor count tenuring threshold (read-write) 23 bytes of extra memory to reserve for VM buffers, plugins, etc. 24 memory threshold above whichto shrink object memory (read-write) 25 memory headroom when growing object memory (read-write) 26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds (read-write) 43 desired number of stack pages (stored in image file header, max 65535; Cog VMs only, otherwise nil) 45 desired size of eden, in bytes (stored in image file header; Cog VMs only, otherwise nil) 47 desired size of machine code zone, in bytes (applies at startup only, stored in image file header; Cog JIT VM only) 48 various properties of the Cog VM as an integer encoding an array of bit flags. + Bit 0: tells the VM that the image's Process class has threadId as its 5th inst var (after nextLink, suspendedContext, priority & myList) + Bit 1: on Cog JIT VMs asks the VM to set the flag bit in interpreted methods + Bit 2: if set, preempting a process puts it to the head of its run queue, not the back, + i.e. preempting a process by a higher priority one will not cause the preempted process to yield + to others at the same priority. + Bit 3: in a muilt-threaded VM, if set, the Window system will only be accessed from the first VM thread + Bit 4: in a Spur vm, if set, causes weaklings and ephemerons to be queued individually for finalization + 49 the size of the external semaphore table (read-write; Cog VMs only) + 55 ratio of growth and image size at or above which a GC will be performed post scavenge (Spur only, otherwise nil) + 67 the maximum allowed size of old space in bytes, 0 implies no internal limit (Spur only)." - Bit 0: implies the image's Process class has threadId as its 3rd inst var (zero relative) - 49 the size of the external semaphore table (read-write; Cog VMs only)" self primitiveFailed! From bert at freudenbergs.de Thu Mar 3 19:21:20 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 3 19:21:25 2016 Subject: [squeak-dev] Seaside on HN Message-ID: <13633FD8-1E86-4DDB-B5C2-F2CF0F8592F5@freudenbergs.de> https://news.ycombinator.com/item?id=11212732 - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160303/549cd2ec/smime-0001.bin From eliot.miranda at gmail.com Thu Mar 3 19:54:00 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 3 19:54:05 2016 Subject: [squeak-dev] Seaside on HN In-Reply-To: <13633FD8-1E86-4DDB-B5C2-F2CF0F8592F5@freudenbergs.de> References: <13633FD8-1E86-4DDB-B5C2-F2CF0F8592F5@freudenbergs.de> Message-ID: <43602551-9E14-4EE2-A7C1-073CCDEA5FB0@gmail.com> > On Mar 3, 2016, at 11:21 AM, Bert Freudenberg wrote: > > https://news.ycombinator.com/item?id=11212732 Interesting: Not just way back; HN uses continuations. (Not in many user-visible places any more, but every link on the front page used to be one?expired "next page" continuation links were a frequent source of grumbling.) Note that you don't have to expire continuations, necessarily?you could actually persist them statelessly (i.e. without server-side state), by shipping their encoded representations to the client embedded into HMAC-signed links. You're basically giving the server a raw bytecode-eval endpoint, and then making sure that it only accepts code you yourself wrote. Kind of a crazy strategy compared to the standard predeclared REST API, but interestingly flexible. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160303/2b1f4403/attachment.htm From asqueaker at gmail.com Thu Mar 3 20:28:28 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 3 20:29:10 2016 Subject: [squeak-dev] Chronology ancestry update Message-ID: Since I already have an update I wish to add to Chronology, I need to get its ancestry minimally in order first. Bert had the suggestion that we could carve out the Chronology MC definitions from past Kernel packages and make an all-new ancestry for Chronology. I really like this idea, but it will take some time to do it. In the meantime, I wish to ensure the minimum ancestral documentation is captured into the new Chronology packages. If / when a full-history carve out of Kernel into Chronology is complete, those files can replace the ones we develop in the meantime. Dave, I made new nodes, Chronology-Core-dtl.1 and Chronology-Tests-dtl.1 are disconnected (we should probably move them to Treated). Also, what happened with KernelTests? There was a duplicate ancestor (dtl.306 and dtl.307) but 306 is not in the repository. So, I hope you don't mind, I felt the need to clean up this corruption so that the SCM tools won't blow up when they go looking for that missing ancestor. From karlramberg at gmail.com Thu Mar 3 20:31:56 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 3 20:31:59 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1456919081387-4881981.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: Nice. BTW: there is a lot of empty categories in the Preferences class. We must remove those in a post script or something. Preferences organization removeEmptyCategories I'm not sure how to do it ? Add it in a package preamble ? Does we then need to remove the preamble again ? Best, Karl On Wed, Mar 2, 2016 at 12:44 PM, marcel.taeumel wrote: > Hi, there! > > I restored some other messages that got lost and made it consistent with > the > key-duplication things in EventSensor: > > http://forum.world.st/The-Trunk-Kernel-mt-1003-mcz-td4881980.html > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4881981.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/20160303/b87644f2/attachment.htm From asqueaker at gmail.com Thu Mar 3 20:42:04 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 3 20:42:46 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1456919081387-4881981.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: Marcel, do you know why I don't find any senders of #swapMouseButtonsChanged? Is it some kind of magic assembling of some String somewhere and then sending it #asSymbol and then performing it? If so, how about we consider aligning our implementations with the IDE tools and the way people use them? With no senders, we know someone will feel inclined to "clean" this someday. If we must do that magic, perhaps at least putting some kind of marker statement like this in the relevant methods: 'this method performs ' -> #swapMouseButtonsChanged. so that all the usual tools will lead future readers to easily figure things out. On Wed, Mar 2, 2016 at 5:44 AM, marcel.taeumel wrote: > Hi, there! > > I restored some other messages that got lost and made it consistent with the > key-duplication things in EventSensor: > > http://forum.world.st/The-Trunk-Kernel-mt-1003-mcz-td4881980.html > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4881981.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From bert at freudenbergs.de Thu Mar 3 20:57:00 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 3 20:57:03 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: > On 03.03.2016, at 21:42, Chris Muller wrote: > > Marcel, do you know why I don't find any senders of #swapMouseButtonsChanged? Inspect #swapMouseButtonsChanged and ?explore pointers? ;) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160303/e8aa2afb/smime.bin From karlramberg at gmail.com Thu Mar 3 21:04:55 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 3 21:04:58 2016 Subject: [squeak-dev] [BUG] Commented out do it's don't work from context menu Message-ID: Bug with a commented out 'do it' like "Preferences inspectPreferences" If you select and select do it from context menu the screen blinks. Ctrl+d works fine. Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160303/0ff5b199/attachment.htm From lewis at mail.msen.com Thu Mar 3 21:36:59 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 3 21:37:02 2016 Subject: [squeak-dev] Chronology ancestry update In-Reply-To: References: Message-ID: <41088.136.2.1.102.1457041019.squirrel@webmail.msen.com> Chris, Yes please proceed. I will try to get an answer for your KernelTests question when I get home in a few hours. I think there is a good chance that what you are proposing will work. Thinking back to the update that I tried, I realize that I left the original update map in place such that the updater first loaded Chronology-Core-dtl.1 (with no ancestry), followed by loading the "changes" in Chronology-Core-dtl.2 (with Kernel ancestry attached). Possibly that confused the updater, leading to the lock up that I observed. My only caution would be to keep a copy of the original MCZs to restore in case this does not work when you test the update stream. Dave > Since I already have an update I wish to add to Chronology, I need to > get its ancestry minimally in order first. > > Bert had the suggestion that we could carve out the Chronology MC > definitions from past Kernel packages and make an all-new ancestry for > Chronology. I really like this idea, but it will take some time to do > it. > > In the meantime, I wish to ensure the minimum ancestral documentation > is captured into the new Chronology packages. If / when a > full-history carve out of Kernel into Chronology is complete, those > files can replace the ones we develop in the meantime. > > Dave, I made new nodes, Chronology-Core-dtl.1 and > Chronology-Tests-dtl.1 are disconnected (we should probably move them > to Treated). > > Also, what happened with KernelTests? There was a duplicate ancestor > (dtl.306 and dtl.307) but 306 is not in the repository. So, I hope > you don't mind, I felt the need to clean up this corruption so that > the SCM tools won't blow up when they go looking for that missing > ancestor. > From commits at source.squeak.org Thu Mar 3 22:24:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 22:24:14 2016 Subject: [squeak-dev] The Trunk: NetworkTests-ul.39.mcz Message-ID: Levente Uzonyi uploaded a new version of NetworkTests to project The Trunk: http://source.squeak.org/trunk/NetworkTests-ul.39.mcz ==================== Summary ==================== Name: NetworkTests-ul.39 Author: ul Time: 3 March 2016, 11:23:05.81344 pm UUID: 37f73354-d341-4957-99f8-a50f6891afb5 Ancestors: NetworkTests-topa.38 Hopefully fixed #testSocketReuse: - no more image lockups - no more lingering processes Also added a few more asserts and descriptions to the potential failures. =============== Diff against NetworkTests-topa.38 =============== Item was changed: ----- Method: SocketTest>>testSocketReuse (in category 'tests') ----- testSocketReuse "Test for SO_REUSEADDR/SO_REUSEPORT" + | udp1 udp2 sendProc recvProc | - | address port udp1 send1 udp2 recv2 sendProc recvProc received | - address := #[255 255 255 255]. "broadcast" - port := 31259. [ + | address port send1 recv2 received sent | + address := #[255 255 255 255]. "broadcast" + port := 31259. udp1 := Socket newUDP. udp1 setOption: 'SO_REUSEADDR' value: 1. + self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEADDR'. + self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEADDR') description: 'SO_REUSEADDR couldn''t be set'. udp1 setOption: 'SO_REUSEPORT' value: 1. + self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEPORT'. + self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEPORT') description: 'SO_REUSEPORT couldn''t be set'. udp1 setPort: port. + self assert: port equals: udp1 localPort. udp1 setOption: 'SO_BROADCAST' value: 1. send1 := UUID new. udp2 := Socket newUDP. udp2 setOption: 'SO_REUSEADDR' value: 1. + self assert: 0 equals: udp2 socketError. udp2 setOption: 'SO_REUSEPORT' value: 1. + self assert: 0 equals: udp2 socketError. udp2 setPort: port. + self assert: port equals: udp2 localPort. udp2 setOption: 'SO_BROADCAST' value: 1. recv2 := UUID new. received := 0. recvProc := [ [received < 16] whileTrue:[ + received := received + (udp2 receiveDataInto: recv2 startingAt: received + 1) + "No need to yield here, because #receiveDataInto:startingAt: will either wait on the readSemaphore of the socket or signal an error." ] + ] newProcess. - received := received + (udp2 receiveDataInto: recv2 startingAt: received + 1). - ] - ] fork. sendProc := [ udp1 setPeer: address port: port. + sent := (udp1 sendSomeData: send1 startIndex: 1 count: 16 for: 1). + ] newProcess. + recvProc resume. + sendProc resume. - udp1 sendData: send1 count: 16. - ] fork. (Delay forMilliseconds: 200) wait. + self + assert: sendProc isTerminated description: 'sendProc hasn''t terminated till the deadline'; + assert: recvProc isTerminated description: 'recvProc hasn''t terminated till the deadline'; + assert: 16 equals: sent description: ('{1} bytes were sent instead of 16' format: { sent }); + assert: send1 equals: recv2 description: 'sent and received bytes differ' + ] ensure:[ - self should: [recvProc isTerminated]. - self should: [sendProc isTerminated]. - self should: [send1 = recv2]. - ] ensure:[ udp1 destroy. udp2 destroy. + sendProc ifNotNil: [ sendProc terminate ]. + recvProc ifNotNil: [ recvProc terminate ] ]. ! From cunningham.cb at gmail.com Thu Mar 3 22:28:29 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Mar 3 22:28:32 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: On Thu, Mar 3, 2016 at 12:31 PM, karl ramberg wrote: > Nice. > BTW: there is a lot of empty categories in the Preferences class. > We must remove those in a post script or something. > Preferences organization removeEmptyCategories > > I'm not sure how to do it ? > > Add it in a package preamble ? > Does we then need to remove the preamble again ? > If I remember right, the preamble (and postlude?) only get run once - when they are first changed. After that, they are skipped. This means you want to leave them in and not remove them - otherwise a person later on would update from Trunk and just get the latest version - which doesn't have the preamble - and the work wouldn't be done. Or am I wrong, and this only happens with Class initialization? -cbc > > Best, > Karl > > > On Wed, Mar 2, 2016 at 12:44 PM, marcel.taeumel > wrote: > >> Hi, there! >> >> I restored some other messages that got lost and made it consistent with >> the >> key-duplication things in EventSensor: >> >> http://forum.world.st/The-Trunk-Kernel-mt-1003-mcz-td4881980.html >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4881981.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/20160303/a13790ac/attachment.htm From commits at source.squeak.org Thu Mar 3 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 3 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160303225502.19128.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-March/009472.html Name: System-eem.803 Ancestors: System-bf.802 Add getters that answer whether the VM supports immutability or multiple bytecode sets. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009473.html Name: Morphic-mt.1093 Ancestors: Morphic-topa.1092 Makes tree widgets honor the mouse-over-for-keyboard-focus preference. Just like PluggableListMorphs do. Implementation comes from there. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009474.html Name: System-topa.804 Ancestors: System-eem.803 Use itemSelector for bith removed and recategorized events. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009475.html Name: Graphics-tfel.328 Ancestors: Graphics-tfel.327 Add a method to query if the Display is deferring updates ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009476.html Name: System-eem.805 Ancestors: System-topa.804 Rename supportsImmutability to supportsreadOnlyObjects to avoid conflicts with the deep immutability concept. Update commentary for vmParameterAt:[put:] to describe the current VM. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009477.html Name: KernelTests-cmm.308 Ancestors: KernelTests-eem.305 Chronology tests moved to Chronology-Tests. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009478.html Name: NetworkTests-ul.39 Ancestors: NetworkTests-topa.38 Hopefully fixed #testSocketReuse: - no more image lockups - no more lingering processes Also added a few more asserts and descriptions to the potential failures. ============================================= From colin at wiresong.com Fri Mar 4 01:11:44 2016 From: colin at wiresong.com (Colin Putney) Date: Fri Mar 4 01:11:46 2016 Subject: [squeak-dev] Seaside on HN In-Reply-To: <43602551-9E14-4EE2-A7C1-073CCDEA5FB0@gmail.com> References: <13633FD8-1E86-4DDB-B5C2-F2CF0F8592F5@freudenbergs.de> <43602551-9E14-4EE2-A7C1-073CCDEA5FB0@gmail.com> Message-ID: On Thu, Mar 3, 2016 at 11:54 AM, Eliot Miranda wrote: > Interesting: > > > > > Not just way back; HN uses continuations. (Not in many user-visible places > any more, but every link on the front page used to be one?expired "next > page" continuation links were a frequent source of grumbling.) > > Note that you don't have to expire continuations, necessarily?you could > actually persist them statelessly (i.e. without server-side state), by > shipping their encoded representations *to the client* embedded into > HMAC-signed links. You're basically giving the server a raw bytecode-eval > endpoint, and then making sure that it only accepts code you yourself > wrote. Kind of a crazy strategy compared to the standard predeclared REST > API, but interestingly flexible. > Yeah, it's pretty crazy. I actually implemented this in Altitude, (minus the encryption) and it works fine. Ultimately I that the security nightmare if somebody breaks the signing makes it too dangerous to actually use. -Colin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160303/caca56a2/attachment.htm From karlramberg at gmail.com Fri Mar 4 14:11:36 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Mar 4 14:11:40 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: I'm also not not sure how this works :-( Best, Karl On Thu, Mar 3, 2016 at 11:28 PM, Chris Cunningham wrote: > > > On Thu, Mar 3, 2016 at 12:31 PM, karl ramberg > wrote: > >> Nice. >> BTW: there is a lot of empty categories in the Preferences class. >> We must remove those in a post script or something. >> Preferences organization removeEmptyCategories >> >> I'm not sure how to do it ? >> >> Add it in a package preamble ? >> Does we then need to remove the preamble again ? >> > > If I remember right, the preamble (and postlude?) only get run once - when > they are first changed. After that, they are skipped. > This means you want to leave them in and not remove them - otherwise a > person later on would update from Trunk and just get the latest version - > which doesn't have the preamble - and the work wouldn't be done. > > Or am I wrong, and this only happens with Class initialization? > > -cbc > >> >> Best, >> Karl >> >> >> On Wed, Mar 2, 2016 at 12:44 PM, marcel.taeumel >> wrote: >> >>> Hi, there! >>> >>> I restored some other messages that got lost and made it consistent with >>> the >>> key-duplication things in EventSensor: >>> >>> http://forum.world.st/The-Trunk-Kernel-mt-1003-mcz-td4881980.html >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4881981.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/20160304/6c2c801a/attachment.htm From bert at freudenbergs.de Fri Mar 4 14:25:18 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 4 14:25:22 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: <3C77F133-5C7C-4AC2-A43D-804EE5071BDC@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/1363d6ea/smime.bin From karlramberg at gmail.com Fri Mar 4 14:59:23 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Mar 4 14:59:26 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: <3C77F133-5C7C-4AC2-A43D-804EE5071BDC@freudenbergs.de> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <3C77F133-5C7C-4AC2-A43D-804EE5071BDC@freudenbergs.de> Message-ID: On Fri, Mar 4, 2016 at 3:25 PM, Bert Freudenberg wrote: > On 03.03.2016, at 23:28, Chris Cunningham wrote: > > > On Thu, Mar 3, 2016 at 12:31 PM, karl ramberg > wrote: > >> Nice. >> BTW: there is a lot of empty categories in the Preferences class. >> We must remove those in a post script or something. >> Preferences organization removeEmptyCategories >> >> I'm not sure how to do it ? >> >> Add it in a package preamble ? >> Does we then need to remove the preamble again ? >> > > If I remember right, the preamble (and postlude?) only get run once - when > they are first changed. After that, they are skipped. > This means you want to leave them in and not remove them - otherwise a > person later on would update from Trunk and just get the latest version - > which doesn't have the preamble - and the work wouldn't be done. > > Or am I wrong, and this only happens with Class initialization? > > > It happens exactly the same as with class initialization: > > If the definition (of the script or method) changed, it gets executed. > > You cannot rely on it having executed, or it only executing once. It?s > better to write it in a way that running it again does no harm. > > We can force execution by issuing an update map, but it?s better to avoid > that. > > For the problem at hand (empty method categories) we also could just add a > step to the release builder to ensure all categories are clean. > We could run this for all classes I guess. I don't see much value in keeping empty method categories around... Anyone objects ? Best, Karl > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/1fb36c90/attachment.htm From Das.Linux at gmx.de Fri Mar 4 15:20:26 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 4 15:20:31 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <3C77F133-5C7C-4AC2-A43D-804EE5071BDC@freudenbergs.de> Message-ID: <2F8F92CD-22D3-4070-9CF4-F54A9C87FD59@gmx.de> On 04.03.2016, at 15:59, karl ramberg wrote: > > > On Fri, Mar 4, 2016 at 3:25 PM, Bert Freudenberg wrote: > On 03.03.2016, at 23:28, Chris Cunningham wrote: >> >> On Thu, Mar 3, 2016 at 12:31 PM, karl ramberg wrote: >> Nice. >> BTW: there is a lot of empty categories in the Preferences class. >> We must remove those in a post script or something. >> Preferences organization removeEmptyCategories >> >> I'm not sure how to do it ? >> >> Add it in a package preamble ? >> Does we then need to remove the preamble again ? >> >> If I remember right, the preamble (and postlude?) only get run once - when they are first changed. After that, they are skipped. >> This means you want to leave them in and not remove them - otherwise a person later on would update from Trunk and just get the latest version - which doesn't have the preamble - and the work wouldn't be done. >> >> Or am I wrong, and this only happens with Class initialization? > > It happens exactly the same as with class initialization: > > If the definition (of the script or method) changed, it gets executed. > > You cannot rely on it having executed, or it only executing once. It?s better to write it in a way that running it again does no harm. > > We can force execution by issuing an update map, but it?s better to avoid that. > > For the problem at hand (empty method categories) we also could just add a step to the release builder to ensure all categories are clean. > > We could run this for all classes I guess. I don't see much value in keeping empty method categories around... > > Anyone objects ? "look at class side" ? Best -Tobias > > Best, > Karl > > > - Bert - From karlramberg at gmail.com Fri Mar 4 15:38:50 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Mar 4 15:38:53 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: <2F8F92CD-22D3-4070-9CF4-F54A9C87FD59@gmx.de> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <3C77F133-5C7C-4AC2-A43D-804EE5071BDC@freudenbergs.de> <2F8F92CD-22D3-4070-9CF4-F54A9C87FD59@gmx.de> Message-ID: Ugh, of course there is stuff like "look at class side" ;-) Best. Karl On Fri, Mar 4, 2016 at 4:20 PM, Tobias Pape wrote: > > On 04.03.2016, at 15:59, karl ramberg wrote: > > > > > > > On Fri, Mar 4, 2016 at 3:25 PM, Bert Freudenberg > wrote: > > On 03.03.2016, at 23:28, Chris Cunningham > wrote: > >> > >> On Thu, Mar 3, 2016 at 12:31 PM, karl ramberg > wrote: > >> Nice. > >> BTW: there is a lot of empty categories in the Preferences class. > >> We must remove those in a post script or something. > >> Preferences organization removeEmptyCategories > >> > >> I'm not sure how to do it ? > >> > >> Add it in a package preamble ? > >> Does we then need to remove the preamble again ? > >> > >> If I remember right, the preamble (and postlude?) only get run once - > when they are first changed. After that, they are skipped. > >> This means you want to leave them in and not remove them - otherwise a > person later on would update from Trunk and just get the latest version - > which doesn't have the preamble - and the work wouldn't be done. > >> > >> Or am I wrong, and this only happens with Class initialization? > > > > It happens exactly the same as with class initialization: > > > > If the definition (of the script or method) changed, it gets executed. > > > > You cannot rely on it having executed, or it only executing once. It?s > better to write it in a way that running it again does no harm. > > > > We can force execution by issuing an update map, but it?s better to > avoid that. > > > > For the problem at hand (empty method categories) we also could just add > a step to the release builder to ensure all categories are clean. > > > > We could run this for all classes I guess. I don't see much value in > keeping empty method categories around... > > > > Anyone objects ? > > > "look at class side" ? > > Best > -Tobias > > > > > Best, > > Karl > > > > > > - Bert - > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/7dfc70ff/attachment-0001.htm From commits at source.squeak.org Fri Mar 4 19:17:38 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 4 19:17:41 2016 Subject: [squeak-dev] The Trunk: NetworkTests-ul.40.mcz Message-ID: Levente Uzonyi uploaded a new version of NetworkTests to project The Trunk: http://source.squeak.org/trunk/NetworkTests-ul.40.mcz ==================== Summary ==================== Name: NetworkTests-ul.40 Author: ul Time: 4 March 2016, 8:17:26.370392 pm UUID: caffaf06-2201-4e88-8873-3c3337820a8b Ancestors: NetworkTests-ul.39 - those extra assertions in#testSocketReuse might fail before the sockets are properly initialized, so check that in the argument block of #ensure: =============== Diff against NetworkTests-ul.39 =============== Item was changed: ----- Method: SocketTest>>testSocketReuse (in category 'tests') ----- testSocketReuse "Test for SO_REUSEADDR/SO_REUSEPORT" | udp1 udp2 sendProc recvProc | [ | address port send1 recv2 received sent | address := #[255 255 255 255]. "broadcast" port := 31259. udp1 := Socket newUDP. udp1 setOption: 'SO_REUSEADDR' value: 1. self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEADDR'. self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEADDR') description: 'SO_REUSEADDR couldn''t be set'. udp1 setOption: 'SO_REUSEPORT' value: 1. self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEPORT'. self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEPORT') description: 'SO_REUSEPORT couldn''t be set'. udp1 setPort: port. self assert: port equals: udp1 localPort. udp1 setOption: 'SO_BROADCAST' value: 1. send1 := UUID new. udp2 := Socket newUDP. udp2 setOption: 'SO_REUSEADDR' value: 1. self assert: 0 equals: udp2 socketError. udp2 setOption: 'SO_REUSEPORT' value: 1. self assert: 0 equals: udp2 socketError. udp2 setPort: port. self assert: port equals: udp2 localPort. udp2 setOption: 'SO_BROADCAST' value: 1. recv2 := UUID new. received := 0. recvProc := [ [received < 16] whileTrue:[ received := received + (udp2 receiveDataInto: recv2 startingAt: received + 1) "No need to yield here, because #receiveDataInto:startingAt: will either wait on the readSemaphore of the socket or signal an error." ] ] newProcess. sendProc := [ udp1 setPeer: address port: port. sent := (udp1 sendSomeData: send1 startIndex: 1 count: 16 for: 1). ] newProcess. recvProc resume. sendProc resume. (Delay forMilliseconds: 200) wait. self assert: sendProc isTerminated description: 'sendProc hasn''t terminated till the deadline'; assert: recvProc isTerminated description: 'recvProc hasn''t terminated till the deadline'; assert: 16 equals: sent description: ('{1} bytes were sent instead of 16' format: { sent }); assert: send1 equals: recv2 description: 'sent and received bytes differ' ] ensure:[ + udp1 ifNotNil: [ udp1 destroy ]. + udp2 ifNotNil: [ udp2 destroy ]. - udp1 destroy. - udp2 destroy. sendProc ifNotNil: [ sendProc terminate ]. recvProc ifNotNil: [ recvProc terminate ] ]. ! From gettimothy at zoho.com Fri Mar 4 21:36:36 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Mar 4 21:36:42 2016 Subject: [squeak-dev] source.squeak.org domain lost? Message-ID: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> Sorry if this is old news. http://source.squeak.org looks like somebody else got the domain. http://source.squeak.org/trunk/Network-eem.173.mcz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/b4175745/attachment.htm From Das.Linux at gmx.de Fri Mar 4 21:51:16 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 4 21:51:21 2016 Subject: [squeak-dev] source.squeak.org domain lost? In-Reply-To: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> References: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> Message-ID: <63630664-A490-4192-8D7D-111908C3A404@gmx.de> On 04.03.2016, at 22:36, gettimothy wrote: > Sorry if this is old news. > > > > http://source.squeak.org looks like somebody else got the domain. > What do you mean by that? Best -Tobias > > > http://source.squeak.org/trunk/Network-eem.173.mcz > > > -------------- next part -------------- Skipped content of type multipart/related From lists at fniephaus.com Fri Mar 4 21:52:35 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri Mar 4 21:52:48 2016 Subject: [squeak-dev] source.squeak.org domain lost? In-Reply-To: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> References: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> Message-ID: Looks to be working just fine for me. Are you sure it's not a problem with your DNS settings? -- On Fri, Mar 4, 2016 at 9:36 PM gettimothy wrote: > Sorry if this is old news. > > > > http://source.squeak.org looks like somebody else got the domain. > > > > http://source.squeak.org/trunk/Network-eem.173.mcz > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/4b04e309/attachment.htm From gettimothy at zoho.com Fri Mar 4 22:05:50 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Mar 4 22:05:53 2016 Subject: [squeak-dev] source.squeak.org domain lost? In-Reply-To: References: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> Message-ID: <15343aa56ea.d700c3187944.1884520715335991411@zoho.com> Thanks guys, Must be something weird with my network. I went to archive.today, typed in the url and it shows up fine there. When I go there directly I get a page that reads in part.. You've found Squeak.org dedicated to finding the best money-saving offers on the Web and delivering them directly to you, the consumer. Business profiles contain comprehensive information on contacts, products, services, trade experience and technology. We strive to provide the highest quality and lowest prices available to our customers, resulting in one of the best satisfaction ratings in the industry. If you're not already receiving our money-saving offers and web-only specials,contact us today. hmmm. sorry to waste your time. ---- On Fri, 04 Mar 2016 16:52:35 -0500 Fabio Niephaus<lists@fniephaus.com> wrote ---- Looks to be working just fine for me.Are you sure it's not a problem with your DNS settings? -- On Fri, Mar 4, 2016 at 9:36 PM gettimothy <gettimothy@zoho.com> wrote: Sorry if this is old news. http://source.squeak.org looks like somebody else got the domain. http://source.squeak.org/trunk/Network-eem.173.mcz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/abd877ac/attachment.htm From gettimothy at zoho.com Fri Mar 4 22:13:11 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Mar 4 22:13:16 2016 Subject: [squeak-dev] source.squeak.org domain lost? In-Reply-To: References: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> Message-ID: <15343b114ad.baf87c1e8378.1932697081567859115@zoho.com> definitely a network problem. I booted to my other partition that I have been using for squeak development and all works fine. sorry for the scare. ---- On Fri, 04 Mar 2016 16:52:35 -0500 Fabio Niephaus <lists@fniephaus.com> wrote ---- Looks to be working just fine for me.Are you sure it's not a problem with your DNS settings? -- On Fri, Mar 4, 2016 at 9:36 PM gettimothy <gettimothy@zoho.com> wrote: Sorry if this is old news. http://source.squeak.org looks like somebody else got the domain. http://source.squeak.org/trunk/Network-eem.173.mcz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/41808544/attachment.htm From gettimothy at zoho.com Fri Mar 4 22:52:18 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Mar 4 22:52:21 2016 Subject: [squeak-dev] source.squeak.org domain lost? In-Reply-To: <15343b114ad.baf87c1e8378.1932697081567859115@zoho.com> References: <153438f95fc.125396bbc7691.5637028329868538516@zoho.com> <15343b114ad.baf87c1e8378.1932697081567859115@zoho.com> Message-ID: <15343d4e21e.e5045538479.1075652938576348889@zoho.com> ah, there it is. A while ago there where domain issues with the site and we had to hardcode the i.p. addresses. I had these in my hosts file 85.10.195.197 source.squeak.org 85.10.195.197 ftp.squeak.org 85.10.195.197 map.squeak.org 85.10.195.197 bugs.squeak.org When I go there using the i.p address, I get the same bogus website with the i.p subbed in. You've found 85.10.195.197 dedicated to finding the best money-saving offers on the Web and delivering them directly to you, the consumer. Business profiles contain comprehensive information on contacts, products, services, trade experience and technology. We strive to provide the highest quality and lowest prices available to our customers, resulting in one of the best satisfaction ratings in the industry. If you're not already receiving our money-saving offers and web-only specials,contact us today. whew! That scared me. thanks for your time. ---- On Fri, 04 Mar 2016 17:13:11 -0500 gettimothy <gettimothy@zoho.com> wrote ---- definitely a network problem. I booted to my other partition that I have been using for squeak development and all works fine. sorry for the scare. ---- On Fri, 04 Mar 2016 16:52:35 -0500 Fabio Niephaus <lists@fniephaus.com> wrote ---- Looks to be working just fine for me.Are you sure it's not a problem with your DNS settings? -- On Fri, Mar 4, 2016 at 9:36 PM gettimothy <gettimothy@zoho.com> wrote: Sorry if this is old news. http://source.squeak.org looks like somebody else got the domain. http://source.squeak.org/trunk/Network-eem.173.mcz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160304/75cc4627/attachment.htm From commits at source.squeak.org Fri Mar 4 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 4 22:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160304225502.10500.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-March/009479.html Name: KernelTests-dtl.306 Ancestors: KernelTests-eem.305 Move Kernel-Chronology to Chronology-Core and KernelTests-Chronology to Chronology-Tests ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009480.html Name: NetworkTests-ul.40 Ancestors: NetworkTests-ul.39 - those extra assertions in#testSocketReuse might fail before the sockets are properly initialized, so check that in the argument block of #ensure: ============================================= From lecteur at zogotounga.net Sat Mar 5 11:11:35 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Mar 5 11:11:38 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? Message-ID: <56DABEE7.4000702@zogotounga.net> Hello, Is it the intended behavior that turning off the preference cmdGesturesEnabled makes it impossible to get halos ? This is new in trunk (as of 15697). The change is in Morph>>#handleMouseDown: where there is a new test. If it is indeed intended, it does bother me quite a bit, as I need both halos working and cmdGesturesEnabled set to false in my application. (To be precise, I made some morphs respond in a specific way to Ctrl-dragging which is made impossible if cmdGesturesEnabled is true because then Ctrl is intercepted, again in Morph>>#handleMouseDown:) Stef From bert at freudenbergs.de Sat Mar 5 14:11:33 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 5 14:11:37 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: <56DABEE7.4000702@zogotounga.net> References: <56DABEE7.4000702@zogotounga.net> Message-ID: <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> On 05.03.2016, at 12:11, St?phane Rollandin wrote: > > Hello, > > Is it the intended behavior that turning off the preference cmdGesturesEnabled makes it impossible to get halos ? Yes, see comment in disableProgrammerFacilities. > This is new in trunk (as of 15697). The change is in Morph>>#handleMouseDown: where there is a new test. > > If it is indeed intended, it does bother me quite a bit, as I need both halos working and cmdGesturesEnabled set to false in my application. > > (To be precise, I made some morphs respond in a specific way to Ctrl-dragging which is made impossible if cmdGesturesEnabled is true because then Ctrl is intercepted, again in Morph>>#handleMouseDown:) Hmm, cmdGesturesEnabled seems to control lots of independent behavior. Maybe we need more fine-grained settings? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160305/9e6be6fc/smime.bin From karlramberg at gmail.com Sat Mar 5 14:28:25 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sat Mar 5 14:28:28 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> Message-ID: Is anyone using gestures ? Best, Karl On Sat, Mar 5, 2016 at 3:11 PM, Bert Freudenberg wrote: > On 05.03.2016, at 12:11, St?phane Rollandin > wrote: > > > > Hello, > > > > Is it the intended behavior that turning off the preference > cmdGesturesEnabled makes it impossible to get halos ? > > Yes, see comment in disableProgrammerFacilities. > > > This is new in trunk (as of 15697). The change is in > Morph>>#handleMouseDown: where there is a new test. > > > > If it is indeed intended, it does bother me quite a bit, as I need both > halos working and cmdGesturesEnabled set to false in my application. > > > > (To be precise, I made some morphs respond in a specific way to > Ctrl-dragging which is made impossible if cmdGesturesEnabled is true > because then Ctrl is intercepted, again in Morph>>#handleMouseDown:) > > Hmm, cmdGesturesEnabled seems to control lots of independent behavior. > Maybe we need more fine-grained settings? > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160305/a2841cfe/attachment.htm From karlramberg at gmail.com Sat Mar 5 14:52:46 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sat Mar 5 14:52:49 2016 Subject: [squeak-dev] Dark background color Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: DarkBackgroundColor.7.cs.gz Type: application/x-gzip Size: 10199 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160305/a4cf2d5c/DarkBackgroundColor.7.cs.bin From lecteur at zogotounga.net Sat Mar 5 15:03:42 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Mar 5 15:03:46 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> Message-ID: <56DAF54E.3080109@zogotounga.net> > Hmm, cmdGesturesEnabled seems to control lots of independent behavior. Maybe we need more fine-grained settings? I would say so :) Stef From lecteur at zogotounga.net Sat Mar 5 15:04:58 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Mar 5 15:05:02 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> Message-ID: <56DAF59A.5040301@zogotounga.net> > Is anyone using gestures ? What are gestures ? Stef From lecteur at zogotounga.net Sat Mar 5 15:11:45 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Mar 5 15:11:43 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> Message-ID: <56DAF731.3080709@zogotounga.net> > Hmm, cmdGesturesEnabled seems to control lots of independent behavior. Maybe we need more fine-grained settings? I guess the main hurdle as I see it is that halos are considered in disableProgrammerFacilities to be part of a programmer tools, not user ones. Maybe adding a preference saying "my app is using halos" would do it. Then in Morph>>#handleMouseDown: we could have something like (anEvent blueButtonChanged and:[Preferences cmdGesturesEnabled or: [Preferences myAppUsesHalos "tmp name"]]) ifTrue: [^ self blueButtonDown: anEvent]. Stef From Marcel.Taeumel at hpi.de Sun Mar 6 00:52:30 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Mar 6 01:20:01 2016 Subject: [squeak-dev] Re: Dark background color In-Reply-To: References: Message-ID: <1457225550583-4882727.post@n4.nabble.com> Hi, Karl. See WindowColorSpec. There, you might want to add a new instVar for "darkColor." Then you could also update all window color specifications. Then you could add Preferences >> #installDarkWindowColors just like, for example, #installNormalWindowColors. Finally, you should update TheWorldMainDockingBar >> #windowColorsOn: to make it consistently accessible via the menu. Note that tools implement #windowColorSpecification. WindowColorRegistry class >> #refresh updates the cache. Best, Marcel -- View this message in context: http://forum.world.st/Dark-background-color-tp4882681p4882727.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun Mar 6 00:55:00 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Mar 6 01:22:31 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> Message-ID: <1457225700739-4882728.post@n4.nabble.com> Hi Chris, sure. This selectors is constructed via the preference name + "Changed" and stored in changeSelector. Then changeSelector is performed on changeInformee. You will not find anything in the code and hence Senders does not give you anything. Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4882728.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun Mar 6 01:00:53 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Mar 6 01:28:24 2016 Subject: [squeak-dev] Re: [BUG] Commented out do it's don't work from context menu In-Reply-To: References: Message-ID: <1457226053511-4882729.post@n4.nabble.com> Hi Karl. Can you elaborate? Works fine for me. Best, Marcel -- View this message in context: http://forum.world.st/BUG-Commented-out-do-it-s-don-t-work-from-context-menu-tp4882438p4882729.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Sun Mar 6 12:01:44 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sun Mar 6 12:01:46 2016 Subject: [squeak-dev] Re: Dark background color In-Reply-To: <1457225550583-4882727.post@n4.nabble.com> References: <1457225550583-4882727.post@n4.nabble.com> Message-ID: On Sun, Mar 6, 2016 at 1:52 AM, marcel.taeumel wrote: > Hi, Karl. > > See WindowColorSpec. There, you might want to add a new instVar for > "darkColor." Then you could also update all window color specifications. > Then you could add Preferences >> #installDarkWindowColors just like, for > example, #installNormalWindowColors. Finally, you should update > TheWorldMainDockingBar >> #windowColorsOn: to make it consistently > accessible via the menu. > It should be accessible from the menu already. But as you say, more changes are needed. > Note that tools implement #windowColorSpecification. WindowColorRegistry > class >> #refresh updates the cache. > Yes, the change of background color need to propagate trough to all open windows so they change background color and text color. Best, Karl > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Dark-background-color-tp4882681p4882727.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/20160306/6c4d4408/attachment.htm From commits at source.squeak.org Sun Mar 6 13:24:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 6 13:24:46 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1004.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1004.mcz ==================== Summary ==================== Name: Kernel-bf.1004 Author: bf Time: 6 March 2016, 2:24:19.735994 pm UUID: 66e79374-507f-4a75-a4a4-e9dad4dbd17c Ancestors: Kernel-mt.1003 Nicer display of tinyBenchmark results: 110,000,000 bytecodes/sec; 1,200,000 sends/sec =============== Diff against Kernel-mt.1003 =============== Item was added: + ----- Method: Integer>>significantDigits: (in category 'truncation and round off') ----- + significantDigits: aNumber + "Round to preserve aNumber significant digits: + 987654321 significantDigits: 1 ==> 1000000000 + 987654321 significantDigits: 2 ==> 990000000" + | digits | + digits := self numberOfDigitsInBase: 10. + ^self roundTo: (10 raisedTo: digits - aNumber)! Item was changed: ----- Method: Integer>>tinyBenchmarks (in category 'benchmarks') ----- tinyBenchmarks "Report the results of running the two tiny Squeak benchmarks. ar 9/10/1999: Adjusted to run at least 1 sec to get more stable results" "0 tinyBenchmarks" + "On a 292 MHz G3 Mac: 23,000,000 bytecodes/sec; 980,000 sends/sec" + "On a 400 MHz PII/Win98: 18,000,000 bytecodes/sec; 1,100,000 sends/sec" + "On a 2800 MHz i7: 1,200,000,000 bytecodes/sec; 25,000,000 sends/sec" + "On a 2800 MHz i7 (CogVM): 1,700,000,000 bytecodes/sec; 260,000,000 sends/sec" - "On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec" - "On a 400 MHz PII/Win98: 18028169 bytecodes/sec; 1081272 sends/sec" | t1 t2 r n1 n2 | n1 := 1. [t1 := Time millisecondsToRun: [n1 benchmark]. t1 < 1000] whileTrue:[n1 := n1 * 2]. "Note: #benchmark's runtime is about O(n)" n2 := 28. [t2 := Time millisecondsToRun: [r := n2 benchFib]. t2 < 1000] whileTrue:[n2 := n2 + 1]. "Note: #benchFib's runtime is about O(k^n), where k is the golden number = (1 + 5 sqrt) / 2 = 1.618...." + ^ ((n1 * 500000 * 1000) // t1 significantDigits: 2) asStringWithCommas, ' bytecodes/sec; ', + ((r * 1000) // t2 significantDigits: 2) asStringWithCommas, ' sends/sec' + ! - ^ ((n1 * 500000 * 1000) // t1) printString, ' bytecodes/sec; ', - ((r * 1000) // t2) printString, ' sends/sec'! From Marcel.Taeumel at hpi.de Sun Mar 6 15:51:53 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Mar 6 16:19:28 2016 Subject: [squeak-dev] Re: Dark background color In-Reply-To: References: <1457225550583-4882727.post@n4.nabble.com> Message-ID: <1457279513640-4882835.post@n4.nabble.com> No, no, no. Window colors are decoupled from other preferences. I am just talking about how to cleanly introduce a dark version of all window colors. This is unrelated to text colors or background colors in other widgets. Best, Marcel -- View this message in context: http://forum.world.st/Dark-background-color-tp4882681p4882835.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Sun Mar 6 16:51:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 6 16:51:42 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457225700739-4882728.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> Message-ID: Thanks Marcel, but my question was about the necessity of such black magic, and what possible mitigations could be taken to reduce or eliminate it.. On Sat, Mar 5, 2016 at 6:55 PM, marcel.taeumel wrote: > Hi Chris, > > sure. This selectors is constructed via the preference name + "Changed" and > stored in changeSelector. Then changeSelector is performed on > changeInformee. You will not find anything in the code and hence Senders > does not give you anything. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4882728.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From squeaklist at gmail.com Sun Mar 6 16:59:58 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Sun Mar 6 17:00:00 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: <56DAF59A.5040301@zogotounga.net> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> <56DAF59A.5040301@zogotounga.net> Message-ID: i would like to use gestures to do rapid zooming On Saturday, March 5, 2016, St?phane Rollandin wrote: > Is anyone using gestures ? >> > > What are gestures ? > > Stef > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160306/bc9fecf5/attachment.htm From bert at freudenbergs.de Sun Mar 6 17:33:21 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Mar 6 17:33:30 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> Message-ID: On 06.03.2016, at 17:51, Chris Muller wrote: > > Thanks Marcel, but my question was about the necessity of such black > magic, and what possible mitigations could be taken to reduce or > eliminate it.. We could add it to setNotificationParametersForStandardPreferences for documentation. > On Sat, Mar 5, 2016 at 6:55 PM, marcel.taeumel wrote: >> Hi Chris, >> >> sure. This selectors is constructed via the preference name + "Changed" and >> stored in changeSelector. Then changeSelector is performed on >> changeInformee. Are you sure? I thought it would have been added by a changeset preamble. I don?t think it?s constructed. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160306/f983065a/smime-0001.bin From bert at freudenbergs.de Sun Mar 6 17:41:32 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Mar 6 17:41:35 2016 Subject: [squeak-dev] swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> Message-ID: <3ECE8266-EF1F-4D41-89E0-BD062E68A2A8@freudenbergs.de> On 06.03.2016, at 18:33, Bert Freudenberg wrote: > > On 06.03.2016, at 17:51, Chris Muller wrote: >> >> Thanks Marcel, but my question was about the necessity of such black >> magic, and what possible mitigations could be taken to reduce or >> eliminate it.. > > We could add it to setNotificationParametersForStandardPreferences for documentation. Hmm, no, that?s only for Preferences as changeInformee ? We could just add a comment to swapMouseButtonsChanged of course. Pragma prefs certainly have an advantage for documentation. - Bert - >> On Sat, Mar 5, 2016 at 6:55 PM, marcel.taeumel wrote: >>> Hi Chris, >>> >>> sure. This selectors is constructed via the preference name + "Changed" and >>> stored in changeSelector. Then changeSelector is performed on >>> changeInformee. > > Are you sure? I thought it would have been added by a changeset preamble. I don?t think it?s constructed. > > - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160306/0e2f74bf/smime.bin From ma.chris.m at gmail.com Sun Mar 6 19:36:28 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Sun Mar 6 19:37:09 2016 Subject: [squeak-dev] Themes for Squeak 5.1 Message-ID: I would really like for Squeak to have a dark theme for 5.1. Marcel, Karl, and myself, have had a long and slow discussion about this over the last few months. These are the requirements we are targeting for Themes: 1) ability to affect the visual appearance of every UI component of the system, by setting its various FillStyle's, #borderWidth, #iconForm's, #font's, etc. 2) ability to swap out one entire visual Theme for another (via save/load), without affecting any of the non-visual Preferences. 3) ability to easily grow the elements of Theme objects organically (as we can, for example, with our process for adding a new Preference). 4) A chain-of-responsibility feature which, upon access of the value of a particular visual property, if it is not defined by the app, and not defined by the theme, then it can fallback to use the value of that property from the fallback theme. Marcel came up with a bespoke implementation which can meet the above requirements in about 30 lines of code across 12 methods. I have a commercial need for theming support in Squeak. That's why I approached Marcel last January to work on this, so we can could come up with a solution we agree on. Now that we have, I would like to move forward on this very soon. What do y'all think? In the next couple of weeks or so, Marcel, would you mind if I moved forward with your idea, or did you want to do the work? Karl, the work you did with your change-set could probably help us identify many of the accessing places which we'll need to update.. From ma.chris.m at gmail.com Sun Mar 6 19:38:22 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Sun Mar 6 19:39:03 2016 Subject: [squeak-dev] Preferences revamp? Message-ID: The discussion of Preferences came up in our board meeting last week. Clearly, Preferences is something that serves Squeak and our community, due to the amazing range of system configurability they provide, allowing the system to be tailored to any user-style and purpose. However, I feel that the Preferences framework itself does not do everything I want it to do. These are the minimum requirements I think our Preferences system should be able to do: 1) it must have a first-class model (which it already does) Preferences and Preference. All of the following requirements must be able to be satisfied by talking strictly to this model, (no required browsers or sends to outside classes) with uniform API usage regardless whether the underlying implementation (Pragma or otherwise). 2) Answer a collection of all Preference objects representing the current system settings. 3) Ability to access any single Preference object by its Symbolic name. (We want to maintain the standard Smalltalk "senders" being able to easily find users of preferences by their name). 4) Ability to ask any Preference its default value, without resetting its current value. 5) Ability to reset any Preference to its default value, another fixed value, or cycle from its current value to its next value. 6) Answer a collection of Preference objects representing the default system settings, without changing any current Preference settings. 7) Answer a collection of the diff between (2) and (6), above, without changing the current value of any preferences. 7.5) Ability for a Preference to answer literal structure (key->value) that can be used as input for requirement 7.6. 7.6) Ability to construct or set a particular Preference to value from a libteral specification. NOTE: 7.5 and 7.6 are to support ReleaseBuilder defaultValueTableForCurrentRelease. 8) Ability to Save / Load entire sets of preferences. But it must be a _Logical_ representation of the value so it will work for all future Squeaks. 9) (Nice-to-have --->) Ability to Save / Load partial sets of preferences, leaving remaining preferences unchanged. 10) Last but not least: External applications must be able to seamlessly and dynamically extend the system with their own Preference objects and have all the above requirements satisfied for them. Maybe its just because I'm an old-school Smalltalker who prefers to do everything in objects; but I just have this feeling that the Pragma implementation we have been using, in spite of its complexity, is really limiting us, certainly in terms of my above requirements wishlist, right? Like, #7, for example... OTOH, one thing that became very clear from working on the Theme ideas with Karl and Marcel, is that that is very related to Preferences, and behaves very much like a preferences system. I believe it could be used for the non-visual preferences, too.. From karlramberg at gmail.com Sun Mar 6 19:42:45 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sun Mar 6 19:42:48 2016 Subject: [squeak-dev] Themes for Squeak 5.1 In-Reply-To: References: Message-ID: On Sun, Mar 6, 2016 at 8:36 PM, Chris Muller wrote: > I would really like for Squeak to have a dark theme for 5.1. Marcel, > Karl, and myself, have had a long and slow discussion about this over > the last few months. These are the requirements we are targeting for > Themes: > > 1) ability to affect the visual appearance of every UI component of > the system, by setting its various FillStyle's, #borderWidth, > #iconForm's, #font's, etc. > 2) ability to swap out one entire visual Theme for another (via > save/load), without affecting any of the non-visual Preferences. > 3) ability to easily grow the elements of Theme objects organically > (as we can, for example, with our process for adding a new > Preference). > 4) A chain-of-responsibility feature which, upon access of the > value of a particular visual property, if it is not defined by the > app, and not defined by the theme, then it can fallback to use the > value of that property from the fallback theme. > > Marcel came up with a bespoke implementation which can meet the above > requirements in about 30 lines of code across 12 methods. > > I have a commercial need for theming support in Squeak. That's why I > approached Marcel last January to work on this, so we can could come > up with a solution we agree on. Now that we have, I would like to > move forward on this very soon. > > What do y'all think? In the next couple of weeks or so, Marcel, would > you mind if I moved forward with your idea, or did you want to do the > work? Karl, the work you did with your change-set could probably help > us identify many of the accessing places which we'll need to update.. > > Hi, feel free to use the change set. The change set touches many classes and some hard to track down stuff. Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160306/4a27a06a/attachment.htm From bert at freudenbergs.de Sun Mar 6 21:21:46 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Mar 6 21:21:50 2016 Subject: [squeak-dev] Themes for Squeak 5.1 In-Reply-To: References: Message-ID: <9E219069-19DB-4B61-9C43-88CFEA737EA8@freudenbergs.de> On 06.03.2016, at 20:36, Chris Muller wrote: > > I would really like for Squeak to have a dark theme for 5.1. > [...] > What do y'all think? +1 - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160306/59575c86/smime.bin From commits at source.squeak.org Sun Mar 6 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 6 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160306225502.5437.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-March/009481.html Name: Kernel-bf.1004 Ancestors: Kernel-mt.1003 Nicer display of tinyBenchmark results: 110,000,000 bytecodes/sec; 1,200,000 sends/sec ============================================= From lewis at mail.msen.com Mon Mar 7 05:21:38 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 7 05:21:40 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20150524163602.GA66073@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> Message-ID: <20160307052138.GA26765@shell.msen.com> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > UTCDateAndTime is a UTC based implementation of class DateAndTime with > one instance variable representing the magnitude of the point in time, > and another representing local time zone offset. I have updated the UTCDateAndTime package to make it loadable in the latest Squeak trunk and Spur. A new Monticello repository is at http://www.squeaksource.com/UTCDateAndTime. The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. Starting with an updated trunk image, you can load UTCDateAndTime in two ways: 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and load the MCZ files in sequence beginning with Chronology-Core-dtl.3. 2) In a preferences browser, in category 'updates' set the 'Update URL' preference to 'http://www.squeaksource.com/UTCDateAndTime', and do world -> help... -> update code from server. The main objective of UTCDateAndTime is to make DateAndTime conceptually simpler, but a happy side effect is that it is also significantly faster than the old implementation. Dave From asqueaker at gmail.com Mon Mar 7 16:44:48 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Mar 7 16:45:31 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160307052138.GA26765@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> Message-ID: > The main objective of UTCDateAndTime is to make DateAndTime conceptually > simpler, but a happy side effect is that it is also significantly faster > than the old implementation. Hi Dave, when you first introduced UTCDateAndTime, it was originally significantly faster than legacy Chronology because legacy had a gross inefficiency in it. You work exposed that inefficiency, which was then fixed, pretty much neutralizing the performance advantage of UTCDateAndTime, of that time. If you have made further improvements since then, I would be interested to see your benchmarks again. One thing I wondered was, due to greater SmallInteger range, whether your implementation would be significantly faster in 64-bit image. In 32-bit though, IIRC, it no longer is.. From lewis at mail.msen.com Mon Mar 7 18:17:38 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 7 18:17:41 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> Message-ID: <24853.136.2.1.102.1457374658.squirrel@webmail.msen.com> Hi Chris, I did a quick check last night and it seemed to be about 2x faster overall on 32 bit Spur, except for DateAndTime>>= which is now slower. The performance check utility is in the squeaksource repository if you want to take a look at it. YMMV. Dave >> The main objective of UTCDateAndTime is to make DateAndTime conceptually >> simpler, but a happy side effect is that it is also significantly faster >> than the old implementation. > > Hi Dave, when you first introduced UTCDateAndTime, it was originally > significantly faster than legacy Chronology because legacy had a gross > inefficiency in it. You work exposed that inefficiency, which was > then fixed, pretty much neutralizing the performance advantage of > UTCDateAndTime, of that time. > > If you have made further improvements since then, I would be > interested to see your benchmarks again. > > One thing I wondered was, due to greater SmallInteger range, whether > your implementation would be significantly faster in 64-bit image. In > 32-bit though, IIRC, it no longer is.. > From ma.chris.m at gmail.com Mon Mar 7 20:42:27 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Mar 7 20:43:09 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <24853.136.2.1.102.1457374658.squirrel@webmail.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <24853.136.2.1.102.1457374658.squirrel@webmail.msen.com> Message-ID: That's great news, I'll check it out. Thanks. On Mon, Mar 7, 2016 at 12:17 PM, David T. Lewis wrote: > Hi Chris, > > I did a quick check last night and it seemed to be about 2x faster overall > on 32 bit Spur, except for DateAndTime>>= which is now slower. The > performance check utility is in the squeaksource repository if you want to > take a look at it. YMMV. > > Dave > >>> The main objective of UTCDateAndTime is to make DateAndTime conceptually >>> simpler, but a happy side effect is that it is also significantly faster >>> than the old implementation. >> >> Hi Dave, when you first introduced UTCDateAndTime, it was originally >> significantly faster than legacy Chronology because legacy had a gross >> inefficiency in it. You work exposed that inefficiency, which was >> then fixed, pretty much neutralizing the performance advantage of >> UTCDateAndTime, of that time. >> >> If you have made further improvements since then, I would be >> interested to see your benchmarks again. >> >> One thing I wondered was, due to greater SmallInteger range, whether >> your implementation would be significantly faster in 64-bit image. In >> 32-bit though, IIRC, it no longer is.. >> > > From Marcel.Taeumel at hpi.de Mon Mar 7 22:56:51 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Mar 7 23:24:35 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: References: Message-ID: <1457391411991-4883105.post@n4.nabble.com> Just one addtion: Backwards compatibility is a must-have here. :-) Best, Marcel -- View this message in context: http://forum.world.st/Preferences-revamp-tp4882849p4883105.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon Mar 7 22:59:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Mar 7 23:27:35 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> Message-ID: <1457391592456-4883106.post@n4.nabble.com> Well, if that selector is missing, a debugger will be shown. Then you can fix it. Where is the black magic or the potential pitfall for the future? Hmm... we might want to provide symbol search through objects. This particular symbol is hold in a preference instance in the instVar changeSelector. How can we detect that? Shouldn't be that hard... Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883106.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon Mar 7 23:13:10 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Mar 7 23:40:54 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457391592456-4883106.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> Message-ID: <1457392390950-4883109.post@n4.nabble.com> It's actuallly really simple: term := #swapMouseButtonsChanged. senders := OrderedCollection new. SystemNavigation default allObjectsDo: [:ea | 1 to: ea class instSize do: [:i | |val| val := ea instVarAt: i. val isSymbol ifTrue: [ val = term ifTrue: [senders add: ea]]]]. senders explore. On my laptop, it benches to '11.6 per second. 85.9 milliseconds per run.' Should we add this to trunk? We could filter out method additions or method references to produce cleaner results. The "Senders" shortcut might just spawn an additional explorer with the resulting objects. Fairly easy. Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883109.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Tue Mar 8 02:12:49 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 8 02:12:51 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457392390950-4883109.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> Message-ID: <20160308021249.GA58254@shell.msen.com> On Mon, Mar 07, 2016 at 03:13:10PM -0800, marcel.taeumel wrote: > It's actuallly really simple: > > term := #swapMouseButtonsChanged. > senders := OrderedCollection new. > > SystemNavigation default allObjectsDo: [:ea | > 1 to: ea class instSize do: [:i | |val| > val := ea instVarAt: i. > val isSymbol ifTrue: [ > val = term ifTrue: [senders add: ea]]]]. > > senders explore. > > On my laptop, it benches to '11.6 per second. 85.9 milliseconds per run.' > > Should we add this to trunk? We could filter out method additions or method > references to produce cleaner results. The "Senders" shortcut might just > spawn an additional explorer with the resulting objects. Fairly easy. > It seems to make sense for "senders select: [ :e | e species == Preference ]" and there is no performance problem. So I guess is OK as long as there is a good method comment to explain why we do this for the special case of senders that originate from instances of Preference. Dave From asqueaker at gmail.com Tue Mar 8 03:32:47 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 8 03:33:31 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457392390950-4883109.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> Message-ID: May we please evaluate that from Inbox for a couple of weeks before putting that into trunk? We've added a new language feature being used for almost nothing but Preferences, now we want to loosen the definition of Smalltalk "senders" for them too? I admit, your idea sounds interesting -- I, myself, pretty much only instantiate Symbols which are also method selectors. However, I think when we feel the need to change our tools for something that should be dead simple, maybe its the design trying to speak to us. Maybe its a good time to ask, "why are we doing this? is there a simpler way?" What I still don't understand is why we can't see the Preference's 'changeSelector' getting set to the value, #swapMouseButtonsChanged anywhere? Should't the initial instantiation of the Preference object require that as a parameter, and so then it should show up in senders, and it would make sense how it worked..?? :( On Mon, Mar 7, 2016 at 5:13 PM, marcel.taeumel wrote: > It's actuallly really simple: > > term := #swapMouseButtonsChanged. > senders := OrderedCollection new. > > SystemNavigation default allObjectsDo: [:ea | > 1 to: ea class instSize do: [:i | |val| > val := ea instVarAt: i. > val isSymbol ifTrue: [ > val = term ifTrue: [senders add: ea]]]]. > > senders explore. > > On my laptop, it benches to '11.6 per second. 85.9 milliseconds per run.' > > Should we add this to trunk? We could filter out method additions or method > references to produce cleaner results. The "Senders" shortcut might just > spawn an additional explorer with the resulting objects. Fairly easy. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883109.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From hannes.hirzel at gmail.com Tue Mar 8 07:06:03 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Tue Mar 8 07:06:05 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: <1457391411991-4883105.post@n4.nabble.com> References: <1457391411991-4883105.post@n4.nabble.com> Message-ID: +1 regarding point 9: should be possible . And http://wiki.squeak.org/squeak/518 "How to lockdown an image for release" should be reviewed / and if necessary updated. --Hannes On 3/7/16, marcel.taeumel wrote: > Just one addtion: Backwards compatibility is a must-have here. :-) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Preferences-revamp-tp4882849p4883105.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From karlramberg at gmail.com Tue Mar 8 07:44:27 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue Mar 8 07:44:30 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: References: <1457391411991-4883105.post@n4.nabble.com> Message-ID: I would really like to be able to manage my preferences with monticello versioning. It would be easier to keep images in sync and have other benefits. We could for for example have a source.squeak.org/preferences repository. Best, Karl On Tue, Mar 8, 2016 at 8:06 AM, H. Hirzel wrote: > +1 > > regarding point 9: should be possible . > > > And http://wiki.squeak.org/squeak/518 > > "How to lockdown an image for release" > > should be reviewed / and if necessary updated. > > --Hannes > > On 3/7/16, marcel.taeumel wrote: > > Just one addtion: Backwards compatibility is a must-have here. :-) > > > > Best, > > Marcel > > > > > > > > -- > > View this message in context: > > http://forum.world.st/Preferences-revamp-tp4882849p4883105.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/20160308/61ad5d55/attachment.htm From lecteur at zogotounga.net Tue Mar 8 11:06:12 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Mar 8 11:06:08 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457391592456-4883106.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> Message-ID: <56DEB224.6000109@zogotounga.net> > we might want to provide symbol search through objects. This particular > symbol is hold in a preference instance in the instVar changeSelector. Symbol search through objects may also be useful to find the selectors only used in MessageSends. In my code I use them all other the place (menus, buttons, pluggable behaviors) mostly in the form of LambdaMessageSend (http://www.zogotounga.net/comp/squeak/functionaltalk.htm). Stef From Marcel.Taeumel at hpi.de Tue Mar 8 13:58:30 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Mar 8 14:26:17 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <20160308021249.GA58254@shell.msen.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> Message-ID: <1457445510095-4883236.post@n4.nabble.com> Hi David, I think that any object is able to send #perform: based on some (other object's) state. From time to time, this is a convenient pattern. For example, take the Tool Builder resp. Pluggable Widgets approach. Many callbacks are stored in instances of Pluggable*Morph. If we want to expand senders search to the object level, we should respect all kinds of objects. A blacklist to rule out some false-positives, but no whitelist. 82ms is fast enough for invoking the senders search. Like "thorough senders", this should become a preference because we would need to spawn 2 windows in that case: one senders browser and one object explorer. Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883236.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Tue Mar 8 15:18:56 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue Mar 8 15:18:59 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457445510095-4883236.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> Message-ID: On Tue, Mar 8, 2016 at 2:58 PM, marcel.taeumel wrote: > Hi David, > > I think that any object is able to send #perform: based on some (other > object's) state. From time to time, this is a convenient pattern. For > example, take the Tool Builder resp. Pluggable Widgets approach. Many > callbacks are stored in instances of Pluggable*Morph. > > If we want to expand senders search to the object level, we should respect > all kinds of objects. A blacklist to rule out some false-positives, but no > whitelist. 82ms is fast enough for invoking the senders search. Like > "thorough senders", this should become a preference because we would need > to > spawn 2 windows in that case: one senders browser and one object explorer. > > Best, > Marcel > Sounds nice. Best, Karl > > > -- > View this message in context: > http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883236.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/20160308/657426f8/attachment.htm From lewis at mail.msen.com Tue Mar 8 17:39:17 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 8 17:39:23 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457445510095-4883236.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> Message-ID: <63943.136.2.1.104.1457458757.squirrel@webmail.msen.com> I don't think it would help with the preferences that we are discussing here, but as an aside I'll note that the "self flag: aSelector" hack is another way to make hidden senders visible. See for example Project>>#dispatchTo:addPrefixAndSend:withArguments: which uses this to prevent methods like #mvcStartUpLeftFlush and #morphicStartUpLeftFlush from appearing to be unsent messages. Dave > Hi David, > > I think that any object is able to send #perform: based on some (other > object's) state. From time to time, this is a convenient pattern. For > example, take the Tool Builder resp. Pluggable Widgets approach. Many > callbacks are stored in instances of Pluggable*Morph. > > If we want to expand senders search to the object level, we should respect > all kinds of objects. A blacklist to rule out some false-positives, but no > whitelist. 82ms is fast enough for invoking the senders search. Like > "thorough senders", this should become a preference because we would need > to > spawn 2 windows in that case: one senders browser and one object explorer. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883236.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From eliot.miranda at gmail.com Tue Mar 8 18:38:50 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 8 18:38:55 2016 Subject: [squeak-dev] Re: [Pharo-dev] strange array instance In-Reply-To: References: Message-ID: Hi Pavel, On Tue, Mar 8, 2016 at 1:40 AM, Pavel Krivanek wrote: > Hi, > > there is a strange array of size 1024 in the Pharo image that is not eaten > by garbage collector even if no object points to it. I guess it is related > to Spur. > > ((Array allInstances select: [ :i | i size = 1024 ]) > select: [ :a | a second = SmallInteger ]) pointersTo > > What is it and is it accessible somehow? > It is indeed the first class table page. It looks like an old bug. The oldest Spur image I can start up has the problem. The way that class table pages are hidden is that they have a class index which is not that of Array. Array is at index 52 in the class table (51 zero-relative, Array identityHash = 51), but it is also at index 17 (16 zero-relative). Array allInstances looks for objects whose class index is 51, hence not seeing the class table pages, which all (but the first) have class index 16. Luckily we can fix the problem easily, and we can fix another problem at the same time, which is that SmallFloat64 has the wrong hash. The class table is two-level; a (hidden) array of Arrays. Classes are in the class table at their identityHashes (so that to instantiate a class one copies the class's identity hash into the classIndex of the new instance instead of having to search the class table). But when SmallFloat64 was created in the 32-bit image I forgot to give it the right hash and store it in the class table. (there are no SmallFloat64 instances in a 32-bit image, only in 64-bits). So we can first change SmallFloat64's hash to 3, which is what the Spur 64-bit VM and image require, and enter it into the first class table page, and then we can make the first class table page disappear. | firstClassTablePage clone | "The first class table page is the first Array instance. Of course this is a bug." firstClassTablePage := Array someInstance. "It should contain only nil and classes." self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). "And its first 17 elements should only be the immediate classes and Array, since Array is used as the class pun for class table pages, with index 17 (16 zero-relative)" self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. "It just so happens that the second Array is the specialSelectors" self assert: Array someInstance nextInstance == Smalltalk specialSelectors. "Store SmallFloat64 in the first class table page at index 4 (3 zero-relative)." firstClassTablePage at: 4 put: SmallFloat64. "Use the secret set identity hash primitive to set SmallFloat64's identityHash to 3." SmallFloat64 tryPrimitive: 161 withArgs: #(3). "Now create an object that looks like Array class, but has identityHash 16." "Take a shallow copy of Array class." clone := Array shallowCopy. "Change it into an Array." Array adoptInstance: clone. "Set its identityHash to 16." clone tryPrimitive: 161 withArgs: #(16). "Use the adoptInstance: primitive to ``set the class of the firstClassTablePage to the cone''. or, more accurately, to set the firstClassTablePage's class index to 16." clone tryPrimitive: 160 withArgs: {firstClassTablePage} With the above done, we can check that everything is ok." self assert: SmallFloat64 identityHash = 3. self assert: Array someInstance == Smalltalk specialSelectors. "A class table page is 1024 slots, contains only nil or behaviours, and contains at least one behaviour (is not all nils). There shouldn't be any that we can find." self assert: (self systemNavigation allObjects select: [:o| o isArray and: [o size = 1024 and: [(o allSatisfy: [:e| e == nil or: [e isBehavior]]) and: [o anySatisfy: [:e| e isBehavior]]]]]) size = 0 I recommend you create an update map. Then create a version of kernel with a post-load action, written something like this: (Array someInstance size = 1014 and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) and: [(firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: [| firstClassTablePage clone | firstClassTablePage := Array someInstance. self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. firstClassTablePage at: 4 put: SmallFloat64. SmallFloat64 tryPrimitive: 161 withArgs: #(3). clone := Array shallowCopy. Array adoptInstance: clone. clone tryPrimitive: 161 withArgs: #(16). clone tryPrimitive: 160 withArgs: {Array someInstance} self assert: SmallFloat64 identityHash = 3. self assert: (Array someInstance first: 4) = {nil. SmallInteger. Character. SmallFloat64}] Then create a second update map to ensure that that version of Kernel is loaded. I will do this for Squeak immediately. Apologies. P.S. Interestingly enough, it shows what a horrible security hole the debugger primitives tryPrimitive:withArgs: and tryNamedPrimitive:withArgs: are. Cheers, > -- Pavel > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160308/cdb0d036/attachment.htm From Marcel.Taeumel at hpi.de Tue Mar 8 18:56:19 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Mar 8 19:24:08 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <63943.136.2.1.104.1457458757.squirrel@webmail.msen.com> References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <63943.136.2.1.104.1457458757.squirrel@webmail.msen.com> Message-ID: <1457463379462-4883303.post@n4.nabble.com> Hi David, you have a point there. However, this requires discipline. I am thinking about better tool support for code that might lack this kind of code-centered architecture. The Squeak image is full of objects and only part of it are code artifacts classes or methods. In the spirit of DataStream (ReferenceStream), serialized project files, or the *.image file itself, we need tools for working with objects that are not code. Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883303.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Tue Mar 8 19:30:40 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue Mar 8 19:30:43 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457463379462-4883303.post@n4.nabble.com> References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <63943.136.2.1.104.1457458757.squirrel@webmail.msen.com> <1457463379462-4883303.post@n4.nabble.com> Message-ID: On Tue, Mar 8, 2016 at 7:56 PM, marcel.taeumel wrote: > Hi David, > > you have a point there. However, this requires discipline. I am thinking > about better tool support for code that might lack this kind of > code-centered architecture. The Squeak image is full of objects and only > part of it are code artifacts classes or methods. In the spirit of > DataStream (ReferenceStream), serialized project files, or the *.image file > itself, we need tools for working with objects that are not code. > +1 Best, Karl > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883303.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/20160308/7e587f69/attachment.htm From commits at source.squeak.org Tue Mar 8 20:06:32 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 8 20:06:34 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.679.mcz ==================== Summary ==================== Name: Collections-ul.679 Author: ul Time: 8 March 2016, 5:24:30.010047 pm UUID: 9f4b6193-4632-48c7-a99f-ee37923bf28b Ancestors: Collections-eem.678 #occurrencesOf: revamp: - optimized Bag's implementation - added optimized versions to ArrayedCollection, String and ByteArray =============== Diff against Collections-eem.678 =============== Item was added: + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + tally := 0. + 1 to: self size do: [ :index | + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! Item was changed: ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." - occurrencesOf: anObject - "Refer to the comment in Collection|occurrencesOf:." + ^contents at: anObject ifAbsent: 0! - (self includes: anObject) - ifTrue: [^contents at: anObject] - ifFalse: [^0]! Item was added: + ----- Method: ByteArray>>occurrencesOf: (in category 'as yet unclassified') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + anObject isInteger ifFalse: [ ^0 ]. + anObject negative ifTrue: [ ^0 ]. + anObject > 255 ifTrue: [ ^0 ]. + tally := 0. + 1 to: self size do: [ :index | + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! Item was added: + ----- Method: String>>occurrencesOf: (in category 'testing') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + anObject isCharacter ifFalse: [ ^0 ]. + tally := 0. + 1 to: self size do: [ :index | + (self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! From nicolas.cellier.aka.nice at gmail.com Tue Mar 8 20:18:41 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Mar 8 20:18:45 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz In-Reply-To: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> References: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-03-08 21:06 GMT+01:00 : > Levente Uzonyi uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-ul.679.mcz > > ==================== Summary ==================== > > Name: Collections-ul.679 > Author: ul > Time: 8 March 2016, 5:24:30.010047 pm > UUID: 9f4b6193-4632-48c7-a99f-ee37923bf28b > Ancestors: Collections-eem.678 > > #occurrencesOf: revamp: > - optimized Bag's implementation > - added optimized versions to ArrayedCollection, String and ByteArray > > =============== Diff against Collections-eem.678 =============== > > Item was added: > + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') > ----- > + occurrencesOf: anObject > + "Answer how many of the receiver's elements are equal to anObject. > Optimized version." > + > + | tally | > + tally := 0. > + 1 to: self size do: [ :index | > + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] > ]. > + ^tally! > > Item was changed: > ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- > + occurrencesOf: anObject > + "Answer how many of the receiver's elements are equal to anObject. > Optimized version." > - occurrencesOf: anObject > - "Refer to the comment in Collection|occurrencesOf:." > > + ^contents at: anObject ifAbsent: 0! > - (self includes: anObject) > - ifTrue: [^contents at: anObject] > - ifFalse: [^0]! > > Item was added: > + ----- Method: ByteArray>>occurrencesOf: (in category 'as yet > unclassified') ----- > + occurrencesOf: anObject > + "Answer how many of the receiver's elements are equal to anObject. > Optimized version." > + > + | tally | > + anObject isInteger ifFalse: [ ^0 ]. > + anObject negative ifTrue: [ ^0 ]. > + anObject > 255 ifTrue: [ ^0 ]. > + tally := 0. > + 1 to: self size do: [ :index | > + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] > ]. > + ^tally! > > Item was added: > + ----- Method: String>>occurrencesOf: (in category 'testing') ----- > + occurrencesOf: anObject > + "Answer how many of the receiver's elements are equal to anObject. > Optimized version." > + > + | tally | > + anObject isCharacter ifFalse: [ ^0 ]. > + tally := 0. > + 1 to: self size do: [ :index | > + (self at: index) == anObject ifTrue: [ tally := tally + 1 > ] ]. > + ^tally! > it could have been + anObject isCharacter ifFalse: [ ^0 ]. + ^super occurrencesOf: anObject and/or in ByteString + anObject isCharacter ifFalse: [ ^0 ]. + anObject asInteger < 255 ifFalse: [ ^0 ]. snip... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160308/2e68017f/attachment.htm From nicolas.cellier.aka.nice at gmail.com Tue Mar 8 20:21:24 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Mar 8 20:21:26 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz In-Reply-To: References: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-03-08 21:18 GMT+01:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > > 2016-03-08 21:06 GMT+01:00 : > >> Levente Uzonyi uploaded a new version of Collections to project The Trunk: >> http://source.squeak.org/trunk/Collections-ul.679.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-ul.679 >> Author: ul >> Time: 8 March 2016, 5:24:30.010047 pm >> UUID: 9f4b6193-4632-48c7-a99f-ee37923bf28b >> Ancestors: Collections-eem.678 >> >> #occurrencesOf: revamp: >> - optimized Bag's implementation >> - added optimized versions to ArrayedCollection, String and ByteArray >> >> =============== Diff against Collections-eem.678 =============== >> >> Item was added: >> + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') >> ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to >> anObject. Optimized version." >> + >> + | tally | >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) = anObject ifTrue: [ tally := tally + 1 >> ] ]. >> + ^tally! >> >> Item was changed: >> ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to >> anObject. Optimized version." >> - occurrencesOf: anObject >> - "Refer to the comment in Collection|occurrencesOf:." >> >> + ^contents at: anObject ifAbsent: 0! >> - (self includes: anObject) >> - ifTrue: [^contents at: anObject] >> - ifFalse: [^0]! >> >> Item was added: >> + ----- Method: ByteArray>>occurrencesOf: (in category 'as yet >> unclassified') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to >> anObject. Optimized version." >> + >> + | tally | >> + anObject isInteger ifFalse: [ ^0 ]. >> + anObject negative ifTrue: [ ^0 ]. >> + anObject > 255 ifTrue: [ ^0 ]. >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) = anObject ifTrue: [ tally := tally + 1 >> ] ]. >> + ^tally! >> >> Item was added: >> + ----- Method: String>>occurrencesOf: (in category 'testing') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to >> anObject. Optimized version." >> + >> + | tally | >> + anObject isCharacter ifFalse: [ ^0 ]. >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) == anObject ifTrue: [ tally := tally + 1 >> ] ]. >> + ^tally! >> > > it could have been > > + anObject isCharacter ifFalse: [ ^0 ]. > + ^super occurrencesOf: anObject > > and/or in ByteString > + anObject isCharacter ifFalse: [ ^0 ]. > + anObject asInteger < 255 ifFalse: [ ^0 ]. > snip... > > Hem + anObject asInteger <= 255 ifFalse: [ ^0 ]. or + anObject asInteger < 256 ifFalse: [ ^0 ]. or + anObject asInteger > 255 ifTrue: [ ^0 ]. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160308/384a752c/attachment.htm From lewis at mail.msen.com Tue Mar 8 20:32:53 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 8 20:32:54 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <63943.136.2.1.104.1457458757.squirrel@webmail.msen.com> <1457463379462-4883303.post@n4.nabble.com> Message-ID: <38771.136.2.1.102.1457469173.squirrel@webmail.msen.com> I agree. The "self flag" hack works in the case of the method dispatcher for Project because new methods will rarely be added, and then only by a small number of people who would already be familiar with the mechanism. But expecting it to work in a more general case is not realistic. Besides, if we had a disciplined process for managing preferences, we would not have all those preferences in the first place ;-) Dave > On Tue, Mar 8, 2016 at 7:56 PM, marcel.taeumel > wrote: > >> Hi David, >> >> you have a point there. However, this requires discipline. I am thinking >> about better tool support for code that might lack this kind of >> code-centered architecture. The Squeak image is full of objects and only >> part of it are code artifacts classes or methods. In the spirit of >> DataStream (ReferenceStream), serialized project files, or the *.image >> file >> itself, we need tools for working with objects that are not code. >> > > +1 > > Best, > Karl > >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883303.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > From commits at source.squeak.org Tue Mar 8 20:54:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 8 20:54:17 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1005.mcz ==================== Summary ==================== Name: Kernel-eem.1005 Author: eem Time: 8 March 2016, 12:52:58.152073 pm UUID: b570ba5a-517f-4ac1-8bae-f328843a7cff Ancestors: Kernel-bf.1004 Add a preamble script to make sure that a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. Check the above has happened in the postscript. ==== ERROR === Error: Unrecognized class definition 8 March 2016 8:54:15.015 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 MCStReader(Object)>>error: Receiver: a MCStReader Arguments and temporary variables: aString: 'Unrecognized class definition' Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... MCStReader>>typeOfSubclass: Receiver: a MCStReader Arguments and temporary variables: aSymbol: #immediateSubclass: Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... MCStReader>>classDefinitionFrom: Receiver: a MCStReader Arguments and temporary variables: aPseudoClass: a PseudoClass(#SmallFloat64) tokens: #(#Float #immediateSubclass: #SmallFloat64 #instanceVariableNames: '' #...etc... traitCompositionString: '{}' lastIndex: 11 classTraitCompositionString: '{}' Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... [] in MCStReader>>loadDefinitions Receiver: a MCStReader Arguments and temporary variables: filePackage: a PseudoClass(#SmallFloat64) pseudoClass: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... --- The full stack --- MCStReader(Object)>>error: MCStReader>>typeOfSubclass: MCStReader>>classDefinitionFrom: [] in MCStReader>>loadDefinitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in Dictionary>>valuesDo: Dictionary>>associationsDo: Dictionary>>valuesDo: Dictionary>>do: MCStReader>>loadDefinitions MCStReader(MCSnapshotReader)>>definitions [] in MCMczReader>>extractDefinitionsFrom: MCStReader class(Object)>>ifNotNilDo: MCMczReader>>extractDefinitionsFrom: [] in MCMczReader>>loadDefinitions OrderedCollection>>do: MCMczReader>>loadDefinitions MCMczReader(MCVersionReader)>>definitions MCMczReader(MCVersionReader)>>snapshot [] 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 eliot.miranda at gmail.com Tue Mar 8 21:06:33 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 8 21:06:36 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: <56df3bfc.a52b370a.3e1a2.731cSMTPIN_ADDED_MISSING@mx.google.com> References: <56df3bfc.a52b370a.3e1a2.731cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: F**k. I have broken things. I realise now that the preamble script is run before loading, but is /not/ run when simply updating. So the scrupt that does the surgery needs to be in the postload. I'll fix this asap. On Tue, Mar 8, 2016 at 12:53 PM, wrote: > Eliot Miranda uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-eem.1005.mcz > > ==================== Summary ==================== > > Name: Kernel-eem.1005 > Author: eem > Time: 8 March 2016, 12:52:58.152073 pm > UUID: b570ba5a-517f-4ac1-8bae-f328843a7cff > Ancestors: Kernel-bf.1004 > > Add a preamble script to make sure that > a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, > zero-relative) slot of the first class table page, and > b) that the first class table page is hidden by ensuring its class index > is 16, the Array class index pun. > > Check the above has happened in the postscript. > > ==== ERROR === > > Error: Unrecognized class definition > > 8 March 2016 8:54:15.015 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 > > MCStReader(Object)>>error: > Receiver: a MCStReader > Arguments and temporary variables: > aString: 'Unrecognized class definition' > Receiver's instance variables: > stream: a ReadStream > definitions: an OrderedCollection(a > MCClassDefinition(Integer) a MCMethodDefini...etc... > > MCStReader>>typeOfSubclass: > Receiver: a MCStReader > Arguments and temporary variables: > aSymbol: #immediateSubclass: > Receiver's instance variables: > stream: a ReadStream > definitions: an OrderedCollection(a > MCClassDefinition(Integer) a MCMethodDefini...etc... > > MCStReader>>classDefinitionFrom: > Receiver: a MCStReader > Arguments and temporary variables: > aPseudoClass: a PseudoClass(#SmallFloat64) > tokens: #(#Float #immediateSubclass: #SmallFloat64 > #instanceVariableNames: '' #...etc... > traitCompositionString: '{}' > lastIndex: 11 > classTraitCompositionString: '{}' > Receiver's instance variables: > stream: a ReadStream > definitions: an OrderedCollection(a > MCClassDefinition(Integer) a MCMethodDefini...etc... > > [] in MCStReader>>loadDefinitions > Receiver: a MCStReader > Arguments and temporary variables: > filePackage: a PseudoClass(#SmallFloat64) > pseudoClass: an OrderedCollection(a > MCClassDefinition(Integer) a MCMethodDefini...etc... > Receiver's instance variables: > stream: a ReadStream > definitions: an OrderedCollection(a > MCClassDefinition(Integer) a MCMethodDefini...etc... > > > --- The full stack --- > MCStReader(Object)>>error: > MCStReader>>typeOfSubclass: > MCStReader>>classDefinitionFrom: > [] in MCStReader>>loadDefinitions > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > [] in Dictionary>>valuesDo: > Dictionary>>associationsDo: > Dictionary>>valuesDo: > Dictionary>>do: > MCStReader>>loadDefinitions > MCStReader(MCSnapshotReader)>>definitions > [] in MCMczReader>>extractDefinitionsFrom: > MCStReader class(Object)>>ifNotNilDo: > MCMczReader>>extractDefinitionsFrom: > [] in MCMczReader>>loadDefinitions > OrderedCollection>>do: > MCMczReader>>loadDefinitions > MCMczReader(MCVersionReader)>>definitions > MCMczReader(MCVersionReader)>>snapshot > [] 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 > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160308/dfc67e48/attachment.htm From commits at source.squeak.org Tue Mar 8 21:17:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 8 21:17:34 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1005.mcz ==================== Summary ==================== Name: Kernel-eem.1005 Author: eem Time: 8 March 2016, 1:16:26.313983 pm UUID: e11ad532-fefb-4f2e-836a-dc40b7d93447 Ancestors: Kernel-bf.1004 Add a script to make sure that a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. =============== Diff against Kernel-bf.1004 =============== Item was removed: - (PackageInfo named: 'Kernel') preamble: '((Mutex allInstances allSatisfy: [:m| (m instVarNamed: ''owner'') isNil]) - and: [Monitor allInstances allSatisfy: [:m| (m instVarNamed: ''ownerProcess'') isNil]]) ifFalse: - [self error: ''Some Mutexes and/or Monitors are owned. Cannot safely mutate. ABort load and resolve this before loading for safety.'']'! Item was changed: + (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package" + + "Make sure that + a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and + b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun." + (Array someInstance size = 1024 + and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) + and: [(Array someInstance first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: + [| firstClassTablePage clone | + firstClassTablePage := Array someInstance. + self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). + self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. + firstClassTablePage at: 4 put: SmallFloat64. + SmallFloat64 tryPrimitive: 161 withArgs: #(3). + clone := Array shallowCopy. + Array adoptInstance: clone. + clone tryPrimitive: 161 withArgs: #(16). + clone tryPrimitive: 160 withArgs: {firstClassTablePage}. + self assert: SmallFloat64 identityHash = 3. + self assert: (firstClassTablePage first: 4) = {nil. SmallInteger. Character. SmallFloat64}]'! - (PackageInfo named: 'Kernel') postscript: 'Smalltalk removeFromStartUpList: DateAndTime.'! From leves at caesar.elte.hu Tue Mar 8 21:21:28 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Mar 8 21:21:33 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz In-Reply-To: References: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On Tue, 8 Mar 2016, Nicolas Cellier wrote: > > > 2016-03-08 21:18 GMT+01:00 Nicolas Cellier : > > > 2016-03-08 21:06 GMT+01:00 : > Levente Uzonyi uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-ul.679.mcz > > ==================== Summary ==================== > > Name: Collections-ul.679 > Author: ul > Time: 8 March 2016, 5:24:30.010047 pm > UUID: 9f4b6193-4632-48c7-a99f-ee37923bf28b > Ancestors: Collections-eem.678 > > #occurrencesOf: revamp: > - optimized Bag's implementation > - added optimized versions to ArrayedCollection, String and ByteArray > > =============== Diff against Collections-eem.678 =============== > > Item was added: > + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') ----- > + occurrencesOf: anObject > +? ? ? ?"Answer how many of the receiver's elements are equal to anObject. Optimized version." > + > +? ? ? ?| tally | > +? ? ? ?tally := 0. > +? ? ? ?1 to: self size do: [ :index | > +? ? ? ? ? ? ? ?(self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. > +? ? ? ?^tally! > > Item was changed: > ? ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- > + occurrencesOf: anObject > +? ? ? ?"Answer how many of the receiver's elements are equal to anObject. Optimized version." > - occurrencesOf: anObject > -? ? ? ?"Refer to the comment in Collection|occurrencesOf:." > > +? ? ? ?^contents at: anObject ifAbsent: 0! > -? ? ? ?(self includes: anObject) > -? ? ? ? ? ? ? ?ifTrue: [^contents at: anObject] > -? ? ? ? ? ? ? ?ifFalse: [^0]! > > Item was added: > + ----- Method: ByteArray>>occurrencesOf: (in category 'as yet unclassified') ----- > + occurrencesOf: anObject > +? ? ? ?"Answer how many of the receiver's elements are equal to anObject. Optimized version." > + > +? ? ? ?| tally | > +? ? ? ?anObject isInteger ifFalse: [ ^0 ]. > +? ? ? ?anObject negative ifTrue: [ ^0 ]. > +? ? ? ?anObject > 255 ifTrue: [ ^0 ]. > +? ? ? ?tally := 0. > +? ? ? ?1 to: self size do: [ :index | > +? ? ? ? ? ? ? ?(self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. > +? ? ? ?^tally! > > Item was added: > + ----- Method: String>>occurrencesOf: (in category 'testing') ----- > + occurrencesOf: anObject > +? ? ? ?"Answer how many of the receiver's elements are equal to anObject. Optimized version." > + > +? ? ? ?| tally | > +? ? ? ?anObject isCharacter ifFalse: [ ^0 ]. > +? ? ? ?tally := 0. > +? ? ? ?1 to: self size do: [ :index | > +? ? ? ? ? ? ? ?(self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. > +? ? ? ?^tally! > > > it could have been > > +? ? ? ?anObject isCharacter ifFalse: [ ^0 ]. > +? ? ?? ^super occurrencesOf: anObject But this way we save a message send, and (ab)use the fact that #== is faster than #= and is still correct (in Spur). :) > > and/or in ByteString > +? ? ? ?anObject isCharacter ifFalse: [ ^0 ]. > +? ? ? ?anObject asInteger < 255 ifFalse: [ ^0 ]. > ???????? snip... > > Hem > > +? ? ? ?anObject asInteger <= 255 ifFalse: [ ^0 ]. > or > +? ? ? ?anObject asInteger < 256 ifFalse: [ ^0 ]. > or > +? ? ? ?anObject asInteger > 255 ifTrue: [ ^0 ]. Right, but then you'd feel like adding it to ByteSymbol as well. Levente > > > From eliot.miranda at gmail.com Tue Mar 8 21:25:35 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 8 21:25:38 2016 Subject: [squeak-dev] Re: [Pharo-dev] strange array instance In-Reply-To: References: Message-ID: Hi Pavel, here's the debugged script that works in Squeak. It needs to be the *postload* script. I didn't realise but the preamble script is only run before a package is loaded, and is /not/ run before a package is updated. "below, add code to be run after the loading of this package" "Make sure that a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun." (Array someInstance size = 1024 and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) and: [(Array someInstance first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: [| firstClassTablePage clone | firstClassTablePage := Array someInstance. self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. firstClassTablePage at: 4 put: SmallFloat64. SmallFloat64 tryPrimitive: 161 withArgs: #(3). clone := Array shallowCopy. Array adoptInstance: clone. clone tryPrimitive: 161 withArgs: #(16). clone tryPrimitive: 160 withArgs: {firstClassTablePage}. self assert: SmallFloat64 identityHash = 3. self assert: (firstClassTablePage first: 4) = {nil. SmallInteger. Character. SmallFloat64}] On Tue, Mar 8, 2016 at 10:38 AM, Eliot Miranda wrote: > Hi Pavel, > > On Tue, Mar 8, 2016 at 1:40 AM, Pavel Krivanek > wrote: > >> Hi, >> >> there is a strange array of size 1024 in the Pharo image that is not >> eaten by garbage collector even if no object points to it. I guess it is >> related to Spur. >> >> ((Array allInstances select: [ :i | i size = 1024 ]) >> select: [ :a | a second = SmallInteger ]) pointersTo >> >> What is it and is it accessible somehow? >> > > It is indeed the first class table page. It looks like an old bug. The > oldest Spur image I can start up has the problem. The way that class > table pages are hidden is that they have a class index which is not that of > Array. Array is at index 52 in the class table (51 zero-relative, Array > identityHash = 51), but it is also at index 17 (16 zero-relative). Array > allInstances looks for objects whose class index is 51, hence not seeing > the class table pages, which all (but the first) have class index 16. > > Luckily we can fix the problem easily, and we can fix another problem at > the same time, which is that SmallFloat64 has the wrong hash. > > The class table is two-level; a (hidden) array of Arrays. Classes are in > the class table at their identityHashes (so that to instantiate a class one > copies the class's identity hash into the classIndex of the new instance > instead of having to search the class table). But when SmallFloat64 was > created in the 32-bit image I forgot to give it the right hash and store it > in the class table. (there are no SmallFloat64 instances in a 32-bit > image, only in 64-bits). > > So we can first change SmallFloat64's hash to 3, which is what the Spur > 64-bit VM and image require, and enter it into the first class table page, > and then we can make the first class table page disappear. > > > | firstClassTablePage clone | > "The first class table page is the first Array instance. Of course this is > a bug." > firstClassTablePage := Array someInstance. > > "It should contain only nil and classes." > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e > isBehavior]]). > > "And its first 17 elements should only be the immediate classes and Array, > since Array is used as the class pun for class table pages, with index 17 > (16 zero-relative)" > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet. > > "It just so happens that the second Array is the specialSelectors" > self assert: Array someInstance nextInstance == Smalltalk specialSelectors. > > "Store SmallFloat64 in the first class table page at index 4 (3 > zero-relative)." > firstClassTablePage at: 4 put: SmallFloat64. > > "Use the secret set identity hash primitive to set SmallFloat64's > identityHash to 3." > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > > "Now create an object that looks like Array class, but has identityHash > 16." > "Take a shallow copy of Array class." > clone := Array shallowCopy. > "Change it into an Array." > Array adoptInstance: clone. > "Set its identityHash to 16." > clone tryPrimitive: 161 withArgs: #(16). > "Use the adoptInstance: primitive to ``set the class of the > firstClassTablePage to the cone''. > or, more accurately, to set the firstClassTablePage's class index to 16." > clone tryPrimitive: 160 withArgs: {firstClassTablePage} > > > With the above done, we can check that everything is ok." > self assert: SmallFloat64 identityHash = 3. > self assert: Array someInstance == Smalltalk specialSelectors. > "A class table page is 1024 slots, contains only nil or behaviours, and > contains at least one behaviour (is not all nils). There shouldn't be any > that we can find." > self assert: (self systemNavigation allObjects select: [:o| o isArray and: > [o size = 1024 and: [(o allSatisfy: [:e| e == nil or: [e isBehavior]]) and: > [o anySatisfy: [:e| e isBehavior]]]]]) size = 0 > > > I recommend you create an update map. Then create a version of kernel > with a post-load action, written something like this: > > > (Array someInstance size = 1014 > and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) > and: [(firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet]]) ifTrue: > [| firstClassTablePage clone | > firstClassTablePage := Array someInstance. > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e > isBehavior]]). > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet. > firstClassTablePage at: 4 put: SmallFloat64. > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > clone := Array shallowCopy. > Array adoptInstance: clone. > clone tryPrimitive: 161 withArgs: #(16). > clone tryPrimitive: 160 withArgs: {Array someInstance} > self assert: SmallFloat64 identityHash = 3. > self assert: (Array someInstance first: 4) = {nil. SmallInteger. > Character. SmallFloat64}] > > Then create a second update map to ensure that that version of Kernel is > loaded. > > I will do this for Squeak immediately. > > > Apologies. > > P.S. Interestingly enough, it shows what a horrible security hole the > debugger primitives tryPrimitive:withArgs: and tryNamedPrimitive:withArgs: > are. > > Cheers, >> -- Pavel >> > > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160308/89d05884/attachment-0001.htm From commits at source.squeak.org Tue Mar 8 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 8 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160308225502.15007.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-March/009482.html Name: Collections-ul.679 Ancestors: Collections-eem.678 #occurrencesOf: revamp: - optimized Bag's implementation - added optimized versions to ArrayedCollection, String and ByteArray ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009483.html Name: Kernel-eem.1005 Ancestors: Kernel-bf.1004 Add a preamble script to make sure that a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. Check the above has happened in the postscript. ==== ERROR === Error: Unrecognized class definition 8 March 2016 8:54:15.015 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 MCStReader(Object)>>error: Receiver: a MCStReader Arguments and temporary variables: aString: 'Unrecognized class definition' Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... MCStReader>>typeOfSubclass: Receiver: a MCStReader Arguments and temporary variables: aSymbol: #immediateSubclass: Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... MCStReader>>classDefinitionFrom: Receiver: a MCStReader Arguments and temporary variables: aPseudoClass: a PseudoClass(#SmallFloat64) tokens: #(#Float #immediateSubclass: #SmallFloat64 #instanceVariableNames: '' #...etc... traitCompositionString: '{}' lastIndex: 11 classTraitCompositionString: '{}' Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... [] in MCStReader>>loadDefinitions Receiver: a MCStReader Arguments and temporary variables: filePackage: a PseudoClass(#SmallFloat64) pseudoClass: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... Receiver's instance variables: stream: a ReadStream definitions: an OrderedCollection(a MCClassDefinition(Integer) a MCMethodDefini...etc... --- The full stack --- MCStReader(Object)>>error: MCStReader>>typeOfSubclass: MCStReader>>classDefinitionFrom: [] in MCStReader>>loadDefinitions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in Dictionary>>valuesDo: Dictionary>>associationsDo: Dictionary>>valuesDo: Dictionary>>do: MCStReader>>loadDefinitions MCStReader(MCSnapshotReader)>>definitions [] in MCMczReader>>extractDefinitionsFrom: MCStReader class(Object)>>ifNotNilDo: MCMczReader>>extractDefinitionsFrom: [] in MCMczReader>>loadDefinitions OrderedCollection>>do: MCMczReader>>loadDefinitions MCMczReader(MCVersionReader)>>definitions MCMczReader(MCVersionReader)>>snapshot [] 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 Previous message: [Pkg] The Trunk: Collections-ul.679.mcz Next message: [Pkg] The Trunk: Kernel-eem.1005.mcz Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the Packages mailing list ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009484.html Name: Kernel-eem.1005 Ancestors: Kernel-bf.1004 Add a script to make sure that a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. ============================================= From rpboland at gmail.com Wed Mar 9 04:20:19 2016 From: rpboland at gmail.com (Ralph Boland) Date: Wed Mar 9 04:20:21 2016 Subject: [squeak-dev] input from mouse and keyboard Message-ID: In a real time game I am creating I need to be able to get input from both the keyboard and the mouse (by player pressing buttons displayed on the screen). The game requires immediate responses to both. If the user provides no input the game continues and actions occur (eventually killing the player). For the keyboard input I seem to be need to be in some kind of loop: 1) sleep for some small amount of time; if during the sleep some keyboard input arrives respond to the input and then goto 1. 2) Since there has been no keyboard input take any necessary game actions and then goto 1. If a button is pressed then take necessary game actions and then ensure that the above loop is at the beginning of the sleep. IS THERE ANY SAMPLES OF CODE SOMEWHERE THAT DOES THIS KIND OF THING? I could figure this out eventually but it will take a while and I will probably do a poor implementation. Note: There are many slow points in the game where a forced garbage collection can be performed so garbage collection delays should not be problem. Thanks Ralph Boland From eliot.miranda at gmail.com Wed Mar 9 09:26:26 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 9 09:26:31 2016 Subject: [squeak-dev] Re: [Pharo-dev] strange array instance In-Reply-To: References: Message-ID: Um, under /no/ circumstances do what I'm suggesting below. It will screw up 320bit images completely. I've just turned odd SmallIntegers into SmallFloat54's in 32-bit Squeak. I hope I won't destroy too many people's images. This is perhaps my worst blunder. On Tue, Mar 8, 2016 at 10:38 AM, Eliot Miranda wrote: > Hi Pavel, > > On Tue, Mar 8, 2016 at 1:40 AM, Pavel Krivanek > wrote: > >> Hi, >> >> there is a strange array of size 1024 in the Pharo image that is not >> eaten by garbage collector even if no object points to it. I guess it is >> related to Spur. >> >> ((Array allInstances select: [ :i | i size = 1024 ]) >> select: [ :a | a second = SmallInteger ]) pointersTo >> >> What is it and is it accessible somehow? >> > > It is indeed the first class table page. It looks like an old bug. The > oldest Spur image I can start up has the problem. The way that class > table pages are hidden is that they have a class index which is not that of > Array. Array is at index 52 in the class table (51 zero-relative, Array > identityHash = 51), but it is also at index 17 (16 zero-relative). Array > allInstances looks for objects whose class index is 51, hence not seeing > the class table pages, which all (but the first) have class index 16. > > Luckily we can fix the problem easily, and we can fix another problem at > the same time, which is that SmallFloat64 has the wrong hash. > > The class table is two-level; a (hidden) array of Arrays. Classes are in > the class table at their identityHashes (so that to instantiate a class one > copies the class's identity hash into the classIndex of the new instance > instead of having to search the class table). But when SmallFloat64 was > created in the 32-bit image I forgot to give it the right hash and store it > in the class table. (there are no SmallFloat64 instances in a 32-bit > image, only in 64-bits). > > So we can first change SmallFloat64's hash to 3, which is what the Spur > 64-bit VM and image require, and enter it into the first class table page, > and then we can make the first class table page disappear. > > > | firstClassTablePage clone | > "The first class table page is the first Array instance. Of course this is > a bug." > firstClassTablePage := Array someInstance. > > "It should contain only nil and classes." > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e > isBehavior]]). > > "And its first 17 elements should only be the immediate classes and Array, > since Array is used as the class pun for class table pages, with index 17 > (16 zero-relative)" > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet. > > "It just so happens that the second Array is the specialSelectors" > self assert: Array someInstance nextInstance == Smalltalk specialSelectors. > > "Store SmallFloat64 in the first class table page at index 4 (3 > zero-relative)." > firstClassTablePage at: 4 put: SmallFloat64. > > "Use the secret set identity hash primitive to set SmallFloat64's > identityHash to 3." > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > > "Now create an object that looks like Array class, but has identityHash > 16." > "Take a shallow copy of Array class." > clone := Array shallowCopy. > "Change it into an Array." > Array adoptInstance: clone. > "Set its identityHash to 16." > clone tryPrimitive: 161 withArgs: #(16). > "Use the adoptInstance: primitive to ``set the class of the > firstClassTablePage to the cone''. > or, more accurately, to set the firstClassTablePage's class index to 16." > clone tryPrimitive: 160 withArgs: {firstClassTablePage} > > > With the above done, we can check that everything is ok." > self assert: SmallFloat64 identityHash = 3. > self assert: Array someInstance == Smalltalk specialSelectors. > "A class table page is 1024 slots, contains only nil or behaviours, and > contains at least one behaviour (is not all nils). There shouldn't be any > that we can find." > self assert: (self systemNavigation allObjects select: [:o| o isArray and: > [o size = 1024 and: [(o allSatisfy: [:e| e == nil or: [e isBehavior]]) and: > [o anySatisfy: [:e| e isBehavior]]]]]) size = 0 > > > I recommend you create an update map. Then create a version of kernel > with a post-load action, written something like this: > > > (Array someInstance size = 1014 > and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) > and: [(firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet]]) ifTrue: > [| firstClassTablePage clone | > firstClassTablePage := Array someInstance. > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e > isBehavior]]). > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. > Character. Array} asSet. > firstClassTablePage at: 4 put: SmallFloat64. > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > clone := Array shallowCopy. > Array adoptInstance: clone. > clone tryPrimitive: 161 withArgs: #(16). > clone tryPrimitive: 160 withArgs: {Array someInstance} > self assert: SmallFloat64 identityHash = 3. > self assert: (Array someInstance first: 4) = {nil. SmallInteger. > Character. SmallFloat64}] > > Then create a second update map to ensure that that version of Kernel is > loaded. > > I will do this for Squeak immediately. > > > Apologies. > > P.S. Interestingly enough, it shows what a horrible security hole the > debugger primitives tryPrimitive:withArgs: and tryNamedPrimitive:withArgs: > are. > > Cheers, >> -- Pavel >> > > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/cd682d35/attachment.htm From eliot.miranda at gmail.com Wed Mar 9 10:05:27 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 9 10:05:36 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: <56df4172.0d4a370a.ade2d.ffffb15dSMTPIN_ADDED_MISSING@mx.google.com> References: <56df4172.0d4a370a.ade2d.ffffb15dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi All, a grovelling apology. I have committed a serious blunder in Kernel-eem.1005.mcz. Rather than potentially corrupt images (although this is unlikely) I have chosen to delete Kernel-eem.1005.mcz. This will break updates until I commit a corrected version. But it's too late at night here for me to fix it now. I'll fix it asap tomorrow am. I could do with a good nights sleep ;-) _,,,^..^,,,_ (phone) > On Mar 8, 2016, at 7:19 PM, commits@source.squeak.org wrote: > > Eliot Miranda uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-eem.1005.mcz > > ==================== Summary ==================== > > Name: Kernel-eem.1005 > Author: eem > Time: 8 March 2016, 1:16:26.313983 pm > UUID: e11ad532-fefb-4f2e-836a-dc40b7d93447 > Ancestors: Kernel-bf.1004 > > Add a script to make sure that > a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and > b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. > > =============== Diff against Kernel-bf.1004 =============== > > Item was removed: > - (PackageInfo named: 'Kernel') preamble: '((Mutex allInstances allSatisfy: [:m| (m instVarNamed: ''owner'') isNil]) > - and: [Monitor allInstances allSatisfy: [:m| (m instVarNamed: ''ownerProcess'') isNil]]) ifFalse: > - [self error: ''Some Mutexes and/or Monitors are owned. Cannot safely mutate. ABort load and resolve this before loading for safety.'']'! > > Item was changed: > + (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package" > + > + "Make sure that > + a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and > + b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun." > + (Array someInstance size = 1024 > + and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) > + and: [(Array someInstance first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: > + [| firstClassTablePage clone | > + firstClassTablePage := Array someInstance. > + self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). > + self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. > + firstClassTablePage at: 4 put: SmallFloat64. > + SmallFloat64 tryPrimitive: 161 withArgs: #(3). > + clone := Array shallowCopy. > + Array adoptInstance: clone. > + clone tryPrimitive: 161 withArgs: #(16). > + clone tryPrimitive: 160 withArgs: {firstClassTablePage}. > + self assert: SmallFloat64 identityHash = 3. > + self assert: (firstClassTablePage first: 4) = {nil. SmallInteger. Character. SmallFloat64}]'! > - (PackageInfo named: 'Kernel') postscript: 'Smalltalk removeFromStartUpList: DateAndTime.'! > > From stephane.ducasse at inria.fr Wed Mar 9 11:08:27 2016 From: stephane.ducasse at inria.fr (=?utf-8?Q?St=C3=A9phane_Ducasse?=) Date: Wed Mar 9 11:08:32 2016 Subject: [squeak-dev] Re: [Vm-dev] [Pharo-dev] strange array instance In-Reply-To: References: Message-ID: <9F5F8AE2-C8F3-45DF-8C05-653B68FB720B@inria.fr> Hi eliot Do not worry. Now would it be possible to have a test or something like that that would help us to - document this part of the system - check that the system is in a coherent state Stef > On 09 Mar 2016, at 10:26, Eliot Miranda wrote: > > Um, under /no/ circumstances do what I'm suggesting below. It will screw up 320bit images completely. I've just turned odd SmallIntegers into SmallFloat54's in 32-bit Squeak. I hope I won't destroy too many people's images. This is perhaps my worst blunder. > > On Tue, Mar 8, 2016 at 10:38 AM, Eliot Miranda > wrote: > Hi Pavel, > > On Tue, Mar 8, 2016 at 1:40 AM, Pavel Krivanek > wrote: > Hi, > > there is a strange array of size 1024 in the Pharo image that is not eaten by garbage collector even if no object points to it. I guess it is related to Spur. > > ((Array allInstances select: [ :i | i size = 1024 ]) > select: [ :a | a second = SmallInteger ]) pointersTo > > What is it and is it accessible somehow? > > It is indeed the first class table page. It looks like an old bug. The oldest Spur image I can start up has the problem. The way that class table pages are hidden is that they have a class index which is not that of Array. Array is at index 52 in the class table (51 zero-relative, Array identityHash = 51), but it is also at index 17 (16 zero-relative). Array allInstances looks for objects whose class index is 51, hence not seeing the class table pages, which all (but the first) have class index 16. > > Luckily we can fix the problem easily, and we can fix another problem at the same time, which is that SmallFloat64 has the wrong hash. > > The class table is two-level; a (hidden) array of Arrays. Classes are in the class table at their identityHashes (so that to instantiate a class one copies the class's identity hash into the classIndex of the new instance instead of having to search the class table). But when SmallFloat64 was created in the 32-bit image I forgot to give it the right hash and store it in the class table. (there are no SmallFloat64 instances in a 32-bit image, only in 64-bits). > > So we can first change SmallFloat64's hash to 3, which is what the Spur 64-bit VM and image require, and enter it into the first class table page, and then we can make the first class table page disappear. > > > | firstClassTablePage clone | > "The first class table page is the first Array instance. Of course this is a bug." > firstClassTablePage := Array someInstance. > > "It should contain only nil and classes." > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). > > "And its first 17 elements should only be the immediate classes and Array, since Array is used as the class pun for class table pages, with index 17 (16 zero-relative)" > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. > > "It just so happens that the second Array is the specialSelectors" > self assert: Array someInstance nextInstance == Smalltalk specialSelectors. > > "Store SmallFloat64 in the first class table page at index 4 (3 zero-relative)." > firstClassTablePage at: 4 put: SmallFloat64. > > "Use the secret set identity hash primitive to set SmallFloat64's identityHash to 3." > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > > "Now create an object that looks like Array class, but has identityHash 16." > "Take a shallow copy of Array class." > clone := Array shallowCopy. > "Change it into an Array." > Array adoptInstance: clone. > "Set its identityHash to 16." > clone tryPrimitive: 161 withArgs: #(16). > "Use the adoptInstance: primitive to ``set the class of the firstClassTablePage to the cone''. > or, more accurately, to set the firstClassTablePage's class index to 16." > clone tryPrimitive: 160 withArgs: {firstClassTablePage} > > > With the above done, we can check that everything is ok." > self assert: SmallFloat64 identityHash = 3. > self assert: Array someInstance == Smalltalk specialSelectors. > "A class table page is 1024 slots, contains only nil or behaviours, and contains at least one behaviour (is not all nils). There shouldn't be any that we can find." > self assert: (self systemNavigation allObjects select: [:o| o isArray and: [o size = 1024 and: [(o allSatisfy: [:e| e == nil or: [e isBehavior]]) and: [o anySatisfy: [:e| e isBehavior]]]]]) size = 0 > > > I recommend you create an update map. Then create a version of kernel with a post-load action, written something like this: > > > (Array someInstance size = 1014 > and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) > and: [(firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: > [| firstClassTablePage clone | > firstClassTablePage := Array someInstance. > self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). > self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. > firstClassTablePage at: 4 put: SmallFloat64. > SmallFloat64 tryPrimitive: 161 withArgs: #(3). > clone := Array shallowCopy. > Array adoptInstance: clone. > clone tryPrimitive: 161 withArgs: #(16). > clone tryPrimitive: 160 withArgs: {Array someInstance} > self assert: SmallFloat64 identityHash = 3. > self assert: (Array someInstance first: 4) = {nil. SmallInteger. Character. SmallFloat64}] > > Then create a second update map to ensure that that version of Kernel is loaded. > > I will do this for Squeak immediately. > > > Apologies. > > P.S. Interestingly enough, it shows what a horrible security hole the debugger primitives tryPrimitive:withArgs: and tryNamedPrimitive:withArgs: are. > > Cheers, > -- Pavel > > _,,,^..^,,,_ > best, Eliot > > > > -- > _,,,^..^,,,_ > best, Eliot -------------------------------------------- St?phane Ducasse http://stephane.ducasse.free.fr http://www.synectique.eu / http://www.pharo.org 03 59 35 87 52 Assistant: Julie Jonas 03 59 57 78 50 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, B?t.A, Park Plaza Villeneuve d'Ascq 59650 France -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/7e83d3bf/attachment.htm From lewis at mail.msen.com Wed Mar 9 13:27:25 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 9 13:27:27 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: References: <56df4172.0d4a370a.ade2d.ffffb15dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <20160309132725.GA35199@shell.msen.com> On Wed, Mar 09, 2016 at 02:05:27AM -0800, Eliot Miranda wrote: > Hi All, > > a grovelling apology. I have committed a serious blunder in Kernel-eem.1005.mcz. Rather than potentially corrupt images (although this is unlikely) I have chosen to delete Kernel-eem.1005.mcz. This will break updates until I commit a corrected version. But it's too late at night here for me to fix it now. I'll fix it asap tomorrow am. I could do with a good nights sleep ;-) > No worries, nothing is broken. Trunk is still working fine and the update stream is working normally. For your own image, you will probably have to delete Kernel-eem.1005.mcz from your local package cache and do "MCFileBasedRepository flushAllCaches". Aside from that, all is well. Dave From asqueaker at gmail.com Wed Mar 9 15:39:51 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 9 15:41:06 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: References: <1457391411991-4883105.post@n4.nabble.com> Message-ID: > I would really like to be able to manage my preferences with monticello > versioning. > It would be easier to keep images in sync and have other benefits. You mean you aren't _already_ doing that? How do you configure your applications? I wrote a configuration method to set my app's preferences and version it with the app code itself.. From karlramberg at gmail.com Wed Mar 9 15:42:34 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed Mar 9 15:42:37 2016 Subject: [squeak-dev] Re: [BUG] Commented out do it's don't work from context menu In-Reply-To: <1457226053511-4882729.post@n4.nabble.com> References: <1457226053511-4882729.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: clip.PNG Type: image/png Size: 16336 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/616c82de/clip.png From karlramberg at gmail.com Wed Mar 9 15:46:22 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed Mar 9 15:46:24 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: References: <1457391411991-4883105.post@n4.nabble.com> Message-ID: Do you save the preferences from the PreferenceBrowser and manage them with Monticello ? Best, Karl On Wed, Mar 9, 2016 at 4:39 PM, Chris Muller wrote: > > I would really like to be able to manage my preferences with monticello > > versioning. > > It would be easier to keep images in sync and have other benefits. > > You mean you aren't _already_ doing that? How do you configure your > applications? > > I wrote a configuration method to set my app's preferences and version > it with the app code itself.. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/05e16598/attachment.htm From asqueaker at gmail.com Wed Mar 9 15:58:08 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 9 15:59:20 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457445510095-4883236.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> Message-ID: > If we want to expand senders search to the object level, we should respect > all kinds of objects. A blacklist to rule out some false-positives, but no > whitelist. 82ms is fast enough for invoking the senders search. Like > "thorough senders", this should become a preference because we would need to > spawn 2 windows in that case: one senders browser and one object explorer. Marcel, the "references" search is for what you refer to, not "senders". When I'm making a MessageTrace, which is interacting with a single window, the last thing I want is for it to be popping up "Explorer" windows on every invocations of senders. Plus, what about the imbalance implementors? Senders means one thing, implementors means another? No, the what we really want here is to put this on References. For senders, what David said with #flag: is the right solution, the solution I was referencing from my original post in this thread:. From asqueaker at gmail.com Wed Mar 9 16:02:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 9 16:03:29 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: References: <56df4172.0d4a370a.ade2d.ffffb15dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Eliot, PLEASE do not include 1005 in the ancestry then. Thank you. On Wed, Mar 9, 2016 at 4:05 AM, Eliot Miranda wrote: > Hi All, > > a grovelling apology. I have committed a serious blunder in Kernel-eem.1005.mcz. Rather than potentially corrupt images (although this is unlikely) I have chosen to delete Kernel-eem.1005.mcz. This will break updates until I commit a corrected version. But it's too late at night here for me to fix it now. I'll fix it asap tomorrow am. I could do with a good nights sleep ;-) > > _,,,^..^,,,_ (phone) > >> On Mar 8, 2016, at 7:19 PM, commits@source.squeak.org wrote: >> >> Eliot Miranda uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-eem.1005.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-eem.1005 >> Author: eem >> Time: 8 March 2016, 1:16:26.313983 pm >> UUID: e11ad532-fefb-4f2e-836a-dc40b7d93447 >> Ancestors: Kernel-bf.1004 >> >> Add a script to make sure that >> a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and >> b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun. >> >> =============== Diff against Kernel-bf.1004 =============== >> >> Item was removed: >> - (PackageInfo named: 'Kernel') preamble: '((Mutex allInstances allSatisfy: [:m| (m instVarNamed: ''owner'') isNil]) >> - and: [Monitor allInstances allSatisfy: [:m| (m instVarNamed: ''ownerProcess'') isNil]]) ifFalse: >> - [self error: ''Some Mutexes and/or Monitors are owned. Cannot safely mutate. ABort load and resolve this before loading for safety.'']'! >> >> Item was changed: >> + (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package" >> + >> + "Make sure that >> + a) SmallFloat64 has identityHash 3 and occupies the 4th (3rd, zero-relative) slot of the first class table page, and >> + b) that the first class table page is hidden by ensuring its class index is 16, the Array class index pun." >> + (Array someInstance size = 1024 >> + and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) >> + and: [(Array someInstance first: 17) asSet = {nil. SmallInteger. Character. Array} asSet]]) ifTrue: >> + [| firstClassTablePage clone | >> + firstClassTablePage := Array someInstance. >> + self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e isBehavior]]). >> + self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. Character. Array} asSet. >> + firstClassTablePage at: 4 put: SmallFloat64. >> + SmallFloat64 tryPrimitive: 161 withArgs: #(3). >> + clone := Array shallowCopy. >> + Array adoptInstance: clone. >> + clone tryPrimitive: 161 withArgs: #(16). >> + clone tryPrimitive: 160 withArgs: {firstClassTablePage}. >> + self assert: SmallFloat64 identityHash = 3. >> + self assert: (firstClassTablePage first: 4) = {nil. SmallInteger. Character. SmallFloat64}]'! >> - (PackageInfo named: 'Kernel') postscript: 'Smalltalk removeFromStartUpList: DateAndTime.'! >> >> > From asqueaker at gmail.com Wed Mar 9 16:08:46 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 9 16:09:58 2016 Subject: [squeak-dev] Re: Preferences revamp? In-Reply-To: References: <1457391411991-4883105.post@n4.nabble.com> Message-ID: > Do you save the preferences from the PreferenceBrowser and manage them with > Monticello ? I write the code which sets the prefs. To generate the code from a button in the preferences browser, we should get requirements 7, 7.5 and 7.6 working. Its what we've been wanting to do with our releases for years. We just need to do it.. From eliot.miranda at gmail.com Wed Mar 9 16:58:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 9 16:58:35 2016 Subject: [squeak-dev] Re: [Vm-dev] [Pharo-dev] strange array instance In-Reply-To: <9F5F8AE2-C8F3-45DF-8C05-653B68FB720B@inria.fr> References: <9F5F8AE2-C8F3-45DF-8C05-653B68FB720B@inria.fr> Message-ID: On Wed, Mar 9, 2016 at 3:08 AM, St?phane Ducasse wrote: > Hi eliot > > Do not worry. > Now would it be possible to have a test or something like that that would > help us > to > - document this part of the system > - check that the system is in a coherent state > > Stef > Yes, watch this space. I should have the work done by tomorrow. And the 64-bit system will be a tiny bit smaller and faster :-) On 09 Mar 2016, at 10:26, Eliot Miranda wrote: > > Um, under /no/ circumstances do what I'm suggesting below. It will screw > up 320bit images completely. I've just turned odd SmallIntegers into > SmallFloat54's in 32-bit Squeak. I hope I won't destroy too many people's > images. This is perhaps my worst blunder. > > On Tue, Mar 8, 2016 at 10:38 AM, Eliot Miranda > wrote: > >> Hi Pavel, >> >> On Tue, Mar 8, 2016 at 1:40 AM, Pavel Krivanek >> wrote: >> >>> Hi, >>> >>> there is a strange array of size 1024 in the Pharo image that is not >>> eaten by garbage collector even if no object points to it. I guess it is >>> related to Spur. >>> >>> ((Array allInstances select: [ :i | i size = 1024 ]) >>> select: [ :a | a second = SmallInteger ]) pointersTo >>> >>> What is it and is it accessible somehow? >>> >> >> It is indeed the first class table page. It looks like an old bug. The >> oldest Spur image I can start up has the problem. The way that class >> table pages are hidden is that they have a class index which is not that of >> Array. Array is at index 52 in the class table (51 zero-relative, Array >> identityHash = 51), but it is also at index 17 (16 zero-relative). Array >> allInstances looks for objects whose class index is 51, hence not seeing >> the class table pages, which all (but the first) have class index 16. >> >> Luckily we can fix the problem easily, and we can fix another problem at >> the same time, which is that SmallFloat64 has the wrong hash. >> >> The class table is two-level; a (hidden) array of Arrays. Classes are in >> the class table at their identityHashes (so that to instantiate a class one >> copies the class's identity hash into the classIndex of the new instance >> instead of having to search the class table). But when SmallFloat64 was >> created in the 32-bit image I forgot to give it the right hash and store it >> in the class table. (there are no SmallFloat64 instances in a 32-bit >> image, only in 64-bits). >> >> So we can first change SmallFloat64's hash to 3, which is what the Spur >> 64-bit VM and image require, and enter it into the first class table page, >> and then we can make the first class table page disappear. >> >> >> | firstClassTablePage clone | >> "The first class table page is the first Array instance. Of course this >> is a bug." >> firstClassTablePage := Array someInstance. >> >> "It should contain only nil and classes." >> self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e >> isBehavior]]). >> >> "And its first 17 elements should only be the immediate classes and >> Array, since Array is used as the class pun for class table pages, with >> index 17 (16 zero-relative)" >> self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. >> Character. Array} asSet. >> >> "It just so happens that the second Array is the specialSelectors" >> self assert: Array someInstance nextInstance == Smalltalk >> specialSelectors. >> >> "Store SmallFloat64 in the first class table page at index 4 (3 >> zero-relative)." >> firstClassTablePage at: 4 put: SmallFloat64. >> >> "Use the secret set identity hash primitive to set SmallFloat64's >> identityHash to 3." >> SmallFloat64 tryPrimitive: 161 withArgs: #(3). >> >> "Now create an object that looks like Array class, but has identityHash >> 16." >> "Take a shallow copy of Array class." >> clone := Array shallowCopy. >> "Change it into an Array." >> Array adoptInstance: clone. >> "Set its identityHash to 16." >> clone tryPrimitive: 161 withArgs: #(16). >> "Use the adoptInstance: primitive to ``set the class of the >> firstClassTablePage to the cone''. >> or, more accurately, to set the firstClassTablePage's class index to 16." >> clone tryPrimitive: 160 withArgs: {firstClassTablePage} >> >> >> With the above done, we can check that everything is ok." >> self assert: SmallFloat64 identityHash = 3. >> self assert: Array someInstance == Smalltalk specialSelectors. >> "A class table page is 1024 slots, contains only nil or behaviours, and >> contains at least one behaviour (is not all nils). There shouldn't be any >> that we can find." >> self assert: (self systemNavigation allObjects select: [:o| o isArray >> and: [o size = 1024 and: [(o allSatisfy: [:e| e == nil or: [e isBehavior]]) >> and: [o anySatisfy: [:e| e isBehavior]]]]]) size = 0 >> >> >> I recommend you create an update map. Then create a version of kernel >> with a post-load action, written something like this: >> >> >> (Array someInstance size = 1014 >> and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) >> and: [(firstClassTablePage first: 17) asSet = {nil. SmallInteger. >> Character. Array} asSet]]) ifTrue: >> [| firstClassTablePage clone | >> firstClassTablePage := Array someInstance. >> self assert: (firstClassTablePage allSatisfy: [:e| e == nil or: [e >> isBehavior]]). >> self assert: (firstClassTablePage first: 17) asSet = {nil. SmallInteger. >> Character. Array} asSet. >> firstClassTablePage at: 4 put: SmallFloat64. >> SmallFloat64 tryPrimitive: 161 withArgs: #(3). >> clone := Array shallowCopy. >> Array adoptInstance: clone. >> clone tryPrimitive: 161 withArgs: #(16). >> clone tryPrimitive: 160 withArgs: {Array someInstance} >> self assert: SmallFloat64 identityHash = 3. >> self assert: (Array someInstance first: 4) = {nil. SmallInteger. >> Character. SmallFloat64}] >> >> Then create a second update map to ensure that that version of Kernel is >> loaded. >> >> I will do this for Squeak immediately. >> >> >> Apologies. >> >> P.S. Interestingly enough, it shows what a horrible security hole the >> debugger primitives tryPrimitive:withArgs: and tryNamedPrimitive:withArgs: >> are. >> >> Cheers, >>> -- Pavel >>> >> >> _,,,^..^,,,_ >> best, Eliot >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > > -------------------------------------------- > St?phane Ducasse > http://stephane.ducasse.free.fr > http://www.synectique.eu / http://www.pharo.org > 03 59 35 87 52 > Assistant: Julie Jonas > 03 59 57 78 50 > 03 59 35 86 16 > > S. Ducasse - Inria > 40, avenue Halley, > Parc Scientifique de la Haute Borne, B?t.A, Park Plaza > Villeneuve d'Ascq 59650 > France > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/b2423b9a/attachment.htm From commits at source.squeak.org Wed Mar 9 19:54:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 9 19:54:42 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1005.mcz ==================== Summary ==================== Name: Kernel-eem.1005 Author: eem Time: 9 March 2016, 11:53:31.024318 am UUID: ef6c553c-70dc-4646-8a12-172594ff090a Ancestors: Kernel-bf.1004 Give SmallFloat64 identityHash 4 and put it in the first class table page at that hash. 64-bit Spur will change over to that tag pattern asap. =============== Diff against Kernel-bf.1004 =============== Item was removed: - (PackageInfo named: 'Kernel') preamble: '((Mutex allInstances allSatisfy: [:m| (m instVarNamed: ''owner'') isNil]) - and: [Monitor allInstances allSatisfy: [:m| (m instVarNamed: ''ownerProcess'') isNil]]) ifFalse: - [self error: ''Some Mutexes and/or Monitors are owned. Cannot safely mutate. ABort load and resolve this before loading for safety.'']'! Item was changed: + (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package" + + "Arrange that SmalFloat64 has identityHash 4 and is in the class table first page if possible. + Don''t bother to rehash all hashed collections; SmallFloat64 is not in any in the default image" + Smalltalk garbageCollect. + (Array someInstance size = 1024 + and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) + and: [(Array someInstance first: 17) = {nil . SmallInteger . Character . SmallInteger . nil . nil . nil . nil . nil . nil . nil . nil . nil . nil . nil . nil . Array}]]) ifTrue: + [SmallFloat64 tryPrimitive: 161 withArgs: #(4). + Array someInstance at: 5 put: SmallFloat64]'! - (PackageInfo named: 'Kernel') postscript: 'Smalltalk removeFromStartUpList: DateAndTime.'! From eliot.miranda at gmail.com Wed Mar 9 20:02:40 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 9 20:02:45 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: <56e07f85.2c228c0a.cba4e.ffffb713SMTPIN_ADDED_MISSING@mx.google.com> References: <56e07f85.2c228c0a.cba4e.ffffb713SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi All, sorry to have messed things up. Please flush versions of Kernel-eem.1005.mcz and Kernel-eem.1005\(bf.1004\).mcd before updating. Things may work (Bert, will teh fact that the UUID doesn't match cause flushing to happen automatically?). But it'll be safer to delete them. On Wed, Mar 9, 2016 at 11:54 AM, wrote: > Eliot Miranda uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-eem.1005.mcz > > ==================== Summary ==================== > > Name: Kernel-eem.1005 > Author: eem > Time: 9 March 2016, 11:53:31.024318 am > UUID: ef6c553c-70dc-4646-8a12-172594ff090a > Ancestors: Kernel-bf.1004 > > Give SmallFloat64 identityHash 4 and put it in the first class table page > at that hash. 64-bit Spur will change over to that tag pattern asap. > > =============== Diff against Kernel-bf.1004 =============== > > Item was removed: > - (PackageInfo named: 'Kernel') preamble: '((Mutex allInstances > allSatisfy: [:m| (m instVarNamed: ''owner'') isNil]) > - and: [Monitor allInstances allSatisfy: [:m| (m instVarNamed: > ''ownerProcess'') isNil]]) ifFalse: > - [self error: ''Some Mutexes and/or Monitors are owned. Cannot > safely mutate. ABort load and resolve this before loading for safety.'']'! > > Item was changed: > + (PackageInfo named: 'Kernel') postscript: '"below, add code to be run > after the loading of this package" > + > + "Arrange that SmalFloat64 has identityHash 4 and is in the class table > first page if possible. > + Don''t bother to rehash all hashed collections; SmallFloat64 is not in > any in the default image" > + Smalltalk garbageCollect. > + (Array someInstance size = 1024 > + and: [(Array someInstance allSatisfy: [:e| e == nil or: [e isBehavior]]) > + and: [(Array someInstance first: 17) = {nil . SmallInteger . Character > . SmallInteger . nil . nil . nil . nil . nil . nil . nil . nil . nil . nil > . nil . nil . Array}]]) ifTrue: > + [SmallFloat64 tryPrimitive: 161 withArgs: #(4). > + Array someInstance at: 5 put: SmallFloat64]'! > - (PackageInfo named: 'Kernel') postscript: 'Smalltalk > removeFromStartUpList: DateAndTime.'! > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/b4cae02f/attachment.htm From bert at freudenbergs.de Wed Mar 9 20:38:48 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 9 20:38:52 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1005.mcz In-Reply-To: References: <56e07f85.2c228c0a.cba4e.ffffb713SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <2E181BD5-CF24-41FA-A1CC-CEF8454FE6FF@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160309/13b887f0/smime.bin From Marcel.Taeumel at hpi.de Wed Mar 9 21:46:40 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Mar 9 22:14:37 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> Message-ID: <1457560000664-4883637.post@n4.nabble.com> Hi Chris, what is the "references search"? Do you mean the message finder? Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883637.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Mar 9 21:52:18 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Mar 9 22:20:16 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457560000664-4883637.post@n4.nabble.com> References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <1457560000664-4883637.post@n4.nabble.com> Message-ID: <1457560338630-4883638.post@n4.nabble.com> Maybe we can add it to this list of operations: Best, Marcel -- View this message in context: http://forum.world.st/swapMouseButtons-broken-in-trunk-tp4881884p4883638.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Mar 9 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 9 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160309225502.28683.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-March/009485.html Name: Kernel-eem.1005 Ancestors: Kernel-bf.1004 Give SmallFloat64 identityHash 4 and put it in the first class table page at that hash. 64-bit Spur will change over to that tag pattern asap. ============================================= From asqueaker at gmail.com Wed Mar 9 23:35:58 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 9 23:36:40 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457560000664-4883637.post@n4.nabble.com> References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <1457560000664-4883637.post@n4.nabble.com> Message-ID: > what is the "references search"? Do you mean the message finder? No, I'm referring to the function shown in your references-1.png picture just above the red box. Also invoked by Shift+Command+N. For when you browse references to a Class. Invoking that function on a Symbol expression now appears to do nothing. So this would be a good place to fit your new feature into the IDE. It actually is finding and presenting references to the Symbbol, so "References" fits very well. I still strongly recommend use of the #flag: approach, however, whereever "magic" implentations breaks message tracing. From tim at rowledge.org Thu Mar 10 03:13:05 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 10 03:13:09 2016 Subject: [squeak-dev] Back to Balloon3D, Rome/Plugin and other graphic improvements Message-ID: <7F25A191-8218-458E-AA4B-29DEAA4A5C3E@rowledge.org> Last November we had some list chat about Balloon3D and it?s plugin - I eventually got the plugin working and even some demos to run on the Pi - but I don?t see any record of anything even faintly looking like a conclusion or, good grief, a plan. I still don?t have a good feel for what would constitute a sensible path; the Rome/Cairo/Pango stuff is rather old but at least the libraries seem still current and supported with a release of cairo just a couple of months ago. Maybe that?s a good path to take for a release? About 3 years ago we had a different thread running about graphics (and yet again we?ve collectively not got anything done about it) where Bert mentioned some limitations with Gezira/Nile; are they still valid Bert? Who else is working in this area? Anyone? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Immune from any serious head injury. From lewis at mail.msen.com Thu Mar 10 04:55:56 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 10 04:55:58 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: <1457392390950-4883109.post@n4.nabble.com> References: <20160302003509.GA80892@shell.msen.com> <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> Message-ID: <20160310045556.GA8644@shell.msen.com> On Mon, Mar 07, 2016 at 03:13:10PM -0800, marcel.taeumel wrote: > It's actuallly really simple: > > term := #swapMouseButtonsChanged. > senders := OrderedCollection new. > > SystemNavigation default allObjectsDo: [:ea | > 1 to: ea class instSize do: [:i | |val| > val := ea instVarAt: i. > val isSymbol ifTrue: [ > val = term ifTrue: [senders add: ea]]]]. > > senders explore. > > On my laptop, it benches to '11.6 per second. 85.9 milliseconds per run.' > > Should we add this to trunk? We could filter out method additions or method > references to produce cleaner results. The "Senders" shortcut might just > spawn an additional explorer with the resulting objects. Fairly easy. > > Best, > Marcel > I do like this idea. But just to keep in in context, I want to remind us of the original problem that we were trying to address. IIRC, the original problem was that we had a preference with a #changeSelector that had been initialized to something other than the default pattern of #somethingChanged. Specifically, for that particular preference, the selector was #installMouseDecodeTable rather than #swapMouseButtonsChanged. So later on, someone made some improvements to the preferences mechanism that somehow caused that preference to be re-initualized, so that its #changeSelector was now the default selector #swapMouseButtonsChanged. That did not work because there had never been an implementation of EventSensor>>swapMouseButtonsChanged. Marcel figured this out and added the missing implementation: EventSensor>>swapMouseButtonsChanged self installMouseDecodeTable. So at this point, we know of exactly one preference that caused a problem because the historical #changeSelector did not match the default pattern. Are there other preference that would lead to the same kind of confusion? After adding an accessor for #changeSelector, I find that in my image: ((Preference allSubInstances select: [ :e | ( e changeSelector notNil and: [ ( '*Changed' match: e changeSelector ) not ] ) and: [ #value ~= e changeSelector ] ] ) collect: [:e | e changeSelector] ) asSet asArray. ==> #(#serviceUpdate #doAutomaticLayoutOfFlapsIfAppropriate #universalTilesSettingToggled #changesInPreferences #classicTilesSettingToggled) So without looking into the details, I would say that there are maybe five of these selectors that could possibly cause a problem. If one or more of them is a concern, then I would expect that the missing #somethingChanged. implementation could be provided, exactly as was done for EventSensor>>swapMouseButtonsChanged. Looking to the future, I would expect that as new preferences are added, they would naturally follow the convention of using #somethingChanged as the changed selector. So do we need to engineer a solution to this problem? Maybe not. It might be better to just find any existing preferences that might still have a problem, fix them, and move forward with the assumption that any new preferences will follow the established #somethingChanged convention. Dave From hannes.hirzel at gmail.com Thu Mar 10 10:12:32 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Mar 10 10:12:36 2016 Subject: [squeak-dev] Re: swapMouseButtons broken in trunk In-Reply-To: References: <1456919081387-4881981.post@n4.nabble.com> <1457225700739-4882728.post@n4.nabble.com> <1457391592456-4883106.post@n4.nabble.com> <1457392390950-4883109.post@n4.nabble.com> <20160308021249.GA58254@shell.msen.com> <1457445510095-4883236.post@n4.nabble.com> <1457560000664-4883637.post@n4.nabble.com> Message-ID: On 3/10/16, Chris Muller wrote: >> what is the "references search"? Do you mean the message finder? > > No, I'm referring to the function shown in your references-1.png > picture just above the red box. Also invoked by Shift+Command+N. For > when you browse references to a Class. > > Invoking that function on a Symbol expression now appears to do > nothing. So this would be a good place to fit your new feature into > the IDE. It actually is finding and presenting references to the > Symbbol, so "References" fits very well. +1 > > I still strongly recommend use of the #flag: approach, however, > whereever "magic" implentations breaks message tracing. > > From robert.hirschfeld at gmx.net Thu Mar 10 11:01:01 2016 From: robert.hirschfeld at gmx.net (Robert Hirschfeld) Date: Thu Mar 10 11:01:06 2016 Subject: [squeak-dev] Programming Experience 2016 (PX/16) Workshop at ECOOP | Call for Papers Message-ID: <382D5190-8022-4856-8AE7-CF10BC11FF75@gmx.net> Call for Papers *** Programming Experience 2016 (PX/16) Workshop *** July 18 (Mon), 2016 Co-located with ECOOP 2016 in Rome 2016.ecoop.org/track/PX-2016 programming-experience.org/px16 === Abstract === Imagine a software development task. Some sort of requirements and specification including performance goals and perhaps a platform and programming language. A group of developers head into a vast workroom. The Programming Experience Workshop is about what happens in that room when one or a couple of programmers sit down in front of computers and produce code, especially when it's exploratory programming. Do they create text that is transformed into running behavior (the old way), or do they operate on behavior directly ("liveness"); are they exploring the live domain to understand the true nature of the requirements; are they like authors creating new worlds; does visualization matter; is the experience immediate, immersive, vivid and continuous; do fluency, literacy, and learning matter; do they build tools, meta-tools; are they creating languages to express new concepts quickly and easily; and curiously, is joy relevant to the experience? Correctness, performance, standard tools, foundations, and text-as-program are important traditional research areas, but the experience of programming and how to improve and evolve it are the focus of this workshop. === Submissions === Submissions are solicited for Programming Experience 2016 (PX/16). The thrust of the workshop is to explore the human experience of programming?what it feels like to program, or more accurately, what it should feel like. The technical topics include exploratory programming, live programming, authoring, representation of active content, visualization, navigation, modularity mechanisms, immediacy, literacy, fluency, learning, tool building, and language engineering. Submissions by academics, professional programmers, and non-professional programmer are welcome. Submissions can be in any form and format, including but not limited to papers, presentations, demos, videos, panels, debates, essays, writers' workshops, and art. Presentation slots will be between 30 minutes and one hour, depending on quality, form, and relevance to the workshop. Submissions directed toward publication should be so marked, and the program committee will engage in peer review for all such papers. Video publication will be arranged. All artifacts are to be submitted via EasyChair (https://easychair.org/conferences/?conf=px16). Papers and essays must be written in English, provided as PDF documents, and follow the ACM SIGPLAN Conference Format (10 point font, Times New Roman font family, numeric citation style, http://www.sigplan.org/Resources/Author/). There is no page limit on submitted papers and essays. It is, however, the responsibility of the authors to keep the reviewers interested and motivated to read the paper. Reviewers are under no obligation to read all or even a substantial portion of a paper or essay if they do not find the initial part of it interesting. === Format === Paper presentations, presentations without papers, live demonstrations, performances, videos, panel discussions, debates, writers' workshops, art galleries, dramatic readings. === Review === Papers and essays labeled as publications will undergo standard peer review; other submissions will be reviewed for relevance and quality; shepherding will be available. === Important dates === Submissions: April 15, 2016 (anywhere in the world) Notifications: May 13, 2016 PX/16: July 18, 2016 === Publication === Papers and essays accepted through peer review will be published as part of ACM's Digital Library; video publication on Vimeo or other streaming site; other publication on the PX workshop website. === Organizers === Robert Hirschfeld, Hasso Plattner Institute, University of Potsdam, Germany Richard P. Gabriel, Dreamsongs and IBM Almaden Research Center, United States Hidehiko Masuhara, Mathematical and Computing Science, Tokyo Institute of Technology, Japan === Program committee === Carl Friedrich Bolz, King's College London, United Kingdom Gilad Bracha, Google, United States Andrew Bragdon, Twitter, United States Jonathan Edwards, CDG Labs, United States Jun Kato, National Institute of Advanced Industrial Science and Technology, Japan Cristina Videira Lopes, University of California at Irvine, United States Yoshiki Ohshima, Viewpoints Research Institute, United States Michael Perscheid, SAP Innovation Center, Germany Guido Salvaneschi, TU Darmstadt, Germany Marcel Taeumel, Hasso Plattner Institute, University of Potsdam, Germany Alessandro Warth, SAP Labs, United States === Flyer === http://programming-experience.org/px16/media/PX16CfP.pdf -- Robert Hirschfeld hirschfeld@acm.org www.hirschfeld.org From commits at source.squeak.org Thu Mar 10 15:42:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 10 15:42:05 2016 Subject: [squeak-dev] The Trunk: Collections-ul.680.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.680.mcz ==================== Summary ==================== Name: Collections-ul.680 Author: ul Time: 10 March 2016, 4:33:52.197801 pm UUID: 0d7db6dd-bde1-40f0-919d-638fc4e8a9c7 Ancestors: Collections-ul.679 #includes: will return false if the receiver is some kind of character set and the argument is not a character. E.g. ['0' asCharacterSet includes: 48.123] won't evaluate to true anymore, nor will [ '' asCharacterSet includes: nil ] raise an error. #occurrencesOf: revamp - round #2 - added optimized implementations to all Collection subclasses where it was sensible - as suggested by Nicolas. - moved all implementations from testing to enumeration category, because this method doesn't answer a boolean value, but it's similar to #count:, which is in enumeration. =============== Diff against Collections-ul.679 =============== Item was changed: + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') ----- occurrencesOf: anObject "Answer how many of the receiver's elements are equal to anObject. Optimized version." | tally | tally := 0. 1 to: self size do: [ :index | (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. ^tally! Item was changed: + ----- Method: Bag>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- occurrencesOf: anObject "Answer how many of the receiver's elements are equal to anObject. Optimized version." ^contents at: anObject ifAbsent: 0! Item was added: + ----- Method: Bitset>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + (self includes: anObject) ifTrue: [ ^1 ]. + ^0! Item was changed: + ----- Method: ByteArray>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: ByteArray>>occurrencesOf: (in category 'as yet unclassified') ----- occurrencesOf: anObject "Answer how many of the receiver's elements are equal to anObject. Optimized version." | tally | anObject isInteger ifFalse: [ ^0 ]. anObject negative ifTrue: [ ^0 ]. anObject > 255 ifTrue: [ ^0 ]. tally := 0. 1 to: self size do: [ :index | (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. ^tally! Item was added: + ----- Method: ByteString>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + anObject isCharacter ifFalse: [ ^0 ]. + anObject asInteger > 255 ifTrue: [ ^0 ]. + tally := 0. + 1 to: self size do: [ :index | + (self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! Item was added: + ----- Method: ByteSymbol>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + anObject isCharacter ifFalse: [ ^0 ]. + anObject asInteger > 255 ifTrue: [ ^0 ]. + tally := 0. + 1 to: self size do: [ :index | + (self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! Item was changed: ----- Method: CharacterSet>>includes: (in category 'collection ops') ----- + includes: anObject - includes: aCharacter | index | + anObject isCharacter ifFalse: [ ^false ]. + (index := anObject asInteger + 1) > 256 ifTrue: [ ^false ]. - (index := aCharacter asInteger + 1) > 256 ifTrue: [ ^false ]. ^(map at: index) > 0! Item was added: + ----- Method: CharacterSet>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + (self includes: anObject) ifTrue: [ ^1 ]. + ^0! Item was changed: ----- Method: CharacterSetComplement>>includes: (in category 'collection ops') ----- + includes: anObject + + anObject isCharacter ifFalse: [ ^false ]. + (absent includes: anObject) ifTrue: [ ^false ]. + ^true! - includes: aCharacter - ^(absent includes: aCharacter) not! Item was added: + ----- Method: CharacterSetComplement>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + (self includes: anObject) ifTrue: [ ^1 ]. + ^0! Item was changed: + ----- Method: Collection>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: Collection>>occurrencesOf: (in category 'testing') ----- occurrencesOf: anObject "Answer how many of the receiver's elements are equal to anObject." | tally | tally := 0. self do: [:each | anObject = each ifTrue: [tally := tally + 1]]. ^tally! Item was changed: + ----- Method: Matrix>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: Matrix>>occurrencesOf: (in category 'testing') ----- occurrencesOf: anObject ^contents occurrencesOf: anObject! Item was added: + ----- Method: OrderedCollection>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + | tally | + tally := 0. + firstIndex to: lastIndex do: [ :index | + (array at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. + ^tally! Item was added: + ----- Method: Set>>includes2: (in category 'testing') ----- + includes2: anObject + + ^((array at: (self scanFor: anObject)) == nil) not! Item was changed: + ----- Method: Set>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + (self includes: anObject) ifTrue: [ ^1 ]. + ^0! - ----- Method: Set>>occurrencesOf: (in category 'testing') ----- - occurrencesOf: anObject - ^ (self includes: anObject) ifTrue: [1] ifFalse: [0]! Item was changed: + ----- Method: String>>occurrencesOf: (in category 'enumerating') ----- - ----- Method: String>>occurrencesOf: (in category 'testing') ----- occurrencesOf: anObject "Answer how many of the receiver's elements are equal to anObject. Optimized version." | tally | anObject isCharacter ifFalse: [ ^0 ]. tally := 0. 1 to: self size do: [ :index | (self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. ^tally! Item was changed: ----- Method: WideCharacterSet>>includes: (in category 'collection ops') ----- + includes: anObject - includes: aCharacter | value | + anObject isCharacter ifFalse: [ ^false ]. + (value := anObject asInteger) < 256 ifTrue: [ - (value := aCharacter asInteger) < 256 ifTrue: [ ^(byteArrayMap at: value + 1) ~= 0 ]. ^((map at: (value bitShift: highBitsShift) ifAbsent: nil) ifNil: [ ^false ]) includes: (value bitAnd: lowBitsMask)! Item was added: + ----- Method: WideCharacterSet>>occurrencesOf: (in category 'enumerating') ----- + occurrencesOf: anObject + "Answer how many of the receiver's elements are equal to anObject. Optimized version." + + (self includes: anObject) ifTrue: [ ^1 ]. + ^0! From commits at source.squeak.org Thu Mar 10 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 10 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160310225502.28201.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-March/009486.html Name: Collections-ul.680 Ancestors: Collections-ul.679 #includes: will return false if the receiver is some kind of character set and the argument is not a character. E.g. ['0' asCharacterSet includes: 48.123] won't evaluate to true anymore, nor will [ '' asCharacterSet includes: nil ] raise an error. #occurrencesOf: revamp - round #2 - added optimized implementations to all Collection subclasses where it was sensible - as suggested by Nicolas. - moved all implementations from testing to enumeration category, because this method doesn't answer a boolean value, but it's similar to #count:, which is in enumeration. ============================================= From tim at rowledge.org Thu Mar 10 23:53:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 10 23:53:03 2016 Subject: [squeak-dev] input from mouse and keyboard In-Reply-To: References: Message-ID: <0465A0C0-2B48-4D76-926D-F02B3A813A27@rowledge.org> Ralph, pretty much the entire Morphic UI system does what you are asking about. The entire event loop mechanism is about getting key & mouse presses in and passed to whatever widget wants them. Sounds to me that you just want some Morphs with #step methods setup to play your game along with event handling methods as appropriate. As long as I understood you correctly, that is... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim How come it's 'Java One' every year? Aren't they making any progress? From lecteur at zogotounga.net Fri Mar 11 07:15:12 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Fri Mar 11 07:15:16 2016 Subject: [squeak-dev] input from mouse and keyboard In-Reply-To: References: Message-ID: <56E27080.8020509@zogotounga.net> You can see how I managed event handling in my Saucers! game by looking at the code, downloadable at the bottom of this page: http://www.zogotounga.net/comp/saucers.htm Stef From eliot.miranda at gmail.com Fri Mar 11 19:05:03 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 11 19:05:08 2016 Subject: [squeak-dev] New Cog VMs available Message-ID: ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3643 CogVM binaries as per VMMaker.oscog-eem.1722/r3643 General: Change vm parameter 65 to be a set of flags, not merely the boolean for MULTIPLE_BYTECODE_SETS, and make the flags answer MULTIPLE_BYTECODE_SETS & IMMUTABILITY. Nuke unused named prim primitiveOriginalMillisecondClock so VM can eliminate ioOldMSecs. Nuke ioOldMSecs and ioLowResMSecs to simplify the tiume management and avoid mistakes were we use different versions of clocks for different parts of the same basic io operations. Nuke SqueakUIFlushUseHighPercisionClock preference. Make the leak checker operational in the non-assert (& non-debug) VM. Cogit: Revise the register saving convention for trampoline calls. Instead of passing in a boolean to indicate if all registers should be saved or not (an aproach Ryan correctly notes is bogus), pass in a register mask of registers to be saved. If the trampoline call has a machine code continuation then the argument is usually callerSavedRegMask, and on MIPS and ARM this is empty. Use the above to move the saving of registers in the store-check into the store-check trampoline and out of the call of the trampoline. Further, use genJumpImmediate: in the immediate test, which saves an instruction. 64-bit Cogit: Fix primtive 171 (primitiveImmediateAsInteger) in the Cogit for SmallFloat. The old code only dealt with Characters. The new code replicates the rotatedFloatBitsOf: scheme in Spur64BitMemoryManager. Spur: Resolve the conflict between 32-bit and 64-bit tag assignments. In 32-bits we have 1=even SmallIntegers, 2=Characters, 3=odd SmallIntegers, and in 64-bits we had 1=SmallIntegers, 2=Characters, 3=SmallFloats. Hence we would want SmallFloat64's identityHash to be 3, which conflicts with 32 bits' odd SmallIntegers. Change is for 64-bits to use 1=SmallIntegers, 2=Characters, 4=SmallFloats. This also means single-bit tests in the Cogit, which produces better code, and no scratch registers to hold masked tags. Hence roll the 64-bit Spur image format version number from 68019 to 68021. Delegate to the object memories to determine the image format version number. Fix the bug in markAndTraceClassOf: that causes the first class table page to become a visible array. Plugins: Fix primitiveFFIIntegerAt for signed 4-byte results. Wuth the support for 64-bit results, signed 4-byte results must be sign-extended to 64-bits. Update primitiveFileRead for Spur. It doesn't need the PrimErrObjectMayMove handling since Spur has pinning. Don't use cCode: pointer aliasing for storing/fetching float/double in FFI primitives. Replace with a call to mem:cp:y: - the first one is dangerous with modern C compilers - while the second is optimized away (no call to memcpy) Fix a missing guard in SmartSyntaxPlugin like explained at http://forum.world.st/VM-safety-missing-failing-guards-in-SmartSyntaxPlugin-td4816518.html Fix two missing guards in VM profiling primitives: one should not use the result of stackObjectValue: before checking for success, otherwise a null pointer exception will occur in case of failure. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160311/28eeb738/attachment.htm From robert.hirschfeld at gmx.net Fri Mar 11 23:24:32 2016 From: robert.hirschfeld at gmx.net (Robert Hirschfeld) Date: Fri Mar 11 23:24:37 2016 Subject: [squeak-dev] Workshop on Context-oriented Programming (COP) 2016 at ECOOP | Call for Papers Message-ID: <747ED208-AD32-4135-930F-FB813859F4B3@gmx.net> Call for Papers *** Workshop on Context-oriented Programming (COP) 2016 *** July 19 (Tue), 2016 Co-located with ECOOP 2016 in Rome http://2016.ecoop.org/track/COP-2016 === Introduction === Context information plays an increasingly important role in our information-centric world. Software systems must adapt to changing contexts over time, and must change even while they are running. Unfortunately, mainstream programming languages and development environments do not support this kind of dynamic change very well, leading developers to implementing complex designs to anticipate various dimensions of variability. Context-oriented Programming (COP) directly supports variability depending on a wide range of dynamic attributes. In effect, it should be possible to dispatch run-time behavior on any property of the execution context. By now, several researchers have been working on notions approaching that idea, and implementations ranging from first prototypes to mature platform extensions used in commercial deployments have illustrated how multidimensional dispatch can indeed be supported effectively to achieve expressive run-time variation in behavior. === Topics === The previous editions of this workshop (ECOOP 2009?2015) have shown to be well-received. The goal of the 8th Workshop on Context-oriented Programming (COP-16) is to further establish context orientation as a common thread to language design, application development, and system support. Topics of interest include but are not limited to: - Interesting application domains and scenarios - Programming language abstractions for Context-oriented Programming (e.g. dynamic scoping, roles, traits, prototype-based extensions) - Theoretical foundations for Context-oriented Programming (e.g. semantics, type systems) - Configuration languages (e.g. feature description interpreters, transformational approaches) - Interaction between non-functional programming concerns and Context-oriented Programming (e.g. security, persistence, concurrency, distribution). - Interaction with other paradigms: event-based and reactive programming, object-oriented programming. - Modularization approaches for Context-oriented Programming (e.g. aspects, modules, layers, plugins). - Guidelines to include Context-oriented Programming in programs (e.g. best practices, patterns) - Runtime support for Context-oriented Programming (e.g. reflection, dynamic binding) - Implementation issues such as optimization, VM support, JIT compilation etc. for Context-oriented Programming - Tool support (e.g. design tools, IDEs, debuggers). === Submissions === COP invites submissions of high-quality papers reporting original research, or describing innovative contributions to, or experience with Context-oriented Programming, its implementation, and application. Papers that depart significantly from established ideas and practices are particularly welcome. Submissions must not have been published previously and must not be under review for any another refereed event or publication. The program committee will evaluate each contributed paper based on its relevance, significance, clarity, and originality. Accepted papers will be published in the ACM Digital Library. Papers are to be submitted via EasyChair (https://easychair.org/conferences/?conf=cop2016). Papers must be written in English, be provided as PDF documents, and follow the ACM SIGPLAN Conference Format (10 point font, Times New Roman font family, numeric citation style, http://www.sigplan.org/Resources/Author/). They should not exceed 6 pages. === Important dates === Submissions: April 15, 2016 Notifications: May 13, 2016 COP-16: July 19, 2016 === Organizers === Guido Salvaneschi, Technische Universit?t Darmstadt, Germany Robert Hirschfeld, Hasso Plattner Institute, University of Potsdam, Germany Atsushi Igarashi, Kyoto University, Japan Hidehiko Masuhara, Tokyo Institute of Technology, Japan === Program committee === Tomoyuki Aotani, Tokyo Institute of Technology, Japan Dave Clarke, Uppsala University, Sweden and KU Leuven, Belgium Rocco De Nicola, IMT Institute for Advanced Studies Lucca, Italy Coen De Roover, Vrije Universiteit Brussel, Belgium Pierpaolo Degano, University of Pisa, Italy Gorel Hedin, Lund University, Sweden Tetsuo Kamina, Ritsumeikan University, Japan Jens Lincke, Hasso Plattner Institute, University of Potsdam, Germany Harold Ossher, IBM, United States Mario S?dholt - ?cole des Mines de Nantes, France Didier Verna, EPITA / LRDE, France === -- Robert Hirschfeld hirschfeld@acm.org www.hirschfeld.org From maxleske at gmail.com Sat Mar 12 08:45:04 2016 From: maxleske at gmail.com (Max Leske) Date: Sat Mar 12 08:45:06 2016 Subject: [squeak-dev] Status of date problem Message-ID: <17697F02-E3DB-46C0-B419-B57632329A39@gmail.com> Hi, The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? Cheers, Max From bert at freudenbergs.de Sat Mar 12 08:46:59 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 12 08:47:04 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <17697F02-E3DB-46C0-B419-B57632329A39@gmail.com> References: <17697F02-E3DB-46C0-B419-B57632329A39@gmail.com> Message-ID: Are you using the latest trunk image? It should be fixed. - Bert - > On 12.03.2016, at 09:45, Max Leske wrote: > > Hi, > > The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). > > I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? > > Cheers, > Max -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6204 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160312/928ad767/smime.bin From vaidasd at gmail.com Sat Mar 12 10:26:49 2016 From: vaidasd at gmail.com (=?UTF-8?Q?Vaidotas_Did=C5=BEbalis?=) Date: Sat Mar 12 10:27:33 2016 Subject: [squeak-dev] TTF import broken in 5.0? Message-ID: Hello, Since the version 3.8 Squeak correctly displayed Unicode characters if glyphs were part of TTF file I imported. But Squeak Squeak 5.0 cannot do this. For example: '???' (asciiValues 269, 261, 281) is shown incorrectly. Bug? regards, Vaidotas From eliot.miranda at gmail.com Sat Mar 12 15:06:19 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 12 15:06:24 2016 Subject: [squeak-dev] TTF import broken in 5.0? In-Reply-To: References: Message-ID: Hi Vaidotas, > On Mar 12, 2016, at 2:26 AM, Vaidotas Did?balis wrote: > > Hello, > Since the version 3.8 Squeak correctly displayed Unicode characters if > glyphs were part of TTF file I imported. But Squeak Squeak 5.0 cannot > do this. For example: '???' (asciiValues 269, 261, 281) is shown > incorrectly. Bug? > regards, > Vaidotas Can you not narrow this down? Can you check whether the glyphs are in the font correctly or not to see whether it's an import or a display issue? _,,,^..^,,,_ (phone) From lewis at mail.msen.com Sat Mar 12 16:04:11 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 12 16:04:16 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160307052138.GA26765@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> Message-ID: <20160312160411.GA15714@shell.msen.com> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: > On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > > UTCDateAndTime is a UTC based implementation of class DateAndTime with > > one instance variable representing the magnitude of the point in time, > > and another representing local time zone offset. > > I have updated the UTCDateAndTime package to make it loadable in the latest > Squeak trunk and Spur. Has anyone looked at this yet? Any interest? Dave > > A new Monticello repository is at http://www.squeaksource.com/UTCDateAndTime. > The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. > > Starting with an updated trunk image, you can load UTCDateAndTime in two ways: > > 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and load > the MCZ files in sequence beginning with Chronology-Core-dtl.3. > > 2) In a preferences browser, in category 'updates' set the 'Update URL' > preference to 'http://www.squeaksource.com/UTCDateAndTime', and do > world -> help... -> update code from server. > > The main objective of UTCDateAndTime is to make DateAndTime conceptually > simpler, but a happy side effect is that it is also significantly faster > than the old implementation. > > Dave From leves at caesar.elte.hu Sat Mar 12 18:39:14 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 12 18:39:16 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160312160411.GA15714@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> Message-ID: Hi David, I just loaded the code into the latest 64-bit Spur image and VM. Everything works so far, and the overall performance is better as well. For those who care about performance, the speedups are #testNow->3.01. #testEquals->1.83. #testGreaterThan->1.86. #testLessThan->1.92. #testPrintString->0.85. #testStringAsDateAndTime->1.75. So, #testPrintString is slighly slower, but everything else is significanlty quicker. I haven't reviewed the code yet, but I'll do. Levente On Sat, 12 Mar 2016, David T. Lewis wrote: > On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>> one instance variable representing the magnitude of the point in time, >>> and another representing local time zone offset. >> >> I have updated the UTCDateAndTime package to make it loadable in the latest >> Squeak trunk and Spur. > > Has anyone looked at this yet? Any interest? > > Dave > >> >> A new Monticello repository is at http://www.squeaksource.com/UTCDateAndTime. >> The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. >> >> Starting with an updated trunk image, you can load UTCDateAndTime in two ways: >> >> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and load >> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >> >> 2) In a preferences browser, in category 'updates' set the 'Update URL' >> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >> world -> help... -> update code from server. >> >> The main objective of UTCDateAndTime is to make DateAndTime conceptually >> simpler, but a happy side effect is that it is also significantly faster >> than the old implementation. >> >> Dave > > From lewis at mail.msen.com Sat Mar 12 18:49:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 12 18:49:09 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> Message-ID: <20160312184907.GA51125@shell.msen.com> Hi Levente, I had not checked the 64-bit image yet, thanks. I did notice from the 32-bit image that the DateAndTime>>= test shows that we might have an opportunity to improve #digitCompare: performance, or maybe think of a better way to do the #= implementation. Your 64-bit results show that it is not a problem for the 64-bit image (because we would be dealing with immediate small integers there). It's interesting to see that Spur is speeding up overall performance to the point that some primitives are starting to appear relatively slow in comparison. That is very nice problem to have :-) Dave On Sat, Mar 12, 2016 at 07:39:14PM +0100, Levente Uzonyi wrote: > Hi David, > > I just loaded the code into the latest 64-bit Spur image and VM. > Everything works so far, and the overall performance is better as well. > For those who care about performance, the speedups are > > #testNow->3.01. > #testEquals->1.83. > #testGreaterThan->1.86. > #testLessThan->1.92. > #testPrintString->0.85. > #testStringAsDateAndTime->1.75. > > So, #testPrintString is slighly slower, but everything else is > significanlty quicker. > I haven't reviewed the code yet, but I'll do. > > Levente > > On Sat, 12 Mar 2016, David T. Lewis wrote: > > >On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: > >>On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > >>>UTCDateAndTime is a UTC based implementation of class DateAndTime with > >>>one instance variable representing the magnitude of the point in time, > >>>and another representing local time zone offset. > >> > >>I have updated the UTCDateAndTime package to make it loadable in the > >>latest > >>Squeak trunk and Spur. > > > >Has anyone looked at this yet? Any interest? > > > >Dave > > > >> > >>A new Monticello repository is at > >>http://www.squeaksource.com/UTCDateAndTime. > >>The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. > >> > >>Starting with an updated trunk image, you can load UTCDateAndTime in two > >>ways: > >> > >>1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and > >>load > >>the MCZ files in sequence beginning with Chronology-Core-dtl.3. > >> > >>2) In a preferences browser, in category 'updates' set the 'Update URL' > >>preference to 'http://www.squeaksource.com/UTCDateAndTime', and do > >>world -> help... -> update code from server. > >> > >>The main objective of UTCDateAndTime is to make DateAndTime conceptually > >>simpler, but a happy side effect is that it is also significantly faster > >>than the old implementation. > >> > >>Dave > > > > From leves at caesar.elte.hu Sat Mar 12 18:49:51 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 12 18:49:56 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160312160411.GA15714@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> Message-ID: I always forget to mention, even though I have had this idea since you had introduced primitiveUtcWithOffset, that it would be better if the primitive could take an optional argument to store the values in the first two slots of it instead of creating a new Array. If it's too much burden to accept any object, then the argument type can be limited to Array. This change would make it possible to decrease the GC pressure when many timestamps are created in a row. Levente On Sat, 12 Mar 2016, David T. Lewis wrote: > On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>> one instance variable representing the magnitude of the point in time, >>> and another representing local time zone offset. >> >> I have updated the UTCDateAndTime package to make it loadable in the latest >> Squeak trunk and Spur. > > Has anyone looked at this yet? Any interest? > > Dave > >> >> A new Monticello repository is at http://www.squeaksource.com/UTCDateAndTime. >> The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. >> >> Starting with an updated trunk image, you can load UTCDateAndTime in two ways: >> >> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and load >> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >> >> 2) In a preferences browser, in category 'updates' set the 'Update URL' >> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >> world -> help... -> update code from server. >> >> The main objective of UTCDateAndTime is to make DateAndTime conceptually >> simpler, but a happy side effect is that it is also significantly faster >> than the old implementation. >> >> Dave > > From leves at caesar.elte.hu Sat Mar 12 19:48:21 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 12 19:48:25 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160312184907.GA51125@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> Message-ID: Hi Dave, I ran the tests and found that there are three types of failures. 1. Some tests assume that the default offset is #localOffset. I don't think it's correct, but that's how is it in Trunk. 2. Hashes have changed. This implies that HashedCollections containing DateAndTime instances as key will have to be rehashed. In the base Trunk image there are appear to be no such HashedCollections, but not rehashing such collections will break images with custom packages in them after update. 3. Loss of resolution and strict monotonicity. In Trunk [DateAndTime now < DateAndTime now] is always true. This is possible because DateAndTime has nanosecond resolution, but the source clock only has microsecond resolution, and our machines are so slow that it takes more than a nanosecond to execute the primitive. All these allow us to use the sub-microsecond part of the timestamp to create intermediate strictly monotonic values. Levente On Sat, 12 Mar 2016, David T. Lewis wrote: > Hi Levente, > > I had not checked the 64-bit image yet, thanks. I did notice from the > 32-bit image that the DateAndTime>>= test shows that we might have an > opportunity to improve #digitCompare: performance, or maybe think of > a better way to do the #= implementation. Your 64-bit results show that > it is not a problem for the 64-bit image (because we would be dealing > with immediate small integers there). > > It's interesting to see that Spur is speeding up overall performance > to the point that some primitives are starting to appear relatively > slow in comparison. That is very nice problem to have :-) > > Dave > > > On Sat, Mar 12, 2016 at 07:39:14PM +0100, Levente Uzonyi wrote: >> Hi David, >> >> I just loaded the code into the latest 64-bit Spur image and VM. >> Everything works so far, and the overall performance is better as well. >> For those who care about performance, the speedups are >> >> #testNow->3.01. >> #testEquals->1.83. >> #testGreaterThan->1.86. >> #testLessThan->1.92. >> #testPrintString->0.85. >> #testStringAsDateAndTime->1.75. >> >> So, #testPrintString is slighly slower, but everything else is >> significanlty quicker. >> I haven't reviewed the code yet, but I'll do. >> >> Levente >> >> On Sat, 12 Mar 2016, David T. Lewis wrote: >> >>> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >>>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>>>> one instance variable representing the magnitude of the point in time, >>>>> and another representing local time zone offset. >>>> >>>> I have updated the UTCDateAndTime package to make it loadable in the >>>> latest >>>> Squeak trunk and Spur. >>> >>> Has anyone looked at this yet? Any interest? >>> >>> Dave >>> >>>> >>>> A new Monticello repository is at >>>> http://www.squeaksource.com/UTCDateAndTime. >>>> The home page (with a new SAR) is at http://wiki.squeak.org/squeak/6197. >>>> >>>> Starting with an updated trunk image, you can load UTCDateAndTime in two >>>> ways: >>>> >>>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and >>>> load >>>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >>>> >>>> 2) In a preferences browser, in category 'updates' set the 'Update URL' >>>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >>>> world -> help... -> update code from server. >>>> >>>> The main objective of UTCDateAndTime is to make DateAndTime conceptually >>>> simpler, but a happy side effect is that it is also significantly faster >>>> than the old implementation. >>>> >>>> Dave >>> >>> > > From lewis at mail.msen.com Sun Mar 13 04:37:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 13 04:37:56 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> Message-ID: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> I had the same idea, and I already implemented it in trunk interpreter VMMaker, but it is probably not in oscog yet. I did not add it on the image side, although we could do so if we update the VMs. Dave > I always forget to mention, even though I have had this idea since you had > introduced primitiveUtcWithOffset, that it would be better if the > primitive could take an optional argument to store the values in the first > two slots of it instead of creating a new Array. If it's too much burden > to accept any object, then the argument type can be limited to Array. > This change would make it possible to decrease the GC pressure when many > timestamps are created in a row. > > Levente > > On Sat, 12 Mar 2016, David T. Lewis wrote: > >> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>>> one instance variable representing the magnitude of the point in time, >>>> and another representing local time zone offset. >>> >>> I have updated the UTCDateAndTime package to make it loadable in the >>> latest >>> Squeak trunk and Spur. >> >> Has anyone looked at this yet? Any interest? >> >> Dave >> >>> >>> A new Monticello repository is at >>> http://www.squeaksource.com/UTCDateAndTime. >>> The home page (with a new SAR) is at >>> http://wiki.squeak.org/squeak/6197. >>> >>> Starting with an updated trunk image, you can load UTCDateAndTime in >>> two ways: >>> >>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and >>> load >>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >>> >>> 2) In a preferences browser, in category 'updates' set the 'Update URL' >>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >>> world -> help... -> update code from server. >>> >>> The main objective of UTCDateAndTime is to make DateAndTime >>> conceptually >>> simpler, but a happy side effect is that it is also significantly >>> faster >>> than the old implementation. >>> >>> Dave >> >> > From lewis at mail.msen.com Sun Mar 13 19:03:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 13 19:03:56 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> Message-ID: <20160313190355.GA20838@shell.msen.com> Apologies, this is not right. I was replying from a cell phone and my recollection was wrong. I did at one point implement a #primitiveUtcWithOffset that could receive an array of size two as an argument into which the result values are stored, instead if allocating the array in the primitive. However, I did *not* commit it to VMMaker, and it is not in any currently available VMs. I think I decided at the time that this approach was dangerous because it would invite problems in cases involving multiple processes, where some other process might call the primitive using the same array. In that case the time value in the array would magically change without the first process being aware. I still think that it is a good idea, but maybe not worth the risk unless there is a noticable affect of performance or GC activity. Of course, adding the capability to the primitive would not force anyone to actually use it that way. Sorry for the misinformation. Dave On Sat, Mar 12, 2016 at 11:37:55PM -0500, David T. Lewis wrote: > I had the same idea, and I already implemented it in trunk interpreter > VMMaker, but it is probably not in oscog yet. I did not add it on the > image side, although we could do so if we update the VMs. > > Dave > > > I always forget to mention, even though I have had this idea since you had > > introduced primitiveUtcWithOffset, that it would be better if the > > primitive could take an optional argument to store the values in the first > > two slots of it instead of creating a new Array. If it's too much burden > > to accept any object, then the argument type can be limited to Array. > > This change would make it possible to decrease the GC pressure when many > > timestamps are created in a row. > > > > Levente > > > > On Sat, 12 Mar 2016, David T. Lewis wrote: > > > >> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: > >>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > >>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with > >>>> one instance variable representing the magnitude of the point in time, > >>>> and another representing local time zone offset. > >>> > >>> I have updated the UTCDateAndTime package to make it loadable in the > >>> latest > >>> Squeak trunk and Spur. > >> > >> Has anyone looked at this yet? Any interest? > >> > >> Dave > >> > >>> > >>> A new Monticello repository is at > >>> http://www.squeaksource.com/UTCDateAndTime. > >>> The home page (with a new SAR) is at > >>> http://wiki.squeak.org/squeak/6197. > >>> > >>> Starting with an updated trunk image, you can load UTCDateAndTime in > >>> two ways: > >>> > >>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and > >>> load > >>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. > >>> > >>> 2) In a preferences browser, in category 'updates' set the 'Update URL' > >>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do > >>> world -> help... -> update code from server. > >>> > >>> The main objective of UTCDateAndTime is to make DateAndTime > >>> conceptually > >>> simpler, but a happy side effect is that it is also significantly > >>> faster > >>> than the old implementation. > >>> > >>> Dave > >> > >> > > > > > > From lewis at mail.msen.com Sun Mar 13 19:52:54 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 13 19:53:10 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> Message-ID: <20160313195254.GB20838@shell.msen.com> On Sat, Mar 12, 2016 at 08:48:21PM +0100, Levente Uzonyi wrote: > Hi Dave, > > I ran the tests and found that there are three types of failures. > 1. Some tests assume that the default offset is #localOffset. I don't > think it's correct, but that's how is it in Trunk. There are 10 failing tests in my image. These are cases in which either I was uncertain how to handle the issue, or where I thought that the current behaviour in trunk may be wrong. > 2. Hashes have changed. This implies that HashedCollections containing > DateAndTime instances as key will have to be rehashed. In the base Trunk > image there are appear to be no such HashedCollections, but not rehashing > such collections will break images with custom packages in them after > update. I am not expert in this area at all. But part of the update process (in the MC postscripts) finds all instances of the old style DateAndTime, and becomes them into the new ones. Would the HashedCollections contianing DateAndTime instances as key still require rehash in that case? Related to DateAndTime>>hash, I would also like to ask for guidance as to how DateAndTime>>= should be defined. Maybe this is an ANSI Smalltalk question, but I was not sure if we should be thinking of DateAndTime as a magnitude, such that two instances are equal if their utcMicroseconds are the same? Or are two instances equal if they have the same magnitude and also the same localOffsetSeconds? I implemented the first approach (two instances are #= if they represent the same UTC time, regardless of timezone). There may be use cases where the other approach makes sense. But my thinking was that when comparing two instances of DateAndTime, they should not be considered the same unless they both represent the same point in time, hence UTC time regardless of the time zone in which the instance was created. > 3. Loss of resolution and strict monotonicity. In Trunk [DateAndTime now < > DateAndTime now] is always true. This is possible because DateAndTime has > nanosecond resolution, but the source clock only has microsecond > resolution, and our machines are so slow that it takes more than a > nanosecond to execute the primitive. All these allow us to use the > sub-microsecond part of the timestamp to create intermediate strictly > monotonic values. > To be honest, I do not fully recall the rationale for this. One important case is that of the system clock being set back due to ntp synchronization. Fiddling with the nanoseconds number to make it appear as if the OS had reported an increase in time (when in fact it did not) seems questionable to me, but I know that it was done for some good reason. I do remember the discussions, so I should look back through the squeak-dev archives and find out the reason this was done. > Levente > Thanks very much for looking at this. I added you and Chris Muller as developers on the UTCDateAndTime repository on squeaksource.com in case you want to make any changes. Much appreciated, Dave From leves at caesar.elte.hu Sun Mar 13 21:28:19 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun Mar 13 21:28:22 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160313190355.GA20838@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> Message-ID: On Sun, 13 Mar 2016, David T. Lewis wrote: > Apologies, this is not right. I was replying from a cell phone and my > recollection was wrong. > > I did at one point implement a #primitiveUtcWithOffset that could receive > an array of size two as an argument into which the result values are stored, > instead if allocating the array in the primitive. However, I did *not* commit > it to VMMaker, and it is not in any currently available VMs. > > I think I decided at the time that this approach was dangerous because it > would invite problems in cases involving multiple processes, where some > other process might call the primitive using the same array. In that case > the time value in the array would magically change without the first process > being aware. That could only happen if the Array would be shared by multiple processes. For example if there were a dedicated class variable to retrieve the values from the VM, but that would be nothing but bad design. Why I thought that the argument should be of any Object with two slots is that this would allow us to use the DateAndTime instance itself to fetch the values into. Or anyone could come up with their own class to store timestamps and still be able to use this primitive. > > I still think that it is a good idea, but maybe not worth the risk unless > there is a noticable affect of performance or GC activity. Of course, adding > the capability to the primitive would not force anyone to actually use it > that way. We have a long running application, which most of the time generates a few hundred timestamps per second, but sometimes is goes up to the thousands range. That would definitely benefit from such feature. Levente > > Sorry for the misinformation. > > Dave > > > On Sat, Mar 12, 2016 at 11:37:55PM -0500, David T. Lewis wrote: >> I had the same idea, and I already implemented it in trunk interpreter >> VMMaker, but it is probably not in oscog yet. I did not add it on the >> image side, although we could do so if we update the VMs. >> >> Dave >> >>> I always forget to mention, even though I have had this idea since you had >>> introduced primitiveUtcWithOffset, that it would be better if the >>> primitive could take an optional argument to store the values in the first >>> two slots of it instead of creating a new Array. If it's too much burden >>> to accept any object, then the argument type can be limited to Array. >>> This change would make it possible to decrease the GC pressure when many >>> timestamps are created in a row. >>> >>> Levente >>> >>> On Sat, 12 Mar 2016, David T. Lewis wrote: >>> >>>> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >>>>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>>>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>>>>> one instance variable representing the magnitude of the point in time, >>>>>> and another representing local time zone offset. >>>>> >>>>> I have updated the UTCDateAndTime package to make it loadable in the >>>>> latest >>>>> Squeak trunk and Spur. >>>> >>>> Has anyone looked at this yet? Any interest? >>>> >>>> Dave >>>> >>>>> >>>>> A new Monticello repository is at >>>>> http://www.squeaksource.com/UTCDateAndTime. >>>>> The home page (with a new SAR) is at >>>>> http://wiki.squeak.org/squeak/6197. >>>>> >>>>> Starting with an updated trunk image, you can load UTCDateAndTime in >>>>> two ways: >>>>> >>>>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and >>>>> load >>>>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >>>>> >>>>> 2) In a preferences browser, in category 'updates' set the 'Update URL' >>>>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >>>>> world -> help... -> update code from server. >>>>> >>>>> The main objective of UTCDateAndTime is to make DateAndTime >>>>> conceptually >>>>> simpler, but a happy side effect is that it is also significantly >>>>> faster >>>>> than the old implementation. >>>>> >>>>> Dave >>>> >>>> >>> >> >> >> >> > > From lewis at mail.msen.com Sun Mar 13 22:24:01 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 13 22:24:05 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> Message-ID: <20160313222401.GA58012@shell.msen.com> On Sun, Mar 13, 2016 at 10:28:19PM +0100, Levente Uzonyi wrote: > On Sun, 13 Mar 2016, David T. Lewis wrote: > > >Apologies, this is not right. I was replying from a cell phone and my > >recollection was wrong. > > > >I did at one point implement a #primitiveUtcWithOffset that could receive > >an array of size two as an argument into which the result values are > >stored, > >instead if allocating the array in the primitive. However, I did *not* > >commit > >it to VMMaker, and it is not in any currently available VMs. > > > >I think I decided at the time that this approach was dangerous because it > >would invite problems in cases involving multiple processes, where some > >other process might call the primitive using the same array. In that case > >the time value in the array would magically change without the first > >process > >being aware. > > That could only happen if the Array would be shared by multiple processes. > For example if there were a dedicated class variable to retrieve the > values from the VM, but that would be nothing but bad design. Well yes, but bad design is a very common failure mode ;-) > > Why I thought that the argument should be of any Object with two slots is > that this would allow us to use the DateAndTime instance itself to fetch > the values into. Or anyone could come up with their own class to store > timestamps and still be able to use this primitive. That is absolutely brilliant! What a great idea. DateAndTime class>>now ^self basicNew initializeFromPrimitive Dave From jakob.reschke at student.hpi.de Mon Mar 14 13:43:19 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Mar 14 13:43:46 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings Message-ID: Hi all, is there a convenient way to bind some object (e. g. one that I inspect at the moment) to a variable in a new or existing Workspace? Use Case: I would like to read something from an XML file and have never done that before in Squeak. After installing the XMLParsers stuff from SqueakMap I dragged my XML file into the image. It shows the file content in a Workspace, great! Now I want to get that content as a string object to later supply it to an appropriate parser. I found the string by inspecting the morphs of the Workspace (is there an easier way?), but now I would like to have a new workspace where I can work with that string. Printing the string in the inspector and copy&pasting would be an option, but the XML file is quite large and performance issues already arise when I navigate around in the Workspace where the content was loaded. For the sake of having tried it out, I attempted to print the #fullPrintString of the string, but my VM crashed... So, is there a way to bind arbitrary objects at hand to a Workspace, other than copying and pasting serialized representations around or fiddling with "global variables"? Of course, I could have done the file reading myself with FileStream etc. to obtain a string, but I wondered if there is a more "tangible" approach. Best regards, Jakob From hannes.hirzel at gmail.com Mon Mar 14 14:51:34 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Mon Mar 14 14:51:36 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: References: Message-ID: Hello Jakob Does this http://wiki.squeak.org/squeak/6338 and this http://wiki.squeak.org/squeak/6342 help for zour problem? Regards Hannes On 3/14/16, Jakob Reschke wrote: > Hi all, > > is there a convenient way to bind some object (e. g. one that I > inspect at the moment) to a variable in a new or existing Workspace? > > Use Case: I would like to read something from an XML file and have > never done that before in Squeak. After installing the XMLParsers > stuff from SqueakMap I dragged my XML file into the image. It shows > the file content in a Workspace, great! Now I want to get that content > as a string object to later supply it to an appropriate parser. I > found the string by inspecting the morphs of the Workspace (is there > an easier way?), but now I would like to have a new workspace where I > can work with that string. > > Printing the string in the inspector and copy&pasting would be an > option, but the XML file is quite large and performance issues already > arise when I navigate around in the Workspace where the content was > loaded. For the sake of having tried it out, I attempted to print the > #fullPrintString of the string, but my VM crashed... So, is there a > way to bind arbitrary objects at hand to a Workspace, other than > copying and pasting serialized representations around or fiddling with > "global variables"? > > Of course, I could have done the file reading myself with FileStream > etc. to obtain a string, but I wondered if there is a more "tangible" > approach. > > Best regards, > Jakob > > From karlramberg at gmail.com Mon Mar 14 15:04:12 2016 From: karlramberg at gmail.com (karl ramberg) Date: Mon Mar 14 15:04:16 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: References: Message-ID: I would right click the file name in FileList. You get the option copy name to clipboard. >From there I would open a Workspace and assign to variables as I go. Best, Karl On Mon, Mar 14, 2016 at 2:43 PM, Jakob Reschke wrote: > Hi all, > > is there a convenient way to bind some object (e. g. one that I > inspect at the moment) to a variable in a new or existing Workspace? > > Use Case: I would like to read something from an XML file and have > never done that before in Squeak. After installing the XMLParsers > stuff from SqueakMap I dragged my XML file into the image. It shows > the file content in a Workspace, great! Now I want to get that content > as a string object to later supply it to an appropriate parser. I > found the string by inspecting the morphs of the Workspace (is there > an easier way?), but now I would like to have a new workspace where I > can work with that string. > > Printing the string in the inspector and copy&pasting would be an > option, but the XML file is quite large and performance issues already > arise when I navigate around in the Workspace where the content was > loaded. For the sake of having tried it out, I attempted to print the > #fullPrintString of the string, but my VM crashed... So, is there a > way to bind arbitrary objects at hand to a Workspace, other than > copying and pasting serialized representations around or fiddling with > "global variables"? > > Of course, I could have done the file reading myself with FileStream > etc. to obtain a string, but I wondered if there is a more "tangible" > approach. > > Best regards, > Jakob > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160314/be720a79/attachment.htm From jakob.reschke at student.hpi.de Mon Mar 14 16:15:21 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Mar 14 16:15:51 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: <872afc2795524189b1ff34af9efd6eb1@MX2015-DAG2.hpi.uni-potsdam.de> References: <872afc2795524189b1ff34af9efd6eb1@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Thank you, but my question was not about how to read XML files (even though I do this for the first time in Squeak). As I pointed out, I am aware of the possibility to use FileStream to read the file contents into a string (and then do the parsing). After getting the contents in a Workspace window by dragging the file into the image, I hoped there were some interactive facility to bind that text to a variable. In my experience, Squeak is full of useful, but sometimes hidden, functionality and I silently wished more than once to create such a variable from an inspected object without abusing the object explorer as my surrogate Workspace. 2016-03-14 15:51 GMT+01:00 H. Hirzel : > Hello Jakob > > Does this > http://wiki.squeak.org/squeak/6338 > and this > http://wiki.squeak.org/squeak/6342 > > help for zour problem? > > Regards > Hannes > > On 3/14/16, Jakob Reschke wrote: >> Hi all, >> >> is there a convenient way to bind some object (e. g. one that I >> inspect at the moment) to a variable in a new or existing Workspace? >> >> Use Case: I would like to read something from an XML file and have >> never done that before in Squeak. After installing the XMLParsers >> stuff from SqueakMap I dragged my XML file into the image. It shows >> the file content in a Workspace, great! Now I want to get that content >> as a string object to later supply it to an appropriate parser. I >> found the string by inspecting the morphs of the Workspace (is there >> an easier way?), but now I would like to have a new workspace where I >> can work with that string. >> >> Printing the string in the inspector and copy&pasting would be an >> option, but the XML file is quite large and performance issues already >> arise when I navigate around in the Workspace where the content was >> loaded. For the sake of having tried it out, I attempted to print the >> #fullPrintString of the string, but my VM crashed... So, is there a >> way to bind arbitrary objects at hand to a Workspace, other than >> copying and pasting serialized representations around or fiddling with >> "global variables"? >> >> Of course, I could have done the file reading myself with FileStream >> etc. to obtain a string, but I wondered if there is a more "tangible" >> approach. >> >> Best regards, >> Jakob >> >> > From jakob.reschke at student.hpi.de Mon Mar 14 16:27:29 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Mar 14 16:27:52 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: <048d6d24aaa94f0daf90540679ac308c@MX2015-DAG2.hpi.uni-potsdam.de> References: <048d6d24aaa94f0daf90540679ac308c@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-03-14 16:04 GMT+01:00 karl ramberg : > I would right click the file name in FileList. You get the option copy name > to clipboard. > From there I would open a Workspace and assign to variables as I go. This will save me from typing the file name, which is also good, but see my other response. I would still have to do the file reading stuff, which is perfectly adequate for the task, but I am looking for a way to create a variable binding from an already obtained piece of text (which might contain single quotes, so just putting quotes around it to get a string literal is not an option). In the Morphs I have already found a suitable string instance that now is accessible in an Object Explorer or Inspector. I would like to get that back into a Workspace. So even more generally, I would like to create a Workspace binding to an arbitrary object that is accessible in another context. If such thing is not possible - I would be positively surprised if it were - I wonder if I am the only one who has ever wished for such thing, or if there is an alternative elegant approach. > > On Mon, Mar 14, 2016 at 2:43 PM, Jakob Reschke > wrote: >> >> Hi all, >> >> is there a convenient way to bind some object (e. g. one that I >> inspect at the moment) to a variable in a new or existing Workspace? >> >> Use Case: I would like to read something from an XML file and have >> never done that before in Squeak. After installing the XMLParsers >> stuff from SqueakMap I dragged my XML file into the image. It shows >> the file content in a Workspace, great! Now I want to get that content >> as a string object to later supply it to an appropriate parser. I >> found the string by inspecting the morphs of the Workspace (is there >> an easier way?), but now I would like to have a new workspace where I >> can work with that string. >> >> Printing the string in the inspector and copy&pasting would be an >> option, but the XML file is quite large and performance issues already >> arise when I navigate around in the Workspace where the content was >> loaded. For the sake of having tried it out, I attempted to print the >> #fullPrintString of the string, but my VM crashed... So, is there a >> way to bind arbitrary objects at hand to a Workspace, other than >> copying and pasting serialized representations around or fiddling with >> "global variables"? >> >> Of course, I could have done the file reading myself with FileStream >> etc. to obtain a string, but I wondered if there is a more "tangible" >> approach. >> >> Best regards, >> Jakob >> > From bert at freudenbergs.de Mon Mar 14 16:44:13 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Mar 14 16:44:20 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: References: <872afc2795524189b1ff34af9efd6eb1@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: You can enable "create textual references to dropped morphs? in a workspace window?s menu (blue title bar button). Then, from the inspector, drag the field name (or ?self?) onto the workspace. It creates a variable named like ?transfer2694476? pointing to the transfer morph (the thing you dragged). Access the string using 'transfer2694476 passenger?. Done. Arguably we should make workspaces know about TransferMorphs and insert a reference to the morph?s passenger automatically (and independently of the ?create refs? flag). - Bert - > On 14.03.2016, at 17:15, Jakob Reschke wrote: > > Thank you, but my question was not about how to read XML files (even > though I do this for the first time in Squeak). As I pointed out, I am > aware of the possibility to use FileStream to read the file contents > into a string (and then do the parsing). > > After getting the contents in a Workspace window by dragging the file > into the image, I hoped there were some interactive facility to bind > that text to a variable. In my experience, Squeak is full of useful, > but sometimes hidden, functionality and I silently wished more than > once to create such a variable from an inspected object without > abusing the object explorer as my surrogate Workspace. > > 2016-03-14 15:51 GMT+01:00 H. Hirzel : >> Hello Jakob >> >> Does this >> http://wiki.squeak.org/squeak/6338 >> and this >> http://wiki.squeak.org/squeak/6342 >> >> help for zour problem? >> >> Regards >> Hannes >> >> On 3/14/16, Jakob Reschke wrote: >>> Hi all, >>> >>> is there a convenient way to bind some object (e. g. one that I >>> inspect at the moment) to a variable in a new or existing Workspace? >>> >>> Use Case: I would like to read something from an XML file and have >>> never done that before in Squeak. After installing the XMLParsers >>> stuff from SqueakMap I dragged my XML file into the image. It shows >>> the file content in a Workspace, great! Now I want to get that content >>> as a string object to later supply it to an appropriate parser. I >>> found the string by inspecting the morphs of the Workspace (is there >>> an easier way?), but now I would like to have a new workspace where I >>> can work with that string. >>> >>> Printing the string in the inspector and copy&pasting would be an >>> option, but the XML file is quite large and performance issues already >>> arise when I navigate around in the Workspace where the content was >>> loaded. For the sake of having tried it out, I attempted to print the >>> #fullPrintString of the string, but my VM crashed... So, is there a >>> way to bind arbitrary objects at hand to a Workspace, other than >>> copying and pasting serialized representations around or fiddling with >>> "global variables"? >>> >>> Of course, I could have done the file reading myself with FileStream >>> etc. to obtain a string, but I wondered if there is a more "tangible" >>> approach. >>> >>> Best regards, >>> Jakob >>> >>> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160314/ee33cf51/smime.bin From jakob.reschke at student.hpi.de Mon Mar 14 16:54:14 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Mar 14 16:54:38 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: References: <872afc2795524189b1ff34af9efd6eb1@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Fabulous! That is exactly the kind of useful but hidden functionality I was talking about. ;-) Thank you very much! Now the only UI annoyance left here is that dragging only works from Inspector but not from Object Explorer, but I can live with that. 2016-03-14 17:44 GMT+01:00 Bert Freudenberg : > You can enable "create textual references to dropped morphs? in a workspace window?s menu (blue title bar button). Then, from the inspector, drag the field name (or ?self?) onto the workspace. It creates a variable named like ?transfer2694476? pointing to the transfer morph (the thing you dragged). Access the string using 'transfer2694476 passenger?. Done. > > Arguably we should make workspaces know about TransferMorphs and insert a reference to the morph?s passenger automatically (and independently of the ?create refs? flag). > > - Bert - > >> On 14.03.2016, at 17:15, Jakob Reschke wrote: >> >> Thank you, but my question was not about how to read XML files (even >> though I do this for the first time in Squeak). As I pointed out, I am >> aware of the possibility to use FileStream to read the file contents >> into a string (and then do the parsing). >> >> After getting the contents in a Workspace window by dragging the file >> into the image, I hoped there were some interactive facility to bind >> that text to a variable. In my experience, Squeak is full of useful, >> but sometimes hidden, functionality and I silently wished more than >> once to create such a variable from an inspected object without >> abusing the object explorer as my surrogate Workspace. >> >> 2016-03-14 15:51 GMT+01:00 H. Hirzel : >>> Hello Jakob >>> >>> Does this >>> http://wiki.squeak.org/squeak/6338 >>> and this >>> http://wiki.squeak.org/squeak/6342 >>> >>> help for zour problem? >>> >>> Regards >>> Hannes >>> >>> On 3/14/16, Jakob Reschke wrote: >>>> Hi all, >>>> >>>> is there a convenient way to bind some object (e. g. one that I >>>> inspect at the moment) to a variable in a new or existing Workspace? >>>> >>>> Use Case: I would like to read something from an XML file and have >>>> never done that before in Squeak. After installing the XMLParsers >>>> stuff from SqueakMap I dragged my XML file into the image. It shows >>>> the file content in a Workspace, great! Now I want to get that content >>>> as a string object to later supply it to an appropriate parser. I >>>> found the string by inspecting the morphs of the Workspace (is there >>>> an easier way?), but now I would like to have a new workspace where I >>>> can work with that string. >>>> >>>> Printing the string in the inspector and copy&pasting would be an >>>> option, but the XML file is quite large and performance issues already >>>> arise when I navigate around in the Workspace where the content was >>>> loaded. For the sake of having tried it out, I attempted to print the >>>> #fullPrintString of the string, but my VM crashed... So, is there a >>>> way to bind arbitrary objects at hand to a Workspace, other than >>>> copying and pasting serialized representations around or fiddling with >>>> "global variables"? >>>> >>>> Of course, I could have done the file reading myself with FileStream >>>> etc. to obtain a string, but I wondered if there is a more "tangible" >>>> approach. >>>> >>>> Best regards, >>>> Jakob >>>> >>>> >>> >> > > From asqueaker at gmail.com Mon Mar 14 20:23:31 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Mar 14 20:24:13 2016 Subject: [squeak-dev] Injecting objects into Workspace bindings In-Reply-To: References: Message-ID: Jakob, you can simply assign the string to a var in your workspace just once, and then you'll have access to it. Make sure "automatically create variable declaration" is enabled in your workspace menu. Having said that, this presents the opportunity to share my own solution to the shortcomings of workspaces: I don't use them. Not for code, anyway, just for notes. For code, just put it in a class. You get storage, method composition, change history, and the ability to save it in the SCM tool later, if you decide. On Mon, Mar 14, 2016 at 8:43 AM, Jakob Reschke wrote: > Hi all, > > is there a convenient way to bind some object (e. g. one that I > inspect at the moment) to a variable in a new or existing Workspace? > > Use Case: I would like to read something from an XML file and have > never done that before in Squeak. After installing the XMLParsers > stuff from SqueakMap I dragged my XML file into the image. It shows > the file content in a Workspace, great! Now I want to get that content > as a string object to later supply it to an appropriate parser. I > found the string by inspecting the morphs of the Workspace (is there > an easier way?), but now I would like to have a new workspace where I > can work with that string. > > Printing the string in the inspector and copy&pasting would be an > option, but the XML file is quite large and performance issues already > arise when I navigate around in the Workspace where the content was > loaded. For the sake of having tried it out, I attempted to print the > #fullPrintString of the string, but my VM crashed... So, is there a > way to bind arbitrary objects at hand to a Workspace, other than > copying and pasting serialized representations around or fiddling with > "global variables"? > > Of course, I could have done the file reading myself with FileStream > etc. to obtain a string, but I wondered if there is a more "tangible" > approach. > > Best regards, > Jakob > From lewis at mail.msen.com Tue Mar 15 01:50:34 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 15 01:50:35 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160313190355.GA20838@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> Message-ID: <20160315015034.GA91684@shell.msen.com> Urk. Sorry for the confusion, but I was looking at the wrong image and I see now that my original statement was correct: "I had the same idea, and I already implemented it in trunk interpreter VMMaker, but it is probably not in oscog yet. I did not add it on the image side, although we could do so if we update the VMs." This is in the trunk VMM (interpreter VM), though not in Cog/Spur yet. Better yet, it already works with Levente's idea (see below) of passing the DateAndTime instance to the primitive. No further changes to the primitive are needed to do this. Therefore the following works in a Squeak 4.6 image with UTCDateAndTime loaded, and running on an interpreter VM: DateAndTime>>initializeFromPrimitive ^Time primPosixMicrosecondClockWithOffset: self DateAndTime basicNew initializeFromPrimitive ==> 2016-03-14T21:38:49.81355-04:00 So I think this is a very good idea that just needs a couple of minor VM updates to make it available. Dave On Sun, Mar 13, 2016 at 03:03:55PM -0400, David T. Lewis wrote: > Apologies, this is not right. I was replying from a cell phone and my > recollection was wrong. > > I did at one point implement a #primitiveUtcWithOffset that could receive > an array of size two as an argument into which the result values are stored, > instead if allocating the array in the primitive. However, I did *not* commit > it to VMMaker, and it is not in any currently available VMs. > > I think I decided at the time that this approach was dangerous because it > would invite problems in cases involving multiple processes, where some > other process might call the primitive using the same array. In that case > the time value in the array would magically change without the first process > being aware. > > I still think that it is a good idea, but maybe not worth the risk unless > there is a noticable affect of performance or GC activity. Of course, adding > the capability to the primitive would not force anyone to actually use it > that way. > > Sorry for the misinformation. > > Dave > > > On Sat, Mar 12, 2016 at 11:37:55PM -0500, David T. Lewis wrote: > > I had the same idea, and I already implemented it in trunk interpreter > > VMMaker, but it is probably not in oscog yet. I did not add it on the > > image side, although we could do so if we update the VMs. > > > > Dave > > > > > I always forget to mention, even though I have had this idea since you had > > > introduced primitiveUtcWithOffset, that it would be better if the > > > primitive could take an optional argument to store the values in the first > > > two slots of it instead of creating a new Array. If it's too much burden > > > to accept any object, then the argument type can be limited to Array. > > > This change would make it possible to decrease the GC pressure when many > > > timestamps are created in a row. > > > > > > Levente > > > > > > On Sat, 12 Mar 2016, David T. Lewis wrote: > > > > > >> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: > > >>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > > >>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with > > >>>> one instance variable representing the magnitude of the point in time, > > >>>> and another representing local time zone offset. > > >>> > > >>> I have updated the UTCDateAndTime package to make it loadable in the > > >>> latest > > >>> Squeak trunk and Spur. > > >> > > >> Has anyone looked at this yet? Any interest? > > >> > > >> Dave > > >> > > >>> > > >>> A new Monticello repository is at > > >>> http://www.squeaksource.com/UTCDateAndTime. > > >>> The home page (with a new SAR) is at > > >>> http://wiki.squeak.org/squeak/6197. > > >>> > > >>> Starting with an updated trunk image, you can load UTCDateAndTime in > > >>> two ways: > > >>> > > >>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and > > >>> load > > >>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. > > >>> > > >>> 2) In a preferences browser, in category 'updates' set the 'Update URL' > > >>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do > > >>> world -> help... -> update code from server. > > >>> > > >>> The main objective of UTCDateAndTime is to make DateAndTime > > >>> conceptually > > >>> simpler, but a happy side effect is that it is also significantly > > >>> faster > > >>> than the old implementation. > > >>> > > >>> Dave > > >> > > >> > > > > > > > > > > > From bert at freudenbergs.de Tue Mar 15 09:02:20 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 15 09:02:26 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160315015034.GA91684@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160315015034.GA91684@shell.msen.com> Message-ID: <7EA88AE9-7B04-48D6-AC40-8DFB89D4D3B0@freudenbergs.de> If we have to touch the VM for this anyway, is there any reason not to use the Smalltalk epoch for this primitive, as Eliot suggested? This would put it in line with the other primitives (and make it slightly cheaper to use the skewed VM time). - Bert - > On 15.03.2016, at 02:50, David T. Lewis wrote: > > Urk. Sorry for the confusion, but I was looking at the wrong image and I see > now that my original statement was correct: > > "I had the same idea, and I already implemented it in trunk interpreter > VMMaker, but it is probably not in oscog yet. I did not add it on the > image side, although we could do so if we update the VMs." > > This is in the trunk VMM (interpreter VM), though not in Cog/Spur yet. Better > yet, it already works with Levente's idea (see below) of passing the DateAndTime > instance to the primitive. No further changes to the primitive are needed to > do this. > > Therefore the following works in a Squeak 4.6 image with UTCDateAndTime loaded, > and running on an interpreter VM: > > DateAndTime>>initializeFromPrimitive > ^Time primPosixMicrosecondClockWithOffset: self > > DateAndTime basicNew initializeFromPrimitive ==> 2016-03-14T21:38:49.81355-04:00 > > So I think this is a very good idea that just needs a couple of minor VM > updates to make it available. > > Dave > > > On Sun, Mar 13, 2016 at 03:03:55PM -0400, David T. Lewis wrote: >> Apologies, this is not right. I was replying from a cell phone and my >> recollection was wrong. >> >> I did at one point implement a #primitiveUtcWithOffset that could receive >> an array of size two as an argument into which the result values are stored, >> instead if allocating the array in the primitive. However, I did *not* commit >> it to VMMaker, and it is not in any currently available VMs. >> >> I think I decided at the time that this approach was dangerous because it >> would invite problems in cases involving multiple processes, where some >> other process might call the primitive using the same array. In that case >> the time value in the array would magically change without the first process >> being aware. >> >> I still think that it is a good idea, but maybe not worth the risk unless >> there is a noticable affect of performance or GC activity. Of course, adding >> the capability to the primitive would not force anyone to actually use it >> that way. >> >> Sorry for the misinformation. >> >> Dave >> >> >> On Sat, Mar 12, 2016 at 11:37:55PM -0500, David T. Lewis wrote: >>> I had the same idea, and I already implemented it in trunk interpreter >>> VMMaker, but it is probably not in oscog yet. I did not add it on the >>> image side, although we could do so if we update the VMs. >>> >>> Dave >>> >>>> I always forget to mention, even though I have had this idea since you had >>>> introduced primitiveUtcWithOffset, that it would be better if the >>>> primitive could take an optional argument to store the values in the first >>>> two slots of it instead of creating a new Array. If it's too much burden >>>> to accept any object, then the argument type can be limited to Array. >>>> This change would make it possible to decrease the GC pressure when many >>>> timestamps are created in a row. >>>> >>>> Levente >>>> >>>> On Sat, 12 Mar 2016, David T. Lewis wrote: >>>> >>>>> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: >>>>>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: >>>>>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with >>>>>>> one instance variable representing the magnitude of the point in time, >>>>>>> and another representing local time zone offset. >>>>>> >>>>>> I have updated the UTCDateAndTime package to make it loadable in the >>>>>> latest >>>>>> Squeak trunk and Spur. >>>>> >>>>> Has anyone looked at this yet? Any interest? >>>>> >>>>> Dave >>>>> >>>>>> >>>>>> A new Monticello repository is at >>>>>> http://www.squeaksource.com/UTCDateAndTime. >>>>>> The home page (with a new SAR) is at >>>>>> http://wiki.squeak.org/squeak/6197. >>>>>> >>>>>> Starting with an updated trunk image, you can load UTCDateAndTime in >>>>>> two ways: >>>>>> >>>>>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and >>>>>> load >>>>>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. >>>>>> >>>>>> 2) In a preferences browser, in category 'updates' set the 'Update URL' >>>>>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do >>>>>> world -> help... -> update code from server. >>>>>> >>>>>> The main objective of UTCDateAndTime is to make DateAndTime >>>>>> conceptually >>>>>> simpler, but a happy side effect is that it is also significantly >>>>>> faster >>>>>> than the old implementation. >>>>>> >>>>>> Dave >>>>> >>>>> >>>> >>> >>> >>> >>> > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160315/4d57dcf2/smime.bin From lewis at mail.msen.com Tue Mar 15 11:52:56 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 15 11:52:57 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <7EA88AE9-7B04-48D6-AC40-8DFB89D4D3B0@freudenbergs.de> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160315015034.GA91684@shell.msen.com> <7EA88AE9-7B04-48D6-AC40-8DFB89D4D3B0@freudenbergs.de> Message-ID: <20160315115256.GA9481@shell.msen.com> On Tue, Mar 15, 2016 at 10:02:20AM +0100, Bert Freudenberg wrote: > If we have to touch the VM for this anyway, is there any reason not to use the Smalltalk epoch for this primitive, as Eliot suggested? This would put it in line with the other primitives (and make it slightly cheaper to use the skewed VM time). > > - Bert - There is no requirement to touch the VM, the current implementation in Cog/Spur is sufficient. Levente's suggestion is a nice enhancement but not a requirement. I have already added this to the UTCDateAndTime package in such a way that Levente's approach is used if the VM supports it, otherwise my original implementation is used at the cost of one extra Array instantiation when calling DateAndTime now. I would not want to change the current primitive, but it would be easy to add an additional one with a different name such that a transition could be done at a later time if someone wanted to do so. This is not a numbered primitive, so it is not a problem to add a different implementation with a slightly different name. >From the point of view of UTCDateAndTime, using the Smalltalk epoch would be a disadvantage because Olson time zone tables are based on Posix epoch. This means that you would be converting Posix -> Smalltalk in the VM, then converting it back to the Posix time base in the image. The background on this is that I would like to be able to do a clean integration of TimeZoneDatabase (the Olson tz tables) with DateAndTime, and get rid of the historical baggage associated with Squeak's original reliance on local time in the VM. The overall result should be much easier to understand and test, and will use concepts that are well documented on wikipedia. Dave > > On 15.03.2016, at 02:50, David T. Lewis wrote: > > > > Urk. Sorry for the confusion, but I was looking at the wrong image and I see > > now that my original statement was correct: > > > > "I had the same idea, and I already implemented it in trunk interpreter > > VMMaker, but it is probably not in oscog yet. I did not add it on the > > image side, although we could do so if we update the VMs." > > > > This is in the trunk VMM (interpreter VM), though not in Cog/Spur yet. Better > > yet, it already works with Levente's idea (see below) of passing the DateAndTime > > instance to the primitive. No further changes to the primitive are needed to > > do this. > > > > Therefore the following works in a Squeak 4.6 image with UTCDateAndTime loaded, > > and running on an interpreter VM: > > > > DateAndTime>>initializeFromPrimitive > > ^Time primPosixMicrosecondClockWithOffset: self > > > > DateAndTime basicNew initializeFromPrimitive ==> 2016-03-14T21:38:49.81355-04:00 > > > > So I think this is a very good idea that just needs a couple of minor VM > > updates to make it available. > > > > Dave > > > > > > On Sun, Mar 13, 2016 at 03:03:55PM -0400, David T. Lewis wrote: > >> Apologies, this is not right. I was replying from a cell phone and my > >> recollection was wrong. > >> > >> I did at one point implement a #primitiveUtcWithOffset that could receive > >> an array of size two as an argument into which the result values are stored, > >> instead if allocating the array in the primitive. However, I did *not* commit > >> it to VMMaker, and it is not in any currently available VMs. > >> > >> I think I decided at the time that this approach was dangerous because it > >> would invite problems in cases involving multiple processes, where some > >> other process might call the primitive using the same array. In that case > >> the time value in the array would magically change without the first process > >> being aware. > >> > >> I still think that it is a good idea, but maybe not worth the risk unless > >> there is a noticable affect of performance or GC activity. Of course, adding > >> the capability to the primitive would not force anyone to actually use it > >> that way. > >> > >> Sorry for the misinformation. > >> > >> Dave > >> > >> > >> On Sat, Mar 12, 2016 at 11:37:55PM -0500, David T. Lewis wrote: > >>> I had the same idea, and I already implemented it in trunk interpreter > >>> VMMaker, but it is probably not in oscog yet. I did not add it on the > >>> image side, although we could do so if we update the VMs. > >>> > >>> Dave > >>> > >>>> I always forget to mention, even though I have had this idea since you had > >>>> introduced primitiveUtcWithOffset, that it would be better if the > >>>> primitive could take an optional argument to store the values in the first > >>>> two slots of it instead of creating a new Array. If it's too much burden > >>>> to accept any object, then the argument type can be limited to Array. > >>>> This change would make it possible to decrease the GC pressure when many > >>>> timestamps are created in a row. > >>>> > >>>> Levente > >>>> > >>>> On Sat, 12 Mar 2016, David T. Lewis wrote: > >>>> > >>>>> On Mon, Mar 07, 2016 at 12:21:38AM -0500, David T. Lewis wrote: > >>>>>> On Sun, May 24, 2015 at 12:36:02PM -0400, David T. Lewis wrote: > >>>>>>> UTCDateAndTime is a UTC based implementation of class DateAndTime with > >>>>>>> one instance variable representing the magnitude of the point in time, > >>>>>>> and another representing local time zone offset. > >>>>>> > >>>>>> I have updated the UTCDateAndTime package to make it loadable in the > >>>>>> latest > >>>>>> Squeak trunk and Spur. > >>>>> > >>>>> Has anyone looked at this yet? Any interest? > >>>>> > >>>>> Dave > >>>>> > >>>>>> > >>>>>> A new Monticello repository is at > >>>>>> http://www.squeaksource.com/UTCDateAndTime. > >>>>>> The home page (with a new SAR) is at > >>>>>> http://wiki.squeak.org/squeak/6197. > >>>>>> > >>>>>> Starting with an updated trunk image, you can load UTCDateAndTime in > >>>>>> two ways: > >>>>>> > >>>>>> 1) Open the http://www.squeaksource.com/UTCDateAndTime repository, and > >>>>>> load > >>>>>> the MCZ files in sequence beginning with Chronology-Core-dtl.3. > >>>>>> > >>>>>> 2) In a preferences browser, in category 'updates' set the 'Update URL' > >>>>>> preference to 'http://www.squeaksource.com/UTCDateAndTime', and do > >>>>>> world -> help... -> update code from server. > >>>>>> > >>>>>> The main objective of UTCDateAndTime is to make DateAndTime > >>>>>> conceptually > >>>>>> simpler, but a happy side effect is that it is also significantly > >>>>>> faster > >>>>>> than the old implementation. > >>>>>> > >>>>>> Dave > >>>>> > >>>>> > >>>> > >>> > >>> > >>> > >>> > > > > > From maxleske at gmail.com Wed Mar 16 07:21:41 2016 From: maxleske at gmail.com (Max Leske) Date: Wed Mar 16 07:21:46 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> Thanks Bert, I?ll check but I?m pretty sure I am. I?ll take a look at the test cases in question too to make sure its not the tests. > On 13 Mar 2016, at 23:24, squeak-dev-request@lists.squeakfoundation.org wrote: > > Are you using the latest trunk image? It should be fixed. > > - Bert - > > >> On 12.03.2016, at 09:45, Max Leske > wrote: >> >> Hi, >> >> The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). >> >> I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? >> >> Cheers, >> Max -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160316/92c59892/attachment.htm From commits at source.squeak.org Wed Mar 16 10:09:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 10:09:54 2016 Subject: [squeak-dev] The Inbox: System-bf.806.mcz Message-ID: Bert Freudenberg uploaded a new version of System to project The Inbox: http://source.squeak.org/inbox/System-bf.806.mcz ==================== Summary ==================== Name: System-bf.806 Author: bf Time: 16 March 2016, 11:09:37.866243 am UUID: 017e0ba9-ac48-49e9-9959-2c8cabf65abe Ancestors: System-eem.805 Make senders of preference change messages findable. With this change, the only sender of e.g. swapMouseButtonsChanged will be found. Needs Kernel-bf.1006 to actually work. =============== Diff against System-eem.805 =============== Item was added: + ----- Method: Preference class>>isChangeSelector: (in category 'browsing support') ----- + isChangeSelector: aLiteral + ^Preferences isChangeSelector: aLiteral! Item was added: + ----- Method: Preference>>changeSelector (in category 'accessing') ----- + changeSelector + ^changeSelector! Item was changed: ----- Method: Preference>>notifyInformeeOfChange (in category 'change notification') ----- notifyInformeeOfChange "If there is a changeInformee, notify her that I have changed value" + + + "To find this method as sender of all changeSelectors" changeInformee ifNotNil: [changeInformee perform: changeSelector]! Item was added: + ----- Method: Preferences class>>isChangeSelector: (in category 'reacting to change') ----- + isChangeSelector: aLiteral + ^preferencesDictionary anySatisfy: [:pref | + aLiteral = pref changeSelector]! From commits at source.squeak.org Wed Mar 16 10:10:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 10:10:12 2016 Subject: [squeak-dev] The Inbox: Kernel-bf.1006.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-bf.1006.mcz ==================== Summary ==================== Name: Kernel-bf.1006 Author: bf Time: 16 March 2016, 11:09:47.742872 am UUID: a907e233-dc3a-44f7-92a8-57f0cac8e089 Ancestors: Kernel-eem.1005 Provide a pragma to annotate senders of messages that would otherwise not be found, by invoking a custom hasLiteral: test on the methodClass. For example use see System-bf.806 =============== Diff against Kernel-eem.1005 =============== Item was changed: ----- Method: Pragma>>hasLiteral: (in category 'testing') ----- hasLiteral: aLiteral ^keyword == aLiteral + or: [(arguments hasLiteral: aLiteral) + or: [keyword == #hasLiteralTest: and: [ + self methodClass perform: arguments first with: aLiteral]]]! - or: [arguments hasLiteral: aLiteral]! From commits at source.squeak.org Wed Mar 16 13:34:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 13:34:47 2016 Subject: [squeak-dev] The Trunk: Tools-mt.678.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.678.mcz ==================== Summary ==================== Name: Tools-mt.678 Author: mt Time: 16 March 2016, 2:34:21.339033 pm UUID: db77a698-d959-4e09-97d3-9011979a9723 Ancestors: Tools-topa.677 Fixes bug in Hierarchy Browser related to subclassing and class-list updating. Might be a regression fix caused by some recent updates. Note that we might want to establish the same update mechanism as in other CodeHolder subclasses, which is #stepAt:. At the moment, Hierarchy Browsers do not recognize general changes in the class hierarchy - only if that change origins from within that hierarchy browser. =============== Diff against Tools-topa.677 =============== Item was removed: - ----- Method: HierarchyBrowser>>changed: (in category 'initialization') ----- - changed: sym - sym == #classList ifTrue: [self updateAfterClassChange]. - super changed: sym! Item was added: + ----- Method: HierarchyBrowser>>copyClass (in category 'class functions') ----- + copyClass + + super copyClass. + self updateAfterClassChange.! Item was added: + ----- Method: HierarchyBrowser>>defineClass:notifying: (in category 'class functions') ----- + defineClass: defString notifying: aController + + super defineClass: defString notifying: aController. + self updateAfterClassChange.! Item was added: + ----- Method: HierarchyBrowser>>defineTrait:notifying: (in category 'traits') ----- + defineTrait: defString notifying: aController + + super defineTrait: defString notifying: aController. + self updateAfterClassChange.! Item was changed: ----- Method: HierarchyBrowser>>initHierarchyForClass: (in category 'initialization') ----- initHierarchyForClass: aClassOrMetaClass | nonMetaClass superclasses | centralClass := aClassOrMetaClass. nonMetaClass := aClassOrMetaClass theNonMetaClass. self systemOrganizer: SystemOrganization. metaClassIndicated := aClassOrMetaClass isMeta. classDisplayList := OrderedCollection new. (superclasses := nonMetaClass allSuperclasses reversed) withIndexDo: [ : each : indent | classDisplayList add: (String streamContents: [ : stream | indent - 1 timesRepeat: [ stream nextPutAll: ' ' ]. stream nextPutAll: each name ]) ]. nonMetaClass allSubclassesWithLevelDo: [ : eachClass : lvl | classDisplayList add: (String streamContents: [ : stream | lvl timesRepeat: [ stream nextPutAll: ' ' ]. stream nextPutAll: eachClass name ]) ] startingLevel: superclasses size. + + self changed: #classList. self selectClass: nonMetaClass! Item was added: + ----- Method: HierarchyBrowser>>renameClass (in category 'class functions') ----- + renameClass + + super renameClass. + self updateAfterClassChange.! From commits at source.squeak.org Wed Mar 16 13:36:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 13:36:45 2016 Subject: [squeak-dev] The Trunk: Tools-mt.679.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.679.mcz ==================== Summary ==================== Name: Tools-mt.679 Author: mt Time: 16 March 2016, 2:36:07.723033 pm UUID: f184dac2-4ba4-4030-a394-4b8031592101 Ancestors: Tools-mt.678 Fixes styling bug when using the subclassing template. =============== Diff against Tools-mt.678 =============== Item was changed: ----- Method: Browser>>aboutToStyle: (in category 'code pane') ----- aboutToStyle: aStyler "This is a notification that aStyler is about to re-style its text. Set the classOrMetaClass in aStyler, so that identifiers will be resolved correctly. Answer true to allow styling to proceed, or false to veto the styling" | type | self isModeStyleable ifFalse: [^false]. type := self editSelection. (#(newMessage editMessage editClass newClass) includes: type) ifFalse:[^false]. + aStyler classOrMetaClass: ((type = #editClass or: [type = #newClass]) ifFalse:[self selectedClassOrMetaClass]). - aStyler classOrMetaClass: (type = #editClass ifFalse:[self selectedClassOrMetaClass]). ^true! From eliot.miranda at gmail.com Wed Mar 16 16:03:20 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 16 16:03:24 2016 Subject: [squeak-dev] The Inbox: Kernel-bf.1006.mcz In-Reply-To: <56e93108.82008d0a.fb288.0776SMTPIN_ADDED_MISSING@mx.google.com> References: <56e93108.82008d0a.fb288.0776SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <1B7E8F71-DB93-47EF-B8A9-FB36F50E1111@gmail.com> I like it! _,,,^..^,,,_ (phone) > On Mar 16, 2016, at 8:38 AM, commits@source.squeak.org wrote: > > Bert Freudenberg uploaded a new version of Kernel to project The Inbox: > http://source.squeak.org/inbox/Kernel-bf.1006.mcz > > ==================== Summary ==================== > > Name: Kernel-bf.1006 > Author: bf > Time: 16 March 2016, 11:09:47.742872 am > UUID: a907e233-dc3a-44f7-92a8-57f0cac8e089 > Ancestors: Kernel-eem.1005 > > Provide a pragma to annotate senders of messages that would otherwise not be found, by invoking a custom hasLiteral: test on the methodClass. > > For example use see System-bf.806 > > =============== Diff against Kernel-eem.1005 =============== > > Item was changed: > ----- Method: Pragma>>hasLiteral: (in category 'testing') ----- > hasLiteral: aLiteral > ^keyword == aLiteral > + or: [(arguments hasLiteral: aLiteral) > + or: [keyword == #hasLiteralTest: and: [ > + self methodClass perform: arguments first with: aLiteral]]]! > - or: [arguments hasLiteral: aLiteral]! > > From eliot.miranda at gmail.com Wed Mar 16 16:09:38 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 16 16:09:43 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz In-Reply-To: References: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Levente, > On Mar 8, 2016, at 1:21 PM, Levente Uzonyi wrote: > >> On Tue, 8 Mar 2016, Nicolas Cellier wrote: >> >> 2016-03-08 21:18 GMT+01:00 Nicolas Cellier : >> >> 2016-03-08 21:06 GMT+01:00 : >> Levente Uzonyi uploaded a new version of Collections to project The Trunk: >> http://source.squeak.org/trunk/Collections-ul.679.mcz >> >> ==================== Summary ==================== >> >> Name: Collections-ul.679 >> Author: ul >> Time: 8 March 2016, 5:24:30.010047 pm >> UUID: 9f4b6193-4632-48c7-a99f-ee37923bf28b >> Ancestors: Collections-eem.678 >> >> #occurrencesOf: revamp: >> - optimized Bag's implementation >> - added optimized versions to ArrayedCollection, String and ByteArray >> >> =============== Diff against Collections-eem.678 =============== >> >> Item was added: >> + ----- Method: ArrayedCollection>>occurrencesOf: (in category 'testing') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to anObject. Optimized version." >> + >> + | tally | >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. >> + ^tally! >> >> Item was changed: >> ----- Method: Bag>>occurrencesOf: (in category 'testing') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to anObject. Optimized version." >> - occurrencesOf: anObject >> - "Refer to the comment in Collection|occurrencesOf:." >> >> + ^contents at: anObject ifAbsent: 0! >> - (self includes: anObject) >> - ifTrue: [^contents at: anObject] >> - ifFalse: [^0]! >> >> Item was added: >> + ----- Method: ByteArray>>occurrencesOf: (in category 'as yet unclassified') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to anObject. Optimized version." >> + >> + | tally | >> + anObject isInteger ifFalse: [ ^0 ]. >> + anObject negative ifTrue: [ ^0 ]. >> + anObject > 255 ifTrue: [ ^0 ]. >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) = anObject ifTrue: [ tally := tally + 1 ] ]. >> + ^tally! >> >> Item was added: >> + ----- Method: String>>occurrencesOf: (in category 'testing') ----- >> + occurrencesOf: anObject >> + "Answer how many of the receiver's elements are equal to anObject. Optimized version." >> + >> + | tally | >> + anObject isCharacter ifFalse: [ ^0 ]. >> + tally := 0. >> + 1 to: self size do: [ :index | >> + (self at: index) == anObject ifTrue: [ tally := tally + 1 ] ]. >> + ^tally! >> it could have been >> + anObject isCharacter ifFalse: [ ^0 ]. >> + ^super occurrencesOf: anObject > > But this way we save a message send, and (ab)use the fact that #== is faster than #= and is still correct (in Spur). :) Have you checked whether #== is faster in ByteArray too? The JIT doesn't always inline SmallInteger code for special selectors since they don't always predict SmallIntegers well. The JIT inlines #= & #~= when either the receiver or arg are literal integers, but neither are above so there will be no inlining. There will be with #==, and that makes the ifTrue: much faster because it gets optimised to a conditional jump instruction, not a test in true or false. > >> and/or in ByteString >> + anObject isCharacter ifFalse: [ ^0 ]. >> + anObject asInteger < 255 ifFalse: [ ^0 ]. >> snip... >> Hem >> + anObject asInteger <= 255 ifFalse: [ ^0 ]. >> or >> + anObject asInteger < 256 ifFalse: [ ^0 ]. >> or >> + anObject asInteger > 255 ifTrue: [ ^0 ]. > > Right, but then you'd feel like adding it to ByteSymbol as well. > > Levente > > From Marcel.Taeumel at hpi.de Wed Mar 16 17:48:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Mar 16 18:16:46 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: Message-ID: <1458150481295-4884919.post@n4.nabble.com> Mabye we need a simple way to link bindings across tools. Then, for example, we could simple connect a Workspace window to the text box in the Inspector (resp. Object Explorer) and all would share the same bindings. Then, you could simply select stuff in the Object Explorer, evaluate "x := self" and you would have access to x in that other Workspace (resp. Inspector's text box). The drag-and-drop idea is also nice. Best, Marcel -- View this message in context: http://forum.world.st/Injecting-objects-into-Workspace-bindings-tp4884420p4884919.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Mar 16 17:58:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Mar 16 18:26:47 2016 Subject: [squeak-dev] Re: cmdGesturesEnabled false -> no halos ? In-Reply-To: <56DAF731.3080709@zogotounga.net> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> <56DAF731.3080709@zogotounga.net> Message-ID: <1458151081167-4884920.post@n4.nabble.com> Hi there, I don't consider halos as being programmer-specific only. Any application can use it. I just recently tidied up "HaloMorph" and extracted the base class "SimpleHaloMorph." This should make it really simple for applications to use any custom halo for any specific morph in an application. Best, Marcel -- View this message in context: http://forum.world.st/cmdGesturesEnabled-false-no-halos-tp4882669p4884920.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Wed Mar 16 18:27:38 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 16 18:27:42 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> Message-ID: <709E1483-BD73-43DB-B1A7-7E41EA20F144@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160316/35220096/smime.bin From eliot.miranda at gmail.com Wed Mar 16 18:57:11 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 16 18:57:14 2016 Subject: [squeak-dev] Re: cmdGesturesEnabled false -> no halos ? In-Reply-To: <1458151081167-4884920.post@n4.nabble.com> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> <56DAF731.3080709@zogotounga.net> <1458151081167-4884920.post@n4.nabble.com> Message-ID: On Wed, Mar 16, 2016 at 10:58 AM, marcel.taeumel wrote: > Hi there, > > I don't consider halos as being programmer-specific only. Any application > can use it. I just recently tidied up "HaloMorph" and extracted the base > class "SimpleHaloMorph." This should make it really simple for applications > to use any custom halo for any specific morph in an application. > +1. But then one would want to be able to filter-out the programmer-specifc ones, is this easy? And how the interface makes it obvious to the user one can invoke halos is another issue. But really I just want to say that occasionally in trunk halos will scroll. I attached halos to a transcript the other day, scrolled the (rather full) contents, and the halos moved. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/cmdGesturesEnabled-false-no-halos-tp4882669p4884920.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160316/3ec8d407/attachment.htm From asqueaker at gmail.com Wed Mar 16 18:57:50 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 16 18:58:34 2016 Subject: [squeak-dev] cmdGesturesEnabled false -> no halos ? In-Reply-To: References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> <56DAF59A.5040301@zogotounga.net> Message-ID: On Linux, if you disable the #swapMouseButtons preference, you can use Control + Blue-button-drag on a window to change its size. In the apropriate app, a good gesture for zooming too. Use without Control key to move. On Sun, Mar 6, 2016 at 10:59 AM, Kjell Godo wrote: > i would like to use gestures to do rapid zooming > > > On Saturday, March 5, 2016, St?phane Rollandin > wrote: >>> >>> Is anyone using gestures ? >> >> >> What are gestures ? >> >> Stef >> >> > > > From bert at freudenbergs.de Wed Mar 16 18:58:30 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 16 18:58:36 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <1458150481295-4884919.post@n4.nabble.com> References: <1458150481295-4884919.post@n4.nabble.com> Message-ID: <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> > On 16.03.2016, at 18:48, marcel.taeumel wrote: > > Mabye we need a simple way to link bindings across tools. Then, for example, > we could simple connect a Workspace window to the text box in the Inspector > (resp. Object Explorer) and all would share the same bindings. Then, you > could simply select stuff in the Object Explorer, evaluate "x := self" and > you would have access to x in that other Workspace (resp. Inspector's text > box). Not a bad idea ? what could be a UI for connecting workspaces? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160316/f83e8172/smime.bin From commits at source.squeak.org Wed Mar 16 19:30:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 19:30:56 2016 Subject: [squeak-dev] The Trunk: Morphic-kfr.1094.mcz Message-ID: Karl Ramberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1094.mcz ==================== Summary ==================== Name: Morphic-kfr.1094 Author: kfr Time: 16 March 2016, 8:29:46.384817 pm UUID: 94780b73-cfa6-44fd-b7ed-ee2807f9ceae Ancestors: Morphic-mt.1093 Snap dropped morphs to grid if gridding is on =============== Diff against Morphic-mt.1093 =============== Item was changed: ----- Method: PasteUpMorph>>acceptDroppingMorph:event: (in category 'dropping/grabbing') ----- acceptDroppingMorph: dropped event: evt "The supplied morph, known to be acceptable to the receiver, is now to be assimilated; the precipitating event is supplied" | aMorph | aMorph := self morphToDropFrom: dropped. self isWorldMorph ifTrue:["Add the given morph to this world and start stepping it if it wants to be." self addMorphFront: aMorph. (aMorph fullBounds intersects: self viewBox) ifFalse: [Beeper beep. aMorph position: self bounds center]] ifFalse:[super acceptDroppingMorph: aMorph event: evt]. aMorph submorphsDo: [:m | (m isKindOf: HaloMorph) ifTrue: [m delete]]. aMorph allMorphsDo: "Establish any penDown morphs in new world" [:m | | tfm mm | m player ifNotNil: [m player getPenDown ifTrue: [((mm := m player costume) notNil and: [(tfm := mm owner transformFrom: self) notNil]) ifTrue: [self noteNewLocation: (tfm localPointToGlobal: mm referencePosition) forPlayer: m player]]]]. self isPartsBin ifTrue: [aMorph isPartsDonor: true. aMorph stopSteppingSelfAndSubmorphs. aMorph suspendEventHandler] ifFalse: [self world startSteppingSubmorphsOf: aMorph]. " self presenter morph: aMorph droppedIntoPasteUpMorph: self." + self griddingOn ifTrue: [aMorph position: (self gridPoint: aMorph position)]. - self showingListView ifTrue: [self sortSubmorphsBy: (self valueOfProperty: #sortOrder). self currentWorld abandonAllHalos]. self bringTopmostsToFront. ! From commits at source.squeak.org Wed Mar 16 21:30:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 21:30:54 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1006.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1006.mcz ==================== Summary ==================== Name: Kernel-bf.1006 Author: bf Time: 16 March 2016, 11:09:47.742872 am UUID: a907e233-dc3a-44f7-92a8-57f0cac8e089 Ancestors: Kernel-eem.1005 Provide a pragma to annotate senders of messages that would otherwise not be found, by invoking a custom hasLiteral: test on the methodClass. For example use see System-bf.806 =============== Diff against Kernel-eem.1005 =============== Item was changed: ----- Method: Pragma>>hasLiteral: (in category 'testing') ----- hasLiteral: aLiteral ^keyword == aLiteral + or: [(arguments hasLiteral: aLiteral) + or: [keyword == #hasLiteralTest: and: [ + self methodClass perform: arguments first with: aLiteral]]]! - or: [arguments hasLiteral: aLiteral]! From commits at source.squeak.org Wed Mar 16 21:31:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 21:31:23 2016 Subject: [squeak-dev] The Trunk: System-bf.806.mcz Message-ID: Bert Freudenberg uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-bf.806.mcz ==================== Summary ==================== Name: System-bf.806 Author: bf Time: 16 March 2016, 11:09:37.866243 am UUID: 017e0ba9-ac48-49e9-9959-2c8cabf65abe Ancestors: System-eem.805 Make senders of preference change messages findable. With this change, the only sender of e.g. swapMouseButtonsChanged will be found. Needs Kernel-bf.1006 to actually work. =============== Diff against System-eem.805 =============== Item was added: + ----- Method: Preference class>>isChangeSelector: (in category 'browsing support') ----- + isChangeSelector: aLiteral + ^Preferences isChangeSelector: aLiteral! Item was added: + ----- Method: Preference>>changeSelector (in category 'accessing') ----- + changeSelector + ^changeSelector! Item was changed: ----- Method: Preference>>notifyInformeeOfChange (in category 'change notification') ----- notifyInformeeOfChange "If there is a changeInformee, notify her that I have changed value" + + + "To find this method as sender of all changeSelectors" changeInformee ifNotNil: [changeInformee perform: changeSelector]! Item was added: + ----- Method: Preferences class>>isChangeSelector: (in category 'reacting to change') ----- + isChangeSelector: aLiteral + ^preferencesDictionary anySatisfy: [:pref | + aLiteral = pref changeSelector]! From commits at source.squeak.org Wed Mar 16 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 16 22:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160316225502.12410.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-March/009487.html Name: Tools-mt.678 Ancestors: Tools-topa.677 Fixes bug in Hierarchy Browser related to subclassing and class-list updating. Might be a regression fix caused by some recent updates. Note that we might want to establish the same update mechanism as in other CodeHolder subclasses, which is #stepAt:. At the moment, Hierarchy Browsers do not recognize general changes in the class hierarchy - only if that change origins from within that hierarchy browser. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009488.html Name: Tools-mt.679 Ancestors: Tools-mt.678 Fixes styling bug when using the subclassing template. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009489.html Name: Morphic-kfr.1094 Ancestors: Morphic-mt.1093 Snap dropped morphs to grid if gridding is on ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009490.html Name: Kernel-bf.1006 Ancestors: Kernel-eem.1005 Provide a pragma to annotate senders of messages that would otherwise not be found, by invoking a custom hasLiteral: test on the methodClass. For example use see System-bf.806 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009491.html Name: System-bf.806 Ancestors: System-eem.805 Make senders of preference change messages findable. With this change, the only sender of e.g. swapMouseButtonsChanged will be found. Needs Kernel-bf.1006 to actually work. ============================================= From eliot.miranda at gmail.com Thu Mar 17 00:43:25 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 17 00:43:28 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> Message-ID: On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg wrote: > > > On 16.03.2016, at 18:48, marcel.taeumel wrote: > > > > Mabye we need a simple way to link bindings across tools. Then, for > example, > > we could simple connect a Workspace window to the text box in the > Inspector > > (resp. Object Explorer) and all would share the same bindings. Then, you > > could simply select stuff in the Object Explorer, evaluate "x := self" > and > > you would have access to x in that other Workspace (resp. Inspector's > text > > box). > > Not a bad idea ? what could be a UI for connecting workspaces? > How about a test for Environments? Create a subclass of Environment with a singleton called, say, Grabbag. Implement a doesNotUnderstand: method in Grabbag that turns one-argument keyword messages such as Grabbag theSelector: theValue into at: theSelector put: theValue and unary messages into at: so that Grabbag theSelector is equivalent to Grabbag at: theSelector. Then include Grabbag in all workspaces. From Smalltalk one can do Grabbag at: #mine put: greedySeagull or Grabbag mineMineMine: flockOfGreedySeagulls, but in Workspaces (with the default option of importing Grabbag on) one can simply say dorysLocation := #whatWasTheQuestionAgain - Bert - _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160316/92e1ff6c/attachment.htm From bert at freudenbergs.de Thu Mar 17 09:58:33 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 17 10:42:56 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> Message-ID: <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/fffd84ba/smime.bin From karlramberg at gmail.com Thu Mar 17 11:42:07 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 11:42:10 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: On Thu, Mar 17, 2016 at 10:58 AM, Bert Freudenberg wrote: > > On 17.03.2016, at 01:43, Eliot Miranda wrote: > > > > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg > wrote: > >> >> > On 16.03.2016, at 18:48, marcel.taeumel wrote: >> > >> > Mabye we need a simple way to link bindings across tools. Then, for >> example, >> > we could simple connect a Workspace window to the text box in the >> Inspector >> > (resp. Object Explorer) and all would share the same bindings. Then, you >> > could simply select stuff in the Object Explorer, evaluate "x := self" >> and >> > you would have access to x in that other Workspace (resp. Inspector's >> text >> > box). >> >> Not a bad idea ? what could be a UI for connecting workspaces? >> > > How about a test for Environments? Create a subclass of Environment with > a singleton called, say, Grabbag. Implement a doesNotUnderstand: method in > Grabbag that turns one-argument keyword messages such as Grabbag > theSelector: theValue into at: theSelector put: theValue and unary messages > into at: so that Grabbag theSelector is equivalent to Grabbag at: > theSelector. Then include Grabbag in all workspaces. From Smalltalk one > can do Grabbag at: #mine put: greedySeagull or Grabbag mineMineMine: > flockOfGreedySeagulls, but in Workspaces (with the default option of > importing Grabbag on) one can simply say dorysLocation := > #whatWasTheQuestionAgain > > > That?s for when we wanted to always share bindings by default, sure. Not > much UI needed for that. > > But I think I?d like workspaces to be isolated by default. And in that > case we?d need some discoverable UI for making them shared. > > Another idea would be to only share selected bindings. We could always > show a workspace?s bindings in a side panel (which may be useful in its own > right) and then dragging a binding to another workspace would make it > shared, so changes to it on one would be reflected in the other. > +1 Best, Karl > > - Bert - > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/8e358f6f/attachment.htm From lecteur at zogotounga.net Thu Mar 17 14:41:04 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Thu Mar 17 14:41:05 2016 Subject: [squeak-dev] Re: cmdGesturesEnabled false -> no halos ? In-Reply-To: <1458151081167-4884920.post@n4.nabble.com> References: <56DABEE7.4000702@zogotounga.net> <95C95CAE-5602-4894-8563-77D6C8927651@freudenbergs.de> <56DAF731.3080709@zogotounga.net> <1458151081167-4884920.post@n4.nabble.com> Message-ID: <56EAC200.8020608@zogotounga.net> > I don't consider halos as being programmer-specific only. Any application > can use it. I just recently tidied up "HaloMorph" and extracted the base > class "SimpleHaloMorph." This should make it really simple for applications > to use any custom halo for any specific morph in an application. Fine, so we agree on that. Now the practical question is how to have both halos and Ctrl handling in Morph>>#handleMouseDown: where we currently find: (anEvent controlKeyPressed and: [anEvent blueButtonChanged not and: [Preferences cmdGesturesEnabled]]) ifTrue: [^ self invokeMetaMenu: anEvent]. So the catch here is that I need Preferences cmdGesturesEnabled to be true in order to have halos, but per the above test this makes my morph unable to catch a Ctrl-event. Stef From asqueaker at gmail.com Thu Mar 17 15:39:51 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 17 15:40:33 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg wrote: > > On 17.03.2016, at 01:43, Eliot Miranda wrote: > > > > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg > wrote: >> >> >> > On 16.03.2016, at 18:48, marcel.taeumel wrote: >> > >> > Mabye we need a simple way to link bindings across tools. Then, for >> > example, >> > we could simple connect a Workspace window to the text box in the >> > Inspector >> > (resp. Object Explorer) and all would share the same bindings. Then, you >> > could simply select stuff in the Object Explorer, evaluate "x := self" >> > and >> > you would have access to x in that other Workspace (resp. Inspector's >> > text >> > box). >> >> Not a bad idea ? what could be a UI for connecting workspaces? Why not just invoke the halos on the inspectors built-in workspace and clone it with the upper-green button and use that? From karlramberg at gmail.com Thu Mar 17 16:28:12 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 16:28:15 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller wrote: > On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg > wrote: > > > > On 17.03.2016, at 01:43, Eliot Miranda wrote: > > > > > > > > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg > > > wrote: > >> > >> > >> > On 16.03.2016, at 18:48, marcel.taeumel > wrote: > >> > > >> > Mabye we need a simple way to link bindings across tools. Then, for > >> > example, > >> > we could simple connect a Workspace window to the text box in the > >> > Inspector > >> > (resp. Object Explorer) and all would share the same bindings. Then, > you > >> > could simply select stuff in the Object Explorer, evaluate "x := self" > >> > and > >> > you would have access to x in that other Workspace (resp. Inspector's > >> > text > >> > box). > >> > >> Not a bad idea ? what could be a UI for connecting workspaces? > > Why not just invoke the halos on the inspectors built-in workspace and > clone it with the upper-green button and use that? > > This would break workflow I think because like Jacob wrote, you open a file in a Workspace and you need a reference to that from another already open Workspace. How about another copy command, like 'copy as reference' and then you could paste it in another Workspace ? Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/9092756a/attachment.htm From karlramberg at gmail.com Thu Mar 17 16:47:37 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 16:47:41 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: Actually most is all ready implemented. You can open a inspector on variable bindings in a Workspace and drag out TransferMorphs from that. The only thing needed is for Workspaces to bind to the passenger instead of the dropped TransferMorph. Best, Karl On Thu, Mar 17, 2016 at 5:28 PM, karl ramberg wrote: > > > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller wrote: > >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg >> wrote: >> > >> > On 17.03.2016, at 01:43, Eliot Miranda wrote: >> > >> > >> > >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg < >> bert@freudenbergs.de> >> > wrote: >> >> >> >> >> >> > On 16.03.2016, at 18:48, marcel.taeumel >> wrote: >> >> > >> >> > Mabye we need a simple way to link bindings across tools. Then, for >> >> > example, >> >> > we could simple connect a Workspace window to the text box in the >> >> > Inspector >> >> > (resp. Object Explorer) and all would share the same bindings. Then, >> you >> >> > could simply select stuff in the Object Explorer, evaluate "x := >> self" >> >> > and >> >> > you would have access to x in that other Workspace (resp. Inspector's >> >> > text >> >> > box). >> >> >> >> Not a bad idea ? what could be a UI for connecting workspaces? >> >> Why not just invoke the halos on the inspectors built-in workspace and >> clone it with the upper-green button and use that? >> >> This would break workflow I think because like Jacob wrote, you open a > file in a Workspace and you need a reference to that from another already > open Workspace. > > How about another copy command, like 'copy as reference' and then you > could paste it in another Workspace ? > > > Best, > Karl > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/60a79f37/attachment.htm From ma.chris.m at gmail.com Thu Mar 17 16:55:59 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Mar 17 16:56:42 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: All Jakob had to do was "do it" on: myXml := '.... all kinds of XML ... ' He now has access to myXml. Then replace all the text in the workspace with that from the other workspace. Done. I guess I see Workspaces for learning and discovery for newbies. Short, simple, explorations of syntax and class library. Attempting to do work as complex as parsing a large XML is going to present further challenges above and beyond accessing an object. If someone feels the need to "link workspaces" they really should stop and consider just making a class. In fact, I think linked workspaces would lead a newbie down the wrong path.. On Thu, Mar 17, 2016 at 11:28 AM, karl ramberg wrote: > > > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller wrote: >> >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg >> wrote: >> > >> > On 17.03.2016, at 01:43, Eliot Miranda wrote: >> > >> > >> > >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg >> > >> > wrote: >> >> >> >> >> >> > On 16.03.2016, at 18:48, marcel.taeumel >> >> > wrote: >> >> > >> >> > Mabye we need a simple way to link bindings across tools. Then, for >> >> > example, >> >> > we could simple connect a Workspace window to the text box in the >> >> > Inspector >> >> > (resp. Object Explorer) and all would share the same bindings. Then, >> >> > you >> >> > could simply select stuff in the Object Explorer, evaluate "x := >> >> > self" >> >> > and >> >> > you would have access to x in that other Workspace (resp. Inspector's >> >> > text >> >> > box). >> >> >> >> Not a bad idea ? what could be a UI for connecting workspaces? >> >> Why not just invoke the halos on the inspectors built-in workspace and >> clone it with the upper-green button and use that? >> > This would break workflow I think because like Jacob wrote, you open a file > in a Workspace and you need a reference to that from another already open > Workspace. > > How about another copy command, like 'copy as reference' and then you could > paste it in another Workspace ? > > > Best, > Karl From karlramberg at gmail.com Thu Mar 17 17:06:54 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 17:06:57 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: Workspaces are great for scripting and exploring ideas etc. And working with already existing objects. It's not so good for developing but very good for other important computing and learning needs. Best, Karl On Thu, Mar 17, 2016 at 5:55 PM, Chris Muller wrote: > All Jakob had to do was "do it" on: > > myXml := '.... all kinds of XML ... ' > > He now has access to myXml. Then replace all the text in the > workspace with that from the other workspace. Done. > > I guess I see Workspaces for learning and discovery for newbies. > Short, simple, explorations of syntax and class library. > > Attempting to do work as complex as parsing a large XML is going to > present further challenges above and beyond accessing an object. If > someone feels the need to "link workspaces" they really should stop > and consider just making a class. In fact, I think linked workspaces > would lead a newbie down the wrong path.. > > On Thu, Mar 17, 2016 at 11:28 AM, karl ramberg > wrote: > > > > > > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller > wrote: > >> > >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg > > >> wrote: > >> > > >> > On 17.03.2016, at 01:43, Eliot Miranda > wrote: > >> > > >> > > >> > > >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg > >> > > >> > wrote: > >> >> > >> >> > >> >> > On 16.03.2016, at 18:48, marcel.taeumel > >> >> > wrote: > >> >> > > >> >> > Mabye we need a simple way to link bindings across tools. Then, for > >> >> > example, > >> >> > we could simple connect a Workspace window to the text box in the > >> >> > Inspector > >> >> > (resp. Object Explorer) and all would share the same bindings. > Then, > >> >> > you > >> >> > could simply select stuff in the Object Explorer, evaluate "x := > >> >> > self" > >> >> > and > >> >> > you would have access to x in that other Workspace (resp. > Inspector's > >> >> > text > >> >> > box). > >> >> > >> >> Not a bad idea ? what could be a UI for connecting workspaces? > >> > >> Why not just invoke the halos on the inspectors built-in workspace and > >> clone it with the upper-green button and use that? > >> > > This would break workflow I think because like Jacob wrote, you open a > file > > in a Workspace and you need a reference to that from another already open > > Workspace. > > > > How about another copy command, like 'copy as reference' and then you > could > > paste it in another Workspace ? > > > > > > Best, > > Karl > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/cda5bc6e/attachment.htm From eliot.miranda at gmail.com Thu Mar 17 17:28:57 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 17 17:29:02 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: <802B337C-D65F-4A40-A311-351456093210@gmail.com> Hi Bert, > On Mar 17, 2016, at 2:58 AM, Bert Freudenberg wrote: > > >> On 17.03.2016, at 01:43, Eliot Miranda wrote: >> >> >> >> On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg wrote: >>> >>> > On 16.03.2016, at 18:48, marcel.taeumel wrote: >>> > >>> > Mabye we need a simple way to link bindings across tools. Then, for example, >>> > we could simple connect a Workspace window to the text box in the Inspector >>> > (resp. Object Explorer) and all would share the same bindings. Then, you >>> > could simply select stuff in the Object Explorer, evaluate "x := self" and >>> > you would have access to x in that other Workspace (resp. Inspector's text >>> > box). >>> >>> Not a bad idea ? what could be a UI for connecting workspaces? >> >> How about a test for Environments? Create a subclass of Environment with a singleton called, say, Grabbag. Implement a doesNotUnderstand: method in Grabbag that turns one-argument keyword messages such as Grabbag theSelector: theValue into at: theSelector put: theValue and unary messages into at: so that Grabbag theSelector is equivalent to Grabbag at: theSelector. Then include Grabbag in all workspaces. From Smalltalk one can do Grabbag at: #mine put: greedySeagull or Grabbag mineMineMine: flockOfGreedySeagulls, but in Workspaces (with the default option of importing Grabbag on) one can simply say dorysLocation := #whatWasTheQuestionAgain > > That?s for when we wanted to always share bindings by default, sure. Not much UI needed for that. > > But I think I?d like workspaces to be isolated by default. And in that case we?d need some discoverable UI for making them shared. > > Another idea would be to only share selected bindings. We could always show a workspace?s bindings in a side panel (which may be useful in its own right) and then dragging a binding to another workspace would make it shared, so changes to it on one would be reflected in the other. Ok, then how about generalizing my scheme above to replace the clipboard (copy paste buffer). The environment is called Clipboard; it responds to the existing API (I'm on my phone, I'm not checking, but I guess the singleton can support the existing API without too much distortion). Different default copy/paste types are stored in well-named bindings in the Clipboard environment such as #LastCutText #PreviousFiveClippedTexts #LastDeletedMorph etc. implement its of editing functionality are encouraged to follow conventions around this Clipboard environment. Paste menu items can choose a default binding to/from which to paste/copy, but a consistent gesture (eg shift) opens a menu on all potential sources in Clipboard. Clipboard is accessible from code, and by being an environment it is more accessible than the existing class Clipboard, with a more consistent API (and it doesn't /have/ to provide the MNU truck for convenient access, but it's nice to have). Clipboard gets its own inspector/explorer equipped with convenient shortcuts for flushing values, deleting stale keys, etc. Then for workspaces the paste operation can support things like pasting a value from Clipboard into a workspace-local variable if that variable name is selected, etc, so through paste and the shift gesture we can distinguish between replacing referent (the variable named by the text selection) or refacing signifier (the text that happens to be the name of the variable). > - Bert - _,,,^..^,,,_ (phone) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/30ca18dc/attachment.htm From karlramberg at gmail.com Thu Mar 17 17:30:41 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 17:30:45 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: A little ugly with the code duplication but it works ;-) Workspace>>acceptDroppingMorph: dropee event: evt inMorph: targetMorph "Return the dropee to its old position, and add a reference to it at the cursor point." | bindingName externalName | (dropee isKindOf: TransferMorph) ifTrue: [externalName := dropee passenger className. externalName := externalName isOctetString ifTrue: [externalName] ifFalse: ['a' , externalName]. bindingName := externalName translateToLowercase , dropee passenger identityHash printString. targetMorph correctSelectionWithString: bindingName , ' '. (self bindingOf: bindingName) value: dropee passenger] ifFalse: [externalName := dropee externalName. externalName := externalName isOctetString ifTrue: [externalName] ifFalse: ['a' , externalName]. bindingName := externalName translateToLowercase , dropee identityHash printString. targetMorph correctSelectionWithString: bindingName , ' '. (self bindingOf: bindingName) value: dropee]. dropee rejectDropMorphEvent: evt. ^ true"success" On Thu, Mar 17, 2016 at 6:06 PM, karl ramberg wrote: > Workspaces are great for scripting and exploring ideas etc. And working > with already existing objects. It's not so good for developing but very > good for other important computing and learning needs. > > Best, > Karl > > > On Thu, Mar 17, 2016 at 5:55 PM, Chris Muller > wrote: > >> All Jakob had to do was "do it" on: >> >> myXml := '.... all kinds of XML ... ' >> >> He now has access to myXml. Then replace all the text in the >> workspace with that from the other workspace. Done. >> >> I guess I see Workspaces for learning and discovery for newbies. >> Short, simple, explorations of syntax and class library. >> >> Attempting to do work as complex as parsing a large XML is going to >> present further challenges above and beyond accessing an object. If >> someone feels the need to "link workspaces" they really should stop >> and consider just making a class. In fact, I think linked workspaces >> would lead a newbie down the wrong path.. >> >> On Thu, Mar 17, 2016 at 11:28 AM, karl ramberg >> wrote: >> > >> > >> > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller >> wrote: >> >> >> >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg < >> bert@freudenbergs.de> >> >> wrote: >> >> > >> >> > On 17.03.2016, at 01:43, Eliot Miranda >> wrote: >> >> > >> >> > >> >> > >> >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg >> >> > >> >> > wrote: >> >> >> >> >> >> >> >> >> > On 16.03.2016, at 18:48, marcel.taeumel >> >> >> > wrote: >> >> >> > >> >> >> > Mabye we need a simple way to link bindings across tools. Then, >> for >> >> >> > example, >> >> >> > we could simple connect a Workspace window to the text box in the >> >> >> > Inspector >> >> >> > (resp. Object Explorer) and all would share the same bindings. >> Then, >> >> >> > you >> >> >> > could simply select stuff in the Object Explorer, evaluate "x := >> >> >> > self" >> >> >> > and >> >> >> > you would have access to x in that other Workspace (resp. >> Inspector's >> >> >> > text >> >> >> > box). >> >> >> >> >> >> Not a bad idea ? what could be a UI for connecting workspaces? >> >> >> >> Why not just invoke the halos on the inspectors built-in workspace and >> >> clone it with the upper-green button and use that? >> >> >> > This would break workflow I think because like Jacob wrote, you open a >> file >> > in a Workspace and you need a reference to that from another already >> open >> > Workspace. >> > >> > How about another copy command, like 'copy as reference' and then you >> could >> > paste it in another Workspace ? >> > >> > >> > Best, >> > Karl >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/89cbf18d/attachment.htm From tim at rowledge.org Thu Mar 17 17:36:54 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 17 17:36:59 2016 Subject: [squeak-dev] RaspberryPI 3 Squeak performance Message-ID: Just as an FYI - the new Pi 3 performs quite well with the COG/Spur Squeak we use for Scratch. Although the original Green Book benchmarks are not really very useful any more it is always fun to see what the number is and for a Pi3 we now hit ~100 Dorado. For $35 frikkin? bucks! I suspect the Dorados used more cost of electricity per day than that. And for the larger ?Shootout? benchmarks that some prefer, the results are fairly impressive. nbody -42.6 bintree - 30.4 chredux - 53.9 threadring - 67.9 - all around 30% faster than the Pi2. Also interesting is the comparison with some old result Eliot logged for his 2012 MacBook Pro 2.2GHz quad i7 running the closure interpreter. nbody - 40.9 bintree 30.6 chredux - 30.7 threadring - 9.2 I think that?s quite good. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim As far as we know, our computer has never had an undetected error. From karlramberg at gmail.com Thu Mar 17 17:38:52 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 17:38:54 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: Better: Workspace>>acceptDroppingMorph: dropee event: evt inMorph: targetMorph "Return the dropee to its old position, and add a reference to it at the cursor point." | bindingName externalName reference | (dropee isKindOf: TransferMorph) ifTrue: [reference := dropee passenger. externalName := dropee passenger className] ifFalse: [reference := dropee. dropee externalName]. externalName := externalName isOctetString ifTrue: [externalName] ifFalse: ['a' , externalName]. bindingName := externalName translateToLowercase , reference identityHash printString. targetMorph correctSelectionWithString: bindingName , ' '. (self bindingOf: bindingName) value: reference. dropee rejectDropMorphEvent: evt. ^ true"success" On Thu, Mar 17, 2016 at 6:30 PM, karl ramberg wrote: > A little ugly with the code duplication but it works ;-) > > Workspace>>acceptDroppingMorph: dropee event: evt inMorph: targetMorph > "Return the dropee to its old position, and add a reference to it at the > cursor point." > | bindingName externalName | > (dropee isKindOf: TransferMorph) > ifTrue: [externalName := dropee passenger className. > externalName := externalName isOctetString > ifTrue: [externalName] > ifFalse: ['a' , externalName]. > bindingName := externalName translateToLowercase , dropee passenger > identityHash printString. > targetMorph correctSelectionWithString: bindingName , ' '. > (self bindingOf: bindingName) > value: dropee passenger] > ifFalse: [externalName := dropee externalName. > externalName := externalName isOctetString > ifTrue: [externalName] > ifFalse: ['a' , externalName]. > bindingName := externalName translateToLowercase , dropee identityHash > printString. > targetMorph correctSelectionWithString: bindingName , ' '. > (self bindingOf: bindingName) > value: dropee]. > dropee rejectDropMorphEvent: evt. > ^ true"success" > > On Thu, Mar 17, 2016 at 6:06 PM, karl ramberg > wrote: > >> Workspaces are great for scripting and exploring ideas etc. And working >> with already existing objects. It's not so good for developing but very >> good for other important computing and learning needs. >> >> Best, >> Karl >> >> >> On Thu, Mar 17, 2016 at 5:55 PM, Chris Muller >> wrote: >> >>> All Jakob had to do was "do it" on: >>> >>> myXml := '.... all kinds of XML ... ' >>> >>> He now has access to myXml. Then replace all the text in the >>> workspace with that from the other workspace. Done. >>> >>> I guess I see Workspaces for learning and discovery for newbies. >>> Short, simple, explorations of syntax and class library. >>> >>> Attempting to do work as complex as parsing a large XML is going to >>> present further challenges above and beyond accessing an object. If >>> someone feels the need to "link workspaces" they really should stop >>> and consider just making a class. In fact, I think linked workspaces >>> would lead a newbie down the wrong path.. >>> >>> On Thu, Mar 17, 2016 at 11:28 AM, karl ramberg >>> wrote: >>> > >>> > >>> > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller >>> wrote: >>> >> >>> >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg < >>> bert@freudenbergs.de> >>> >> wrote: >>> >> > >>> >> > On 17.03.2016, at 01:43, Eliot Miranda >>> wrote: >>> >> > >>> >> > >>> >> > >>> >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg >>> >> > >>> >> > wrote: >>> >> >> >>> >> >> >>> >> >> > On 16.03.2016, at 18:48, marcel.taeumel >>> >> >> > wrote: >>> >> >> > >>> >> >> > Mabye we need a simple way to link bindings across tools. Then, >>> for >>> >> >> > example, >>> >> >> > we could simple connect a Workspace window to the text box in the >>> >> >> > Inspector >>> >> >> > (resp. Object Explorer) and all would share the same bindings. >>> Then, >>> >> >> > you >>> >> >> > could simply select stuff in the Object Explorer, evaluate "x := >>> >> >> > self" >>> >> >> > and >>> >> >> > you would have access to x in that other Workspace (resp. >>> Inspector's >>> >> >> > text >>> >> >> > box). >>> >> >> >>> >> >> Not a bad idea ? what could be a UI for connecting workspaces? >>> >> >>> >> Why not just invoke the halos on the inspectors built-in workspace and >>> >> clone it with the upper-green button and use that? >>> >> >>> > This would break workflow I think because like Jacob wrote, you open a >>> file >>> > in a Workspace and you need a reference to that from another already >>> open >>> > Workspace. >>> > >>> > How about another copy command, like 'copy as reference' and then you >>> could >>> > paste it in another Workspace ? >>> > >>> > >>> > Best, >>> > Karl >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/b0156c8e/attachment.htm From karlramberg at gmail.com Thu Mar 17 17:41:53 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 17:41:56 2016 Subject: [squeak-dev] RaspberryPI 3 Squeak performance In-Reply-To: References: Message-ID: Cool Best, Karl On Thu, Mar 17, 2016 at 6:36 PM, tim Rowledge wrote: > Just as an FYI - the new Pi 3 performs quite well with the COG/Spur Squeak > we use for Scratch. > > Although the original Green Book benchmarks are not really very useful any > more it is always fun to see what the number is and for a Pi3 we now hit > ~100 Dorado. For $35 frikkin? bucks! I suspect the Dorados used more cost > of electricity per day than that. > > And for the larger ?Shootout? benchmarks that some prefer, the results are > fairly impressive. > nbody -42.6 > bintree - 30.4 > chredux - 53.9 > threadring - 67.9 > - all around 30% faster than the Pi2. Also interesting is the comparison > with some old result Eliot logged for his 2012 MacBook Pro 2.2GHz quad i7 > running the closure interpreter. > nbody - 40.9 > bintree 30.6 > chredux - 30.7 > threadring - 9.2 > > I think that?s quite good. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > As far as we know, our computer has never had an undetected error. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/4768de56/attachment.htm From commits at source.squeak.org Thu Mar 17 19:33:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 17 19:33:45 2016 Subject: [squeak-dev] The Trunk: Tools-kfr.680.mcz Message-ID: Karl Ramberg uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-kfr.680.mcz ==================== Summary ==================== Name: Tools-kfr.680 Author: kfr Time: 17 March 2016, 8:33:12.598817 pm UUID: 3bfa20f9-3a4a-4237-9227-17dd8d2428b6 Ancestors: Tools-mt.679 Create reference to a dropped TranferMorph passenger instead of to the TranferMorph it self =============== Diff against Tools-mt.679 =============== Item was changed: ----- Method: Workspace>>acceptDroppingMorph:event:inMorph: (in category 'drag and drop') ----- acceptDroppingMorph: dropee event: evt inMorph: targetMorph + "Return the dropee to its old position, and add a reference to it at the + cursor point." + | bindingName externalName reference | + (dropee isKindOf: TransferMorph) + ifTrue: [reference := dropee passenger. + externalName := dropee passenger className] + ifFalse: [reference := dropee. + dropee externalName]. - "Return the dropee to its old position, and add a reference to it at the cursor point." - - | bindingName externalName | - externalName := dropee externalName. externalName := externalName isOctetString + ifTrue: [externalName] + ifFalse: ['a' , externalName]. + bindingName := externalName withFirstCharacterDownshifted , reference identityHash printString. + targetMorph correctSelectionWithString: bindingName , ' '. + (self bindingOf: bindingName) + value: reference. - ifTrue: [externalName] ifFalse: ['a' , externalName]. - bindingName := externalName translateToLowercase, dropee identityHash printString. - targetMorph correctSelectionWithString: bindingName, ' '. - (self bindingOf: bindingName) value: dropee. dropee rejectDropMorphEvent: evt. + ^ true"success"! - ^ true "success" - ! From karlramberg at gmail.com Thu Mar 17 19:44:25 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 17 19:44:30 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> Message-ID: It seems though that the TransferMorphs are not very usable the way they are created when dragged out of inspectors. They are direct links to objects not to the instance variables. So they don't update if the instance variable change... Best, Karl On Thu, Mar 17, 2016 at 6:38 PM, karl ramberg wrote: > Better: > Workspace>>acceptDroppingMorph: dropee event: evt inMorph: targetMorph > "Return the dropee to its old position, and add a reference to it at the > cursor point." > | bindingName externalName reference | > (dropee isKindOf: TransferMorph) > ifTrue: [reference := dropee passenger. > externalName := dropee passenger className] > ifFalse: [reference := dropee. > dropee externalName]. > externalName := externalName isOctetString > ifTrue: [externalName] > ifFalse: ['a' , externalName]. > bindingName := externalName translateToLowercase , reference identityHash > printString. > targetMorph correctSelectionWithString: bindingName , ' '. > (self bindingOf: bindingName) > value: reference. > dropee rejectDropMorphEvent: evt. > ^ true"success" > > On Thu, Mar 17, 2016 at 6:30 PM, karl ramberg > wrote: > >> A little ugly with the code duplication but it works ;-) >> >> Workspace>>acceptDroppingMorph: dropee event: evt inMorph: targetMorph >> "Return the dropee to its old position, and add a reference to it at the >> cursor point." >> | bindingName externalName | >> (dropee isKindOf: TransferMorph) >> ifTrue: [externalName := dropee passenger className. >> externalName := externalName isOctetString >> ifTrue: [externalName] >> ifFalse: ['a' , externalName]. >> bindingName := externalName translateToLowercase , dropee passenger >> identityHash printString. >> targetMorph correctSelectionWithString: bindingName , ' '. >> (self bindingOf: bindingName) >> value: dropee passenger] >> ifFalse: [externalName := dropee externalName. >> externalName := externalName isOctetString >> ifTrue: [externalName] >> ifFalse: ['a' , externalName]. >> bindingName := externalName translateToLowercase , dropee identityHash >> printString. >> targetMorph correctSelectionWithString: bindingName , ' '. >> (self bindingOf: bindingName) >> value: dropee]. >> dropee rejectDropMorphEvent: evt. >> ^ true"success" >> >> On Thu, Mar 17, 2016 at 6:06 PM, karl ramberg >> wrote: >> >>> Workspaces are great for scripting and exploring ideas etc. And working >>> with already existing objects. It's not so good for developing but very >>> good for other important computing and learning needs. >>> >>> Best, >>> Karl >>> >>> >>> On Thu, Mar 17, 2016 at 5:55 PM, Chris Muller >>> wrote: >>> >>>> All Jakob had to do was "do it" on: >>>> >>>> myXml := '.... all kinds of XML ... ' >>>> >>>> He now has access to myXml. Then replace all the text in the >>>> workspace with that from the other workspace. Done. >>>> >>>> I guess I see Workspaces for learning and discovery for newbies. >>>> Short, simple, explorations of syntax and class library. >>>> >>>> Attempting to do work as complex as parsing a large XML is going to >>>> present further challenges above and beyond accessing an object. If >>>> someone feels the need to "link workspaces" they really should stop >>>> and consider just making a class. In fact, I think linked workspaces >>>> would lead a newbie down the wrong path.. >>>> >>>> On Thu, Mar 17, 2016 at 11:28 AM, karl ramberg >>>> wrote: >>>> > >>>> > >>>> > On Thu, Mar 17, 2016 at 4:39 PM, Chris Muller >>>> wrote: >>>> >> >>>> >> On Thu, Mar 17, 2016 at 4:58 AM, Bert Freudenberg < >>>> bert@freudenbergs.de> >>>> >> wrote: >>>> >> > >>>> >> > On 17.03.2016, at 01:43, Eliot Miranda >>>> wrote: >>>> >> > >>>> >> > >>>> >> > >>>> >> > On Wed, Mar 16, 2016 at 11:58 AM, Bert Freudenberg >>>> >> > >>>> >> > wrote: >>>> >> >> >>>> >> >> >>>> >> >> > On 16.03.2016, at 18:48, marcel.taeumel >>>> >> >> > wrote: >>>> >> >> > >>>> >> >> > Mabye we need a simple way to link bindings across tools. Then, >>>> for >>>> >> >> > example, >>>> >> >> > we could simple connect a Workspace window to the text box in >>>> the >>>> >> >> > Inspector >>>> >> >> > (resp. Object Explorer) and all would share the same bindings. >>>> Then, >>>> >> >> > you >>>> >> >> > could simply select stuff in the Object Explorer, evaluate "x := >>>> >> >> > self" >>>> >> >> > and >>>> >> >> > you would have access to x in that other Workspace (resp. >>>> Inspector's >>>> >> >> > text >>>> >> >> > box). >>>> >> >> >>>> >> >> Not a bad idea ? what could be a UI for connecting workspaces? >>>> >> >>>> >> Why not just invoke the halos on the inspectors built-in workspace >>>> and >>>> >> clone it with the upper-green button and use that? >>>> >> >>>> > This would break workflow I think because like Jacob wrote, you open >>>> a file >>>> > in a Workspace and you need a reference to that from another already >>>> open >>>> > Workspace. >>>> > >>>> > How about another copy command, like 'copy as reference' and then you >>>> could >>>> > paste it in another Workspace ? >>>> > >>>> > >>>> > Best, >>>> > Karl >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160317/af42297e/attachment-0001.htm From commits at source.squeak.org Thu Mar 17 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 17 22:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160317225502.14158.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-March/009492.html Name: Tools-kfr.680 Ancestors: Tools-mt.679 Create reference to a dropped TranferMorph passenger instead of to the TranferMorph it self ============================================= From jakob.reschke at student.hpi.de Thu Mar 17 23:36:41 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Mar 17 23:37:04 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <16dc6ecd983744e1bebab82bcc2c1a03@MX2015-DAG2.hpi.uni-potsdam.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> <16dc6ecd983744e1bebab82bcc2c1a03@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-03-17 17:55 GMT+01:00 Chris Muller : > All Jakob had to do was "do it" on: > > myXml := '.... all kinds of XML ... ' > > He now has access to myXml. Then replace all the text in the > workspace with that from the other workspace. Done. If the markup had not been "vast" (12 MB) and possibly full of single quotes, that would have been my way to go, too. I could have attempted a global search and replace for these, though... but then again even scrolling around felt sluggish with that much text in the Workspace. I could have done that :%s/'/''/g in a proper text editor, but instead I went crazy and grabbed the String from the TextMorph and wished to move it out of that Object Explorer... Many ways to accomplish the same thing, and a lot of them would probably have been more efficient than asking for that feature I had in mind, granted. In the end, or rather minutes after starting this thread, I solved my text transfer problem by copying the XML and doing `xmlString := Clipboard clipboardText string`... > I guess I see Workspaces for learning and discovery for newbies. > Short, simple, explorations of syntax and class library. > > Attempting to do work as complex as parsing a large XML is going to > present further challenges above and beyond accessing an object. If > someone feels the need to "link workspaces" they really should stop > and consider just making a class. In fact, I think linked workspaces > would lead a newbie down the wrong path.. I was not going to write the parsing in the workspace, but I wanted to conduct my experimenting from there, just like Karl said. And in the beginning, I needed the XML as a String object, to put it into the StAXParser, try out the parser API in the workspace and, eventually, put the parser into my reading object for which I have written a proper class, of course. :-) Hence, I do not really feel the need for linked workspaces, but I would like to move objects around the tools occasionally. That's why I was delighted to be introduced to that dropped references feature. I agree with the others that it would be convenient if the TransferMorphs were unpacked automatically. IMHO, the usual assignment semantics would suffice, no actual binding/referring to an instance variable required. If I wanted to be up to date with the object's state I would transfer that object itself and not an instance variable. From jakob.reschke at student.hpi.de Thu Mar 17 23:41:56 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Mar 17 23:42:19 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: <879a98716f37424e9c4d1d16a8446e7a@MX2015-DAG2.hpi.uni-potsdam.de> References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> <879a98716f37424e9c4d1d16a8446e7a@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-03-17 17:28 GMT+01:00 karl ramberg : > > How about another copy command, like 'copy as reference' and then you could > paste it in another Workspace ? > I think I would have liked "paste as string literal" ;-) But using the clipboard for things other than text might be worthwhile, as an alternative to drag&drop from an Inspector. Then "Paste as reference" in workspaces -- or something similar in slot view/edit panes in the debugger, to overwrite the selected value with the previously copied object -- would be the actual innovation. Albeit the Clipboard class looks like it only stores text at the moment... but the "outside" clipboards have supported other data types for ages. From bert at freudenbergs.de Fri Mar 18 13:06:25 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 13:06:32 2016 Subject: [squeak-dev] Re: Injecting objects into Workspace bindings In-Reply-To: References: <1458150481295-4884919.post@n4.nabble.com> <41837739-459F-4164-85DB-C9B3C152C157@freudenbergs.de> <60BA7D3C-28D9-4977-9E1C-F0FB90A24D18@freudenbergs.de> <879a98716f37424e9c4d1d16a8446e7a@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/81955ea7/smime.bin From maxleske at gmail.com Fri Mar 18 14:26:45 2016 From: maxleske at gmail.com (Max Leske) Date: Fri Mar 18 14:26:50 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> Message-ID: <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> I found the problem. DateAndTime gained ?automatic timezone?. So when I change the timezone in my tests it doesn?t have an effect unless I disable that. You should think about disabling automatic timezone when the timezone has been changed manually. When I change the timezone I expect that change to be effective. Cheers, Max > On 16 Mar 2016, at 08:21, Max Leske wrote: > > Thanks Bert, I?ll check but I?m pretty sure I am. I?ll take a look at the test cases in question too to make sure its not the tests. > > >> On 13 Mar 2016, at 23:24, squeak-dev-request@lists.squeakfoundation.org wrote: >> >> Are you using the latest trunk image? It should be fixed. >> >> - Bert - >> >> >>> On 12.03.2016, at 09:45, Max Leske > wrote: >>> >>> Hi, >>> >>> The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). >>> >>> I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? >>> >>> Cheers, >>> Max > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/d314f8a2/attachment.htm From bert at freudenbergs.de Fri Mar 18 15:12:35 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 15:12:47 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/bd9f1b5e/smime.bin From asqueaker at gmail.com Fri Mar 18 15:30:51 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 18 15:31:35 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> Message-ID: > Interesting idea to automatically disable the pref when setting the timezone > manually ? +1. I totally agree with Max. Although I?m not sure that should happen silently. Maybe a > warning should pop up telling you that you probably want to disable the > pref? -1. The user setting their timzone already implies their intent to do so, a warning to confirm that intent would be superfluous and annoying and disruptive to configuration tools. From bert at freudenbergs.de Fri Mar 18 15:32:27 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 15:32:30 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> Message-ID: <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/9c607afd/smime.bin From bert at freudenbergs.de Fri Mar 18 15:42:31 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 15:42:36 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> Message-ID: <2C16FAC1-AF37-4D9E-8F71-66EE1B5F83F2@freudenbergs.de> On 18.03.2016, at 16:30, Chris Muller wrote: > >> Interesting idea to automatically disable the pref when setting the timezone >> manually ? > > +1. I totally agree with Max. Yep. Right now there is no way to distinguish between automatic and manual setting, however. > Although I?m not sure that should happen silently. Maybe a >> warning should pop up telling you that you probably want to disable the >> pref? > > -1. The user setting their timzone already implies their intent to do > so, a warning to confirm that intent would be superfluous and annoying > and disruptive to configuration tools. The warning obviously would be displayed only if you had not disabled the setting, so the manual setting would have no effect. But I agree, needless warnings are bad. See my other message for a better idea. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/0df11627/smime.bin From eliot.miranda at gmail.com Fri Mar 18 15:46:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 18 15:46:57 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> Message-ID: > On Mar 18, 2016, at 8:32 AM, Bert Freudenberg wrote: > > Or even better: setting the timezone should modify local time, not UTC. I guess that?s one of the motivations for Dave?s re-implementation. ?!?! UTC should /never/ be changeable. One can alter one's conputer's clock to simulate computing in a different age, but UTC is supposed to be UTC and is entirely independent of time zone. > > If that were the case, then the clock in the tool bar would reflect the time in a different time zone, and people would eventually notice. No need for a warning. Hmm, I like that! And indeed the title bar clock could include the time zone abbreviation. > > - Bert - > >> On 18.03.2016, at 16:12, Bert Freudenberg wrote: >> >> There is a preference for that (DateAndTime automaticTimezone: false). >> >> Interesting idea to automatically disable the pref when setting the timezone manually ? Although I?m not sure that should happen silently. Maybe a warning should pop up telling you that you probably want to disable the pref? >> >> - Bert - >> >>> On 18.03.2016, at 15:26, Max Leske wrote: >>> >>> I found the problem. DateAndTime gained ?automatic timezone?. So when I change the timezone in my tests it doesn?t have an effect unless I disable that. >>> >>> You should think about disabling automatic timezone when the timezone has been changed manually. When I change the timezone I expect that change to be effective. >>> >>> Cheers, >>> Max >>> >>> >>>> On 16 Mar 2016, at 08:21, Max Leske wrote: >>>> >>>> Thanks Bert, I?ll check but I?m pretty sure I am. I?ll take a look at the test cases in question too to make sure its not the tests. >>>> >>>> >>>>> On 13 Mar 2016, at 23:24, squeak-dev-request@lists.squeakfoundation.org wrote: >>>>> >>>>> Are you using the latest trunk image? It should be fixed. >>>>> >>>>> - Bert - >>>>> >>>>> >>>>>> On 12.03.2016, at 09:45, Max Leske wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). >>>>>> >>>>>> I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? >>>>>> >>>>>> Cheers, >>>>>> Max > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/82d3ba71/attachment.htm From bert at freudenbergs.de Fri Mar 18 15:53:30 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 15:53:35 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> Message-ID: <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/3a7d73a1/smime-0001.bin From eliot.miranda at gmail.com Fri Mar 18 16:01:34 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 18 16:01:40 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> Message-ID: > On Mar 18, 2016, at 8:53 AM, Bert Freudenberg wrote: > >> On 18.03.2016, at 16:46, Eliot Miranda wrote: >> >>> On Mar 18, 2016, at 8:32 AM, Bert Freudenberg wrote: >>> >>> Or even better: setting the timezone should modify local time, not UTC. I guess that?s one of the motivations for Dave?s re-implementation. >> >> ?!?! UTC should /never/ be changeable. One can alter one's conputer's clock to simulate computing in a different age, but UTC is supposed to be UTC and is entirely independent of time zone. > > Agreed. But right now DateAndTime still stores local time: > > | a b | > DateAndTime automaticTimezone: true. > a := DateAndTime now asUTC. > DateAndTime automaticTimezone: false. > DateAndTime localOffset: 5 hours. > b := DateAndTime now asUTC. > {a. b} > ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00} > > Which makes no sense. We should fix that, and I?m pretty sure it is fixed in David?s version. Phew :-) > >>> If that were the case, then the clock in the tool bar would reflect the time in a different time zone, and people would eventually notice. No need for a warning. Hmm, I like that! >> >> And indeed the title bar clock could include the time zone abbreviation. > > We don?t know the abbrev ? but showing the ?wrong? time should be good enough. I really should add a getenv: prim. Absurd that one has to load OSProcess (or use NativeBoost) just to get at environment variables. > > - Bert - > >>> - Bert - >>> >>>> On 18.03.2016, at 16:12, Bert Freudenberg wrote: >>>> >>>> There is a preference for that (DateAndTime automaticTimezone: false). >>>> >>>> Interesting idea to automatically disable the pref when setting the timezone manually ? Although I?m not sure that should happen silently. Maybe a warning should pop up telling you that you probably want to disable the pref? >>>> >>>> - Bert - >>>> >>>>> On 18.03.2016, at 15:26, Max Leske wrote: >>>>> >>>>> I found the problem. DateAndTime gained ?automatic timezone?. So when I change the timezone in my tests it doesn?t have an effect unless I disable that. >>>>> >>>>> You should think about disabling automatic timezone when the timezone has been changed manually. When I change the timezone I expect that change to be effective. >>>>> >>>>> Cheers, >>>>> Max >>>>> >>>>> >>>>>> On 16 Mar 2016, at 08:21, Max Leske wrote: >>>>>> >>>>>> Thanks Bert, I?ll check but I?m pretty sure I am. I?ll take a look at the test cases in question too to make sure its not the tests. >>>>>> >>>>>> >>>>>>> On 13 Mar 2016, at 23:24, squeak-dev-request@lists.squeakfoundation.org wrote: >>>>>>> >>>>>>> Are you using the latest trunk image? It should be fixed. >>>>>>> >>>>>>> - Bert - >>>>>>> >>>>>>> >>>>>>>> On 12.03.2016, at 09:45, Max Leske wrote: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> The Fuel builds for trunk are still failing because our tests with dates and timezones fail due to the recently diagnosed problem with date and time in the image (the topic was ?trunk thinks it?s tomorrow?). >>>>>>>> >>>>>>>> I haven?t seen any activity on that front in the last couple of days. What is the status? When can I expect this to be fixed? Or was it already fixed? >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Max > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/072fa745/attachment.htm From asqueaker at gmail.com Fri Mar 18 17:29:13 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 18 17:29:56 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> Message-ID: > | a b | > DateAndTime automaticTimezone: true. > a := DateAndTime now asUTC. > DateAndTime automaticTimezone: false. > DateAndTime localOffset: 5 hours. > b := DateAndTime now asUTC. > {a. b} > ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00} Interesting. Do you know whether this bug affects any API besides #now? From commits at source.squeak.org Fri Mar 18 18:31:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 18 18:31:29 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-cmm.3.mcz Message-ID: Chris Muller uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-cmm.3.mcz ==================== Summary ==================== Name: Chronology-Core-cmm.3 Author: cmm Time: 18 March 2016, 1:31:09.337847 pm UUID: 4e36f7ad-aa95-433a-bb7f-198798b81942 Ancestors: Chronology-Core-cmm.2 - When the localTimeZone is explicitly updated by the user, ensure the system does not silently change it back if the user didn't remember to also turn off automaticTimeZone:. - Added DateAndTime class>>#nowAtOffset: to obtain the local time at other places than the localTimeZone. =============== Diff against Chronology-Core-cmm.2 =============== Item was changed: ----- Method: DateAndTime class>>localTimeZone: (in category 'accessing') ----- localTimeZone: aTimeZone "Set the local time zone" - " DateAndTime localTimeZone: (TimeZone offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'). DateAndTime localTimeZone: (TimeZone offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'). " + LocalTimeZone := aTimeZone. + self automaticTimezone: false! - - LocalTimeZone := aTimeZone - - - ! Item was changed: ----- Method: DateAndTime class>>now (in category 'ansi protocol') ----- now | clockAndOffset | clockAndOffset := self clock localMicrosecondClockWithOffset. (self automaticTimezone and: [self localOffset asSeconds ~= clockAndOffset second]) + ifTrue: [self setLocalTimeZoneAutomatically: (Duration seconds: clockAndOffset second)]. - ifTrue: [self localOffset: (Duration seconds: clockAndOffset second)]. ^self now: clockAndOffset first offset: self localOffset! Item was added: + ----- Method: DateAndTime class>>nowAtOffset: (in category 'squeak protocol') ----- + nowAtOffset: offsetDuration + "Answers the local time at places with the specified offsetDuration timezone." + "local time Chicago (CST)" + "DateAndTime nowAtOffset: -6 hours" + ^ self now + (offsetDuration - self localOffset) offset: offsetDuration! Item was added: + ----- Method: DateAndTime class>>setLocalTimeZoneAutomatically: (in category 'squeak protocol') ----- + setLocalTimeZoneAutomatically: aDuration + "Set the duration we are offset from UTC (done automatically in #now)" + LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). + ! From lewis at mail.msen.com Fri Mar 18 22:07:47 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 18 22:07:49 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> Message-ID: <20160318220747.GB2541@shell.msen.com> On Fri, Mar 18, 2016 at 09:01:34AM -0700, Eliot Miranda wrote: > > > On Mar 18, 2016, at 8:53 AM, Bert Freudenberg wrote: > > > >> On 18.03.2016, at 16:46, Eliot Miranda wrote: > >> > >>> On Mar 18, 2016, at 8:32 AM, Bert Freudenberg wrote: > >>> > >>> Or even better: setting the timezone should modify local time, not UTC. I guess that???s one of the motivations for Dave???s re-implementation. > >> > >> ?!?! UTC should /never/ be changeable. One can alter one's conputer's clock to simulate computing in a different age, but UTC is supposed to be UTC and is entirely independent of time zone. > > > > Agreed. But right now DateAndTime still stores local time: > > > > | a b | > > DateAndTime automaticTimezone: true. > > a := DateAndTime now asUTC. > > DateAndTime automaticTimezone: false. > > DateAndTime localOffset: 5 hours. > > b := DateAndTime now asUTC. > > {a. b} > > ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00} > > > > Which makes no sense. We should fix that, and I???m pretty sure it is fixed in David???s version. > > Phew :-) > Sure, that one is fixed. But the more important point is to be able to see and understand problems like this more easily by looking at the DateAndTime instances directly in an inspector, see attached. I was inspired by my earlier experiences (long ago now) trying to make sense of Olson time zone tables in Squeak. Trying to figure out what was supposed to be local time versus UTC, and which features were actually bugs, was enough to make my head spin. I eventually came to the conclusion that my own stupidity was only a part of the problem, and that there was no real need for for things to be quite as confusing as they seemed to be. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: DateAndTimeInExplorer.png Type: image/png Size: 20997 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/ad68c22b/DateAndTimeInExplorer.png From commits at source.squeak.org Fri Mar 18 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 18 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160318225502.12391.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-March/009493.html Name: Chronology-Core-cmm.3 Ancestors: Chronology-Core-cmm.2 - When the localTimeZone is explicitly updated by the user, ensure the system does not silently change it back if the user didn't remember to also turn off automaticTimeZone:. - Added DateAndTime class>>#nowAtOffset: to obtain the local time at other places than the localTimeZone. ============================================= From commits at source.squeak.org Fri Mar 18 23:10:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 18 23:10:18 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-bf.4.mcz Message-ID: Bert Freudenberg uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-bf.4.mcz ==================== Summary ==================== Name: Chronology-Core-bf.4 Author: bf Time: 19 March 2016, 12:01:52.725349 am UUID: 31207206-eb6a-4f21-9e6b-dfce49f3b8a2 Ancestors: Chronology-Core-cmm.3 Make "DateAndTime now" respect its localOffset - it will be the same UTC time but different local time. Make "Time now" respect that same offset. Make "Time millisecondClockValue" use the UTC clock. Do not use posix time primitive anymore. =============== Diff against Chronology-Core-cmm.3 =============== Item was changed: ----- Method: DateAndTime class>>automaticTimezone: (in category 'preferences') ----- automaticTimezone: aBoolean + "Accessor for the system-wide preference. + Note this gets disabled in localTimeZone: to make that override stick" - "Accessor for the system-wide preference" + AutomaticTimezone := aBoolean. + aBoolean ifTrue: [self now]. "fetch timezone immediately"! - AutomaticTimezone := aBoolean! Item was changed: ----- Method: DateAndTime class>>now (in category 'ansi protocol') ----- now + | clockAndOffset localSeconds | + clockAndOffset := self clock utcMicrosecondClockWithOffset. + localSeconds := self localOffset asSeconds. + (self automaticTimezone and: [localSeconds ~= clockAndOffset second]) + ifTrue: [self setLocalOffsetAutomatically: (Duration seconds: (localSeconds := clockAndOffset second))]. + ^self now: clockAndOffset first + (localSeconds * 1000000) offset: self localOffset! - | clockAndOffset | - clockAndOffset := self clock localMicrosecondClockWithOffset. - (self automaticTimezone and: - [self localOffset asSeconds ~= clockAndOffset second]) - ifTrue: [self setLocalTimeZoneAutomatically: (Duration seconds: clockAndOffset second)]. - ^self now: clockAndOffset first offset: self localOffset! Item was added: + ----- Method: DateAndTime class>>setLocalOffsetAutomatically: (in category 'squeak protocol') ----- + setLocalOffsetAutomatically: aDuration + "Set the duration we are offset from UTC (done automatically in #now)" + LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). + ! Item was removed: - ----- Method: DateAndTime class>>setLocalTimeZoneAutomatically: (in category 'squeak protocol') ----- - setLocalTimeZoneAutomatically: aDuration - "Set the duration we are offset from UTC (done automatically in #now)" - LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). - ! Item was changed: ----- Method: Time class>>localMicrosecondClock (in category 'clock') ----- localMicrosecondClock "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). + The value is derived from the current UTC wallclock time and the image's current notion of time zone." + ^self utcMicrosecondClock + (DateAndTime localOffset asSeconds * 1000000)! - The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds - between the two epochs according to RFC 868, and with an offset duration corresponding to the current - offset of local time from UTC." - - ^0! Item was added: + ----- Method: Time class>>localMicrosecondClockPrimitive (in category 'clock') ----- + localMicrosecondClockPrimitive + "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). + The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds + between the two epochs according to RFC 868, and with an offset duration corresponding to the current + offset of local time from UTC." + + ^0! Item was removed: - ----- Method: Time class>>localMicrosecondClockWithOffset (in category 'clock') ----- - localMicrosecondClockWithOffset - "Answer an array with local microseconds since the Smalltalk epoch and the - current seconds offset from GMT in the local time zone." - - | result | - result := self primPosixMicrosecondClockWithOffset. - "DateAndTime unixEpoch asSeconds" - result at: 1 put: result first + ((2177452800 + result second) * 1000000). - ^result! Item was changed: ----- Method: Time class>>millisecondClockValue (in category 'general inquiries') ----- millisecondClockValue "Answer the value of the millisecond clock." + ^self utcMicrosecondClock // 1000! - ^self localMicrosecondClock // 1000! Item was added: + ----- Method: Time class>>utcMicrosecondClockWithOffset (in category 'clock') ----- + utcMicrosecondClockWithOffset + "Answer an array with UTC microseconds since the Smalltalk epoch and the + current seconds offset from UTC in the local time zone." + | offset utc | + utc := self utcMicrosecondClock. + offset := (self localMicrosecondClockPrimitive - utc) // 1000000. + ^{utc. offset}! From bert at freudenbergs.de Fri Mar 18 23:30:19 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 18 23:30:23 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> Message-ID: <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> On 18.03.2016, at 18:29, Chris Muller wrote: > >> | a b | >> DateAndTime automaticTimezone: true. >> a := DateAndTime now asUTC. >> DateAndTime automaticTimezone: false. >> DateAndTime localOffset: 5 hours. >> b := DateAndTime now asUTC. >> {a. b} >> ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00} > > Interesting. I just fixed this one. By setting the time zone (localOffset) now the local time appears to jump. UTC is continuous, as it should be. A side effect is that the clock in our tool bar now shows that adjusted local time. To ensure the millisecondClock is continuous, it now follows UTC. All tests are still green so I hope it?s good. And Max?s tests might work again, too, without manual preference fiddling. > Do you know whether this bug affects any API besides #now? I think the comments in DateAndTime>>offset: and utcOffset: could use updating. They both claim to return an ?equivalent? but they?re not: x := DateAndTime now. x = (x offset: 0) ==> false x = (x utcOffset: 0) ==> true Since ?utcOffset:" appears to do the right thing I?d actually prefer it to the ?nowAtOffset:? you just introduced. E.g. to get the current time in LA you could simply use DateAndTime now utcOffset: -7 hours No need for a new message. Arguably this is what ?offset:? should do, and it would if the implementation was utc-based (as is David?s) rather than local-time based. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/339d57a9/smime.bin From leves at caesar.elte.hu Sat Mar 19 00:18:01 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 19 00:18:05 2016 Subject: [squeak-dev] The Trunk: Collections-ul.679.mcz In-Reply-To: References: <56df30cd.081b370a.c85ca.ffffddecSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Eliot, On Wed, 16 Mar 2016, Eliot Miranda wrote: > Hi Levente, > > snip >> >> But this way we save a message send, and (ab)use the fact that #== is faster than #= and is still correct (in Spur). :) > > Have you checked whether #== is faster in ByteArray too? The JIT doesn't always inline SmallInteger code for special selectors since they don't always predict SmallIntegers well. The JIT inlines #= & #~= when either the receiver or arg are literal integers, but neither are above so there will be no inlining. There will be with #==, and that makes the ifTrue: much faster because it gets optimised to a conditional jump instruction, not a test in true or false. It would probably be quicker, but actually I didn't want to optimize this rarely used method as much as it would have been possible. Were I to do that, I would even use primitiveIndexOfAsciiInString for longer ByteStrings, ByteSymbols and ByteArrays. The only reason I tweaked these methods is that I realized that it was quite slow while serializing json objects. For our code, which runs on Squeak 4.4, this change had no effect anyway, so I just avoided these sends there altogether. Levente > >> >>> and/or in ByteString >>> + anObject isCharacter ifFalse: [ ^0 ]. >>> + anObject asInteger < 255 ifFalse: [ ^0 ]. >>> snip... >>> Hem >>> + anObject asInteger <= 255 ifFalse: [ ^0 ]. >>> or >>> + anObject asInteger < 256 ifFalse: [ ^0 ]. >>> or >>> + anObject asInteger > 255 ifTrue: [ ^0 ]. >> >> Right, but then you'd feel like adding it to ByteSymbol as well. >> >> Levente >> >> > > From lewis at mail.msen.com Sat Mar 19 01:09:08 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 19 01:09:10 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: <20160319010908.GA34593@shell.msen.com> On Sat, Mar 19, 2016 at 12:30:19AM +0100, Bert Freudenberg wrote: > On 18.03.2016, at 18:29, Chris Muller wrote: > > > >> | a b | > >> DateAndTime automaticTimezone: true. > >> a := DateAndTime now asUTC. > >> DateAndTime automaticTimezone: false. > >> DateAndTime localOffset: 5 hours. > >> b := DateAndTime now asUTC. > >> {a. b} > >> ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00} > > > > Interesting. > > I just fixed this one. By setting the time zone (localOffset) now the local time appears to jump. UTC is continuous, as it should be. > > A side effect is that the clock in our tool bar now shows that adjusted local time. > > To ensure the millisecondClock is continuous, it now follows UTC. > > All tests are still green so I hope it???s good. > > And Max???s tests might work again, too, without manual preference fiddling. > > > Do you know whether this bug affects any API besides #now? > > I think the comments in DateAndTime>>offset: and utcOffset: could use updating. They both claim to return an ???equivalent??? but they???re not: > > x := DateAndTime now. > x = (x offset: 0) > ==> false > > x = (x utcOffset: 0) > ==> true > > Since ???utcOffset:" appears to do the right thing I???d actually prefer it to the ???nowAtOffset:??? you just introduced. E.g. to get the current time in LA you could simply use > > DateAndTime now utcOffset: -7 hours > > No need for a new message. Arguably this is what ???offset:??? should do, and it would if the implementation was utc-based (as is David???s) rather than local-time based. > I am not entirely sure what #utcOffset: should do. Presumably it should affect UTC offset but not magnitude. Here is what I wrote in the method comment a couple of years ago: DateAndTime>>>utcOffset: anOffset "Answer a equivalent to the receiver but offset from UTC by anOffset" self flag: #FIXME. "check the definition of this and of #offset:" ^self utcMicroseconds: utcMicroseconds offset: anOffset asDuration asSeconds So based on that #flag comment, my expectation was that #offset: should answer a new instance with the same magnitude and a different time zone offset. That still seems right to me. Dave From asqueaker at gmail.com Sat Mar 19 03:11:22 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Mar 19 03:12:06 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-bf.4.mcz In-Reply-To: <56ec8adc.ca248c0a.3738b.22a9SMTPIN_ADDED_MISSING@mx.google.com> References: <56ec8adc.ca248c0a.3738b.22a9SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Could you please tell us if this is going to affect applications with existing DateAndTime instances? On Fri, Mar 18, 2016 at 6:10 PM, wrote: > Bert Freudenberg uploaded a new version of Chronology-Core to project The Trunk: > http://source.squeak.org/trunk/Chronology-Core-bf.4.mcz > > ==================== Summary ==================== > > Name: Chronology-Core-bf.4 > Author: bf > Time: 19 March 2016, 12:01:52.725349 am > UUID: 31207206-eb6a-4f21-9e6b-dfce49f3b8a2 > Ancestors: Chronology-Core-cmm.3 > > Make "DateAndTime now" respect its localOffset - it will be the same UTC time but different local time. Make "Time now" respect that same offset. Make "Time millisecondClockValue" use the UTC clock. Do not use posix time primitive anymore. > > =============== Diff against Chronology-Core-cmm.3 =============== > > Item was changed: > ----- Method: DateAndTime class>>automaticTimezone: (in category 'preferences') ----- > automaticTimezone: aBoolean > + "Accessor for the system-wide preference. > + Note this gets disabled in localTimeZone: to make that override stick" > - "Accessor for the system-wide preference" > > + AutomaticTimezone := aBoolean. > + aBoolean ifTrue: [self now]. "fetch timezone immediately"! > - AutomaticTimezone := aBoolean! > > Item was changed: > ----- Method: DateAndTime class>>now (in category 'ansi protocol') ----- > now > + | clockAndOffset localSeconds | > + clockAndOffset := self clock utcMicrosecondClockWithOffset. > + localSeconds := self localOffset asSeconds. > + (self automaticTimezone and: [localSeconds ~= clockAndOffset second]) > + ifTrue: [self setLocalOffsetAutomatically: (Duration seconds: (localSeconds := clockAndOffset second))]. > + ^self now: clockAndOffset first + (localSeconds * 1000000) offset: self localOffset! > - | clockAndOffset | > - clockAndOffset := self clock localMicrosecondClockWithOffset. > - (self automaticTimezone and: > - [self localOffset asSeconds ~= clockAndOffset second]) > - ifTrue: [self setLocalTimeZoneAutomatically: (Duration seconds: clockAndOffset second)]. > - ^self now: clockAndOffset first offset: self localOffset! > > Item was added: > + ----- Method: DateAndTime class>>setLocalOffsetAutomatically: (in category 'squeak protocol') ----- > + setLocalOffsetAutomatically: aDuration > + "Set the duration we are offset from UTC (done automatically in #now)" > + LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). > + ! > > Item was removed: > - ----- Method: DateAndTime class>>setLocalTimeZoneAutomatically: (in category 'squeak protocol') ----- > - setLocalTimeZoneAutomatically: aDuration > - "Set the duration we are offset from UTC (done automatically in #now)" > - LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). > - ! > > Item was changed: > ----- Method: Time class>>localMicrosecondClock (in category 'clock') ----- > localMicrosecondClock > "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). > + The value is derived from the current UTC wallclock time and the image's current notion of time zone." > + ^self utcMicrosecondClock + (DateAndTime localOffset asSeconds * 1000000)! > - The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds > - between the two epochs according to RFC 868, and with an offset duration corresponding to the current > - offset of local time from UTC." > - > - ^0! > > Item was added: > + ----- Method: Time class>>localMicrosecondClockPrimitive (in category 'clock') ----- > + localMicrosecondClockPrimitive > + "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). > + The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds > + between the two epochs according to RFC 868, and with an offset duration corresponding to the current > + offset of local time from UTC." > + > + ^0! > > Item was removed: > - ----- Method: Time class>>localMicrosecondClockWithOffset (in category 'clock') ----- > - localMicrosecondClockWithOffset > - "Answer an array with local microseconds since the Smalltalk epoch and the > - current seconds offset from GMT in the local time zone." > - > - | result | > - result := self primPosixMicrosecondClockWithOffset. > - "DateAndTime unixEpoch asSeconds" > - result at: 1 put: result first + ((2177452800 + result second) * 1000000). > - ^result! > > Item was changed: > ----- Method: Time class>>millisecondClockValue (in category 'general inquiries') ----- > millisecondClockValue > "Answer the value of the millisecond clock." > > + ^self utcMicrosecondClock // 1000! > - ^self localMicrosecondClock // 1000! > > Item was added: > + ----- Method: Time class>>utcMicrosecondClockWithOffset (in category 'clock') ----- > + utcMicrosecondClockWithOffset > + "Answer an array with UTC microseconds since the Smalltalk epoch and the > + current seconds offset from UTC in the local time zone." > + | offset utc | > + utc := self utcMicrosecondClock. > + offset := (self localMicrosecondClockPrimitive - utc) // 1000000. > + ^{utc. offset}! > > From asqueaker at gmail.com Sat Mar 19 03:40:03 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Mar 19 03:40:46 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: > Since ?utcOffset:" appears to do the right thing I?d actually prefer it to the ?nowAtOffset:? you just introduced. E.g. to get the current time in LA you could simply use > > DateAndTime now utcOffset: -7 hours > > No need for a new message. Arguably this is what ?offset:? should do, and it would if the implementation was utc-based (as is David?s) rather than local-time based. I wish to keep #nowWithOffset:. DateAndTime's are "value" objects -- like Points and Fractions. I never want to write code that sets any state on existing DateAndTime objects, not even their #offset. Value objects are only ever created, and then their state never change in 99% of cases. Magma treats DateAndTimes as immutable in the database for performance -- it doesn't bother to check if they changed. Semantically, #utcOffset: doesn't mean anything to me. What is a "UTC offset?" #nowWithOffset: sorts in the list next to #now, and makes it abundantly clear to users what use-case it handles. I wish to keep it. Best, Chris From bert at freudenbergs.de Sat Mar 19 07:48:57 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 07:49:03 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-bf.4.mcz In-Reply-To: References: <56ec8adc.ca248c0a.3738b.22a9SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <2A2A4865-AFF9-4C7D-AE4C-232EA5182E7C@freudenbergs.de> The interpretation of existing instances is unchanged. - Bert - > On 19.03.2016, at 04:11, Chris Muller wrote: > > Could you please tell us if this is going to affect applications with > existing DateAndTime instances? > >> On Fri, Mar 18, 2016 at 6:10 PM, wrote: >> Bert Freudenberg uploaded a new version of Chronology-Core to project The Trunk: >> http://source.squeak.org/trunk/Chronology-Core-bf.4.mcz >> >> ==================== Summary ==================== >> >> Name: Chronology-Core-bf.4 >> Author: bf >> Time: 19 March 2016, 12:01:52.725349 am >> UUID: 31207206-eb6a-4f21-9e6b-dfce49f3b8a2 >> Ancestors: Chronology-Core-cmm.3 >> >> Make "DateAndTime now" respect its localOffset - it will be the same UTC time but different local time. Make "Time now" respect that same offset. Make "Time millisecondClockValue" use the UTC clock. Do not use posix time primitive anymore. >> >> =============== Diff against Chronology-Core-cmm.3 =============== >> >> Item was changed: >> ----- Method: DateAndTime class>>automaticTimezone: (in category 'preferences') ----- >> automaticTimezone: aBoolean >> + "Accessor for the system-wide preference. >> + Note this gets disabled in localTimeZone: to make that override stick" >> - "Accessor for the system-wide preference" >> >> + AutomaticTimezone := aBoolean. >> + aBoolean ifTrue: [self now]. "fetch timezone immediately"! >> - AutomaticTimezone := aBoolean! >> >> Item was changed: >> ----- Method: DateAndTime class>>now (in category 'ansi protocol') ----- >> now >> + | clockAndOffset localSeconds | >> + clockAndOffset := self clock utcMicrosecondClockWithOffset. >> + localSeconds := self localOffset asSeconds. >> + (self automaticTimezone and: [localSeconds ~= clockAndOffset second]) >> + ifTrue: [self setLocalOffsetAutomatically: (Duration seconds: (localSeconds := clockAndOffset second))]. >> + ^self now: clockAndOffset first + (localSeconds * 1000000) offset: self localOffset! >> - | clockAndOffset | >> - clockAndOffset := self clock localMicrosecondClockWithOffset. >> - (self automaticTimezone and: >> - [self localOffset asSeconds ~= clockAndOffset second]) >> - ifTrue: [self setLocalTimeZoneAutomatically: (Duration seconds: clockAndOffset second)]. >> - ^self now: clockAndOffset first offset: self localOffset! >> >> Item was added: >> + ----- Method: DateAndTime class>>setLocalOffsetAutomatically: (in category 'squeak protocol') ----- >> + setLocalOffsetAutomatically: aDuration >> + "Set the duration we are offset from UTC (done automatically in #now)" >> + LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). >> + ! >> >> Item was removed: >> - ----- Method: DateAndTime class>>setLocalTimeZoneAutomatically: (in category 'squeak protocol') ----- >> - setLocalTimeZoneAutomatically: aDuration >> - "Set the duration we are offset from UTC (done automatically in #now)" >> - LocalTimeZone := (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). >> - ! >> >> Item was changed: >> ----- Method: Time class>>localMicrosecondClock (in category 'clock') ----- >> localMicrosecondClock >> "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). >> + The value is derived from the current UTC wallclock time and the image's current notion of time zone." >> + ^self utcMicrosecondClock + (DateAndTime localOffset asSeconds * 1000000)! >> - The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds >> - between the two epochs according to RFC 868, and with an offset duration corresponding to the current >> - offset of local time from UTC." >> - >> - ^0! >> >> Item was added: >> + ----- Method: Time class>>localMicrosecondClockPrimitive (in category 'clock') ----- >> + localMicrosecondClockPrimitive >> + "Answer the local microseconds since the Smalltalk epoch (January 1st 1901, the start of the 20th century). >> + The value is derived from the Posix epoch with a constant offset corresponding to elapsed microseconds >> + between the two epochs according to RFC 868, and with an offset duration corresponding to the current >> + offset of local time from UTC." >> + >> + ^0! >> >> Item was removed: >> - ----- Method: Time class>>localMicrosecondClockWithOffset (in category 'clock') ----- >> - localMicrosecondClockWithOffset >> - "Answer an array with local microseconds since the Smalltalk epoch and the >> - current seconds offset from GMT in the local time zone." >> - >> - | result | >> - result := self primPosixMicrosecondClockWithOffset. >> - "DateAndTime unixEpoch asSeconds" >> - result at: 1 put: result first + ((2177452800 + result second) * 1000000). >> - ^result! >> >> Item was changed: >> ----- Method: Time class>>millisecondClockValue (in category 'general inquiries') ----- >> millisecondClockValue >> "Answer the value of the millisecond clock." >> >> + ^self utcMicrosecondClock // 1000! >> - ^self localMicrosecondClock // 1000! >> >> Item was added: >> + ----- Method: Time class>>utcMicrosecondClockWithOffset (in category 'clock') ----- >> + utcMicrosecondClockWithOffset >> + "Answer an array with UTC microseconds since the Smalltalk epoch and the >> + current seconds offset from UTC in the local time zone." >> + | offset utc | >> + utc := self utcMicrosecondClock. >> + offset := (self localMicrosecondClockPrimitive - utc) // 1000000. >> + ^{utc. offset}! > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/8aa561e3/smime-0001.bin From bert at freudenbergs.de Sat Mar 19 07:59:00 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 07:59:04 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: On 19.03.2016, at 04:40, Chris Muller wrote: >> Since ?utcOffset:" appears to do the right thing I?d actually prefer it to the ?nowAtOffset:? you just introduced. E.g. to get the current time in LA you could simply use >> >> DateAndTime now utcOffset: -7 hours >> >> No need for a new message. Arguably this is what ?offset:? should do, and it would if the implementation was utc-based (as is David?s) rather than local-time based. > > I wish to keep #nowWithOffset:. DateAndTime's are "value" objects -- > like Points and Fractions. I never want to write code that sets any > state on existing DateAndTime objects, not even their #offset. #offset: does return a new instance. > Value objects are only ever created, and then their state never change > in 99% of cases. Magma treats DateAndTimes as immutable in the > database for performance -- it doesn't bother to check if they > changed. Yep. Same in general. > Semantically, #utcOffset: doesn't mean anything to me. What is a "UTC > offset?" Agreed. > #nowWithOffset: sorts in the list next to #now, and makes > it abundantly clear to users what use-case it handles. I wish to keep > it. How about one character more? A space? ... now withOffset: ... I think composability is preferable to an explosion of one-off specialized methods. I'd rather deprecate both #offset: and #utcOffset: and start doing the Right Thing. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/8b85ac2a/smime.bin From maxleske at gmail.com Sat Mar 19 10:40:44 2016 From: maxleske at gmail.com (Max Leske) Date: Sat Mar 19 10:40:49 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <56ed047e.5c1f370a.a5bf.ffff96e4SMTPIN_ADDED_MISSING@mx.google.com> References: <56ed047e.5c1f370a.a5bf.ffff96e4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > On 19 Mar 2016, at 08:49, squeak-dev-request@lists.squeakfoundation.org wrote: > > I just fixed this one. By setting the time zone (localOffset) now the local time appears to jump. UTC is continuous, as it should be. > > A side effect is that the clock in our tool bar now shows that adjusted local time. > > To ensure the millisecondClock is continuous, it now follows UTC. > > All tests are still green so I hope it?s good. > > And Max?s tests might work again, too, without manual preference fiddling. Yes, that fixes my problem. I still needed to make a small adaptation to reset the value of #automaticTimezone to the value used before the tests but that?s no issue. Thanks for the fix. Great response time :) Cheers, Max > >> Do you know whether this bug affects any API besides #now? > > I think the comments in DateAndTime>>offset: and utcOffset: could use updating. They both claim to return an ?equivalent? but they?re not: > > x := DateAndTime now. > x = (x offset: 0) > ==> false > > x = (x utcOffset: 0) > ==> true > > Since ?utcOffset:" appears to do the right thing I?d actually prefer it to the ?nowAtOffset:? you just introduced. E.g. to get the current time in LA you could simply use > > DateAndTime now utcOffset: -7 hours > > No need for a new message. Arguably this is what ?offset:? should do, and it would if the implementation was utc-based (as is David?s) rather than local-time based. > > - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/fc0644c3/attachment.htm From bert at freudenbergs.de Sat Mar 19 13:25:40 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 13:25:45 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56ed047e.5c1f370a.a5bf.ffff96e4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <22691156-A6D6-4172-B100-110203E5E462@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/bae200f4/smime.bin From maxleske at gmail.com Sat Mar 19 13:39:40 2016 From: maxleske at gmail.com (Max Leske) Date: Sat Mar 19 13:39:46 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: <22691156-A6D6-4172-B100-110203E5E462@freudenbergs.de> References: <56ed047e.5c1f370a.a5bf.ffff96e4SMTPIN_ADDED_MISSING@mx.google.com> <22691156-A6D6-4172-B100-110203E5E462@freudenbergs.de> Message-ID: > On 19 Mar 2016, at 14:25, Bert Freudenberg wrote: > > On 19.03.2016, at 11:40, Max Leske > wrote: >> >> On 19 Mar 2016, at 08:49, squeak-dev-request@lists.squeakfoundation.org wrote: >>> >>> And Max?s tests might work again, too, without manual preference fiddling. >> >> Yes, that fixes my problem. I still needed to make a small adaptation to reset the value of #automaticTimezone to the value used before the tests but that?s no issue. > > Well ? if we could, I?d like to automate this, too. > > Does the test save the previous time zone value, and restore it after? No, but it should, now that you mention it. Currently I save the #automaticTimezone value and restore it. Storing and restoring the time zone instead makes more sense since that will also work in Pharo (where, I realise now, this test actually modifies the current time zone without restoring it to the original value). > > If that?s the case we might re-enable the automatic time zone on the restore operation. Sounds reasonable. So #automaticTimezone would be set to true if #localTimezone == the actual local timezone. > > - Bert - > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/21878bc0/attachment.htm From commits at source.squeak.org Sat Mar 19 15:19:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 19 15:19:35 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-bf.5.mcz Message-ID: Bert Freudenberg uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-bf.5.mcz ==================== Summary ==================== Name: Chronology-Core-bf.5 Author: bf Time: 19 March 2016, 4:19:17.403839 pm UUID: 00a9ac14-9291-42a5-be53-027008c4aef1 Ancestors: Chronology-Core-bf.4 Re-enable the automaticTimezone preference when restoring the (previously saved) LT timezone. =============== Diff against Chronology-Core-bf.4 =============== Item was changed: ----- Method: DateAndTime class>>localOffset: (in category 'squeak protocol') ----- localOffset: aDuration + "Override the local time zone (for testing). This disables the #automaticTimezone: preference" + self localTimeZone: (TimeZone offset: aDuration name: 'Local Time (override)' abbreviation: 'LTO'). - "Set the duration we are offset from UTC (done automatically in #now)" - self localTimeZone: (TimeZone offset: aDuration name: 'Local Time' abbreviation: 'LT'). ! Item was changed: ----- Method: DateAndTime class>>localTimeZone: (in category 'accessing') ----- localTimeZone: aTimeZone "Set the local time zone" " DateAndTime localTimeZone: (TimeZone offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'). DateAndTime localTimeZone: (TimeZone offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'). " LocalTimeZone := aTimeZone. + self automaticTimezone: (aTimeZone abbreviation = 'LT')! - self automaticTimezone: false! Item was changed: ----- Method: DateAndTime class>>startUp: (in category 'system startup') ----- startUp: startingAfresh "Set local timezone" + startingAfresh & self automaticTimezone ifTrue: [self now]. - startingAfresh ifTrue: [self now]. ! From bert at freudenbergs.de Sat Mar 19 15:27:29 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 15:27:33 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56ed047e.5c1f370a.a5bf.ffff96e4SMTPIN_ADDED_MISSING@mx.google.com> <22691156-A6D6-4172-B100-110203E5E462@freudenbergs.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/f1d74777/smime.bin From asqueaker at gmail.com Sat Mar 19 15:38:31 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Mar 19 15:39:14 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: Woops, I see I made a typo, I said I wish to keep #nowWithOffset:, but in fact, that's the one you (rightfully) deprecated. #nowAtOffset: is the new one which I wish to keep. Your concern seems to be either about the size of the API, or the rightness of having #nowAtOffset: as a constructor. My interest is for the API to be conventional and consistent, and by that, I mean, the user should expect to be able to interact strictly with the constructor methods to obtain the instance they want, as is the case with all value objects, and not have to create an interim instance first. Clearly, the attributes of a DateAndTime are the ones settable by this constructor, #year:month:day:hour:minute:second:nanoSecond:offset:. offset: is the last argument. Its already established as a part of constructor API. #nowAtOffset: simply mirrors that, except supplies the "nowness" from the prim and lets the user vary the location. I really feel this is a good API design to keep nowAtOffset:. I actually think we should get rid of DateAndTime>>#offset:, or at least make it a private (or initializing) method. Finally, DateAndTime class>>#now:offset: should be made private. Its private, right? >>> Since ?utcOffset:" appears to do the right thing I?d actually prefer it to the ?nowAtOffset:? you just introduced. E.g. to get the current time in LA you could simply use >>> >>> DateAndTime now utcOffset: -7 hours >>> >>> No need for a new message. Arguably this is what ?offset:? should do, and it would if the implementation was utc-based (as is David?s) rather than local-time based. >> >> I wish to keep #nowWithOffset:. DateAndTime's are "value" objects -- >> like Points and Fractions. I never want to write code that sets any >> state on existing DateAndTime objects, not even their #offset. > > #offset: does return a new instance. > >> Value objects are only ever created, and then their state never change >> in 99% of cases. Magma treats DateAndTimes as immutable in the >> database for performance -- it doesn't bother to check if they >> changed. > > Yep. Same in general. > >> Semantically, #utcOffset: doesn't mean anything to me. What is a "UTC >> offset?" > > Agreed. > >> #nowWithOffset: sorts in the list next to #now, and makes >> it abundantly clear to users what use-case it handles. I wish to keep >> it. > > How about one character more? A space? > > ... now withOffset: ... > > I think composability is preferable to an explosion of one-off specialized methods. I'd rather deprecate both #offset: and #utcOffset: and start doing the Right Thing. > > - Bert - > > From bert at freudenbergs.de Sat Mar 19 15:58:48 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 15:58:51 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: On 19.03.2016, at 16:38, Chris Muller wrote: > > Woops, I see I made a typo, I said I wish to keep #nowWithOffset:, but > in fact, that's the one you (rightfully) deprecated. #nowAtOffset: is > the new one which I wish to keep. Yes that?s the one I meant. > Your concern seems to be either about the size of the API, or the > rightness of having #nowAtOffset: as a constructor. > > My interest is for the API to be conventional and consistent, and by > that, I mean, the user should expect to be able to interact strictly > with the constructor methods to obtain the instance they want, as is > the case with all value objects, and not have to create an interim > instance first. Okay, having that method as a possible optimization point is an argument in favor. If you?re touching this, would you mind changing the implementation to this? ^self now utcOffset: offsetDuration And we should think about deprecating utcOffset: and renaming it to ... atOffset:? > I actually think we should get rid of DateAndTime>>#offset:, or at > least make it a private (or initializing) method. +1 (if we deprecate it, we need to adjust the message in nowWithOffset:) > Finally, DateAndTime class>>#now:offset: should be made private. Its > private, right? Yes, making it private sounds right. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/fa034423/smime.bin From asqueaker at gmail.com Sat Mar 19 16:43:19 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Mar 19 16:44:02 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: > If you?re touching this, would you mind changing the implementation to this? > > ^self now utcOffset: offsetDuration Yes, I thought about that, until... > > And we should think about deprecating utcOffset: and renaming it to ... atOffset:? ... I thought that I did not want to add another sender of a message I didn't much like (utcOffset:). +1, I like that. #atOffset: can be thought of as a "converting" method, same magnitude, just converted to be using a different "lense" onto that magnitude (the offset). > >> I actually think we should get rid of DateAndTime>>#offset:, or at >> least make it a private (or initializing) method. > > +1 > > (if we deprecate it, we need to adjust the message in nowWithOffset:) nowAtOffset:. :) Whew, I'm glad we're cleaningup the API a bit, so this would be a good time to re-do the categories too. We don't use categories to delineate "ansi" from "squeak" anywhere else, I don't find it helpful at all. I'd like to make them more conventional. From bert at freudenbergs.de Sat Mar 19 21:24:34 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 19 21:24:41 2016 Subject: [squeak-dev] Status of date problem In-Reply-To: References: <56e5e890.9647370a.d6867.ffff9f79SMTPIN_ADDED_MISSING@mx.google.com> <2B95DBD2-3581-4A98-8E1F-AC77EDD9727F@gmail.com> <544E7133-7879-4B78-9C33-2E7447B976FD@gmail.com> <869302DC-10AB-45BA-9B62-C42F3EE7437A@freudenbergs.de> <2238E27B-726C-46DC-A94C-465B90EABCD7@freudenbergs.de> <2A1E87FA-CA9D-43E1-A4AD-78EBCAD32241@freudenbergs.de> Message-ID: <979D4E76-DC19-4AD8-9EF5-41C97649AA72@freudenbergs.de> On 19.03.2016, at 17:43, Chris Muller wrote: >>> I actually think we should get rid of DateAndTime>>#offset:, or at >>> least make it a private (or initializing) method. >> >> +1 >> >> (if we deprecate it, we need to adjust the message in nowWithOffset:) > > nowAtOffset:. :) No, I meant the deprecation warning in nowWithOffset: which suggests to use "... now offset:". - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/b1e2bd97/smime-0001.bin From commits at source.squeak.org Sat Mar 19 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 19 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160319225502.8827.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-March/009494.html Name: Chronology-Core-bf.4 Ancestors: Chronology-Core-cmm.3 Make "DateAndTime now" respect its localOffset - it will be the same UTC time but different local time. Make "Time now" respect that same offset. Make "Time millisecondClockValue" use the UTC clock. Do not use posix time primitive anymore. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009495.html Name: Chronology-Core-bf.5 Ancestors: Chronology-Core-bf.4 Re-enable the automaticTimezone preference when restoring the (previously saved) LT timezone. ============================================= From leves at caesar.elte.hu Sat Mar 19 23:39:38 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 19 23:39:41 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160313195254.GB20838@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> Message-ID: Hi Dave, I finally had some time to dig into the code and the tests. On Sun, 13 Mar 2016, David T. Lewis wrote: > On Sat, Mar 12, 2016 at 08:48:21PM +0100, Levente Uzonyi wrote: >> Hi Dave, >> >> I ran the tests and found that there are three types of failures. >> 1. Some tests assume that the default offset is #localOffset. I don't >> think it's correct, but that's how is it in Trunk. > > There are 10 failing tests in my image. These are cases in which either > I was uncertain how to handle the issue, or where I thought that the > current behaviour in trunk may be wrong. > >> 2. Hashes have changed. This implies that HashedCollections containing >> DateAndTime instances as key will have to be rehashed. In the base Trunk >> image there are appear to be no such HashedCollections, but not rehashing >> such collections will break images with custom packages in them after >> update. > > I am not expert in this area at all. But part of the update process > (in the MC postscripts) finds all instances of the old style DateAndTime, > and becomes them into the new ones. Would the HashedCollections contianing > DateAndTime instances as key still require rehash in that case? Yes, it is. When their hash changes, these objects will not be found in such collections. > > Related to DateAndTime>>hash, I would also like to ask for guidance as > to how DateAndTime>>= should be defined. Maybe this is an ANSI Smalltalk > question, but I was not sure if we should be thinking of DateAndTime as > a magnitude, such that two instances are equal if their utcMicroseconds > are the same? Or are two instances equal if they have the same magnitude > and also the same localOffsetSeconds? > > I implemented the first approach (two instances are #= if they represent > the same UTC time, regardless of timezone). There may be use cases > where the other approach makes sense. But my thinking was that when > comparing two instances of DateAndTime, they should not be considered > the same unless they both represent the same point in time, hence UTC > time regardless of the time zone in which the instance was created. As we discussed this at the last board meeting, the right thing is to use UTC time only both for #hash and #=, so this is correct. > >> 3. Loss of resolution and strict monotonicity. In Trunk [DateAndTime now < >> DateAndTime now] is always true. This is possible because DateAndTime has >> nanosecond resolution, but the source clock only has microsecond >> resolution, and our machines are so slow that it takes more than a >> nanosecond to execute the primitive. All these allow us to use the >> sub-microsecond part of the timestamp to create intermediate strictly >> monotonic values. >> > > To be honest, I do not fully recall the rationale for this. One > important case is that of the system clock being set back due to > ntp synchronization. Fiddling with the nanoseconds number to make > it appear as if the OS had reported an increase in time (when in > fact it did not) seems questionable to me, but I know that it was > done for some good reason. I do remember the discussions, so I > should look back through the squeak-dev archives and find out the > reason this was done. It comes handy in many situations where uniqueness is a must. E.g. creating file names, storing them in a database. I don't know why it was added originally. The loss of the nanosecond part has another side effect. utcMicroseconds will be a Fraction when the resolution of the parsed input is too high. This is somewhat compatible, but it makes things slower. E.g.: '2002-05-16T17:20:45.000000009+01:01' asDateAndTime utcMicroseconds "==> (1021565985000000009/1000)" I found two other issues: DateAndTime class >> #date:time: ignores the nanoseconds from the time argument. This is present in the Trunk as well, but no test fails, because in Trunk TimeStamps have their nanoseconds part cleared (in a very inefficient way). The other issue is that DateAndTime >> #getSeconds returns a fraction, which contains the nanosecond part as well. This makes DateAndTime >> #asTime return a Time instance which has its nanoseconds part doubled. I simply changed #/ to #// in #getSeconds to work that around. This also satisfied the expectations of all other senders of #getSeconds, but then it turned out to be the same as #getWholeSeconds. Since #getSeconds is a replacement for the original seconds variable (if I'm not mistaken), I think it's safe to do this change and replace sends of #getWholeSeconds to #getSeconds. I found that I'm a developer on the project, so I have uploaded a new version with the changes described above + some optimizations. About some #FIXMEs: #offset: is plain wrong according to its comment. It should simply create a copy with the new offset and the same utcMicrosecond value. Just like how #utcOffset: does. We should keep one or the other but not both. Levente > >> Levente >> > > Thanks very much for looking at this. I added you and Chris Muller as > developers on the UTCDateAndTime repository on squeaksource.com in case > you want to make any changes. > > Much appreciated, > > Dave > > > From commits at source.squeak.org Sun Mar 20 00:00:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 20 00:00:56 2016 Subject: [squeak-dev] The Trunk: Kernel-ul.1006.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.1006.mcz ==================== Summary ==================== Name: Kernel-ul.1006 Author: ul Time: 19 March 2016, 1:28:42.41382 pm UUID: 0883d257-21c1-4bac-bc57-a6cfc1b423e4 Ancestors: Kernel-eem.1005 - 10% faster SmallInteger >> #decimalDigitLength on 64-bit VM - added a comment to SmallInteger >> #numberOfDigitsInBase: - reformatted and tweaked Number >> #raisedToInteger: =============== Diff against Kernel-eem.1005 =============== Item was changed: ----- Method: Number>>raisedToInteger: (in category 'mathematical functions') ----- raisedToInteger: anInteger - "The 0 raisedToInteger: 0 is an special case. In some contexts must be 1 and in others must be handled as an indeterminate form. I take the first context because that's the way that was previously handled. Maybe further discussion is required on this topic." + | bitProbe result | - |bitProbe result| - anInteger negative ifTrue: [^(self raisedToInteger: anInteger negated) reciprocal]. bitProbe := 1 bitShift: anInteger highBit - 1. + result := self class one. + [ + (anInteger bitAnd: bitProbe) > 0 ifTrue: [ result := result * self ]. + (bitProbe := bitProbe bitShift: -1) > 0 ] + whileTrue: [ result := result * result ]. - result := self class one. - [ - (anInteger bitAnd: bitProbe) = 0 ifFalse: [result := result * self]. - bitProbe := bitProbe bitShift: -1. - bitProbe > 0 ] - whileTrue: [result := result * result]. - ^result! Item was changed: ----- Method: SmallInteger>>decimalDigitLength (in category 'printing') ----- decimalDigitLength "Answer the number of digits printed out in base 10. Note that this only works for positive SmallIntegers up to 64-bits." + self < 10000 ifTrue: [ + self < 100 ifTrue: [ + self < 10 ifTrue: [ ^1]. + ^2 ]. + self < 1000 ifTrue: [ ^3 ]. + ^4 ]. + self < 100000000 ifTrue: [ + self < 1000000 ifTrue: [ + self < 100000 ifTrue: [ ^5]. + ^6 ]. + self < 10000000 ifTrue: [ ^7 ]. + ^8 ]. + self < 1000000000000 ifTrue: [ + self < 10000000000 ifTrue: [ + self < 1000000000 ifTrue: [ ^9 ]. + ^10 ]. + self < 100000000000 ifTrue: [ ^11 ]. + ^12 ]. + self < 10000000000000000 ifTrue: [ + self < 100000000000000 ifTrue: [ + self < 10000000000000 ifTrue: [ ^13 ]. + ^14 ]. + self < 1000000000000000 ifTrue: [ ^15 ]. + ^16 ]. + self < 1000000000000000000 ifTrue: [ + self < 100000000000000000 ifTrue: [ ^17 ]. + ^18 ]. + self < 10000000000000000000 ifTrue: [ ^19 ]. + ^20! - ^self < 10000 - ifTrue: - [self < 100 - ifTrue: - [self < 10 ifTrue: [1] ifFalse: [2]] - ifFalse: - [self < 1000 ifTrue: [3] ifFalse: [4]]] - ifFalse: - [self < 100000000 - ifTrue: - [self < 1000000 - ifTrue: [self < 100000 ifTrue: [5] ifFalse: [6]] - ifFalse: [self < 10000000 ifTrue: [7] ifFalse: [8]]] - ifFalse: - [self < 1000000000000 - ifTrue: - [self < 10000000000 - ifTrue: [self < 1000000000 ifTrue: [9] ifFalse: [10]] - ifFalse: [self < 100000000000 ifTrue: [11] ifFalse: [12]]] - ifFalse: - [self < 10000000000000000 - ifTrue: - [self < 100000000000000 - ifTrue: [self < 10000000000000 ifTrue: [13] ifFalse: [14]] - ifFalse: [self < 1000000000000000 ifTrue: [15] ifFalse: [16]]] - ifFalse: - [self < 1000000000000000000 - ifTrue: [self < 100000000000000000 ifTrue: [17] ifFalse: [18]] - ifFalse: [self < 10000000000000000000 ifTrue: [19] ifFalse: [20]]]]]]! Item was changed: ----- Method: SmallInteger>>numberOfDigitsInBase: (in category 'printing') ----- numberOfDigitsInBase: b "Return how many digits are necessary to print this number in base b. Mostly same as super but an optimized version for base 10 case" b = 10 ifFalse: [^super numberOfDigitsInBase: b]. + self < 0 ifTrue: [^self negated numberOfDigitsInBase: b]. "We can't use #decimalDigitLength here, because the receiver might be SmallInteger minVal." - self < 0 ifTrue: [^self negated numberOfDigitsInBase: b]. ^self decimalDigitLength! From commits at source.squeak.org Sun Mar 20 00:01:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 20 00:01:20 2016 Subject: [squeak-dev] The Trunk: Kernel-ul.1007.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.1007.mcz ==================== Summary ==================== Name: Kernel-ul.1007 Author: ul Time: 20 March 2016, 12:46:32.331305 am UUID: 10e56dde-9a4b-4fe5-af9f-a02546962e66 Ancestors: Kernel-ul.1006, Kernel-bf.1006 - merged - quicker SmallInteger>>printOn:base:length:padded: for base 10, the most common case =============== Diff against Kernel-ul.1006 =============== Item was changed: ----- Method: Pragma>>hasLiteral: (in category 'testing') ----- hasLiteral: aLiteral ^keyword == aLiteral + or: [(arguments hasLiteral: aLiteral) + or: [keyword == #hasLiteralTest: and: [ + self methodClass perform: arguments first with: aLiteral]]]! - or: [arguments hasLiteral: aLiteral]! Item was changed: ----- Method: SmallInteger>>printOn:base:length:padded: (in category 'printing') ----- printOn: stream base: base length: minimumLength padded: padWithZeroes | n numberOfDigits totalLength divisor | self < 0 ifTrue: [ n := self negated. totalLength := 1 ] ifFalse: [ n := self. totalLength := 0 ]. numberOfDigits := n numberOfDigitsInBase: base. totalLength := totalLength + numberOfDigits. padWithZeroes ifFalse: [ [ totalLength < minimumLength ] whileTrue: [ stream space. totalLength := totalLength + 1 ] ]. + self < 0 ifTrue: [ stream nextPut: $- ]. - n = self ifFalse: [ stream nextPut: $- ]. padWithZeroes ifTrue: [ [ totalLength < minimumLength ] whileTrue: [ stream nextPut: $0. totalLength := totalLength + 1 ] ]. + divisor := base = 10 + ifTrue: [ #(1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000 100000000000 1000000000000 10000000000000 100000000000000 1000000000000000 10000000000000000 100000000000000000 1000000000000000000) at: numberOfDigits ] + ifFalse: [ base raisedToInteger: numberOfDigits - 1 ]. - divisor := (base raisedToInteger: numberOfDigits - 1). [ divisor > 0 ] whileTrue: [ | digit | digit := n // divisor. stream nextPut: ('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' at: digit + 1). n := n - (digit * divisor). divisor := divisor // base ]! From commits at source.squeak.org Sun Mar 20 00:01:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 20 00:01:54 2016 Subject: [squeak-dev] The Trunk: Collections-ul.681.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.681.mcz ==================== Summary ==================== Name: Collections-ul.681 Author: ul Time: 19 March 2016, 1:39:02.54665 pm UUID: 738dd2f1-c003-4e50-899b-371486e5c419 Ancestors: Collections-ul.680 - Let WriteStream's #nextPutAll: and #next:putAll:startingAt: take the quick route too when collection and aCollection are both strings of the same field size. - PositionableStream >> #next:putAll:startingAt: can rely on the indexability of its argument, thus avoid creating copies of it. It also returns the collection argument, like other implementors of this method, instead of some copied subcollection. =============== Diff against Collections-ul.680 =============== Item was changed: ----- Method: PositionableStream>>next:putAll:startingAt: (in category 'accessing') ----- next: anInteger putAll: aCollection startingAt: startIndex "Store the next anInteger elements from the given collection." + + startIndex to: startIndex + anInteger - 1 do: [ :index | + self nextPut: (aCollection at: index) ]. + ^aCollection! - (startIndex = 1 and:[anInteger = aCollection size]) - ifTrue:[^self nextPutAll: aCollection]. - ^self nextPutAll: (aCollection copyFrom: startIndex to: startIndex+anInteger-1)! Item was changed: ----- Method: WriteStream>>next:putAll:startingAt: (in category 'accessing') ----- next: anInteger putAll: aCollection startingAt: startIndex "Store the next anInteger elements from the given collection." - | newEnd | + (collection class == aCollection class + or: [ collection isString + and: [ aCollection isString + and: [ collection class format = aCollection class format ] ] ]) "Let Strings with the same field size as collection take the quick route too." + ifFalse: [ ^super next: anInteger putAll: aCollection startingAt: startIndex ]. - collection class == aCollection class ifFalse: - [^ super next: anInteger putAll: aCollection startingAt: startIndex]. newEnd := position + anInteger. newEnd > writeLimit ifTrue: [self growTo: newEnd + 10]. collection replaceFrom: position+1 to: newEnd with: aCollection startingAt: startIndex. position := newEnd. ^aCollection! Item was changed: ----- Method: WriteStream>>nextPutAll: (in category 'accessing') ----- nextPutAll: aCollection | newEnd | + (collection class == aCollection class + or: [ collection isString + and: [ aCollection isString + and: [ collection class format = aCollection class format ] ] ]) "Let Strings with the same field size as collection take the quick route too." + ifFalse: [ ^ super nextPutAll: aCollection ]. - collection class == aCollection class ifFalse: - [^ super nextPutAll: aCollection ]. newEnd := position + aCollection size. newEnd > writeLimit ifTrue: [self growTo: newEnd + 10]. collection replaceFrom: position+1 to: newEnd with: aCollection startingAt: 1. position := newEnd. ^aCollection! From commits at source.squeak.org Sun Mar 20 00:02:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 20 00:02:05 2016 Subject: [squeak-dev] The Trunk: Collections-ul.682.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.682.mcz ==================== Summary ==================== Name: Collections-ul.682 Author: ul Time: 20 March 2016, 12:59:06.124515 am UUID: 5276c8f7-606f-42d1-9ce5-e48b88fdac2d Ancestors: Collections-ul.681 - avoid creating intermediate objects in String >> #padded:to:with: =============== Diff against Collections-ul.681 =============== Item was changed: ----- Method: String>>padded:to:with: (in category 'copying') ----- + padded: leftOrRight to: length with: aCharacter + + | result paddingLength | + (paddingLength := length - self size) <= 0 ifTrue: [ ^self ]. + result := self species new: length. + leftOrRight = #left ifTrue: [ + ^result + from: 1 + to: paddingLength + put: aCharacter; + replaceFrom: paddingLength + 1 + to: length + with: self + startingAt: 1; + yourself ]. + leftOrRight = #right ifTrue: [ + ^result + replaceFrom: 1 + to: self size + with: self + startingAt: 1; + from: self size + 1 + to: length + put: aCharacter; + yourself ]! - padded: leftOrRight to: length with: char - leftOrRight = #left ifTrue: - [^ (String new: (length - self size max: 0) withAll: char) , self]. - leftOrRight = #right ifTrue: - [^ self , (String new: (length - self size max: 0) withAll: char)].! From lewis at mail.msen.com Sun Mar 20 16:05:16 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 20 16:05:19 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> Message-ID: <20160320160516.GA51418@shell.msen.com> Hi Levente, Thank you for the review and for your updates. Printing dates seems to be almost 50% faster now with your updates. Dave On Sun, Mar 20, 2016 at 12:39:38AM +0100, Levente Uzonyi wrote: > Hi Dave, > > I finally had some time to dig into the code and the tests. > > On Sun, 13 Mar 2016, David T. Lewis wrote: > > >On Sat, Mar 12, 2016 at 08:48:21PM +0100, Levente Uzonyi wrote: > >>Hi Dave, > >> > >>I ran the tests and found that there are three types of failures. > >>1. Some tests assume that the default offset is #localOffset. I don't > >>think it's correct, but that's how is it in Trunk. > > > >There are 10 failing tests in my image. These are cases in which either > >I was uncertain how to handle the issue, or where I thought that the > >current behaviour in trunk may be wrong. > > > >>2. Hashes have changed. This implies that HashedCollections containing > >>DateAndTime instances as key will have to be rehashed. In the base Trunk > >>image there are appear to be no such HashedCollections, but not rehashing > >>such collections will break images with custom packages in them after > >>update. > > > >I am not expert in this area at all. But part of the update process > >(in the MC postscripts) finds all instances of the old style DateAndTime, > >and becomes them into the new ones. Would the HashedCollections contianing > >DateAndTime instances as key still require rehash in that case? > > Yes, it is. When their hash changes, these objects will not be found in > such collections. > > > > >Related to DateAndTime>>hash, I would also like to ask for guidance as > >to how DateAndTime>>= should be defined. Maybe this is an ANSI Smalltalk > >question, but I was not sure if we should be thinking of DateAndTime as > >a magnitude, such that two instances are equal if their utcMicroseconds > >are the same? Or are two instances equal if they have the same magnitude > >and also the same localOffsetSeconds? > > > >I implemented the first approach (two instances are #= if they represent > >the same UTC time, regardless of timezone). There may be use cases > >where the other approach makes sense. But my thinking was that when > >comparing two instances of DateAndTime, they should not be considered > >the same unless they both represent the same point in time, hence UTC > >time regardless of the time zone in which the instance was created. > > As we discussed this at the last board meeting, the right thing is to use > UTC time only both for #hash and #=, so this is correct. > > > > >>3. Loss of resolution and strict monotonicity. In Trunk [DateAndTime now < > >>DateAndTime now] is always true. This is possible because DateAndTime has > >>nanosecond resolution, but the source clock only has microsecond > >>resolution, and our machines are so slow that it takes more than a > >>nanosecond to execute the primitive. All these allow us to use the > >>sub-microsecond part of the timestamp to create intermediate strictly > >>monotonic values. > >> > > > >To be honest, I do not fully recall the rationale for this. One > >important case is that of the system clock being set back due to > >ntp synchronization. Fiddling with the nanoseconds number to make > >it appear as if the OS had reported an increase in time (when in > >fact it did not) seems questionable to me, but I know that it was > >done for some good reason. I do remember the discussions, so I > >should look back through the squeak-dev archives and find out the > >reason this was done. > > It comes handy in many situations where uniqueness is a must. E.g. > creating file names, storing them in a database. I don't know why it was > added originally. > > The loss of the nanosecond part has another side effect. utcMicroseconds > will be a Fraction when the resolution of the parsed input is too high. > This is somewhat compatible, but it makes things slower. E.g.: > > '2002-05-16T17:20:45.000000009+01:01' asDateAndTime utcMicroseconds > "==> (1021565985000000009/1000)" > > I found two other issues: > > DateAndTime class >> #date:time: ignores the nanoseconds from the time > argument. This is present in the Trunk as well, but no test fails, because > in Trunk TimeStamps have their nanoseconds part cleared (in a very > inefficient way). > > The other issue is that DateAndTime >> #getSeconds returns a fraction, > which contains the nanosecond part as well. This makes DateAndTime >> > #asTime return a Time instance which has its nanoseconds part doubled. > I simply changed #/ to #// in #getSeconds to work that around. This > also satisfied the expectations of all other senders of #getSeconds, but > then it turned out to be the same as #getWholeSeconds. > Since #getSeconds is a replacement for the original seconds variable (if > I'm not mistaken), I think it's safe to do this change and replace sends > of #getWholeSeconds to #getSeconds. > > I found that I'm a developer on the project, so I have uploaded a new > version with the changes described above + some optimizations. > > About some #FIXMEs: > #offset: is plain wrong according to its comment. It should simply create > a copy with the new offset and the same utcMicrosecond value. Just like > how #utcOffset: does. We should keep one or the other but not both. > > Levente > > > > >>Levente > >> > > > >Thanks very much for looking at this. I added you and Chris Muller as > >developers on the UTCDateAndTime repository on squeaksource.com in case > >you want to make any changes. > > > >Much appreciated, > > > >Dave > > > > > > From lewis at mail.msen.com Sun Mar 20 17:16:45 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 20 17:16:47 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> Message-ID: <20160320171645.GA59075@shell.msen.com> On Sun, Mar 20, 2016 at 12:39:38AM +0100, Levente Uzonyi wrote: > > The loss of the nanosecond part has another side effect. utcMicroseconds > will be a Fraction when the resolution of the parsed input is too high. > This is somewhat compatible, but it makes things slower. E.g.: > > '2002-05-16T17:20:45.000000009+01:01' asDateAndTime utcMicroseconds > "==> (1021565985000000009/1000)" > This is an interesting problem. The fractional representation of utcMicroseconds seems reasonable to me in this case, at least now that you have fixed the bugs that I introduced :-) It might however cause issues for Magma and similar applications. I would be interested to hear from Chris Muller is that is a problem. My expectation would be that microseconds should be the unit of measure for time magnitude, but that there should be no limit on precision. Or to say it another way, clocks may have ticks, but time itself should be thought of as continous. Thus I expect utcMicroseconds to be a Number, but not necessarily an Integer. Microseconds is a reasonable unit of measure because it is the highest level of precision available from the clocks on the Linux, OS X, and Windows systems that we use, and because it implies clock accuracy that is well beyond the real time measurement capabilities of those platforms. As far as I know, the practical use of nanosecond precision in DateAndTime would be in the case of adding incremental nanoseconds to the time value in order to create the illusion that repeated calls to the system clock will always result in monotonically increasing values. If so, then I suspect that the same practical result could be achieved by artificially incrementing the value in units of milliseconds rather than nanoseconds, which would ensure unique integer values. After all, it does not seem likely that any application involving a database would be querying the system clock at a rate anywhere close to a million per second. But I have not actually tried this, so I may be misunderstanding the requirement. Dave From commits at source.squeak.org Sun Mar 20 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 20 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160320225502.31827.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-March/009496.html Name: Kernel-ul.1006 Ancestors: Kernel-eem.1005 - 10% faster SmallInteger >> #decimalDigitLength on 64-bit VM - added a comment to SmallInteger >> #numberOfDigitsInBase: - reformatted and tweaked Number >> #raisedToInteger: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009497.html Name: Kernel-ul.1007 Ancestors: Kernel-ul.1006, Kernel-bf.1006 - merged - quicker SmallInteger>>printOn:base:length:padded: for base 10, the most common case ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009498.html Name: Collections-ul.681 Ancestors: Collections-ul.680 - Let WriteStream's #nextPutAll: and #next:putAll:startingAt: take the quick route too when collection and aCollection are both strings of the same field size. - PositionableStream >> #next:putAll:startingAt: can rely on the indexability of its argument, thus avoid creating copies of it. It also returns the collection argument, like other implementors of this method, instead of some copied subcollection. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009499.html Name: Collections-ul.682 Ancestors: Collections-ul.681 - avoid creating intermediate objects in String >> #padded:to:with: ============================================= From lewis at mail.msen.com Mon Mar 21 02:19:14 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 21 02:19:17 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160320171645.GA59075@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> Message-ID: <20160321021914.GA60653@shell.msen.com> On Sun, Mar 20, 2016 at 01:16:45PM -0400, David T. Lewis wrote: > On Sun, Mar 20, 2016 at 12:39:38AM +0100, Levente Uzonyi wrote: > > > > The loss of the nanosecond part has another side effect. utcMicroseconds > > will be a Fraction when the resolution of the parsed input is too high. > > This is somewhat compatible, but it makes things slower. E.g.: > > > > '2002-05-16T17:20:45.000000009+01:01' asDateAndTime utcMicroseconds > > "==> (1021565985000000009/1000)" > > > > This is an interesting problem. > > The fractional representation of utcMicroseconds seems reasonable to me in > this case, at least now that you have fixed the bugs that I introduced :-) > > It might however cause issues for Magma and similar applications. I would > be interested to hear from Chris Muller is that is a problem. > > My expectation would be that microseconds should be the unit of measure > for time magnitude, but that there should be no limit on precision. Or > to say it another way, clocks may have ticks, but time itself should be > thought of as continous. Thus I expect utcMicroseconds to be a Number, but > not necessarily an Integer. > > Microseconds is a reasonable unit of measure because it is the highest > level of precision available from the clocks on the Linux, OS X, and > Windows systems that we use, and because it implies clock accuracy that > is well beyond the real time measurement capabilities of those platforms. > > As far as I know, the practical use of nanosecond precision in DateAndTime > would be in the case of adding incremental nanoseconds to the time value > in order to create the illusion that repeated calls to the system clock > will always result in monotonically increasing values. If so, then I > suspect that the same practical result could be achieved by artificially > incrementing the value in units of milliseconds rather than nanoseconds, > which would ensure unique integer values. > > After all, it does not seem likely that any application involving a > database would be querying the system clock at a rate anywhere close to > a million per second. But I have not actually tried this, so I may be > misunderstanding the requirement. > I updated the package in Chronology-Core-dtl.14 to provide implementations of various strategies for providing monotonically increasing DateAndTime now with a utcMicrosecond time base. I am not sure which is the best approach, but this shows how any of them can be supported. The update comment describes the options: Name: Chronology-Core-dtl.14 Author: dtl Time: 20 March 2016, 9:42:49.417923 pm UUID: 813fbf89-d8e0-4242-a5e5-9e665c9b8618 Ancestors: Chronology-Core-ul.13 Implement a variety of policies for incrementing the clock on repeated calls to DateAndTime class>>now. It is not clear which policy may be best, so provide four variants for experimentation and review. Presumably three of the four options can be removed at a later date. See Time class>>clockPolicy to select a policy. The current clock policy is set to #monotonicForceNanosecondIncrement. The four policies are: #acceptPlatformTime - Accept the time value provided by the system platform, even in this allows time to appear to move backwards when the clock is adjusted. Simple, fast, and no hidden side effects. #monotonicAllowDuplicates - Accept the time value provided by the system platform unless it is less that the last clock tick. This protects for system clock adjustments. Side effects unlikely. Does not ensure unique values on repeated calls. #monotonicForceMicrosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one microsecond. This ensures integral values of UTC time, but increments the time value by a full microsecond. #monotonicForceNanosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one nanosecond. This it functionally compatible with previous Squeak practice, but is computationally expensive and results in time values represented as fractions, which might be a problem for some database applications. From Marcel.Taeumel at hpi.de Mon Mar 21 07:51:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Mar 21 08:20:53 2016 Subject: [squeak-dev] Squeak 1.0 Message-ID: <1458546697052-4885604.post@n4.nabble.com> Hi, there! Does anyone know where to get an image of Squeak 1.0? Best, Marcel -- View this message in context: http://forum.world.st/Squeak-1-0-tp4885604.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Mon Mar 21 08:32:34 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 21 08:32:37 2016 Subject: [squeak-dev] Squeak 1.0 In-Reply-To: <1458546697052-4885604.post@n4.nabble.com> References: <1458546697052-4885604.post@n4.nabble.com> Message-ID: On 21.03.2016, at 08:51, marcel.taeumel wrote: > Hi, there! > > Does anyone know where to get an image of Squeak 1.0? I think the earliest obtainable is Squeak 1.1u, IIRC > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Squeak-1-0-tp4885604.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From leves at caesar.elte.hu Wed Mar 23 16:01:35 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Mar 23 16:01:40 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160321021914.GA60653@shell.msen.com> References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> Message-ID: Hi Dave, On Sun, 20 Mar 2016, David T. Lewis wrote: > > I updated the package in Chronology-Core-dtl.14 to provide implementations > of various strategies for providing monotonically increasing DateAndTime now > with a utcMicrosecond time base. I am not sure which is the best approach, > but this shows how any of them can be supported. > > The update comment describes the options: > > Name: Chronology-Core-dtl.14 > Author: dtl > Time: 20 March 2016, 9:42:49.417923 pm > UUID: 813fbf89-d8e0-4242-a5e5-9e665c9b8618 > Ancestors: Chronology-Core-ul.13 > > Implement a variety of policies for incrementing the clock on repeated calls to DateAndTime class>>now. It is not clear which policy may be best, so provide four variants for experimentation and review. Presumably three of the four options can be removed at a later date. > > See Time class>>clockPolicy to select a policy. The current clock policy is set to #monotonicForceNanosecondIncrement. > > The four policies are: > > #acceptPlatformTime - Accept the time value provided by the system platform, even in this allows time to appear to move backwards when the clock is adjusted. Simple, fast, and no hidden side effects. > > #monotonicAllowDuplicates - Accept the time value provided by the system platform unless it is less that the last clock tick. This protects for system clock adjustments. Side effects unlikely. Does not ensure unique values on repeated calls. > > #monotonicForceMicrosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one microsecond. This ensures integral values of UTC time, but increments the time value by a full microsecond. > > #monotonicForceNanosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one nanosecond. This it functionally compatible with previous Squeak practice, but is computationally expensive and results in time values represented as fractions, which might be a problem for some database applications. I think this covers most possible use cases. What I was originally thinking about was the addition of another field to hold the nanosecond part, since that would have only been set by the image itself, so the primitive could still have been used to initialize the rest. That we we could have avoided the use of fractions at the cost of having another field per object even when there's no need for high accuracy. One more thing that I noticed is that this primitive still uses the "quick but inaccurate" way to get the current time, which only updates every two milliseconds (I think once per heartbeat). Eliot has changed primitive 240 a while ago to always provide the accurate time: | start end | start := DateAndTime now. [ (end := DateAndTime now) = start ] whileTrue. { start. end. end - start } {2016-03-23T16:53:33.637835+01:00 . 2016-03-23T16:53:33.639844+01:00 . 0:00:00:00.002009} | start end | start := Time utcMicrosecondClock. [ (end := Time utcMicrosecondClock) = start ] whileTrue. { start. end. end - start } #(3636201206461149 3636201206461150 1) Levente > > > > > From bert at freudenbergs.de Wed Mar 23 16:22:49 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 23 16:23:18 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20150524163602.GA66073@shell.msen.com> <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> Message-ID: <5A2F5EBC-D9F9-464C-8A8D-26B519063B4F@freudenbergs.de> IMHO monotonicForceMicrosecondIncrement is good rough and should be the default (or only option). And we could easily use Elliot's utcMicrosecondClock (as my latest trunk code does). - Bert - > On 23 Mar 2016, at 17:01, Levente Uzonyi wrote: > > Hi Dave, > >> On Sun, 20 Mar 2016, David T. Lewis wrote: >> >> >> I updated the package in Chronology-Core-dtl.14 to provide implementations >> of various strategies for providing monotonically increasing DateAndTime now >> with a utcMicrosecond time base. I am not sure which is the best approach, >> but this shows how any of them can be supported. >> >> The update comment describes the options: >> >> Name: Chronology-Core-dtl.14 >> Author: dtl >> Time: 20 March 2016, 9:42:49.417923 pm >> UUID: 813fbf89-d8e0-4242-a5e5-9e665c9b8618 >> Ancestors: Chronology-Core-ul.13 >> >> Implement a variety of policies for incrementing the clock on repeated calls to DateAndTime class>>now. It is not clear which policy may be best, so provide four variants for experimentation and review. Presumably three of the four options can be removed at a later date. >> >> See Time class>>clockPolicy to select a policy. The current clock policy is set to #monotonicForceNanosecondIncrement. >> >> The four policies are: >> >> #acceptPlatformTime - Accept the time value provided by the system platform, even in this allows time to appear to move backwards when the clock is adjusted. Simple, fast, and no hidden side effects. >> >> #monotonicAllowDuplicates - Accept the time value provided by the system platform unless it is less that the last clock tick. This protects for system clock adjustments. Side effects unlikely. Does not ensure unique values on repeated calls. >> >> #monotonicForceMicrosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one microsecond. This ensures integral values of UTC time, but increments the time value by a full microsecond. >> >> #monotonicForceNanosecondIncrement - If the time value is less than or equal to the value from the last call, force increment by one nanosecond. This it functionally compatible with previous Squeak practice, but is computationally expensive and results in time values represented as fractions, which might be a problem for some database applications. > > I think this covers most possible use cases. What I was originally thinking about was the addition of another field to hold the nanosecond part, since that would have only been set by the image itself, so the primitive could still have been used to initialize the rest. That we we could have avoided the use of fractions at the cost of having another field per object even when there's no need for high accuracy. > > One more thing that I noticed is that this primitive still uses the "quick but inaccurate" way to get the current time, which only updates every two milliseconds (I think once per heartbeat). Eliot has changed primitive 240 a while ago to always provide the accurate time: > > | start end | > start := DateAndTime now. > [ (end := DateAndTime now) = start ] whileTrue. > { start. end. end - start } > {2016-03-23T16:53:33.637835+01:00 . 2016-03-23T16:53:33.639844+01:00 . 0:00:00:00.002009} > > | start end | > start := Time utcMicrosecondClock. > [ (end := Time utcMicrosecondClock) = start ] whileTrue. > { start. end. end - start } > #(3636201206461149 3636201206461150 1) > > Levente > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6204 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/b8d89c27/smime.bin From eliot.miranda at gmail.com Wed Mar 23 18:26:44 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 23 18:26:48 2016 Subject: [squeak-dev] I would be extremely grateful for a reproducible case for the following Socket issue Message-ID: http://forum.world.st/Socket-s-readSemaphore-is-losing-signals-with-Cog-on-Linux-td3741174.html On 8/13/2011 13:42, Levente Uzonyi wrote: > Socket's readSemaphore is losing signals with CogVMs on linux. We > found several cases (RFB, PostgreSQL) when processes are stuck in the > following method: > > Socket >> waitForDataIfClosed: closedBlock > "Wait indefinitely for data to arrive. This method will block until > data is available or the socket is closed." > > [ > (self primSocketReceiveDataAvailable: socketHandle) > ifTrue: [^self]. > self isConnected > ifFalse: [^closedBlock value]. > self readSemaphore wait ] repeat > > When we inspect the contexts, the process is waiting for the > readSemaphore, but evaluating (self primSocketReceiveDataAvailable: > socketHandle) yields true. Signaling the readSemaphore makes the > process running again. As a workaround we replaced #wait with > #waitTimeoutMSecs: and all our problems disappeared. > > The interpreter VM doesn't seem to have this bug, so I guess the bug > was introduced with the changes of aio.c. ? [hide part of quote] Oh, interesting. We know this problem fairly well and have always worked around by changing the wait in the above to a "waitTimeoutMSecs: 500" which turns it into a soft busy loop. It would be interesting to see if there's a bug in Cog which causes this. FWIW, here is the relevant portion: "Soft 500ms busy loop - to protect against AIO probs; occasionally, VM-level AIO fails to trip the semaphore" self readSemaphore waitTimeoutMSecs: 500. Cheers, - Andreas _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/34dee189/attachment.htm From leves at caesar.elte.hu Wed Mar 23 18:31:17 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Mar 23 18:31:21 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Eliot, What sort of reproducibility are you looking for? Is it enough if it happens once every few hours or do you need something that you can trigger on demand? Levente From eliot.miranda at gmail.com Wed Mar 23 18:45:39 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 23 18:45:42 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Levente, On Wed, Mar 23, 2016 at 11:31 AM, Levente Uzonyi wrote: > Hi Eliot, > > What sort of reproducibility are you looking for? Is it enough if it > happens once every few hours or do you need something that you can trigger > on demand? I'll take every few hours, but I'd prefer "in under 30 minutes". Getting warm and fuzzy feelings when trying to prove a negative with something that takes hours to run is very difficult. Let's say you have a case which reproduces in 8 hours 50% of the time. To reach 99% confidence level in a fix I'd have to run it for 8 * (50 log: 2) hours without seeing it reproduce, right? That's nearly 2 days; it could take weeks to fix :-( Levente > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/d2ff5cb5/attachment.htm From eliot.miranda at gmail.com Wed Mar 23 18:54:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 23 18:54:33 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? Message-ID: Hi All, I often times find myself wanting to see the most recently loaded changes after a package update. How about a preference that would cause Monticello to add changes to recent changes if loading a new version of a package (but not if loading a package for the first time)? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/d4d0ea2b/attachment.htm From tim at rowledge.org Wed Mar 23 19:49:39 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Mar 23 19:49:44 2016 Subject: [squeak-dev] Possible fix to JPEGReadWriter2Plugin allowing use of normally installed library Message-ID: Somebody on the Pi forums has been looking into the jpglib stuff and concluded that there is a simple fix to allow use of the normal linux libjpeg. This would be nice if true. I?m currently swamped but anyone interested can look at https://www.raspberrypi.org/forums/viewtopic.php?p=934869#p934869 and the code and who konws what may happen? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- A .22 caliber intellect in a .357 Magnum world. From cunningham.cb at gmail.com Wed Mar 23 20:45:57 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Mar 23 20:46:01 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: On Wed, Mar 23, 2016 at 11:54 AM, Eliot Miranda wrote: > Hi All, > > I often times find myself wanting to see the most recently loaded > changes after a package update. How about a preference that would cause > Monticello to add changes to recent changes if loading a new version of a > package (but not if loading a package for the first time)? > Currently, Monticello logs all changes to recent changes, correct? That always struck me as weird - when replaying them, should I load the package, or replay the changes, or both? Usually, of course, i had also made a few changes intermixed, which made the decision harder. If there was a way to select recent changes by Monticello package load, would that work for your use case? No idea what kind of work that would involve, though. -cbc > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/62eb82c1/attachment-0001.htm From lewis at mail.msen.com Wed Mar 23 22:48:10 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 23 22:48:12 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <5A2F5EBC-D9F9-464C-8A8D-26B519063B4F@freudenbergs.de> References: <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <5A2F5EBC-D9F9-464C-8A8D-26B519063B4F@freudenbergs.de> Message-ID: <20160323224810.GA2190@shell.msen.com> On Wed, Mar 23, 2016 at 05:22:49PM +0100, Bert Freudenberg wrote: > IMHO monotonicForceMicrosecondIncrement is good rough and should be the default (or only option). > > And we could easily use Elliot's utcMicrosecondClock (as my latest trunk code does). > > - Bert - > I made a number of updates yesterday (but did not mention it on the list). I think that everything is now up to date and reasonably compatible with trunk, including your utcMicrosecondClock changes. The automaticTimezone preference is working now too. I also added HashedCollection rehashAll to the package postscript (thanks Levente). I set the clock policy to monotonicAllowDuplicates, which is my own personal preference. But I expect to be outvoted on that, and I would be quite happy with your preferred choice of monotonicForceMicrosecondIncrement. Dave From bert at freudenbergs.de Wed Mar 23 22:58:06 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 23 22:58:11 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160323224810.GA2190@shell.msen.com> References: <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <5A2F5EBC-D9F9-464C-8A8D-26B519063B4F@freudenbergs.de> <20160323224810.GA2190@shell.msen.com> Message-ID: > On 23.03.2016, at 23:48, David T. Lewis wrote: > >> On Wed, Mar 23, 2016 at 05:22:49PM +0100, Bert Freudenberg wrote: >> IMHO monotonicForceMicrosecondIncrement is good rough and should be the default (or only option). >> >> And we could easily use Elliot's utcMicrosecondClock (as my latest trunk code does). >> >> - Bert - >> > > I made a number of updates yesterday (but did not mention it on the list). I > think that everything is now up to date and reasonably compatible with trunk, > including your utcMicrosecondClock changes. The automaticTimezone preference is > working now too. I also added HashedCollection rehashAll to the package postscript > (thanks Levente). > > I set the clock policy to monotonicAllowDuplicates, which is my own personal > preference. But I expect to be outvoted on that, and I would be quite happy > with your preferred choice of monotonicForceMicrosecondIncrement. Oh. Well I don't need #now to be unique, dupes would be fine. But someone needed it. Speak up! ;) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/07ea5bbe/smime.bin From bert at freudenbergs.de Wed Mar 23 23:00:15 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 23 23:00:20 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/9992a580/smime.bin From lewis at mail.msen.com Wed Mar 23 23:12:46 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 23 23:12:49 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> Message-ID: <20160323231246.GB2190@shell.msen.com> Hi Levente, On Wed, Mar 23, 2016 at 05:01:35PM +0100, Levente Uzonyi wrote: > > On Sun, 20 Mar 2016, David T. Lewis wrote: > > > >The four policies are: > > > >#acceptPlatformTime - Accept the time value provided by the system > >platform, even in this allows time to appear to move backwards when the > >clock is adjusted. Simple, fast, and no hidden side effects. > > > >#monotonicAllowDuplicates - Accept the time value provided by the system > >platform unless it is less that the last clock tick. This protects for > >system clock adjustments. Side effects unlikely. Does not ensure unique > >values on repeated calls. > > > >#monotonicForceMicrosecondIncrement - If the time value is less than or > >equal to the value from the last call, force increment by one microsecond. > >This ensures integral values of UTC time, but increments the time value by > >a full microsecond. > > > >#monotonicForceNanosecondIncrement - If the time value is less than or > >equal to the value from the last call, force increment by one nanosecond. > >This it functionally compatible with previous Squeak practice, but is > >computationally expensive and results in time values represented as > >fractions, which might be a problem for some database applications. > > I think this covers most possible use cases. What I was originally > thinking about was the addition of another field to hold the nanosecond > part, since that would have only been set by the image itself, so the > primitive could still have been used to initialize the rest. That we we > could have avoided the use of fractions at the cost of having another > field per object even when there's no need for high accuracy. I'm actually quite happy with the idea of the value being a Number that is an Integer for all reasonable values that could ever be supplied by the VM, but that might be a Fraction if we want to represent time values at some higher precision. Mainly I like it because it seems good conceptually to think of time as continuous, and not as discreet ticks of a clock. It also works well computationally, because the normal case uses integer values (immediates in 64-bit Spur), and because Fractions involve two integer values, which presumably would be no worse than a design that added another field. But given that none of our computers or VMs can report time to a precision greater than microseconds, I think that we can safely ignore the issue for another 20 years or so ;-) > > One more thing that I noticed is that this primitive still uses the "quick > but inaccurate" way to get the current time, which only updates every two > milliseconds (I think once per heartbeat). Eliot has changed primitive 240 > a while ago to always provide the accurate time: > > | start end | > start := DateAndTime now. > [ (end := DateAndTime now) = start ] whileTrue. > { start. end. end - start } > {2016-03-23T16:53:33.637835+01:00 . 2016-03-23T16:53:33.639844+01:00 . > 0:00:00:00.002009} > > | start end | > start := Time utcMicrosecondClock. > [ (end := Time utcMicrosecondClock) = start ] whileTrue. > { start. end. end - start } > #(3636201206461149 3636201206461150 1) > There is a good implementation of the primitive in the trunk SVN branch that needs to be added to the oscog branch. I think that will take care of the problem. I promised Eliot I would move the code over, but it might be a couple of weeks before I can get to it. We need to add this to the platform code to provide a true atomic primitive (from sq.h): sqInt ioUtcWithOffset(sqLong*, int*); /* primitiveUtcWithOffset */ And then the primitive (slang) can be updated to match. I am afraid that I am responsible for some of the confusion, because when this was added to Cog a number of years ago, I did not want to touch the platform code, and I implemented a rather kludgy workaround just to get it working. Sorry. Dave From eliot.miranda at gmail.com Wed Mar 23 23:13:15 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 23 23:13:18 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: Hi Chris. On Wed, Mar 23, 2016 at 1:45 PM, Chris Cunningham wrote: > > > On Wed, Mar 23, 2016 at 11:54 AM, Eliot Miranda > wrote: > >> Hi All, >> >> I often times find myself wanting to see the most recently loaded >> changes after a package update. How about a preference that would cause >> Monticello to add changes to recent changes if loading a new version of a >> package (but not if loading a package for the first time)? >> > > Currently, Monticello logs all changes to recent changes, correct? > Yes. Newly loaded source lives in the changes file. But I'm talking about Utilities browseRecentSubmissions. > That always struck me as weird - when replaying them, should I load the > package, or replay the changes, or both? Usually, of course, i had also > made a few changes intermixed, which made the decision harder. > > If there was a way to select recent changes by Monticello package load, > would that work for your use case? No idea what kind of work that would > involve, though. > I'm not interested in the recover changes/change list case here. I'm interested in "browse recent changes (R)" (Utilities browseRecentSubmissions) including the most recent modifications obtained by updating an MC package. HTH _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/10565e9d/attachment.htm From eliot.miranda at gmail.com Wed Mar 23 23:22:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 23 23:22:22 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160323231246.GB2190@shell.msen.com> References: <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> Message-ID: Hi Dave, On Wed, Mar 23, 2016 at 4:12 PM, David T. Lewis wrote: > Hi Levente, > > On Wed, Mar 23, 2016 at 05:01:35PM +0100, Levente Uzonyi wrote: > > > > On Sun, 20 Mar 2016, David T. Lewis wrote: > > > > > >The four policies are: > > > > > >#acceptPlatformTime - Accept the time value provided by the system > > >platform, even in this allows time to appear to move backwards when the > > >clock is adjusted. Simple, fast, and no hidden side effects. > > > > > >#monotonicAllowDuplicates - Accept the time value provided by the system > > >platform unless it is less that the last clock tick. This protects for > > >system clock adjustments. Side effects unlikely. Does not ensure unique > > >values on repeated calls. > > > > > >#monotonicForceMicrosecondIncrement - If the time value is less than or > > >equal to the value from the last call, force increment by one > microsecond. > > >This ensures integral values of UTC time, but increments the time value > by > > >a full microsecond. > > > > > >#monotonicForceNanosecondIncrement - If the time value is less than or > > >equal to the value from the last call, force increment by one > nanosecond. > > >This it functionally compatible with previous Squeak practice, but is > > >computationally expensive and results in time values represented as > > >fractions, which might be a problem for some database applications. > > > > I think this covers most possible use cases. What I was originally > > thinking about was the addition of another field to hold the nanosecond > > part, since that would have only been set by the image itself, so the > > primitive could still have been used to initialize the rest. That we we > > could have avoided the use of fractions at the cost of having another > > field per object even when there's no need for high accuracy. > > I'm actually quite happy with the idea of the value being a Number that > is an Integer for all reasonable values that could ever be supplied by > the VM, but that might be a Fraction if we want to represent time values > at some higher precision. Mainly I like it because it seems good > conceptually > to think of time as continuous, and not as discreet ticks of a clock. > > It also works well computationally, because the normal case uses integer > values (immediates in 64-bit Spur), and because Fractions involve two > integer values, which presumably would be no worse than a design that > added another field. But given that none of our computers or VMs can > report time to a precision greater than microseconds, I think that we > can safely ignore the issue for another 20 years or so ;-) > > > > > One more thing that I noticed is that this primitive still uses the > "quick > > but inaccurate" way to get the current time, which only updates every two > > milliseconds (I think once per heartbeat). Eliot has changed primitive > 240 > > a while ago to always provide the accurate time: > > > > | start end | > > start := DateAndTime now. > > [ (end := DateAndTime now) = start ] whileTrue. > > { start. end. end - start } > > {2016-03-23T16:53:33.637835+01:00 . 2016-03-23T16:53:33.639844+01:00 . > > 0:00:00:00.002009} > > > > | start end | > > start := Time utcMicrosecondClock. > > [ (end := Time utcMicrosecondClock) = start ] whileTrue. > > { start. end. end - start } > > #(3636201206461149 3636201206461150 1) > > > > There is a good implementation of the primitive in the trunk SVN branch > that needs to be added to the oscog branch. I think that will take care > of the problem. I promised Eliot I would move the code over, but it might > be a couple of weeks before I can get to it. We need to add this to the > platform code to provide a true atomic primitive (from sq.h): > > sqInt ioUtcWithOffset(sqLong*, int*); /* primitiveUtcWithOffset */ > > And then the primitive (slang) can be updated to match. I am afraid that > I am responsible for some of the confusion, because when this was added > to Cog a number of years ago, I did not want to touch the platform code, > and I implemented a rather kludgy workaround just to get it working. Sorry. > Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which answers a value determined at start-up and only changed via ioUpdateVMTimezone, which itself is controlled by primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed to get at the clock and timezone atomically. If I had had half a brain when I implemented the 64-bit microsecond clock I would have done it as a primitive to answer UTC and a primitive to answer timezone offset, but instead I chose to hide timezone in local microseconds. Live and learn. But the existence of primitiveUpdateTimezone, #243, means I could make it answer the timezone offset if invoked with zero arguments. And that way we'll have every possible combination of 64-bit clock access we could wish for :-) (not) VMMaker.oscog-eem.1739 Author: eem Time: 23 March 2016, 12:41:48.73939 pm UUID: e9e980a3-1fc0-4425-acb8-f1f02f1977b0 Ancestors: VMMaker.oscog-eem.1738 Fix a slip in my correction of primitiveUtcWithOffset (wrong arg count check), and use ioLocalSecondsOffset to get the timezone, hence avoiding the need for the atomic accessor for both clock and timezone offset (the offset can only be changed from the system, and hence won't change while this primitive is executing). Add a Smalltalk epoch version primitiveUtcAndTimezoneOffset and give it primitive #244. > Dave _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/da8a5f46/attachment.htm From lewis at mail.msen.com Wed Mar 23 23:51:28 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 23 23:51:30 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> Message-ID: <20160323235128.GD2190@shell.msen.com> On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > > Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which > answers a value determined at start-up and only changed > via ioUpdateVMTimezone, which itself is controlled by > primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed > to get at the clock and timezone atomically. If it is updated at start-up, then it's wrong. Think of daylight savings time transitions. Dave From commits at source.squeak.org Wed Mar 23 23:57:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 23 23:57:22 2016 Subject: [squeak-dev] The Trunk: SqueakSSL-Core-eem.30.mcz Message-ID: Eliot Miranda uploaded a new version of SqueakSSL-Core to project The Trunk: http://source.squeak.org/trunk/SqueakSSL-Core-eem.30.mcz ==================== Summary ==================== Name: SqueakSSL-Core-eem.30 Author: eem Time: 23 March 2016, 4:56:42.143682 pm UUID: ee6874d3-4825-46f2-8815-06351c26c4e6 Ancestors: SqueakSSL-Core-ul.29 Avoid spin waiting in SSL connect, needed by Squeak 5.0, which doesn't yield on preemption. =============== Diff against SqueakSSL-Core-ul.29 =============== Item was changed: ----- Method: SqueakSSL>>connect:from:to:into: (in category 'operations') ----- connect: srcBuf from: start to: stop into: dstBuf "Start or continue the server handshake using the given input token." + | r | + r := self primitiveSSL: handle connect: srcBuf startingAt: start count: stop-start+1 into: dstBuf. + r <= 0 ifTrue: + [Processor yield]. + ^r! - ^self primitiveSSL: handle connect: srcBuf startingAt: start count: stop-start+1 into: dstBuf! From p3anoman at gmail.com Wed Mar 23 23:46:29 2016 From: p3anoman at gmail.com (John McKeon) Date: Thu Mar 24 00:16:04 2016 Subject: [squeak-dev] Re: I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: <1458776789502-4886208.post@n4.nabble.com> i remeber using rfb to connect to a mac from a win machine at work and that problem would crop up quite regularly. not nearly an eight hour wait. i will see if i can give you a more definite way of reproducing it when i am back at my desk tomorrow -- View this message in context: http://forum.world.st/I-would-be-extremely-grateful-for-a-reproducible-case-for-the-following-Socket-issue-tp4886135p4886208.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Mar 24 00:19:55 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 00:19:57 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... Message-ID: Hi All, _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/8d1d20ab/attachment.htm From eliot.miranda at gmail.com Thu Mar 24 00:21:56 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 00:22:00 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... Message-ID: Hi All, if the Transcript is open and reasonably full of text and scrolled os that the scroll bar is at the bottom right corner of the window one cannot (at least I cannot) grab the scroll bar to scroll the Transcript contents because the cursor is cooped into window resizing (the window resize cursor is shown). :-( _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/76f955ee/attachment.htm From tim at rowledge.org Thu Mar 24 00:32:00 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 24 00:32:00 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: Message-ID: <2C2754CF-FB76-4560-8FC4-662FAC37E53E@rowledge.org> > On 23-03-2016, at 5:21 PM, Eliot Miranda wrote: > > Hi All, > > if the Transcript is open and reasonably full of text and scrolled os that the scroll bar is at the bottom right corner of the window one cannot (at least I cannot) grab the scroll bar to scroll the Transcript contents because the cursor is cooped into window resizing (the window resize cursor is shown). :-( I think that?s a relic of the old Mac window code where one had to manually fake in a grab handle for the bottom-right since there was no place for the Mac UI to include one. It?s been unnecessary (I think) since OS X added pseudo-handles on all sides. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim There can never be a computer language in which you cannot write a bad program. From eliot.miranda at gmail.com Thu Mar 24 00:50:19 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 00:50:24 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160323235128.GD2190@shell.msen.com> References: <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> Message-ID: On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis wrote: > On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > > > > Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which > > answers a value determined at start-up and only changed > > via ioUpdateVMTimezone, which itself is controlled by > > primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed > > to get at the clock and timezone atomically. > > If it is updated at start-up, then it's wrong. Think of daylight savings > time transitions. > So update it automatically once a second or some such? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160323/c21bacfb/attachment.htm From lewis at mail.msen.com Thu Mar 24 01:55:58 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 24 01:56:00 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> Message-ID: <20160324015558.GA31499@shell.msen.com> On Wed, Mar 23, 2016 at 05:50:19PM -0700, Eliot Miranda wrote: > On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis wrote: > > > On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > > > > > > Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which > > > answers a value determined at start-up and only changed > > > via ioUpdateVMTimezone, which itself is controlled by > > > primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed > > > to get at the clock and timezone atomically. > > > > If it is updated at start-up, then it's wrong. Think of daylight savings > > time transitions. > > > > So update it automatically once a second or some such? > Are you joking, or is that a serious question? Confused, Dave /* implementation of ioUtcWithOffset(), defined in config.h to /* override default definition in src/vm/interp.h */ sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) { struct timeval timeval; if (gettimeofday(&timeval, NULL) == -1) return -1; time_t seconds= timeval.tv_sec; suseconds_t usec= timeval.tv_usec; *microSeconds= seconds * 1000000 + usec; #if defined(HAVE_TM_GMTOFF) *offset= localtime(&seconds)->tm_gmtoff; #else { struct tm *local= localtime(&seconds); struct tm *gmt= gmtime(&seconds); int d= local->tm_yday - gmt->tm_yday; int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - gmt->tm_hour); int m= h * 60 + local->tm_min - gmt->tm_min; *offset= m * 60; } #endif return 0; } From Marcel.Taeumel at hpi.de Thu Mar 24 06:32:34 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Mar 24 07:02:12 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: Message-ID: <1458801154614-4886226.post@n4.nabble.com> Hi Eliot, this was a bug at the time of the 4.6/5.0 release. I fixed it in the 5.0 stream and in the trunk. In my image under Windows, I am able to grab the scroll thumb in that case because the window contents are in front of the corner grips. Which image version are you using? Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886226.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Mar 24 06:36:41 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Mar 24 07:06:18 2016 Subject: [squeak-dev] Re: preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: <1458801401281-4886227.post@n4.nabble.com> Hi Eliot, the "Recent Submissions" tool seems broken in my trunk image. The upper list keeps updating and resetting the selection. Thus, I cannot browse. Can you confirm? Best, Marcel -- View this message in context: http://forum.world.st/preference-to-add-Monticello-merges-to-recent-changes-tp4886147p4886227.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Mar 24 07:15:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 24 07:15:30 2016 Subject: [squeak-dev] The Trunk: Tools-mt.681.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.681.mcz ==================== Summary ==================== Name: Tools-mt.681 Author: mt Time: 24 March 2016, 8:15:08.242453 am UUID: fd5127f0-f598-4082-a258-db715da5116f Ancestors: Tools-kfr.680 Fix update behavior in "Recent Submissions" tool. =============== Diff against Tools-kfr.680 =============== Item was changed: ----- Method: RecentMessageSet>>reformulateList (in category 'update') ----- reformulateList "Reformulate the receiver's list. Exclude methods now deleted" + self + initializeMessageList: RecentMessages default methodReferences; + messageListIndex: (self messageListIndex min: messageList size); + changed: #messageList; + changed: #messageListIndex.! - initializeMessageList: RecentMessages default methodReferences ; - messageListIndex: (messageList size min: 1) ; - changed: #messageList ; - changed: #messageListIndex! From stephan at stack.nl Thu Mar 24 08:44:33 2016 From: stephan at stack.nl (Stephan Eggermont) Date: Thu Mar 24 08:44:45 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: On 23-03-16 19:45, Eliot Miranda wrote: > I'll take every few hours, but I'd prefer "in under 30 minutes". > Getting warm and fuzzy feelings when trying to prove a negative with > something that takes hours to run is very difficult. Let's say you > have a case which reproduces in 8 hours 50% of the time. To reach 99% > confidence level in a fix I'd have to run it for 8 * (50 log: 2) hours > without seeing it reproduce, right? That's nearly 2 days; it could > take weeks to fix :-( Levente Is this something where throwing a lot of hardware at it would speed up things? Run for a few minutes on hundreds of vms? Stephan From nicolaihess at gmail.com Thu Mar 24 08:53:13 2016 From: nicolaihess at gmail.com (Nicolai Hess) Date: Thu Mar 24 08:53:16 2016 Subject: [squeak-dev] modifying copied context vars Message-ID: Hello, we have a failing test (OCClosureCompilerTest>>#testDebuggerTempAccess) (fails since spur, but not related - I think). A simple example to reproduce the behavior: | local1 remote1| remote1:=4. local1 :=3.[:i | |c| c := local1. remote1 := i. i halt. "local1:=25. <-- evaluate during debugging" ] value:1. Transcript show:local1;cr. Transcript show:remote1;cr. (Executing this code and evaluating "local:=25" after the debugger halts for "i halt" will modify the var "remote1" instead of "local1", as this is a vector tempvar , proceeding the execution will crash at accessing the remote1 value). The purpose of the testDebuggerTempAccess test case is, evaluating code that changes the value of a copied temp var *does not* change the value of this var in the outer context. (see comment in the test case: "this is not 25 as the var is a local, non escaping variable that was copied into the block, If the compiler would have known about the write, it would have made the var escaping". ) But the implementation (OCCopyingTempVariable>>#writeFromContext: aContext scope: contextScope value: aValue) explicitly iterates through all outer context(s) and changes the vars as well. 1. Question: Who is right? But the reason why the test actually fails is different. It is because evaluating the code that modifies the var "local1:=25" ends up to a call aContext tempAt: self indexFromIR put: aValue but the index (indexFromIR) can be different for every context (method context / inner block context(s)). 2. Question: should the index be always the same? thanks inadvance Nicolai ps: since spur (resp. compiler changes that were done for new spur images), the index of tempvars can be different. In pre-spur, this testcase modifies an outer context var, but one that isn't checked (the argument "two"), therefore the test succeed. In spur, this testcase modifes a different outer context var "remote1", and the test fails. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/443987bd/attachment.htm From leves at caesar.elte.hu Thu Mar 24 09:16:09 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Mar 24 09:16:14 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Eliot, The snippet below, evaluated from a workspace, triggered the issue in less than a minute for me, three times in a row. Both processes will halt if #sloppyWaitForDataIfClosed: doesn't return within a second. If you send #dataAvailable to the socket, you'll find that it has data ready to be read, but its readSemaphore has no signal. Levente Socket compile: 'sloppyWaitForDataIfClosed: closedBlock [(socketHandle ~~ nil and: [self primSocketReceiveDataAvailable: socketHandle]) ifTrue: [^self]. self isConnected ifFalse: [^closedBlock value]. self readSemaphore wait] repeat' classified: 'waiting'. [ listenerSocket := Socket newTCP. listenerSocket listenOn: 0 backlogSize: 4 interface: #[127 0 0 1]. clientSocket := Socket newTCP. clientSocket connectTo: #[127 0 0 1] port: listenerSocket localPort. clientSocket waitForConnectionFor: 1. self assert: clientSocket isConnected. serverSocket := listenerSocket waitForAcceptFor: 1. self assert: serverSocket isConnected ] ensure: [ listenerSocket destroy ]. serverProcess := [ | shouldRun buffer bytesReceived waitDuration | shouldRun := true. buffer := ByteString new: 10. waitDuration := 1 second. [ [ serverSocket sloppyWaitForDataIfClosed: [ shouldRun := false ] ] valueWithin: waitDuration onTimeout: [ self halt ]. buffer atAllPut: (Character value: 0). bytesReceived := serverSocket receiveDataInto: buffer. self assert: bytesReceived = 4. self assert: (buffer first: 4) = 'PING'. serverSocket sendData: 'PONG' ] repeat ] newProcess. clientProcess := [ | shouldRun buffer bytesReceived waitDuration | shouldRun := true. buffer := ByteString new: 10. waitDuration := 1 second. [ clientSocket sendData: 'PING'. [ clientSocket sloppyWaitForDataIfClosed: [ shouldRun := false ] ] valueWithin: waitDuration onTimeout: [ self halt ]. buffer atAllPut: (Character value: 0). bytesReceived := clientSocket receiveDataInto: buffer. self assert: bytesReceived = 4. self assert: (buffer first: 4) = 'PONG' ] repeat ] newProcess. clientProcess priority: 39; resume. serverProcess priority: 39; resume. "Evaluate these after debugging: clientSocket destroy. serverSocket destroy." On Wed, 23 Mar 2016, Eliot Miranda wrote: > Hi Levente, > On Wed, Mar 23, 2016 at 11:31 AM, Levente Uzonyi wrote: > Hi Eliot, > > What sort of reproducibility are you looking for? Is it enough if it happens once every few hours or do you need something that you can trigger on demand? > > > I'll take every few hours, but I'd prefer "in under 30 minutes".? Getting warm and fuzzy feelings when trying to prove a negative with something that takes hours to run is very difficult.? Let's say you have > a case which reproduces in 8 hours 50% of the time.? To reach 99% confidence level in a fix I'd have to run it for 8 * (50 log: 2) hours without seeing it reproduce, right?? That's nearly 2 days; it could > take weeks to fix :-( > > Levente > > > > _,,,^..^,,,_ > best,?Eliot > > From bert at freudenbergs.de Thu Mar 24 12:15:59 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 24 12:16:02 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1458801154614-4886226.post@n4.nabble.com> References: <1458801154614-4886226.post@n4.nabble.com> Message-ID: > On 24.03.2016, at 07:32, marcel.taeumel wrote: > > Hi Eliot, > > this was a bug at the time of the 4.6/5.0 release. I fixed it in the 5.0 > stream and in the trunk. > > In my image under Windows, I am able to grab the scroll thumb in that case > because the window contents are in front of the corner grips. As Tim wrote, this appears to be a general Mac problem. The lower-right corner of any resizable Mac window can?t be used (in any app, so not squeak-specific). Vertical mouse scrolling works though (but I noticed that horizontal mouse scrolling selects text instead, that is weird). - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/0c8ce4f7/smime.bin From asqueaker at gmail.com Thu Mar 24 14:50:20 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 24 14:51:02 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: I specifically do NOT want changes from loading MC packages to go into Recent Changes (R), because loading a package or updating my image blows away all the work in that list which *I* am doing. If you want to see the differences from a package, just click MC's "Changes" button befor eyou load it, or if you've already loaded it, just diff it to its ancestor.. On Wed, Mar 23, 2016 at 1:54 PM, Eliot Miranda wrote: > Hi All, > > I often times find myself wanting to see the most recently loaded > changes after a package update. How about a preference that would cause > Monticello to add changes to recent changes if loading a new version of a > package (but not if loading a package for the first time)? > _,,,^..^,,,_ > best, Eliot > > > From btc at openinworld.com Thu Mar 24 16:48:17 2016 From: btc at openinworld.com (Ben Coman) Date: Thu Mar 24 16:48:55 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160323231246.GB2190@shell.msen.com> References: <20160307052138.GA26765@shell.msen.com> <20160312160411.GA15714@shell.msen.com> <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> Message-ID: On Thu, Mar 24, 2016 at 7:12 AM, David T. Lewis wrote: > Hi Levente, > > On Wed, Mar 23, 2016 at 05:01:35PM +0100, Levente Uzonyi wrote: >> >> On Sun, 20 Mar 2016, David T. Lewis wrote: >> > >> >The four policies are: >> > >> >#acceptPlatformTime - Accept the time value provided by the system >> >platform, even in this allows time to appear to move backwards when the >> >clock is adjusted. Simple, fast, and no hidden side effects. >> > >> >#monotonicAllowDuplicates - Accept the time value provided by the system >> >platform unless it is less that the last clock tick. This protects for >> >system clock adjustments. Side effects unlikely. Does not ensure unique >> >values on repeated calls. >> > >> >#monotonicForceMicrosecondIncrement - If the time value is less than or >> >equal to the value from the last call, force increment by one microsecond. >> >This ensures integral values of UTC time, but increments the time value by >> >a full microsecond. >> > >> >#monotonicForceNanosecondIncrement - If the time value is less than or >> >equal to the value from the last call, force increment by one nanosecond. >> >This it functionally compatible with previous Squeak practice, but is >> >computationally expensive and results in time values represented as >> >fractions, which might be a problem for some database applications. >> >> I think this covers most possible use cases. What I was originally >> thinking about was the addition of another field to hold the nanosecond >> part, since that would have only been set by the image itself, so the >> primitive could still have been used to initialize the rest. That we we >> could have avoided the use of fractions at the cost of having another >> field per object even when there's no need for high accuracy. > > I'm actually quite happy with the idea of the value being a Number that > is an Integer for all reasonable values that could ever be supplied by > the VM, but that might be a Fraction if we want to represent time values > at some higher precision. Mainly I like it because it seems good conceptually > to think of time as continuous, and not as discreet ticks of a clock. > > It also works well computationally, because the normal case uses integer > values (immediates in 64-bit Spur), and because Fractions involve two > integer values, which presumably would be no worse than a design that > added another field. But given that none of our computers or VMs can > report time to a precision greater than microseconds, I think that we > can safely ignore the issue for another 20 years or so ;-) Its not so far away. Three contemporary examples... * Systems that synchronise time from GPS do so "typically well within 40 nanoseconds" [1] * The distributed clock of EtherCAT networks synchronises nodes to better than 100ns. See slide 23 [2] and figure 7 [3]. * IEEE 1588 provides synchronised network time "in the range of +/-200ns between some nodes and even +/-50ns and less between the better ones." [4] This matters for applications like financial trading, motion control and sequence-of-event logging on industrial plants. Maybe not Smalltalk's bread and butter, but the last two are areas I'd like to use it at a co-ordinator level. cheers -ben [1] http://gpsinformation.net/main/gpstime.htm [2] https://ece.uwaterloo.ca/~sfischme/rate/Joey-Stubbs-Ethercat.pdf [3] http://www.iestcfa.org/bestpaper/wfcs10/wfcs10_bpa.pdf [4] https://home.zhaw.ch/~wei/IEEE1588/embedded_World_05_Contribution_final.pdf From tim at rowledge.org Thu Mar 24 17:16:55 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 24 17:16:58 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> Message-ID: <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> > On 24-03-2016, at 5:15 AM, Bert Freudenberg wrote: > [snip] > As Tim wrote, this appears to be a general Mac problem. The lower-right corner of any resizable Mac window can?t be used (in any app, so not squeak-specific). > > Vertical mouse scrolling works though (but I noticed that horizontal mouse scrolling selects text instead, that is weird). Actually I?m both right and wrong because Eliot?s problem is within the Transcript window even if it is not at the bottom-right of the total Squeak window. In a release 50.-15113 image you can see this fairly easily in the ?Release Notes? window; a) scroll to the bottom b) move cursor to very near the bottom of the window and 15-20mm left of the right edge c) slowly move cursor rightwards. Note how it changes to the window resize corner cursor way too early, about when the right edge of the cursor Form gets to the left edge of the scrollbar. Repeating with the cursor a bit higher up shows that the cursor would then change to the window resize edge cursor just as the left edge of the cursor Form touches the left edge of the window frame. Actually I see you don?t even need to scroll the text downwards. Just do b & c above. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Unprecedented performance: Nothing ever ran this slow before. From bert at freudenbergs.de Thu Mar 24 17:25:21 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 24 17:25:26 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> Message-ID: <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> > On 24.03.2016, at 18:16, tim Rowledge wrote: > > >> On 24-03-2016, at 5:15 AM, Bert Freudenberg wrote: >> [snip] >> As Tim wrote, this appears to be a general Mac problem. The lower-right corner of any resizable Mac window can?t be used (in any app, so not squeak-specific). >> >> Vertical mouse scrolling works though (but I noticed that horizontal mouse scrolling selects text instead, that is weird). > > Actually I?m both right and wrong because Eliot?s problem is within the Transcript window even if it is not at the bottom-right of the total Squeak window. > > In a release 50.-15113 image you can see this fairly easily in the ?Release Notes? window; > a) scroll to the bottom > b) move cursor to very near the bottom of the window and 15-20mm left of the right edge > c) slowly move cursor rightwards. > > Note how it changes to the window resize corner cursor way too early, about when the right edge of the cursor Form gets to the left edge of the scrollbar. Repeating with the cursor a bit higher up shows that the cursor would then change to the window resize edge cursor just as the left edge of the cursor Form touches the left edge of the window frame. > > Actually I see you don?t even need to scroll the text downwards. Just do b & c above. Oh, I see. Yes, halo-click there and you see the extra ?grip? morph ... - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/88efb462/smime.bin From karlramberg at gmail.com Thu Mar 24 18:23:52 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 24 18:23:54 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> Message-ID: So the size of the slider is so small that you can not grab it because the cursor changes to rescale the window ? Should the minimum size of slider be adjusted so we don run into this issue? Best, Karl On Thu, Mar 24, 2016 at 6:25 PM, Bert Freudenberg wrote: > > > On 24.03.2016, at 18:16, tim Rowledge wrote: > > > > > >> On 24-03-2016, at 5:15 AM, Bert Freudenberg > wrote: > >> [snip] > >> As Tim wrote, this appears to be a general Mac problem. The lower-right > corner of any resizable Mac window can?t be used (in any app, so not > squeak-specific). > >> > >> Vertical mouse scrolling works though (but I noticed that horizontal > mouse scrolling selects text instead, that is weird). > > > > Actually I?m both right and wrong because Eliot?s problem is within the > Transcript window even if it is not at the bottom-right of the total Squeak > window. > > > > In a release 50.-15113 image you can see this fairly easily in the > ?Release Notes? window; > > a) scroll to the bottom > > b) move cursor to very near the bottom of the window and 15-20mm left of > the right edge > > c) slowly move cursor rightwards. > > > > Note how it changes to the window resize corner cursor way too early, > about when the right edge of the cursor Form gets to the left edge of the > scrollbar. Repeating with the cursor a bit higher up shows that the cursor > would then change to the window resize edge cursor just as the left edge of > the cursor Form touches the left edge of the window frame. > > > > Actually I see you don?t even need to scroll the text downwards. Just do > b & c above. > > > Oh, I see. Yes, halo-click there and you see the extra ?grip? morph ... > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/344ea5e0/attachment.htm From eliot.miranda at gmail.com Thu Mar 24 18:34:47 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 18:34:49 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> Message-ID: On Thu, Mar 24, 2016 at 11:23 AM, karl ramberg wrote: > So the size of the slider is so small that you can not grab it because the > cursor changes to rescale the window ? > Yes. > Should the minimum size of slider be adjusted so we don run into this > issue? > IMO, no. The border of the window is more than large enough for grabbing. IMO, the area for it should not be expanded so much as to occlude the scroll bar slider. > > Best, > Karl > > On Thu, Mar 24, 2016 at 6:25 PM, Bert Freudenberg > wrote: > >> >> > On 24.03.2016, at 18:16, tim Rowledge wrote: >> > >> > >> >> On 24-03-2016, at 5:15 AM, Bert Freudenberg >> wrote: >> >> [snip] >> >> As Tim wrote, this appears to be a general Mac problem. The >> lower-right corner of any resizable Mac window can?t be used (in any app, >> so not squeak-specific). >> >> >> >> Vertical mouse scrolling works though (but I noticed that horizontal >> mouse scrolling selects text instead, that is weird). >> > >> > Actually I?m both right and wrong because Eliot?s problem is within the >> Transcript window even if it is not at the bottom-right of the total Squeak >> window. >> > >> > In a release 50.-15113 image you can see this fairly easily in the >> ?Release Notes? window; >> > a) scroll to the bottom >> > b) move cursor to very near the bottom of the window and 15-20mm left >> of the right edge >> > c) slowly move cursor rightwards. >> > >> > Note how it changes to the window resize corner cursor way too early, >> about when the right edge of the cursor Form gets to the left edge of the >> scrollbar. Repeating with the cursor a bit higher up shows that the cursor >> would then change to the window resize edge cursor just as the left edge of >> the cursor Form touches the left edge of the window frame. >> > >> > Actually I see you don?t even need to scroll the text downwards. Just >> do b & c above. >> >> >> Oh, I see. Yes, halo-click there and you see the extra ?grip? morph ... >> >> - Bert - >> >> >> >> >> >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/cf76a388/attachment.htm From tim at rowledge.org Thu Mar 24 19:37:01 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 24 19:37:04 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> Message-ID: <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> > On 24-03-2016, at 11:23 AM, karl ramberg wrote: > > So the size of the slider is so small that you can not grab it because the cursor changes to rescale the window ? Not exactly. Notice the region for the BottomRightGrip Morph - It?s a side-effect of a too-simple test for whether the morph has the cursor and we have exactly the same problem on the bottom-left corner. And indeed, with less obvious effects on the top two corners. > Should the minimum size of slider be adjusted so we don run into this issue? It?s not relevant to the actual problem so far as I can see. By some means the corner grip morphs need to be cleverer about their touchable area(s). Hmm, actually it looks like all the grips need to be a bit more careful since I see the left/bottom ones for example extend too far outwards and overlap the corners and it all looks a bit untidy. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: RCM: Randomly Corrupt Microcode -------------- next part -------------- Skipped content of type multipart/related From eliot.miranda at gmail.com Thu Mar 24 21:48:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 21:48:25 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-24 at 12.36.44 PM.png Type: image/png Size: 26023 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/f947f0c7/ScreenShot2016-03-24at12.36.44PM.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-24 at 12.31.31 PM.png Type: image/png Size: 15287 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/f947f0c7/ScreenShot2016-03-24at12.31.31PM.png From eliot.miranda at gmail.com Thu Mar 24 21:52:04 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 21:52:07 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: On Thu, Mar 24, 2016 at 7:50 AM, Chris Muller wrote: > I specifically do NOT want changes from loading MC packages to go into > Recent Changes (R), because loading a package or updating my image > blows away all the work in that list which *I* am doing. > That's why it should be a preference. There are circumstances in which the work one /is/ working on is communicated in Monticello packages. So while it may not suit your workflow, there are times when its absence very much does not suit my workflow either. If I'm working on, say, trunk updates, I may very well want to see the dewltas form the previous update in recent changes. > > If you want to see the differences from a package, just click MC's > "Changes" button befor eyou load it, or if you've already loaded it, > just diff it to its ancestor.. > No. That means I have to go back and interact with Monticello. If I want, it's perfectly reasonable for me to want to see these methods in recent chaznges without having to go and select history and choose a version to diff and diff etc. Way too time consuming. > > On Wed, Mar 23, 2016 at 1:54 PM, Eliot Miranda > wrote: > > Hi All, > > > > I often times find myself wanting to see the most recently loaded > > changes after a package update. How about a preference that would cause > > Monticello to add changes to recent changes if loading a new version of a > > package (but not if loading a package for the first time)? > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/f629fe3f/attachment.htm From eliot.miranda at gmail.com Thu Mar 24 21:59:24 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 21:59:27 2016 Subject: [squeak-dev] Re: preference to add Monticello merges to recent changes? In-Reply-To: <1458801401281-4886227.post@n4.nabble.com> References: <1458801401281-4886227.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 55189 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/36f574fc/image-0001.png From eliot.miranda at gmail.com Thu Mar 24 22:02:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 22:02:45 2016 Subject: [squeak-dev] Re: preference to add Monticello merges to recent changes? In-Reply-To: References: <1458801401281-4886227.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 55189 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/9a325379/image.png From karlramberg at gmail.com Thu Mar 24 22:08:39 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Mar 24 22:08:42 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-24 at 12.31.31 PM.png Type: image/png Size: 15287 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/6cae3bad/ScreenShot2016-03-24at12.31.31PM-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-24 at 12.36.44 PM.png Type: image/png Size: 26023 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/6cae3bad/ScreenShot2016-03-24at12.36.44PM-0001.png From commits at source.squeak.org Thu Mar 24 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 24 22:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160324225502.7733.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-March/009500.html Name: SqueakSSL-Core-eem.30 Ancestors: SqueakSSL-Core-ul.29 Avoid spin waiting in SSL connect, needed by Squeak 5.0, which doesn't yield on preemption. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009501.html Name: Tools-mt.681 Ancestors: Tools-kfr.680 Fix update behavior in "Recent Submissions" tool. ============================================= From asqueaker at gmail.com Thu Mar 24 23:21:22 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 24 23:22:06 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-03-24 at 12.31.31 PM.png Type: image/png Size: 15287 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/8befcf4c/ScreenShot2016-03-24at12.31.31PM.png From tim at rowledge.org Thu Mar 24 23:28:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Mar 24 23:28:33 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: > On 24-03-2016, at 4:21 PM, Chris Muller wrote: > [snip] > It?s a side-effect of a too-simple test for whether the morph has the cursor and we have exactly the same problem on the bottom-left corner. And indeed, with less obvious effects on the top two corners. > > Lovely picture illustrating the problem perfectly. Would it be sufficient to move the grip morphs behind the morphs within the bounds of the window? > > Isn't the problem simply that its extent is too large? It should simply match the width/height of the window border widths. > Nah; notice how the extent of the grip morph is (unsurprisingly) the whole square shown, overlapping considerably with the bottom part of the scrollbar. The top-left one almost completely overlaps the close button by the way but morph precedence combined with whatever makes it not a problem. What we want is for the effective region to be an L shape not a square. Or perhaps for it to be behind the scrollbar? If we shrunk it to the border width/height it would be only couple of pixels in size and we?d probably never be able to hit it. Especially on a high resolution display. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Try not to let implementation details sneak into design documents. From lewis at mail.msen.com Thu Mar 24 23:31:56 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 24 23:31:58 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160312184907.GA51125@shell.msen.com> <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> Message-ID: <20160324233156.GA50700@shell.msen.com> On Fri, Mar 25, 2016 at 12:48:17AM +0800, Ben Coman wrote: > On Thu, Mar 24, 2016 at 7:12 AM, David T. Lewis wrote: > > > > I'm actually quite happy with the idea of the value being a Number that > > is an Integer for all reasonable values that could ever be supplied by > > the VM, but that might be a Fraction if we want to represent time values > > at some higher precision. Mainly I like it because it seems good conceptually > > to think of time as continuous, and not as discreet ticks of a clock. > > > > It also works well computationally, because the normal case uses integer > > values (immediates in 64-bit Spur), and because Fractions involve two > > integer values, which presumably would be no worse than a design that > > added another field. But given that none of our computers or VMs can > > report time to a precision greater than microseconds, I think that we > > can safely ignore the issue for another 20 years or so ;-) > > Its not so far away. Three contemporary examples... > > * Systems that synchronise time from GPS do so "typically well within > 40 nanoseconds" [1] > > * The distributed clock of EtherCAT networks synchronises nodes to > better than 100ns. See slide 23 [2] and figure 7 [3]. > > * IEEE 1588 provides synchronised network time "in the range of > +/-200ns between some nodes and even +/-50ns and less between the > better ones." [4] > > This matters for applications like financial trading, motion control > and sequence-of-event logging on industrial plants. Maybe not > Smalltalk's bread and butter, but the last two are areas I'd like to > use it at a co-ordinator level. > > cheers -ben > > [1] http://gpsinformation.net/main/gpstime.htm > [2] https://ece.uwaterloo.ca/~sfischme/rate/Joey-Stubbs-Ethercat.pdf > [3] http://www.iestcfa.org/bestpaper/wfcs10/wfcs10_bpa.pdf > [4] https://home.zhaw.ch/~wei/IEEE1588/embedded_World_05_Contribution_final.pdf Indeed you are quite right. And thank you for those links. Our current Squeak platforms are certainly not real time systems, but our representation of DateAndTime should not be limited by that. I guess that all I can add at this point is my basic premise that a simple representation of a time scale is better than a complicated one. For now, the idea of microseconds as the unit of measure seems to work quite well. Maybe in the future some different representation will be better. At higher levels of precision, I suspect that Fraction (or ScaledDecimal, which is more readable) will be a very efficient representation. And since DateAndTime instances are likely to be important for databases, forcing all of the values to be Fraction (i.e. two integers) might be a good policy. But for now, microseconds since the epoch works well, yielding Integer representations in all practical cases, and overflowing into Fraction if nanosecond precision is needed. Dave From eliot.miranda at gmail.com Thu Mar 24 23:35:40 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 24 23:35:43 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Levente, On Thu, Mar 24, 2016 at 2:16 AM, Levente Uzonyi wrote: > Hi Eliot, > > The snippet below, evaluated from a workspace, triggered the issue in less > than a minute for me, three times in a row. > Both processes will halt if #sloppyWaitForDataIfClosed: doesn't return > within a second. If you send #dataAvailable to the socket, you'll find that > it has data ready to be read, but its readSemaphore has no signal. > > Levente > > > Socket compile: 'sloppyWaitForDataIfClosed: closedBlock > > [(socketHandle ~~ nil > and: [self primSocketReceiveDataAvailable: socketHandle]) ifTrue: > [^self]. > self isConnected ifFalse: > [^closedBlock value]. > self readSemaphore wait] repeat' > classified: 'waiting'. > > [ > listenerSocket := Socket newTCP. > listenerSocket listenOn: 0 backlogSize: 4 interface: #[127 0 0 1]. > clientSocket := Socket newTCP. > clientSocket connectTo: #[127 0 0 1] port: listenerSocket > localPort. > clientSocket waitForConnectionFor: 1. > self assert: clientSocket isConnected. > serverSocket := listenerSocket waitForAcceptFor: 1. > self assert: serverSocket isConnected ] > ensure: [ listenerSocket destroy ]. > > serverProcess := [ > | shouldRun buffer bytesReceived waitDuration | > shouldRun := true. > buffer := ByteString new: 10. > waitDuration := 1 second. > [ > [ serverSocket sloppyWaitForDataIfClosed: [ shouldRun := > false ] ] > valueWithin: waitDuration > onTimeout: [ self halt ]. > buffer atAllPut: (Character value: 0). > bytesReceived := serverSocket receiveDataInto: buffer. > self assert: bytesReceived = 4. > self assert: (buffer first: 4) = 'PING'. > serverSocket sendData: 'PONG' ] repeat ] newProcess. > clientProcess := [ > | shouldRun buffer bytesReceived waitDuration | > shouldRun := true. > buffer := ByteString new: 10. > waitDuration := 1 second. > [ > clientSocket sendData: 'PING'. > [ clientSocket sloppyWaitForDataIfClosed: [ shouldRun := > false ] ] > valueWithin: waitDuration > onTimeout: [ self halt ]. > buffer atAllPut: (Character value: 0). > bytesReceived := clientSocket receiveDataInto: buffer. > self assert: bytesReceived = 4. > self assert: (buffer first: 4) = 'PONG' ] repeat ] > newProcess. > clientProcess priority: 39; resume. > serverProcess priority: 39; resume. > > "Evaluate these after debugging: > clientSocket destroy. > serverSocket destroy." Fabulous, thank you! replace the self halts with e.g. self assert: (clientSocket dataAvailable = (clientSocket readSemaphore excessSignals > 0)), and we even have a test. I have work to do tomorrow but hope I should be able to debug this soon. I'll add kqueue and epoll support when I fix it. (Stephan, interesting suggestion to throw hardware at the problem, thank you). On Wed, 23 Mar 2016, Eliot Miranda wrote: > > Hi Levente, >> On Wed, Mar 23, 2016 at 11:31 AM, Levente Uzonyi >> wrote: >> Hi Eliot, >> >> What sort of reproducibility are you looking for? Is it enough if >> it happens once every few hours or do you need something that you can >> trigger on demand? >> >> >> I'll take every few hours, but I'd prefer "in under 30 minutes". Getting >> warm and fuzzy feelings when trying to prove a negative with something that >> takes hours to run is very difficult. Let's say you have >> a case which reproduces in 8 hours 50% of the time. To reach 99% >> confidence level in a fix I'd have to run it for 8 * (50 log: 2) hours >> without seeing it reproduce, right? That's nearly 2 days; it could >> take weeks to fix :-( >> >> Levente >> >> >> >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160324/bdba3545/attachment.htm From ma.chris.m at gmail.com Thu Mar 24 23:40:52 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Mar 24 23:41:34 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: Ah, yes. On Thu, Mar 24, 2016 at 6:28 PM, tim Rowledge wrote: > >> On 24-03-2016, at 4:21 PM, Chris Muller wrote: >> [snip] >> It?s a side-effect of a too-simple test for whether the morph has the cursor and we have exactly the same problem on the bottom-left corner. And indeed, with less obvious effects on the top two corners. >> >> Lovely picture illustrating the problem perfectly. Would it be sufficient to move the grip morphs behind the morphs within the bounds of the window? >> >> Isn't the problem simply that its extent is too large? It should simply match the width/height of the window border widths. >> > Nah; notice how the extent of the grip morph is (unsurprisingly) the whole square shown, overlapping considerably with the bottom part of the scrollbar. The top-left one almost completely overlaps the close button by the way but morph precedence combined with whatever makes it not a problem. What we want is for the effective region to be an L shape not a square. Or perhaps for it to be behind the scrollbar? > > If we shrunk it to the border width/height it would be only couple of pixels in size and we?d probably never be able to hit it. Especially on a high resolution display. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Try not to let implementation details sneak into design documents. > > From asqueaker at gmail.com Fri Mar 25 00:02:33 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 25 00:03:16 2016 Subject: [squeak-dev] preference to add Monticello merges to recent changes? In-Reply-To: References: Message-ID: >> I specifically do NOT want changes from loading MC packages to go into >> Recent Changes (R), because loading a package or updating my image >> blows away all the work in that list which *I* am doing. > > That's why it should be a preference. There are circumstances in which the > work one /is/ working on is communicated in Monticello packages. So while > it may not suit your workflow, there are times when its absence very much > does not suit my workflow either. If I'm working on, say, trunk updates, I > may very well want to see the dewltas form the previous update in recent > changes. >> If you want to see the differences from a package, just click MC's >> "Changes" button befor eyou load it, or if you've already loaded it, >> just diff it to its ancestor.. > > > No. That means I have to go back and interact with Monticello. If I want, > it's perfectly reasonable for me to want to see these methods in recent > chaznges without having to go and select history and choose a version to > diff and diff etc. Way too time consuming. Recent Changes has a limited size, so you will either face truncation, or, if you increased it to, say, 1000, you'll not be able to quickly determine where in the big list the the prior changes ended, and the new just-loaded stuff begins. You mentioned you aren't interested in the recover changes/change list case here. Why? It fits yor purpose in all the ways Recent Messages doesn't. Would some improvement in that browser allow it to work just as well? From eliot.miranda at gmail.com Fri Mar 25 05:05:17 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 05:05:22 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160324015558.GA31499@shell.msen.com> References: <20160313195254.GB20838@shell.msen.com> <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> Message-ID: <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> > On Mar 23, 2016, at 6:55 PM, David T. Lewis wrote: > >> On Wed, Mar 23, 2016 at 05:50:19PM -0700, Eliot Miranda wrote: >>> On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis wrote: >>> >>>> On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: >>>> >>>> Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which >>>> answers a value determined at start-up and only changed >>>> via ioUpdateVMTimezone, which itself is controlled by >>>> primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed >>>> to get at the clock and timezone atomically. >>> >>> If it is updated at start-up, then it's wrong. Think of daylight savings >>> time transitions. >> >> So update it automatically once a second or some such? > > Are you joking, or is that a serious question? Yes. I see two or three system calls in the code below. gettimeofday, one inside localtime and one inside gmtime. That's expensive. > > Confused, > Dave > > > /* implementation of ioUtcWithOffset(), defined in config.h to > /* override default definition in src/vm/interp.h > */ > sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) > { > struct timeval timeval; > if (gettimeofday(&timeval, NULL) == -1) return -1; > time_t seconds= timeval.tv_sec; > suseconds_t usec= timeval.tv_usec; > *microSeconds= seconds * 1000000 + usec; > #if defined(HAVE_TM_GMTOFF) > *offset= localtime(&seconds)->tm_gmtoff; > #else > { > struct tm *local= localtime(&seconds); > struct tm *gmt= gmtime(&seconds); > int d= local->tm_yday - gmt->tm_yday; > int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - gmt->tm_hour); > int m= h * 60 + local->tm_min - gmt->tm_min; > *offset= m * 60; > } > #endif > return 0; > } > > > From eliot.miranda at gmail.com Fri Mar 25 05:26:45 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 05:26:50 2016 Subject: [squeak-dev] modifying copied context vars In-Reply-To: References: Message-ID: <664D5B64-0BE1-48BF-ABBB-CFF48E0176B3@gmail.com> Hi Nicolai, > On Mar 24, 2016, at 1:53 AM, Nicolai Hess wrote: > > Hello, > > we have a failing test (OCClosureCompilerTest>>#testDebuggerTempAccess) > (fails since spur, but not related - I think). > > A simple example to reproduce the behavior: > | local1 remote1| > remote1:=4. > local1 :=3. > [:i | |c| > c := local1. > remote1 := i. > i halt. > "local1:=25. <-- evaluate during debugging" > ] value:1. > Transcript show:local1;cr. > Transcript show:remote1;cr. > (Executing this code and evaluating "local:=25" after the debugger halts for > "i halt" will modify the var "remote1" instead of "local1", as this is a vector tempvar , proceeding > the execution will crash at accessing the remote1 value). > > > The purpose of the testDebuggerTempAccess test case is, evaluating code > that changes the value of a copied temp var *does not* change the value of > this var in the outer context. (see comment in the test case: > "this is not 25 as the var is a local, non escaping variable that was copied into the block, > If the compiler would have known about the write, it would have made the var escaping". > ) > > But the implementation (OCCopyingTempVariable>>#writeFromContext: aContext scope: contextScope value: aValue) > explicitly iterates through all outer context(s) and changes the vars as well. > > 1. Question: Who is right? What do you mean? Because the closure model is as it is (for very good reason) the computer copies temporaries whose values cannot change during the execution of a block into that block if the block references the variable. If the debugger is to support updating such copied variables then it must create the illusion of "the variable being updated" because there isn't just one variable. > But the reason why the test actually fails is different. It is because evaluating > the code that modifies the var "local1:=25" ends up to a call > aContext tempAt: self indexFromIR put: aValue > but the index (indexFromIR) can be different for every context (method context / inner block > context(s)). Right. > > 2. Question: should the index be always the same? How can it be? If, for example, a nullary block makes use of a copied variable and has no local temps then that variable will end up with index 0, no matter its indices in outer scopes. Surely you're not proposing padding the block with unused variables just so copied variables can have the same index? > > thanks inadvance > > Nicolai > > > ps: since spur (resp. compiler changes that were done for new spur images), the index of tempvars can be different. > In pre-spur, this testcase modifies an outer context var, but one that isn't checked (the argument "two"), therefore > the test succeed. In spur, this testcase modifes a different outer context var "remote1", and the test > fails. Since Sour hasn't changed the compiler there looks to be a bug. Sour has changed the identityHash size a lot from IIRC 11 bits to 22. So hashed collections can end up with different enumerations. But that shouldn't affect the ordering assigned to temps in the compiler. I suggest tracking down why the code is different in Spur is a very important thing to do. HTH Eliot _,,,^..^,,,_ (phone) PS if you want to understand why copied variables are so important in the closure model you need to understand context-to-stack mapping and the overhead that not copying temps adds to returns in a context-to-stack mapping VM. It's not obvious but I hope my blog does an ok job of explaining something alas complex but extremely important for performance. From nicolaihess at gmail.com Fri Mar 25 09:51:40 2016 From: nicolaihess at gmail.com (Nicolai Hess) Date: Fri Mar 25 09:51:42 2016 Subject: [squeak-dev] modifying copied context vars In-Reply-To: <664D5B64-0BE1-48BF-ABBB-CFF48E0176B3@gmail.com> References: <664D5B64-0BE1-48BF-ABBB-CFF48E0176B3@gmail.com> Message-ID: 2016-03-25 6:26 GMT+01:00 Eliot Miranda : > Hi Nicolai, > > > On Mar 24, 2016, at 1:53 AM, Nicolai Hess wrote: > > > > Hello, > > > > we have a failing test (OCClosureCompilerTest>>#testDebuggerTempAccess) > > (fails since spur, but not related - I think). > > > > A simple example to reproduce the behavior: > > | local1 remote1| > > remote1:=4. > > local1 :=3. > > [:i | |c| > > c := local1. > > remote1 := i. > > i halt. > > "local1:=25. <-- evaluate during debugging" > > ] value:1. > > Transcript show:local1;cr. > > Transcript show:remote1;cr. > > (Executing this code and evaluating "local:=25" after the debugger halts > for > > "i halt" will modify the var "remote1" instead of "local1", as this is a > vector tempvar , proceeding > > the execution will crash at accessing the remote1 value). > > > > > > The purpose of the testDebuggerTempAccess test case is, evaluating code > > that changes the value of a copied temp var *does not* change the value > of > > this var in the outer context. (see comment in the test case: > > "this is not 25 as the var is a local, non escaping variable that was > copied into the block, > > If the compiler would have known about the write, it would have made > the var escaping". > > ) > > > > But the implementation (OCCopyingTempVariable>>#writeFromContext: > aContext scope: contextScope value: aValue) > > explicitly iterates through all outer context(s) and changes the vars as > well. > > > > 1. Question: Who is right? > > What do you mean? Because the closure model is as it is (for very good > reason) the computer copies temporaries whose values cannot change during > the execution of a block into that block if the block references the > variable. If the debugger is to support updating such copied variables > then it must create the illusion of "the variable being updated" because > there isn't just one variable. > I know that it only operates on a copy of this var (if the var is only read (in the original code)), but you *can* evaluate code during debugging, that can modify the var. I don't know why or if we want to support that. I just see a failing test case that tries to do exactly that. And the supposed behavior is, that the outer context variable value does not change. But this test fails. I tried similar code in squeak, and there the outer context var does not change: |local remote outerContext| local :=1. remote:=2. outerContext := thisContext. (1 to:1) do:[:i | remote := i. Transcript show:local;cr. i halt. "remote:=20" "local:=10" "outerContext tempAt:1 put:30" Transcript show:local;cr. ]. Transcript show:local;cr. Transcript show:remote;cr. If the debugger halts at "i halt" and you evaluate the code "remote:=20" the remote value changes for t he block context and for its outer context - OK "local:=10" the local value changes for the block context but not for its outer context - OK "outerContext tempAt:1 put:30" the local value only changes for the outer context - OK Is this right? > > > > But the reason why the test actually fails is different. It is because > evaluating > > the code that modifies the var "local1:=25" ends up to a call > > aContext tempAt: self indexFromIR put: aValue > > but the index (indexFromIR) can be different for every context (method > context / inner block > > context(s)). > > Right. > > > > > 2. Question: should the index be always the same? > > How can it be? If, for example, a nullary block makes use of a copied > variable and has no local temps then that variable will end up with index > 0, no matter its indices in outer scopes. Surely you're not proposing > padding the block with unused variables just so copied variables can have > the same index? > Yes, makes sense. > > > > > thanks inadvance > > > > Nicolai > > > > > > ps: since spur (resp. compiler changes that were done for new spur > images), the index of tempvars can be different. > > In pre-spur, this testcase modifies an outer context var, but one that > isn't checked (the argument "two"), therefore > > the test succeed. In spur, this testcase modifes a different outer > context var "remote1", and the test > > fails. > > > Since Sour hasn't changed the compiler there looks to be a bug. Sour has > changed the identityHash size a lot from IIRC 11 bits to 22. So hashed > collections can end up with different enumerations. But that shouldn't > affect the ordering assigned to temps in the compiler. I suggest tracking > down why the code is different in Spur is a very important thing to do. > Yes, we merged some code for spur support (opals compiler code) and lost some intermediate changes that were made for opal. Debugging this bugs was a mess. > > HTH > > Eliot > thanks > _,,,^..^,,,_ (phone) > > PS if you want to understand why copied variables are so important in the > closure model you need to understand context-to-stack mapping and the > overhead that not copying temps adds to returns in a context-to-stack > mapping VM. It's not obvious but I hope my blog does an ok job of > explaining something alas complex but extremely important for performance. > I read your blog -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/642d05d6/attachment.htm From Marcel.Taeumel at hpi.de Fri Mar 25 10:25:38 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Mar 25 10:55:23 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> Message-ID: <1458901538119-4886473.post@n4.nabble.com> I still don't get it. Why is this a Mac problem? Where is the Mac-specific part in this problem? The size of the grip is fine because all windows contents are *in front of* that grip. So is the scroll bar and its thumb. So, where does the platform play a role in this Squeak-specific problem? Please see the screeshot and notice the Z-Order of things. The corner grips do not occlude the text morph and its scroll bar. Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886473.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Fri Mar 25 14:32:05 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Mar 25 14:32:07 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1458901538119-4886473.post@n4.nabble.com> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> Message-ID: this is not a Mac-specific problem - verified it myself on Windows yesterday. It showed all of the behaviour that has been mentioned previously. -cbc On Fri, Mar 25, 2016 at 3:25 AM, marcel.taeumel wrote: > I still don't get it. Why is this a Mac problem? Where is the Mac-specific > part in this problem? > > The size of the grip is fine because all windows contents are *in front of* > that grip. So is the scroll bar and its thumb. > > So, where does the platform play a role in this Squeak-specific problem? > > Please see the screeshot and notice the Z-Order of things. The corner grips > do not occlude the text morph and its scroll bar. > > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886473.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/20160325/c2788530/attachment-0001.htm From karlramberg at gmail.com Fri Mar 25 14:52:37 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Mar 25 14:52:41 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> Message-ID: The only way I can think of this happening is that a mouseEnter or mouseLeave is missed somehow. Best, Karl On Fri, Mar 25, 2016 at 3:32 PM, Chris Cunningham wrote: > this is not a Mac-specific problem - verified it myself on Windows > yesterday. It showed all of the behaviour that has been mentioned > previously. > > -cbc > > On Fri, Mar 25, 2016 at 3:25 AM, marcel.taeumel > wrote: > >> I still don't get it. Why is this a Mac problem? Where is the Mac-specific >> part in this problem? >> >> The size of the grip is fine because all windows contents are *in front >> of* >> that grip. So is the scroll bar and its thumb. >> >> So, where does the platform play a role in this Squeak-specific problem? >> >> Please see the screeshot and notice the Z-Order of things. The corner >> grips >> do not occlude the text morph and its scroll bar. >> >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886473.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/20160325/daa4f331/attachment.htm From bert at freudenbergs.de Fri Mar 25 14:56:15 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 25 14:56:19 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1458901538119-4886473.post@n4.nabble.com> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> Message-ID: <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> On 25.03.2016, at 11:25, marcel.taeumel wrote: > > I still don't get it. Why is this a Mac problem? Where is the Mac-specific > part in this problem? ? > The size of the grip is fine because all windows contents are *in front of* > that grip. So is the scroll bar and its thumb. > > So, where does the platform play a role in this Squeak-specific problem? > > Please see the screeshot and notice the Z-Order of things. The corner grips > do not occlude the text morph and its scroll bar. > There are actually two problems that look very similar but are unrelated: (1) grips on top of the text morph In a 5.0 image, the text morph is behind the grips. Apparently this has been fixed in the mean time, in Trunk it looks fine. This is obviously independent of platform. (2) window ?grip? on Mac On a Mac, the VM provides a similar ?grip? for the full Squeak window, which makes it impossible to click in the lower left and right corners. So (1) appears to be fixed in trunk and (2) can not be fixed because it?s the same in all Mac apps. I?d say we?re good. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/2a616381/smime.bin From leves at caesar.elte.hu Fri Mar 25 15:29:22 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Fri Mar 25 15:29:26 2016 Subject: [squeak-dev] [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Holger, The snippet doesn't seem to trigger the issue when strace is attached to the process. But it usually runs into the issue short after I stop strace. Levente On Thu, 24 Mar 2016, Holger Freyther wrote: > > >> On 24 Mar 2016, at 10:16, Levente Uzonyi wrote: >> >> Hi Eliot, >> >> The snippet below, evaluated from a workspace, triggered the issue in less than a minute for me, three times in a row. >> Both processes will halt if #sloppyWaitForDataIfClosed: doesn't return within a second. If you send #dataAvailable to the socket, you'll find that it has data ready to be read, but its readSemaphore has no signal. > > does it happen if you have strace -o output.txt -f on the VM as well? > > kind regards > holger From lewis at mail.msen.com Fri Mar 25 15:51:41 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 25 15:51:44 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> Message-ID: <20160325155141.GA19526@shell.msen.com> On Thu, Mar 24, 2016 at 10:05:17PM -0700, Eliot Miranda wrote: > > > > On Mar 23, 2016, at 6:55 PM, David T. Lewis wrote: > > > >> On Wed, Mar 23, 2016 at 05:50:19PM -0700, Eliot Miranda wrote: > >>> On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis wrote: > >>> > >>>> On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > >>>> > >>>> Turns out this isn't needed for Cog. I have ioLocalSecondsOffset which > >>>> answers a value determined at start-up and only changed > >>>> via ioUpdateVMTimezone, which itself is controlled by > >>>> primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's needed > >>>> to get at the clock and timezone atomically. > >>> > >>> If it is updated at start-up, then it's wrong. Think of daylight savings > >>> time transitions. > >> > >> So update it automatically once a second or some such? > > > > Are you joking, or is that a serious question? > > Yes. I see two or three system calls in the code below. gettimeofday, one inside localtime and one inside gmtime. That's expensive. > It's gettimeofday() and localtime(). The #else is fallback for older unix platforms. In any case, caching the value and updating it periodically does not sound like a good idea to me. Dave > > > > Confused, > > Dave > > > > > > /* implementation of ioUtcWithOffset(), defined in config.h to > > /* override default definition in src/vm/interp.h > > */ > > sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) > > { > > struct timeval timeval; > > if (gettimeofday(&timeval, NULL) == -1) return -1; > > time_t seconds= timeval.tv_sec; > > suseconds_t usec= timeval.tv_usec; > > *microSeconds= seconds * 1000000 + usec; > > #if defined(HAVE_TM_GMTOFF) > > *offset= localtime(&seconds)->tm_gmtoff; > > #else > > { > > struct tm *local= localtime(&seconds); > > struct tm *gmt= gmtime(&seconds); > > int d= local->tm_yday - gmt->tm_yday; > > int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - gmt->tm_hour); > > int m= h * 60 + local->tm_min - gmt->tm_min; > > *offset= m * 60; > > } > > #endif > > return 0; > > } > > > > > > From eliot.miranda at gmail.com Fri Mar 25 15:57:45 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 15:57:49 2016 Subject: [squeak-dev] [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: <484C60FE-D9CA-4539-88F6-8B134EABD9C8@freyther.de> References: <484C60FE-D9CA-4539-88F6-8B134EABD9C8@freyther.de> Message-ID: Hi Holger, let's collaborate on this. You and I and lots of others want this to be done. But in fixing the below bug my priorities are to a) deliver a fix promptly b) write the code so that either kqueue or epoll or select will be used based on HAVE_KQUEUE & HAVE_EPOLL defines So if I deliver a fix don't think that I'm against having a proper event-driven or idling VM, I just don't have it in my head yet and want the bug fixed and kqueue/epoll available asap. On Thu, Mar 24, 2016 at 11:42 PM, Holger Freyther wrote: > > > > On 25 Mar 2016, at 00:35, Eliot Miranda wrote: > > > > > Dear Eliot, > > > > Fabulous, thank you! replace the self halts with e.g. self assert: > (clientSocket dataAvailable = (clientSocket readSemaphore excessSignals > > 0)), and we even have a test. I have work to do tomorrow but hope I should > be able to debug this soon. I'll add kqueue and epoll support when I fix > it. > > before going to kqueue, could you have a look at my hack to create a > completely idle VM? Once the VM has moved to kqueue it seems one can not > get a SIGIO for the "kqueue descriptor"[1] itself and I don't know if SIGIO > remains working for the individual file descriptors. > > holger > > > [1] > https://github.com/freebsd/freebsd/blob/master/sys/kern/kern_event.c#L1735 > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/c93ea7a7/attachment.htm From eliot.miranda at gmail.com Fri Mar 25 16:22:09 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 16:22:12 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160325155141.GA19526@shell.msen.com> References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> Message-ID: On Fri, Mar 25, 2016 at 8:51 AM, David T. Lewis wrote: > On Thu, Mar 24, 2016 at 10:05:17PM -0700, Eliot Miranda wrote: > > > > > > > On Mar 23, 2016, at 6:55 PM, David T. Lewis > wrote: > > > > > >> On Wed, Mar 23, 2016 at 05:50:19PM -0700, Eliot Miranda wrote: > > >>> On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis > wrote: > > >>> > > >>>> On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > > >>>> > > >>>> Turns out this isn't needed for Cog. I have ioLocalSecondsOffset > which > > >>>> answers a value determined at start-up and only changed > > >>>> via ioUpdateVMTimezone, which itself is controlled by > > >>>> primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's > needed > > >>>> to get at the clock and timezone atomically. > > >>> > > >>> If it is updated at start-up, then it's wrong. Think of daylight > savings > > >>> time transitions. > > >> > > >> So update it automatically once a second or some such? > > > > > > Are you joking, or is that a serious question? > > > > Yes. I see two or three system calls in the code below. gettimeofday, > one inside localtime and one inside gmtime. That's expensive. > > > > It's gettimeofday() and localtime(). The #else is fallback for older unix > platforms. > As I said, two or three. In any case, caching the value and updating it periodically does not sound > like a good idea to me. > Why not? Why does the time zone need to be determined on every time call even though it only has a resolution of seconds? If including the timezone in every time call slows down accessing the time by, say, 33%, is it a good idea, when the VM can easily eliminate this overhead? | c | c := LargePositiveInteger. [1 to: 10000000 do: [:i| c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8]] timeToRun 884 [1 to: 10000000 do: [:i| Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock]] timeToRun 6412 6412 / 884.0 7.253393665158371 So the overhead of the system calls involved in accessing time are much greater than the costs of allocating and garbage collecting 64-bit large integer results; much larger. Dave > > > > > > > > Confused, > > > Dave > > > > > > > > > /* implementation of ioUtcWithOffset(), defined in config.h to > > > /* override default definition in src/vm/interp.h > > > */ > > > sqInt sqUnixUtcWithOffset(sqLong *microSeconds, int *offset) > > > { > > > struct timeval timeval; > > > > if (gettimeofday(&timeval, NULL) == -1) return -1; > > > time_t seconds= timeval.tv_sec; > > > suseconds_t usec= timeval.tv_usec; > > > *microSeconds= seconds * 1000000 + usec; > > > #if defined(HAVE_TM_GMTOFF) > > > *offset= localtime(&seconds)->tm_gmtoff; > > > #else > > > { > > > struct tm *local= localtime(&seconds); > > > struct tm *gmt= gmtime(&seconds); > > > int d= local->tm_yday - gmt->tm_yday; > > > int h= ((d < -1 ? 24 : 1 < d ? -24 : d * 24) + local->tm_hour - > gmt->tm_hour); > > > int m= h * 60 + local->tm_min - gmt->tm_min; > > > *offset= m * 60; > > > } > > > #endif > > > return 0; > > > } > > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/744b4bbc/attachment.htm From bert at freudenbergs.de Fri Mar 25 16:23:34 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 25 16:23:37 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <20160325155141.GA19526@shell.msen.com> References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> Message-ID: On 25.03.2016, at 16:51, David T. Lewis wrote: > > On Thu, Mar 24, 2016 at 10:05:17PM -0700, Eliot Miranda wrote: >> I see two or three system calls in the code below. gettimeofday, one inside localtime and one inside gmtime. That's expensive. >> > > It's gettimeofday() and localtime(). The #else is fallback for older unix platforms. > > In any case, caching the value and updating it periodically does not sound like a good idea to me. Well, it?s okay to cheat as long as you won?t get caught (says DI). Simply ?once a second? is not good enough if we check the time 0.5 seconds after DST switch. If ?once a second? was implemented as ?once every wall-clock second?, IMHO that would be fine. So the test would have to be something like (prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self updateOffsetFromUTC] Right? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/ab061e83/smime.bin From eliot.miranda at gmail.com Fri Mar 25 16:47:43 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 16:47:45 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> Message-ID: On Fri, Mar 25, 2016 at 9:23 AM, Bert Freudenberg wrote: > On 25.03.2016, at 16:51, David T. Lewis wrote: > > > > On Thu, Mar 24, 2016 at 10:05:17PM -0700, Eliot Miranda wrote: > >> I see two or three system calls in the code below. gettimeofday, one > inside localtime and one inside gmtime. That's expensive. > >> > > > > It's gettimeofday() and localtime(). The #else is fallback for older > unix platforms. > > > > In any case, caching the value and updating it periodically does not > sound like a good idea to me. > > Well, it?s okay to cheat as long as you won?t get caught (says DI). > > Simply ?once a second? is not good enough if we check the time 0.5 seconds > after DST switch. > > If ?once a second? was implemented as ?once every wall-clock second?, IMHO > that would be fine. So the test would have to be something like > > (prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self > updateOffsetFromUTC] > > Right? > Excellent point. So the drift algorithm to provide an accurate clock can be extended to check the time zone whenever the new time is at a different second to the previous value. > - Bert - _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/9d217c26/attachment.htm From bert at freudenbergs.de Fri Mar 25 17:08:42 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 25 17:08:46 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> Message-ID: <430C3930-FB6C-4492-ABAD-A756C4C365F0@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/b1464878/smime.bin From lewis at mail.msen.com Fri Mar 25 17:41:45 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 25 17:41:46 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> Message-ID: <20160325174145.GA28846@shell.msen.com> On Fri, Mar 25, 2016 at 09:22:09AM -0700, Eliot Miranda wrote: > On Fri, Mar 25, 2016 at 8:51 AM, David T. Lewis wrote: > > > On Thu, Mar 24, 2016 at 10:05:17PM -0700, Eliot Miranda wrote: > > > > > > > > > > On Mar 23, 2016, at 6:55 PM, David T. Lewis > > wrote: > > > > > > > >> On Wed, Mar 23, 2016 at 05:50:19PM -0700, Eliot Miranda wrote: > > > >>> On Wed, Mar 23, 2016 at 4:51 PM, David T. Lewis > > wrote: > > > >>> > > > >>>> On Wed, Mar 23, 2016 at 04:22:21PM -0700, Eliot Miranda wrote: > > > >>>> > > > >>>> Turns out this isn't needed for Cog. I have ioLocalSecondsOffset > > which > > > >>>> answers a value determined at start-up and only changed > > > >>>> via ioUpdateVMTimezone, which itself is controlled by > > > >>>> primitiveUpdateTimezone, #243. So ioUTCMicroseconds is all that's > > needed > > > >>>> to get at the clock and timezone atomically. > > > >>> > > > >>> If it is updated at start-up, then it's wrong. Think of daylight > > savings > > > >>> time transitions. > > > >> > > > >> So update it automatically once a second or some such? > > > > > > > > Are you joking, or is that a serious question? > > > > > > Yes. I see two or three system calls in the code below. gettimeofday, > > one inside localtime and one inside gmtime. That's expensive. > > > > > > > It's gettimeofday() and localtime(). The #else is fallback for older unix > > platforms. > > > > As I said, two or three. > > In any case, caching the value and updating it periodically does not sound > > like a good idea to me. > > > > Why not? Why does the time zone need to be determined on every time call > even though it only has a resolution of seconds? If including the timezone > in every time call slows down accessing the time by, say, 33%, is it a good > idea, when the VM can easily eliminate this overhead? > > | c | > c := LargePositiveInteger. > [1 to: 10000000 do: [:i| c basicNew: 8. c basicNew: 8. c basicNew: 8. c > basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c basicNew: 8. c > basicNew: 8. c basicNew: 8]] timeToRun 884 > > > > [1 to: 10000000 do: [:i| Time utcMicrosecondClock. Time > utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. > Time utcMicrosecondClock. Time utcMicrosecondClock. Time > utcMicrosecondClock. Time utcMicrosecondClock. Time utcMicrosecondClock. > Time utcMicrosecondClock]] timeToRun 6412 > > > 6412 / 884.0 7.253393665158371 > > So the overhead of the system calls involved in accessing time are much > greater than the costs of allocating and garbage collecting 64-bit large > integer results; much larger. > I tested with the trunk ioUtcWithOffset(), interpreter VM, and calling the primitive with pre-allocated array to avoid garbage collection. I compared the primitive versus a hacked version with the offset value hard coded (equivalant to you suggestion of caching it). You're right, the "cached" version is almost 4 times faster. I still think that it is needless complexity. But yes it's faster. Dave From eliot.miranda at gmail.com Fri Mar 25 17:49:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 25 17:49:43 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: <430C3930-FB6C-4492-ABAD-A756C4C365F0@freudenbergs.de> References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> <430C3930-FB6C-4492-ABAD-A756C4C365F0@freudenbergs.de> Message-ID: On Fri, Mar 25, 2016 at 10:08 AM, Bert Freudenberg wrote: > On 25.03.2016, at 17:47, Eliot Miranda wrote: > > > On Fri, Mar 25, 2016 at 9:23 AM, Bert Freudenberg > wrote: > >> Well, it?s okay to cheat as long as you won?t get caught (says DI). >> >> Simply ?once a second? is not good enough if we check the time 0.5 >> seconds after DST switch. >> >> If ?once a second? was implemented as ?once every wall-clock second?, >> IMHO that would be fine. So the test would have to be something like >> >> (prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self >> updateOffsetFromUTC] >> >> Right? >> > > Excellent point. So the drift algorithm to provide an accurate clock can > be extended to check the time zone whenever the new time is at a different > second to the previous value. > > > Drifting makes this way more complicated I?d think ? unless there is an OS > function to convert the drifted UTC time into local? IF the VM time and > system time differ, you can?t just ask the OS for the ?now? local time. > I wrote up the algorithm I propose; see http://forum.world.st/Time-millisecondClockValue-was-The-Trunk-Morphic-mt-1080-mcz-tt4877661.html#a4877918 It's not that complicated and extending it is straight-forward, given that the algorithm already maintains the last time computed. When I've time I'll post a revision. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/b067aa3d/attachment.htm From maxleske at gmail.com Fri Mar 25 17:51:06 2016 From: maxleske at gmail.com (Max Leske) Date: Fri Mar 25 17:51:11 2016 Subject: [squeak-dev] Green builds on Github Message-ID: Hi, Just wanted to let you know that the Github builds are now all green (since now the DateAndTime issue in Squeak has been fixed), i.e. Pharo-alpha, Pharo 5.0, Pharo 4.0, Squeak-trunk, Squeak-4.6, Squeak-4.5 on both OS X and Linux. See for yourself here: https://github.com/theseion/Fuel. Note that the sources are still being hosted on Smalltalkhub. I?m triggering the builds through the TravisCI API when I run a build on the INRIA CI. I?d like to thank Tobias Pape and Fabio Niephaus for their help in setting this up and for creating the SmalltalkCI infrastructure for TravisCI. Cheers, Max From tim at rowledge.org Fri Mar 25 18:10:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Mar 25 18:10:10 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1458901538119-4886473.post@n4.nabble.com> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> Message-ID: <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> > On 25-03-2016, at 3:25 AM, marcel.taeumel wrote: > > I still don't get it. Why is this a Mac problem? Where is the Mac-specific > part in this problem? It?s not; except that a similar problem does exist at the Mac-Window level. It was me mistaking Eliot?s description. > > Please see the screeshot and notice the Z-Order of things. The corner grips > do not occlude the text morph and its scroll bar. > Except the behaviour doesn?t support what we think ought to be happening. And look at the screen grab from my iMac running a 5.0-15113 image - The text morph (along with its scrollers) is the last item rather than the first. Weird, eh? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Tight slacks -------------- next part -------------- Skipped content of type multipart/related From tim at rowledge.org Fri Mar 25 18:28:47 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Mar 25 18:28:51 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> Message-ID: <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> > On 25-03-2016, at 7:56 AM, Bert Freudenberg wrote: > > There are actually two problems that look very similar but are unrelated: > > (1) grips on top of the text morph > > In a 5.0 image, the text morph is behind the grips. Apparently this has been fixed in the mean time, in Trunk it looks fine. This is obviously independent of platform. > > (2) window ?grip? on Mac > > On a Mac, the VM provides a similar ?grip? for the full Squeak window, which makes it impossible to click in the lower left and right corners. > > So (1) appears to be fixed in trunk and (2) can not be fixed because it?s the same in all Mac apps. I?d say we?re good. I know this hardly ever happens, but Bert is right :-O tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Don't sweat petty things....or pet sweaty things. From bert at freudenbergs.de Fri Mar 25 20:30:45 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Mar 25 20:30:49 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> <430C3930-FB6C-4492-ABAD-A756C4C365F0@freudenbergs.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6204 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/54df099f/smime.bin From lists at fniephaus.com Fri Mar 25 22:01:36 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri Mar 25 22:01:49 2016 Subject: [squeak-dev] Green builds on Github In-Reply-To: References: Message-ID: That's great news! And thanks! Please feel free to get in touch if you run into any issues with Travis CI again. Best, Fabio -- On Fri, Mar 25, 2016 at 5:51 PM Max Leske wrote: > Hi, > > Just wanted to let you know that the Github builds are now all green > (since now the DateAndTime issue in Squeak has been fixed), i.e. > > Pharo-alpha, Pharo 5.0, Pharo 4.0, > Squeak-trunk, Squeak-4.6, Squeak-4.5 > > on both OS X and Linux. > > > See for yourself here: https://github.com/theseion/Fuel. > > Note that the sources are still being hosted on Smalltalkhub. I?m > triggering the builds through the TravisCI API when I run a build on the > INRIA CI. > > > I?d like to thank Tobias Pape and Fabio Niephaus for their help in setting > this up and for creating the SmalltalkCI infrastructure for TravisCI. > > Cheers, > Max > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/1286c8b2/attachment.htm From eliot.miranda at gmail.com Sat Mar 26 00:58:36 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 26 00:58:39 2016 Subject: [squeak-dev] modifying copied context vars In-Reply-To: References: <664D5B64-0BE1-48BF-ABBB-CFF48E0176B3@gmail.com> Message-ID: Hi Nicolai, On Fri, Mar 25, 2016 at 2:51 AM, Nicolai Hess wrote: > > > 2016-03-25 6:26 GMT+01:00 Eliot Miranda : > >> Hi Nicolai, >> >> > On Mar 24, 2016, at 1:53 AM, Nicolai Hess >> wrote: >> > >> > Hello, >> > >> > we have a failing test (OCClosureCompilerTest>>#testDebuggerTempAccess) >> > (fails since spur, but not related - I think). >> > >> > A simple example to reproduce the behavior: >> > | local1 remote1| >> > remote1:=4. >> > local1 :=3. >> > [:i | |c| >> > c := local1. >> > remote1 := i. >> > i halt. >> > "local1:=25. <-- evaluate during debugging" >> > ] value:1. >> > Transcript show:local1;cr. >> > Transcript show:remote1;cr. >> > (Executing this code and evaluating "local:=25" after the debugger >> halts for >> > "i halt" will modify the var "remote1" instead of "local1", as this is >> a vector tempvar , proceeding >> > the execution will crash at accessing the remote1 value). >> > >> > >> > The purpose of the testDebuggerTempAccess test case is, evaluating code >> > that changes the value of a copied temp var *does not* change the value >> of >> > this var in the outer context. (see comment in the test case: >> > "this is not 25 as the var is a local, non escaping variable that was >> copied into the block, >> > If the compiler would have known about the write, it would have >> made the var escaping". >> > ) >> > >> > But the implementation (OCCopyingTempVariable>>#writeFromContext: >> aContext scope: contextScope value: aValue) >> > explicitly iterates through all outer context(s) and changes the vars >> as well. >> > >> > 1. Question: Who is right? >> >> What do you mean? Because the closure model is as it is (for very good >> reason) the computer copies temporaries whose values cannot change during >> the execution of a block into that block if the block references the >> variable. If the debugger is to support updating such copied variables >> then it must create the illusion of "the variable being updated" because >> there isn't just one variable. >> > > I know that it only operates on a copy of this var (if the var is only > read (in the original code)), but you *can* evaluate code > during debugging, that can modify the var. > I don't know why or if we want to support that. I just see a failing test > case that tries to do exactly that. > And the supposed behavior is, that the outer context variable value does > not change. > But it would be much nicer if the debugger /did/ change all the copies of the variable it could find, right? What behaviour do we want to support? What behaviour can we afford to support? > But this test fails. > > I tried similar code in squeak, and there the outer context var does not > change: > > |local remote outerContext| > local :=1. > remote:=2. > outerContext := thisContext. > (1 to:1) do:[:i | > remote := i. > Transcript show:local;cr. > i halt. > "remote:=20" > "local:=10" > "outerContext tempAt:1 put:30" > Transcript show:local;cr. > ]. > Transcript show:local;cr. > Transcript show:remote;cr. > > > If the debugger halts at "i halt" and you evaluate the code > > "remote:=20" > the remote value changes for t he block context and for its outer context > - OK > "local:=10" > the local value changes for the block context but not for its outer > context - OK > "outerContext tempAt:1 put:30" > the local value only changes for the outer context - OK > > Is this right? > I don't think it's either right or wrong; I think it's what one would expect from a naive debugger and the current compilation semantics. I think you need to think about the problem at a tool level. The right question to ask is "what behaviour would you like in the debugger?" In a debugger there are typically two interfaces that allow modifying the variables in a context. One is via a doit in which the variables are in scope, and one is an inspector on the variables embedded in a debugger. It would be nice if the two were consistent. But it is easier to make them consistent if only local values are changed. The issue is really how powerful you want to map DebuggerMap (or whatever the Pharo equivalent). Here are some issues to think about. It's easy for a debugger map to work out what the right indices are for a varable that is copied in various scopes; it just asks the compiler for the relevant info. It is /not/ easy to find out all the potentially copied variables. For example, the following creates many block and many activations of those blocks, and a copy of "copied" is in all of them. | copied | copied := 7. ^(1 to: copied) collect: [:i| [Semaphore new wait. copied] fork. [Semaphore new wait. copied]] Just before the collect: terminates execution there are 9 contexts accessing copied; the context declaring it, the context for the block [:i| [Semaphore...copied]], and the 7 contexts waiting on a new semaphore. There are 15 blocks whose copiedValues includes copied, the block [:i| [Semaphore...copied]], the 7 copies of the first [Semaphore new wait. copied] block, which all have contexts whose closureOrNil points to them, and seven 7 copies of the second [Semaphore new wait. copied] block. So the only way to reliably change copy is to do allInstances on Context and BlockClosure and collect all whose home context is the context that declares copied and to change the 0th temp or the 0th copied value in each context or block. Is it worth it? Is it perhaps too expensive in some circumstances, and hence needs to be a preference? Is the preference too hard to understand or explain? An alternative might be to warn the debugger user, saying something like "warning, not all references to temporary variable foo can be updated." and update only in activations on the stack. Personally I would implement the all instances approach if I had the time. But I haven't had time for 8 years ;-) > But the reason why the test actually fails is different. It is because >> evaluating >> > the code that modifies the var "local1:=25" ends up to a call >> > aContext tempAt: self indexFromIR put: aValue >> > but the index (indexFromIR) can be different for every context (method >> context / inner block >> > context(s)). >> >> Right. >> >> > >> > 2. Question: should the index be always the same? >> >> How can it be? If, for example, a nullary block makes use of a copied >> variable and has no local temps then that variable will end up with index >> 0, no matter its indices in outer scopes. Surely you're not proposing >> padding the block with unused variables just so copied variables can have >> the same index? >> > > Yes, makes sense. > > >> >> > >> > thanks inadvance >> > >> > Nicolai >> > >> > >> > ps: since spur (resp. compiler changes that were done for new spur >> images), the index of tempvars can be different. >> > In pre-spur, this testcase modifies an outer context var, but one that >> isn't checked (the argument "two"), therefore >> > the test succeed. In spur, this testcase modifes a different outer >> context var "remote1", and the test >> > fails. >> >> >> Since Sour hasn't changed the compiler there looks to be a bug. Sour has >> changed the identityHash size a lot from IIRC 11 bits to 22. So hashed >> collections can end up with different enumerations. But that shouldn't >> affect the ordering assigned to temps in the compiler. I suggest tracking >> down why the code is different in Spur is a very important thing to do. >> > > Yes, we merged some code for spur support (opals compiler code) and lost > some intermediate changes that were made for opal. Debugging this bugs was > a mess. > Ouch. Debugging the debugger. Always frustrating. Does Opal put the indirection vectors in the same place in each declaring scope? Also what rule does Opal use for ordering copied values? Here's the rule for Squeak's compiler: ParseNode class>>*tempSortBlock* "Answer a block that can sort a set of temporaries into a stable order so that different compilations produce the same results." ^[:t1 :t2| | be1 be2 bs1 bs2 | t1 index < t2 index "simple sort by index." or: [t1 index = t2 index "complex tie break" and: [t1 isRemote ~= t2 isRemote ifTrue: [t2 isRemote] "put direct temps before indirect temps" ifFalse: [((be1 := t1 definingScope blockExtent) isNil or: [(be2 := t2 definingScope blockExtent) isNil]) ifTrue: [t1 name < t2 name] "only have the name left to go on" ifFalse: "put temps from outer scopes before those from inner scopes" [(bs1 := be1 first) < (bs2 := be2 first) or: [bs1 = bs2 and: [t1 name < t2 name]]]]]]] "only have the name left to go on" Hence in the following: | c1 r1 c2 r2 | c1 := #(copied 1). c2 := #(copied 2). r1 := #(remote 1). r2 := #(remote 2). [ | c3 r3 | c3 := #(copied 3). r3 := #(remote 3). [r1 := r1 copy. r2 := r2 copy. r3 := r3 copy. { c1. c2. c3. thisContext shallowCopy}] value] value Numbering the scopes 1, 2 & 3, then Scope 1: 0: c1 1: c2 2: indirection1, r1@1, r2@2 Copied values in block for scope 2: 1: c1 2: c2 3: indirection1 Scope 2: 1: c1 2: c2 3: indirection1 4: c3 5: indirection2 Copied values in block for scope 3: 1: c1 2: c2 3: indirection1 4: c3 5: indirection2 Scope 3: 1: c1 2: c2 3: indirection1 4: c3 5: indirection2 Intuitively I expected Scope 1: 0: c1 1: c2 2: indirection1, r1@1, r2@2 Copied values in block for scope 2: 1: c1 2: c2 3: indirection1 Scope 2: 1: c1 2: c2 3: indirection1 4: c3 5: indirection2 Copied values in block for scope 3: 1: c1 2: c2 3: c3 4: indirection1 5: indirection2 Scope 3: 1: c1 2: c2 3: c3 4: indirection1 5: indirection2 :-/ HTH >> >> Eliot >> > > thanks > > >> _,,,^..^,,,_ (phone) >> >> PS if you want to understand why copied variables are so important in the >> closure model you need to understand context-to-stack mapping and the >> overhead that not copying temps adds to returns in a context-to-stack >> mapping VM. It's not obvious but I hope my blog does an ok job of >> explaining something alas complex but extremely important for performance. >> > > I read your blog > Good. So then ask yourself what the right thing to do is, and what the affordable thing to do is. You understand the issue, now you have to make some decisions... _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/13b8784b/attachment.htm From eliot.miranda at gmail.com Sat Mar 26 02:03:52 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 26 02:03:56 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Levente, the first thing to report is that this isn't a Cog-specific bug. It also reproduces using the trunk VM sources (4.15.3) and a freshly built linux VM with a 4.6 image. On Thu, Mar 24, 2016 at 2:16 AM, Levente Uzonyi wrote: > Hi Eliot, > > The snippet below, evaluated from a workspace, triggered the issue in less > than a minute for me, three times in a row. > Both processes will halt if #sloppyWaitForDataIfClosed: doesn't return > within a second. If you send #dataAvailable to the socket, you'll find that > it has data ready to be read, but its readSemaphore has no signal. > > Levente > > > Socket compile: 'sloppyWaitForDataIfClosed: closedBlock > > [(socketHandle ~~ nil > and: [self primSocketReceiveDataAvailable: socketHandle]) ifTrue: > [^self]. > self isConnected ifFalse: > [^closedBlock value]. > self readSemaphore wait] repeat' > classified: 'waiting'. > > [ > listenerSocket := Socket newTCP. > listenerSocket listenOn: 0 backlogSize: 4 interface: #[127 0 0 1]. > clientSocket := Socket newTCP. > clientSocket connectTo: #[127 0 0 1] port: listenerSocket > localPort. > clientSocket waitForConnectionFor: 1. > self assert: clientSocket isConnected. > serverSocket := listenerSocket waitForAcceptFor: 1. > self assert: serverSocket isConnected ] > ensure: [ listenerSocket destroy ]. > > serverProcess := [ > | shouldRun buffer bytesReceived waitDuration | > shouldRun := true. > buffer := ByteString new: 10. > waitDuration := 1 second. > [ > [ serverSocket sloppyWaitForDataIfClosed: [ shouldRun := > false ] ] > valueWithin: waitDuration > onTimeout: [ self halt ]. > buffer atAllPut: (Character value: 0). > bytesReceived := serverSocket receiveDataInto: buffer. > self assert: bytesReceived = 4. > self assert: (buffer first: 4) = 'PING'. > serverSocket sendData: 'PONG' ] repeat ] newProcess. > clientProcess := [ > | shouldRun buffer bytesReceived waitDuration | > shouldRun := true. > buffer := ByteString new: 10. > waitDuration := 1 second. > [ > clientSocket sendData: 'PING'. > [ clientSocket sloppyWaitForDataIfClosed: [ shouldRun := > false ] ] > valueWithin: waitDuration > onTimeout: [ self halt ]. > buffer atAllPut: (Character value: 0). > bytesReceived := clientSocket receiveDataInto: buffer. > self assert: bytesReceived = 4. > self assert: (buffer first: 4) = 'PONG' ] repeat ] > newProcess. > clientProcess priority: 39; resume. > serverProcess priority: 39; resume. > > "Evaluate these after debugging: > clientSocket destroy. > serverSocket destroy." > > > > On Wed, 23 Mar 2016, Eliot Miranda wrote: > > Hi Levente, >> On Wed, Mar 23, 2016 at 11:31 AM, Levente Uzonyi >> wrote: >> Hi Eliot, >> >> What sort of reproducibility are you looking for? Is it enough if >> it happens once every few hours or do you need something that you can >> trigger on demand? >> >> >> I'll take every few hours, but I'd prefer "in under 30 minutes". Getting >> warm and fuzzy feelings when trying to prove a negative with something that >> takes hours to run is very difficult. Let's say you have >> a case which reproduces in 8 hours 50% of the time. To reach 99% >> confidence level in a fix I'd have to run it for 8 * (50 log: 2) hours >> without seeing it reproduce, right? That's nearly 2 days; it could >> take weeks to fix :-( >> >> Levente >> >> >> >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160325/b75dca9e/attachment.htm From commits at source.squeak.org Sat Mar 26 03:57:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 03:57:55 2016 Subject: [squeak-dev] The Trunk: Network-ul.174.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-ul.174.mcz ==================== Summary ==================== Name: Network-ul.174 Author: ul Time: 26 March 2016, 4:46:36.918112 am UUID: e49a70ec-9eac-48e7-a03e-d712e2fcd12d Ancestors: Network-eem.173 Socket changes - use the instance variables for the semaphores, since it's clear now which semaphore is responsible for reading and writing (it might as well been done that way originally by assigning the same value to all three variables) - removed the max: 0 checks when the wait time is passed to the semaphores via #waitTimeoutMSecs:, because that method will do the same check =============== Diff against Network-eem.173 =============== Item was changed: ----- Method: Socket>>waitForDataFor:ifClosed:ifTimedOut: (in category 'waiting') ----- waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock "Wait for the given nr of seconds for data to arrive." | startTime msecsDelta | startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. [(Time millisecondsSince: startTime) < msecsDelta] whileTrue: [ (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [^self]. self isConnected ifFalse: [^closedBlock value]. "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." + readSemaphore waitTimeoutMSecs: + (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout). - self readSemaphore waitTimeoutMSecs: - ((msecsDelta - (Time millisecondsSince: startTime) max: 0) min: self class maximumReadSemaphoreWaitTimeout). ]. (self primSocketReceiveDataAvailable: socketHandle) ifFalse: [ self isConnected ifTrue: [^timedOutBlock value] ifFalse: [^closedBlock value]].! Item was changed: ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') ----- waitForDataIfClosed: closedBlock "Wait indefinitely for data to arrive. This method will block until data is available or the socket is closed." [(socketHandle ~~ nil and: [self primSocketReceiveDataAvailable: socketHandle]) ifTrue: [^self]. self isConnected ifFalse: [^closedBlock value]. "ul 8/13/2014 21:16 Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Replace the ""waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout"" part with ""wait"" when the bug is fixed." + readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout] repeat! - self readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout] repeat! Item was changed: ----- Method: Socket>>waitForDisconnectionFor: (in category 'waiting') ----- waitForDisconnectionFor: timeout "Wait for the given nr of seconds for the connection to be broken. Return true if it is broken by the deadline, false if not. The client should know the connection is really going to be closed (e.g., because he has called 'close' to send a close request to the other end) before calling this method." | startTime msecsDelta status | startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. status := self primSocketConnectionStatus: socketHandle. [((status == Connected) or: [(status == ThisEndClosed)]) and: [(Time millisecondsSince: startTime) < msecsDelta]] whileTrue: [ self discardReceivedData. "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." + readSemaphore waitTimeoutMSecs: + (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout). - self readSemaphore waitTimeoutMSecs: - ((msecsDelta - (Time millisecondsSince: startTime) max: 0) min: self class maximumReadSemaphoreWaitTimeout). status := self primSocketConnectionStatus: socketHandle]. ^ status ~= Connected! Item was changed: ----- Method: Socket>>waitForSendDoneFor: (in category 'waiting') ----- waitForSendDoneFor: timeout "Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not." | startTime msecsDelta msecsEllapsed sendDone | startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. [(sendDone := self primSocketSendDone: socketHandle) not and: [ self isConnected "Connection end and final data can happen fast, so test in this order" and: [(msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta]]] whileTrue: [ + writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed]. - self writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed]. ^ sendDone! From Marcel.Taeumel at hpi.de Sat Mar 26 06:54:35 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Mar 26 07:24:28 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> Message-ID: <1458975275220-4886663.post@n4.nabble.com> Hi Tim, in your 5.0 image, just hit the "update" button. :-) Name: squeak50/Morphic-mt.996 Author: mt Time: 15 January 2016, 1:38:12.241 pm UUID: 5f2a2387-02db-8d42-bbc8-cf70c34c27be Ancestors: Morphic-cmm.995 Ports a fix from trunk regarding Z hierarchy of corner grips in system windows. For example, you can now again select the first characters in the annotation pane in system browsers. Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886663.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolaihess at gmail.com Sat Mar 26 12:02:05 2016 From: nicolaihess at gmail.com (Nicolai Hess) Date: Sat Mar 26 12:02:12 2016 Subject: [squeak-dev] modifying copied context vars In-Reply-To: References: <664D5B64-0BE1-48BF-ABBB-CFF48E0176B3@gmail.com> Message-ID: 2016-03-26 1:58 GMT+01:00 Eliot Miranda : > Hi Nicolai, > > On Fri, Mar 25, 2016 at 2:51 AM, Nicolai Hess > wrote: > >> >> >> 2016-03-25 6:26 GMT+01:00 Eliot Miranda : >> >>> Hi Nicolai, >>> >>> > On Mar 24, 2016, at 1:53 AM, Nicolai Hess >>> wrote: >>> > >>> > Hello, >>> > >>> > we have a failing test (OCClosureCompilerTest>>#testDebuggerTempAccess) >>> > (fails since spur, but not related - I think). >>> > >>> > A simple example to reproduce the behavior: >>> > | local1 remote1| >>> > remote1:=4. >>> > local1 :=3. >>> > [:i | |c| >>> > c := local1. >>> > remote1 := i. >>> > i halt. >>> > "local1:=25. <-- evaluate during debugging" >>> > ] value:1. >>> > Transcript show:local1;cr. >>> > Transcript show:remote1;cr. >>> > (Executing this code and evaluating "local:=25" after the debugger >>> halts for >>> > "i halt" will modify the var "remote1" instead of "local1", as this is >>> a vector tempvar , proceeding >>> > the execution will crash at accessing the remote1 value). >>> > >>> > >>> > The purpose of the testDebuggerTempAccess test case is, evaluating code >>> > that changes the value of a copied temp var *does not* change the >>> value of >>> > this var in the outer context. (see comment in the test case: >>> > "this is not 25 as the var is a local, non escaping variable that was >>> copied into the block, >>> > If the compiler would have known about the write, it would have >>> made the var escaping". >>> > ) >>> > >>> > But the implementation (OCCopyingTempVariable>>#writeFromContext: >>> aContext scope: contextScope value: aValue) >>> > explicitly iterates through all outer context(s) and changes the vars >>> as well. >>> > >>> > 1. Question: Who is right? >>> >>> What do you mean? Because the closure model is as it is (for very good >>> reason) the computer copies temporaries whose values cannot change during >>> the execution of a block into that block if the block references the >>> variable. If the debugger is to support updating such copied variables >>> then it must create the illusion of "the variable being updated" because >>> there isn't just one variable. >>> >> >> I know that it only operates on a copy of this var (if the var is only >> read (in the original code)), but you *can* evaluate code >> during debugging, that can modify the var. >> I don't know why or if we want to support that. I just see a failing test >> case that tries to do exactly that. >> And the supposed behavior is, that the outer context variable value does >> not change. >> > > But it would be much nicer if the debugger /did/ change all the copies of > the variable it could find, right? What behaviour do we want to support? > What behaviour can we afford to support? > I think I would prefer if the debugger only changes the local copy. For me, it is like changing a local variable that shadows a variable from outer scope. Of course, you can not easily see that this variable is a copy resp. shadows the one / the others from outer scope. My main concern is that some tests fail, and you may crash pharo by changing the var from within debugger. > > > >> But this test fails. >> >> I tried similar code in squeak, and there the outer context var does not >> change: >> >> |local remote outerContext| >> local :=1. >> remote:=2. >> outerContext := thisContext. >> (1 to:1) do:[:i | >> remote := i. >> Transcript show:local;cr. >> i halt. >> "remote:=20" >> "local:=10" >> "outerContext tempAt:1 put:30" >> Transcript show:local;cr. >> ]. >> Transcript show:local;cr. >> Transcript show:remote;cr. >> >> >> If the debugger halts at "i halt" and you evaluate the code >> >> "remote:=20" >> the remote value changes for t he block context and for its outer context >> - OK >> "local:=10" >> the local value changes for the block context but not for its outer >> context - OK >> "outerContext tempAt:1 put:30" >> the local value only changes for the outer context - OK >> >> Is this right? >> > > I don't think it's either right or wrong; I think it's what one would > expect from a naive debugger and the current compilation semantics. I > think you need to think about the problem at a tool level. > > The right question to ask is "what behaviour would you like in the > debugger?" In a debugger there are typically two interfaces that allow > modifying the variables in a context. One is via a doit in which the > variables are in scope, and one is an inspector on the variables embedded > in a debugger. It would be nice if the two were consistent. But it is > easier to make them consistent if only local values are changed. The issue > is really how powerful you want to map DebuggerMap (or whatever the Pharo > equivalent). > > Here are some issues to think about. It's easy for a debugger map to work > out what the right indices are for a varable that is copied in various > scopes; it just asks the compiler for the relevant info. It is /not/ easy > to find out all the potentially copied variables. For example, the > following creates many block and many activations of those blocks, and a > copy of "copied" is in all of them. > > | copied | > copied := 7. > ^(1 to: copied) collect: > [:i| [Semaphore new wait. copied] fork. [Semaphore new wait. copied]] > > Just before the collect: terminates execution there are 9 contexts > accessing copied; the context declaring it, the context for the block [:i| > [Semaphore...copied]], and the 7 contexts waiting on a new semaphore. > There are 15 blocks whose copiedValues includes copied, the block [:i| > [Semaphore...copied]], the 7 copies of the first [Semaphore new wait. > copied] block, which all have contexts whose closureOrNil points to them, > and seven 7 copies of the second [Semaphore new wait. copied] block. So > the only way to reliably change copy is to do allInstances on Context and > BlockClosure and collect all whose home context is the context that > declares copied and to change the 0th temp or the 0th copied value in each > context or block. Is it worth it? Is it perhaps too expensive in some > circumstances, and hence needs to be a preference? Is the preference too > hard to understand or explain? > > An alternative might be to warn the debugger user, saying something like > "warning, not all references to temporary variable foo can be updated." and > update only in activations on the stack. > > Personally I would implement the all instances approach if I had the > time. But I haven't had time for 8 years ;-) > Now I really prefer to only change the local value :-) > > > > But the reason why the test actually fails is different. It is because >>> evaluating >>> > the code that modifies the var "local1:=25" ends up to a call >>> > aContext tempAt: self indexFromIR put: aValue >>> > but the index (indexFromIR) can be different for every context (method >>> context / inner block >>> > context(s)). >>> >>> Right. >>> >>> > >>> > 2. Question: should the index be always the same? >>> >>> How can it be? If, for example, a nullary block makes use of a copied >>> variable and has no local temps then that variable will end up with index >>> 0, no matter its indices in outer scopes. Surely you're not proposing >>> padding the block with unused variables just so copied variables can have >>> the same index? >>> >> >> Yes, makes sense. >> >> >>> >>> > >>> > thanks inadvance >>> > >>> > Nicolai >>> > >>> > >>> > ps: since spur (resp. compiler changes that were done for new spur >>> images), the index of tempvars can be different. >>> > In pre-spur, this testcase modifies an outer context var, but one that >>> isn't checked (the argument "two"), therefore >>> > the test succeed. In spur, this testcase modifes a different outer >>> context var "remote1", and the test >>> > fails. >>> >>> >>> Since Sour hasn't changed the compiler there looks to be a bug. Sour >>> has changed the identityHash size a lot from IIRC 11 bits to 22. So hashed >>> collections can end up with different enumerations. But that shouldn't >>> affect the ordering assigned to temps in the compiler. I suggest tracking >>> down why the code is different in Spur is a very important thing to do. >>> >> >> Yes, we merged some code for spur support (opals compiler code) and lost >> some intermediate changes that were made for opal. Debugging this bugs was >> a mess. >> > > Ouch. Debugging the debugger. Always frustrating. Does Opal put the > indirection vectors in the same place in each declaring scope? Also what > rule does Opal use for ordering copied values? Here's the rule for > Squeak's compiler: > It is not about debugging the debugger, but finding the change that was responsible for this changed index, and to find out if it was changed on purpose > > ParseNode class>>*tempSortBlock* > "Answer a block that can sort a set of temporaries into a stable > order so that different compilations produce the same results." > ^[:t1 :t2| | be1 be2 bs1 bs2 | > t1 index < t2 index "simple sort by index." > or: [t1 index = t2 index "complex tie break" > and: [t1 isRemote ~= t2 isRemote > ifTrue: [t2 isRemote] "put direct temps before indirect temps" > ifFalse: > [((be1 := t1 definingScope blockExtent) isNil > or: [(be2 := t2 definingScope blockExtent) isNil]) > ifTrue: [t1 name < t2 name] "only have the name left to go on" > ifFalse: "put temps from outer scopes before those from inner scopes" > [(bs1 := be1 first) < (bs2 := be2 first) > or: [bs1 = bs2 and: [t1 name < t2 name]]]]]]] "only have the name left to > go on" > > Hence in the following: > > | c1 r1 c2 r2 | > c1 := #(copied 1). c2 := #(copied 2). > r1 := #(remote 1). r2 := #(remote 2). > [ | c3 r3 | > c3 := #(copied 3). > r3 := #(remote 3). > [r1 := r1 copy. r2 := r2 copy. r3 := r3 copy. > { c1. c2. c3. thisContext shallowCopy}] value] value > > Numbering the scopes 1, 2 & 3, then > > Scope 1: > 0: c1 > 1: c2 > 2: indirection1, r1@1, r2@2 > > Copied values in block for scope 2: > 1: c1 > 2: c2 > 3: indirection1 > > Scope 2: > 1: c1 > 2: c2 > 3: indirection1 > 4: c3 > 5: indirection2 > > Copied values in block for scope 3: > 1: c1 > 2: c2 > 3: indirection1 > 4: c3 > 5: indirection2 > > Scope 3: > 1: c1 > 2: c2 > 3: indirection1 > 4: c3 > 5: indirection2 > > > Intuitively I expected > > Scope 1: > 0: c1 > 1: c2 > 2: indirection1, r1@1, r2@2 > > Copied values in block for scope 2: > 1: c1 > 2: c2 > 3: indirection1 > > Scope 2: > 1: c1 > 2: c2 > 3: indirection1 > 4: c3 > 5: indirection2 > > Copied values in block for scope 3: > 1: c1 > 2: c2 > 3: c3 > 4: indirection1 > 5: indirection2 > > Scope 3: > 1: c1 > 2: c2 > 3: c3 > 4: indirection1 > 5: indirection2 > > > :-/ > I need more time to step through this. > > > HTH >>> >>> Eliot >>> >> >> thanks >> >> >>> _,,,^..^,,,_ (phone) >>> >>> PS if you want to understand why copied variables are so important in >>> the closure model you need to understand context-to-stack mapping and the >>> overhead that not copying temps adds to returns in a context-to-stack >>> mapping VM. It's not obvious but I hope my blog does an ok job of >>> explaining something alas complex but extremely important for performance. >>> >> >> I read your blog >> > > Good. So then ask yourself what the right thing to do is, and what the > affordable thing to do is. You understand the issue, now you have to make > some decisions... > I do not yet see use cases in which one or the other would be better or right. Therefore I would go for the solution that is easier to implement resp. fix. > > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160326/1caeaa39/attachment-0001.htm From bert at freudenbergs.de Sat Mar 26 13:45:17 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 26 13:45:21 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> Message-ID: <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160326/cbc80a43/smime.bin From bert at freudenbergs.de Sat Mar 26 14:01:23 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Mar 26 14:01:27 2016 Subject: [squeak-dev] Green builds on Github In-Reply-To: References: Message-ID: <2EBF9787-D16F-44BF-91AC-7D2E616439DB@freudenbergs.de> On 25.03.2016, at 18:51, Max Leske wrote: > > Hi, > > Just wanted to let you know that the Github builds are now all green (since now the DateAndTime issue in Squeak has been fixed), i.e. > > Pharo-alpha, Pharo 5.0, Pharo 4.0, > Squeak-trunk, Squeak-4.6, Squeak-4.5 > > on both OS X and Linux. > > > See for yourself here: https://github.com/theseion/Fuel. Awesome! I noticed the build steps for Squeak look more complicated than the ones for Pharo: https://github.com/theseion/Fuel/blob/master/scripts/jenkins.sh Why is that? Is there something we can do to make it simpler? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160326/629a54c0/smime.bin From eliot.miranda at gmail.com Sat Mar 26 14:48:26 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 26 14:48:33 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1458975275220-4886663.post@n4.nabble.com> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> <1458975275220-4886663.post@n4.nabble.com> Message-ID: <5932C003-DED8-4A46-8ACC-B1443A3AA7E1@gmail.com> > On Mar 25, 2016, at 11:54 PM, marcel.taeumel wrote: > > Hi Tim, > > in your 5.0 image, just hit the "update" button. :-) and reopen the transcript, workspace, etc. The update applies to newly opened Windows. It doesn't edit existing windows (which seems perfectly reasonable to me). > > Name: squeak50/Morphic-mt.996 > Author: mt > Time: 15 January 2016, 1:38:12.241 pm > UUID: 5f2a2387-02db-8d42-bbc8-cf70c34c27be > Ancestors: Morphic-cmm.995 > > Ports a fix from trunk regarding Z hierarchy of corner grips in system > windows. For example, you can now again select the first characters in the > annotation pane in system browsers. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886663.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From karlramberg at gmail.com Sat Mar 26 15:16:45 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sat Mar 26 15:16:49 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <5932C003-DED8-4A46-8ACC-B1443A3AA7E1@gmail.com> References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> <1458975275220-4886663.post@n4.nabble.com> <5932C003-DED8-4A46-8ACC-B1443A3AA7E1@gmail.com> Message-ID: In a existing window you can always inspect the BottomRightGripMorph and send it a 'self goBehind'. Best, Karl On Sat, Mar 26, 2016 at 3:48 PM, Eliot Miranda wrote: > > > > On Mar 25, 2016, at 11:54 PM, marcel.taeumel > wrote: > > > > Hi Tim, > > > > in your 5.0 image, just hit the "update" button. :-) > > and reopen the transcript, workspace, etc. The update applies to newly > opened Windows. It doesn't edit existing windows (which seems perfectly > reasonable to me). > > > > > Name: squeak50/Morphic-mt.996 > > Author: mt > > Time: 15 January 2016, 1:38:12.241 pm > > UUID: 5f2a2387-02db-8d42-bbc8-cf70c34c27be > > Ancestors: Morphic-cmm.995 > > > > Ports a fix from trunk regarding Z hierarchy of corner grips in system > > windows. For example, you can now again select the first characters in > the > > annotation pane in system browsers. > > > > Best, > > Marcel > > > > > > > > -- > > View this message in context: > http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886663.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/20160326/ebed4b9f/attachment.htm From eliot.miranda at gmail.com Sat Mar 26 15:25:31 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 26 15:25:37 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <1458801154614-4886226.post@n4.nabble.com> <3FD1E23D-7BFB-4DBE-A1B7-64D55F3B72DA@rowledge.org> <3F2F29D6-681D-4477-8772-FC1A56017F7A@freudenbergs.de> <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> <1458975275220-4886663.post@n4.nabble.com> <5932C003-DED8-4A46-8ACC-B1443A3AA7E1@gmail.com> Message-ID: > On Mar 26, 2016, at 8:16 AM, karl ramberg wrote: > > In a existing window you can always inspect the BottomRightGripMorph and send it a 'self goBehind'. So how about a post load that iterates over all system Windows and does this? > > Best, > Karl > >> On Sat, Mar 26, 2016 at 3:48 PM, Eliot Miranda wrote: >> >> >> > On Mar 25, 2016, at 11:54 PM, marcel.taeumel wrote: >> > >> > Hi Tim, >> > >> > in your 5.0 image, just hit the "update" button. :-) >> >> and reopen the transcript, workspace, etc. The update applies to newly opened Windows. It doesn't edit existing windows (which seems perfectly reasonable to me). >> >> > >> > Name: squeak50/Morphic-mt.996 >> > Author: mt >> > Time: 15 January 2016, 1:38:12.241 pm >> > UUID: 5f2a2387-02db-8d42-bbc8-cf70c34c27be >> > Ancestors: Morphic-cmm.995 >> > >> > Ports a fix from trunk regarding Z hierarchy of corner grips in system >> > windows. For example, you can now again select the first characters in the >> > annotation pane in system browsers. >> > >> > Best, >> > Marcel >> > >> > >> > >> > -- >> > View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886663.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/20160326/e9811b8c/attachment.htm From Marcel.Taeumel at hpi.de Sat Mar 26 17:21:12 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Mar 26 17:51:09 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: References: <4CD7BD0D-AC0A-4531-B204-267671511F57@rowledge.org> <1458901538119-4886473.post@n4.nabble.com> <612C259A-D33B-471A-9B28-3C4367C4E98C@rowledge.org> <1458975275220-4886663.post@n4.nabble.com> <5932C003-DED8-4A46-8ACC-B1443A3AA7E1@gmail.com> Message-ID: <1459012872162-4886772.post@n4.nabble.com> SystemWindow allSubInstancesDo: [:ea | ea paneMorphs do: #comeToFront. ea labelArea comeToFront]. Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4886772.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Sat Mar 26 18:06:41 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 26 18:06:50 2016 Subject: [squeak-dev] Green builds on Github In-Reply-To: <2EBF9787-D16F-44BF-91AC-7D2E616439DB@freudenbergs.de> References: <2EBF9787-D16F-44BF-91AC-7D2E616439DB@freudenbergs.de> Message-ID: <7904CF7E-2814-4FEF-B8D0-58BB1169EE1C@gmx.de> Hi, On 26.03.2016, at 15:01, Bert Freudenberg wrote: > On 25.03.2016, at 18:51, Max Leske wrote: >> >> Hi, >> >> Just wanted to let you know that the Github builds are now all green (since now the DateAndTime issue in Squeak has been fixed), i.e. >> >> Pharo-alpha, Pharo 5.0, Pharo 4.0, >> Squeak-trunk, Squeak-4.6, Squeak-4.5 >> >> on both OS X and Linux. >> >> >> See for yourself here: https://github.com/theseion/Fuel. > > Awesome! I noticed the build steps for Squeak look more complicated than the ones for Pharo: > > https://github.com/theseion/Fuel/blob/master/scripts/jenkins.sh > > Why is that? Is there something we can do to make it simpler? This file is probably outdated. Travis builds via https://github.com/theseion/Fuel/blob/master/.travis.yml and https://github.com/theseion/Fuel/blob/master/.smalltalk.ston (That is, actually metacello is used and not the steps from the jenkins.sh) Best regards -Tobias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1656 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160326/fe4851de/signature.pgp From commits at source.squeak.org Sat Mar 26 19:33:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 19:33:03 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.46.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.46.mcz ==================== Summary ==================== Name: Regex-Core-ul.46 Author: ul Time: 26 March 2016, 7:18:24.505619 pm UUID: d7cbc4e5-32ee-4ea3-9228-ff39b3c76af7 Ancestors: Regex-Core-ul.45 Few more RxMatchOptimizer tweaks: - prefixes, nonPrefixes, predicates, nonPredicates can never be empty - #predicateTester creates better blocks - removed the never sent #addNonPrefix: method RxMatcher >> #atEndOfLine considers line feed as end of line as well. =============== Diff against Regex-Core-ul.45 =============== Item was removed: - ----- Method: RxMatchOptimizer>>addNonPrefix: (in category 'private') ----- - addNonPrefix: aCharacter - - ^(nonPrefixes ifNil: [ nonPrefixes := CharacterSet new ]) add: aCharacter! Item was changed: ----- Method: RxMatchOptimizer>>addNonPrefixes: (in category 'private') ----- addNonPrefixes: aSet + aSet size = 0 ifTrue: [ ^aSet ]. ^nonPrefixes ifNil: [ nonPrefixes := aSet ] ifNotNil: [ nonPrefixes addAll: aSet ]! Item was changed: ----- Method: RxMatchOptimizer>>addPrefixes: (in category 'private') ----- addPrefixes: aSet + aSet size = 0 ifTrue: [ ^aSet ]. ^prefixes ifNil: [ prefixes := aSet ] ifNotNil: [ prefixes addAll: aSet ]! Item was changed: ----- Method: RxMatchOptimizer>>nonPredicateTester (in category 'private') ----- nonPredicateTester + | p | - | p size | nonPredicates ifNil: [ ^nil ]. + nonPredicates size = 1 ifTrue: [ - (size := nonPredicates size) = 0 ifTrue: [ ^nil ]. - size = 1 ifTrue: [ | predicate | predicate := nonPredicates anyOne. + ^[ :char :matcher | (predicate value: char) not ] ]. - ^[ :char :matcher | (predicate value: char) not] ]. p := nonPredicates asArray. + ^[ :char :matcher | (p allSatisfy: [ :some | some value: char ]) not ]! - ^[ :char :m | (p allSatisfy: [:some | some value: char ]) not ]! Item was changed: ----- Method: RxMatchOptimizer>>nonPrefixTester (in category 'private') ----- nonPrefixTester - | size | nonPrefixes ifNil: [ ^nil ]. + nonPrefixes size = 1 ifTrue: [ - (size := nonPrefixes size) = 0 ifTrue: [ ^nil ]. - size = 1 ifTrue: [ | nonPrefixChar | nonPrefixChar := nonPrefixes anyOne. ^[ :char :matcher | char ~~ nonPrefixChar ] ]. ^[ :char : matcher | (nonPrefixes includes: char) not ]! Item was changed: ----- Method: RxMatchOptimizer>>predicateTester (in category 'private') ----- predicateTester + | p | - | p size | predicates ifNil: [ ^nil ]. + predicates size = 1 ifTrue: [ - (size := predicates size) = 0 ifTrue: [ ^nil ]. - size = 1 ifTrue: [ | pred | pred := predicates anyOne. ^[ :char :matcher | pred value: char ] ]. p := predicates asArray. ^[ :char :matcher | p anySatisfy: [:some | some value: char ] ]! Item was changed: ----- Method: RxMatchOptimizer>>prefixTester (in category 'private') ----- prefixTester + | p | - | p size | prefixes ifNil: [ ^nil ]. + prefixes size = 1 ifTrue: [ - (size := prefixes size) = 0 ifTrue: [ ^nil ]. - size = 1 ifTrue: [ | prefixChar | prefixChar := prefixes anyOne. + ignoreCase ifTrue: [ + | lowercasePrefixChar | + lowercasePrefixChar := prefixChar asLowercase. + prefixChar := prefixChar asUppercase. + prefixChar == lowercasePrefixChar ifFalse: [ + ^[ :char :matcher | char == prefixChar or: [ char == lowercasePrefixChar ] ] ] ]. - ignoreCase ifTrue: [ ^[ :char :matcher | char sameAs: prefixChar ] ]. ^[ :char :matcher | char == prefixChar ] ]. + ignoreCase ifTrue: [ + prefixes copy do: [ :each | + | character | + (character := each asUppercase) == each ifFalse: [ + prefixes add: character ]. + (character := each asUppercase) == each ifFalse: [ + prefixes add: character ] ] ]. + prefixes size < 10 ifTrue: [ "10 is an empirical value" + p := prefixes asArray. + ^[ :char :matcher | p instVarsInclude: char ] ]. + ^[ :char :matcher | prefixes includes: char ]! - ignoreCase ifFalse: [ ^[ :char :matcher | prefixes includes: char ] ]. - p := prefixes collect: [ :each | each asUppercase ]. - ^[ :char :matcher | p includes: char asUppercase ]! Item was changed: ----- Method: RxMatcher>>atEndOfLine (in category 'testing') ----- atEndOfLine + | peek | + (peek := stream peek ifNil: [ ^true ]) == Cr ifTrue: [ ^true ]. + ^peek == Lf! - ^self atEnd or: [stream peek = Cr]! From leves at caesar.elte.hu Sat Mar 26 19:33:41 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sat Mar 26 19:33:47 2016 Subject: [squeak-dev] Re: [Vm-dev] I would be extremely grateful for a reproducible case for the following Socket issue In-Reply-To: References: Message-ID: Hi Eliot, AFAIK the workaround came from the Qwaq project, and it had been there long before it was added to the Trunk. Levente From commits at source.squeak.org Sat Mar 26 19:41:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 19:41:15 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.47.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.47.mcz ==================== Summary ==================== Name: Regex-Core-ul.47 Author: ul Time: 26 March 2016, 8:40:59.776673 pm UUID: 37a57fa6-b710-420a-a5fa-c4ce991ec118 Ancestors: Regex-Core-ul.46 - fix a slip in RxMatchOptimizer >> #prefixTester =============== Diff against Regex-Core-ul.46 =============== Item was changed: ----- Method: RxMatchOptimizer>>prefixTester (in category 'private') ----- prefixTester | p | prefixes ifNil: [ ^nil ]. prefixes size = 1 ifTrue: [ | prefixChar | prefixChar := prefixes anyOne. ignoreCase ifTrue: [ | lowercasePrefixChar | lowercasePrefixChar := prefixChar asLowercase. prefixChar := prefixChar asUppercase. prefixChar == lowercasePrefixChar ifFalse: [ ^[ :char :matcher | char == prefixChar or: [ char == lowercasePrefixChar ] ] ] ]. ^[ :char :matcher | char == prefixChar ] ]. ignoreCase ifTrue: [ prefixes copy do: [ :each | | character | + (character := each asUppercase) == each + ifFalse: [ prefixes add: character ] + ifTrue: [ + (character := each asLowercase) == each ifFalse: [ + prefixes add: character ] ] ] ]. - (character := each asUppercase) == each ifFalse: [ - prefixes add: character ]. - (character := each asUppercase) == each ifFalse: [ - prefixes add: character ] ] ]. prefixes size < 10 ifTrue: [ "10 is an empirical value" p := prefixes asArray. ^[ :char :matcher | p instVarsInclude: char ] ]. ^[ :char :matcher | prefixes includes: char ]! From commits at source.squeak.org Sat Mar 26 22:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 22:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160326225502.24535.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-March/009502.html Name: Network-ul.174 Ancestors: Network-eem.173 Socket changes - use the instance variables for the semaphores, since it's clear now which semaphore is responsible for reading and writing (it might as well been done that way originally by assigning the same value to all three variables) - removed the max: 0 checks when the wait time is passed to the semaphores via #waitTimeoutMSecs:, because that method will do the same check ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009503.html Name: Regex-Core-ul.46 Ancestors: Regex-Core-ul.45 Few more RxMatchOptimizer tweaks: - prefixes, nonPrefixes, predicates, nonPredicates can never be empty - #predicateTester creates better blocks - removed the never sent #addNonPrefix: method RxMatcher >> #atEndOfLine considers line feed as end of line as well. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009504.html Name: Regex-Core-ul.47 Ancestors: Regex-Core-ul.46 - fix a slip in RxMatchOptimizer >> #prefixTester ============================================= From commits at source.squeak.org Sat Mar 26 23:39:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 23:39:13 2016 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-ul.4.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-ul.4.mcz ==================== Summary ==================== Name: Regex-Tests-Core-ul.4 Author: ul Time: 27 March 2016, 12:38:52.983055 am UUID: a859f723-20b0-49e2-8644-eb66837f4ceb Ancestors: Regex-Tests-Core-ul.3 Added RxParserTest >> #testPredicates to cover the case sensitive/case insensitive predicates a bit better. =============== Diff against Regex-Tests-Core-ul.3 =============== Item was added: + ----- Method: RxParserTest>>testPredicates (in category 'tests') ----- + testPredicates + + #( + "input" "regex" "expected case sensitive result" "expected case insensitive result" + 'abc' '[a]bc' true true + 'abc' '[A]bc' false true + 'abc' '[ab]bc' true true + 'abc' '[Ab]bc' false true + 'Abc' '[a]bc' false true + 'Abc' '[A]bc' true true + 'Abc' '[ab]bc' false true + 'Abc' '[Ab]bc' true true + 'abc' '[b]bc' false false + 'abc' '[bB]bc' false false + 'abc' '[bc]bc' false false + 'abc' '[bcBC]bc' false false + ) groupsDo: [ :input :regexString :expectedCaseSensitiveResult :expectedCaseInsensitiveResult | + self + assert: expectedCaseSensitiveResult + equals: (input matchesRegex: regexString) + description: ('{1} matchesRegex: {2} should be {3}' format: { input. regexString. expectedCaseSensitiveResult }). + self + assert: expectedCaseInsensitiveResult + equals: (input matchesRegexIgnoringCase: regexString) + description: ('{1} matchesRegexIgnoringCase: {2} should be {3}' format: { input. regexString. expectedCaseInsensitiveResult }) ]! From commits at source.squeak.org Sat Mar 26 23:39:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 26 23:39:26 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.48.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.48.mcz ==================== Summary ==================== Name: Regex-Core-ul.48 Author: ul Time: 27 March 2016, 12:29:39.025303 am UUID: 911704bb-a07f-4ac8-bed3-de8f349ac9e5 Ancestors: Regex-Core-ul.47 - use double dispatch in #matchAgainst: of the subclasses of RxmLink. This allowed us to get rid of #currentState, #markerPositionAt:add: and #restoreState: from RxMatcher - do not add both lowercase and uppercase characters to the set in RxsCharSet >> #enumerableSetIgnoringCase:, because that stops a few possible optimizations to work. The missing characters are added in #enumerablePartPredicateIgnoringCase: and RxMatchOptimizer's corresponding method. This change also let us have simpler #enumerateTo: methods =============== Diff against Regex-Core-ul.47 =============== Item was removed: - ----- Method: RxMatcher>>currentState (in category 'privileged') ----- - currentState - "Answer an opaque object that can later be used to restore the matcher's state (for backtracking)." - - ^stream position! Item was removed: - ----- Method: RxMatcher>>markerPositionAt:add: (in category 'privileged') ----- - markerPositionAt: index add: position - "Remember position of another instance of the given marker." - - index <= 2 ifTrue: [ - markerPositions at: index put: position. - ^self ]. - (markerPositions at: index) addLast: position! Item was added: + ----- Method: RxMatcher>>matchAgainstLookahead:nextLink: (in category 'matching') ----- + matchAgainstLookahead: lookahead nextLink: anRmxLink + + | position result | + position := stream position. + result := lookahead matchAgainst: self. + stream position: position. + result ifTrue: [ ^false ]. + ^anRmxLink matchAgainst: self! Item was added: + ----- Method: RxMatcher>>matchAgainstMarkerAt:nextLink: (in category 'matching') ----- + matchAgainstMarkerAt: index nextLink: anRmxLink + + | position | + position := stream position. + (anRmxLink matchAgainst: self) ifFalse: [ ^false ]. + index <= 2 + ifTrue: [ markerPositions at: index put: position ] + ifFalse: [ (markerPositions at: index) addLast: position ]. + ^true! Item was added: + ----- Method: RxMatcher>>matchAgainstPredicate:nextLink: (in category 'matching') ----- + matchAgainstPredicate: aBlock nextLink: anRmxLink + + | next position | + next := stream next ifNil: [ ^false ]. + position := stream position - 1. + (aBlock value: next) ifTrue: [ + (anRmxLink matchAgainst: self) ifTrue: [ ^true ] ]. + stream position: position. + ^false! Item was added: + ----- Method: RxMatcher>>matchCaseInsensitiveAgainstStream:nextLink: (in category 'matching') ----- + matchCaseInsensitiveAgainstStream: aStream nextLink: anRmxLink + + | next nextSample position | + position := stream position. + "The order of the stream reads is important. When aStream runs out of characters, we must not consume any character from stream, or else the next position will be skipped in stream." + [ (nextSample := aStream next) == nil or: [ (next := stream next) == nil ] ] whileFalse: [ + (nextSample sameAs: next) ifFalse: [ + stream position: position. + ^false ] ]. + (nextSample == nil and: [ anRmxLink matchAgainst: self ]) ifTrue: [ ^true ]. + stream position: position. + ^false! Item was added: + ----- Method: RxMatcher>>matchCaseSensitiveAgainstStream:nextLink: (in category 'matching') ----- + matchCaseSensitiveAgainstStream: aStream nextLink: anRmxLink + + | next nextSample position | + position := stream position. + "The order of the stream reads is important. When aStream runs out of characters, we must not consume any character from stream, or else the next position will be skipped in stream." + [ (nextSample := aStream next) == nil or: [ (next := stream next) == nil ] ] whileFalse: [ + nextSample == next ifFalse: [ + stream position: position. + ^false ] ]. + (nextSample == nil and: [ anRmxLink matchAgainst: self ]) ifTrue: [ ^true ]. + stream position: position. + ^false! Item was removed: - ----- Method: RxMatcher>>restoreState: (in category 'privileged') ----- - restoreState: streamPosition - - stream position: streamPosition! Item was changed: ----- Method: RxmLookahead>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match if the predicate block evaluates to true when given the current stream character as the argument." + ^aMatcher matchAgainstLookahead: lookahead nextLink: next! - | original result | - original := aMatcher currentState. - result := lookahead matchAgainst: aMatcher. - aMatcher restoreState: original. - ^ result not - and: [ next matchAgainst: aMatcher ]! Item was changed: ----- Method: RxmMarker>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "If the rest of the link chain matches successfully, report the position of the stream *before* the match started to the matcher." + ^aMatcher matchAgainstMarkerAt: index nextLink: next! - | startPosition | - startPosition := aMatcher position. - (next matchAgainst: aMatcher) ifFalse: [ ^false ]. - aMatcher markerPositionAt: index add: startPosition. - ^true! Item was changed: ----- Method: RxmPredicate>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match if the predicate block evaluates to true when given the current stream character as the argument." + ^aMatcher matchAgainstPredicate: predicate nextLink: next! - | nextCharacter originalState | - originalState := aMatcher currentState. - nextCharacter := aMatcher next ifNil: [ - aMatcher restoreState: originalState. - ^false ]. - (predicate value: nextCharacter) ifTrue: [ - (next matchAgainst: aMatcher) ifTrue: [ ^true ] ]. - aMatcher restoreState: originalState. - ^false - ! Item was changed: ----- Method: RxmSpecial>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match without consuming any input, if the matcher is in appropriate state." + (aMatcher perform: matchSelector) ifFalse: [ ^false ]. + ^next matchAgainst: aMatcher! - ^(aMatcher perform: matchSelector) - and: [next matchAgainst: aMatcher]! Item was changed: ----- Method: RxmSubstring>>matchAgainst: (in category 'matching') ----- matchAgainst: aMatcher "Match if my sample stream is exactly the current prefix of the matcher stream's contents." - | nextSample nextFromMatcher originalState | - originalState := aMatcher currentState. sampleStream reset. + ignoreCase ifFalse: [ ^aMatcher matchCaseSensitiveAgainstStream: sampleStream nextLink: next ]. + ^aMatcher matchCaseInsensitiveAgainstStream: sampleStream nextLink: next! - ignoreCase - ifFalse: [ - [ (nextSample := sampleStream next) == nil or: [ (nextFromMatcher := aMatcher next) == nil ] ] whileFalse: [ - nextSample == nextFromMatcher ifFalse: [ - aMatcher restoreState: originalState. - ^false ] ] ] - ifTrue: [ - [ (nextSample := sampleStream next) == nil or: [ (nextFromMatcher := aMatcher next) == nil ] ] whileFalse: [ - (nextSample sameAs: nextFromMatcher) ifFalse: [ - aMatcher restoreState: originalState. - ^false ] ] ]. - (nextSample == nil and: [ next matchAgainst: aMatcher ]) ifTrue: [ ^true ]. - aMatcher restoreState: originalState. - ^false! Item was changed: ----- Method: RxsCharSet>>enumerablePartPredicateIgnoringCase: (in category 'privileged') ----- + enumerablePartPredicateIgnoringCase: ignoreCase - enumerablePartPredicateIgnoringCase: aBoolean + | set p | + set := (self enumerableSetIgnoringCase: ignoreCase) ifNil: [ ^nil ]. - | set | - set := (self enumerableSetIgnoringCase: aBoolean) ifNil: [ ^nil ]. set size = 1 ifTrue: [ + | char | + char := set anyOne. + ignoreCase ifTrue: [ + | lowercaseChar | + lowercaseChar := char asLowercase. + char := char asUppercase. + char == lowercaseChar ifFalse: [ + negated ifTrue: [ + ^[ :character | (character == char or: [ character == lowercaseChar ]) not ] ]. + ^[ :character | character == char or: [ character == lowercaseChar ] ] ] ]. + negated ifTrue: [ ^[ :character | character ~~ char ] ]. + ^[ :character | character == char ] ]. + ignoreCase ifTrue: [ + set copy do: [ :each | + | char | + (char := each asUppercase) == each + ifFalse: [ set add: char ] + ifTrue: [ + (char := each asLowercase) == each ifFalse: [ + set add: char ] ] ] ]. + set size < 10 ifTrue: [ "10 is an empirical value" + p := set asArray. + negated ifTrue: [ ^[ :character | (p instVarsInclude: character) not ] ]. + ^[ :character | p instVarsInclude: character ] ]. + negated ifTrue: [ ^[ :character | (set includes: character) not ] ]. + ^[ :character | set includes: character ]! - | p | - p := set anyOne. - negated ifTrue: [ ^[ :character | character ~~ p ] ]. - ^[ :character | character == p ] ]. - negated ifTrue: [ ^[ :char | (set includes: char) not ] ]. - ^[ :char | set includes: char ]! Item was changed: ----- Method: RxsCharSet>>enumerableSetIgnoringCase: (in category 'privileged') ----- enumerableSetIgnoringCase: aBoolean + "Answer a collection of characters that make up the portion of me that can be enumerated, or nil if there are no such characters. The case check is only used to determine the type of set to be used. The returned set won't contain characters of both cases, because this way the senders of this method can create more efficient checks." - "Answer a collection of characters that make up the portion of me that can be enumerated, or nil if there are no such characters." | highestCharacterCode set | highestCharacterCode := elements inject: -1 into: [ :max :each | max := (each maximumCharacterCodeIgnoringCase: aBoolean) max: max ]. highestCharacterCode = -1 ifTrue: [ ^nil ]. set := highestCharacterCode <= 255 ifTrue: [ CharacterSet new ] ifFalse: [ WideCharacterSet new ]. + elements do: [ :each | each enumerateTo: set ]. - elements do: [ :each | - each enumerateTo: set ignoringCase: aBoolean ]. ^set! Item was added: + ----- Method: RxsCharacter>>enumerateTo: (in category 'accessing') ----- + enumerateTo: aSet + + ^aSet add: character! Item was removed: - ----- Method: RxsCharacter>>enumerateTo:ignoringCase: (in category 'accessing') ----- - enumerateTo: aSet ignoringCase: aBoolean - - aBoolean ifFalse: [ ^aSet add: character ]. - aSet - add: character asUppercase; - add: character asLowercase! Item was added: + ----- Method: RxsPredicate>>enumerateTo: (in category 'accessing') ----- + enumerateTo: aSet + + ^self "Not enumerable"! Item was removed: - ----- Method: RxsPredicate>>enumerateTo:ignoringCase: (in category 'accessing') ----- - enumerateTo: aSet ignoringCase: aBoolean - - ^self "Not enumerable"! Item was added: + ----- Method: RxsRange>>enumerateTo: (in category 'accessing') ----- + enumerateTo: aSet + "Add all of the elements I represent to the collection." + + first asInteger to: last asInteger do: [ :charCode | + aSet add: charCode asCharacter ]. + ^self! Item was removed: - ----- Method: RxsRange>>enumerateTo:ignoringCase: (in category 'accessing') ----- - enumerateTo: aSet ignoringCase: aBoolean - "Add all of the elements I represent to the collection." - - aBoolean ifFalse: [ - first asInteger to: last asInteger do: [ :charCode | - aSet add: charCode asCharacter ]. - ^self ]. - first asInteger to: last asInteger do: [ :charCode | - | character | - character := charCode asCharacter. - aSet - add: character asLowercase; - add: character asUppercase ]! From commits at source.squeak.org Sun Mar 27 03:17:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 27 03:17:12 2016 Subject: [squeak-dev] The Trunk: Network-ul.175.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-ul.175.mcz ==================== Summary ==================== Name: Network-ul.175 Author: ul Time: 27 March 2016, 4:03:32.820897 am UUID: 43c19bb9-e215-4b46-ad56-9a6466e93dc9 Ancestors: Network-ul.174 Socket changes: - removed RegistryThreshold, because it was unused - added DefaultReceiveBufferSize and DefaultSendBufferSize, both with the value of 8192. These can later be turned into preferences or something. All socket initialization methods use these variables. And this is the default size of a sent chunk in #sendData: too. - don't waste seconds trying to look up the hostname for 0.0.0.0, just return nil in #peerName - simplified #sendSomeData:startIndex:count:for:, #waitForConnectionUntil:, #waitForDataFor:ifClosed:ifTimedOut:, #waitForDataIfClosed: and #waitForSendDoneFor: - added #isOtherEndConnected and #isThisEndConnected to let waiting be possible in these cases as well, but they are not in use yet, because there are some issues to solve first =============== Diff against Network-ul.174 =============== Item was changed: Object subclass: #Socket instanceVariableNames: 'semaphore socketHandle readSemaphore writeSemaphore' + classVariableNames: 'Connected DeadServer DefaultReceiveBufferSize DefaultSendBufferSize InvalidSocket MaximumReadSemaphoreWaitTimeout OtherEndClosed Registry TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection' - classVariableNames: 'Connected DeadServer InvalidSocket MaximumReadSemaphoreWaitTimeout OtherEndClosed Registry RegistryThreshold TCPSocketType ThisEndClosed UDPSocketType Unconnected WaitingForConnection' poolDictionaries: '' category: 'Network-Kernel'! !Socket commentStamp: 'gk 12/13/2005 00:43' prior: 0! A Socket represents a network connection point. Current sockets are designed to support the TCP/IP and UDP protocols. Sockets are the lowest level of networking object in Squeak and are not normally used directly. SocketStream is a higher level object wrapping a Socket in a stream like protocol. ProtocolClient and subclasses are in turn wrappers around a SocketStream to provide support for specific network protocols such as POP, NNTP, HTTP, and FTP.! Item was changed: ----- Method: Socket class>>initialize (in category 'class initialization') ----- initialize "Socket initialize" "Socket Types" TCPSocketType := 0. UDPSocketType := 1. "Socket Status Values" InvalidSocket := -1. Unconnected := 0. WaitingForConnection := 1. Connected := 2. OtherEndClosed := 3. ThisEndClosed := 4. + + "Default buffer sizes" + DefaultReceiveBufferSize := 8192. + DefaultSendBufferSize := 8192! - - RegistryThreshold := 100. "# of sockets"! Item was removed: - ----- Method: Socket class>>registryThreshold (in category 'registry') ----- - registryThreshold - "Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails." - ^RegistryThreshold! Item was removed: - ----- Method: Socket class>>registryThreshold: (in category 'registry') ----- - registryThreshold: aNumber - "Return the registry threshold above which socket creation may fail due to too many already open sockets. If the threshold is reached, a full GC will be issued if the creation of a socket fails." - RegistryThreshold := aNumber! Item was changed: ----- Method: Socket>>acceptFrom: (in category 'initialize-destroy') ----- acceptFrom: aSocket "Initialize a new socket handle from an accept call" self initializeSocketHandleUsing: [ :semaIndex :readSemaIndex :writeSemaIndex | self primAcceptFrom: aSocket socketHandle + receiveBufferSize: DefaultReceiveBufferSize + sendBufSize: DefaultSendBufferSize - receiveBufferSize: 8000 - sendBufSize: 8000 semaIndex: semaIndex readSemaIndex: readSemaIndex writeSemaIndex: writeSemaIndex ]! Item was changed: ----- Method: Socket>>initialize: (in category 'initialize-destroy') ----- initialize: socketType "Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil." self initializeSocketHandleUsing: [ :semaIndex :readSemaIndex :writeSemaIndex | self primSocketCreateNetwork: 0 type: socketType + receiveBufferSize: DefaultReceiveBufferSize + sendBufSize: DefaultSendBufferSize - receiveBufferSize: 8000 - sendBufSize: 8000 semaIndex: semaIndex readSemaIndex: readSemaIndex writeSemaIndex: writeSemaIndex ]! Item was changed: ----- Method: Socket>>initialize:family: (in category 'initialize-destroy') ----- initialize: socketType family: family "Initialize a new socket handle. If socket creation fails, socketHandle will be set to nil." NetNameResolver useOldNetwork ifTrue: [ ^self initialize: socketType ]. self initializeSocketHandleUsing: [ :semaIndex :readSemaIndex :writeSemaIndex | self primSocketCreateNetwork: family type: socketType + receiveBufferSize: DefaultReceiveBufferSize + sendBufSize: DefaultSendBufferSize - receiveBufferSize: 8000 - sendBufSize: 8000 semaIndex: semaIndex readSemaIndex: readSemaIndex writeSemaIndex: writeSemaIndex ]! Item was added: + ----- Method: Socket>>isOtherEndConnected (in category 'queries') ----- + isOtherEndConnected + "Return true if this socket is connected, or this end has closed the connection but not the other end, so we can still send data." + + | state | + socketHandle ifNil: [ ^false ]. + (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. + ^state == ThisEndClosed + ! Item was added: + ----- Method: Socket>>isThisEndConnected (in category 'queries') ----- + isThisEndConnected + "Return true if this socket is connected, other the other end has closed the connection but not this end, so we can still receive data." + + | state | + socketHandle ifNil: [ ^false ]. + (state := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. + ^state == OtherEndClosed + ! Item was changed: ----- Method: Socket>>peerName (in category 'accessing') ----- peerName "Return the name of the host I'm connected to, or nil if its name isn't known to the domain name server or the request times out." "Note: Slow. Calls the domain name server, taking up to 20 seconds to time out. Even when sucessful, delays of up to 13 seconds have been observed during periods of high network load." + | remoteAddress | + NetNameResolver useOldNetwork ifFalse: [ ^self remoteAddress hostName ]. + (remoteAddress := self remoteAddress) = #[0 0 0 0] ifTrue: [ + "Don't wait for the lookup" + ^nil ]. + ^NetNameResolver + nameForAddress: remoteAddress + timeout: 20! - ^NetNameResolver useOldNetwork - ifFalse: [ self remoteAddress hostName ] - ifTrue: [ NetNameResolver - nameForAddress: self remoteAddress - timeout: 20 ]! Item was changed: ----- Method: Socket>>sendData: (in category 'sending') ----- sendData: aStringOrByteArray "Send all of the data in the given array, even if it requires multiple calls to send it all. Return the number of bytes sent." "An experimental version use on slow lines: Longer timeout and smaller writes to try to avoid spurious timeouts." | bytesSent bytesToSend count | bytesToSend := aStringOrByteArray size. bytesSent := 0. [bytesSent < bytesToSend] whileTrue: [ (self waitForSendDoneFor: 60) ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. count := self primSocket: socketHandle sendData: aStringOrByteArray startIndex: bytesSent + 1 + count: (bytesToSend - bytesSent min: DefaultSendBufferSize). - count: (bytesToSend - bytesSent min: 5000). bytesSent := bytesSent + count]. ^ bytesSent ! Item was changed: ----- Method: Socket>>sendSomeData:startIndex:count:for: (in category 'sending') ----- sendSomeData: aStringOrByteArray startIndex: startIndex count: count for: aTimeoutInSeconds "Send up to count bytes of the given data starting at the given index. Answer the number of bytes actually sent." "Note: This operation may have to be repeated multiple times to send a large amount of data." + (self waitForSendDoneFor: aTimeoutInSeconds) ifFalse: [ + ConnectionTimedOut signal: 'send data timeout; data not sent'. + ^0 ]. + ^self primSocket: socketHandle + sendData: aStringOrByteArray + startIndex: startIndex + count: count! - | bytesSent | - (self waitForSendDoneFor: aTimeoutInSeconds) - ifTrue: [ - bytesSent := self primSocket: socketHandle - sendData: aStringOrByteArray - startIndex: startIndex - count: count] - ifFalse: [ConnectionTimedOut signal: 'send data timeout; data not sent']. - ^ bytesSent - ! Item was changed: ----- Method: Socket>>waitForConnectionUntil: (in category 'waiting') ----- waitForConnectionUntil: deadline "Wait up until the given deadline for a connection to be established. Return true if it is established by the deadline, false if not." + | status waitTime | + [ + (status := self primSocketConnectionStatus: socketHandle) == Connected ifTrue: [ ^true ]. + status == WaitingForConnection ifFalse: [ ^false ]. + (waitTime := deadline - Time millisecondClockValue) > 0 ifFalse: [ ^false ]. + semaphore waitTimeoutMSecs: waitTime ] repeat! - | status | - status := self primSocketConnectionStatus: socketHandle. - self isConnected ifTrue: [^status]. - [(status = WaitingForConnection) and: [Time millisecondClockValue < deadline]] - whileTrue: [ - semaphore waitTimeoutMSecs: (deadline - Time millisecondClockValue). - status := self primSocketConnectionStatus: socketHandle]. - - ^ status = Connected - ! Item was changed: ----- Method: Socket>>waitForDataFor:ifClosed:ifTimedOut: (in category 'waiting') ----- waitForDataFor: timeout ifClosed: closedBlock ifTimedOut: timedOutBlock "Wait for the given nr of seconds for data to arrive." | startTime msecsDelta | + socketHandle ifNil: [ ^closedBlock value ]. startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. + [ + (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. + self isConnected ifFalse: [ ^closedBlock value ]. + (Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^timedOutBlock value ]. - [(Time millisecondsSince: startTime) < msecsDelta] whileTrue: [ - (self primSocketReceiveDataAvailable: socketHandle) - ifTrue: [^self]. - self isConnected - ifFalse: [^closedBlock value]. "Providing a maximum for the time for waiting is a workaround for a VM bug which causes sockets waiting for data forever in some rare cases, because the semaphore doesn't get signaled. Remove the ""min: self class maximumReadSemaphoreWaitTimeout"" part when the bug is fixed." readSemaphore waitTimeoutMSecs: + (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout) ] repeat! - (msecsDelta - (Time millisecondsSince: startTime) min: self class maximumReadSemaphoreWaitTimeout). - ]. - - (self primSocketReceiveDataAvailable: socketHandle) - ifFalse: [ - self isConnected - ifTrue: [^timedOutBlock value] - ifFalse: [^closedBlock value]].! Item was changed: ----- Method: Socket>>waitForDataIfClosed: (in category 'waiting') ----- waitForDataIfClosed: closedBlock "Wait indefinitely for data to arrive. This method will block until data is available or the socket is closed." + socketHandle ifNil: [ ^closedBlock value ]. + [ + (self primSocketReceiveDataAvailable: socketHandle) ifTrue: [ ^self ]. + self isConnected ifFalse: [ ^closedBlock value ]. + "ul 8/13/2014 21:16 + Providing a maximum for the time for waiting is a workaround for a VM bug which + causes sockets waiting for data forever in some rare cases, because the semaphore + doesn't get signaled. Replace the ""waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout"" + part with ""wait"" when the bug is fixed." + readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout ] repeat! - [(socketHandle ~~ nil - and: [self primSocketReceiveDataAvailable: socketHandle]) ifTrue: - [^self]. - self isConnected ifFalse: - [^closedBlock value]. - "ul 8/13/2014 21:16 - Providing a maximum for the time for waiting is a workaround for a VM bug which - causes sockets waiting for data forever in some rare cases, because the semaphore - doesn't get signaled. Replace the ""waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout"" - part with ""wait"" when the bug is fixed." - readSemaphore waitTimeoutMSecs: self class maximumReadSemaphoreWaitTimeout] repeat! Item was changed: ----- Method: Socket>>waitForSendDoneFor: (in category 'waiting') ----- waitForSendDoneFor: timeout "Wait up until the given deadline for the current send operation to complete. Return true if it completes by the deadline, false if not." + | startTime msecsDelta msecsEllapsed | - | startTime msecsDelta msecsEllapsed sendDone | startTime := Time millisecondClockValue. msecsDelta := (timeout * 1000) truncated. + [ + (self primSocketSendDone: socketHandle) ifTrue: [ ^true ]. + self isConnected ifFalse: [ ^false ]. + (msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta ifFalse: [ ^false ]. + writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed ] repeat! - [(sendDone := self primSocketSendDone: socketHandle) not and: [ self isConnected - "Connection end and final data can happen fast, so test in this order" - and: [(msecsEllapsed := Time millisecondsSince: startTime) < msecsDelta]]] whileTrue: [ - writeSemaphore waitTimeoutMSecs: msecsDelta - msecsEllapsed]. - - ^ sendDone! From maxleske at gmail.com Sun Mar 27 10:11:58 2016 From: maxleske at gmail.com (Max Leske) Date: Sun Mar 27 10:11:58 2016 Subject: [squeak-dev] Green builds on Github In-Reply-To: <2EBF9787-D16F-44BF-91AC-7D2E616439DB@freudenbergs.de> References: <2EBF9787-D16F-44BF-91AC-7D2E616439DB@freudenbergs.de> Message-ID: > On 26 Mar 2016, at 15:01, Bert Freudenberg wrote: > > On 25.03.2016, at 18:51, Max Leske wrote: >> >> Hi, >> >> Just wanted to let you know that the Github builds are now all green (since now the DateAndTime issue in Squeak has been fixed), i.e. >> >> Pharo-alpha, Pharo 5.0, Pharo 4.0, >> Squeak-trunk, Squeak-4.6, Squeak-4.5 >> >> on both OS X and Linux. >> >> >> See for yourself here: https://github.com/theseion/Fuel. > > Awesome! I noticed the build steps for Squeak look more complicated than the ones for Pharo: > > https://github.com/theseion/Fuel/blob/master/scripts/jenkins.sh > > Why is that? Is there something we can do to make it simpler? That?s what Tobias asked me :) With TravisCI the build setup is the same. For the other builds I had to hack some things: - older versions of Squeak don?t work with Metacello - there?s a problem with Installer (at least in older versions) where the communication with Smalltalkhub fails because of the MIME type (x-monticello) - I?m grabbing the images from the FTP server (you didn?t have a CI server then yet). To do that I have to perform all kinds of shell-fu and the steps are a little different between some versions (e.g. where is the latest build, where is the .sources file, where do I get the correct VM etc.). Using TravisCI for the new builds is great. However, I had to disable the older builds on the INRIA CI because they kept failing (mostly due to problems with the FTP server). It would be great if I could get better access to those files. On the other hand, I think I?ll just put copies of those files into the Github repository, since the old builds won?t change anymore (that?s Squeak 4.1 through 4.4). So, short answer: no, you don?t need to change things, at least not for the Fuel builds. Thanks for asking. Cheers, Max > > - Bert - > From commits at source.squeak.org Sun Mar 27 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 27 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160327215502.17757.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-March/009505.html Name: Regex-Tests-Core-ul.4 Ancestors: Regex-Tests-Core-ul.3 Added RxParserTest >> #testPredicates to cover the case sensitive/case insensitive predicates a bit better. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009506.html Name: Regex-Core-ul.48 Ancestors: Regex-Core-ul.47 - use double dispatch in #matchAgainst: of the subclasses of RxmLink. This allowed us to get rid of #currentState, #markerPositionAt:add: and #restoreState: from RxMatcher - do not add both lowercase and uppercase characters to the set in RxsCharSet >> #enumerableSetIgnoringCase:, because that stops a few possible optimizations to work. The missing characters are added in #enumerablePartPredicateIgnoringCase: and RxMatchOptimizer's corresponding method. This change also let us have simpler #enumerateTo: methods ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009507.html Name: Network-ul.175 Ancestors: Network-ul.174 Socket changes: - removed RegistryThreshold, because it was unused - added DefaultReceiveBufferSize and DefaultSendBufferSize, both with the value of 8192. These can later be turned into preferences or something. All socket initialization methods use these variables. And this is the default size of a sent chunk in #sendData: too. - don't waste seconds trying to look up the hostname for 0.0.0.0, just return nil in #peerName - simplified #sendSomeData:startIndex:count:for:, #waitForConnectionUntil:, #waitForDataFor:ifClosed:ifTimedOut:, #waitForDataIfClosed: and #waitForSendDoneFor: - added #isOtherEndConnected and #isThisEndConnected to let waiting be possible in these cases as well, but they are not in use yet, because there are some issues to solve first ============================================= From commits at source.squeak.org Mon Mar 28 11:07:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 11:07:17 2016 Subject: [squeak-dev] The Trunk: Files-mt.150.mcz Message-ID: Marcel Taeumel uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-mt.150.mcz ==================== Summary ==================== Name: Files-mt.150 Author: mt Time: 28 March 2016, 1:07:09.732818 pm UUID: 4273cc14-a856-48f1-bfb4-eeb600da1b8b Ancestors: Files-cmm.149 Adds method to calculate size of directory including all its subdirectories. Complements #fileSize and #fileSizeString. =============== Diff against Files-cmm.149 =============== Item was added: + ----- Method: DirectoryEntry>>directorySize (in category 'access') ----- + directorySize + "Size of all files in that directory and all its sub-directories." + + ^ 0! Item was added: + ----- Method: DirectoryEntry>>directorySizeString (in category 'access') ----- + directorySizeString + + ^ self directorySize asBytesDescription + ! Item was added: + ----- Method: DirectoryEntryDirectory>>directorySize (in category 'access') ----- + directorySize + + ^ self asFileDirectory entries + inject: 0 + into: [:sum :entry | sum + (entry isDirectory ifTrue: [entry directorySize] ifFalse: [entry fileSize])]! From commits at source.squeak.org Mon Mar 28 11:09:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 11:10:01 2016 Subject: [squeak-dev] The Trunk: Monticello-mt.628.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.628.mcz ==================== Summary ==================== Name: Monticello-mt.628 Author: mt Time: 28 March 2016, 1:09:48.168818 pm UUID: b1ae807a-b86d-4f3b-a3e2-02d7e835c6b5 Ancestors: Monticello-topa.627 For directory-based repositories, append local space requirements to the description string. Having this, the size of the package cache, for example, is revealed at a glance. =============== Diff against Monticello-topa.627 =============== Item was changed: ----- Method: MCDirectoryRepository>>description (in category 'accessing') ----- description + ^ '{1} ({2})' format: {directory pathName. directory directoryEntry directorySizeString}! - ^ directory pathName! From btc at openinworld.com Mon Mar 28 13:41:42 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Mar 28 13:42:07 2016 Subject: [squeak-dev] UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0) In-Reply-To: References: <20160320171645.GA59075@shell.msen.com> <20160321021914.GA60653@shell.msen.com> <20160323231246.GB2190@shell.msen.com> <20160323235128.GD2190@shell.msen.com> <20160324015558.GA31499@shell.msen.com> <56FEC595-C5D8-4C4F-BC58-A7E4216CE6C1@gmail.com> <20160325155141.GA19526@shell.msen.com> <430C3930-FB6C-4492-ABAD-A756C4C365F0@freudenbergs.de> Message-ID: On Sat, Mar 26, 2016 at 4:30 AM, Bert Freudenberg wrote: > > On 25 Mar 2016, at 18:49, Eliot Miranda wrote: > > > > On Fri, Mar 25, 2016 at 10:08 AM, Bert Freudenberg > wrote: >> >> On 25.03.2016, at 17:47, Eliot Miranda wrote: >> >> >> On Fri, Mar 25, 2016 at 9:23 AM, Bert Freudenberg >> wrote: >>> >>> Well, it?s okay to cheat as long as you won?t get caught (says DI). >>> >>> Simply ?once a second? is not good enough if we check the time 0.5 >>> seconds after DST switch. >>> >>> If ?once a second? was implemented as ?once every wall-clock second?, >>> IMHO that would be fine. So the test would have to be something like >>> >>> (prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self >>> updateOffsetFromUTC] >>> >>> Right? >> >> >> Excellent point. So the drift algorithm to provide an accurate clock can >> be extended to check the time zone whenever the new time is at a different >> second to the previous value. >> >> >> Drifting makes this way more complicated I?d think ? unless there is an OS >> function to convert the drifted UTC time into local? IF the VM time and >> system time differ, you can?t just ask the OS for the ?now? local time. > > > I wrote up the algorithm I propose; see > http://forum.world.st/Time-millisecondClockValue-was-The-Trunk-Morphic-mt-1080-mcz-tt4877661.html#a4877918 It would be useful if the 'now' instance variable in VMClock explicitly indicated in its name whether it was utcNow or localNow. Even reading the man pages for gettimeofday() and clock_gettime() its not clear to me which it is. I can only guess that in the face of changing timezones, its not a good idea to drift localNow, and better to drift utcNow and add a constant timeZoneOffset. > > It's not that complicated and extending it is straight-forward, given that > the algorithm already maintains the last time computed. When I've time I'll > post a revision. > > _,,,^..^,,,_ > best, Eliot > > > > Terminology confusion. In your post "local time" means "wall clock utc". I > meant "time in local time zone". > > But I see that there is indeed an OS function to convert a given UTC time to > one in the local time zone. So yes, that sounds like a plan. Microsoft, Linux & OSX all seem to agree that "Local-Time" is timezoned-wall-clock, and "System-Time" is utc-wall-clock. So maybe this is a worthwhile convention to continue? "The localtime() function converts the calendar time to broken-down time representation, expressed relative to the user's specified timezone." [1] "The system time is always kept in Coordinated Universal Time (UTC) and converted in applications to local time as needed. Local time is the actual time in your current time zone, taking into account daylight saving time (DST). [2] "GetLocalTime - This function retrieves the current local date and time." [3] "GetSystemTime - This function retrieves the current system date and time. The system time is expressed in UTC." [4] cheers -ben P.S. I also found [5] interesting [1] https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/localtime.3.html [2] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/chap-Configuring_the_Date_and_Time.html [3] https://msdn.microsoft.com/en-us/library/ee487966.aspx [4] https://msdn.microsoft.com/en-us/library/ee488017.aspx [5] https://msdn.microsoft.com/en-us/library/windows/desktop/dn553408(v=vs.85).aspx From commits at source.squeak.org Mon Mar 28 15:46:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 15:46:32 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.49.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.49.mcz ==================== Summary ==================== Name: Regex-Core-ul.49 Author: ul Time: 28 March 2016, 2:19:08.381924 am UUID: 1cd17ad2-154c-4667-8211-ea6b76c1df92 Ancestors: Regex-Core-ul.48 - don't bother calling the match optimizer when it can't optimize anything. just throw it away instead - removed some leftover methods from RxMatcher, RxmLookahead and RxmSubstring =============== Diff against Regex-Core-ul.48 =============== Item was changed: ----- Method: RxMatchOptimizer>>canStartMatch:in: (in category 'accessing') ----- canStartMatch: aCharacter in: aMatcher "Answer whether a match could commence at the given lookahead character, or in the current state of . True answered by this method does not mean a match will definitly occur, while false answered by this method *does* guarantee a match will never occur." aCharacter ifNil: [ ^true ]. - testBlock ifNil: [ ^true ]. ^testBlock value: aCharacter value: aMatcher! Item was added: + ----- Method: RxMatchOptimizer>>hasTestBlock (in category 'testing') ----- + hasTestBlock + + ^testBlock notNil! Item was removed: - ----- Method: RxMatcher>>atEnd (in category 'streaming') ----- - atEnd - - ^stream atEnd! Item was changed: ----- Method: RxMatcher>>initialize:ignoreCase: (in category 'initialize-release') ----- initialize: syntaxTreeRoot ignoreCase: aBoolean "Compile thyself for the regex with the specified syntax tree. See comment and `building' protocol in this class and #dispatchTo: methods in syntax tree components for details on double-dispatch building. The argument is supposedly a RxsRegex." ignoreCase := aBoolean. self buildFrom: syntaxTreeRoot. self initializeMarkerPositions. + startOptimizer := RxMatchOptimizer new initialize: syntaxTreeRoot ignoreCase: aBoolean. + startOptimizer hasTestBlock ifFalse: [ + startOptimizer := nil ]! - startOptimizer := RxMatchOptimizer new initialize: syntaxTreeRoot ignoreCase: aBoolean! Item was removed: - ----- Method: RxMatcher>>lastResult (in category 'accessing') ----- - lastResult - - ^lastResult! Item was removed: - ----- Method: RxMatcher>>next (in category 'streaming') ----- - next - ^ stream next! Item was removed: - ----- Method: RxmLookahead>>lookahead (in category 'accessing') ----- - lookahead - ^ lookahead! Item was removed: - ----- Method: RxmSubstring>>character:ignoreCase: (in category 'initialize-release') ----- - character: aCharacter ignoreCase: aBoolean - "Match exactly this character." - - sampleStream := (String with: aCharacter) readStream. - ignoreCase := aBoolean! From commits at source.squeak.org Mon Mar 28 15:46:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 15:46:41 2016 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-ul.5.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-ul.5.mcz ==================== Summary ==================== Name: Regex-Tests-Core-ul.5 Author: ul Time: 28 March 2016, 5:46:00.424909 pm UUID: d237739d-6e42-4b4b-bf3e-306bcbd2061f Ancestors: Regex-Tests-Core-ul.4 Updated RxMatcherTest class >> #packageNamesUnderTest to return Regex-Core instead of VB-Regex. Perhaps it's not such a good idea to store the package name there, because no one noticed this slip for three years. =============== Diff against Regex-Tests-Core-ul.4 =============== Item was removed: - ----- Method: RxMatcherTest class>>packageNamesUnderTest (in category 'accessing') ----- - packageNamesUnderTest - ^ #('VB-Regex')! From asqueaker at gmail.com Mon Mar 28 17:16:09 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Mar 28 17:16:52 2016 Subject: [squeak-dev] The Trunk: Files-mt.150.mcz In-Reply-To: <56f91069.c1b58c0a.f4342.ffffdfa8SMTPIN_ADDED_MISSING@mx.google.com> References: <56f91069.c1b58c0a.f4342.ffffdfa8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Since DirectoryEntry already implements #fileSize, it wouldn't be too crazy to also implement: directorySize "total size of the entry, if it's a directory" ^ 0 so that way wouldn't need to create a new sender of the type-check (in DirectoryEntryDirectory>>directorySize).. On Mon, Mar 28, 2016 at 6:07 AM, wrote: > Marcel Taeumel uploaded a new version of Files to project The Trunk: > http://source.squeak.org/trunk/Files-mt.150.mcz > > ==================== Summary ==================== > > Name: Files-mt.150 > Author: mt > Time: 28 March 2016, 1:07:09.732818 pm > UUID: 4273cc14-a856-48f1-bfb4-eeb600da1b8b > Ancestors: Files-cmm.149 > > Adds method to calculate size of directory including all its subdirectories. Complements #fileSize and #fileSizeString. > > =============== Diff against Files-cmm.149 =============== > > Item was added: > + ----- Method: DirectoryEntry>>directorySize (in category 'access') ----- > + directorySize > + "Size of all files in that directory and all its sub-directories." > + > + ^ 0! > > Item was added: > + ----- Method: DirectoryEntry>>directorySizeString (in category 'access') ----- > + directorySizeString > + > + ^ self directorySize asBytesDescription > + ! > > Item was added: > + ----- Method: DirectoryEntryDirectory>>directorySize (in category 'access') ----- > + directorySize > + > + ^ self asFileDirectory entries > + inject: 0 > + into: [:sum :entry | sum + (entry isDirectory ifTrue: [entry directorySize] ifFalse: [entry fileSize])]! > > From Marcel.Taeumel at hpi.de Mon Mar 28 17:23:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Mar 28 17:53:14 2016 Subject: [squeak-dev] Re: The Trunk: Files-mt.150.mcz In-Reply-To: References: Message-ID: <1459185785517-4886992.post@n4.nabble.com> Well, I already did that by implementing it in the common super class DirectoryEntry. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Files-mt-150-mcz-tp4886924p4886992.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Mar 28 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 21:55:03 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160328215502.24956.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-March/009508.html Name: Files-mt.150 Ancestors: Files-cmm.149 Adds method to calculate size of directory including all its subdirectories. Complements #fileSize and #fileSizeString. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009509.html Name: Monticello-mt.628 Ancestors: Monticello-topa.627 For directory-based repositories, append local space requirements to the description string. Having this, the size of the package cache, for example, is revealed at a glance. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009510.html Name: Regex-Core-ul.49 Ancestors: Regex-Core-ul.48 - don't bother calling the match optimizer when it can't optimize anything. just throw it away instead - removed some leftover methods from RxMatcher, RxmLookahead and RxmSubstring ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009511.html Name: Regex-Tests-Core-ul.5 Ancestors: Regex-Tests-Core-ul.4 Updated RxMatcherTest class >> #packageNamesUnderTest to return Regex-Core instead of VB-Regex. Perhaps it's not such a good idea to store the package name there, because no one noticed this slip for three years. ============================================= From commits at source.squeak.org Mon Mar 28 22:29:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 28 22:29:17 2016 Subject: [squeak-dev] The Trunk: NetworkTests-eem.41.mcz Message-ID: Eliot Miranda uploaded a new version of NetworkTests to project The Trunk: http://source.squeak.org/trunk/NetworkTests-eem.41.mcz ==================== Summary ==================== Name: NetworkTests-eem.41 Author: eem Time: 28 March 2016, 3:28:59.175834 pm UUID: edf75dc3-4a00-4751-9db5-427ba6e5687a Ancestors: NetworkTests-ul.40 Improve testSocketReuse. It seems correct that the SocketPlugin answers whatever bit things like SO_REUSEADDR set in underlying socket fields, not the 1 that the test expects. e.g. on Mac OS X Socket newUDP setOption: 'SO_REUSEADDR' value: 1; getOption: 'SO_REUSEADDR' answers #(0 4), not #(0 1) =============== Diff against NetworkTests-ul.40 =============== Item was changed: ----- Method: SocketTest>>testSocketReuse (in category 'tests') ----- testSocketReuse "Test for SO_REUSEADDR/SO_REUSEPORT" | udp1 udp2 sendProc recvProc | [ + | address port opt send1 recv2 received sent | - | address port send1 recv2 received sent | address := #[255 255 255 255]. "broadcast" port := 31259. udp1 := Socket newUDP. udp1 setOption: 'SO_REUSEADDR' value: 1. self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEADDR'. + opt := udp1 getOption: 'SO_REUSEADDR'. + self assert: opt first isZero & opt last isZero not description: 'SO_REUSEADDR couldn''t be set'. - self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEADDR') description: 'SO_REUSEADDR couldn''t be set'. udp1 setOption: 'SO_REUSEPORT' value: 1. self assert: 0 equals: udp1 socketError description: 'Error occured while setting SO_REUSEPORT'. + opt := udp1 getOption: 'SO_REUSEPORT'. + self assert: opt first isZero & opt last isZero not description: 'SO_REUSEPORT couldn''t be set'. - self assert: #(0 1) equals: (udp1 getOption: 'SO_REUSEPORT') description: 'SO_REUSEPORT couldn''t be set'. udp1 setPort: port. self assert: port equals: udp1 localPort. udp1 setOption: 'SO_BROADCAST' value: 1. send1 := UUID new. udp2 := Socket newUDP. udp2 setOption: 'SO_REUSEADDR' value: 1. self assert: 0 equals: udp2 socketError. udp2 setOption: 'SO_REUSEPORT' value: 1. self assert: 0 equals: udp2 socketError. udp2 setPort: port. self assert: port equals: udp2 localPort. udp2 setOption: 'SO_BROADCAST' value: 1. recv2 := UUID new. received := 0. recvProc := [ [received < 16] whileTrue:[ received := received + (udp2 receiveDataInto: recv2 startingAt: received + 1) "No need to yield here, because #receiveDataInto:startingAt: will either wait on the readSemaphore of the socket or signal an error." ] ] newProcess. sendProc := [ udp1 setPeer: address port: port. sent := (udp1 sendSomeData: send1 startIndex: 1 count: 16 for: 1). ] newProcess. recvProc resume. sendProc resume. (Delay forMilliseconds: 200) wait. self assert: sendProc isTerminated description: 'sendProc hasn''t terminated till the deadline'; assert: recvProc isTerminated description: 'recvProc hasn''t terminated till the deadline'; assert: 16 equals: sent description: ('{1} bytes were sent instead of 16' format: { sent }); assert: send1 equals: recv2 description: 'sent and received bytes differ' ] ensure:[ udp1 ifNotNil: [ udp1 destroy ]. udp2 ifNotNil: [ udp2 destroy ]. sendProc ifNotNil: [ sendProc terminate ]. recvProc ifNotNil: [ recvProc terminate ] ]. ! From eliot.miranda at gmail.com Tue Mar 29 18:59:26 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 29 18:59:29 2016 Subject: [squeak-dev] New Cog VMs available Message-ID: ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3663 CogVM binaries as per VMMaker.oscog-eem.1746/r3663 General: Fix loss of signals to e.g. a socket's readSemaphore when data available: Fix a bug in sqAtomicOps.h where the assumption that the intrinsic atomic add operation will apply to 16-bit variables is false on clang. So on x86 and x64 use inline assembly with gcc and clang since this is known to work. Improve the doSignalSemaphores code in sqExternalSemaphores.c so that the tide variables are initialized at the right point and so there's only one copy of the signalling code. Allow primitiveUtcWithOffset to accept an optional parameter with an array or object with two or more slots to store UTC posix microseconds and time zone offset in seconds. Compatibility with VMM trunk. Add a Smalltalk epoch version of it, primitiveUtcAndTimezoneOffset, and give it primitive #244. Fix signed/unsigned arithmetic issues in 64-bit microsecond clock code. This fixes the bug whereby Time localMicrosecondClock - Time utcMicrosecondClock // 1000000 would answer something with an odd second, a multiple of 3600 plus 1. General Integer conversion routines: Several clean ups to integer conversion routines. Simplify bit operations using positiveMachineIntegerValueOf:/ positiveMachineIntegerFor: rather than doing 32/64 bits dissertation. Spur Cogit: Rewrote identity primitive to check for forwarders only when the identity of objects is different. The previous version would crash if the argument was a forwarder to an immediate. Spur VMs: Now that UUIDs are created with purely image-based code in Squeak trunk, make the UUIDPlugin external in all Squeak Spur VMs. Plugins: Make FFI load symbol fail after (when find function fails). In Pharo, we allow to load global functions (so we can control world windows through FFI). LargeIntegersPlugin: Finish 1st round of LargeIntegers refactoring - simplify the left and right shift - use as much unsigned arithmetic as possible - homogenize type declaration within the plugin - remove unused digitOf:at: Slang: Beware: sending abs to an unsigned int will re-interpret the int as signed and will generate C compiler warnings. The new version uses SQABS and SQLABS macros on sqInt and sqLong vars, and fabs and fabsf on double and float args, respectively, and llabs on long long, __int64 vars. Mac OS X: Unswap the Squeak and Newspeak localized strings _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160329/ec957194/attachment.htm From commits at source.squeak.org Tue Mar 29 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 29 21:55:04 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160329215502.25356.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-March/009512.html Name: NetworkTests-eem.41 Ancestors: NetworkTests-ul.40 Improve testSocketReuse. It seems correct that the SocketPlugin answers whatever bit things like SO_REUSEADDR set in underlying socket fields, not the 1 that the test expects. e.g. on Mac OS X Socket newUDP setOption: 'SO_REUSEADDR' value: 1; getOption: 'SO_REUSEADDR' answers #(0 4), not #(0 1) ============================================= From asqueaker at gmail.com Tue Mar 29 22:36:49 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 29 22:37:31 2016 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: > Fix loss of signals to e.g. a socket's readSemaphore when data available: Woo hoo! I had infrequently been affected by this, it seemed impossible to debug. Now, its probably fixed. The talent in this community never ceases to amaze me. From leves at caesar.elte.hu Wed Mar 30 02:10:31 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Mar 30 02:10:35 2016 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: Hi Eliot, I think something went wrong with those semaphores. Connecting to a Socket seems to wait for the full 45 seconds timeout with this VM. To reproduce, just try opening any remote MC repository. This happens with cogspur64linuxht. I haven't tried any other versions yet. There's another issue with WideStrings where, #at: (primitive 63) fails for a few instances. This issue is present in 3643 as well. To reproduce it, open the Monticello Browser, select the Multilingual package, select the Trunk repository and press Changes. You'll see that two methods are reported to have changed (even though they haven't). Selecting any of them will pop up a debugger with the primitive failure. The common symptom is that #basicAt: will work for the index, for which #at: fails, and it will return the number 16rD80000FF. Levente On Tue, 29 Mar 2016, Eliot Miranda wrote: > ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3663 > > > CogVM binaries as per VMMaker.oscog-eem.1746/r3663 > > General: > > Fix loss of signals to e.g. a socket's readSemaphore when data available: > Fix a bug in sqAtomicOps.h where the assumption that the intrinsic atomic add > operation will apply to 16-bit variables is false on clang.? So on x86 and x64 > use inline assembly with gcc and clang since this is known to work. > Improve the doSignalSemaphores code in sqExternalSemaphores.c so that the tide > variables are initialized at the right point and so there's only one copy of > the signalling code. > > Allow primitiveUtcWithOffset to accept an optional parameter with an > array or object with two or more slots to store UTC posix microseconds > and time zone offset in seconds. Compatibility with VMM trunk. > > Add a Smalltalk epoch version of it, primitiveUtcAndTimezoneOffset, > and give it primitive #244. > > Fix signed/unsigned arithmetic issues in 64-bit microsecond clock code. > This fixes the bug whereby > Time localMicrosecondClock - Time utcMicrosecondClock // 1000000 > would answer something with an odd second, a multiple of 3600 plus 1. > > General Integer conversion routines: > Several clean ups to integer conversion routines. > > Simplify bit operations using positiveMachineIntegerValueOf:/ > positiveMachineIntegerFor: rather than doing 32/64 bits dissertation. > > > Spur Cogit: > Rewrote identity primitive to check for forwarders only when the identity of > objects is different.? The previous version would crash if the argument was a > forwarder to an immediate. > > Spur VMs: > Now that UUIDs are created with purely image-based code in Squeak trunk, make > the UUIDPlugin external in all Squeak Spur VMs. > > > Plugins: > Make FFI load symbol fail after (when find function fails).? > In Pharo, we allow to load global functions (so we can control world windows > through FFI).? > > LargeIntegersPlugin: > > Finish 1st round of LargeIntegers refactoring > > - simplify the left and right shift > - use as much unsigned arithmetic as possible > - homogenize type declaration within the plugin > - remove unused digitOf:at: > > > Slang: > Beware: sending abs to an unsigned int will re-interpret the int as signed and > will generate C compiler warnings.? The new version uses SQABS and SQLABS macros > on sqInt and sqLong vars, and fabs and fabsf on double and float args, > respectively, and llabs on long long, __int64 vars. > > > Mac OS X: > Unswap the Squeak and Newspeak localized strings > > _,,,^..^,,,_ > best,?Eliot > > From eliot.miranda at gmail.com Wed Mar 30 05:58:12 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 30 05:58:16 2016 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: Hi Levente, On Tue, Mar 29, 2016 at 7:10 PM, Levente Uzonyi wrote: > Hi Eliot, > > I think something went wrong with those semaphores. Connecting to a Socket > seems to wait for the full 45 seconds timeout with this VM. To reproduce, > just try opening any remote MC repository. This happens with > cogspur64linuxht. I haven't tried any other versions yet. > OK, thanks. This is 64-bits only thank goodness. I don't see the problem with the 32-bit system. There's another issue with WideStrings where, #at: (primitive 63) fails for > a few instances. This issue is present in 3643 as well. To reproduce it, > open the Monticello Browser, select the Multilingual package, select the > Trunk repository and press Changes. You'll see that two methods are > reported to have changed (even though they haven't). Selecting any of them > will pop up a debugger with the primitive failure. The common symptom is > that #basicAt: will work for the index, for which #at: fails, and it will > return the number 16rD80000FF. And I take it this is 64-bits too, right? > > > Levente > > > On Tue, 29 Mar 2016, Eliot Miranda wrote: > > ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3663 >> >> >> CogVM binaries as per VMMaker.oscog-eem.1746/r3663 >> >> General: >> >> Fix loss of signals to e.g. a socket's readSemaphore when data available: >> Fix a bug in sqAtomicOps.h where the assumption that the intrinsic atomic >> add >> operation will apply to 16-bit variables is false on clang. So on x86 >> and x64 >> use inline assembly with gcc and clang since this is known to work. >> Improve the doSignalSemaphores code in sqExternalSemaphores.c so that the >> tide >> variables are initialized at the right point and so there's only one copy >> of >> the signalling code. >> >> Allow primitiveUtcWithOffset to accept an optional parameter with an >> array or object with two or more slots to store UTC posix microseconds >> and time zone offset in seconds. Compatibility with VMM trunk. >> >> Add a Smalltalk epoch version of it, primitiveUtcAndTimezoneOffset, >> and give it primitive #244. >> >> Fix signed/unsigned arithmetic issues in 64-bit microsecond clock code. >> This fixes the bug whereby >> Time localMicrosecondClock - Time utcMicrosecondClock // 1000000 >> would answer something with an odd second, a multiple of 3600 plus 1. >> >> General Integer conversion routines: >> Several clean ups to integer conversion routines. >> >> Simplify bit operations using positiveMachineIntegerValueOf:/ >> positiveMachineIntegerFor: rather than doing 32/64 bits dissertation. >> >> >> Spur Cogit: >> Rewrote identity primitive to check for forwarders only when the identity >> of >> objects is different. The previous version would crash if the argument >> was a >> forwarder to an immediate. >> >> Spur VMs: >> Now that UUIDs are created with purely image-based code in Squeak trunk, >> make >> the UUIDPlugin external in all Squeak Spur VMs. >> >> >> Plugins: >> Make FFI load symbol fail after (when find function fails). >> In Pharo, we allow to load global functions (so we can control world >> windows >> through FFI). >> >> LargeIntegersPlugin: >> >> Finish 1st round of LargeIntegers refactoring >> >> - simplify the left and right shift >> - use as much unsigned arithmetic as possible >> - homogenize type declaration within the plugin >> - remove unused digitOf:at: >> >> >> Slang: >> Beware: sending abs to an unsigned int will re-interpret the int as >> signed and >> will generate C compiler warnings. The new version uses SQABS and SQLABS >> macros >> on sqInt and sqLong vars, and fabs and fabsf on double and float args, >> respectively, and llabs on long long, __int64 vars. >> >> >> Mac OS X: >> Unswap the Squeak and Newspeak localized strings >> >> _,,,^..^,,,_ >> best, Eliot >> >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160329/203fb760/attachment.htm From leves at caesar.elte.hu Wed Mar 30 06:07:11 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Mar 30 06:07:16 2016 Subject: [Vm-dev] Re: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: Hi Eliot, Yes, both issues only appear on 64-bit VMs. Levente From nicolas.cellier.aka.nice at gmail.com Wed Mar 30 06:11:56 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Mar 30 06:11:57 2016 Subject: [Vm-dev] Re: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: Hi, I cannot reproduce the second (Multilingual changes) with SqueakStackSpur64 MacOSX. I started from trunk50-64-15711.image, then updated from trunk. The system report no changes. 2016-03-30 8:07 GMT+02:00 Levente Uzonyi : > Hi Eliot, > > Yes, both issues only appear on 64-bit VMs. > > Levente > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/0748c528/attachment.htm From nicolas.cellier.aka.nice at gmail.com Wed Mar 30 06:23:12 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Mar 30 06:23:13 2016 Subject: [Vm-dev] Re: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: Oops, forget what I said, I picked the wrong VM (too many instances...) both SqueakStackSpur64 MacOSX and SqueakCogSpur64 enter are waiting for connection (with 5% CPU). then report no changes. 2016-03-30 8:11 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > Hi, > I cannot reproduce the second (Multilingual changes) with > SqueakStackSpur64 MacOSX. > I started from trunk50-64-15711.image, then updated from trunk. > The system report no changes. > > 2016-03-30 8:07 GMT+02:00 Levente Uzonyi : > >> Hi Eliot, >> >> Yes, both issues only appear on 64-bit VMs. >> >> Levente >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/4ab3262b/attachment.htm From commits at source.squeak.org Wed Mar 30 13:57:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 13:57:11 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.160.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.160.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.160 Author: mt Time: 30 March 2016, 3:57:02.584647 pm UUID: c90bb584-3c2d-4eaf-9a84-b6658026e00c Ancestors: ToolBuilder-Morphic-kfr.159 Fixes bug where dropping into filtered lists passed the wrong index to the model. =============== Diff against ToolBuilder-Morphic-kfr.159 =============== Item was changed: ----- Method: PluggableListMorphPlus>>acceptDroppingMorph:event: (in category 'drag and drop') ----- acceptDroppingMorph: aTransferMorph event: evt dropItemSelector ifNil: [^ self]. potentialDropRow ifNil: [^ self]. model perform: dropItemSelector withEnoughArguments: { aTransferMorph passenger. + self modelIndexFor: potentialDropRow. - potentialDropRow. aTransferMorph shouldCopy. aTransferMorph}. self resetPotentialDropRow. evt hand releaseMouseFocus: self. Cursor normal show. ! From asqueaker at gmail.com Wed Mar 30 15:14:57 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 30 15:15:40 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.160.mcz In-Reply-To: <56fbdb39.04a88c0a.adcb0.fffffc0dSMTPIN_ADDED_MISSING@mx.google.com> References: <56fbdb39.04a88c0a.adcb0.fffffc0dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Thank you!! My guess is this will fix the bug where, when I drag a class to a new package-category (of a filtered list), it will put it in the one I dragged it to.. On Wed, Mar 30, 2016 at 8:57 AM, wrote: > Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: > http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.160.mcz > > ==================== Summary ==================== > > Name: ToolBuilder-Morphic-mt.160 > Author: mt > Time: 30 March 2016, 3:57:02.584647 pm > UUID: c90bb584-3c2d-4eaf-9a84-b6658026e00c > Ancestors: ToolBuilder-Morphic-kfr.159 > > Fixes bug where dropping into filtered lists passed the wrong index to the model. > > =============== Diff against ToolBuilder-Morphic-kfr.159 =============== > > Item was changed: > ----- Method: PluggableListMorphPlus>>acceptDroppingMorph:event: (in category 'drag and drop') ----- > acceptDroppingMorph: aTransferMorph event: evt > > dropItemSelector ifNil: [^ self]. > potentialDropRow ifNil: [^ self]. > > model > perform: dropItemSelector > withEnoughArguments: { > aTransferMorph passenger. > + self modelIndexFor: potentialDropRow. > - potentialDropRow. > aTransferMorph shouldCopy. > aTransferMorph}. > > self resetPotentialDropRow. > evt hand releaseMouseFocus: self. > Cursor normal show. > ! > > From commits at source.squeak.org Wed Mar 30 18:42:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 18:42:26 2016 Subject: [squeak-dev] The Trunk: Collections-ul.683.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.683.mcz ==================== Summary ==================== Name: Collections-ul.683 Author: ul Time: 30 March 2016, 2:23:29.737891 am UUID: f0634d1c-37d8-4ed1-84cc-6439546aaa74 Ancestors: Collections-ul.682 Improvement #peekFor: performance. =============== Diff against Collections-ul.682 =============== Item was changed: ----- Method: PositionableStream>>peekFor: (in category 'accessing') ----- peekFor: anObject "Answer false and do not move over the next element if it is not equal to the argument, anObject, or if the receiver is at the end. Answer true and increment the position for accessing elements, if the next element is equal to anObject." - | nextObject | self atEnd ifTrue: [^false]. - nextObject := self next. - "peek for matching element" - anObject = nextObject ifTrue: [^true]. "gobble it if found" + self next = anObject ifTrue: [ ^true ]. position := position - 1. ^false! From commits at source.squeak.org Wed Mar 30 20:39:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 20:39:23 2016 Subject: [squeak-dev] The Trunk: Files-ul.151.mcz Message-ID: Levente Uzonyi uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-ul.151.mcz ==================== Summary ==================== Name: Files-ul.151 Author: ul Time: 30 March 2016, 2:24:00.086677 am UUID: 5c8941ce-af98-4464-8bad-423c8bf7ddb5 Ancestors: Files-mt.150 Improvement #peekFor: performance. =============== Diff against Files-mt.150 =============== Item was changed: ----- Method: StandardFileStream>>peekFor: (in category 'access') ----- peekFor: item "Answer false and do not advance if the next element is not equal to item, or if this stream is at the end. If the next element is equal to item, then advance over it and return true" + - | next | "self atEnd ifTrue: [^ false]. -- SFStream will give nil" + (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ]. - (next := self next) == nil ifTrue: [^ false]. - item = next ifTrue: [^ true]. self skip: -1. ^ false! From commits at source.squeak.org Wed Mar 30 20:39:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 20:39:57 2016 Subject: [squeak-dev] The Trunk: Kernel-ul.1008.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.1008.mcz ==================== Summary ==================== Name: Kernel-ul.1008 Author: ul Time: 30 March 2016, 2:54:12.155092 am UUID: dee08222-ad83-4daf-a90d-a7a4e7b5009f Ancestors: Kernel-ul.1007 - minor performance improvements for NumberParser and Fraction. - give some advantage to the same class integer-integer comparison, which is probably the most common case, in Integer >> #=, at the cost of adding a minor overhead to the integer-non-integer comparisons. - removed Integer >> #hash because it's not used and the implementation become incorrect over time. =============== Diff against Kernel-ul.1007 =============== Item was changed: ----- Method: Fraction>>setNumerator:denominator: (in category 'private') ----- setNumerator: n denominator: d + d isZero ifTrue: [ ^(ZeroDivide dividend: n) signal ]. + numerator := n asInteger. + (denominator := d asInteger) negative ifTrue: [ "keep sign in numerator" + numerator := numerator negated. + denominator := denominator negated ]! - d = 0 - ifTrue: [^(ZeroDivide dividend: n) signal] - ifFalse: - [numerator := n asInteger. - denominator := d asInteger abs. "keep sign in numerator" - d < 0 ifTrue: [numerator := numerator negated]]! Item was changed: ----- Method: Integer>>= (in category 'comparing') ----- = aNumber + aNumber class == self class ifTrue: [ ^(self digitCompare: aNumber) = 0 ]. + aNumber isInteger ifTrue: [ ^false ]. - aNumber isInteger ifTrue: [ - aNumber class == self class ifFalse: [ ^false ]. - ^(self digitCompare: aNumber) = 0 ]. aNumber isNumber ifFalse: [ ^false ]. ^aNumber adaptToInteger: self andCompare: #=! Item was removed: - ----- Method: Integer>>hash (in category 'comparing') ----- - hash - "Hash is reimplemented because = is implemented." - - ^(self lastDigit bitShift: 8) + (self digitAt: 1)! Item was added: + ----- Method: NumberParser>>isExponentLetter: (in category 'testing') ----- + isExponentLetter: aCharacter + + ^self exponentLetters includes: aCharacter! Item was changed: ----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') ----- makeFloatFromMantissa: m exponent: k base: aRadix "Convert infinite precision arithmetic into Floating point. This alogrithm rely on correct IEEE rounding mode being implemented in Integer>>asFloat and Fraction>>asFloat" + k = 0 ifTrue: [ ^m asFloat ]. + k > 0 ifTrue: [ ^(m * (aRadix raisedToInteger: k)) asFloat ]. + ^(Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)) asFloat! - ^(k positive - ifTrue: [m * (aRadix raisedToInteger: k)] - ifFalse: [Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)]) asFloat! Item was changed: ----- Method: NumberParser>>nextElementaryLargeIntegerBase: (in category 'parsing-large int') ----- nextElementaryLargeIntegerBase: aRadix "Form an unsigned integer with incoming digits from sourceStream. Return this integer, or zero if no digits found. Stop reading if end of digits or if a LargeInteger is formed. Count the number of digits and the position of lastNonZero digit and store them in instVar." | value digit char | value := 0. nDigits := 0. lastNonZero := 0. + [ + value isLarge ifTrue: [ ^value ]. + char := sourceStream next ifNil: [ ^value ]. + ((digit := char digitValue) < 0 or: [digit >= aRadix]) ifTrue: [ + sourceStream skip: -1. + ^value ]. + nDigits := nDigits + 1. + digit = 0 + ifFalse: [ + lastNonZero := nDigits. + value := value * aRadix + digit ] + ifTrue: [ value := value * aRadix ] ] repeat! - [value isLarge or: [(char := sourceStream next) == nil - or: [digit := char digitValue. - (0 > digit or: [digit >= aRadix]) - and: [sourceStream skip: -1. - true]]]] - whileFalse: [ - nDigits := nDigits + 1. - 0 = digit - ifFalse: [lastNonZero := nDigits]. - value := value * aRadix + digit]. - ^value! Item was changed: ----- Method: NumberParser>>readExponent (in category 'parsing-private') ----- readExponent "read the exponent if any (stored in instVar). Answer true if found, answer false if none. If exponent letter is not followed by a digit, this is not considered as an error. Exponent are always read in base 10." | eneg epos | exponent := 0. + (self isExponentLetter: sourceStream peek) ifFalse: [^ false]. - sourceStream atEnd ifTrue: [^ false]. - (self exponentLetters includes: sourceStream peek) - ifFalse: [^ false]. sourceStream next. eneg := sourceStream peekFor: $-. epos := eneg not and: [self allowPlusSignInExponent and: [sourceStream peekFor: $+]]. exponent := self nextUnsignedIntegerOrNilBase: 10. exponent ifNil: ["Oops, there was no digit after the exponent letter.Ungobble the letter" exponent := 0. sourceStream skip: ((eneg or: [epos]) ifTrue: [-2] ifFalse: [-1]). ^ false]. eneg ifTrue: [exponent := exponent negated]. ^true! From commits at source.squeak.org Wed Mar 30 20:41:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 20:41:13 2016 Subject: [squeak-dev] The Trunk: Collections-eem.684.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.684.mcz ==================== Summary ==================== Name: Collections-eem.684 Author: eem Time: 30 March 2016, 1:40:38.127809 pm UUID: 3cd95866-5b71-4755-8659-1e0fbb6fbe4d Ancestors: Collections-ul.683 Fix PositionableStream>>basicUpTo:. It should replicate upTo:, not next:. =============== Diff against Collections-ul.683 =============== Item was changed: + ----- Method: PositionableStream>>basicUpTo: (in category 'private basic') ----- + basicUpTo: anObject + "Answer a subcollection from the current access position to the + occurrence (if any, but not inclusive) of anObject in the receiver. If + anObject is not in the collection, answer the entire rest of the receiver." + | newStream element | + newStream := WriteStream on: (self collectionSpecies new: 100). + [self atEnd or: [(element := self next) = anObject]] + whileFalse: [newStream nextPut: element]. + ^newStream contents! - ----- Method: PositionableStream>>basicUpTo: (in category 'accessing - multibyte support') ----- - basicUpTo: anObject - - ^self next: anObject - ! From commits at source.squeak.org Wed Mar 30 20:46:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 20:46:46 2016 Subject: [squeak-dev] The Trunk: Multilingual-ul.211.mcz Message-ID: Levente Uzonyi uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-ul.211.mcz ==================== Summary ==================== Name: Multilingual-ul.211 Author: ul Time: 30 March 2016, 10:46:08.466045 pm UUID: 7d40f4e7-1bcf-4f5c-b68e-11269dbb32d9 Ancestors: Multilingual-ul.210 Improved #peekFor: performance. =============== Diff against Multilingual-ul.210 =============== Item was changed: ----- Method: MultiByteBinaryOrTextStream>>peekFor: (in category 'public') ----- peekFor: item + | state | - | next state | "self atEnd ifTrue: [^ false]. -- SFStream will give nil" state := converter saveStateOf: self. + (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ]. - (next := self next) ifNil: [^ false]. - item = next ifTrue: [^ true]. converter restoreStateOf: self with: state. ^ false. ! Item was changed: ----- Method: MultiByteFileStream>>peekFor: (in category 'public') ----- peekFor: item + | state | - | next state | "self atEnd ifTrue: [^ false]. -- SFStream will give nil" state := converter saveStateOf: self. + (self next ifNil: [ ^false ]) = item ifTrue: [ ^true ]. - (next := self next) ifNil: [^ false]. - item = next ifTrue: [^ true]. converter restoreStateOf: self with: state. ^ false. ! From eliot.miranda at gmail.com Wed Mar 30 20:49:18 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 30 20:49:22 2016 Subject: 64-bit WideString access (was [squeak-dev] New Cog VMs available) Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: WideString-at.st Type: application/octet-stream Size: 742 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/396112b5/WideString-at.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: WideString-atput.st Type: application/octet-stream Size: 795 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/396112b5/WideString-atput.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: WideString-at.st Type: application/octet-stream Size: 600 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/396112b5/WideString-at-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: WideString-atput.st Type: application/octet-stream Size: 645 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160330/396112b5/WideString-atput-0001.obj From commits at source.squeak.org Wed Mar 30 21:55:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 30 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160330215502.31395.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-March/009513.html Name: ToolBuilder-Morphic-mt.160 Ancestors: ToolBuilder-Morphic-kfr.159 Fixes bug where dropping into filtered lists passed the wrong index to the model. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009514.html Name: Collections-ul.683 Ancestors: Collections-ul.682 Improvement #peekFor: performance. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009515.html Name: Files-ul.151 Ancestors: Files-mt.150 Improvement #peekFor: performance. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009516.html Name: Kernel-ul.1008 Ancestors: Kernel-ul.1007 - minor performance improvements for NumberParser and Fraction. - give some advantage to the same class integer-integer comparison, which is probably the most common case, in Integer >> #=, at the cost of adding a minor overhead to the integer-non-integer comparisons. - removed Integer >> #hash because it's not used and the implementation become incorrect over time. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009517.html Name: Collections-eem.684 Ancestors: Collections-ul.683 Fix PositionableStream>>basicUpTo:. It should replicate upTo:, not next:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-March/009518.html Name: Multilingual-ul.211 Ancestors: Multilingual-ul.210 Improved #peekFor: performance. ============================================= From leves at caesar.elte.hu Thu Mar 31 01:16:23 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Mar 31 01:16:26 2016 Subject: [Vm-dev] 64-bit WideString access (was [squeak-dev] New Cog VMs available) In-Reply-To: References: Message-ID: Hi Eliot, I made a snippet to read the source of the method as an array of integers from the .mcz in the package cache: (MCMczReader versionFromFile: 'package-cache/Multilingual-ul.210.mcz') snapshot definitions detect: [ :each | each isMethodDefinition and: [ each className = #JapaneseEnvironment and: [ each selector = #flapTabTextFor:in: ] ] ] ifFound: [ :definition | Array streamContents: [ :stream | | source | source := definition source. 1 to: source size do: [ :index | stream nextPut: (source basicAt: index) ] ] ] ifNone: [ self error ] In MCMczReader >> #loadDefinitions, if you change this line [:m | [^definitions := (DataStream on: m contentStream) next definitions] to this [:m | [ self error. ^definitions := (DataStream on: m contentStream) next definitions] then the definition will be read from the sources instead of the binary snapshot, and you'll get the correct source code. First I disabled all the ZipPlugin primitives to see if those are responsible for this issue, but they turned out to be okay. Then I dag into DataStream, and I came to the conclusion that the issue is in BitBlt. The mangled characters appear when PositionableStream >> #nextWordsInto: applies some BitBlt magic to convert the read bytes into a WideString. Here's a snippet triggering the error: | wideString source pos blt expectedWideString | source := #[1 64 255 14 1 64 48 251]. expectedWideString := WideString fromByteArray: source. wideString := WideString new: source size // 4. pos := 0. blt := (BitBlt toForm: (Form new hackBits: wideString)) sourceForm: (Form new hackBits: source). blt combinationRule: Form over; sourceX: 0; sourceY: pos // 4; height: wideString byteSize // 4; width: 4; destX: 0; destY: 0; copyBits. wideString restoreEndianness. self assert: wideString = expectedWideString Levente From nicolas.cellier.aka.nice at gmail.com Thu Mar 31 05:42:59 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Mar 31 05:43:02 2016 Subject: [Vm-dev] 64-bit WideString access (was [squeak-dev] New Cog VMs available) In-Reply-To: References: Message-ID: I have a change where I massively decalred the bitblt operands as unsigned int. I did not push it so far, but I'll try to see if it solves the symptoms. 2016-03-31 3:16 GMT+02:00 Levente Uzonyi : > Hi Eliot, > > I made a snippet to read the source of the method as an array of integers > from the .mcz in the package cache: > > (MCMczReader versionFromFile: 'package-cache/Multilingual-ul.210.mcz') > snapshot definitions > detect: [ :each | > each isMethodDefinition > and: [ each className = #JapaneseEnvironment > and: [ each selector = #flapTabTextFor:in: > ] ] ] > ifFound: [ :definition | > Array streamContents: [ :stream | > | source | > source := definition source. > 1 to: source size do: [ :index | > stream nextPut: (source basicAt: index) ] > ] ] > ifNone: [ self error ] > > In MCMczReader >> #loadDefinitions, if you change this line > > [:m | [^definitions := (DataStream on: m contentStream) > next definitions] > > to this > > [:m | [ self error. ^definitions := (DataStream on: m > contentStream) next definitions] > > then the definition will be read from the sources instead of the binary > snapshot, and you'll get the correct source code. > > First I disabled all the ZipPlugin primitives to see if those are > responsible for this issue, but they turned out to be okay. > Then I dag into DataStream, and I came to the conclusion that the issue is > in BitBlt. The mangled characters appear when PositionableStream >> > #nextWordsInto: applies some BitBlt magic to convert the read bytes into a > WideString. > > Here's a snippet triggering the error: > > | wideString source pos blt expectedWideString | > source := #[1 64 255 14 1 64 48 251]. > expectedWideString := WideString fromByteArray: source. > wideString := WideString new: source size // 4. > pos := 0. > blt := (BitBlt > toForm: (Form new hackBits: wideString)) > sourceForm: (Form new hackBits: source). > blt > combinationRule: Form over; > sourceX: 0; > sourceY: pos // 4; > height: wideString byteSize // 4; > width: 4; > destX: 0; > destY: 0; > copyBits. > wideString restoreEndianness. > self assert: wideString = expectedWideString > > Levente > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160331/3024d773/attachment.htm From Marcel.Taeumel at hpi.de Thu Mar 31 06:45:28 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Mar 31 07:15:55 2016 Subject: [squeak-dev] Clean-up Debugger code Message-ID: <1459406728811-4887530.post@n4.nabble.com> Hi, there! Projects (partially) govern the way processes are used in the user interface. Wouldn't it make sense to move the *Morphic and *ST80 extensions from the Debugger class to MorphicProject resp. MVCProject? For example, there is already the call "Project resumeProcess: processToResume" in Debugger >> #morphicResumeProcess:. The debugger is good in stepping a suspended process but the circumstances of that particular process is known only to the current project. This would clean up some Debugger code. :-) Best, Marcel -- View this message in context: http://forum.world.st/Clean-up-Debugger-code-tp4887530.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Mar 31 11:05:32 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 31 11:05:35 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1095.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1095.mcz ==================== Summary ==================== Name: Morphic-mt.1095 Author: mt Time: 31 March 2016, 1:04:44.478525 pm UUID: 277ef4bb-1fb5-40a2-b443-1d0555ebc707 Ancestors: Morphic-kfr.1094 Make it possible that new-style balloon morphs can appear also at the morph's center and not only close to the hand position. Also adds the possibility to open multiple balloon morphs at once via subsequent calls to Morph >> #showBalloon. =============== Diff against Morphic-kfr.1094 =============== Item was added: + ----- Method: BalloonMorph>>popUp (in category 'initialization') ----- + popUp + + | w worldBounds | + + target ifNil: [^ self]. + target isInWorld ifFalse: [^ self]. + + w := target world. + + self lock. + self fullBounds. "force layout" + self setProperty: #morphicLayerNumber toValue: self morphicLayerNumber. + "So that if the translation below makes it overlap the receiver, it won't + interfere with the rootMorphsAt: logic and hence cause flashing. Without + this, flashing happens, believe me!!" + ((worldBounds := w bounds) containsRect: self bounds) ifFalse: + [self bounds: (self bounds translatedToBeWithin: worldBounds)]. + + self openInWorld. + w activeHand addBalloonHelp: self. + ! Item was changed: ----- Method: BalloonMorph>>popUpForHand: (in category 'initialization') ----- popUpForHand: aHand "Pop up the receiver as balloon help for the given hand" | worldBounds | self lock. self fullBounds. "force layout" self setProperty: #morphicLayerNumber toValue: self morphicLayerNumber. aHand world addMorphFront: self. "So that if the translation below makes it overlap the receiver, it won't interfere with the rootMorphsAt: logic and hence cause flashing. Without this, flashing happens, believe me!!" ((worldBounds := aHand world bounds) containsRect: self bounds) ifFalse: [self bounds: (self bounds translatedToBeWithin: worldBounds)]. + aHand resetBalloonHelp: self. - aHand balloonHelp: self. ! Item was added: + ----- Method: HandMorph>>addBalloonHelp: (in category 'balloon help') ----- + addBalloonHelp: aBalloonMorph + "Associate a new balloon morph with this hand." + + aBalloonMorph ifNotNil: [:m | self balloonHelpList add: m].! Item was removed: - ----- Method: HandMorph>>balloonHelp (in category 'balloon help') ----- - balloonHelp - "Return the balloon morph associated with this hand" - ^self valueOfProperty: #balloonHelpMorph! Item was removed: - ----- Method: HandMorph>>balloonHelp: (in category 'balloon help') ----- - balloonHelp: aBalloonMorph - "Return the balloon morph associated with this hand" - | oldHelp | - oldHelp := self balloonHelp. - oldHelp ifNotNil:[oldHelp delete]. - aBalloonMorph - ifNil:[self removeProperty: #balloonHelpMorph] - ifNotNil:[self setProperty: #balloonHelpMorph toValue: aBalloonMorph]! Item was added: + ----- Method: HandMorph>>balloonHelpList (in category 'balloon help') ----- + balloonHelpList + "Return all balloon morphs associated with this hand" + + ^ self + valueOfProperty: #balloonHelpMorphs + ifAbsentPut: [OrderedCollection new]! Item was changed: ----- Method: HandMorph>>deleteBalloonTarget: (in category 'balloon help') ----- deleteBalloonTarget: aMorph + "Delete any existing balloon help." - "Delete any existing balloon help. This is now done unconditionally, whether or not the morph supplied is the same as the current balloon target" + self balloonHelpList + do: [:ea | ea delete]; + removeAll.! - self balloonHelp: nil - - " | h | - h := self balloonHelp ifNil: [^ self]. - h balloonOwner == aMorph ifTrue: [self balloonHelp: nil]"! Item was added: + ----- Method: HandMorph>>resetBalloonHelp: (in category 'balloon help') ----- + resetBalloonHelp: aBalloonMorph + "Associate a new balloon morph with this hand. Remove all other ones." + + self + deleteBalloonTarget: nil; + addBalloonHelp: aBalloonMorph.! Item was added: + ----- Method: Morph>>showBalloon (in category 'halos and balloon help') ----- + showBalloon + + self showBalloon: self balloonText.! Item was changed: ----- Method: Morph>>showBalloon: (in category 'halos and balloon help') ----- showBalloon: msgString + "Pop up a balloon containing the given string." + + self isInWorld ifFalse: [^ self]. + (msgString isNil or: [msgString isEmpty]) ifTrue: [^ self]. + + (self balloonMorphClass + string: msgString + for: self balloonHelpAligner) + popUp.! - "Pop up a balloon containing the given string, - first removing any existing BalloonMorphs in the world." - | w | - self showBalloon: msgString hand: ((w := self world) ifNotNil:[w activeHand]).! Item was changed: ----- Method: Morph>>showBalloon:hand: (in category 'halos and balloon help') ----- showBalloon: msgString hand: aHand + "Pop up a balloon containing the given string. Note that any existing BalloonMorphs will be removed from the world." - "Pop up a balloon containing the given string, - first removing any existing BalloonMorphs in the world." + | balloon | + self isInWorld ifFalse: [^ self]. + + balloon := (self balloonMorphClass - | w balloon h | - (w := self world) ifNil: [^ self]. - h := aHand. - h ifNil:[ - h := w activeHand]. - balloon := self balloonMorphClass string: msgString + for: self balloonHelpAligner). + + balloon + popUpFor: self + hand: (aHand ifNil: [self world activeHand]).! - for: self balloonHelpAligner. - balloon popUpFor: self hand: h.! Item was added: + ----- Method: NewBalloonMorph>>popUp (in category 'initialization') ----- + popUp + "No tail. Centered in the balloon owner. Do not remove other balloon helps." + + | w | + self balloonOwner ifNil: [^ self]. + self balloonOwner isInWorld ifFalse: [^ self]. + + w := self balloonOwner world. + + self hasTail: false. + self center: self balloonOwner center. + self bounds: (self bounds translatedToBeWithin: w bounds). + + w activeHand addBalloonHelp: self. + self openInWorld.! Item was changed: ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') ----- popUpAt: point forHand: aHand "Pop up the receiver as balloon help for the given hand" #(bottomLeft topLeft bottomRight topRight) detect: [:nextOrientation | | pointWithOffset | self orientation: nextOrientation. pointWithOffset := point + self tailOffset. self move: pointWithOffset. self bounds: (self bounds translatedToBeWithin: aHand world bounds). (self bounds perform: self orientation) = pointWithOffset] ifNone: ["Keep last try."]. aHand world addMorphFront: self. + aHand resetBalloonHelp: self.! - aHand balloonHelp: self.! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'Editor initialize. + + SystemWindow allSubInstancesDo: [:ea | + ea paneMorphs do: #comeToFront. + ea labelArea comeToFront]. + + HandMorph allInstancesDo: [:hand | + hand removeProperty: #balloonHelpMorph].'! - (PackageInfo named: 'Morphic') postscript: 'Editor initialize.'! From lewis at mail.msen.com Thu Mar 31 12:51:01 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 31 12:51:03 2016 Subject: [squeak-dev] Clean-up Debugger code In-Reply-To: <1459406728811-4887530.post@n4.nabble.com> References: <1459406728811-4887530.post@n4.nabble.com> Message-ID: <20160331125101.GA57677@shell.msen.com> On Wed, Mar 30, 2016 at 11:45:28PM -0700, marcel.taeumel wrote: > Hi, there! > > Projects (partially) govern the way processes are used in the user > interface. > > Wouldn't it make sense to move the *Morphic and *ST80 extensions from the > Debugger class to MorphicProject resp. MVCProject? > > For example, there is already the call "Project resumeProcess: > processToResume" in Debugger >> #morphicResumeProcess:. > > The debugger is good in stepping a suspended process but the circumstances > of that particular process is known only to the current project. > > This would clean up some Debugger code. :-) > Hi Marcel, Yes I think this would be a good thing to do. The #morphicResumeProcess: and #mvcResumeProcess methods are still in Debugger, but the only reason for this is I was not able to find a clean way to move them to MorphicProject and MVCProject. But my interest at that time was mainly to make MVC (and hopefully Morphic) be unloadable and reloadable, and maybe I just did not try hard enough to get the refactoring right in this case. So if you can make it work, that would be great :-) Dave From commits at source.squeak.org Thu Mar 31 19:44:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 31 19:44:04 2016 Subject: [squeak-dev] The Inbox: Graphics-cmm.329.mcz Message-ID: A new version of Graphics was added to project The Inbox: http://source.squeak.org/inbox/Graphics-cmm.329.mcz ==================== Summary ==================== Name: Graphics-cmm.329 Author: cmm Time: 31 March 2016, 2:43:44.434481 pm UUID: a7a78301-477c-40ea-b010-c4e71c02a038 Ancestors: Graphics-tfel.328 Fix the green clone halo morph for SketchMorphs to not share its underlying Form. =============== Diff against Graphics-tfel.328 =============== Item was removed: - ----- Method: Form>>veryDeepCopyWith: (in category 'copying') ----- - veryDeepCopyWith: deepCopier - "Return self. I am immutable in the Morphic world. Do not record me." - ^ self! From Das.Linux at gmx.de Thu Mar 31 19:58:05 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 31 19:58:09 2016 Subject: [squeak-dev] The Inbox: Graphics-cmm.329.mcz Message-ID: On 31.03.2016, at 19:43, commits@source.squeak.org wrote: > A new version of Graphics was added to project The Inbox: > http://source.squeak.org/inbox/Graphics-cmm.329.mcz > > ==================== Summary ==================== > > Name: Graphics-cmm.329 > Author: cmm > Time: 31 March 2016, 2:43:44.434481 pm > UUID: a7a78301-477c-40ea-b010-c4e71c02a038 > Ancestors: Graphics-tfel.328 > > Fix the green clone halo morph for SketchMorphs to not share its underlying Form. > > =============== Diff against Graphics-tfel.328 =============== > > Item was removed: > - ----- Method: Form>>veryDeepCopyWith: (in category 'copying') ----- > - veryDeepCopyWith: deepCopier > - "Return self. I am immutable in the Morphic world. Do not record me." > - ^ self! > I'm a bit curious how this quite broad change is only affecting the quite narrow use case of green clone halo of SketchMorphs. Care to explain? Best -Tobias From nicolas.cellier.aka.nice at gmail.com Thu Mar 31 20:00:49 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Mar 31 20:00:51 2016 Subject: [Vm-dev] 64-bit WideString access (was [squeak-dev] New Cog VMs available) In-Reply-To: References: Message-ID: OK, declaring a few 'unsigned int' in BitBltSimulation suffices to make the problem disappear on SqueakCogSpur64 MacOSX, I'll publish this evening. 2016-03-31 7:42 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > I have a change where I massively decalred the bitblt operands as unsigned > int. > I did not push it so far, but I'll try to see if it solves the symptoms. > > 2016-03-31 3:16 GMT+02:00 Levente Uzonyi : > >> Hi Eliot, >> >> I made a snippet to read the source of the method as an array of integers >> from the .mcz in the package cache: >> >> (MCMczReader versionFromFile: 'package-cache/Multilingual-ul.210.mcz') >> snapshot definitions >> detect: [ :each | >> each isMethodDefinition >> and: [ each className = #JapaneseEnvironment >> and: [ each selector = >> #flapTabTextFor:in: ] ] ] >> ifFound: [ :definition | >> Array streamContents: [ :stream | >> | source | >> source := definition source. >> 1 to: source size do: [ :index | >> stream nextPut: (source basicAt: index) ] >> ] ] >> ifNone: [ self error ] >> >> In MCMczReader >> #loadDefinitions, if you change this line >> >> [:m | [^definitions := (DataStream on: m contentStream) >> next definitions] >> >> to this >> >> [:m | [ self error. ^definitions := (DataStream on: m >> contentStream) next definitions] >> >> then the definition will be read from the sources instead of the binary >> snapshot, and you'll get the correct source code. >> >> First I disabled all the ZipPlugin primitives to see if those are >> responsible for this issue, but they turned out to be okay. >> Then I dag into DataStream, and I came to the conclusion that the issue >> is in BitBlt. The mangled characters appear when PositionableStream >> >> #nextWordsInto: applies some BitBlt magic to convert the read bytes into a >> WideString. >> >> Here's a snippet triggering the error: >> >> | wideString source pos blt expectedWideString | >> source := #[1 64 255 14 1 64 48 251]. >> expectedWideString := WideString fromByteArray: source. >> wideString := WideString new: source size // 4. >> pos := 0. >> blt := (BitBlt >> toForm: (Form new hackBits: wideString)) >> sourceForm: (Form new hackBits: source). >> blt >> combinationRule: Form over; >> sourceX: 0; >> sourceY: pos // 4; >> height: wideString byteSize // 4; >> width: 4; >> destX: 0; >> destY: 0; >> copyBits. >> wideString restoreEndianness. >> self assert: wideString = expectedWideString >> >> Levente >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160331/b576e90e/attachment.htm From bert at freudenbergs.de Thu Mar 31 20:16:40 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 31 20:16:47 2016 Subject: [squeak-dev] The Inbox: Graphics-cmm.329.mcz In-Reply-To: References: Message-ID: <9B5A13C0-9E4F-4B48-8DC3-8C591E6676B5@freudenbergs.de> > On 31.03.2016, at 19:43, commits@source.squeak.org wrote: > > A new version of Graphics was added to project The Inbox: > http://source.squeak.org/inbox/Graphics-cmm.329.mcz > > ==================== Summary ==================== > > Name: Graphics-cmm.329 > Author: cmm > Time: 31 March 2016, 2:43:44.434481 pm > UUID: a7a78301-477c-40ea-b010-c4e71c02a038 > Ancestors: Graphics-tfel.328 > > Fix the green clone halo morph for SketchMorphs to not share its underlying Form. Err. The clone handle is *supposed to* not duplicate the form. This is used a lot in Etoys. You can have many players sharing the same bitmap costume. We do *not* want to waste memory duplicating the form. While editing the sketch, we work on a copy of the form (to support canceling). If accepting the painting, *then* we set it to the new form. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160331/cd3aa4d8/smime-0001.bin From commits at source.squeak.org Thu Mar 31 21:55:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 31 21:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160331215504.27412.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-March/009519.html Name: Morphic-mt.1095 Ancestors: Morphic-kfr.1094 Make it possible that new-style balloon morphs can appear also at the morph's center and not only close to the hand position. Also adds the possibility to open multiple balloon morphs at once via subsequent calls to Morph >> #showBalloon. ============================================= From asqueaker at gmail.com Thu Mar 31 23:41:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 31 23:42:11 2016 Subject: [squeak-dev] The Inbox: Graphics-cmm.329.mcz In-Reply-To: <9B5A13C0-9E4F-4B48-8DC3-8C591E6676B5@freudenbergs.de> References: <9B5A13C0-9E4F-4B48-8DC3-8C591E6676B5@freudenbergs.de> Message-ID: Okay, that's why this is in the Inbox. I started to formulate my question in long words in email, but decided this was the quickest and easiest way to ask it. :) Okay, so this is definitely not the place to fix my problem. So I will instead try putting something into SketchMorph's veryDeepFixup: which will ensure its underlying form gets copied when I green-halo a SketchMorph. SketchMorph is an exception because he's a dumb data object, not a "player" who wants to share a costume. -- I was working on an icon, writing scripts to change colors pixel-by-pixel, goofed up my "backup" SketchMorph I had torn off the green halo, only to find I corrupted my original, as well. Some work lost. From commits at source.squeak.org Thu Mar 31 23:52:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 31 23:52:35 2016 Subject: [squeak-dev] The Inbox: Morphic-cmm.1096.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-cmm.1096.mcz ==================== Summary ==================== Name: Morphic-cmm.1096 Author: cmm Time: 31 March 2016, 6:51:58.339232 pm UUID: 5eca2a6b-1d16-4db9-b9f2-c15192428911 Ancestors: Morphic-mt.1095 Fix the green clone halo morph for SketchMorphs to not share its underlying Form. =============== Diff against Morphic-mt.1095 =============== Item was added: + ----- Method: SketchMorph>>veryDeepFixupWith: (in category 'copying') ----- + veryDeepFixupWith: aDeepCopier + super veryDeepFixupWith: aDeepCopier. + originalForm := originalForm copy. + rotatedForm := rotatedForm copy! From asqueaker at gmail.com Thu Mar 31 23:55:05 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 31 23:55:47 2016 Subject: [squeak-dev] The Inbox: Morphic-cmm.1096.mcz In-Reply-To: <56fdb846.2c228c0a.c52e4.6af6SMTPIN_ADDED_MISSING@mx.google.com> References: <56fdb846.2c228c0a.c52e4.6af6SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I decided to do it in veryDeepFixup rather than veryDeepInner because veryDeepInner is pretty much just expected to access or append to the DeepCopier's 'references', and not other stuff. The veryDeepFixup post-op seems appropriate for other stuff. On Thu, Mar 31, 2016 at 6:52 PM, wrote: > A new version of Morphic was added to project The Inbox: > http://source.squeak.org/inbox/Morphic-cmm.1096.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1096 > Author: cmm > Time: 31 March 2016, 6:51:58.339232 pm > UUID: 5eca2a6b-1d16-4db9-b9f2-c15192428911 > Ancestors: Morphic-mt.1095 > > Fix the green clone halo morph for SketchMorphs to not share its underlying Form. > > =============== Diff against Morphic-mt.1095 =============== > > Item was added: > + ----- Method: SketchMorph>>veryDeepFixupWith: (in category 'copying') ----- > + veryDeepFixupWith: aDeepCopier > + super veryDeepFixupWith: aDeepCopier. > + originalForm := originalForm copy. > + rotatedForm := rotatedForm copy! > >