From lewis at mail.msen.com Wed Jun 1 02:14:38 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 1 02:14:41 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> Message-ID: <20160601021438.GA45151@shell.msen.com> On Tue, May 31, 2016 at 06:12:53PM +0200, Levente Uzonyi wrote: > On Tue, 31 May 2016, Chris Muller wrote: > > >>It's an optimization, so it's not mandatory. Of course it's nice to have, > > > >An optimization of what? Execution speed? Is it such an optimization > >that any human could ever possibly notice? Setting the mode of a > >stream, really? > > I suspect that you expect one to set mode at most once per stream, > which is not always the case. > I could easily give you an artificial benchmark showing 30x speedup, but > that would make no sense. > It's a library method and as such, why not make it quicker when possible? > > > > >I like most of your optimizations but, IMO, this one is so > >infinitesmal, I don't think it exceeds the cost of the decreased > >legibility / complexity.. > > Please explain the legibility / complexity part. > I don't think there is any problem with complexity or legibility here. The original use of "collection asByteArray" is very readable. The faster "ByteArray adoptInstance: collection" may require a little more thought, but both are clear enough in this context. That said, in the case of setting a stream to #binary or #ascii, the #adoptInstance: approach does seem fragile compared to #asByteArray. If Behavior>>adoptInstance: fails, the fallback code attempts to use Object>>primitiveChangeClassTo: which also fails, this time with no fallback path. Thus if the primitives for changing the class of an object fail, there is no fallback and it may no longer be possible to write a new binary file (such as new image and changes files). Another way to look at it - if the optimization is worthwhile, maybe it belongs in the Collections package, which already needs to be different for Spur versus V3. For Spur, shouldn't it just be this: ByteString>>asByteArray ByteArray adoptInstance: self I did not really test this, but it should give us the same performance optimization in a more general way. Dave From leves at caesar.elte.hu Wed Jun 1 08:40:09 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Jun 1 08:40:16 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: <20160601021438.GA45151@shell.msen.com> References: <20160530220324.GA27465@shell.msen.com> <20160601021438.GA45151@shell.msen.com> Message-ID: Hi Dave On Tue, 31 May 2016, David T. Lewis wrote: > That said, in the case of setting a stream to #binary or #ascii, the > #adoptInstance: approach does seem fragile compared to #asByteArray. > If Behavior>>adoptInstance: fails, the fallback code attempts to use > Object>>primitiveChangeClassTo: which also fails, this time with no fallback > path. Thus if the primitives for changing the class of an object fail, > there is no fallback and it may no longer be possible to write a new binary > file (such as new image and changes files). You would still get a debugger in such case where you would have a chance to fix/work around the problem, wouldn't you? > > Another way to look at it - if the optimization is worthwhile, maybe it > belongs in the Collections package, which already needs to be different > for Spur versus V3. > > For Spur, shouldn't it just be this: > > ByteString>>asByteArray > ByteArray adoptInstance: self > > I did not really test this, but it should give us the same performance > optimization in a more general way. This would significantly change the behavior, because currently you know that a copy will be returned. We might as well use a different selector (#toByteArray or #beByteArray), but I don't know if that would help V3 images. Levente > > Dave > > > From commits at source.squeak.org Wed Jun 1 10:05:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 10:05:07 2016 Subject: [squeak-dev] The Trunk: Collections-topa.694.mcz Message-ID: Tobias Pape uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-topa.694.mcz ==================== Summary ==================== Name: Collections-topa.694 Author: topa Time: 1 June 2016, 12:04:48.190653 pm UUID: b7698582-d2b0-4c81-b338-63705fd800ab Ancestors: Collections-mt.693 provide some sample text in Text =============== Diff against Collections-mt.693 =============== Item was added: + ----- Method: Text class>>THEQUICKBROWNFOX (in category 'filler text') ----- + THEQUICKBROWNFOX + + ^ self fromString: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'! Item was added: + ----- Method: Text class>>allDigits (in category 'filler text') ----- + allDigits + + ^ self fromString: '0123456789'! Item was added: + ----- Method: Text class>>hamburgefonstiv (in category 'filler text') ----- + hamburgefonstiv + + ^ self fromString: 'Hamburgefonstiv'! Item was added: + ----- Method: Text class>>loremIpsum (in category 'filler text') ----- + loremIpsum + + ^ self fromString: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.'! Item was added: + ----- Method: Text class>>symbolSample (in category 'filler text') ----- + symbolSample + + ^ self streamContents: [:stream | | lineLength character| + lineLength := 0. + 33 to: 255 do:[ :index | + character := stream nextPut: (Character value: index). + lineLength := lineLength + 1. + (('@Z`z' includes: character) or: [lineLength >= 30]) + ifTrue: [ + lineLength :=0. + stream cr]]]! Item was added: + ----- Method: Text class>>textSample (in category 'filler text') ----- + textSample + + ^ self streamContents: [:stream | + stream + nextPutAll: self hamburgefonstiv; cr; + nextPutAll: self theQuickBrownFox; cr; + nextPutAll: self THEQUICKBROWNFOX; cr; cr; + nextPutAll: self allDigits; cr; cr; + nextPutAll: self loremIpsum]! Item was added: + ----- Method: Text class>>theQuickBrownFox (in category 'filler text') ----- + theQuickBrownFox + + ^ self fromString: 'the quick brown fox jumps over the lazy dog'! From commits at source.squeak.org Wed Jun 1 10:07:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 10:07:13 2016 Subject: [squeak-dev] The Trunk: Graphics-topa.340.mcz Message-ID: Tobias Pape uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-topa.340.mcz ==================== Summary ==================== Name: Graphics-topa.340 Author: topa Time: 1 June 2016, 12:06:46.38159 pm UUID: 31a4dc33-1d42-4817-bdeb-08b727a63d52 Ancestors: Graphics-bf.339 All fonts should know whether they have a glyph. Also, provide a sample text styled with a font. =============== Diff against Graphics-bf.339 =============== Item was added: + ----- Method: AbstractFont>>basicHasGlyphOf: (in category 'testing') ----- + basicHasGlyphOf: aCharacter + + self subclassResponsibility! Item was added: + ----- Method: AbstractFont>>hasGlyphOf: (in category 'testing') ----- + hasGlyphOf: aCharacter + + ^ self basicHasGlyphOf: aCharacter! Item was added: + ----- Method: AbstractFont>>sampleText (in category 'example') ----- + sampleText + + | text | + text := (self isSymbolFont or: [(self basicHasGlyphOf: $a) not]) + ifTrue: [Text symbolSample] + ifFalse: [Text textSample]. + text addAttribute: (TextFontReference toFont: self). + ^ text! Item was added: + ----- Method: FixedFaceFont>>basicHasGlyphOf: (in category 'private') ----- + basicHasGlyphOf: aCharacter + + " We present the same for any character, so, yes" + ^ true! Item was added: + ----- Method: StrikeFont>>basicHasGlyphOf: (in category 'multibyte character methods') ----- + basicHasGlyphOf: aCharacter + + ^ self hasGlyphForCode: (self codeForCharacter: aCharacter) + ! Item was removed: - ----- Method: StrikeFont>>hasGlyphOf: (in category 'multibyte character methods') ----- - hasGlyphOf: aCharacter - - ^self hasGlyphForCode: (self codeForCharacter: aCharacter) - ! From commits at source.squeak.org Wed Jun 1 10:08:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 10:08:38 2016 Subject: [squeak-dev] The Trunk: Morphic-topa.1155.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.1155.mcz ==================== Summary ==================== Name: Morphic-topa.1155 Author: topa Time: 1 June 2016, 12:07:52.187561 pm UUID: 7b8792c9-7a3f-4c43-85a7-18d40734b624 Ancestors: Morphic-mt.1154 Let the fonts provide their sample =============== Diff against Morphic-mt.1154 =============== Item was changed: ----- Method: FontChooserTool>>contents (in category 'toolbuilder') ----- contents + + ^ self selectedFont + ifNil: [Text new] + ifNotNil: [:font | font sampleText]! - | sample i c f | - sample := WriteStream on: ''. - f := self selectedFont ifNil:[^Text new]. - f isSymbolFont ifFalse:[ - sample - nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; - nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; - nextPutAll: '0123456789'; cr; cr; - nextPutAll: - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, - sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. Ut enim ad minim veniam, quis nostrud - exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur - sint occaecat cupidatat non proident, sunt in culpa qui - officia deserunt mollit anim id est laborum.' - ] ifTrue:[ - i := 0. - 33 to: 255 do:[:ci | - sample nextPut: (c:=Character value: ci). - i := i + 1. - (('@Z`z' includes:c) or:[i = 30]) - ifTrue:[i :=0. sample cr]]. - ]. - sample := sample contents asText. - sample addAttribute: (TextFontReference toFont: f). - ^sample! Item was changed: ----- Method: FontImporterTool>>previewText (in category 'model access') ----- previewText + + ^ self selectedFont + ifNil: [Text new] + ifNotNil: [:font | font sampleText]! - | sample i c f | - sample := WriteStream on: ''. - f := self selectedFont ifNil:[^Text new]. - (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ - sample - nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; - nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; - nextPutAll: '0123456789'; cr; cr; - nextPutAll: - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, - sed do eiusmod tempor incididunt ut labore et dolore - magna aliqua. Ut enim ad minim veniam, quis nostrud - exercitation ullamco laboris nisi ut aliquip ex ea commodo - consequat. Duis aute irure dolor in reprehenderit in voluptate - velit esse cillum dolore eu fugiat nulla pariatur. Excepteur - sint occaecat cupidatat non proident, sunt in culpa qui - officia deserunt mollit anim id est laborum.' - ] ifTrue:[ - i := 0. - 33 to: 255 do:[:ci | - sample nextPut: (c:=Character value: ci). - i := i + 1. - (('@Z`z' includes:c) or:[i = 30]) - ifTrue:[i :=0. sample cr]]. - ]. - sample := sample contents asText. - sample addAttribute: (TextFontReference toFont: f). - ^sample! From commits at source.squeak.org Wed Jun 1 10:10:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 10:10:06 2016 Subject: [squeak-dev] The Trunk: Multilingual-topa.213.mcz Message-ID: Tobias Pape uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-topa.213.mcz ==================== Summary ==================== Name: Multilingual-topa.213 Author: topa Time: 1 June 2016, 12:09:52.450255 pm UUID: 3b6d0aef-b027-4adc-8442-10f00e2eaeb2 Ancestors: Multilingual-pre.212 All fonts should know whether they have a glyph. =============== Diff against Multilingual-pre.212 =============== Item was added: + ----- Method: StrikeFontSet>>basicHasGlyphOf: (in category 'private') ----- + basicHasGlyphOf: aCharacter + + | actualFont | + actualFont := self fontOf: aCharacter ifAbsent: [^ false]. + ^ actualFont basicHasGlyphOf: aCharacter! From commits at source.squeak.org Wed Jun 1 10:11:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 10:11:14 2016 Subject: [squeak-dev] The Trunk: TrueType-topa.42.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.42.mcz ==================== Summary ==================== Name: TrueType-topa.42 Author: topa Time: 1 June 2016, 12:11:05.54556 pm UUID: d19fb495-4371-456b-8551-ab05a789f105 Ancestors: TrueType-topa.41 All fonts should know whether they have a glyph. For the way TT fonts currently work, this information is tricky to get, tho. =============== Diff against TrueType-topa.41 =============== Item was added: + ----- Method: TTCFont>>basicHasGlyphOf: (in category 'private') ----- + basicHasGlyphOf: aCharacter + "Answer whether this font includes a glyph for the given character" + ^ aCharacter charCode <= self maxAscii + and:[ + aCharacter = Character null + ifTrue: [(self formOf: aCharacter) notNil] + ifFalse: [ + "this should also be + (self formOf: aCharacter) notNil + but it does not work, the fallback glyph -- if present -- is always found instead. + So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." + (self characterFormAt: aCharacter) bits ~= self fallbackForm bits]]! Item was changed: ----- Method: TTCFont>>hasGlyphOf: (in category 'private') ----- hasGlyphOf: aCharacter + "Answer whether this font includes a glyph for the given character (or a fallback)" + self flag: #topa. "formOf: never actually returns nil for ttcfonts..." - "Answer whether this font includes a glyph for the given character" ^ aCharacter charCode <= self maxAscii and:[(self formOf: aCharacter) notNil]! Item was added: + ----- Method: TTCFontSet>>basicHasGlyphOf: (in category 'private') ----- + basicHasGlyphOf: aCharacter + "see TTCFont>>hasGlyphOf:" + ^ fontArray first basicHasGlyphOf: aCharacter! Item was added: + ----- Method: TTCFontSet>>hasGlyphOf: (in category 'private') ----- + hasGlyphOf: aCharacter + "see TTCFont>>hasGlyphOf:" + ^ fontArray first hasGlyphOf: aCharacter! From Marcel.Taeumel at hpi.de Wed Jun 1 09:57:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 10:35:27 2016 Subject: [squeak-dev] Re: New Window and Focus related preferences In-Reply-To: References: Message-ID: <1464775064305-4898567.post@n4.nabble.com> Hi, there. #mouseOverForKeyboardFocus is still there and works as before. Tobias just noticed an inconsistency when [x] Windows' Contents Are Always Active [ ] mouseOverForKeyboardFocus Because the window colors adapt to the current mouse position but the widgets *inside* an window do not automatically get focus. Tobias especially noticed that in combination with text morphs. I started typing and nothing happened. Best, Marcel -- View this message in context: http://forum.world.st/New-Window-and-Focus-related-preferences-tp4898424p4898567.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Jun 1 10:01:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 10:39:25 2016 Subject: [squeak-dev] Re: How do I debug the debugger? In-Reply-To: <155089c04f6.ba158c067394.7504195611692703438@zoho.com> References: <1550880e766.cb36eb857079.415252399705242259@zoho.com> <155089c04f6.ba158c067394.7504195611692703438@zoho.com> Message-ID: <1464775302528-4898568.post@n4.nabble.com> Hi, Timothy. I would start by comparing method source code. Has the 64-bit version the same update map? What is the difference between a 32-bit trunk image with the latest update and a 64-bit trunk image with the latest update? Not sure how to diff this, though.... :-/ Best, Marcel -- View this message in context: http://forum.world.st/How-do-I-debug-the-debugger-tp4898435p4898568.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Wed Jun 1 10:46:58 2016 From: gettimothy at zoho.com (gettimothy) Date: Wed Jun 1 10:47:03 2016 Subject: [squeak-dev] Re: How do I debug the debugger? In-Reply-To: <1464775302528-4898568.post@n4.nabble.com> References: <1550880e766.cb36eb857079.415252399705242259@zoho.com> <155089c04f6.ba158c067394.7504195611692703438@zoho.com> <1464775302528-4898568.post@n4.nabble.com> Message-ID: <1550b92ce62.ac9bda2b75.8792648368312548204@zoho.com> Hi Marcel. Where do I get this update map? thx. tty ---- On Wed, 01 Jun 2016 06:01:42 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- Hi, Timothy. I would start by comparing method source code. Has the 64-bit version the same update map? What is the difference between a 32-bit trunk image with the latest update and a 64-bit trunk image with the latest update? Not sure how to diff this, though.... :-/ Best, Marcel -- View this message in context: http://forum.world.st/How-do-I-debug-the-debugger-tp4898435p4898568.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/20160601/3d8668f4/attachment.htm From bert at freudenbergs.de Wed Jun 1 10:47:53 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 1 10:47:56 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> Message-ID: <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> The predominant style in Squeak historically has been coll do: [:each | each do something] Ken Beck uses that in his ?Best Practice Patterns? too. It?s also produced by our formatter (but we rarely use that because it introduces weird line breaks). I prefer this style because it seems to be most readable. I agree with Chris about selectability, but I?d rather fix our double-click selection logic than make the code look weird. Double-clicking on ?:foo? should only select ?foo?. - Bert - > On 31.05.2016, at 23:58, Chris Muller wrote: > > By "everywhere" I assume you mean the ones just inside my brackets? > When block arguments are written without a space between the colon and > variable name, like this: > > coll do: [:each|each do something] > > then I can't simply double-click the "each" declaration and then use > Cmd+g to find further occurrences, because double-clicking it also > selects the colon. > > So, I could write: > > coll do: [: each|each do something] > > but it looks strange to me. > > But also for easier expression editing. With no space, it is harder > to select the inner expression via double clicking just inside the > opening bracket; because a space there affords the user more width to > hit the expression than the narrow colon. > > This effect can be verified on a computer with touch pad with > **separate buttons** (e.g., able to double-click without moving the > mouse even one pixel). 1) put a space there, 2) place mouse about > halfway into width of the space. 3) Without touching touch pad, > double-click to ensure expression is selected. 4) Now single-click to > deselect expression. 5) Now press [Delete] to delete the space. 6) > Without touching touch pad, again double-click in the exact same spot. > The colon is selected instead of the expression. > > On Tue, May 31, 2016 at 4:42 PM, Tobias Pape wrote: >> >> On 31.05.2016, at 21:26, commits@source.squeak.org wrote: >> >> >>> Item was changed: >>> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- >>> + drawBalloonTextOn: aCanvas >>> - drawBalloonTextOn: aCanvas >>> "Show balloon text in the text morph if it has no contents." >>> + textMorph contents ifNotEmpty: [ ^ self ]. >>> + ([ self balloonText ] >>> + on: Error >>> + do: [ : err | 'error in balloonText' ]) ifNotNil: >>> + [ : text | aCanvas >>> - >>> - textMorph contents ifNotEmpty: [^ self]. >>> - >>> - self balloonText ifNotNil: [:text | >>> - aCanvas >>> drawString: text >>> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0)) >>> + font: textMorph textStyle defaultFont "I want italic here" >>> + color: (Color gray: 0.7) ]! >>> - in: (self innerBounds insetBy: (5@2 corner: 0@0)) >>> - font: textMorph textStyle defaultFont >>> - color: (Color gray: 0.7)].! >> >> Just curious, why are you adding spaces everywhere? >> :) >> Best regards >> -toibas > -------------- 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/20160601/244eed74/smime.bin From leves at caesar.elte.hu Wed Jun 1 10:53:07 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Jun 1 10:53:13 2016 Subject: [squeak-dev] Re: How do I debug the debugger? In-Reply-To: <1464775302528-4898568.post@n4.nabble.com> References: <1550880e766.cb36eb857079.415252399705242259@zoho.com> <155089c04f6.ba158c067394.7504195611692703438@zoho.com> <1464775302528-4898568.post@n4.nabble.com> Message-ID: There's no 64-bit update map. 64-bit images use exactly the same code as 32-bit images do. Levente On Wed, 1 Jun 2016, marcel.taeumel wrote: > Hi, Timothy. > > I would start by comparing method source code. Has the 64-bit version the > same update map? What is the difference between a 32-bit trunk image with > the latest update and a 64-bit trunk image with the latest update? Not sure > how to diff this, though.... :-/ > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/How-do-I-debug-the-debugger-tp4898435p4898568.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From lists at fniephaus.com Wed Jun 1 11:27:45 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed Jun 1 11:27:59 2016 Subject: [squeak-dev] `2 raisedTo: 100000000` crashes VM Message-ID: Hi all, We just found out that the VM crashes when trying to build very large integers. I'm not sure what could cause the problem... Best, Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/65ec0aa7/attachment.htm From bert at freudenbergs.de Wed Jun 1 11:43:01 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 1 11:43:05 2016 Subject: [squeak-dev] Re: `2 raisedTo: 100000000` crashes VM In-Reply-To: References: Message-ID: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> On 01.06.2016, at 13:27, Fabio Niephaus wrote: > > Hi all, > > We just found out that the VM crashes when trying to build very large integers. > I'm not sure what could cause the problem... Maybe largeIntgrowTo doesn?t check the size? Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x9b5fa572 __pthread_kill + 10 1 libsystem_pthread.dylib 0x91403654 pthread_kill + 101 2 libsystem_c.dylib 0x93dddc34 abort + 156 3 org.squeak.Squeak$(VM_MONIKER) 0x00139db9 sigsegv + 175 4 libsystem_platform.dylib 0x9e4bd79b _sigtramp + 43 5 ??? 0xffffffff 0 + 4294967295 6 org.squeak.Squeak$(VM_MONIKER) 0x00139d0a getCrashDumpFilenameInto + 82 7 org.squeak.Squeak$(VM_MONIKER) 0x00177262 largeIntgrowTo + 107 8 org.squeak.Squeak$(VM_MONIKER) 0x001771f1 normalizePositive + 190 9 org.squeak.Squeak$(VM_MONIKER) 0x0017678c primDigitMultiplyNegative + 597 10 ??? 0x04cb4cc8 0 + 80432328 11 org.squeak.Squeak$(VM_MONIKER) 0x000c203a interpret + 741 - 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/20160601/77136501/smime.bin From bert at freudenbergs.de Wed Jun 1 12:29:45 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 1 12:29:49 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> Message-ID: <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> > On 01.06.2016, at 13:43, Bert Freudenberg wrote: > > On 01.06.2016, at 13:27, Fabio Niephaus wrote: >> >> Hi all, >> >> We just found out that the VM crashes when trying to build very large integers. >> I'm not sure what could cause the problem... > > Maybe largeIntgrowTo doesn?t check the size? > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > 0 libsystem_kernel.dylib 0x9b5fa572 __pthread_kill + 10 > 1 libsystem_pthread.dylib 0x91403654 pthread_kill + 101 > 2 libsystem_c.dylib 0x93dddc34 abort + 156 > 3 org.squeak.Squeak$(VM_MONIKER) 0x00139db9 sigsegv + 175 > 4 libsystem_platform.dylib 0x9e4bd79b _sigtramp + 43 > 5 ??? 0xffffffff 0 + 4294967295 > 6 org.squeak.Squeak$(VM_MONIKER) 0x00139d0a getCrashDumpFilenameInto + 82 > 7 org.squeak.Squeak$(VM_MONIKER) 0x00177262 largeIntgrowTo + 107 > 8 org.squeak.Squeak$(VM_MONIKER) 0x001771f1 normalizePositive + 190 > 9 org.squeak.Squeak$(VM_MONIKER) 0x0017678c primDigitMultiplyNegative + 597 > 10 ??? 0x04cb4cc8 0 + 80432328 > 11 org.squeak.Squeak$(VM_MONIKER) 0x000c203a interpret + 741 > > > - Bert - Btw it worked fine in the interpreter and Cog. - 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/20160601/c46a9475/smime.bin From karlramberg at gmail.com Wed Jun 1 13:22:45 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed Jun 1 13:22:49 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: On Wed, Jun 1, 2016 at 12:47 PM, Bert Freudenberg wrote: > The predominant style in Squeak historically has been > > coll do: [:each | each do something] > > Ken Beck uses that in his ?Best Practice Patterns? too. It?s also produced > by our formatter (but we rarely use that because it introduces weird line > breaks). > > I prefer this style because it seems to be most readable. > > I agree with Chris about selectability, but I?d rather fix our > double-click selection logic than make the code look weird. Double-clicking > on ?:foo? should only select ?foo?. > > - Bert - > Or search could ignore leading colon Best, Karl > > > > On 31.05.2016, at 23:58, Chris Muller wrote: > > > > By "everywhere" I assume you mean the ones just inside my brackets? > > When block arguments are written without a space between the colon and > > variable name, like this: > > > > coll do: [:each|each do something] > > > > then I can't simply double-click the "each" declaration and then use > > Cmd+g to find further occurrences, because double-clicking it also > > selects the colon. > > > > So, I could write: > > > > coll do: [: each|each do something] > > > > but it looks strange to me. > > > > But also for easier expression editing. With no space, it is harder > > to select the inner expression via double clicking just inside the > > opening bracket; because a space there affords the user more width to > > hit the expression than the narrow colon. > > > > This effect can be verified on a computer with touch pad with > > **separate buttons** (e.g., able to double-click without moving the > > mouse even one pixel). 1) put a space there, 2) place mouse about > > halfway into width of the space. 3) Without touching touch pad, > > double-click to ensure expression is selected. 4) Now single-click to > > deselect expression. 5) Now press [Delete] to delete the space. 6) > > Without touching touch pad, again double-click in the exact same spot. > > The colon is selected instead of the expression. > > > > On Tue, May 31, 2016 at 4:42 PM, Tobias Pape wrote: > >> > >> On 31.05.2016, at 21:26, commits@source.squeak.org wrote: > >> > >> > >>> Item was changed: > >>> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category > 'drawing') ----- > >>> + drawBalloonTextOn: aCanvas > >>> - drawBalloonTextOn: aCanvas > >>> "Show balloon text in the text morph if it has no contents." > >>> + textMorph contents ifNotEmpty: [ ^ self ]. > >>> + ([ self balloonText ] > >>> + on: Error > >>> + do: [ : err | 'error in balloonText' ]) ifNotNil: > >>> + [ : text | aCanvas > >>> - > >>> - textMorph contents ifNotEmpty: [^ self]. > >>> - > >>> - self balloonText ifNotNil: [:text | > >>> - aCanvas > >>> drawString: text > >>> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 > @ 0)) > >>> + font: textMorph textStyle defaultFont "I want > italic here" > >>> + color: (Color gray: 0.7) ]! > >>> - in: (self innerBounds insetBy: (5@2 corner: 0@0 > )) > >>> - font: textMorph textStyle defaultFont > >>> - color: (Color gray: 0.7)].! > >> > >> Just curious, why are you adding spaces everywhere? > >> :) > >> Best regards > >> -toibas > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/0bac5112/attachment.htm From commits at source.squeak.org Wed Jun 1 14:10:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 14:10:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1156.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1156.mcz ==================== Summary ==================== Name: Morphic-mt.1156 Author: mt Time: 1 June 2016, 4:09:34.015287 pm UUID: 522ade56-9b2e-f749-bb5c-cb117aa97c56 Ancestors: Morphic-topa.1155 If #mouseOverForKeyboardFocus is disabled, do not highlight (a.k.a. "look focused") background windows on mouse-enter, even if they are active due to the preference "Windows' Contents Are Always Active". Note that there is still a bug, which I intend to fix if the event filters make it into the trunk. Namely, if you "debug it" and expression via the context menu, the appearing debugger will not be the top window. An additional click is required. Sorry for this inconvenience. =============== Diff against Morphic-topa.1155 =============== Item was changed: MorphicModel subclass: #SystemWindow + instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' - instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '' prior: 0! SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! Item was added: + ----- Method: SystemWindow>>activateIfNeeded: (in category 'focus') ----- + activateIfNeeded: evt + "Make me the new key window if needed. Ensure that the focus look matches the keyboard focus." + + (self isKeyWindow not + and: [self class windowsRaiseOnClick + or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) + ifTrue: [self beKeyWindow] + ifFalse: [self updateFocusLookForKeyboardFocus].! Item was changed: ----- Method: SystemWindow>>handleMouseDown: (in category 'events') ----- handleMouseDown: evt - - "If my submorphs handled the events, we still need to use this hook to raise." - (self isKeyWindow not - and: [self class windowsRaiseOnClick - or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) - ifTrue: [self beKeyWindow]. + self activateIfNeeded: evt. ^ super handleMouseDown: evt! Item was added: + ----- Method: SystemWindow>>handleMouseUp: (in category 'events') ----- + handleMouseUp: evt + + self activateIfNeeded: evt. + ^ super handleMouseUp: evt! Item was added: + ----- Method: SystemWindow>>isLookingFocused (in category 'focus') ----- + isLookingFocused + + ^ isLookingFocused ifNil: [false]! Item was added: + ----- Method: SystemWindow>>isLookingFocused: (in category 'focus') ----- + isLookingFocused: aBoolean + + isLookingFocused := aBoolean.! Item was changed: ----- Method: SystemWindow>>lookFocused (in category 'focus') ----- lookFocused + + "Optimize performance." + self isLookingFocused ifTrue: [^ self]. + self isLookingFocused: true. + label ifNotNil: [ label color: Color black ]. (self isKeyWindow or: [self class windowTitleActiveOnFirstClick]) ifTrue: [self undimWindowButtons]. self paneColorToUse in: [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col].! Item was changed: ----- Method: SystemWindow>>lookUnfocused (in category 'focus') ----- lookUnfocused + + "Optimize performance." + self isLookingFocused ifFalse: [^ self]. + self isLookingFocused: false. + label ifNotNil: [ label color: Color darkGray ]. self dimWindowButtons. self paneColorToUseWhenNotActive in: [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col ]! Item was changed: ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- mouseEnter: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseEnter: anEvent. + (self isActive and: [Preferences mouseOverForKeyboardFocus]) + ifTrue: [self lookFocused].! - self isActive ifTrue: [self lookFocused].! Item was changed: ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- mouseLeave: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseLeave: anEvent. + (model windowActiveOnFirstClick and: [Preferences mouseOverForKeyboardFocus + or: [anEvent hand keyboardFocus notNil and: [anEvent hand keyboardFocus containingWindow ~= self]]]) + ifTrue: [self lookUnfocused].! - model windowActiveOnFirstClick ifTrue: [self lookUnfocused].! Item was changed: ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: evt + "Passivate after drop operations if needed. Unfortunately, we get a leave-dragging event for the system window we want to drag. Watch out for it." - "Passivate after drop operations if needed." + ((model windowActiveOnFirstClick and: [(evt hand submorphs includes: self) not]) + or: [self isKeyWindow not]) + ifTrue: [self lookUnfocused]. + - model windowActiveOnFirstClick ifTrue: [self lookUnfocused]. - (self isKeyWindow not and: [evt hand hasSubmorphs]) ifTrue:[ self passivateIfNeeded. evt hand removeMouseListener: self. "no more drop completion possible on submorph" ].! Item was changed: ----- Method: SystemWindow>>openAsIsIn: (in category 'open/close') ----- openAsIsIn: aWorld "This msg and its callees result in the window being activeOnlyOnTop" aWorld addMorph: self. self beKeyWindow. + aWorld startSteppingSubmorphsOf: self.! - aWorld startSteppingSubmorphsOf: self. - self activeHand - releaseKeyboardFocus; - releaseMouseFocus.! Item was changed: ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- openInWorld: aWorld "This msg and its callees result in the window being activeOnlyOnTop" + ^ self anyOpenWindowLikeMe - [^ self anyOpenWindowLikeMe ifEmpty: [ self bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; beKeyWindow ; + postAcceptBrowseFor: self ].! - postAcceptBrowseFor: self ]. - ] ensure: [ - self activeHand - releaseKeyboardFocus; - releaseMouseFocus. ]! Item was changed: ----- Method: SystemWindow>>openInWorld:extent: (in category 'open/close') ----- openInWorld: aWorld extent: extent "This msg and its callees result in the window being activeOnlyOnTop" + ^ self anyOpenWindowLikeMe - [^ self anyOpenWindowLikeMe ifEmpty: [ self position: (RealEstateAgent initialFrameFor: self initialExtent: extent world: aWorld) topLeft ; extent: extent. self openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; beKeyWindow ; + postAcceptBrowseFor: self ].! - postAcceptBrowseFor: self ]. - ] ensure: [ - self activeHand - releaseKeyboardFocus; - releaseMouseFocus. ]! Item was changed: ----- Method: SystemWindow>>passivate (in category 'focus') ----- passivate "Reconfigure my focus according to preferences." self isActive ifFalse: [^ self]. self isActive: false. self isCollapsed ifFalse: [model modelSleep]. self submorphsDo: [:each | each lock]. + self activeHand keyboardFocus ifNotNil: [:morph | + morph containingWindow == self + ifTrue: [self activeHand releaseKeyboardFocus]]. + self lookUnfocused.! Item was changed: ----- Method: SystemWindow>>updateFocusLookAtHand (in category 'focus') ----- updateFocusLookAtHand "If there is more than one active window, look for the mouse cursor and update the window focus look accordingly. This method is not on the class-side because we need our world and some active hand." + (model windowActiveOnFirstClick and: [Preferences mouseOverForKeyboardFocus]) + ifFalse: [self updateFocusLookForKeyboardFocus] + ifTrue: [ + ((self class windowsIn: self world) + do: [:window | window lookUnfocused]; + select: [:window | window bounds containsPoint: self activeHand position]) + ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"]].! - model windowActiveOnFirstClick ifFalse: [^ self]. - - ((self class windowsIn: self world) - do: [:window | window lookUnfocused]; - select: [:window | window bounds containsPoint: self activeHand position]) - ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"].! Item was added: + ----- Method: SystemWindow>>updateFocusLookForKeyboardFocus (in category 'focus') ----- + updateFocusLookForKeyboardFocus + + | f w | + (((f := self activeHand keyboardFocus) notNil and: [(w := f containingWindow) notNil]) + and: [w isActive]) + ifTrue: [ + (self class windowsIn: self world) do: [:window | window lookUnfocused]. + w lookFocused]! From commits at source.squeak.org Wed Jun 1 14:43:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 14:43:24 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.165.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.165.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.165 Author: mt Time: 1 June 2016, 4:43:17.541666 pm UUID: eb5a9bb7-d38f-c84d-bf97-5643786996e8 Ancestors: ToolBuilder-Morphic-cmm.164 Our list choosers use system windows. Request input for specific data. Use that to update the current keyboard focus. See #update:with: in pluggable list and text morphs. =============== Diff against ToolBuilder-Morphic-cmm.164 =============== Item was changed: ----- Method: ListChooser>>chooseItemFrom:title:addAllowed: (in category 'initialize-release') ----- chooseItemFrom: labelList title: aString addAllowed: aBoolean fullList := labelList asOrderedCollection. "coerce everything into an OC" builder := ToolBuilder default. self list: fullList. self title: aString. addAllowed := aBoolean. window := ToolBuilder default open: self. window center: Sensor cursorPoint. window setConstrainedPosition: (Sensor cursorPoint - (window fullBounds extent // 2)) hangOut: false. + + self changed: #inputRequested with: #searchText. + window lookFocused. "Sigh..." + builder runModal: window. ^ result! Item was changed: ----- Method: ListMultipleChooser>>choose (in category 'actions') ----- choose | builder window | builder := ToolBuilder default. window := builder open: self.. window center: Sensor cursorPoint. "Avoid morphic dependency here..." + + self changed: #inputRequested with: #selectedIndex. + window lookFocused. "Sigh..." + builder runModal: window. ^ self selectedValues! From commits at source.squeak.org Wed Jun 1 14:45:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 14:45:50 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1157.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1157.mcz ==================== Summary ==================== Name: Morphic-mt.1157 Author: mt Time: 1 June 2016, 4:45:15.847666 pm UUID: b3500079-b6e7-af43-9e06-7df9250fb1f8 Ancestors: Morphic-mt.1156 Grab the keyboard focus if models request that. Models have to use the respective selectors (get or set) so that the correct widget will grab the keyboard focus. =============== Diff against Morphic-mt.1156 =============== Item was added: + ----- Method: PluggableListMorph>>update:with: (in category 'updating') ----- + update: aSymbol with: arg1 + + (aSymbol == #inputRequested and: [getIndexSelector == arg1 or: [setIndexSelector == arg1]]) + ifTrue: [self activeHand newKeyboardFocus: self]. + + super update: aSymbol with: arg1.! Item was added: + ----- Method: PluggableTextMorph>>setTextSelector (in category 'accessing') ----- + setTextSelector + ^setTextSelector! Item was changed: ----- Method: PluggableTextMorph>>update:with: (in category 'updating') ----- update: aSymbol with: arg1 + aSymbol == #editString ifTrue:[ self editString: arg1. self hasUnacceptedEdits: true. ]. + + (aSymbol == #inputRequested and: [self getTextSelector == arg1 or: [self setTextSelector == arg1]]) + ifTrue: [self activeHand newKeyboardFocus: self]. + ^super update: aSymbol with: arg1! From commits at source.squeak.org Wed Jun 1 15:29:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 15:29:20 2016 Subject: [squeak-dev] The Inbox: Compiler-cmm.179.mcz Message-ID: Chris Muller uploaded a new version of Compiler to project The Inbox: http://source.squeak.org/inbox/Compiler-cmm.179.mcz ==================== Summary ==================== Name: Compiler-cmm.179 Author: cmm Time: 7 November 2010, 8:37:59.582 pm UUID: 083197fc-650d-46da-9d1c-50a51630023c Ancestors: Compiler-ul.178, Compiler-cmm.174 - Merged improved pretty-print formatting. =============== Diff against Compiler-ul.178 =============== Item was added: + ----- Method: AssignmentNode>>isComplex (in category 'testing') ----- + isComplex + ^ value isComplex! Item was changed: ----- Method: AssignmentNode>>printOn:indent: (in category 'printing') ----- printOn: aStream indent: level variable printOn: aStream indent: level. aStream nextPutAll: ' := '. + value printOn: aStream indent: level! - value printOn: aStream indent: level + 2! Item was changed: ----- Method: BlockNode>>isComplex (in category 'testing') ----- isComplex + ^ statements size > 1 or: + [ (statements size = 1 and: [ statements first isComplex ]) or: + [ arguments size > 0 or: [ temporaries size > 0 ] ] ]! - - ^statements size > 1 or: [statements size = 1 and: [statements first isComplex]]! Item was changed: ----- Method: BlockNode>>printArgumentsOn:indent: (in category 'printing') ----- + printArgumentsOn: aStream indent: level - printArgumentsOn: aStream indent: level arguments size = 0 ifTrue: [^ self]. + arguments do: + [ : arg | + aStream nextPut: $: ; + space; + nextPutAll: arg key; + space ]. + aStream + nextPut: $|; + space! - arguments do: - [:arg | aStream nextPut: $:; nextPutAll: arg key; space]. - aStream nextPut: $|; space. - "If >0 args and >1 statement, put all statements on separate lines" - statements size > 1 ifTrue: - [aStream crtab: level]! Item was changed: ----- Method: BlockNode>>printOn:indent: (in category 'printing') ----- + printOn: aStream indent: level + aStream + nextPut: $[ ; + space. + self + printArgumentsOn: aStream + indent: level. + (self + printTemporaries: temporaries + on: aStream + doPrior: [ ] ) ifTrue: + [ "If >0 temps and >1 statement, put all statements on separate lines" + statements size > 1 + ifTrue: [ aStream crtab: level ] + ifFalse: [ aStream space] ] . + self + printStatementsOn: aStream + indent: level. + aStream + space ; + nextPut: $]! - printOn: aStream indent: level - - "statements size <= 1 ifFalse: [aStream crtab: level]." - aStream nextPut: $[. - self printArgumentsOn: aStream indent: level. - (self printTemporaries: temporaries on: aStream doPrior: []) ifTrue: - ["If >0 temps and >1 statement, put all statements on separate lines" - statements size > 1 - ifTrue: [aStream crtab: level] - ifFalse: [aStream space]]. - self printStatementsOn: aStream indent: level. - aStream nextPut: $]! Item was changed: ----- Method: BlockNode>>printWithClosureAnalysisOn:indent: (in category 'printing') ----- printWithClosureAnalysisOn: aStream indent: level + aStream nextPut: $[; space. - aStream nextPut: $[. blockExtent ifNotNil: [aStream print: blockExtent]. self printWithClosureAnalysisArgumentsOn: aStream indent: level. self printWithClosureAnalysisTemporariesOn: aStream indent: level. self printWithClosureAnalysisStatementsOn: aStream indent: level. + aStream space; nextPut: $]! - aStream nextPut: $]! Item was changed: ----- Method: BraceNode>>printOn:indent: (in category 'printing') ----- + printOn: aStream indent: level - printOn: aStream indent: level - aStream nextPut: ${. + 1 + to: elements size + do: + [ : i | + (elements at: i) + printOn: aStream + indent: level. + i < elements size ifTrue: + [ aStream + nextPutAll: '. ' ; + crtab: level ] ]. - 1 to: elements size do: - [:i | (elements at: i) printOn: aStream indent: level. - i < elements size ifTrue: [aStream nextPutAll: '. ']]. aStream nextPut: $}! Item was added: + ----- Method: CascadeNode>>isComplex (in category 'testing') ----- + isComplex + ^ true! Item was changed: ----- Method: CascadeNode>>printOn:indent:precedence: (in category 'printing') ----- printOn: aStream indent: level precedence: p + p > 0 ifTrue: [ aStream nextPut: $( ]. + messages first + printReceiver: receiver + on: aStream + indent: level. + 1 + to: messages size + do: + [ : i | + aStream crtab: level + 1. + (messages at: i) + printOn: aStream + indent: level. + i < messages size ifTrue: [ aStream nextPutAll: ' ;' ] ]. + p > 0 ifTrue: [ aStream nextPut: $) ]! - - p > 0 ifTrue: [aStream nextPut: $(]. - messages first printReceiver: receiver on: aStream indent: level. - 1 to: messages size do: - [:i | (messages at: i) printOn: aStream indent: level. - i < messages size ifTrue: - [aStream nextPut: $;. - messages first precedence >= 2 ifTrue: [aStream crtab: level + 1]]]. - p > 0 ifTrue: [aStream nextPut: $)]! Item was changed: ----- Method: MessageNode>>isComplex (in category 'testing') ----- isComplex + ^ (special + between: 1 + and: 10) + or: + [ arguments size > 1 + or: + [ receiver isComplex or: [ arguments anySatisfy: [ : each | each isComplex ] ] ] ]! - - ^(special between: 1 and: 10) or: [arguments size > 2 or: [receiver isComplex]]! Item was changed: ----- Method: MessageNode>>printIfOn:indent: (in category 'printing') ----- + printIfOn: aStream indent: level + receiver ifNotNil: + [ receiver + printOn: aStream + indent: level + precedence: precedence ]. + (arguments last isJust: NodeNil) ifTrue: [ ^ self + printKeywords: #ifTrue: + arguments: (Array with: arguments first) + on: aStream + indent: level ]. + (arguments last isJust: NodeFalse) ifTrue: [ ^ self + printKeywords: #and: + arguments: (Array with: arguments first) + on: aStream + indent: level ]. + (arguments first isJust: NodeNil) ifTrue: [ ^ self + printKeywords: #ifFalse: + arguments: (Array with: arguments last) + on: aStream + indent: level ]. + (arguments first isJust: NodeTrue) ifTrue: [ ^ self + printKeywords: #or: + arguments: (Array with: arguments last) + on: aStream + indent: level ]. + self + printKeywords: #ifTrue:ifFalse: + arguments: arguments + on: aStream + indent: level! - printIfOn: aStream indent: level - - receiver ifNotNil: - [receiver printOn: aStream indent: level + 1 precedence: precedence]. - (arguments last isJust: NodeNil) ifTrue: - [^self printKeywords: #ifTrue: arguments: (Array with: arguments first) - on: aStream indent: level]. - (arguments last isJust: NodeFalse) ifTrue: - [^self printKeywords: #and: arguments: (Array with: arguments first) - on: aStream indent: level]. - (arguments first isJust: NodeNil) ifTrue: - [^self printKeywords: #ifFalse: arguments: (Array with: arguments last) - on: aStream indent: level]. - (arguments first isJust: NodeTrue) ifTrue: - [^self printKeywords: #or: arguments: (Array with: arguments last) - on: aStream indent: level]. - self printKeywords: #ifTrue:ifFalse: arguments: arguments - on: aStream indent: level! Item was changed: ----- Method: MessageNode>>printKeywords:arguments:on:indent: (in category 'printing') ----- + printKeywords: key arguments: args on: aStream indent: level - printKeywords: key arguments: args on: aStream indent: level | keywords indent arg kwd doCrTab | args size = 0 ifTrue: + [ aStream + space ; + nextPutAll: key. + ^ self ]. - [aStream space; nextPutAll: key. - ^self]. keywords := key keywords. + doCrTab := args size > 1. + 1 + to: (args size min: keywords size) + do: + [ : i | arg := args at: i. + kwd := keywords at: i. + doCrTab + ifTrue: + [ aStream crtab: level + 1. + indent := 1 + "newline after big args" ] + ifFalse: + [ aStream space. + indent := 0 ]. + aStream nextPutAll: kwd. + arg isComplex + ifTrue: [ aStream crtab: level + indent + 1 ] + ifFalse: [ aStream space ]. + arg + printOn: aStream + indent: level + 1 + indent + precedence: + (precedence = 2 + ifTrue: [ 1 ] + ifFalse: [ precedence ]) ]! - doCrTab := args size > 2 - or: [{receiver} , args anySatisfy: - [:thisArg | - thisArg notNil - and: [thisArg isBlockNode - or: [thisArg isMessageNode and: [thisArg precedence >= 3]]]]]. - 1 to: (args size min: keywords size) do: - [:i | - arg := args at: i. - kwd := keywords at: i. - doCrTab - ifTrue: [aStream crtab: level+1. indent := 1] "newline after big args" - ifFalse: [aStream space. indent := 0]. - aStream nextPutAll: kwd; space. - arg printOn: aStream - indent: level + 1 + indent - precedence: (precedence = 2 ifTrue: [1] ifFalse: [precedence])]! Item was changed: ----- Method: ParseNode>>printSingleComment:on:indent: (in category 'private') ----- printSingleComment: aString on: aStream indent: indent + "Print the comment string, assuming it has been indented indent tabs. Break the string at word breaks, given the widths in the default font, at 450 points." + aStream nextPutAll: aString! - "Print the comment string, assuming it has been indented indent tabs. - Break the string at word breaks, given the widths in the default - font, at 450 points." - - | readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar | - readStream := ReadStream on: aString. - font := TextStyle default defaultFont. - tabWidth := TextConstants at: #DefaultTab. - spaceWidth := font widthOf: Character space. - position := indent * tabWidth. - lineBreak := 450. - [readStream atEnd] - whileFalse: - [word := self nextWordFrom: readStream setCharacter: [:lc | lastChar := lc]. - wordWidth := word inject: 0 into: [:width :char | width + (font widthOf: char)]. - position := position + wordWidth. - position > lineBreak - ifTrue: - [aStream skip: -1; crtab: indent. - position := indent * tabWidth + wordWidth + spaceWidth. - lastChar = Character cr - ifTrue: [[readStream peekFor: Character tab] whileTrue]. - word isEmpty ifFalse: [aStream nextPutAll: word; space]] - ifFalse: - [aStream nextPutAll: word. - readStream atEnd - ifFalse: - [position := position + spaceWidth. - aStream space]. - lastChar = Character cr - ifTrue: - [aStream skip: -1; crtab: indent. - position := indent * tabWidth. - [readStream peekFor: Character tab] whileTrue]]]! From asqueaker at gmail.com Wed Jun 1 15:46:07 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 1 15:46:49 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: >> The predominant style in Squeak historically has been >> >> coll do: [:each | each do something] >> >> Ken Beck uses that in his ?Best Practice Patterns? too. It?s also produced >> by our formatter (but we rarely use that because it introduces weird line >> breaks). Actually, Kent Beck advocates a Rectangular Block formatting pattern, which is NOT produced by our formatter, unless you merge Compiler-cmm.179 (which I've just recopied to the Inbox). I wasn't successful in convincing the community to adopt it six years ago. Besides the reasons already documented by Kents pattern, I like RB because it presents a semi-"tiled" view of the code similar to Scratch, but with textual, rather than graphical, tiles. Like this: coll do: [ :each | statement1. (condition1) ifTrue: [ statement2 ] ] It is so much more OO than "textual" formatting like this: coll do: [ :each | statement1. (condition1) ifTrue: [ statement2. ] ] I doubt we'll ever bridge the transition from tile programming to text coding with formatting like this.. :( I really don't notice any predominant style among different authors of Squeak, and I don't think attempting to establish any kind of formatting standard or style would be counterproductive for the community (not that anyone is suggesting that). Instead, its probably best to let our individual imaginations flow the way they do, and let the IDE take care of each of us individually. Methods can be quickly and easily formatted on access and/or save. However, I do recommend, if one is only changing only one or two lines of a longer method, they should try to maintain the prior author's format. Also, never submit a change to trunk that ONLY changes the formatting of a method, please. - Chris From asqueaker at gmail.com Wed Jun 1 15:47:34 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 1 15:48:19 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: > formatting standard or style would be counterproductive for the s/counterproductive/productive From asqueaker at gmail.com Wed Jun 1 15:53:07 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 1 15:53:50 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1156.mcz In-Reply-To: <574eecc4.5062370a.933aa.51c6SMTPIN_ADDED_MISSING@mx.google.com> References: <574eecc4.5062370a.933aa.51c6SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > Note that there is still a bug, which I intend to fix if the event filters make it into the trunk. Namely, if you "debug it" and expression via the context menu, the appearing debugger will not be the top window. An additional click is required. Sorry for this inconvenience. It works if you use Tobias' new hot-key... (I love that hot-key!!) On Wed, Jun 1, 2016 at 9:09 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1156.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1156 > Author: mt > Time: 1 June 2016, 4:09:34.015287 pm > UUID: 522ade56-9b2e-f749-bb5c-cb117aa97c56 > Ancestors: Morphic-topa.1155 > > If #mouseOverForKeyboardFocus is disabled, do not highlight (a.k.a. "look focused") background windows on mouse-enter, even if they are active due to the preference "Windows' Contents Are Always Active". > > Note that there is still a bug, which I intend to fix if the event filters make it into the trunk. Namely, if you "debug it" and expression via the context menu, the appearing debugger will not be the top window. An additional click is required. Sorry for this inconvenience. > > =============== Diff against Morphic-topa.1155 =============== > > Item was changed: > MorphicModel subclass: #SystemWindow > + instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' > - instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' > classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' > poolDictionaries: '' > category: 'Morphic-Windows'! > > !SystemWindow commentStamp: '' prior: 0! > SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. > > The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! > > Item was added: > + ----- Method: SystemWindow>>activateIfNeeded: (in category 'focus') ----- > + activateIfNeeded: evt > + "Make me the new key window if needed. Ensure that the focus look matches the keyboard focus." > + > + (self isKeyWindow not > + and: [self class windowsRaiseOnClick > + or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) > + ifTrue: [self beKeyWindow] > + ifFalse: [self updateFocusLookForKeyboardFocus].! > > Item was changed: > ----- Method: SystemWindow>>handleMouseDown: (in category 'events') ----- > handleMouseDown: evt > - > - "If my submorphs handled the events, we still need to use this hook to raise." > - (self isKeyWindow not > - and: [self class windowsRaiseOnClick > - or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) > - ifTrue: [self beKeyWindow]. > > + self activateIfNeeded: evt. > ^ super handleMouseDown: evt! > > Item was added: > + ----- Method: SystemWindow>>handleMouseUp: (in category 'events') ----- > + handleMouseUp: evt > + > + self activateIfNeeded: evt. > + ^ super handleMouseUp: evt! > > Item was added: > + ----- Method: SystemWindow>>isLookingFocused (in category 'focus') ----- > + isLookingFocused > + > + ^ isLookingFocused ifNil: [false]! > > Item was added: > + ----- Method: SystemWindow>>isLookingFocused: (in category 'focus') ----- > + isLookingFocused: aBoolean > + > + isLookingFocused := aBoolean.! > > Item was changed: > ----- Method: SystemWindow>>lookFocused (in category 'focus') ----- > lookFocused > + > + "Optimize performance." > + self isLookingFocused ifTrue: [^ self]. > + self isLookingFocused: true. > + > label ifNotNil: [ label color: Color black ]. > > (self isKeyWindow or: [self class windowTitleActiveOnFirstClick]) > ifTrue: [self undimWindowButtons]. > > self paneColorToUse in: [ : col | > self > setStripeColorsFrom: col ; > adoptPaneColor: col].! > > Item was changed: > ----- Method: SystemWindow>>lookUnfocused (in category 'focus') ----- > lookUnfocused > + > + "Optimize performance." > + self isLookingFocused ifFalse: [^ self]. > + self isLookingFocused: false. > + > label ifNotNil: [ label color: Color darkGray ]. > self dimWindowButtons. > self paneColorToUseWhenNotActive in: [ : col | > self > setStripeColorsFrom: col ; > adoptPaneColor: col ]! > > Item was changed: > ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- > mouseEnter: anEvent > "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." > super mouseEnter: anEvent. > > + (self isActive and: [Preferences mouseOverForKeyboardFocus]) > + ifTrue: [self lookFocused].! > - self isActive ifTrue: [self lookFocused].! > > Item was changed: > ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- > mouseLeave: anEvent > "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." > super mouseLeave: anEvent. > > + (model windowActiveOnFirstClick and: [Preferences mouseOverForKeyboardFocus > + or: [anEvent hand keyboardFocus notNil and: [anEvent hand keyboardFocus containingWindow ~= self]]]) > + ifTrue: [self lookUnfocused].! > - model windowActiveOnFirstClick ifTrue: [self lookUnfocused].! > > Item was changed: > ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- > mouseLeaveDragging: evt > + "Passivate after drop operations if needed. Unfortunately, we get a leave-dragging event for the system window we want to drag. Watch out for it." > - "Passivate after drop operations if needed." > > + ((model windowActiveOnFirstClick and: [(evt hand submorphs includes: self) not]) > + or: [self isKeyWindow not]) > + ifTrue: [self lookUnfocused]. > + > - model windowActiveOnFirstClick ifTrue: [self lookUnfocused]. > - > (self isKeyWindow not and: [evt hand hasSubmorphs]) ifTrue:[ > self passivateIfNeeded. > evt hand removeMouseListener: self. "no more drop completion possible on submorph" > ].! > > Item was changed: > ----- Method: SystemWindow>>openAsIsIn: (in category 'open/close') ----- > openAsIsIn: aWorld > "This msg and its callees result in the window being activeOnlyOnTop" > aWorld addMorph: self. > self beKeyWindow. > + aWorld startSteppingSubmorphsOf: self.! > - aWorld startSteppingSubmorphsOf: self. > - self activeHand > - releaseKeyboardFocus; > - releaseMouseFocus.! > > Item was changed: > ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- > openInWorld: aWorld > "This msg and its callees result in the window being activeOnlyOnTop" > + ^ self anyOpenWindowLikeMe > - [^ self anyOpenWindowLikeMe > ifEmpty: > [ self > bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; > openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > + postAcceptBrowseFor: self ].! > - postAcceptBrowseFor: self ]. > - ] ensure: [ > - self activeHand > - releaseKeyboardFocus; > - releaseMouseFocus. ]! > > Item was changed: > ----- Method: SystemWindow>>openInWorld:extent: (in category 'open/close') ----- > openInWorld: aWorld extent: extent > "This msg and its callees result in the window being activeOnlyOnTop" > + ^ self anyOpenWindowLikeMe > - [^ self anyOpenWindowLikeMe > ifEmpty: > [ self > position: (RealEstateAgent initialFrameFor: self initialExtent: extent world: aWorld) topLeft ; > extent: extent. > self openAsIsIn: aWorld ] > ifNotEmptyDo: > [ : windows | > windows anyOne > expand ; > beKeyWindow ; > + postAcceptBrowseFor: self ].! > - postAcceptBrowseFor: self ]. > - ] ensure: [ > - self activeHand > - releaseKeyboardFocus; > - releaseMouseFocus. ]! > > Item was changed: > ----- Method: SystemWindow>>passivate (in category 'focus') ----- > passivate > "Reconfigure my focus according to preferences." > > self isActive ifFalse: [^ self]. > self isActive: false. > > self isCollapsed ifFalse: [model modelSleep]. > > self submorphsDo: [:each | each lock]. > > + self activeHand keyboardFocus ifNotNil: [:morph | > + morph containingWindow == self > + ifTrue: [self activeHand releaseKeyboardFocus]]. > + > self lookUnfocused.! > > Item was changed: > ----- Method: SystemWindow>>updateFocusLookAtHand (in category 'focus') ----- > updateFocusLookAtHand > "If there is more than one active window, look for the mouse cursor and update the window focus look accordingly. This method is not on the class-side because we need our world and some active hand." > > + (model windowActiveOnFirstClick and: [Preferences mouseOverForKeyboardFocus]) > + ifFalse: [self updateFocusLookForKeyboardFocus] > + ifTrue: [ > + ((self class windowsIn: self world) > + do: [:window | window lookUnfocused]; > + select: [:window | window bounds containsPoint: self activeHand position]) > + ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"]].! > - model windowActiveOnFirstClick ifFalse: [^ self]. > - > - ((self class windowsIn: self world) > - do: [:window | window lookUnfocused]; > - select: [:window | window bounds containsPoint: self activeHand position]) > - ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"].! > > Item was added: > + ----- Method: SystemWindow>>updateFocusLookForKeyboardFocus (in category 'focus') ----- > + updateFocusLookForKeyboardFocus > + > + | f w | > + (((f := self activeHand keyboardFocus) notNil and: [(w := f containingWindow) notNil]) > + and: [w isActive]) > + ifTrue: [ > + (self class windowsIn: self world) do: [:window | window lookUnfocused]. > + w lookFocused]! > > From Marcel.Taeumel at hpi.de Wed Jun 1 15:21:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 15:59:34 2016 Subject: [squeak-dev] Re: The Inbox: Compiler-cmm.179.mcz In-Reply-To: References: Message-ID: <1464794497036-4898688.post@n4.nabble.com> Hi Chris, I would call this rather "different" than "improved". I think that we would benefit from a configurable pretty printer. There are a bunch of acceptable Smalltalk code styles out there. There is no such thing as the one best formatting. For example, I do prefer this style somePredicate ifTrue: [ something. something] ifFalse: [ something. something]. ... over this style: somePredicate ifTrue: [ something. something ] ifFalse: [ something. something ]. Or something like that. Too much spaces. Complicated position of parentheses. I can come up a number of reasons. Hence, I think that there are many Smalltalkers out there, that also have their own style. Sometimes this seems even more readable: somePredicate ifTrue: [something. something] ifFalse: [something. something]. Sure, we have some official books that suggest some code formatting. Personally, I would prefer a configure system where I can read and write the code in the way I feel most productive. :-) Just my two cents. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Compiler-cmm-179-mcz-tp4898674p4898688.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Jun 1 15:24:09 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 16:02:08 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1156.mcz In-Reply-To: References: Message-ID: <1464794649613-4898689.post@n4.nabble.com> Hey Chris, yes this does affect mouse-input only. Keyboard input works fine. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1156-mcz-tp4898652p4898689.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Jun 1 15:32:09 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 16:09:57 2016 Subject: [squeak-dev] Re: New Window and Focus related preferences In-Reply-To: <1464775064305-4898567.post@n4.nabble.com> References: <1464775064305-4898567.post@n4.nabble.com> Message-ID: <1464795129561-4898691.post@n4.nabble.com> marcel.taeumel wrote > Hi, there. > > #mouseOverForKeyboardFocus is still there and works as before. Tobias just > noticed an inconsistency when > > [x] Windows' Contents Are Always Active > [ ] mouseOverForKeyboardFocus > > Because the window colors adapt to the current mouse position but the > widgets *inside* an window do not automatically get focus. Tobias > especially noticed that in combination with text morphs. I started typing > and nothing happened. > > Best, > Marcel Should be better now: http://forum.world.st/The-Trunk-Morphic-mt-1156-mcz-tp4898652.html Best, Marcel -- View this message in context: http://forum.world.st/New-Window-and-Focus-related-preferences-tp4898424p4898691.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Wed Jun 1 17:11:20 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 1 17:12:02 2016 Subject: [squeak-dev] Re: The Inbox: Compiler-cmm.179.mcz In-Reply-To: <1464794497036-4898688.post@n4.nabble.com> References: <1464794497036-4898688.post@n4.nabble.com> Message-ID: Agree. :) On Wed, Jun 1, 2016 at 10:21 AM, marcel.taeumel wrote: > Hi Chris, > > I would call this rather "different" than "improved". I think that we would > benefit from a configurable pretty printer. There are a bunch of acceptable > Smalltalk code styles out there. There is no such thing as the one best > formatting. > > For example, I do prefer this style > > somePredicate > ifTrue: [ > something. > something] > ifFalse: [ > something. > something]. > > ... over this style: > > somePredicate > ifTrue: > [ something. > something ] > ifFalse: > [ something. > something ]. > > Or something like that. Too much spaces. Complicated position of > parentheses. I can come up a number of reasons. Hence, I think that there > are many Smalltalkers out there, that also have their own style. > > Sometimes this seems even more readable: > > somePredicate > ifTrue: [something. something] > ifFalse: [something. something]. > > Sure, we have some official books that suggest some code formatting. > Personally, I would prefer a configure system where I can read and write the > code in the way I feel most productive. :-) > > Just my two cents. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Inbox-Compiler-cmm-179-mcz-tp4898674p4898688.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From eliot.miranda at gmail.com Wed Jun 1 17:45:47 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jun 1 17:45:50 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: On Wed, Jun 1, 2016 at 5:29 AM, Bert Freudenberg wrote: > > > On 01.06.2016, at 13:43, Bert Freudenberg wrote: > > > > On 01.06.2016, at 13:27, Fabio Niephaus wrote: > >> > >> Hi all, > >> > >> We just found out that the VM crashes when trying to build very large > integers. > >> I'm not sure what could cause the problem... > > > > Maybe largeIntgrowTo doesn?t check the size? > > > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > > 0 libsystem_kernel.dylib 0x9b5fa572 __pthread_kill + 10 > > 1 libsystem_pthread.dylib 0x91403654 pthread_kill + 101 > > 2 libsystem_c.dylib 0x93dddc34 abort + 156 > > 3 org.squeak.Squeak$(VM_MONIKER) 0x00139db9 sigsegv + 175 > > 4 libsystem_platform.dylib 0x9e4bd79b _sigtramp + 43 > > 5 ??? 0xffffffff 0 + 4294967295 > > 6 org.squeak.Squeak$(VM_MONIKER) 0x00139d0a > getCrashDumpFilenameInto + 82 > > 7 org.squeak.Squeak$(VM_MONIKER) 0x00177262 largeIntgrowTo + 107 > > 8 org.squeak.Squeak$(VM_MONIKER) 0x001771f1 normalizePositive + 190 > > 9 org.squeak.Squeak$(VM_MONIKER) 0x0017678c > primDigitMultiplyNegative + 597 > > 10 ??? 0x04cb4cc8 0 + 80432328 > > 11 org.squeak.Squeak$(VM_MONIKER) 0x000c203a interpret + 741 > > > > > > - Bert - > > > Btw it worked fine in the interpreter and Cog. > So which VM does it fail on? > > - Bert - > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/f08bb3c0/attachment.htm From eliot.miranda at gmail.com Wed Jun 1 17:47:12 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jun 1 17:47:14 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: On Wed, Jun 1, 2016 at 3:47 AM, Bert Freudenberg wrote: > The predominant style in Squeak historically has been > > coll do: [:each | each do something] > > Ken Beck uses that in his ?Best Practice Patterns? too. It?s also produced > by our formatter (but we rarely use that because it introduces weird line > breaks). > > I prefer this style because it seems to be most readable. > > I agree with Chris about selectability, but I?d rather fix our > double-click selection logic than make the code look weird. Double-clicking > on ?:foo? should only select ?foo?. > +1000 > > - Bert - > > > > On 31.05.2016, at 23:58, Chris Muller wrote: > > > > By "everywhere" I assume you mean the ones just inside my brackets? > > When block arguments are written without a space between the colon and > > variable name, like this: > > > > coll do: [:each|each do something] > > > > then I can't simply double-click the "each" declaration and then use > > Cmd+g to find further occurrences, because double-clicking it also > > selects the colon. > > > > So, I could write: > > > > coll do: [: each|each do something] > > > > but it looks strange to me. > > > > But also for easier expression editing. With no space, it is harder > > to select the inner expression via double clicking just inside the > > opening bracket; because a space there affords the user more width to > > hit the expression than the narrow colon. > > > > This effect can be verified on a computer with touch pad with > > **separate buttons** (e.g., able to double-click without moving the > > mouse even one pixel). 1) put a space there, 2) place mouse about > > halfway into width of the space. 3) Without touching touch pad, > > double-click to ensure expression is selected. 4) Now single-click to > > deselect expression. 5) Now press [Delete] to delete the space. 6) > > Without touching touch pad, again double-click in the exact same spot. > > The colon is selected instead of the expression. > > > > On Tue, May 31, 2016 at 4:42 PM, Tobias Pape wrote: > >> > >> On 31.05.2016, at 21:26, commits@source.squeak.org wrote: > >> > >> > >>> Item was changed: > >>> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category > 'drawing') ----- > >>> + drawBalloonTextOn: aCanvas > >>> - drawBalloonTextOn: aCanvas > >>> "Show balloon text in the text morph if it has no contents." > >>> + textMorph contents ifNotEmpty: [ ^ self ]. > >>> + ([ self balloonText ] > >>> + on: Error > >>> + do: [ : err | 'error in balloonText' ]) ifNotNil: > >>> + [ : text | aCanvas > >>> - > >>> - textMorph contents ifNotEmpty: [^ self]. > >>> - > >>> - self balloonText ifNotNil: [:text | > >>> - aCanvas > >>> drawString: text > >>> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 > @ 0)) > >>> + font: textMorph textStyle defaultFont "I want > italic here" > >>> + color: (Color gray: 0.7) ]! > >>> - in: (self innerBounds insetBy: (5@2 corner: 0@0 > )) > >>> - font: textMorph textStyle defaultFont > >>> - color: (Color gray: 0.7)].! > >> > >> Just curious, why are you adding spaces everywhere? > >> :) > >> Best regards > >> -toibas > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/80f8c896/attachment.htm From Marcel.Taeumel at hpi.de Wed Jun 1 17:23:16 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 1 18:01:07 2016 Subject: [squeak-dev] Re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: <1464801796834-4898723.post@n4.nabble.com> Eliot Miranda-2 wrote > On Wed, Jun 1, 2016 at 3:47 AM, Bert Freudenberg < > bert@ > > > wrote: > >> The predominant style in Squeak historically has been >> >> coll do: [:each | each do something] >> >> Ken Beck uses that in his ?Best Practice Patterns? too. It?s also >> produced >> by our formatter (but we rarely use that because it introduces weird line >> breaks). >> >> I prefer this style because it seems to be most readable. >> >> I agree with Chris about selectability, but I?d rather fix our >> double-click selection logic than make the code look weird. >> Double-clicking >> on ?:foo? should only select ?foo?. >> > > +1000 > > >> >> - Bert - >> >> >> > On 31.05.2016, at 23:58, Chris Muller < > asqueaker@ > > wrote: >> > >> > By "everywhere" I assume you mean the ones just inside my brackets? >> > When block arguments are written without a space between the colon and >> > variable name, like this: >> > >> > coll do: [:each|each do something] >> > >> > then I can't simply double-click the "each" declaration and then use >> > Cmd+g to find further occurrences, because double-clicking it also >> > selects the colon. >> > >> > So, I could write: >> > >> > coll do: [: each|each do something] >> > >> > but it looks strange to me. >> > >> > But also for easier expression editing. With no space, it is harder >> > to select the inner expression via double clicking just inside the >> > opening bracket; because a space there affords the user more width to >> > hit the expression than the narrow colon. >> > >> > This effect can be verified on a computer with touch pad with >> > **separate buttons** (e.g., able to double-click without moving the >> > mouse even one pixel). 1) put a space there, 2) place mouse about >> > halfway into width of the space. 3) Without touching touch pad, >> > double-click to ensure expression is selected. 4) Now single-click to >> > deselect expression. 5) Now press [Delete] to delete the space. 6) >> > Without touching touch pad, again double-click in the exact same spot. >> > The colon is selected instead of the expression. >> > >> > On Tue, May 31, 2016 at 4:42 PM, Tobias Pape < > Das.Linux@ > > wrote: >> >> >> >> On 31.05.2016, at 21:26, > commits@.squeak > wrote: >> >> >> >> >> >>> Item was changed: >> >>> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category >> 'drawing') ----- >> >>> + drawBalloonTextOn: aCanvas >> >>> - drawBalloonTextOn: aCanvas >> >>> "Show balloon text in the text morph if it has no contents." >> >>> + textMorph contents ifNotEmpty: [ ^ self ]. >> >>> + ([ self balloonText ] >> >>> + on: Error >> >>> + do: [ : err | 'error in balloonText' ]) ifNotNil: >> >>> + [ : text | aCanvas >> >>> - >> >>> - textMorph contents ifNotEmpty: [^ self]. >> >>> - >> >>> - self balloonText ifNotNil: [:text | >> >>> - aCanvas >> >>> drawString: text >> >>> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 >> @ 0)) >> >>> + font: textMorph textStyle defaultFont "I want >> italic here" >> >>> + color: (Color gray: 0.7) ]! >> >>> - in: (self innerBounds insetBy: (5@2 corner: 0@0 >> )) >> >>> - font: textMorph textStyle defaultFont >> >>> - color: (Color gray: 0.7)].! >> >> >> >> Just curious, why are you adding spaces everywhere? >> >> :) >> >> Best regards >> >> -toibas >> > >> >> >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot You saw that code when I made infinite text undo working again. It is in Editor >> #selectWord and #selectWordLeftDelimiters:rightDelimiters:. You cannot just add $':' to the list of delimiters because that would complicate symbol selection. So, the steps would be look for more context whether you want to select "#open:with:" with clicks and also "each" from "...[ :each |..." Best, Marcel -- View this message in context: http://forum.world.st/Formatting-was-Re-squeak-dev-The-Trunk-ToolBuilder-Morphic-cmm-164-mcz-tp4898446p4898723.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Wed Jun 1 20:45:37 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 1 20:45:40 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> Message-ID: <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> > On 01.06.2016, at 17:46, Chris Muller wrote: > >>> The predominant style in Squeak historically has been >>> >>> coll do: [:each | each do something] >>> >>> Ken Beck uses that in his ?Best Practice Patterns? too. It?s also produced >>> by our formatter (but we rarely use that because it introduces weird line >>> breaks). > > Actually, Kent Beck advocates a Rectangular Block formatting pattern, I was mostly talking about the issue at hand, namely, whether to put spaces inside of the brackets. Which he does not do. This is (not entirely by coincidence) the typographical convention in English, too. That?s why I prefer it, independent of rectangular blocks or not. > which is NOT produced by our formatter, unless you merge > Compiler-cmm.179 (which I've just recopied to the Inbox). I wasn't > successful in convincing the community to adopt it six years ago. > > Besides the reasons already documented by Kents pattern, I like RB > because it presents a semi-"tiled" view of the code similar to > Scratch, but with textual, rather than graphical, tiles. Like this: > > coll do: > [ :each | > statement1. > (condition1) ifTrue: [ statement2 ] ] > I?d write it Kent Beck-style, namely coll do: [:each | statement1. (condition1) ifTrue: [statement2]] or maybe coll do: [:each | statement1. (condition1) ifTrue: [statement2]] > It is so much more OO than "textual" formatting like this: > > coll do: [ :each | > statement1. > (condition1) ifTrue: [ > statement2. > ] > ] Agreed. I don?t think I?ve seen much of this style in Squeak. It?s ugly. > I really don't notice any predominant style among different authors of > Squeak, I do. Anything that?s not written in that style looks jarring to me. Like Andreas? habit of omitting the space between a keyword message and a block (ifTrue:[foo]). > and I don't think attempting to establish any kind of > formatting standard or style would be counterproductive for the > community (not that anyone is suggesting that). Instead, its probably > best to let our individual imaginations flow the way they do, and let > the IDE take care of each of us individually. Methods can be quickly > and easily formatted on access and/or save. However, I do recommend, > if one is only changing only one or two lines of a longer method, they > should try to maintain the prior author's format. Also, never submit > a change to trunk that ONLY changes the formatting of a method, > please. IMHO readability suffers wth mixed styles. Be creative in your coding, not in your formatting. I think it would be a good idea to adopt a style guide. Beck?s would be a good starting point. - 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/20160601/03c1170a/smime.bin From bert at freudenbergs.de Wed Jun 1 20:48:35 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 1 20:48:38 2016 Subject: [squeak-dev] 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: On 01.06.2016, at 19:45, Eliot Miranda wrote: > (2 raisedTo: 100000000) basicSize > So which VM does it fail on? Mac Spur 5.0.3692 - 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/20160601/bb67d584/smime.bin From commits at source.squeak.org Wed Jun 1 21:41:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 21:41:35 2016 Subject: [squeak-dev] The Trunk: Graphics-topa.341.mcz Message-ID: Tobias Pape uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-topa.341.mcz ==================== Summary ==================== Name: Graphics-topa.341 Author: topa Time: 1 June 2016, 11:41:14.5378 pm UUID: 6b532963-62f7-4713-8668-99d5d3c7fc5f Ancestors: Graphics-topa.340 Let text styels present themselves =============== Diff against Graphics-topa.340 =============== Item was added: + ----- Method: TextStyle>>asStringOrText (in category 'accessing') ----- + asStringOrText + "be fancy" + ^ self defaultFont familyName asText + addAttribute: (TextFontReference toFont: self defaultFont); + yourself! From commits at source.squeak.org Wed Jun 1 21:56:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 1 21:56:55 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160601215652.1165.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-June/068159.html Name: Collections-topa.694 Ancestors: Collections-mt.693 provide some sample text in Text ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068160.html Name: Graphics-topa.340 Ancestors: Graphics-bf.339 All fonts should know whether they have a glyph. Also, provide a sample text styled with a font. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068161.html Name: Morphic-topa.1155 Ancestors: Morphic-mt.1154 Let the fonts provide their sample ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068162.html Name: Multilingual-topa.213 Ancestors: Multilingual-pre.212 All fonts should know whether they have a glyph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068163.html Name: TrueType-topa.42 Ancestors: TrueType-topa.41 All fonts should know whether they have a glyph. For the way TT fonts currently work, this information is tricky to get, tho. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068164.html Name: Morphic-mt.1156 Ancestors: Morphic-topa.1155 If #mouseOverForKeyboardFocus is disabled, do not highlight (a.k.a. "look focused") background windows on mouse-enter, even if they are active due to the preference "Windows' Contents Are Always Active". Note that there is still a bug, which I intend to fix if the event filters make it into the trunk. Namely, if you "debug it" and expression via the context menu, the appearing debugger will not be the top window. An additional click is required. Sorry for this inconvenience. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068165.html Name: ToolBuilder-Morphic-mt.165 Ancestors: ToolBuilder-Morphic-cmm.164 Our list choosers use system windows. Request input for specific data. Use that to update the current keyboard focus. See #update:with: in pluggable list and text morphs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068166.html Name: Morphic-mt.1157 Ancestors: Morphic-mt.1156 Grab the keyboard focus if models request that. Models have to use the respective selectors (get or set) so that the correct widget will grab the keyboard focus. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068167.html Name: Graphics-topa.341 Ancestors: Graphics-topa.340 Let text styels present themselves ============================================= From dionisiydk at gmail.com Wed Jun 1 22:01:14 2016 From: dionisiydk at gmail.com (Denis Kudriashov) Date: Wed Jun 1 22:01:36 2016 Subject: [squeak-dev] 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: We have similar crash in Pharo by "200000 factorial" crash.dmp includes last record #digitMultiply:neg:. It is same as here. 2016-06-01 22:48 GMT+02:00 Bert Freudenberg : > On 01.06.2016, at 19:45, Eliot Miranda wrote: > > (2 raisedTo: 100000000) basicSize > > So which VM does it fail on? > > Mac Spur 5.0.3692 > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/83d0efbb/attachment.htm From eliot.miranda at gmail.com Thu Jun 2 00:26:39 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 2 00:26:42 2016 Subject: [squeak-dev] Formatting? In-Reply-To: <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> Message-ID: On Wed, Jun 1, 2016 at 1:45 PM, Bert Freudenberg wrote: > > > On 01.06.2016, at 17:46, Chris Muller wrote: > > > >>> The predominant style in Squeak historically has been > >>> > >>> coll do: [:each | each do something] > >>> > >>> Ken Beck uses that in his ?Best Practice Patterns? too. It?s also > produced > >>> by our formatter (but we rarely use that because it introduces weird > line > >>> breaks). > > > > Actually, Kent Beck advocates a Rectangular Block formatting pattern, > > I was mostly talking about the issue at hand, namely, whether to put > spaces inside of the brackets. Which he does not do. > > This is (not entirely by coincidence) the typographical convention in > English, too. > > That?s why I prefer it, independent of rectangular blocks or not. > > > which is NOT produced by our formatter, unless you merge > > Compiler-cmm.179 (which I've just recopied to the Inbox). I wasn't > > successful in convincing the community to adopt it six years ago. > > > > Besides the reasons already documented by Kents pattern, I like RB > > because it presents a semi-"tiled" view of the code similar to > > Scratch, but with textual, rather than graphical, tiles. Like this: > > > > coll do: > > [ :each | > > statement1. > > (condition1) ifTrue: [ statement2 ] ] > > > > I?d write it Kent Beck-style, namely > > > coll do: > [:each | > statement1. > (condition1) ifTrue: [statement2]] > +1 > > or maybe > > coll do: [:each | > statement1. > (condition1) ifTrue: [statement2]] > -1. Blocks braces should delineate rectangular areas for us visual thinkers. So it's fine if it fits on one line, but if it fits on two, break to a new line and indent please. > > > It is so much more OO than "textual" formatting like this: > > > > coll do: [ :each | > > statement1. > > (condition1) ifTrue: [ > > statement2. > > ] > > ] > > Agreed. I don?t think I?ve seen much of this style in Squeak. It?s ugly. > All to much of it exists in some places I won't illuminate. Agreed; I find it both horribly ugly and wasteful of screen real estate. > > > > I really don't notice any predominant style among different authors of > > Squeak, > > I do. Anything that?s not written in that style looks jarring to me. Like > Andreas? habit of omitting the space between a keyword message and a block > (ifTrue:[foo]). > +1. > > > and I don't think attempting to establish any kind of > > formatting standard or style would be counterproductive for the > > community (not that anyone is suggesting that). Instead, its probably > > best to let our individual imaginations flow the way they do, and let > > the IDE take care of each of us individually. Methods can be quickly > > and easily formatted on access and/or save. However, I do recommend, > > if one is only changing only one or two lines of a longer method, they > > should try to maintain the prior author's format. Also, never submit > > a change to trunk that ONLY changes the formatting of a method, > > please. > > IMHO readability suffers wth mixed styles. Be creative in your coding, not > in your formatting. I think it would be a good idea to adopt a style guide. > Beck?s would be a good starting point. > +1. But having a good formatter which can implement Kent's style guide would be nice. We're not there yet. I wonder if we should include a pr?cis of Kent;s guide in a workspace window in new releases. We could put a short guide/cheat sheet in one, and a formatting guide in another. - Bert - > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/6b70bd72/attachment-0001.htm From tim at rowledge.org Thu Jun 2 00:42:39 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 2 00:42:41 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> Message-ID: <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> Now I *don?t* like this > > coll do: > > [ :each | > > statement1. > > (condition1) ifTrue: [ statement2 ] ] At least if applied vigourously. When there are *short* statements I?d rather see coll do: [:each| statement] or coll do:[:each| (condition) ifTrue:[statement]] etc, keeping as much as possible nicely compact. I find pretty-print makes code far too ?tall? for my taste - oh and hardwrapping comments is really annoying! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Only playing with 51 cards. From eliot.miranda at gmail.com Thu Jun 2 01:19:12 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 2 01:19:16 2016 Subject: [squeak-dev] 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: Thanks all, On Wed, Jun 1, 2016 at 1:48 PM, Bert Freudenberg wrote: > On 01.06.2016, at 19:45, Eliot Miranda wrote: > > (2 raisedTo: 100000000) basicSize > > So which VM does it fail on? > > Mac Spur 5.0.3692 > > - Bert - OK, tis fixed in VMMaker.oscog-eem.1879. Reporting - 774 tallies, 6,836 msec. **Tree** ... [100 (6,836) [] SmalltalkEditor(TextEditor) evaluateSelectionAndDo: [ 100 (6,836) Compiler evaluate:in:to:notifying:ifFail:logged: [ 100 (6,836) Compiler evaluateCue:ifFail:logged: [ 100 (6,836) Compiler evaluateCue:ifFail: [ 100 (6,836) UndefinedObject DoIt [ 100 (6,836) AndreasSystemProfiler class spyOn: [ 100 (6,836) BlockClosure ensure: [ 100 (6,836) [] AndreasSystemProfiler class spyOn: [ 100 (6,836) AndreasSystemProfiler spyOn: [ 100 (6,836) BlockClosure ensure: [ 100 (6,836) [] UndefinedObject DoIt [ 100 (6,836) SmallInteger(Integer) timesRepeat: [ 100 (6,836) [[]] UndefinedObject DoIt [ 100 (6,836) SmallInteger(Number) raisedTo: [ 100 (6,836) SmallInteger(Number) raisedToInteger: [ 98.45 (6,730) LargePositiveInteger * [ 98.44 (6,730) LargePositiveInteger(Integer) * [ 98.44 (6,730) LargePositiveInteger(Integer) digitMultiply:neg: [ 50.36 (3,442) SmalltalkImage primitiveGarbageCollect [ 28.3 (1,935) LargePositiveInteger normalize [ 28.3 (1,935) LargePositiveInteger(Integer) growto: [ 28.26 (1,932) LargePositiveInteger(Integer) copyto: [ 28.26 (1,932) SmalltalkImage primitiveGarbageCollect **Leaves** 78.61 (5,374) SmalltalkImage primitiveGarbageCollect **Memory** old -16,777,216 bytes young +15,421,544 bytes used -1,355,672 bytes free -15,421,544 bytes **GCs** full 14 totalling 5,279ms (77.0% uptime), avg 377.0ms incr 1 totalling 0ms (0.0% uptime), avg 0.0ms tenures 0 root table 0 overflows **Processes** Total process switches: 1596 Without Profiler: 48 Stack page overflows: 4567 Stack page divorces: 15 -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160601/e62ae0c8/attachment.htm From commits at source.squeak.org Thu Jun 2 01:27:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 01:27:51 2016 Subject: [squeak-dev] The Inbox: Compiler-cmm.323.mcz Message-ID: A new version of Compiler was added to project The Inbox: http://source.squeak.org/inbox/Compiler-cmm.323.mcz ==================== Summary ==================== Name: Compiler-cmm.323 Author: cmm Time: 1 June 2016, 8:27:43.294651 pm UUID: 4dce5d55-dae2-416b-bbbc-41b4520dd577 Ancestors: Compiler-eem.322 Kent Beckian style "Rectangular Block" pretty printing. =============== Diff against Compiler-eem.322 =============== Item was added: + ----- Method: AssignmentNode>>isComplex (in category 'testing') ----- + isComplex + ^ value isComplex! Item was changed: ----- Method: AssignmentNode>>printOn:indent: (in category 'printing') ----- printOn: aStream indent: level variable printOn: aStream indent: level. aStream nextPutAll: ' := '. + value printOn: aStream indent: level! - value printOn: aStream indent: level + 2! Item was changed: ----- Method: BlockNode>>isComplex (in category 'testing') ----- isComplex + ^ statements size > 1 or: + [ (statements size = 1 and: [ statements first isComplex ]) or: + [ arguments size > 0 or: [ temporaries size > 0 ] ] ]! - - ^statements size > 1 or: [statements size = 1 and: [statements first isComplex]]! Item was changed: ----- Method: BlockNode>>printArgumentsOn:indent: (in category 'printing') ----- + printArgumentsOn: aStream indent: level - printArgumentsOn: aStream indent: level arguments size = 0 ifTrue: [^ self]. + arguments do: + [ : arg | + aStream nextPut: $: ; + " space;" + nextPutAll: arg key"; + space" ]. + aStream + space ; + nextPut: $|; + space! - arguments do: - [:arg | aStream nextPut: $:; nextPutAll: arg key; space]. - aStream nextPut: $|; space. - "If >0 args and >1 statement, put all statements on separate lines" - statements size > 1 ifTrue: - [aStream crtab: level]! Item was changed: ----- Method: BlockNode>>printOn:indent: (in category 'printing') ----- + printOn: aStream indent: level + aStream + nextPut: $[ "; + space". + self + printArgumentsOn: aStream + indent: level. + (self + printTemporaries: temporaries + on: aStream + doPrior: [ ] ) ifTrue: + [ "If >0 temps and >1 statement, put all statements on separate lines" + statements size > 1 + ifTrue: [ aStream crtab: level ] + ifFalse: [ aStream space] ] . + self + printStatementsOn: aStream + indent: level. + aStream + " space ;" + nextPut: $]! - printOn: aStream indent: level - - "statements size <= 1 ifFalse: [aStream crtab: level]." - aStream nextPut: $[. - self printArgumentsOn: aStream indent: level. - (self printTemporaries: temporaries on: aStream doPrior: []) ifTrue: - ["If >0 temps and >1 statement, put all statements on separate lines" - statements size > 1 - ifTrue: [aStream crtab: level] - ifFalse: [aStream space]]. - self printStatementsOn: aStream indent: level. - aStream nextPut: $]! Item was changed: ----- Method: BlockNode>>printWithClosureAnalysisArgumentsOn:indent: (in category 'printing') ----- printWithClosureAnalysisArgumentsOn: aStream indent: level arguments size = 0 ifTrue: [^self]. arguments do: [:tempNode | + aStream "space;" nextPut: $:. - aStream space; nextPut: $:. tempNode printDefinitionForClosureAnalysisOn: aStream]. + aStream nextPut: $|"; space". - aStream nextPut: $|; space. "If >0 args and >1 statement, put all statements on separate lines" statements size > 1 ifTrue: [aStream crtab: level]! Item was changed: ----- Method: BlockNode>>printWithClosureAnalysisOn:indent: (in category 'printing') ----- printWithClosureAnalysisOn: aStream indent: level + aStream nextPut: $["; space". - aStream nextPut: $[. blockExtent ifNotNil: [aStream print: blockExtent]. self printWithClosureAnalysisArgumentsOn: aStream indent: level. self printWithClosureAnalysisTemporariesOn: aStream indent: level. self printWithClosureAnalysisStatementsOn: aStream indent: level. + aStream "space;" nextPut: $]! - aStream nextPut: $]! Item was changed: ----- Method: BlockNode>>printWithClosureAnalysisTemporariesOn:indent: (in category 'printing') ----- + printWithClosureAnalysisTemporariesOn: aStream indent: level - printWithClosureAnalysisTemporariesOn: aStream indent: level - (temporaries == nil or: [temporaries size = 0]) ifFalse: [aStream nextPut: $|. + temporaries + do: + [: tempNode | tempNode printDefinitionForClosureAnalysisOn: aStream] + separatedBy: [aStream space]. + aStream nextPutAll: '|'. - temporaries do: - [:tempNode | - aStream space. - tempNode printDefinitionForClosureAnalysisOn: aStream]. - aStream nextPutAll: ' | '. "If >0 args and >1 statement, put all statements on separate lines" statements size > 1 ifTrue: [aStream crtab: level]]! Item was changed: ----- Method: BraceNode>>printOn:indent: (in category 'printing') ----- + printOn: aStream indent: level - printOn: aStream indent: level - aStream nextPut: ${. + 1 + to: elements size + do: + [ : i | + (elements at: i) + printOn: aStream + indent: level. + i < elements size ifTrue: + [ aStream + nextPutAll: '. ' ; + crtab: level ] ]. - 1 to: elements size do: - [:i | (elements at: i) printOn: aStream indent: level. - i < elements size ifTrue: [aStream nextPutAll: '. ']]. aStream nextPut: $}! Item was added: + ----- Method: CascadeNode>>isComplex (in category 'testing') ----- + isComplex + ^ true! Item was changed: ----- Method: CascadeNode>>printOn:indent:precedence: (in category 'printing') ----- printOn: aStream indent: level precedence: p + p > 0 ifTrue: [ aStream nextPut: $( ]. + messages first + printReceiver: receiver + on: aStream + indent: level. + 1 + to: messages size + do: + [ : i | + aStream crtab: level + 1. + (messages at: i) + printOn: aStream + indent: level. + i < messages size ifTrue: [ aStream nextPutAll: ' ;' ] ]. + p > 0 ifTrue: [ aStream nextPut: $) ]! - - p > 0 ifTrue: [aStream nextPut: $(]. - messages first printReceiver: receiver on: aStream indent: level. - 1 to: messages size do: - [:i | (messages at: i) printOn: aStream indent: level. - i < messages size ifTrue: - [aStream nextPut: $;. - messages first precedence >= 2 ifTrue: [aStream crtab: level + 1]]]. - p > 0 ifTrue: [aStream nextPut: $)]! Item was changed: ----- Method: MessageNode>>isComplex (in category 'testing') ----- isComplex + ^ (special + between: 1 + and: 10) + or: + [ arguments size > 1 + or: + [ receiver isComplex or: [ arguments anySatisfy: [ : each | each isComplex ] ] ] ]! - - ^(special between: 1 and: 10) or: [arguments size > 2 or: [receiver isComplex]]! Item was changed: ----- Method: MessageNode>>printIfOn:indent: (in category 'printing') ----- + printIfOn: aStream indent: level + receiver ifNotNil: + [ receiver + printOn: aStream + indent: level + precedence: precedence ]. + (arguments last isJust: NodeNil) ifTrue: [ ^ self + printKeywords: #ifTrue: + arguments: (Array with: arguments first) + on: aStream + indent: level ]. + (arguments last isJust: NodeFalse) ifTrue: [ ^ self + printKeywords: #and: + arguments: (Array with: arguments first) + on: aStream + indent: level ]. + (arguments first isJust: NodeNil) ifTrue: [ ^ self + printKeywords: #ifFalse: + arguments: (Array with: arguments last) + on: aStream + indent: level ]. + (arguments first isJust: NodeTrue) ifTrue: [ ^ self + printKeywords: #or: + arguments: (Array with: arguments last) + on: aStream + indent: level ]. + self + printKeywords: #ifTrue:ifFalse: + arguments: arguments + on: aStream + indent: level! - printIfOn: aStream indent: level - - receiver ifNotNil: - [receiver printOn: aStream indent: level + 1 precedence: precedence]. - (arguments last isJust: NodeNil) ifTrue: - [^self printKeywords: #ifTrue: arguments: (Array with: arguments first) - on: aStream indent: level]. - (arguments last isJust: NodeFalse) ifTrue: - [^self printKeywords: #and: arguments: (Array with: arguments first) - on: aStream indent: level]. - (arguments first isJust: NodeNil) ifTrue: - [^self printKeywords: #ifFalse: arguments: (Array with: arguments last) - on: aStream indent: level]. - (arguments first isJust: NodeTrue) ifTrue: - [^self printKeywords: #or: arguments: (Array with: arguments last) - on: aStream indent: level]. - self printKeywords: #ifTrue:ifFalse: arguments: arguments - on: aStream indent: level! Item was changed: ----- Method: MessageNode>>printKeywords:arguments:on:indent: (in category 'printing') ----- + printKeywords: key arguments: args on: aStream indent: level - printKeywords: key arguments: args on: aStream indent: level | keywords indent arg kwd doCrTab | args size = 0 ifTrue: + [ aStream + space ; + nextPutAll: key. + ^ self ]. - [aStream space; nextPutAll: key. - ^self]. keywords := key keywords. + doCrTab := args size > 1. + 1 + to: (args size min: keywords size) + do: + [ : i | arg := args at: i. + kwd := keywords at: i. + doCrTab + ifTrue: + [ aStream crtab: level + 1. + indent := 1 + "newline after big args" ] + ifFalse: + [ aStream space. + indent := 0 ]. + aStream nextPutAll: kwd. + arg isComplex + ifTrue: [ aStream crtab: level + indent + 1 ] + ifFalse: [ aStream space ]. + arg + printOn: aStream + indent: level + 1 + indent + precedence: + (precedence = 2 + ifTrue: [ 1 ] + ifFalse: [ precedence ]) ]! - doCrTab := args size > 2 - or: [{receiver} , args anySatisfy: - [:thisArg | - thisArg notNil - and: [thisArg isBlockNode - or: [thisArg isMessageNode and: [thisArg precedence >= 3]]]]]. - 1 to: (args size min: keywords size) do: - [:i | - arg := args at: i. - kwd := keywords at: i. - doCrTab - ifTrue: [aStream crtab: level+1. indent := 1] "newline after big args" - ifFalse: [aStream space. indent := 0]. - aStream nextPutAll: kwd; space. - arg printOn: aStream - indent: level + 1 + indent - precedence: (precedence = 2 ifTrue: [1] ifFalse: [precedence])]! Item was changed: ----- Method: ParseNode>>printSingleComment:on:indent: (in category 'private') ----- printSingleComment: aString on: aStream indent: indent + "Print the comment string, assuming it has been indented indent tabs. Break the string at word breaks, given the widths in the default font, at 450 points." + aStream nextPutAll: aString! - "Print the comment string, assuming it has been indented indent tabs. - Break the string at word breaks, given the widths in the default - font, at 450 points." - - | readStream word position lineBreak font wordWidth tabWidth spaceWidth lastChar | - readStream := ReadStream on: aString. - font := TextStyle default defaultFont. - tabWidth := TextConstants at: #DefaultTab. - spaceWidth := font widthOf: Character space. - position := indent * tabWidth. - lineBreak := 450. - [readStream atEnd] - whileFalse: - [word := self nextWordFrom: readStream setCharacter: [:lc | lastChar := lc]. - wordWidth := word inject: 0 into: [:width :char | width + (font widthOf: char)]. - position := position + wordWidth. - position > lineBreak - ifTrue: - [aStream skip: -1; crtab: indent. - position := indent * tabWidth + wordWidth + spaceWidth. - lastChar = Character cr - ifTrue: [[readStream peekFor: Character tab] whileTrue]. - word isEmpty ifFalse: [aStream nextPutAll: word; space]] - ifFalse: - [aStream nextPutAll: word. - readStream atEnd - ifFalse: - [position := position + spaceWidth. - aStream space]. - lastChar = Character cr - ifTrue: - [aStream skip: -1; crtab: indent. - position := indent * tabWidth. - [readStream peekFor: Character tab] whileTrue]]]! From asqueaker at gmail.com Thu Jun 2 01:28:50 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 2 01:29:33 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> Message-ID: > +1. But having a good formatter which can implement Kent's style guide > would be nice. We're not there yet. Why not give [1] a try? I've tweaked it to remove the spacing which you and Bert don't like. Even though I think its a mistake to remove this whitespace, we could at least have a pretty-print that is usable OOTB and based on a known and thought-out rationale that suits Smalltalk. Does anyone know the origins of the formatting we have now? [1] -- Compiler-cmm.323 in the Inbox. I believe its at least 90% Kent Beckian, but there are one or two corner-case bugs I couldn't figure out how to solve.. From tim at rowledge.org Thu Jun 2 01:53:46 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 2 01:53:50 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> Message-ID: <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> We-eell, I?ve built a VM with the ImmX11 plugin. And added your suggested hacks to the two methods. And started my vm with -vm-sound-alsa -vm-display-X11 -compositioninput etc and ? nothing much happens. It starts, it runs it behaves just as normal. The plugin is loaded and the CompositionWindowManager var is set. No extra pop-up windows. What am I missing? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Hipatitis (n): Terminal coolness From Yoshiki.Ohshima at acm.org Thu Jun 2 02:13:23 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jun 2 02:13:27 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> Message-ID: On Wed, Jun 1, 2016 at 6:53 PM, tim Rowledge wrote: > We-eell, I?ve built a VM with the ImmX11 plugin. And added your suggested hacks to the two methods. And started my vm with -vm-sound-alsa -vm-display-X11 -compositioninput etc and ? nothing much happens. It starts, it runs it behaves just as normal. The plugin is loaded and the CompositionWindowManager var is set. No extra pop-up windows. What am I missing? If the settings described below is not properly set, the behavior you mentioned is what is expected. (Even the settings below are there, you can still activate and deactivate the XIM client so it still can happen.) - The LC_ALL environment variable (and LANGUAGE, if I'm not mistaken) has to be set. The variable I believe has to be set for the X server so it has to be done before launching the X server. - an XIM client, such as ibus, scim, and Matchbox if I'm not mistaken, has to be running. - and the XIM client is configured to handle the language set to LC_ALL. (On the Raspbian environment, you see an icon in the menu bar, where you can see what languages it handles.) With those, start a Squeak session. You can activate/deactivate the XIM client by its own key combination. When you try to type into a text field in Squeak, the overlay would be displayed around the text field. If you have a spare Raspian installation, you can do the following: (But I am writing this from my memory, so it may not be exactly correct. Sorry). - From raspi-config, go to the "Internationalisation Options" and add ja_JP.UTF8. - From terminal install a few things: sudo apt-get install ibus sudo apt-get install ibus-anthy This will add a new menu item to the Raspian menu. IIRC, you need to "add language" and select Japanese from the ibus configuration menu. - Add the following lines to .bashrc export LANG=ja_jp.UTF8 export LC_ALL=$LANG export LANGUAGE=$LANG close X, do something like ". .bashrc" and restart X. You should see that Raspian menus are shown in Japanese. (You can still start raspi-config later and remove Japanese, so don't panic) - Start Scratch, activate ibus from the ibus icon in the Raspian menu (choose Japanese/???), click on somewhere such as the sprite name field. - type in some strings with enough vowels in it. Hit enter and composed characters should go into the text field. -- -- Yoshiki From leves at caesar.elte.hu Thu Jun 2 06:18:20 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Jun 2 06:18:24 2016 Subject: [squeak-dev] The Inbox: Compiler-cmm.323.mcz In-Reply-To: References: Message-ID: If you have a look at the diff here, you'll see why using the pretty printer is such a bad idea: > Item was changed: > ----- Method: BraceNode>>printOn:indent: (in category 'printing') ----- > + printOn: aStream indent: level > - printOn: aStream indent: level > - > aStream nextPut: ${. > + 1 > + to: elements size > + do: > + [ : i | > + (elements at: i) > + printOn: aStream > + indent: level. > + i < elements size ifTrue: > + [ aStream > + nextPutAll: '. ' ; > + crtab: level ] ]. > - 1 to: elements size do: > - [:i | (elements at: i) printOn: aStream indent: level. > - i < elements size ifTrue: [aStream nextPutAll: '. ']]. > aStream nextPut: $}! Levente From lists at fniephaus.com Thu Jun 2 10:12:29 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Thu Jun 2 10:12:42 2016 Subject: [squeak-dev] 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: Thanks, Eliot! On Thu, Jun 2, 2016 at 3:19 AM Eliot Miranda wrote: > Thanks all, > > On Wed, Jun 1, 2016 at 1:48 PM, Bert Freudenberg > wrote: > >> On 01.06.2016, at 19:45, Eliot Miranda wrote: >> > (2 raisedTo: 100000000) basicSize >> > So which VM does it fail on? >> >> Mac Spur 5.0.3692 >> >> - Bert - > > > OK, tis fixed in VMMaker.oscog-eem.1879. > > Reporting - 774 tallies, 6,836 msec. > > **Tree** > ... > [100 (6,836) [] SmalltalkEditor(TextEditor) evaluateSelectionAndDo: > [ 100 (6,836) Compiler evaluate:in:to:notifying:ifFail:logged: > [ 100 (6,836) Compiler evaluateCue:ifFail:logged: > [ 100 (6,836) Compiler evaluateCue:ifFail: > [ 100 (6,836) UndefinedObject DoIt > [ 100 (6,836) AndreasSystemProfiler class spyOn: > [ 100 (6,836) BlockClosure ensure: > [ 100 (6,836) [] AndreasSystemProfiler class spyOn: > [ 100 (6,836) AndreasSystemProfiler spyOn: > [ 100 (6,836) BlockClosure ensure: > [ 100 (6,836) [] UndefinedObject DoIt > [ 100 (6,836) SmallInteger(Integer) timesRepeat: > [ 100 (6,836) [[]] UndefinedObject DoIt > [ 100 (6,836) SmallInteger(Number) raisedTo: > [ 100 (6,836) SmallInteger(Number) > raisedToInteger: > [ 98.45 (6,730) LargePositiveInteger * > [ 98.44 (6,730) > LargePositiveInteger(Integer) * > [ 98.44 (6,730) > LargePositiveInteger(Integer) digitMultiply:neg: > [ 50.36 (3,442) SmalltalkImage > primitiveGarbageCollect > [ 28.3 (1,935) LargePositiveInteger > normalize > [ 28.3 (1,935) > LargePositiveInteger(Integer) growto: > [ 28.26 (1,932) > LargePositiveInteger(Integer) copyto: > [ 28.26 (1,932) SmalltalkImage > primitiveGarbageCollect > **Leaves** > 78.61 (5,374) SmalltalkImage primitiveGarbageCollect > > **Memory** > old -16,777,216 bytes > young +15,421,544 bytes > used -1,355,672 bytes > free -15,421,544 bytes > > **GCs** > full 14 totalling 5,279ms (77.0% uptime), avg 377.0ms > incr 1 totalling 0ms (0.0% uptime), avg 0.0ms > tenures 0 > root table 0 overflows > > **Processes** > Total process switches: 1596 > Without Profiler: 48 > Stack page overflows: 4567 > Stack page divorces: 15 > > > > > -- > _,,,^..^,,,_ > best, Eliot > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/217a0e95/attachment.htm From bert at freudenbergs.de Thu Jun 2 10:24:38 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Jun 2 10:24:42 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> Message-ID: <913182FE-1E10-47AD-9C24-6C47EB0C70D2@freudenbergs.de> On 02.06.2016, at 03:19, Eliot Miranda wrote: > OK, tis fixed in VMMaker.oscog-eem.1879. > > Reporting - 774 tallies, 6,836 msec. Nice! Is this finally a benchmark where SqueakJS can beat other VMs? [10 timesRepeat: [(2 raisedTo: 100000000) basicSize]] timeToRun Interp: 18042 ms Cog: 7965 ms Spur: ? SqueakJS: 2821 ms (*) :D - Bert - (*) http://bertfreudenberg.github.io/SqueakJS/run/#url=http://freudenbergs.de/bert/squeakjs&files=[Squeak4.5-13680.image,Squeak4.5-13680.changes,SqueakV41.sources] -------------- 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/20160602/5c65ad0f/smime.bin From Marcel.Taeumel at hpi.de Thu Jun 2 13:55:19 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jun 2 14:33:16 2016 Subject: [squeak-dev] How/when should tools grab the keyboard? Message-ID: <1464875719661-4898814.post@n4.nabble.com> Hi, there. If you enable the following preferences. [x] mouseOverForKeyboardFocus [x] Windows' Contents Are Always Active You might be suprised that, for example, CMD+I opens an inspector but the keyboard focus is still in the current tool, maybe a workspace. Even if you disable "mouseOverForKeyboardFocus", the workspace will keep its keyboard focus. If you also disable "Window's Contents Are Always Active", at least the new window looks focused, although no widget insided grabbed the focus. Actually, no widget will have the keyboard focus then. So, I added focus grabbing for lists and text morphs. I used it for our list chooser: http://forum.world.st/The-Trunk-Morphic-mt-1157-mcz-tp4898664.html http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-165-mcz-tp4898662.html It is quite simple. Models can say "self changed: #inputRequested with: #someSelector" and the correct widget will grab the keyboard. Easy for the list chooser because you want to type in a filter and hit return to choose. (Try it out in the code browser category list via CMD+F to find a class.) But what about other tools? System Browser Inspector Object Explorer ... Any idea which widgets should grab the keyboard focus if opened? The first list? The code widget? We can make different choices for each tool. Suggestions are welcome. This discussion affects general keyboard interaction in Squeak. Passionate mouse users will not notice any problem, though. ;o) Best, Marcel -- View this message in context: http://forum.world.st/How-when-should-tools-grab-the-keyboard-tp4898814.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Jun 2 14:49:48 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 2 14:49:53 2016 Subject: [squeak-dev] Formatting? In-Reply-To: <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> Message-ID: Hi Tim, > On Jun 1, 2016, at 5:42 PM, tim Rowledge wrote: > > Now I *don?t* like this > >>> coll do: >>> [ :each | >>> statement1. >>> (condition1) ifTrue: [ statement2 ] ] > > At least if applied vigourously. When there are *short* statements I?d rather see > coll do: [:each| statement] > or > coll do:[:each| (condition) ifTrue:[statement]] > etc, keeping as much as possible nicely compact. That's just what Kent's style guide recommends. If the block fits comfortably on one line then by all means put it in one line. The primary constraint is that the block braces form the top left and bottom right of a rectangle which contains all of the block's text. So a one line block trivially satisfies that. The main thing this precludes is attaching the opening brace to the end of an ifTrue:/ifFalse; far to the right of the start of the first line of the block; braceAtTheEndOfLine ifTrue: [ (this isA: #Monstrosity) because: blocks are objects not syntax]. > I find pretty-print makes code far too ?tall? for my taste - oh and hardwrapping comments is really annoying! +1 & +1 > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Only playing with 51 cards. > > > > From leves at caesar.elte.hu Thu Jun 2 15:19:36 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Jun 2 15:19:39 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> Message-ID: On Thu, 2 Jun 2016, Eliot Miranda wrote: > Hi Tim, > >> On Jun 1, 2016, at 5:42 PM, tim Rowledge wrote: >> >> Now I *don?t* like this >> >>>> coll do: >>>> [ :each | >>>> statement1. >>>> (condition1) ifTrue: [ statement2 ] ] >> >> At least if applied vigourously. When there are *short* statements I?d rather see >> coll do: [:each| statement] >> or >> coll do:[:each| (condition) ifTrue:[statement]] >> etc, keeping as much as possible nicely compact. > > That's just what Kent's style guide recommends. If the block fits comfortably on one line then by all means put it in one line. The primary constraint is that the block braces form the top left and bottom right of a rectangle which contains all of the block's text. So a one line block trivially satisfies that. The main thing this precludes is attaching the opening brace to the end of an ifTrue:/ifFalse; far to the right of the start of the first line of the block; > > braceAtTheEndOfLine ifTrue: [ > (this isA: #Monstrosity) because: > blocks are objects not syntax]. This is absolutely personal preference, but I prefer to have blocks have similar syntax as methods, because that makes it easier to read code. This means that the first line, which contains the opening bracket and the argument names, is far less important than what the block does, so it's perfectly okay to leave it on the previous line. The indentation tells where the block starts and ends. What Chris did with the arguments, the additional spaces around variable names, is a step towards this, because that's exactly how you would write it, if it were a method. And methods are objects as well; still you leave a tab at the beginning of each line, don't you? :) Levente > >> I find pretty-print makes code far too ?tall? for my taste - oh and hardwrapping comments is really annoying! > > +1 & +1 > >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful random insult:- Only playing with 51 cards. >> >> >> >> > > From commits at source.squeak.org Thu Jun 2 15:59:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 15:59:33 2016 Subject: [squeak-dev] The Trunk: Collections-ul.695.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.695.mcz ==================== Summary ==================== Name: Collections-ul.695 Author: ul Time: 2 June 2016, 5:48:18.403513 pm UUID: be1e0401-02a2-49e4-827f-fe0fee861114 Ancestors: Collections-topa.694 Heap revamp #1: class side: - Heaps can be created on an existing array with #on: #on:size: and #on:size:sortBlock: - #withAll: and #withAll:sortBlock: avoid creating an extra copy if the argument is already an Array instance side: - imported and improved #= from Pharo - #growTo: won't raise an error when newSize is less than array size (e.g. during compaction) - #sortBlock: restores the heap invariant on its own - improved #select:, #collect, #at:, #removeAt:, #add: - added #sort and #compact; compatible with other collections - #capacity returns the real capacity - inlined #sorts:before: and #indexUpdateBlock: for performance - improved performance and legibility of the heap operations #upHeap: #downHeap: and #downHeapSingle: - added #isValidHeap - added some comments =============== Diff against Collections-topa.694 =============== Item was added: + ----- Method: Heap class>>on: (in category 'instance creation') ----- + on: anArray + "Create a new heap using anArray as the internal array" + + ^self on: anArray size: anArray size sortBlock: nil! Item was added: + ----- Method: Heap class>>on:size: (in category 'instance creation') ----- + on: anArray size: size + "Create a new heap using the first size elements of anArray as the internal array" + + ^self + on: anArray + size: size + sortBlock: nil! Item was added: + ----- Method: Heap class>>on:size:sortBlock: (in category 'instance creation') ----- + on: anArray size: size sortBlock: aBlockOrNil + "Create a new heap using the first size elements of anArray as the internal array and sorted by aBlockOrNil" + + anArray isArray ifFalse: [ self error: 'Array expected.' ]. + anArray size < size ifTrue: [ self error: 'size must not be larger than anArray size' ]. + ^super new + setCollection: anArray tally: size; + sortBlock: aBlockOrNil; + yourself! Item was changed: ----- Method: Heap class>>withAll: (in category 'instance creation') ----- withAll: aCollection "Create a new heap with all the elements from aCollection" + + ^self withAll: aCollection sortBlock: nil! - ^(self basicNew) - setCollection: aCollection asArray copy tally: aCollection size; - reSort; - yourself! Item was changed: ----- Method: Heap class>>withAll:sortBlock: (in category 'instance creation') ----- withAll: aCollection sortBlock: sortBlock + "Create a new heap with all the elements from aCollection, sorted by sortBlock" + + | array | + array := aCollection asArray. + array == aCollection ifTrue: [ array := array copy ]. + ^self on: array size: array size sortBlock: sortBlock! - "Create a new heap with all the elements from aCollection" - ^(self basicNew) - setCollection: aCollection asArray copy tally: aCollection size; - sortBlock: sortBlock; - yourself! Item was changed: ----- Method: Heap>>= (in category 'comparing') ----- = anObject + "Heap are considered to be equal when they have the same sortBlock and the same elements. This method is expensive due to the sorted copies of the arrays. Try not to use it." + self == anObject ifTrue: [ ^true ]. + anObject isHeap ifFalse: [ ^false ]. + anObject size = tally ifFalse: [ ^false ]. + anObject sortBlock = sortBlock ifFalse: [ ^false ]. + ^((array first: tally) sort: sortBlock) = ((anObject array first: tally) sort: sortBlock)! - ^ self == anObject - ifTrue: [true] - ifFalse: [anObject isHeap - ifTrue: [sortBlock = anObject sortBlock and: [super = anObject]] - ifFalse: [super = anObject]]! Item was changed: ----- Method: Heap>>add: (in category 'adding') ----- add: anObject "Include newObject as one of the receiver's elements. Answer newObject." + tally = array size ifTrue:[self grow]. array at: (tally := tally + 1) put: anObject. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: anObject value: tally ]. - self updateObjectIndex: tally. self upHeap: tally. ^anObject! Item was changed: ----- Method: Heap>>at: (in category 'accessing') ----- at: index "Return the element at the given position within the receiver" + + index > tally ifTrue: [ ^self errorSubscriptBounds: index ]. - (index < 1 or:[index > tally]) ifTrue:[^self errorSubscriptBounds: index]. ^array at: index! Item was added: + ----- Method: Heap>>capacity (in category 'accessing') ----- + capacity + "Answer the current capacity of the receiver." + + ^array size! Item was changed: ----- Method: Heap>>collect: (in category 'enumerating') ----- collect: aBlock + + ^(array first: tally) replace: aBlock! - ^self collect: aBlock as: Array! Item was added: + ----- Method: Heap>>compact (in category 'growing') ----- + compact + "Remove any empty slots in the receiver." + + self growTo: self size.! Item was changed: ----- Method: Heap>>downHeap: (in category 'private-heap') ----- downHeap: anIndex "Check the heap downwards for correctness starting at anIndex. Everything above (i.e. left of) anIndex is ok." + + | childIndex childValue index value | + index := anIndex. - | value k n j | - anIndex = 0 ifTrue:[^self]. - n := tally bitShift: -1. - k := anIndex. value := array at: anIndex. + [ (childIndex := 2 * index) >= tally or: [ + "Select the child with the larger value. We know there are two children." + childValue := array at: childIndex. + (sortBlock + ifNil: [ (array at: childIndex + 1) <= childValue ] + ifNotNil: [ sortBlock value: (array at: childIndex + 1) value: childValue ]) + ifTrue: [ + childValue := array at: (childIndex := childIndex + 1) ]. + "Check if the value at index is at the right position." + sortBlock + ifNil: [ value <= childValue ] + ifNotNil: [ sortBlock value: value value: childValue ] ] ] + whileFalse: [ + "Move value downwards the tree." + array at: index put: childValue. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: childValue value: index ]. + "Contine from childIndex" + index := childIndex ]. + childIndex = tally ifTrue: [ "Special case: there's only one child." + "Check if the value at index is at the right position." + childValue := array at: childIndex. + (sortBlock + ifNil: [ value <= childValue ] + ifNotNil: [ sortBlock value: value value: childValue ]) + ifFalse: [ + "Move value downwards the tree." + array at: index put: childValue. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: childValue value: index ]. + "Contine from childIndex" + index := childIndex ] ]. + array at: index put: value. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: value value: index ]! - [k <= n] whileTrue:[ - j := k + k. - "use max(j,j+1)" - (j < tally and:[self sorts: (array at: j+1) before: (array at: j)]) - ifTrue:[ j := j + 1]. - "check if position k is ok" - (self sorts: value before: (array at: j)) - ifTrue:[ "yes -> break loop" - n := k - 1] - ifFalse:[ "no -> make room at j by moving j-th element to k-th position" - array at: k put: (array at: j). - self updateObjectIndex: k. - "and try again with j" - k := j]]. - array at: k put: value. - self updateObjectIndex: k.! Item was changed: ----- Method: Heap>>downHeapSingle: (in category 'private-heap') ----- downHeapSingle: anIndex "This version is optimized for the case when only one element in the receiver can be at a wrong position. It avoids one comparison at each node when travelling down the heap and checks the heap upwards after the element is at a bottom position. Since the probability for being at the bottom of the heap is much larger than for being somewhere in the middle this version should be faster." + + | childIndex index value | + index := anIndex. - | value k n j | - anIndex = 0 ifTrue:[^self]. - n := tally bitShift: -1. - k := anIndex. value := array at: anIndex. + [ (childIndex := 2 * index) < tally ] whileTrue:[ + "Select the child with the larger value. We know there are two children." + (sortBlock + ifNil: [ (array at: childIndex + 1) <= (array at: childIndex) ] + ifNotNil: [ sortBlock value: (array at: childIndex + 1) value: (array at: childIndex) ]) + ifTrue: [ childIndex := childIndex + 1 ]. + array at: index put: (array at: childIndex). + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: (array at: index) value: index ]. + "and repeat at the next level" + index := childIndex ]. + childIndex = tally ifTrue: [ "Child with no sibling" + array at: index put: (array at: childIndex). + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: (array at: index) value: index ]. + index := childIndex ]. + array at: index put: value. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: value value: index ]. + self upHeap: index! - [k <= n] whileTrue:[ - j := k + k. - "use max(j,j+1)" - (j < tally and:[self sorts: (array at: j+1) before: (array at: j)]) - ifTrue:[ j := j + 1]. - array at: k put: (array at: j). - self updateObjectIndex: k. - "and try again with j" - k := j]. - array at: k put: value. - self updateObjectIndex: k. - self upHeap: k! Item was changed: ----- Method: Heap>>growTo: (in category 'growing') ----- growTo: newSize "Grow to the requested size." + | newArray | newArray := Array new: (newSize max: tally). + newArray replaceFrom: 1 to: tally with: array startingAt: 1. - newArray replaceFrom: 1 to: array size with: array startingAt: 1. array := newArray! Item was changed: ----- Method: Heap>>indexUpdateBlock: (in category 'accessing') ----- indexUpdateBlock: aBlockOrNil + "aBlockOrNil is either nil or a two argument block. The first argument is the object whose index has changed in the heap, the second is the new index. The block will be evaluated whenever an element is moved in the heap's internal array. If you don't plan to remove elements by index (see #removeAt:), then you should not set this block." indexUpdateBlock := aBlockOrNil. ! Item was added: + ----- Method: Heap>>isValidHeap (in category 'testing') ----- + isValidHeap + + "Check the size first." + (tally between: 0 and: array size) ifFalse: [ ^false ]. + "Check the sort order between parent and child nodes." + 1 to: (tally bitShift: -1) do: [ :index | + | childIndex | + childIndex := 2 * index. + sortBlock + ifNil: [ (array at: index) <= (array at: childIndex) ifFalse: [ ^false ] ] + ifNotNil: [ (sortBlock value: (array at: index) value: (array at: childIndex)) ifFalse: [ ^false ] ]. + childIndex < tally ifTrue: [ + childIndex := childIndex + 1. + sortBlock + ifNil: [ (array at: index) <= (array at: childIndex) ifFalse: [ ^false ] ] + ifNotNil: [ (sortBlock value: (array at: index) value: (array at: childIndex)) ifFalse: [ ^false ] ] ] ]. + "Check for elements left in array after tally." + tally + 1 to: array size do: [ :index | + (array at: index) ifNotNil: [ ^false ] ]. + ^true! Item was changed: ----- Method: Heap>>privateRemoveAt: (in category 'private') ----- privateRemoveAt: index + "Remove the element at the given index and make sure the sorting order is okay. The value of index must not be larger than tally." + - "Remove the element at the given index and make sure the sorting order is okay" | removed | removed := array at: index. + index = tally ifTrue: [ + array at: index put: nil. + tally := tally - 1. + ^removed ]. + array + at: index put: (array at: tally); + at: tally put: nil. - array at: index put: (array at: tally). - array at: tally put: nil. tally := tally - 1. + 2 * index <= tally "The node at index has at least one child." + ifTrue: [ self downHeapSingle: index ] + ifFalse: [ self upHeap: index ]. - index > tally ifFalse:[ - "Use #downHeapSingle: since only one element has been removed" - self downHeapSingle: index]. ^removed! Item was changed: ----- Method: Heap>>privateReverseSort (in category 'private') ----- privateReverseSort "Arrange to have the array sorted in reverse order. WARNING: this method breaks the heap invariants. It's up to the sender to restore them afterwards." + | oldTally | + self deprecated: 'Use #sort if you want to sort.'. oldTally := tally. [tally > 1] whileTrue: [array swap: 1 with: tally. tally := tally - 1. self downHeapSingle: 1]. tally := oldTally! Item was changed: ----- Method: Heap>>removeAt: (in category 'removing') ----- removeAt: index + "Remove the element at the given index and make sure the sorting order is okay." + + index > tally ifTrue: [ self errorSubscriptBounds: index ]. - "Remove the element at given position" - (index < 1 or:[index > tally]) ifTrue:[^self errorSubscriptBounds: index]. ^self privateRemoveAt: index! Item was changed: ----- Method: Heap>>select: (in category 'enumerating') ----- select: aBlock "Evaluate aBlock with each of my elements as the argument. Collect into a new collection like the receiver, only those elements for which aBlock evaluates to true." | newCollection | newCollection := self copyEmpty. + 1 to: tally do: [ :index | + | element | + (aBlock value: (element := array at: index)) ifTrue: [ + newCollection add: element ] ]. - self do: - [:each | - (aBlock value: each) - ifTrue: [newCollection add: each]]. ^ newCollection! Item was added: + ----- Method: Heap>>sort (in category 'sorting') ----- + sort + "Fully sort the heap. This method preserves the heap invariants and can thus be sent safely" + + | start end element originalIndexUpdateBlock | + end := tally. + "Temporarly remove indexUpdateBlock to speed up sorting." + originalIndexUpdateBlock := indexUpdateBlock. + indexUpdateBlock := nil. + [ tally > 1 ] whileTrue: [ + element := array at: tally. + array + at: tally put: (array at: 1); + at: 1 put: element. + tally := tally - 1. + self downHeapSingle: 1 ]. + tally := end. + start := 1. + originalIndexUpdateBlock ifNil: [ + "The was no indexUpdateBlock; just reverse the elements" + [ start < end ] whileTrue: [ + element := array at: start. + array + at: start put: (array at: end); + at: end put: element. + start := start + 1. + end := end - 1 ]. + ^self ]. + "Restore indexUpdateBlock, reverse the elements and update the indices." + indexUpdateBlock := originalIndexUpdateBlock. + start := 1. + [ start < end ] whileTrue: [ + | endValue | + element := array at: start. + endValue := array at: end. + array + at: start put: endValue; + at: end put: element. + indexUpdateBlock + value: endValue value: start; + value: element value: end. + start := start + 1. + end := end - 1 ]. + start = end ifTrue: [ indexUpdateBlock value: (array at: start) value: start ]! Item was changed: ----- Method: Heap>>sortBlock: (in category 'accessing') ----- sortBlock: aBlock + + | oldIndexUpdateBlock | sortBlock := aBlock. + "Restore the heap invariant." + tally <= 1 ifTrue: [ ^self ]. + oldIndexUpdateBlock := indexUpdateBlock. + indexUpdateBlock := nil. + (tally bitShift: -1) to: 1 by: -1 do: [ :index | self downHeap: index ]. + indexUpdateBlock := oldIndexUpdateBlock ifNil: [ ^self ]. + 1 to: tally do: [ :index | + indexUpdateBlock value: (array at: index) value: index ] + + ! - self reSort.! Item was changed: ----- Method: Heap>>upHeap: (in category 'private-heap') ----- upHeap: anIndex "Check the heap upwards for correctness starting at anIndex. Everything below anIndex is ok." + + | index parentValue parentIndex value | + anIndex = 1 ifTrue: [ ^self ]. + value := array at: (index := anIndex). + [ index > 1 and: [ + parentValue := array at: (parentIndex := index bitShift: -1). + sortBlock + ifNil: [ value <= parentValue ] + ifNotNil: [ sortBlock value: value value: parentValue ] ] ] + whileTrue: [ + array at: index put: parentValue. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: parentValue value: index ]. + index := parentIndex ]. + array at: index put: value. + indexUpdateBlock ifNotNil: [ indexUpdateBlock value: value value: index ]! - | value k kDiv2 tmp | - anIndex = 0 ifTrue:[^self]. - k := anIndex. - value := array at: anIndex. - [ (k > 1) and:[self sorts: value before: (tmp := array at: (kDiv2 := k bitShift: -1))] ] - whileTrue:[ - array at: k put: tmp. - self updateObjectIndex: k. - k := kDiv2]. - array at: k put: value. - self updateObjectIndex: k.! From commits at source.squeak.org Thu Jun 2 15:59:38 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 15:59:40 2016 Subject: [squeak-dev] The Trunk: Collections-ul.696.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.696.mcz ==================== Summary ==================== Name: Collections-ul.696 Author: ul Time: 2 June 2016, 5:58:47.938458 pm UUID: 0ec3a2e6-cd17-46b2-970f-2c1dc1227411 Ancestors: Collections-ul.695 - added #quickSort and #quickSort: to ArrayedCollection =============== Diff against Collections-ul.695 =============== Item was added: + ----- Method: ArrayedCollection>>quickSort (in category 'sorting') ----- + quickSort + "Sort elements of self to be nondescending according to #<= using an in-place quicksort with simple median-of-three partitioning with guaranteed O(log(n)) space usage." + + self quickSortFrom: 1 to: self size by: nil! Item was added: + ----- Method: ArrayedCollection>>quickSort: (in category 'sorting') ----- + quickSort: sortBlock + "Sort elements of self to be nondescending according to sortBlock using an in-place quicksort with simple median-of-three partitioning with guaranteed O(log(n)) space usage." + + self quickSortFrom: 1 to: self size by: sortBlock! From commits at source.squeak.org Thu Jun 2 15:59:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 15:59:57 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.263.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.263.mcz ==================== Summary ==================== Name: CollectionsTests-ul.263 Author: ul Time: 2 June 2016, 5:49:02.940363 pm UUID: caaf5382-04e8-47fb-9db3-9b5e97cb3aed Ancestors: CollectionsTests-mt.262 - added a few more heap tests =============== Diff against CollectionsTests-mt.262 =============== Item was changed: ----- Method: HeapTest>>heapSortExample (in category 'examples') ----- + heapSortExample + "Sort a random collection of Floats and compare the results with #quicksort and #sort (using the merge-sort algorithm)." + "HeapTest new heapSortExample" + + | arrayToSort n rnd array time | + Smalltalk garbageCollectMost. + n := 50000. "# of elements to sort" - heapSortExample "HeapTest new heapSortExample" - "Sort a random collection of Floats and compare the results with - SortedCollection (using the quick-sort algorithm) and - ArrayedCollection>>mergeSortFrom:to:by: (using the merge-sort algorithm)." - | n rnd array time sorted | - n := 10000. "# of elements to sort" rnd := Random new. + array := Array new: n. + 1 to: n do: [ :index | array at: index put: rnd next ]. + arrayToSort := array copy. - array := (1 to: n) collect:[:i| rnd next]. "First, the heap version" + self deny: arrayToSort isSorted. + time := [ (Heap on: arrayToSort) sort ] timeToRun. + self assert: arrayToSort isSorted. + Transcript cr; show: 'Time for heap-sort: ', time printString,' msecs'. - time := Time millisecondsToRun:[ - sorted := Heap withAll: array. - 1 to: n do:[:i| sorted removeFirst]. - ]. - Transcript cr; show:'Time for heap-sort: ', time printString,' msecs'. "The quicksort version" + arrayToSort copyFrom: array. + self deny: arrayToSort isSorted. + time := [ arrayToSort quickSort ] timeToRun. + self assert: arrayToSort isSorted. + Transcript cr; show: 'Time for quick-sort: ', time printString,' msecs'. - time := Time millisecondsToRun:[ - sorted := SortedCollection withAll: array. - ]. - Transcript cr; show:'Time for quick-sort: ', time printString,' msecs'. "The merge-sort version" + arrayToSort copyFrom: array. + self deny: arrayToSort isSorted. + time := [ arrayToSort sort ] timeToRun. + self assert: arrayToSort isSorted. + Transcript cr; show: 'Time for merge-sort: ', time printString,' msecs'! - time := Time millisecondsToRun:[ - array mergeSortFrom: 1 to: array size by: [:v1 :v2| v1 <= v2]. - ]. - Transcript cr; show:'Time for merge-sort: ', time printString,' msecs'. - ! Item was changed: + ----- Method: HeapTest>>test1 (in category 'tests') ----- - ----- Method: HeapTest>>test1 (in category 'testing') ----- test1 | data | "The first element of each array is the sort value, and the second will be updated by the heap with the index of the element within the heap." data := (1 to: 8) collect: [:i | {i*2. 0}]. "Repeat with different data ordering." 5 timesRepeat: [ | h | h := Heap new sortBlock: [:e1 :e2 | e1 first < e2 first]. h indexUpdateBlock: [:array :index | array at: 2 put: index]. data shuffled do: [:d | h add: d]. data do: [:d | self should: (h at: d second) == d]. ]! Item was changed: + ----- Method: HeapTest>>testAdd (in category 'tests') ----- - ----- Method: HeapTest>>testAdd (in category 'basic tests') ----- testAdd "self run: #testAdd" | heap | heap := Heap new. self assert: heap size = 0. heap add: 3. self assert: heap size = 1. self assert: heap isEmpty not. self assert: heap first = 3. self assert: (heap at: 1) = 3. heap add: 2. self assert: heap size = 2. self assert: heap first = 2. self assert: (heap at: 2) = 3. ! Item was added: + ----- Method: HeapTest>>testAddAndRemoveFirst (in category 'tests') ----- + testAddAndRemoveFirst + + | random heap validateHeap | + random := Random seed: 36rSqueak. + heap := Heap sortBlock: [ :a :b | a first >= b first ]. + heap indexUpdateBlock: [ :element :newIndex | element at: 2 put: newIndex ]. + validateHeap := [ heap isValidHeap and: [ + heap do: [ :each | self assert: (heap at: each second) == each ] ] ]. + validateHeap value. + self assert: 0 equals: heap size. + self assert: heap isEmpty. + 1 to: 100 do: [ :index | + heap add: { random next. nil }. + self assert: index equals: heap size. + validateHeap value ]. + 1000 timesRepeat: [ + | first | + first := heap removeFirst. + heap do: [ :each | self assert: (heap sortBlock value: first value: each) ]. + heap add: { random next. nil }. + validateHeap value ]! Item was changed: + ----- Method: HeapTest>>testAt (in category 'tests') ----- - ----- Method: HeapTest>>testAt (in category 'basic tests') ----- testAt "self run: #testAt" | heap | heap := Heap new. heap add: 3. self assert: (heap at: 1) = 3. self should: [heap at: 2] raise: Error. heap add: 4. self assert: (heap at: 1) = 3. self assert: (heap at: 2) = 4. ! Item was added: + ----- Method: HeapTest>>testAtRaisesErrorWhenIndexIsInvalid (in category 'tests') ----- + testAtRaisesErrorWhenIndexIsInvalid + " self run: #testAtRaisesErrorWhenIndexIsInvalid " + + | heap | + heap := Heap new. + 1 to: 100 do: [ :index | + 1 to: heap size do: [ :each | + self assert: ((heap at: each) between: 1 and: heap size) ]. + self + should: [ heap at: 0 ] raise: Error; + should: [ heap at: heap size + 1 ] raise: Error. + heap add: index ].! Item was added: + ----- Method: HeapTest>>testCompact (in category 'tests') ----- + testCompact + " self run: #testCompact " + + | heap | + heap := Heap new. + 1 to: 100 do: [ :index | + | copy | + copy := heap copy. + copy compact. + self + assert: copy = heap; + assert: copy capacity <= heap capacity; + assert: copy capacity = copy size. + heap add: index ].! Item was added: + ----- Method: HeapTest>>testCopy (in category 'tests') ----- + testCopy + + | heap | + heap := Heap new. + 1 to: 100 do: [ :index | + | copy | + copy := heap copy. + self + assert: copy = heap; + assert: heap = copy; + deny: copy == heap; + assert: copy sortBlock = heap sortBlock; + deny: copy array == heap array. + heap add: index ].! Item was added: + ----- Method: HeapTest>>testCopyEmpty (in category 'tests') ----- + testCopyEmpty + + | heap | + heap := Heap new. + 1 to: 100 do: [ :index | + | copy | + copy := heap copyEmpty. + self + assert: copy isHeap; + assert: copy isEmpty; + assert: copy sortBlock = heap sortBlock. + heap add: index ].! Item was changed: + ----- Method: HeapTest>>testDo (in category 'tests') ----- - ----- Method: HeapTest>>testDo (in category 'basic tests') ----- testDo "self run: #testDo" | heap coll | heap := Heap withAll: #(1 3 5). coll := OrderedCollection new. heap do: [:each | coll add: each]. self assert: coll = #(1 3 5) asOrderedCollection. ! Item was changed: + ----- Method: HeapTest>>testExamples (in category 'tests') ----- - ----- Method: HeapTest>>testExamples (in category 'testing') ----- testExamples self heapExample. self heapSortExample.! Item was changed: + ----- Method: HeapTest>>testFirst (in category 'tests') ----- - ----- Method: HeapTest>>testFirst (in category 'basic tests') ----- testFirst "self run: #testFirst" | heap | heap := Heap new. heap add: 5. heap add: 12. heap add: 1. self assert: heap first = 1. heap removeFirst. self assert: heap first = 5.! Item was changed: + ----- Method: HeapTest>>testHeap (in category 'tests') ----- - ----- Method: HeapTest>>testHeap (in category 'basic tests') ----- testHeap "self run: #testHeap" | heap | heap := Heap new. self assert: heap isHeap. self assert: heap isEmpty. heap add: 1. self assert: heap isEmpty not ! Item was changed: + ----- Method: HeapTest>>testIfEqualIsTransitive (in category 'tests') ----- - ----- Method: HeapTest>>testIfEqualIsTransitive (in category 'testing') ----- testIfEqualIsTransitive "This is http://bugs.squeak.org/view.php?id=6943" | anArray heap1 heap2 | anArray := #(1 2 3). heap1 := Heap withAll: (1 to: 3) sortBlock: [:a :b | a < b]. heap2 := Heap withAll: (1 to: 3) sortBlock: [:a :b | b > a]. self assert: (heap1 = anArray) & (heap2 = anArray) ==> (heap1 = heap2) description: 'Heap equality should be transitive'! Item was changed: + ----- Method: HeapTest>>testRemove (in category 'tests') ----- - ----- Method: HeapTest>>testRemove (in category 'basic tests') ----- testRemove "self run: #testRemove" | heap | heap := Heap new. self should: [heap removeFirst] raise: Error. heap add: 5. + self assert: 5 equals: heap removeFirst. - heap removeFirst. self assert: heap size = 0. heap add: 5. self should: [heap removeAt: 2] raise: Error.! Item was added: + ----- Method: HeapTest>>testSort (in category 'tests') ----- + testSort + + self testSortUsing: Heap new. + { + nil. + #<=. + [ :a :b | a <= b ]. + [ :a :b | a >= b ] + } do: [ :each | self testSortUsing: (Heap sortBlock: each) ]! Item was changed: + ----- Method: HeapTest>>testSortBlock (in category 'tests') ----- - ----- Method: HeapTest>>testSortBlock (in category 'basic tests') ----- testSortBlock "self run: #testSortBlock" | heap | heap := Heap withAll: #(1 3 5). self assert: heap asArray = #(1 3 5). heap sortBlock: [ :e1 :e2 | e1 >= e2 ]. + self assert: heap isValidHeap. self assert: heap asArray = #(5 3 1) ! Item was added: + ----- Method: HeapTest>>testSortUsing: (in category 'tests') ----- + testSortUsing: aHeap + + | random | + random := Random seed: 36rSqueak. + self assert: aHeap isValidHeap. + 1000 timesRepeat: [ + aHeap add: random next. + self assert: aHeap isValidHeap ]. + self deny: (aHeap asArray isSortedBy: aHeap sortBlock). + aHeap sort. + self assert: aHeap isValidHeap. + self assert: (aHeap asArray isSortedBy: aHeap sortBlock) + ! Item was added: + ----- Method: HeapTest>>testSortWithIndexUpdateBlock (in category 'tests') ----- + testSortWithIndexUpdateBlock + + | random heap validateHeap | + random := Random seed: 36rSqueak. + heap := Heap sortBlock: [ :a :b | a first <= b first ]. + heap indexUpdateBlock: [ :element :newIndex | element at: 2 put: newIndex ]. + validateHeap := [ + heap isHeap + and: [ heap isValidHeap + and: [ heap do: [ :each | self assert: (heap at: each second) == each ] ] ] ]. + validateHeap value. + 1000 timesRepeat: [ + heap add: { random next. nil }. + validateHeap value ]. + self deny: (heap asArray isSortedBy: heap sortBlock). + heap sort. + validateHeap value. + self assert: (heap asArray isSortedBy: heap sortBlock) + ! From tim at rowledge.org Thu Jun 2 16:25:12 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 2 16:25:24 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> Message-ID: <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> {snipping lots} > On 02-06-2016, at 8:19 AM, Levente Uzonyi wrote: > >> >> braceAtTheEndOfLine ifTrue: [ >> (this isA: #Monstrosity) because: >> blocks are objects not syntax]. > > This is absolutely personal preference, but I prefer to have blocks have > similar syntax as methods, because that makes it easier to read code. > This means that the first line, which contains the opening bracket and the argument names, is far less important than what the block does, so it's perfectly okay to leave it on the previous line. So I think you mean coll do: [:each| statement. argument. resolution]. ? which is pretty much how I prefer things. We should be very careful about discussing this. I don?t think anything causes more annoyance, hard feeling, lost friendships, broken communities, lost projects and global war than syntactic debates. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IO: Illogical Or From commits at source.squeak.org Thu Jun 2 16:33:14 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 16:33:16 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.166.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.166.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.166 Author: mt Time: 2 June 2016, 6:33:08.27467 pm UUID: f4e7d7b4-c3ba-cf48-aba0-0bf40d5c88eb Ancestors: ToolBuilder-Morphic-mt.165 Fixes tool opening for non-windows. Fixes debugger opening for errors that occur in invisible worlds' event processing chain. Required for writing tests for user input event processing. Always use the project's world to show debuggers. =============== Diff against ToolBuilder-Morphic-mt.165 =============== Item was changed: ----- Method: MorphicToolBuilder>>open:label: (in category 'opening') ----- open: anObject label: aString + "Build an open the object, labeling it appropriately if it is a window. Answer the widget opened." + + | morph | + morph := self open: anObject. + morph isSystemWindow + ifTrue: [morph setLabel: aString] + ifFalse: [morph name: aString]. + ^ morph! - "Build an open the object, labeling it appropriately. Answer the widget opened." - | window | - window := self open: anObject. - window setLabel: aString. - ^window! Item was added: + ----- Method: MorphicToolBuilder>>openDebugger: (in category 'opening') ----- + openDebugger: aSpec + + | morph | + morph := self build: aSpec. + morph openInWorld: Project current world extent: morph extent. + ^ morph! Item was added: + ----- Method: MorphicToolBuilder>>openDebugger:label: (in category 'opening') ----- + openDebugger: aSpec label: aString + + | morph | + morph := self openDebugger: aSpec. + morph isSystemWindow + ifTrue: [morph setLabel: aString] + ifFalse: [morph name: aString]. + ^ morph! From craig at blackpagedigital.com Thu Jun 2 17:32:07 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Thu Jun 2 17:32:17 2016 Subject: [squeak-dev] re: Formatting? In-Reply-To: <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: > We should be very careful about discussing this. I don?t think > anything causes more annoyance, hard feeling, lost friendships, > broken communities, lost projects and global war than syntactic > debates. So true. The environment should show everyone what they want to see, with the original material as an option. Arguing about these personal preferences is implicitly accepting a broken environment. This thread is a bad sign. :) -C -- Craig Latta Black Page Digital Amsterdam craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From frank.shearar at gmail.com Thu Jun 2 17:45:28 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Jun 2 17:45:30 2016 Subject: [squeak-dev] re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: On 2 June 2016 at 10:32, Craig Latta wrote: > > > We should be very careful about discussing this. I don?t think > > anything causes more annoyance, hard feeling, lost friendships, > > broken communities, lost projects and global war than syntactic > > debates. > > So true. The environment should show everyone what they want to > see, with the original material as an option. Arguing about these > personal preferences is implicitly accepting a broken environment. This > thread is a bad sign. :) > >From a _reviewer's_ standpoint, I don't care about the author's personal preference. What is far more important is being able to see not the whitespace changes, but the actual meat of the matter. Review tools typically let you ignore whitespace changes, but since we use email as a review tool, we can make the reviewers' lives far easier if we pick _a_ layout convention, and the old & new versions are printed in the same way. (Nitpick: the thread's about layout, not syntax. These are not the same, in Smalltalk at least. (C#'s Roslyn parser/compiler/etc library calls this stuff "trivia", for good reason.)) frank > -C > > -- > Craig Latta > Black Page Digital > Amsterdam > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/b94872e3/attachment.htm From asqueaker at gmail.com Thu Jun 2 18:04:16 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 2 18:05:02 2016 Subject: [squeak-dev] How/when should tools grab the keyboard? In-Reply-To: <1464875719661-4898814.post@n4.nabble.com> References: <1464875719661-4898814.post@n4.nabble.com> Message-ID: Hi Marcel, I like this idea about a application-driven keyboard focus, and it would be great to add some hot-key to cycle the keyboard focus around the widgets, as Windows and other OS's do. Hmm, there's somewhat of a semantic tangle -- because mouseOverForKeyboardFocus means the focus is always under the mouse pointer... I know for pop-up dialogs, it works by opening it directly under where the mouse pointer is. I suppose the ListChooser could do the same, but what about other windows? I mean, isn't the reason one spawns an Inspector or Browser window usually to interact with it? It would seem so! So, what widget? I think top-left is a good default. But if there is no ability to switch focus with the keyboard, then it may not be worth it at all because one would have to use the mouse to set the focus 90% of the time.. But which keys? Tab and back-Tab are obvious candidates except, we need Tab in code editors and back-Tab doesn't work in Linux..... On Thu, Jun 2, 2016 at 8:55 AM, marcel.taeumel wrote: > Hi, there. > > If you enable the following preferences. > > [x] mouseOverForKeyboardFocus > [x] Windows' Contents Are Always Active > > You might be suprised that, for example, CMD+I opens an inspector but the > keyboard focus is still in the current tool, maybe a workspace. Even if you > disable "mouseOverForKeyboardFocus", the workspace will keep its keyboard > focus. If you also disable "Window's Contents Are Always Active", at least > the new window looks focused, although no widget insided grabbed the focus. > Actually, no widget will have the keyboard focus then. > > So, I added focus grabbing for lists and text morphs. I used it for our list > chooser: > http://forum.world.st/The-Trunk-Morphic-mt-1157-mcz-tp4898664.html > http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-165-mcz-tp4898662.html > > It is quite simple. Models can say "self changed: #inputRequested with: > #someSelector" and the correct widget will grab the keyboard. Easy for the > list chooser because you want to type in a filter and hit return to choose. > (Try it out in the code browser category list via CMD+F to find a class.) > > But what about other tools? > > System Browser > Inspector > Object Explorer > ... > > Any idea which widgets should grab the keyboard focus if opened? The first > list? The code widget? We can make different choices for each tool. > > Suggestions are welcome. This discussion affects general keyboard > interaction in Squeak. > > Passionate mouse users will not notice any problem, though. ;o) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/How-when-should-tools-grab-the-keyboard-tp4898814.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From lewis at mail.msen.com Thu Jun 2 18:07:27 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 2 18:07:29 2016 Subject: [squeak-dev] re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: <51708.136.1.1.107.1464890847.squirrel@webmail.msen.com> Craig: Not at all! This is our regularly scheduled annual formatting flame war. It happens every year at this time, and lasts about three or four weeks until all of the participants collapse from exhaustion and promise never to discuss the topic again as long as they live. ;-) Dave > >> We should be very careful about discussing this. I don???t think >> anything causes more annoyance, hard feeling, lost friendships, >> broken communities, lost projects and global war than syntactic >> debates. > > So true. The environment should show everyone what they want to > see, with the original material as an option. Arguing about these > personal preferences is implicitly accepting a broken environment. This > thread is a bad sign. :) > > > -C > > -- > Craig Latta > Black Page Digital > Amsterdam > craig@blackpagedigital.com > +31 6 2757 7177 (SMS ok) > + 1 415 287 3547 (no SMS) > > From leves at caesar.elte.hu Thu Jun 2 18:09:31 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Jun 2 18:09:35 2016 Subject: [squeak-dev] Formatting? In-Reply-To: <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: On Thu, 2 Jun 2016, tim Rowledge wrote: > {snipping lots} >> On 02-06-2016, at 8:19 AM, Levente Uzonyi wrote: >> >>> >>> braceAtTheEndOfLine ifTrue: [ >>> (this isA: #Monstrosity) because: >>> blocks are objects not syntax]. >> >> This is absolutely personal preference, but I prefer to have blocks have >> similar syntax as methods, because that makes it easier to read code. >> This means that the first line, which contains the opening bracket and the argument names, is far less important than what the block does, so it's perfectly okay to leave it on the previous line. > > So I think you mean > coll do: [:each| > statement. > argument. > resolution]. > ? which is pretty much how I prefer things. Close, but not exactly the same: coll do: [ :each | statement. argument. resolution ] If I could change the syntax, I'd make the vertical bar optional, because that's just a filler with no purpose: coll do: [ :each statement. argument. resolution ] > > We should be very careful about discussing this. I don?t think anything causes more annoyance, hard feeling, lost friendships, broken communities, lost projects and global war than syntactic debates. Perhaps this discussion will annoy someone enough to volunteer to finally write a configurable pretty printer. :) Levente > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: IO: Illogical Or > > > > From commits at source.squeak.org Thu Jun 2 18:26:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 18:26:39 2016 Subject: [squeak-dev] The Trunk: Morphic-ul.1158.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.1158.mcz ==================== Summary ==================== Name: Morphic-ul.1158 Author: ul Time: 2 June 2016, 8:25:53.664006 pm UUID: 875c3c7f-2813-4bc5-9c85-8ed8eb6f02cb Ancestors: Morphic-mt.1157 - use #sort instead of #fullySort =============== Diff against Morphic-mt.1157 =============== Item was changed: ----- Method: MorphicAlarmQueue>>nextSequenceNumber (in category 'private') ----- nextSequenceNumber (sequenceNumber := sequenceNumber + 1) = 16r3FFFFFFF ifTrue: [ "Sequence number overflow... reassign sequence numbers starting at 1." + heap sort. - heap fullySort. 1 to: heap size do: [ :index | (heap at: index) sequenceNumber: index ]. sequenceNumber := heap size + 1 ]. ^sequenceNumber! From commits at source.squeak.org Thu Jun 2 18:31:31 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 18:31:33 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-ul.30.mcz Message-ID: Levente Uzonyi uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-ul.30.mcz ==================== Summary ==================== Name: 51Deprecated-ul.30 Author: ul Time: 2 June 2016, 8:28:00.97666 pm UUID: 2a30b91d-0870-412d-8c10-ee96c3c48065 Ancestors: 51Deprecated-mt.29 Deprecated the now unused methods of Heap. =============== Diff against 51Deprecated-mt.29 =============== Item was added: + ----- Method: Heap>>fullySort (in category '*51Deprecated') ----- + fullySort + "Fully sort the heap. + This method preserves the heap invariants and can thus be sent safely" + + self deprecated: 'Use #sort'. + self sort! Item was added: + ----- Method: Heap>>reSort (in category '*51Deprecated') ----- + reSort + "Resort the entire heap" + + self deprecated: 'This method should not be used anymore. Use #sortBlock: if you want to change the sort order.'. + tally <= 1 ifTrue: [ ^self ]. + (tally bitShift: -1) to: 1 by: -1 do: [ :index | self downHeap: index ]! Item was added: + ----- Method: Heap>>sorts:before: (in category '*51Deprecated') ----- + sorts: element1 before: element2 + "Return true if element1 should be sorted before element2. + This method defines the sort order in the receiver" + + self deprecated: 'This method has been inlined for performance.'. + ^sortBlock == nil + ifTrue:[element1 <= element2] + ifFalse:[sortBlock value: element1 value: element2].! Item was added: + ----- Method: Heap>>trim (in category '*51Deprecated') ----- + trim + "Remove any empty slots in the receiver." + + self deprecated: 'Use #compact'. + self compact! Item was added: + ----- Method: Heap>>updateObjectIndex: (in category '*51Deprecated') ----- + updateObjectIndex: index + "If indexUpdateBlock is not nil, notify the object at index of its new position in the heap array." + + self deprecated: 'This method has been inlined for performance.'. + indexUpdateBlock ifNotNil: [ + indexUpdateBlock value: (array at: index) value: index]! From commits at source.squeak.org Thu Jun 2 18:31:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 18:32:00 2016 Subject: [squeak-dev] The Trunk: Collections-ul.697.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.697.mcz ==================== Summary ==================== Name: Collections-ul.697 Author: ul Time: 2 June 2016, 8:31:09.211811 pm UUID: 4d7d52f4-cdbb-423f-9923-aee902c885b0 Ancestors: Collections-ul.696 Heap revamp #2. Deprecated the now unusued #fullySort, #reSort, #sorts:before:, #trim and #updateObjectIndex: Bonus: do not re-sort the receiver of SortedCollection >> #sortBlock: when it only has one element. =============== Diff against Collections-ul.696 =============== Item was removed: - ----- Method: Heap>>fullySort (in category 'accessing') ----- - fullySort - "Fully sort the heap. - This method preserves the heap invariants and can thus be sent safely" - self privateReverseSort. - 1 to: tally // 2 do: [:i | array swap: i with: 1 + tally - i]! Item was removed: - ----- Method: Heap>>reSort (in category 'accessing') ----- - reSort - "Resort the entire heap" - self isEmpty ifTrue:[^self]. - tally // 2 to: 1 by: -1 do:[:i| self downHeap: i].! Item was removed: - ----- Method: Heap>>sorts:before: (in category 'testing') ----- - sorts: element1 before: element2 - "Return true if element1 should be sorted before element2. - This method defines the sort order in the receiver" - ^sortBlock == nil - ifTrue:[element1 <= element2] - ifFalse:[sortBlock value: element1 value: element2].! Item was removed: - ----- Method: Heap>>trim (in category 'growing') ----- - trim - "Remove any empty slots in the receiver." - self growTo: self size.! Item was removed: - ----- Method: Heap>>updateObjectIndex: (in category 'private') ----- - updateObjectIndex: index - "If indexUpdateBlock is not nil, notify the object at index of its new position in the heap array." - indexUpdateBlock ifNotNil: [ - indexUpdateBlock value: (array at: index) value: index]! Item was changed: ----- Method: SortedCollection>>sortBlock: (in category 'accessing') ----- sortBlock: aBlock "Make the argument, aBlock, be the criterion for ordering elements of the receiver." sortBlock := aBlock. "sortBlocks with side effects may not work right" + self size > 1 ifTrue: [self reSort]! - self size > 0 ifTrue: [self reSort]! From commits at source.squeak.org Thu Jun 2 18:33:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 18:33:54 2016 Subject: [squeak-dev] The Trunk: CollectionsTests-ul.264.mcz Message-ID: Levente Uzonyi uploaded a new version of CollectionsTests to project The Trunk: http://source.squeak.org/trunk/CollectionsTests-ul.264.mcz ==================== Summary ==================== Name: CollectionsTests-ul.264 Author: ul Time: 2 June 2016, 8:33:36.59299 pm UUID: 8b363f56-526e-4bea-b997-56008d7e270f Ancestors: CollectionsTests-ul.263 #sortBlock: will re-sort the SortedCollection, so there's no need to send #reSort to it afterwards in SortedCollectionTest >> #testShouldPrecede. =============== Diff against CollectionsTests-ul.263 =============== Item was changed: ----- Method: SortedCollectionTest>>testShouldPrecede (in category 'basic') ----- testShouldPrecede "self run: #testShouldPrecede" |aSortedCollection| aSortedCollection := SortedCollection new. self assert: (aSortedCollection should: 'za' precede: 'zb'). self assert: (aSortedCollection isEmpty). self assert: (aSortedCollection should: 1 precede: 2). aSortedCollection sortBlock: [:a :b | a > b]. + - aSortedCollection reSort. self assert: (aSortedCollection should: 'zb' precede: 'za'). self assert: (aSortedCollection isEmpty). self assert: (aSortedCollection should: 2 precede: 1). ! From karlramberg at gmail.com Thu Jun 2 18:49:26 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu Jun 2 18:49:30 2016 Subject: [squeak-dev] Dark background colors for system windows Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: DarkBackgroundColor.11.cs.gz Type: application/x-gzip Size: 10198 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/02d2311d/DarkBackgroundColor.11.cs.bin From tim at rowledge.org Thu Jun 2 19:11:01 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 2 19:11:05 2016 Subject: [squeak-dev] re: Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: > On 02-06-2016, at 10:45 AM, Frank Shearar wrote: > > From a _reviewer's_ standpoint, I don't care about the author's personal preference. What is far more important is being able to see not the whitespace changes, but the actual meat of the matter. Review tools typically let you ignore whitespace changes, but since we use email as a review tool, we can make the reviewers' lives far easier if we pick _a_ layout convention, and the old & new versions are printed in the same way. Isn?t the ?prettydiff? that pretty-prints both versions and diffs those a suitable solution? It seems to work reasonably well to me though I?m sure it could do still more. The obvious advantage is that it splits up code fairly thoroughly and makes it easy to see the actual difference; the disadvantage is sometimes in working out where that maps to in your carefully hand-mangled layout. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim New: It comes in different colors from the previous version. From eliot.miranda at gmail.com Thu Jun 2 19:23:43 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 2 19:23:46 2016 Subject: [squeak-dev] Formatting? In-Reply-To: <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: On Thu, Jun 2, 2016 at 9:25 AM, tim Rowledge wrote: > {snipping lots} > > On 02-06-2016, at 8:19 AM, Levente Uzonyi wrote: > > > >> > >> braceAtTheEndOfLine ifTrue: [ > >> (this isA: #Monstrosity) because: > >> blocks are objects not syntax]. > > > > This is absolutely personal preference, but I prefer to have blocks have > > similar syntax as methods, because that makes it easier to read code. > > This means that the first line, which contains the opening bracket and > the argument names, is far less important than what the block does, so it's > perfectly okay to leave it on the previous line. > > So I think you mean > coll do: [:each| > statement. > argument. > resolution]. > ? which is pretty much how I prefer things. > No. That puts the start of the block to the right of the first line of the block. That's not rectangular at all. i.e. "statement" is to the left of "[:each|". It should be coll do: [:each| statement. argument. resolution]. Here, all the text of the block is included in the recangle formed by "[:each|" and "resolution]". > We should be very careful about discussing this. I don?t think anything > causes more annoyance, hard feeling, lost friendships, broken communities, > lost projects and global war than syntactic debates. > Understood. Bt Kent gives v good rationale for all elements of his style guide, and one way of avoiding conflicts over formatting is to have and observe as much as possible, and support with tools, a house style. > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: IO: Illogical Or > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/49ed761e/attachment.htm From tim at rowledge.org Thu Jun 2 19:50:11 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 2 19:50:17 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> Message-ID: <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> I tried to set my Pi as specified and it didn?t go all that well. I think we may need *much* more thorough instructions for us non-non-en speakers ? > On 01-06-2016, at 7:13 PM, Yoshiki Ohshima wrote: > {snip} > If you have a spare Raspian installation, you can do the following: > (But I am writing this from my memory, so it may not be exactly > correct. Sorry). > > - From raspi-config, go to the "Internationalisation Options" and add > ja_JP.UTF8. OK, no problem > > - From terminal install a few things: > > sudo apt-get install ibus > sudo apt-get install ibus-anthy Had to do that twice since the first time complained about problems configuring the ?anthy? tool > > This will add a new menu item to the Raspian menu. IIRC, you need to > "add language" and select Japanese from the ibus configuration menu. The only new item I could find was the ibus config under the preferences heading. This tool did not seem to have any option to set Japanese at first; it was only after rebooting that it became available. > > - Add the following lines to .bashrc > export LANG=ja_jp.UTF8 > export LC_ALL=$LANG > export LANGUAGE=$LANG > > close X, do something like ". .bashrc" and restart X. You should see > that Raspian menus are shown in Japanese. (You can still start > raspi-config later and remove Japanese, so don't panic) After rebooting *some* of the menu text was rendered in nasty unicode-block form rather than Japanese or anything that might look like it to my untrained eyes. > > - Start Scratch, activate ibus from the ibus icon in the Raspian menu > (choose Japanese/???), click on somewhere such as the sprite name > field. > - type in some strings with enough vowels in it. Hit enter and > composed characters should go into the text field. Nah, no luck there. Nothing happened that could pass for an extra window opening up. A `ps aux | grep ibus` shows the ibus daemon appears to be running. I?m out of ideas on this. Help! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: DSO: Do Something or Other From cunningham.cb at gmail.com Thu Jun 2 20:15:25 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Jun 2 20:15:32 2016 Subject: [squeak-dev] Dark background colors for system windows In-Reply-To: References: Message-ID: Hi Karl, I like it (so far), but a warning for others trying this. It works best if you can close all windows and re-open. I you have lots of open windows (say, workspaces) with unfinished work in them that you can't throw away, the results will be 'wonky'. The text is highlighted dark, but the background is white. (newly opened workspaces are good, though). Similar funny business with Browsers, but those are easier to deal with. Also, I think it made a chance to the world background/color at the same time. I wouldn't have expected that. -cbc On Thu, Jun 2, 2016 at 11:49 AM, karl ramberg wrote: > Hi, > Here is latest change set for trunk image with dark background colors for > system windows. > > Screen shot:http://i.imgur.com/lJolfc2.png > > Install change set. > Select in menu: > Extras/ Window Colors/ Dark Background Colors > > Best, > Karl > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160602/98eb2c3e/attachment-0001.htm From Yoshiki.Ohshima at acm.org Thu Jun 2 20:42:46 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jun 2 20:42:51 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> Message-ID: On Thu, Jun 2, 2016 at 12:50 PM, tim Rowledge wrote: > I tried to set my Pi as specified and it didn?t go all that well. I think we may need *much* more thorough instructions for us non-non-en speakers ? > > >> On 01-06-2016, at 7:13 PM, Yoshiki Ohshima wrote: >> {snip} >> If you have a spare Raspian installation, you can do the following: >> (But I am writing this from my memory, so it may not be exactly >> correct. Sorry). >> >> - From raspi-config, go to the "Internationalisation Options" and add >> ja_JP.UTF8. > > OK, no problem >> >> - From terminal install a few things: >> >> sudo apt-get install ibus >> sudo apt-get install ibus-anthy > > Had to do that twice since the first time complained about problems configuring the ?anthy? tool > >> >> This will add a new menu item to the Raspian menu. IIRC, you need to >> "add language" and select Japanese from the ibus configuration menu. > > The only new item I could find was the ibus config under the preferences heading. This tool did not seem to have any option to set Japanese at first; it was only after rebooting that it became available. > >> >> - Add the following lines to .bashrc >> export LANG=ja_jp.UTF8 >> export LC_ALL=$LANG >> export LANGUAGE=$LANG >> >> close X, do something like ". .bashrc" and restart X. You should see >> that Raspian menus are shown in Japanese. (You can still start >> raspi-config later and remove Japanese, so don't panic) > > After rebooting *some* of the menu text was rendered in nasty unicode-block form rather than Japanese or anything that might look like it to my untrained eyes. Ah... I'm sorry to forgot to mention: apt-get install ttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname to add extra fonts. >> - Start Scratch, activate ibus from the ibus icon in the Raspian menu >> (choose Japanese/???), click on somewhere such as the sprite name >> field. >> - type in some strings with enough vowels in it. Hit enter and >> composed characters should go into the text field. > > Nah, no luck there. Nothing happened that could pass for an extra window opening up. > A `ps aux | grep ibus` shows the ibus daemon appears to be running. Ok. One test is to launch the web browser and put the keyboard focus on the search field on google or something. Then click on the ibus menu in the Raspbian title bar. If you have a choice to input Japanese there, ibus is ready to handle it. Sorry again that I don't have the pi handy right now. If it does not resolve tomorrow, I'll make some screenshots to explain it. From leves at caesar.elte.hu Thu Jun 2 21:34:04 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Jun 2 21:34:08 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <2BB84002-2C6E-4DD8-A48F-14A94C8427ED@rowledge.org> <49773144-6AFB-4A64-8A05-681B6E202243@rowledge.org> Message-ID: On Thu, 2 Jun 2016, Eliot Miranda wrote: > > > On Thu, Jun 2, 2016 at 9:25 AM, tim Rowledge wrote: > {snipping lots} > > On 02-06-2016, at 8:19 AM, Levente Uzonyi wrote: > > > >> > >>? ?braceAtTheEndOfLine ifTrue: [ > >>? ? ? ? (this isA: #Monstrosity) because: > >>? ? ? ? ? ? ? ?blocks are objects not syntax]. > > > > This is absolutely personal preference, but I prefer to have blocks have > > similar syntax as methods, because that makes it easier to read code. > > This means that the first line, which contains the opening bracket and the argument names, is far less important than what the block does, so it's perfectly okay to leave it on the previous > line. > > So I think you mean > ? ? ? ? coll do: [:each| > ? ? ? ? ? ? ? ? statement. > ? ? ? ? ? ? ? ? argument. > ? ? ? ? ? ? ? ? resolution]. > ? which is pretty much how I prefer things. > > > No.? That puts the start of the block to the right of the first line of the block.? That's not rectangular at all. ?i.e. "statement" is to the left of "[:each|".? It should be IMHO it's enough for easy pattern recognition if the statements form a rectangle. Levente > > ? ? ? ? coll do: > ? ? ? ? ? ? ? ?[:each| > ? ? ? ? ? ? ? ? statement. > ? ? ? ? ? ? ? ? argument. > ? ? ? ? ? ? ? ? resolution]. > > Here, all the text of the block is included in the recangle formed by "[:each|" and "resolution]". > > > We should be very careful about discussing this. I don?t think anything causes more annoyance, hard feeling, lost friendships, broken communities, lost projects and global war than syntactic > debates. > > > Understood.? Bt Kent gives v good rationale for all elements of his style guide, and one way of avoiding conflicts over formatting is to have and observe as much as possible, and support with tools, a house > style. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: IO: Illogical Or > > > > > > > -- > _,,,^..^,,,_ > best,?Eliot > > From commits at source.squeak.org Thu Jun 2 21:48:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 21:48:28 2016 Subject: [squeak-dev] The Inbox: Collections-ul.698.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Inbox: http://source.squeak.org/inbox/Collections-ul.698.mcz ==================== Summary ==================== Name: Collections-ul.698 Author: ul Time: 2 June 2016, 11:47:32.688405 pm UUID: cf02bd5c-5cfa-499c-88df-c00ae1760a38 Ancestors: Collections-ul.697 Heap revamp #3: - Heap is a subclass of Collection instead of SequenceableCollection. - Heap has it's own category Collections-Heap; just like how it is with Stack. - Updated class comment. =============== Diff against Collections-ul.697 =============== Item was changed: SystemOrganization addCategory: #'Collections-Abstract'! SystemOrganization addCategory: #'Collections-Arrayed'! SystemOrganization addCategory: #'Collections-Cache'! SystemOrganization addCategory: #'Collections-Exceptions'! SystemOrganization addCategory: #'Collections-Sequenceable'! SystemOrganization addCategory: #'Collections-Stack'! SystemOrganization addCategory: #'Collections-Streams'! SystemOrganization addCategory: #'Collections-Strings'! SystemOrganization addCategory: #'Collections-Support'! SystemOrganization addCategory: #'Collections-Text'! SystemOrganization addCategory: #'Collections-Unordered'! SystemOrganization addCategory: #'Collections-Weak'! + SystemOrganization addCategory: #'Collections-Heap'! Item was changed: + Collection subclass: #Heap - SequenceableCollection subclass: #Heap instanceVariableNames: 'array tally sortBlock indexUpdateBlock' classVariableNames: '' poolDictionaries: '' + category: 'Collections-Heap'! - category: 'Collections-Sequenceable'! + !Heap commentStamp: 'ul 6/2/2016 23:45' prior: 0! + I implement a special data structure called Binary Heap [ https://en.wikipedia.org/wiki/Binary_heap ], which is the most commonly used variant of the Heap data structure [ https://en.wikipedia.org/wiki/Heap_%28data_structure%29 ]. - !Heap commentStamp: 'nice 9/30/2010 23:22' prior: 0! - Class Heap implements a special data structure commonly referred to as 'heap' [ http://en.wikipedia.org/wiki/Heap_%28data_structure%29 ] A Heap is a kind of binary tree stored in a linear array - see details after the instance variables description. Heaps are good at handling priority queues because: 1) greatest priority element according to the sort block will be stored in first position and thus accessed in O(1) operations 2) worse time for inserting or removing an element is in O(log n) operations, where n is the size of the Heap Insertion/Removal times are more efficient than above upper bound, provided that: a) Elements are only removed at the beginning b) Elements are added with arbitrary sort order. 3) there is no need to fully sort the Heap, which makes it more efficient than a SortedCollection + The heap can be fully sorted by sending the message #sort. - The heap can be fully sorted by sending the message #fullySort. Worse time for fully sorting the Heap is in O(n log n) operations, but this is rarely used a feature. Remind that the Heap does not fully sort the collection if you don't ask. Thus don't expect #do: and other iterators to enumerate elements according to the sortBlock order. Instance variables: + array The data repository - array The data repository tally The number of elements in the heap sortBlock A two-argument block defining the sort order, or nil in which case the default sort order is [:element1 :element2| element1 <= element2] indexUpdateBlock A two-argument block of the form [:data :index | ... ] which allows an application object to keep track of its index within the heap. Useful for quick heap update when object's sort value changes (for example, when an object in a priority queue has its priority increased by an external event, you don't want to have to search through the whole heap to find the index before fixing the heap). No update occurs if nil. The Heap can be viewed as a binary tree (every node in the tree has at most two children). The root is stored in first slot of internal array. The children are stored in next two slots. The children of children in next four slots. etc... For a node A of index i (1 based), the two children B1 and B2 are thus stored in indices (2*i) and (2*i+1). Of course, the children indices must be less than the tally otherwise they are considered inexistent. The Heap does arrange to preserve the following invariant: + For any children B of a node A, A is sorted before B, in other words, (sortBlock value: A value: B) = true - For any children B of a node A, A is sorted before B, in other words, (self sort: A before: B) = true This implies that the root is always the first element according to sort order. ! From commits at source.squeak.org Thu Jun 2 21:56:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 21:56:59 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160602215657.7868.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-June/068168.html Name: Collections-ul.695 Ancestors: Collections-topa.694 Heap revamp #1: class side: - Heaps can be created on an existing array with #on: #on:size: and #on:size:sortBlock: - #withAll: and #withAll:sortBlock: avoid creating an extra copy if the argument is already an Array instance side: - imported and improved #= from Pharo - #growTo: won't raise an error when newSize is less than array size (e.g. during compaction) - #sortBlock: restores the heap invariant on its own - improved #select:, #collect, #at:, #removeAt:, #add: - added #sort and #compact; compatible with other collections - #capacity returns the real capacity - inlined #sorts:before: and #indexUpdateBlock: for performance - improved performance and legibility of the heap operations #upHeap: #downHeap: and #downHeapSingle: - added #isValidHeap - added some comments ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068169.html Name: Collections-ul.696 Ancestors: Collections-ul.695 - added #quickSort and #quickSort: to ArrayedCollection ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068170.html Name: CollectionsTests-ul.263 Ancestors: CollectionsTests-mt.262 - added a few more heap tests ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068171.html Name: ToolBuilder-Morphic-mt.166 Ancestors: ToolBuilder-Morphic-mt.165 Fixes tool opening for non-windows. Fixes debugger opening for errors that occur in invisible worlds' event processing chain. Required for writing tests for user input event processing. Always use the project's world to show debuggers. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068172.html Name: Morphic-ul.1158 Ancestors: Morphic-mt.1157 - use #sort instead of #fullySort ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068173.html Name: 51Deprecated-ul.30 Ancestors: 51Deprecated-mt.29 Deprecated the now unused methods of Heap. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068174.html Name: Collections-ul.697 Ancestors: Collections-ul.696 Heap revamp #2. Deprecated the now unusued #fullySort, #reSort, #sorts:before:, #trim and #updateObjectIndex: Bonus: do not re-sort the receiver of SortedCollection >> #sortBlock: when it only has one element. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068175.html Name: CollectionsTests-ul.264 Ancestors: CollectionsTests-ul.263 #sortBlock: will re-sort the SortedCollection, so there's no need to send #reSort to it afterwards in SortedCollectionTest >> #testShouldPrecede. ============================================= From bert at freudenbergs.de Thu Jun 2 22:21:50 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Jun 2 22:21:55 2016 Subject: [squeak-dev] Formatting? In-Reply-To: References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> Message-ID: <46B3FBF7-55B1-4D76-B68B-028ADEBEAE77@freudenbergs.de> On 02.06.2016, at 03:28, Chris Muller wrote: > >> +1. But having a good formatter which can implement Kent's style guide >> would be nice. We're not there yet. > > Why not give [1] a try? I've tweaked it to remove the spacing which > you and Bert don't like. Even though I think its a mistake to remove > this whitespace, we could at least have a pretty-print that is usable > OOTB and based on a known and thought-out rationale that suits > Smalltalk. Does anyone know the origins of the formatting we have > now? > > [1] -- Compiler-cmm.323 in the Inbox. I believe its at least 90% Kent > Beckian, but there are one or two corner-case bugs I couldn't figure > out how to solve.. It?s pretty good. There shouldn?t be a space before a cascading semicolon though. I also noticed a bug where sometimes there is no space between multiple args to a block, e.g. in Behavior>>allSubclassesWithLevelDo:startingLevel:. And it still produces excessively tall code. This: classAndLevelBlock value: self value: level. ... should be on one line. And if possible 0 to: height - 1 by: 16 do: [:y | ... should be 0 to: height - 1 by: 16 do: [:y | ... The rule being something like ?if only the last arg is complex, put the message on one line, and the last arg indented by one on the next?. - 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/20160603/5b293fbc/smime.bin From commits at source.squeak.org Thu Jun 2 22:42:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 2 22:42:23 2016 Subject: [squeak-dev] The Trunk: Tools-cmm.703.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.703.mcz ==================== Summary ==================== Name: Tools-cmm.703 Author: cmm Time: 2 June 2016, 5:41:56.679756 pm UUID: 9e4c33b5-dae7-4884-9e46-22a4833bebd7 Ancestors: Tools-eem.702 - Corrected menu hot-key indication for 'show category' -- it's (Y) not (C). - Upgraded it to 'toggle category selection', which is really useful given that browsers spawned via Cmd+b come with category automatically selected. =============== Diff against Tools-eem.702 =============== Item was removed: - ----- Method: Browser>>selectOriginalCategoryForCurrentMethod (in category 'message category list') ----- - selectOriginalCategoryForCurrentMethod - "private - Select the message category for the current method. - - Note: This should only be called when somebody tries to save - a method that they are modifying while ALL is selected. - - Returns: true on success, false on failure." - | aSymbol selectorName | - aSymbol := self categoryOfCurrentMethod. - selectorName := self selectedMessageName. - (aSymbol notNil and: [aSymbol ~= ClassOrganizer allCategory]) - ifTrue: - [selectedMessageCategoryName := aSymbol. - selectedMessageName := selectorName. - self changed: #messageCategorySelectionChanged. - self changed: #messageCategoryListIndex. "update my selection" - self changed: #messageList. - self changed: #messageListIndex. - ^ true]. - ^ false! Item was changed: ----- Method: Browser>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu "Fill aMenu with the items appropriate when the shift key is held down" aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: + #(('toggle category selection (Y)' showHomeCategory))]. - #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) ('copy up or copy down...' copyUpOrCopyDown)). ^ aMenu ! Item was changed: ----- Method: Browser>>showHomeCategory (in category 'message category functions') ----- showHomeCategory "Show the home category of the selected method. This is only really useful if one is in a tool that supports the showing of categories. Thus, it's good in browsers and hierarchy browsers but not in message-list browsers" | aSelector | self okToChange ifTrue: [(aSelector := self selectedMessageName) ifNotNil: + [self toggleCategorySelectionForCurrentMethod. - [self selectOriginalCategoryForCurrentMethod. self selectedMessageName: aSelector]]! Item was added: + ----- Method: Browser>>toggleCategorySelectionForCurrentMethod (in category 'message category list') ----- + toggleCategorySelectionForCurrentMethod + | methodCategory selectorName | + methodCategory := self categoryOfCurrentMethod. + selectorName := self selectedMessageName. + (methodCategory notNil and: + [ methodCategory ~= ClassOrganizer allCategory and: [ methodCategory ~= selectedMessageCategoryName ] ]) + ifTrue: + [ selectedMessageCategoryName := methodCategory. + selectedMessageName := selectorName. + self changed: #messageCategorySelectionChanged. + self changed: #messageCategoryListIndex. + "update my selection" + self changed: #messageList. + self changed: #messageListIndex ] + ifFalse: + [ methodCategory = selectedMessageCategoryName ifTrue: + [ selectedMessageCategoryName := nil. + self + changed: #messageCategorySelectionChanged ; + changed: #messageCategoryListIndex ; + changed: #messageList ] ]! From asqueaker at gmail.com Thu Jun 2 22:46:54 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 2 22:47:36 2016 Subject: [squeak-dev] The Trunk: Tools-cmm.703.mcz In-Reply-To: <5750b651.4acb370a.46c1.16dbSMTPIN_ADDED_MISSING@mx.google.com> References: <5750b651.4acb370a.46c1.16dbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Not sure if Lexicon needs any changes, its menu is broken right now, and I didn't have time to investigate that. On Thu, Jun 2, 2016 at 5:42 PM, wrote: > Chris Muller uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-cmm.703.mcz > > ==================== Summary ==================== > > Name: Tools-cmm.703 > Author: cmm > Time: 2 June 2016, 5:41:56.679756 pm > UUID: 9e4c33b5-dae7-4884-9e46-22a4833bebd7 > Ancestors: Tools-eem.702 > > - Corrected menu hot-key indication for 'show category' -- it's (Y) not (C). > - Upgraded it to 'toggle category selection', which is really useful given that browsers spawned via Cmd+b come with category automatically selected. > > =============== Diff against Tools-eem.702 =============== > > Item was removed: > - ----- Method: Browser>>selectOriginalCategoryForCurrentMethod (in category 'message category list') ----- > - selectOriginalCategoryForCurrentMethod > - "private - Select the message category for the current method. > - > - Note: This should only be called when somebody tries to save > - a method that they are modifying while ALL is selected. > - > - Returns: true on success, false on failure." > - | aSymbol selectorName | > - aSymbol := self categoryOfCurrentMethod. > - selectorName := self selectedMessageName. > - (aSymbol notNil and: [aSymbol ~= ClassOrganizer allCategory]) > - ifTrue: > - [selectedMessageCategoryName := aSymbol. > - selectedMessageName := selectorName. > - self changed: #messageCategorySelectionChanged. > - self changed: #messageCategoryListIndex. "update my selection" > - self changed: #messageList. > - self changed: #messageListIndex. > - ^ true]. > - ^ false! > > Item was changed: > ----- Method: Browser>>shiftedMessageListMenu: (in category 'message functions') ----- > shiftedMessageListMenu: aMenu > > "Fill aMenu with the items appropriate when the shift key is held down" > > aMenu addStayUpItem. > aMenu addList: #( > ('toggle diffing (D)' toggleDiffing) > ('implementors of sent messages' browseAllMessages) > - > ('local senders of...' browseLocalSendersOfMessages) > ('local implementors of...' browseLocalImplementors) > - > ('spawn sub-protocol' spawnProtocol) > ('spawn full protocol' spawnFullProtocol) > - > ('sample instance' makeSampleInstance) > ('inspect instances' inspectInstances) > ('inspect subinstances' inspectSubInstances)). > > self addExtraShiftedItemsTo: aMenu. > aMenu addList: #( > - > ('change category...' changeCategory)). > > self canShowMultipleMessageCategories ifTrue: [aMenu addList: > + #(('toggle category selection (Y)' showHomeCategory))]. > - #(('show category (C)' showHomeCategory))]. > aMenu addList: #( > - > ('change sets with this method' findMethodInChangeSets) > ('revert to previous version' revertToPreviousVersion) > ('remove from current change set' removeFromCurrentChanges) > ('revert & remove from changes' revertAndForget) > ('add to current change set' adoptMessageInCurrentChangeset) > ('copy up or copy down...' copyUpOrCopyDown)). > ^ aMenu > ! > > Item was changed: > ----- Method: Browser>>showHomeCategory (in category 'message category functions') ----- > showHomeCategory > "Show the home category of the selected method. This is only really useful if one is in a tool that supports the showing of categories. Thus, it's good in browsers and hierarchy browsers but not in message-list browsers" > > | aSelector | > self okToChange ifTrue: > [(aSelector := self selectedMessageName) ifNotNil: > + [self toggleCategorySelectionForCurrentMethod. > - [self selectOriginalCategoryForCurrentMethod. > self selectedMessageName: aSelector]]! > > Item was added: > + ----- Method: Browser>>toggleCategorySelectionForCurrentMethod (in category 'message category list') ----- > + toggleCategorySelectionForCurrentMethod > + | methodCategory selectorName | > + methodCategory := self categoryOfCurrentMethod. > + selectorName := self selectedMessageName. > + (methodCategory notNil and: > + [ methodCategory ~= ClassOrganizer allCategory and: [ methodCategory ~= selectedMessageCategoryName ] ]) > + ifTrue: > + [ selectedMessageCategoryName := methodCategory. > + selectedMessageName := selectorName. > + self changed: #messageCategorySelectionChanged. > + self changed: #messageCategoryListIndex. > + "update my selection" > + self changed: #messageList. > + self changed: #messageListIndex ] > + ifFalse: > + [ methodCategory = selectedMessageCategoryName ifTrue: > + [ selectedMessageCategoryName := nil. > + self > + changed: #messageCategorySelectionChanged ; > + changed: #messageCategoryListIndex ; > + changed: #messageList ] ]! > > From asqueaker at gmail.com Thu Jun 2 22:55:47 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 2 22:56:30 2016 Subject: [squeak-dev] Formatting? In-Reply-To: <46B3FBF7-55B1-4D76-B68B-028ADEBEAE77@freudenbergs.de> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> <5082B2C8-4B20-4B96-A918-7991C9112336@freudenbergs.de> <0ADFB32D-ABC1-4542-8201-95E281550354@freudenbergs.de> <46B3FBF7-55B1-4D76-B68B-028ADEBEAE77@freudenbergs.de> Message-ID: > There shouldn?t be a space before a cascading semicolon though. That one might be easy to fix.. > I also noticed a bug where sometimes there is no space between multiple args to a block, e.g. in Behavior>>allSubclassesWithLevelDo:startingLevel:. > > And it still produces excessively tall code. This: > > classAndLevelBlock > value: self > value: level. > > ... should be on one line. And if possible > > > 0 > to: height - 1 > by: 16 > do: > [:y | ... > > should be > > 0 to: height - 1 by: 16 do: > [:y | ... > > The rule being something like ?if only the last arg is complex, put the message on one line, and the last arg indented by one on the next?. Right, and also, if the block only has "one statement" in it, should go on one line, but IIRC "one statement" from POV of a BlockNode (or whatever it was) could still be a complex multi-line argument (parenthesis, etc.), so I gave up had it always just does this: envelopes do: [ : e | e duration: seconds ] instead of all on one line. The Command+[Delete] key helps clean that up. :) So its been a trade-off for me. I find myself still having to do some manual "clean up" formatting after pretty-printing but, overall, worth it enough for me that I've been running a dirty Compiler package for many years.. From lewis at mail.msen.com Fri Jun 3 02:21:28 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Jun 3 02:21:30 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> <20160601021438.GA45151@shell.msen.com> Message-ID: <20160603022128.GA90362@shell.msen.com> Hi Levente, On Wed, Jun 01, 2016 at 10:40:09AM +0200, Levente Uzonyi wrote: > Hi Dave > > On Tue, 31 May 2016, David T. Lewis wrote: > > >That said, in the case of setting a stream to #binary or #ascii, the > >#adoptInstance: approach does seem fragile compared to #asByteArray. > >If Behavior>>adoptInstance: fails, the fallback code attempts to use > >Object>>primitiveChangeClassTo: which also fails, this time with no > >fallback > >path. Thus if the primitives for changing the class of an object fail, > >there is no fallback and it may no longer be possible to write a new binary > >file (such as new image and changes files). > > You would still get a debugger in such case where you would have a chance > to fix/work around the problem, wouldn't you? Theoretically yes, but in practice I have abandoned several images after trying to play around with it. I think what probably is happening is the changes file gets damaged as a result of not being able to reopen it in binary mode. I'm not certain that this is the cause, but I seem to end up with methods that have no source, so that would be the likely reason. Cog seems to recover more gracefully than interpreter VM in this case, so it may be that there are contributing issues in the interpreter VM. I am not really sure, but it does seem like having a #binary method that could fail without working fallback code is rather dangerous. > > > > >Another way to look at it - if the optimization is worthwhile, maybe it > >belongs in the Collections package, which already needs to be different > >for Spur versus V3. > > > >For Spur, shouldn't it just be this: > > > >ByteString>>asByteArray > > ByteArray adoptInstance: self > > > >I did not really test this, but it should give us the same performance > >optimization in a more general way. > > This would significantly change the behavior, because currently you know > that a copy will be returned. > We might as well use a different selector (#toByteArray or #beByteArray), > but I don't know if that would help V3 images. > D'oh! Yes of course you are right. Dave From karlramberg at gmail.com Fri Jun 3 09:43:48 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Jun 3 09:43:52 2016 Subject: [squeak-dev] Dark background colors for system windows In-Reply-To: References: Message-ID: Ah, good point. Use this change set with caution. It does not relyably update already open windows. (Yet) And you are right that the desktop color changes, the default desktop background is quite bright compared to the windows background color. Best, Karl On Thu, Jun 2, 2016 at 10:15 PM, Chris Cunningham wrote: > Hi Karl, > I like it (so far), but a warning for others trying this. It works best if > you can close all windows and re-open. I you have lots of open windows > (say, workspaces) with unfinished work in them that you can't throw away, > the results will be 'wonky'. The text is highlighted dark, but the > background is white. (newly opened workspaces are good, though). Similar > funny business with Browsers, but those are easier to deal with. > > Also, I think it made a chance to the world background/color at the same > time. I wouldn't have expected that. > > -cbc > > On Thu, Jun 2, 2016 at 11:49 AM, karl ramberg > wrote: > >> Hi, >> Here is latest change set for trunk image with dark background colors for >> system windows. >> >> Screen shot:http://i.imgur.com/lJolfc2.png >> >> Install change set. >> Select in menu: >> Extras/ Window Colors/ Dark Background Colors >> >> Best, >> Karl >> >> >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/14222615/attachment.htm From lists at fniephaus.com Fri Jun 3 12:59:49 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri Jun 3 13:00:03 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: <913182FE-1E10-47AD-9C24-6C47EB0C70D2@freudenbergs.de> References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> <913182FE-1E10-47AD-9C24-6C47EB0C70D2@freudenbergs.de> Message-ID: On my machine: SqueakJS: 2832ms RSqueak: 2523ms (*) (*) using fallback Smalltalk code for large integer; https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/bundle/RSqueak.zip Maybe the JITs realize that the result of "2 raisedTo: ...." is not being used and omit the calculation? -- On Thu, Jun 2, 2016 at 12:24 PM Bert Freudenberg wrote: > On 02.06.2016, at 03:19, Eliot Miranda wrote: > > OK, tis fixed in VMMaker.oscog-eem.1879. > > > > Reporting - 774 tallies, 6,836 msec. > > Nice! > > Is this finally a benchmark where SqueakJS can beat other VMs? > > [10 timesRepeat: [(2 raisedTo: 100000000) basicSize]] timeToRun > > Interp: 18042 ms > Cog: 7965 ms > Spur: ? > SqueakJS: 2821 ms (*) > > :D > > - Bert - > > (*) > http://bertfreudenberg.github.io/SqueakJS/run/#url=http://freudenbergs.de/bert/squeakjs&files=[Squeak4.5-13680.image,Squeak4.5-13680.changes,SqueakV41.sources] > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/a8a195ff/attachment.htm From timfelgentreff at gmail.com Fri Jun 3 12:25:43 2016 From: timfelgentreff at gmail.com (timfelgentreff) Date: Fri Jun 3 13:03:40 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> <913182FE-1E10-47AD-9C24-6C47EB0C70D2@freudenbergs.de> Message-ID: <1464956743026-4899014.post@n4.nabble.com> I'm fairly sure that the RSqueak JIT realizes that with both 2 and 100000000 being constants in the doIt method, basic size is always going to return the same thing. In that case we're measuring the first ~1000 iterations, then the JIT time, and then only the cost of returning a constant. Fabio Niephaus-3 wrote > On my machine: > > SqueakJS: 2832ms > RSqueak: 2523ms (*) > > (*) using fallback Smalltalk code for large integer; > https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/bundle/RSqueak.zip > > > Maybe the JITs realize that the result of "2 raisedTo: ...." is not being > used and omit the calculation? > > -- > > On Thu, Jun 2, 2016 at 12:24 PM Bert Freudenberg < > bert@ > > > wrote: > >> On 02.06.2016, at 03:19, Eliot Miranda < > eliot.miranda@ > > wrote: >> > OK, tis fixed in VMMaker.oscog-eem.1879. >> > >> > Reporting - 774 tallies, 6,836 msec. >> >> Nice! >> >> Is this finally a benchmark where SqueakJS can beat other VMs? >> >> [10 timesRepeat: [(2 raisedTo: 100000000) basicSize]] timeToRun >> >> Interp: 18042 ms >> Cog: 7965 ms >> Spur: ? >> SqueakJS: 2821 ms (*) >> >> :D >> >> - Bert - >> >> (*) >> http://bertfreudenberg.github.io/SqueakJS/run/#url=http://freudenbergs.de/bert/squeakjs&files=[Squeak4.5-13680.image,Squeak4.5-13680.changes,SqueakV41.sources] >> >> >> -- View this message in context: http://forum.world.st/2-raisedTo-100000000-crashes-VM-tp4898583p4899014.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Fri Jun 3 14:59:42 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Jun 3 14:59:44 2016 Subject: [squeak-dev] Dark background colors for system windows In-Reply-To: References: Message-ID: Also, pop up balloons need work. Light yellow on slightly less light yellow isn't readable at all. -cbc On Fri, Jun 3, 2016 at 2:43 AM, karl ramberg wrote: > Ah, good point. > Use this change set with caution. > It does not relyably update already open windows. (Yet) > > And you are right that the desktop color changes, the default desktop > background is quite bright compared to the windows background color. > > Best, > Karl > > On Thu, Jun 2, 2016 at 10:15 PM, Chris Cunningham > wrote: > >> Hi Karl, >> I like it (so far), but a warning for others trying this. It works best >> if you can close all windows and re-open. I you have lots of open windows >> (say, workspaces) with unfinished work in them that you can't throw away, >> the results will be 'wonky'. The text is highlighted dark, but the >> background is white. (newly opened workspaces are good, though). Similar >> funny business with Browsers, but those are easier to deal with. >> >> Also, I think it made a chance to the world background/color at the same >> time. I wouldn't have expected that. >> >> -cbc >> >> On Thu, Jun 2, 2016 at 11:49 AM, karl ramberg >> wrote: >> >>> Hi, >>> Here is latest change set for trunk image with dark background colors >>> for system windows. >>> >>> Screen shot:http://i.imgur.com/lJolfc2.png >>> >>> Install change set. >>> Select in menu: >>> Extras/ Window Colors/ Dark Background Colors >>> >>> Best, >>> Karl >>> >>> >>> >>> >>> >> >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/cf86875f/attachment.htm From bert at freudenbergs.de Fri Jun 3 15:34:31 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jun 3 15:34:34 2016 Subject: [squeak-dev] Re: 2 raisedTo: 100000000` crashes VM In-Reply-To: <1464956743026-4899014.post@n4.nabble.com> References: <7900E39A-3F6D-48A4-8B48-7584056009F4@freudenbergs.de> <6625BEB1-1314-4464-8F44-58796517E55A@freudenbergs.de> <913182FE-1E10-47AD-9C24-6C47EB0C70D2@freudenbergs.de> <1464956743026-4899014.post@n4.nabble.com> Message-ID: <7BCC1BC7-251D-4EAC-AC77-FDD0704907D1@freudenbergs.de> One iteration of this ?benchmark? is really just two dozen LargeInt multiplies (thanks to our logarithmic #raisedToInteger: implementation). The problem for most VMs is garbage, since the integers grow very fast very quickly. On the interpreter, 10 iterations do 580 (!) full GCs, whereas Cog ?only? needs 30 full GCs. SqueakJS does 0 GCs. - Bert - > On 03.06.2016, at 14:25, timfelgentreff wrote: > > I'm fairly sure that the RSqueak JIT realizes that with both 2 and 100000000 > being constants in the doIt method, basic size is always going to return the > same thing. In that case we're measuring the first ~1000 iterations, then > the JIT time, and then only the cost of returning a constant. > > > Fabio Niephaus-3 wrote >> On my machine: >> >> SqueakJS: 2832ms >> RSqueak: 2523ms (*) >> >> (*) using fallback Smalltalk code for large integer; >> https://www.hpi.uni-potsdam.de/hirschfeld/artefacts/rsqueak/bundle/RSqueak.zip >> >> >> Maybe the JITs realize that the result of "2 raisedTo: ...." is not being >> used and omit the calculation? >> >> -- >> >> On Thu, Jun 2, 2016 at 12:24 PM Bert Freudenberg < > >> bert@ > >> > >> wrote: >> >>> On 02.06.2016, at 03:19, Eliot Miranda < > >> eliot.miranda@ > >> > wrote: >>>> OK, tis fixed in VMMaker.oscog-eem.1879. >>>> >>>> Reporting - 774 tallies, 6,836 msec. >>> >>> Nice! >>> >>> Is this finally a benchmark where SqueakJS can beat other VMs? >>> >>> [10 timesRepeat: [(2 raisedTo: 100000000) basicSize]] timeToRun >>> >>> Interp: 18042 ms >>> Cog: 7965 ms >>> Spur: ? >>> SqueakJS: 2821 ms (*) >>> >>> :D >>> >>> - Bert - >>> >>> (*) >>> http://bertfreudenberg.github.io/SqueakJS/run/#url=http://freudenbergs.de/bert/squeakjs&files=[Squeak4.5-13680.image,Squeak4.5-13680.changes,SqueakV41.sources] >>> >>> >>> > > > > > > -- > View this message in context: http://forum.world.st/2-raisedTo-100000000-crashes-VM-tp4898583p4899014.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- 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/20160603/d57f5d3c/smime.bin From gettimothy at zoho.com Fri Jun 3 15:49:22 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Jun 3 15:49:28 2016 Subject: [squeak-dev] http://source.squeak.org/trunk/update-mt-354 is where the breakage occurs Message-ID: <15516f460ef.1275d9c0633654.1319484113439641307@zoho.com> Hi all. I am tracking down that Morphic bug on my 64 linux spur install This bug https://timmydosmalltalk.files.wordpress.com/2016/05/squeak64x64debuggerproblem1.png introduces itself on update-mt-354 If anybody has a hunch what/why it happens here, let me know. For debugging this... If I update up to 353, is there a way during the upgrade to 354 to look for suspects ? I am going to try the 'merge' stuff and see if prompts me for conflicts cheers. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/ef320342/attachment.htm From gettimothy at zoho.com Fri Jun 3 16:07:24 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Jun 3 16:07:30 2016 Subject: [squeak-dev] update 354 Tools-mt.684 introduces the Morphic bug... Message-ID: <1551704e2ce.11cc5288333808.697530607855443093@zoho.com> Hi all. This bug... https://timmydosmalltalk.files.wordpress.com/2016/05/squeak64x64debuggerproblem1.png is introduced at update 354 when I merge in Tools-mt.684. My methodology was to "merge" and at every prompt see if the bug was introduced. I will poke around some more. cheers. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/6ba18ebd/attachment-0001.htm From tim at rowledge.org Fri Jun 3 17:07:40 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 3 17:07:40 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> Message-ID: <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> > On 02-06-2016, at 1:42 PM, Yoshiki Ohshima wrote: >> > Ok. One test is to launch the web browser and put the keyboard focus > on the search field on google or something. Then click on the ibus > menu in the Raspbian title bar. If you have a choice to input > Japanese there, ibus is ready to handle it. No happiness here. At least loading all those fonts improved the rendering! > > Sorry again that I don't have the pi handy right now. If it does not > resolve tomorrow, I'll make some screenshots to explain it. > Please! This is very strange stuff to me; much guidance required. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Canis meus id comedit = My dog ate it. From Yoshiki.Ohshima at acm.org Fri Jun 3 18:36:25 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Jun 3 18:36:29 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> Message-ID: Let us try it with environment variables LC_ALL and LANG to be en_GB.UTF8 first. export LC_ALL=en_GB.UTF8 export LANG=$LC_ALL (and reboot.) You should see menus in English (again) With ibus installed, you should see something like 'raspi-menu' (http://tinlizzie.org/~ohshima/ibus/raspi-menu.png): there should be ibus Preferences item there. Pick that one. Then in the panel you select "Input Method" tab. "Add" and select Japanese, and choose 'anthy'. as in 'ibus-config' (http://tinlizzie.org/~ohshima/ibus/ibus-config.png). There, I believe you get the menu in the bar that looks like 'ibus-selection' (http://tinlizzie.org/~ohshima/ibus/ibus-selection.png). Choose Japanese there and typing into terminal or browser should go through composition. Scratch, when launched with LC_ALL being en_GB.UTF8 should come up in English here, but we can try switching to Japanese once the above works. (Okay... I sent a similar email earlier with attached pictures but it went to the moderation because the attachment is "too big". The thing is that it feels like 100k is a little bit too small... How do others deal with the limit?) On Fri, Jun 3, 2016 at 10:07 AM, tim Rowledge wrote: > >> On 02-06-2016, at 1:42 PM, Yoshiki Ohshima wrote: >>> >> Ok. One test is to launch the web browser and put the keyboard focus >> on the search field on google or something. Then click on the ibus >> menu in the Raspbian title bar. If you have a choice to input >> Japanese there, ibus is ready to handle it. > > No happiness here. At least loading all those fonts improved the rendering! > >> >> Sorry again that I don't have the pi handy right now. If it does not >> resolve tomorrow, I'll make some screenshots to explain it. >> > > Please! This is very strange stuff to me; much guidance required. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Canis meus id comedit = My dog ate it. > > > -- -- Yoshiki From gettimothy at zoho.com Fri Jun 3 20:50:38 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Jun 3 20:50:44 2016 Subject: [squeak-dev] update on tracking down that 64 linux morphic bug... Message-ID: <155180832f2.df729e3d35781.4199381411155167527@zoho.com> Methodology. Go to http://source.squeak.org/trunk/ and update up to update-mt.353 Everything looks fine. Select update-mt.354 and Browse it. The packages that have updates are in bold. Update each one of these except for Tools-mt.684 and test debugger. Works. Load Tools-mt.683 and test debugger. Works. Load Tools-mt.684 and test debugger. Bug appears. Tools-mt.684 changes show one method updated: Debugger>>buildFullWith: builder. Very minor looking changes are made... Help becomes HelpItem and some changes in the frame coordinates. frame: (0 @ 0.22 corner: 1 @ 0.22). frame: (0 @ 0.22 corner: 1 @ 0.8). Manually reverting the Debugger>>buildFullWith method does not fix the error. thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160603/776cc5e6/attachment.htm From commits at source.squeak.org Fri Jun 3 21:56:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 3 21:56:53 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160603215652.2918.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-June/068176.html Name: Tools-cmm.703 Ancestors: Tools-eem.702 - Corrected menu hot-key indication for 'show category' -- it's (Y) not (C). - Upgraded it to 'toggle category selection', which is really useful given that browsers spawned via Cmd+b come with category automatically selected. ============================================= From lewis at mail.msen.com Sat Jun 4 02:23:41 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jun 4 02:23:45 2016 Subject: [squeak-dev] Sanity check r.e. Files-tpr.156 Message-ID: <20160604022341.GA90950@shell.msen.com> If StandardFileStream>>flush is meant to flush everything from the Squeak stream out of the VM and into the operating system buffers, whatever that might happen to mean, and if StandardFileStream>>primSync: is supposed to instruct the operating system to write everything that it knows about in its buffers out to some physical storage medium, whatever that might happen to mean, then I have to think that StandardFileStream>>sync should do a #flush prior to #primSync:, otherwise we might expect that things in the VM (C runtime stdio library) might still be unflushed, and that the #sync on the low level descriptor might apply to stale data. If we need to mix up the higher level stdio flush with the lowever level file descriptor sync (and yes, we apparently do need to do that), then we should probably be forcing a flush before primSync: StandardFileStream>>sync "Really, really, flush pending changes" ^self flush; primSync: fileID Does that sound right? Dave From tim at rowledge.org Sat Jun 4 02:55:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat Jun 4 02:55:29 2016 Subject: [squeak-dev] Sanity check r.e. Files-tpr.156 In-Reply-To: <20160604022341.GA90950@shell.msen.com> References: <20160604022341.GA90950@shell.msen.com> Message-ID: <1DE2E339-A9EB-4B6A-86B0-78978FB38B33@rowledge.org> > On 03-06-2016, at 7:23 PM, David T. Lewis wrote: > > StandardFileStream>>sync > "Really, really, flush pending changes" > ^self flush; primSync: fileID > > Does that sound right? Makes reasonable sense to me, inasmuch as any of it does. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never do at compile-time what you can put off till run-time From commits at source.squeak.org Sat Jun 4 03:15:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 03:15:22 2016 Subject: [squeak-dev] The Trunk: Files-dtl.157.mcz Message-ID: David T. Lewis uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-dtl.157.mcz ==================== Summary ==================== Name: Files-dtl.157 Author: dtl Time: 3 June 2016, 11:15:12.62641 pm UUID: 66c41d04-aff3-414b-8e48-8db1829db0f6 Ancestors: Files-tpr.156 Flush before sync, unsure streams are flushed before sync to disk. =============== Diff against Files-tpr.156 =============== Item was changed: ----- Method: StandardFileStream>>sync (in category 'read, write, position') ----- sync "Really, really, flush pending changes" + ^self flush; primSync: fileID! - ^self primSync: fileID! From lewis at mail.msen.com Sat Jun 4 03:17:32 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jun 4 03:17:34 2016 Subject: [squeak-dev] Sanity check r.e. Files-tpr.156 In-Reply-To: <1DE2E339-A9EB-4B6A-86B0-78978FB38B33@rowledge.org> References: <20160604022341.GA90950@shell.msen.com> <1DE2E339-A9EB-4B6A-86B0-78978FB38B33@rowledge.org> Message-ID: <20160604031732.GA2334@shell.msen.com> On Fri, Jun 03, 2016 at 07:55:30PM -0700, tim Rowledge wrote: > > > On 03-06-2016, at 7:23 PM, David T. Lewis wrote: > > > > StandardFileStream>>sync > > "Really, really, flush pending changes" > > ^self flush; primSync: fileID > > > > Does that sound right? > > Makes reasonable sense to me, inasmuch as any of it does. > OK, sounds reasonable, it might not be right but it certainly is not wrong so I committed the update. Dave From maxleske at gmail.com Sat Jun 4 08:53:38 2016 From: maxleske at gmail.com (Max Leske) Date: Sat Jun 4 08:53:44 2016 Subject: [squeak-dev] Sending HTML message with SecureSMTPClient Message-ID: <1F93DA1A-DB4E-4D19-94F0-8B13E195FDBC@gmail.com> Hi, I tried to answer this question on StackOverflow: http://stackoverflow.com/questions/37619992/squeak-securesmtpclient-to-send-html-email/37628297#37628297 Maybe someone here has a better explanation or can even fix the problem. Cheers, Max From Marcel.Taeumel at hpi.de Sat Jun 4 13:32:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jun 4 14:10:49 2016 Subject: [squeak-dev] Re: update on tracking down that 64 linux morphic bug... In-Reply-To: <155180832f2.df729e3d35781.4199381411155167527@zoho.com> References: <155180832f2.df729e3d35781.4199381411155167527@zoho.com> Message-ID: <1465047164537-4899141.post@n4.nabble.com> Hi Timothy, I don't see any changes in the frame coordinates. The code lines just got moved down a bit. buildFullWith: builder | windowSpec listSpec textSpec | windowSpec := builder pluggableWindowSpec new model: self; label: 'Debugger'; children: OrderedCollection new. listSpec := builder pluggableListSpec new. listSpec model: self; list: #contextStackList; getIndex: #contextStackIndex; setIndex: #toggleContextStackIndex:; menu: #contextStackMenu:shifted:; icon: #messageIconAt:; helpItem: #messageHelpAt:; keyPress: #contextStackKey:from:; frame: (0@0 corner: 1@0.22). windowSpec children add: listSpec. textSpec := self buildCodePaneWith: builder. textSpec frame: (0@0.22corner: 1@0.8). windowSpec children add: textSpec. listSpec := builder pluggableListSpec new. listSpec model: self receiverInspector; list: #fieldList; getIndex: #selectionIndex; setIndex: #toggleIndex:; menu: #fieldListMenu:; keyPress: #inspectorKey:from:; frame: (0@0.8 corner: 0.2@1); help: 'Receiver''s\Instance\Variables' withCRs. windowSpec children add: listSpec. textSpec := builder pluggableTextSpec new. textSpec model: self receiverInspector; getText: #contents; setText: #accept:; help: '<- Select receiver''s field' translated; selection: #contentsSelection; menu: #codePaneMenu:shifted:; frame: (0.2@0.8 corner: 0.5@1). windowSpec children add: textSpec. listSpec := builder pluggableListSpec new. listSpec model: self contextVariablesInspector; list: #fieldList; getIndex: #selectionIndex; setIndex: #toggleIndex:; menu: #fieldListMenu:; keyPress: #inspectorKey:from:; frame: (0.5@0.8 corner: 0.7@1); help: 'Other\Context\Bindings' withCRs. windowSpec children add: listSpec. textSpec := builder pluggableTextSpec new. textSpec model: self contextVariablesInspector; getText: #contents; setText: #accept:; help: '<- Select context''s field' translated; selection: #contentsSelection; menu: #codePaneMenu:shifted:; frame: (0.7@0.8 corner: 1@1). windowSpec children add: textSpec. ^builder build: windowSpec Best, Marcel -- View this message in context: http://forum.world.st/update-on-tracking-down-that-64-linux-morphic-bug-tp4899104p4899141.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat Jun 4 13:35:23 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jun 4 14:13:28 2016 Subject: [squeak-dev] Re: How/when should tools grab the keyboard? In-Reply-To: References: <1464875719661-4898814.post@n4.nabble.com> Message-ID: <1465047323654-4899143.post@n4.nabble.com> Chris Muller-3 wrote > Hi Marcel, I like this idea about a application-driven keyboard focus, > and it would be great to add some hot-key to cycle the keyboard focus > around the widgets, as Windows and other OS's do. Hmm, there's > somewhat of a semantic tangle -- because mouseOverForKeyboardFocus > means the focus is always under the mouse pointer... I know for > pop-up dialogs, it works by opening it directly under where the mouse > pointer is. I suppose the ListChooser could do the same, but what > about other windows? I mean, isn't the reason one spawns an Inspector > or Browser window usually to interact with it? It would seem so! > > So, what widget? I think top-left is a good default. > > But if there is no ability to switch focus with the keyboard, then it > may not be worth it at all because one would have to use the mouse to > set the focus 90% of the time.. > > But which keys? Tab and back-Tab are obvious candidates except, we > need Tab in code editors and back-Tab doesn't work in Linux..... > > On Thu, Jun 2, 2016 at 8:55 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> Hi, there. >> >> If you enable the following preferences. >> >> [x] mouseOverForKeyboardFocus >> [x] Windows' Contents Are Always Active >> >> You might be suprised that, for example, CMD+I opens an inspector but the >> keyboard focus is still in the current tool, maybe a workspace. Even if >> you >> disable "mouseOverForKeyboardFocus", the workspace will keep its keyboard >> focus. If you also disable "Window's Contents Are Always Active", at >> least >> the new window looks focused, although no widget insided grabbed the >> focus. >> Actually, no widget will have the keyboard focus then. >> >> So, I added focus grabbing for lists and text morphs. I used it for our >> list >> chooser: >> http://forum.world.st/The-Trunk-Morphic-mt-1157-mcz-tp4898664.html >> http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-165-mcz-tp4898662.html >> >> It is quite simple. Models can say "self changed: #inputRequested with: >> #someSelector" and the correct widget will grab the keyboard. Easy for >> the >> list chooser because you want to type in a filter and hit return to >> choose. >> (Try it out in the code browser category list via CMD+F to find a class.) >> >> But what about other tools? >> >> System Browser >> Inspector >> Object Explorer >> ... >> >> Any idea which widgets should grab the keyboard focus if opened? The >> first >> list? The code widget? We can make different choices for each tool. >> >> Suggestions are welcome. This discussion affects general keyboard >> interaction in Squeak. >> >> Passionate mouse users will not notice any problem, though. ;o) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/How-when-should-tools-grab-the-keyboard-tp4898814.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Yeah, #mouseOverForKeyboardFocus is tricky since we cannot control the mouse coordinates programmatically. For keyboard-driven navigation, such a preference might not be well suited. Best, Marcel -- View this message in context: http://forum.world.st/How-when-should-tools-grab-the-keyboard-tp4898814p4899143.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Jun 4 14:28:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 14:28:38 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1159.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1159.mcz ==================== Summary ==================== Name: Morphic-mt.1159 Author: mt Time: 4 June 2016, 4:27:58.511373 pm UUID: 6304c02e-91f9-7840-94b6-008e68d296d2 Ancestors: Morphic-ul.1158 Fixes a small regression bug where freshly opened tool windows were not raised to the front. Was especially annoying when clicking some button in the code browsers. =============== Diff against Morphic-ul.1158 =============== Item was removed: - ----- Method: SystemWindow>>activateIfNeeded: (in category 'focus') ----- - activateIfNeeded: evt - "Make me the new key window if needed. Ensure that the focus look matches the keyboard focus." - - (self isKeyWindow not - and: [self class windowsRaiseOnClick - or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) - ifTrue: [self beKeyWindow] - ifFalse: [self updateFocusLookForKeyboardFocus].! Item was added: + ----- Method: SystemWindow>>beKeyWindowIfNeeded: (in category 'top window') ----- + beKeyWindowIfNeeded: evt + "Make me the new key window if needed. Ensure that the focus look matches the keyboard focus." + + (self isKeyWindow not + and: [self class windowsRaiseOnClick + or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) + ifTrue: [self beKeyWindow] + ifFalse: [self updateFocusLookForKeyboardFocus].! Item was changed: ----- Method: SystemWindow>>handleMouseDown: (in category 'events') ----- handleMouseDown: evt + self beKeyWindowIfNeeded: evt. - self activateIfNeeded: evt. ^ super handleMouseDown: evt! Item was changed: ----- Method: SystemWindow>>handleMouseUp: (in category 'events') ----- handleMouseUp: evt + "Some widgets grab the keyboard focus only on mouse-up. Hence, we need to update our looks." + + self updateFocusLookForKeyboardFocus. - - self activateIfNeeded: evt. ^ super handleMouseUp: evt! From commits at source.squeak.org Sat Jun 4 14:57:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 14:57:43 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1160.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1160.mcz ==================== Summary ==================== Name: Morphic-mt.1160 Author: mt Time: 4 June 2016, 4:57:05.250373 pm UUID: 42f04455-424e-3545-9fe9-7d71a1e77383 Ancestors: Morphic-mt.1159 Moves automatic keyboard focus grabbing from KeyboardEvent into the Morph's key-stroke-handler. More robust when events bubble up again. No accidential focus grab anymore. =============== Diff against Morphic-mt.1159 =============== Item was changed: ----- Method: KeyboardEvent>>sentTo: (in category 'dispatching') ----- + sentTo: anObject + "Dispatch the receiver into anObject" + type == #keystroke ifTrue:[^anObject handleKeystroke: self]. + type == #keyDown ifTrue:[^anObject handleKeyDown: self]. + type == #keyUp ifTrue:[^anObject handleKeyUp: self]. + ^super sentTo: anObject.! - sentTo: aMorph - "Dispatch the receiver into the given morph or another one if keyboard focus changes." - - | receivingMorph | - receivingMorph := aMorph. - aMorph wantsKeyboardFocus ifTrue: [ - receivingMorph := (self hand newKeyboardFocus: aMorph) ifNil: [aMorph]]. - - type == #keystroke ifTrue:[^receivingMorph handleKeystroke: self]. - type == #keyDown ifTrue:[^receivingMorph handleKeyDown: self]. - type == #keyUp ifTrue:[^receivingMorph handleKeyUp: self]. - - ^super sentTo: receivingMorph! Item was changed: ----- Method: Morph>>handleKeystroke: (in category 'events-processing') ----- handleKeystroke: anEvent + "System level event handling. Has support for automatically grabbing the keyboard focus considering the keyboard focus delegate. See #newKeyboardFocus:" - "System level event handling." + | handler | + anEvent wasHandled ifTrue: [^ self]. + (self handlesKeyboard: anEvent) ifFalse: [^ self]. + + handler := self wantsKeyboardFocus + ifFalse: [self] + ifTrue: [(anEvent hand newKeyboardFocus: self) ifNil: [self]]. + anEvent handler: handler. + - anEvent wasHandled - ifTrue: [^ self]. - (self handlesKeyboard: anEvent) - ifFalse: [^ self]. anEvent wasHandled: true. + ^ handler keyStroke: anEvent! - ^ self keyStroke: anEvent! Item was changed: ----- Method: TextMorph>>handleKeystroke: (in category 'events-processing') ----- handleKeystroke: anEvent + "Overwritten to support tab-among-fields preference." - "System level event handling." | pasteUp | anEvent wasHandled ifTrue:[^self]. + (self handlesKeyboard: anEvent) ifFalse: [^ self]. + + anEvent keyCharacter = Character tab ifTrue: [ + "Allow passing through text morph inside pasteups" + (self wouldAcceptKeyboardFocusUponTab + and: [(pasteUp := self pasteUpMorphHandlingTabAmongFields) notNil]) + ifTrue: [ + anEvent wasHandled: true. + ^ pasteUp tabHitWithEvent: anEvent]]. + + ^ super handleKeystroke: anEvent! - (self handlesKeyboard: anEvent) ifFalse: [^ self]. - anEvent wasHandled: true. - anEvent keyCharacter = Character tab ifTrue: - ["Allow passing through text morph inside pasteups" - (self wouldAcceptKeyboardFocusUponTab and: - [(pasteUp := self pasteUpMorphHandlingTabAmongFields) notNil]) - ifTrue:[^ pasteUp tabHitWithEvent: anEvent]]. - self keyStroke: anEvent! Item was added: + ----- Method: TextMorph>>wantsKeyboardFocus (in category 'event handling') ----- + wantsKeyboardFocus + + ^ true! From commits at source.squeak.org Sat Jun 4 16:39:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 16:39:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1161.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1161.mcz ==================== Summary ==================== Name: Morphic-mt.1161 Author: mt Time: 4 June 2016, 6:38:28.65943 pm UUID: aa80b684-784c-7549-bb0c-a1c9026a4797 Ancestors: Morphic-mt.1160 Adds event filters. Includes refactorings for MorphicEventDispatcher and HandMorph >> #handleEvent:. Also fixes event bubbling for focus events. Sorry for this agglomeration of changes. See Morph >> #eventFilterDocumentation. =============== Diff against Morphic-mt.1160 =============== Item was changed: ----- Method: DockingBarMorph>>handleFocusEvent: (in category 'events-processing') ----- handleFocusEvent: evt "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children." + | result filteredEvent | + (evt isMouse and:[ evt isMouseUp ]) ifTrue:[^ evt]. - (evt isMouse and:[ evt isMouseUp ]) ifTrue:[^ self]. + result := self processEvent: evt. + filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. - self processEvent: evt. "Need to handle keyboard input if we have the focus." + filteredEvent isKeyboard ifTrue: [^ super handleFocusEvent: filteredEvent]. - evt isKeyboard ifTrue: [^ self handleEvent: evt]. "We need to handle button clicks outside and transitions to local popUps so throw away everything else" + (filteredEvent isMouseOver or:[filteredEvent isMouse not]) ifTrue:[^filteredEvent]. - (evt isMouseOver or:[evt isMouse not]) ifTrue:[^self]. "What remains are mouse buttons and moves" + filteredEvent isMove ifFalse:[^super handleFocusEvent: filteredEvent]. "handle clicks outside by regular means" - evt isMove ifFalse:[^self handleEvent: evt]. "handle clicks outside by regular means" "Now it's getting tricky. On #mouseMove we might transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." + selectedItem ifNotNil:[(selectedItem activateSubmenu: filteredEvent) ifTrue:[^filteredEvent]]. - selectedItem ifNotNil:[(selectedItem activateSubmenu: evt) ifTrue:[^self]]. ! Item was added: + ----- Method: DropEvent>>translateTo: (in category 'transforming') ----- + translateTo: point + + position := point.! Item was changed: Morph subclass: #HandMorph + instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventFilters mouseFilters keyboardFilters eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' - instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats NewEventRules NormalCursor PasteBuffer ShowEvents' poolDictionaries: 'EventSensorConstants' category: 'Morphic-Kernel'! !HandMorph commentStamp: '' prior: 0! The cursor may be thought of as the HandMorph. The hand's submorphs hold anything being carried by dragging. There is some minimal support for multiple hands in the same world.! Item was changed: + ----- Method: HandMorph>>addEventListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>addEventListener: (in category 'listeners') ----- addEventListener: anObject "Make anObject a listener for all events. All events will be reported to the object." self eventListeners: (self addListener: anObject to: self eventListeners)! Item was changed: + ----- Method: HandMorph>>addKeyboardListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>addKeyboardListener: (in category 'listeners') ----- addKeyboardListener: anObject "Make anObject a listener for keyboard events. All keyboard events will be reported to the object." self keyboardListeners: (self addListener: anObject to: self keyboardListeners)! Item was changed: + ----- Method: HandMorph>>addListener:to: (in category 'events-listening') ----- - ----- Method: HandMorph>>addListener:to: (in category 'listeners') ----- addListener: anObject to: aListenerGroup "Add anObject to the given listener group. Return the new group." | listeners | listeners := aListenerGroup. (listeners notNil and:[listeners includes: anObject]) ifFalse:[ listeners ifNil:[listeners := WeakArray with: anObject] ifNotNil:[listeners := listeners copyWith: anObject]]. listeners := listeners copyWithout: nil. "obsolete entries" ^listeners! Item was changed: + ----- Method: HandMorph>>addMouseListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>addMouseListener: (in category 'listeners') ----- addMouseListener: anObject "Make anObject a listener for mouse events. All mouse events will be reported to the object." self mouseListeners: (self addListener: anObject to: self mouseListeners)! Item was changed: ----- Method: HandMorph>>dropMorph:event: (in category 'grabbing/dropping') ----- dropMorph: aMorph event: anEvent "Drop the given morph which was carried by the hand" | event dropped | (anEvent isMouseUp and:[aMorph shouldDropOnMouseUp not]) ifTrue:[^self]. "Note: For robustness in drag and drop handling we remove the morph BEFORE we drop him, but we keep his owner set to the hand. This prevents system lockups when there is a problem in drop handling (for example if there's an error in #wantsToBeDroppedInto:). THIS TECHNIQUE IS NOT RECOMMENDED FOR CASUAL USE." self privateRemove: aMorph. aMorph privateOwner: self. dropped := aMorph. (dropped hasProperty: #addedFlexAtGrab) ifTrue:[dropped := aMorph removeFlexShell]. event := DropEvent new setPosition: self position contents: dropped hand: self. [ "In case of an error, ensure that the morph-to-be-dropped will be disposed. Otherwise it may confuse garbage handler. See the sends of #privateRemove: and #privateOwner: above." + event := self sendEvent: event focus: nil. "event filters can apply and filtered events will be returned" - self sendEvent: event focus: nil. event wasHandled ifFalse: [aMorph rejectDropMorphEvent: event] ] ensure: [ aMorph owner == self ifTrue: [aMorph delete] ]. self mouseOverHandler processMouseOver: anEvent.! Item was added: + ----- Method: HandMorph>>eventBubbleFilters (in category 'events-filtering-bubbling') ----- + eventBubbleFilters + Error signal: 'Hand morphs do only have capture filters. Install top-most bubble filters in the world.'! Item was added: + ----- Method: HandMorph>>eventCaptureFilters (in category 'events-filtering-capturing') ----- + eventCaptureFilters + ^ eventCaptureFilters! Item was added: + ----- Method: HandMorph>>eventCaptureFilters: (in category 'events-filtering-capturing') ----- + eventCaptureFilters: anArrayOrNil + eventCaptureFilters := anArrayOrNil! Item was changed: + ----- Method: HandMorph>>eventListeners (in category 'events-listening') ----- - ----- Method: HandMorph>>eventListeners (in category 'listeners') ----- eventListeners ^eventListeners! Item was changed: + ----- Method: HandMorph>>eventListeners: (in category 'events-listening') ----- - ----- Method: HandMorph>>eventListeners: (in category 'listeners') ----- eventListeners: anArrayOrNil eventListeners := anArrayOrNil! Item was changed: ----- Method: HandMorph>>handleEvent: (in category 'events-processing') ----- + handleEvent: unfilteredEvent - handleEvent: anEvent - | evt ofs | - owner ifNil:[^self]. - evt := anEvent. + | filteredEvent | + owner ifNil: [^ unfilteredEvent "not necessary but good style -- see Morph >> #handleEvent:"]. + + self logEvent: unfilteredEvent. - EventStats ifNil:[EventStats := IdentityDictionary new]. - EventStats at: #count put: (EventStats at: #count ifAbsent:[0]) + 1. - EventStats at: evt type put: (EventStats at: evt type ifAbsent:[0]) + 1. + "Mouse-over events occur really, really, really often. They are kind of the heart beat of the Morphic UI process." + unfilteredEvent isMouseOver ifTrue: [^ self sendMouseEvent: unfilteredEvent]. - evt isMouseOver ifTrue:[^self sendMouseEvent: evt]. + self showEvent: unfilteredEvent. + self sendListenEvents: unfilteredEvent. + + filteredEvent := self sendFilterEventCapture: unfilteredEvent for: nil. + "filteredEvent := unfilteredEvent" " <-- use this to disable global capture filters" + + filteredEvent wasIgnored ifTrue: [ + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. + + filteredEvent isWindowEvent ifTrue: [ + self sendEvent: filteredEvent focus: nil. + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. - ShowEvents == true ifTrue:[ - Display fill: (0@0 extent: 300@120) rule: Form over fillColor: Color white. - ofs := (owner hands indexOf: self) - 1 * 60. - evt isKeyboard - ifTrue: [ 'key: ', evt printString displayAt: (0@ofs) + (0@30) ] - ifFalse: [ 'evt: ', evt printString displayAt: (0@ofs) + (0@0) ]. - 'kf: ', self keyboardFocus printString displayAt: (0@ofs)+(0@45). - ]. - "Notify listeners" - self sendListenEvent: evt to: self eventListeners. + filteredEvent isKeyboard ifTrue:[ + self sendKeyboardEvent: filteredEvent. + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. + + filteredEvent isDropEvent ifTrue:[ + self sendEvent: filteredEvent focus: nil. + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. - evt isWindowEvent ifTrue: [ - self sendEvent: evt focus: nil. - ^self mouseOverHandler processMouseOver: lastMouseEvent]. + filteredEvent isMouse ifFalse: [ + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. - evt isKeyboard ifTrue:[ - self sendListenEvent: evt to: self keyboardListeners. - self sendKeyboardEvent: evt. - ^self mouseOverHandler processMouseOver: lastMouseEvent]. + " ********** MOUSE EVENT *********** " - evt isDropEvent ifTrue:[ - self sendEvent: evt focus: nil. - ^self mouseOverHandler processMouseOver: lastMouseEvent]. + lastMouseEvent := filteredEvent. - evt isMouse ifTrue:[ - self sendListenEvent: evt to: self mouseListeners. - lastMouseEvent := evt]. "Check for pending drag or double click operations." mouseClickState ifNotNil:[ + (mouseClickState handleEvent: filteredEvent from: self) ifFalse:[ - (mouseClickState handleEvent: evt from: self) ifFalse:[ "Possibly dispatched #click: or something and will not re-establish otherwise" + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]]. - ^self mouseOverHandler processMouseOver: lastMouseEvent]]. + filteredEvent isMove ifTrue:[ + self position: filteredEvent position. + self sendMouseEvent: filteredEvent. + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. + + "Issue a synthetic move event if we're not at the position of the event" + filteredEvent position = self position + ifFalse: [self moveToEvent: filteredEvent]. + + "Drop submorphs on button events" + self hasSubmorphs + ifTrue:[self dropMorphs: filteredEvent] + ifFalse:[self sendMouseEvent: filteredEvent]. + - evt isMove ifTrue:[ - self position: evt position. - self sendMouseEvent: evt. - ] ifFalse:[ - "Issue a synthetic move event if we're not at the position of the event" - (evt position = self position) ifFalse:[self moveToEvent: evt]. - "Drop submorphs on button events" - (self hasSubmorphs) - ifTrue:[self dropMorphs: evt] - ifFalse:[self sendMouseEvent: evt]. - ]. - ShowEvents == true ifTrue:['mf: ', self mouseFocus printString displayAt: (0@ofs) + (0@15)]. self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent "not necessary but good style -- see Morph >> #handleEvent:" ! - "self handleDragOutside: anEvent." - ! Item was added: + ----- Method: HandMorph>>keyboardBubbleFilters (in category 'events-filtering-bubbling') ----- + keyboardBubbleFilters + Error signal: 'Hand morphs do only have capture filters. Install top-most bubble filters in the world.'! Item was added: + ----- Method: HandMorph>>keyboardCaptureFilters (in category 'events-filtering-capturing') ----- + keyboardCaptureFilters + ^ keyboardCaptureFilters! Item was added: + ----- Method: HandMorph>>keyboardCaptureFilters: (in category 'events-filtering-capturing') ----- + keyboardCaptureFilters: anArrayOrNil + keyboardCaptureFilters := anArrayOrNil! Item was changed: + ----- Method: HandMorph>>keyboardListeners (in category 'events-listening') ----- - ----- Method: HandMorph>>keyboardListeners (in category 'listeners') ----- keyboardListeners ^keyboardListeners! Item was changed: + ----- Method: HandMorph>>keyboardListeners: (in category 'events-listening') ----- - ----- Method: HandMorph>>keyboardListeners: (in category 'listeners') ----- keyboardListeners: anArrayOrNil keyboardListeners := anArrayOrNil! Item was added: + ----- Method: HandMorph>>logEvent: (in category 'events-debugging') ----- + logEvent: anEvent + "Update statistics for processed events." + + EventStats ifNil:[EventStats := IdentityDictionary new]. + EventStats at: #count put: (EventStats at: #count ifAbsent:[0]) + 1. + EventStats at: anEvent type put: (EventStats at: anEvent type ifAbsent:[0]) + 1.! Item was added: + ----- Method: HandMorph>>mouseBubbleFilters (in category 'events-filtering-bubbling') ----- + mouseBubbleFilters + Error signal: 'Hand morphs do only have capture filters. Install top-most bubble filters in the world.'! Item was added: + ----- Method: HandMorph>>mouseCaptureFilters (in category 'events-filtering-capturing') ----- + mouseCaptureFilters + ^ mouseCaptureFilters! Item was added: + ----- Method: HandMorph>>mouseCaptureFilters: (in category 'events-filtering-capturing') ----- + mouseCaptureFilters: anArrayOrNil + mouseCaptureFilters := anArrayOrNil! Item was changed: + ----- Method: HandMorph>>mouseListeners (in category 'events-listening') ----- - ----- Method: HandMorph>>mouseListeners (in category 'listeners') ----- mouseListeners ^mouseListeners! Item was changed: + ----- Method: HandMorph>>mouseListeners: (in category 'events-listening') ----- - ----- Method: HandMorph>>mouseListeners: (in category 'listeners') ----- mouseListeners: anArrayOrNil mouseListeners := anArrayOrNil! Item was changed: + ----- Method: HandMorph>>removeEventListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>removeEventListener: (in category 'listeners') ----- removeEventListener: anObject "Remove anObject from the current event listeners." self eventListeners: (self removeListener: anObject from: self eventListeners).! Item was changed: + ----- Method: HandMorph>>removeKeyboardListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>removeKeyboardListener: (in category 'listeners') ----- removeKeyboardListener: anObject "Remove anObject from the current keyboard listeners." self keyboardListeners: (self removeListener: anObject from: self keyboardListeners).! Item was changed: + ----- Method: HandMorph>>removeListener:from: (in category 'events-listening') ----- - ----- Method: HandMorph>>removeListener:from: (in category 'listeners') ----- removeListener: anObject from: aListenerGroup "Remove anObject from the given listener group. Return the new group." | listeners | aListenerGroup ifNil: [^nil]. listeners := aListenerGroup. listeners := listeners copyWithout: anObject. listeners := listeners copyWithout: nil. "obsolete entries" listeners isEmpty ifTrue: [listeners := nil]. ^listeners! Item was changed: + ----- Method: HandMorph>>removeMouseListener: (in category 'events-listening') ----- - ----- Method: HandMorph>>removeMouseListener: (in category 'listeners') ----- removeMouseListener: anObject "Remove anObject from the current mouse listeners." self mouseListeners: (self removeListener: anObject from: self mouseListeners).! Item was changed: ----- Method: HandMorph>>sendEvent:focus:clear: (in category 'private events') ----- sendEvent: anEvent focus: focusHolder clear: aBlock "Send the event to the morph currently holding the focus, or if none to the owner of the hand." | result | focusHolder ifNotNil:[^self sendFocusEvent: anEvent to: focusHolder clear: aBlock]. ActiveEvent := anEvent. + [result := owner processEvent: anEvent] + ensure: [ActiveEvent := nil]. + ^ result == #rejected ifTrue: [anEvent] ifFalse: [result "filtered event"]! - result := owner processEvent: anEvent. - ActiveEvent := nil. - ^result! Item was added: + ----- Method: HandMorph>>sendFilterEventCaptureAgain:for: (in category 'events-processing') ----- + sendFilterEventCaptureAgain: anEvent for: anObjectOrNil + "Apply keyboard-specific and mouse-specific capturing filters. If a filter changes the event type, filter again. WARNING: This is a powerful mechanism. Filters can create endless loops, which are difficult to debug. + + Overwritten to provide keyboard and mouse focus holders to event filters. Note that hence the event target in such global filters can be nil." + + | filteredEvent | + filteredEvent := anEvent. + + filteredEvent isKeyboard ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: self keyboardFocus to: self keyboardCaptureFilters. + filteredEvent isKeyboard not ifTrue: [^ self sendFilterEventCaptureAgain: filteredEvent for: anObjectOrNil]]. + + filteredEvent isMouse ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: self mouseFocus to: self mouseCaptureFilters. + filteredEvent isMouse not ifTrue: [^ self sendFilterEventCaptureAgain: filteredEvent for: anObjectOrNil]]. + + ^ filteredEvent! Item was changed: ----- Method: HandMorph>>sendFocusEvent:to:clear: (in category 'private events') ----- sendFocusEvent: anEvent to: focusHolder clear: aBlock "Send the event to the morph currently holding the focus" | result w | + w := focusHolder world ifNil:[aBlock value. ^ anEvent]. - w := focusHolder world ifNil:[^ aBlock value]. w becomeActiveDuring:[ ActiveHand := self. ActiveEvent := anEvent. result := focusHolder handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: self)). ]. + ^result == #rejected ifTrue: [anEvent] ifFalse: [result "filtered event"]! - ^result! Item was added: + ----- Method: HandMorph>>sendListenEvents: (in category 'private events') ----- + sendListenEvents: anEvent + "Send the given event to all registered event listeners." + + self sendListenEvent: anEvent to: self eventListeners. + + anEvent isKeyboard + ifTrue: [self sendListenEvent: anEvent to: self keyboardListeners]. + + anEvent isMouse + ifTrue: [self sendListenEvent: anEvent to: self mouseListeners].! Item was added: + ----- Method: HandMorph>>showEvent: (in category 'events-debugging') ----- + showEvent: anEvent + "Show details about the event on the display form. Useful for debugging." + + | ofs | + ShowEvents == true ifFalse: [^ self]. + + Display fill: (0@0 extent: 300@120) rule: Form over fillColor: Color white. + ofs := (owner hands indexOf: self) - 1 * 60. + + anEvent isKeyboard + ifTrue: [ 'key: ', anEvent printString displayAt: (0@ofs) + (0@30) ] + ifFalse: [ 'evt ', anEvent printString displayAt: (0@ofs) + (0@0) ]. + + 'kf: ', self keyboardFocus printString displayAt: (0@ofs)+(0@45). + 'mf: ', self mouseFocus printString displayAt: (0@ofs) + (0@15) + ! Item was removed: - ----- Method: KeyboardEvent>>setType:buttons:position:keyValue:charCode:hand:stamp: (in category 'private') ----- - setType: aSymbol buttons: anInteger position: pos keyValue: aValue charCode: ignoredUsedInOBTesting hand: aHand stamp: stamp - self setType: aSymbol buttons: anInteger position: pos keyValue: aValue hand: aHand stamp: stamp! Item was changed: ----- Method: MenuMorph>>handleFocusEvent: (in category 'events') ----- handleFocusEvent: evt "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children." + | result filteredEvent | + result := self processEvent: evt. + filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. - self processEvent: evt. "Need to handle keyboard input if we have the focus." + filteredEvent isKeyboard ifTrue: [^ super handleFocusEvent: filteredEvent]. - evt isKeyboard ifTrue: [^ self handleEvent: evt]. "We need to handle button clicks outside and transitions to local popUps so throw away everything else" + (filteredEvent isMouseOver or:[filteredEvent isMouse not]) ifTrue:[^filteredEvent]. - (evt isMouseOver or:[evt isMouse not]) ifTrue:[^self]. "What remains are mouse buttons and moves" + filteredEvent isMove ifFalse:[^super handleFocusEvent: filteredEvent]. "handle clicks outside by regular means" - evt isMove ifFalse:[^self handleEvent: evt]. "handle clicks outside by regular means" "Now it's getting tricky. On #mouseMove we might transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." selectedItem ifNotNil: [ + (selectedItem activateSubmenu: filteredEvent) + ifTrue: [ ^filteredEvent ] - (selectedItem activateSubmenu: evt) - ifTrue: [ ^self ] ifFalse: [ + (self containsPoint: filteredEvent position) ifFalse: [ + self selectItem: nil event: filteredEvent ] ] ]. - (self containsPoint: evt position) ifFalse: [ - self selectItem: nil event: evt ] ] ]. "Note: The following does not traverse upwards but it's the best I can do for now" + popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: filteredEvent) ifTrue:[^filteredEvent]]. + ^ filteredEvent! - popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue:[^self]].! Item was added: + ----- Method: Morph>>addEventBubbleFilter: (in category 'events-filtering-bubbling') ----- + addEventBubbleFilter: anObject + self eventBubbleFilters: (self addFilter: anObject to: self eventBubbleFilters).! Item was added: + ----- Method: Morph>>addEventCaptureFilter: (in category 'events-filtering-capturing') ----- + addEventCaptureFilter: anObject + self eventCaptureFilters: (self addFilter: anObject to: self eventCaptureFilters).! Item was added: + ----- Method: Morph>>addFilter:to: (in category 'events-filtering') ----- + addFilter: anObject to: aFilterGroup + "Add anObject to the given listener group. Return the new group." + | filters | + filters := aFilterGroup. + (filters notNil and:[filters includes: anObject]) ifFalse:[ + filters + ifNil:[filters := WeakArray with: anObject] + ifNotNil:[filters := filters copyWith: anObject]]. + filters := filters copyWithout: nil. "obsolete entries" + ^filters! Item was added: + ----- Method: Morph>>addKeyboardBubbleFilter: (in category 'events-filtering-bubbling') ----- + addKeyboardBubbleFilter: anObject + self keyboardBubbleFilters: (self addFilter: anObject to: self keyboardBubbleFilters).! Item was added: + ----- Method: Morph>>addKeyboardCaptureFilter: (in category 'events-filtering-capturing') ----- + addKeyboardCaptureFilter: anObject + self keyboardCaptureFilters: (self addFilter: anObject to: self keyboardCaptureFilters).! Item was added: + ----- Method: Morph>>addMouseBubbleFilter: (in category 'events-filtering-bubbling') ----- + addMouseBubbleFilter: anObject + self mouseBubbleFilters: (self addFilter: anObject to: self mouseBubbleFilters).! Item was added: + ----- Method: Morph>>addMouseCaptureFilter: (in category 'events-filtering-capturing') ----- + addMouseCaptureFilter: anObject + self mouseCaptureFilters: (self addFilter: anObject to: self mouseCaptureFilters).! Item was added: + ----- Method: Morph>>eventBubbleFilters (in category 'events-filtering-bubbling') ----- + eventBubbleFilters + ^ self valueOfProperty: #eventBubbleFilters! Item was added: + ----- Method: Morph>>eventBubbleFilters: (in category 'events-filtering-bubbling') ----- + eventBubbleFilters: anArrayOrNil + ^ self setProperty: #eventBubbleFilters toValue: anArrayOrNil! Item was added: + ----- Method: Morph>>eventCaptureFilters (in category 'events-filtering-capturing') ----- + eventCaptureFilters + ^ self valueOfProperty: #eventCaptureFilters! Item was added: + ----- Method: Morph>>eventCaptureFilters: (in category 'events-filtering-capturing') ----- + eventCaptureFilters: anArrayOrNil + ^ self setProperty: #eventCaptureFilters toValue: anArrayOrNil! Item was added: + ----- Method: Morph>>eventFilterDocumentation (in category 'events-filtering') ----- + eventFilterDocumentation + " + Event filters represent a mechanism to intercept events *before* morphs get the chance to handle them. So, there are still event handlers, which are usually the morphs themselves. However, morphs can also be their own event filters. One application of event filters is keyboard shortcuts. Such filters should invoke the shortcut but ignore the original event to *be sure* that no other morph ever handles that. System windows have window shortcuts. The world has world shortcuts. + + When user input events are dispatched, there is a capturing phase and a bubbling phase. This dispatching behavior is described in MorphicEventDispatcher. Capturing means that we are looking for the handler (resp. morph) to handle the event, traversing submorph hierarchy. Bubbling means that once a morph handled the event, all owners get also the chance to handle that event *if* they honor the #wasHandled flag.. Event filters can be attached to any morph for the capturing or the bubbling phase. See it as code that is execute before/after the event handlers. + + Event filters are objects that implement #filterEvent:for:. All objects understand that message but do nothing. There is a PluggableEventFilter for a more dynamic programming approach. + + Morphic hands have specific focus holders. There is a keyboard focus and a mouse focus. For example, text morphs are good candidates for holders of the keyboard focus. Both foci bypass the traditional event capturing phase, which usually start at the world morph. However, capture filters are also apply before handling the focus event. See Morph >> #handleFocusEvent: for that. Note that after handling the focus event, events do bubble along their owners, which usually do nothing if they honor the #wasHandled flag, and hence all bubble event filters are executed unless events get ignored. Thus, we mimick the behavior of MorphicEventDispatcher in #handleFocusEvent:. + + There are event filters for all kinds of events, filters for keyboard events, and filters for mouse events. You can always install generic event filters and then check for the particular event type in that filter. However, it is good style to not install keyboard event filters as generic event filters. It makes code more readable. + + You can install global event capture filters in instances of HandMorph. For example, Project current world firstHand provides access to the project's world's hand. Avoid using globals such as ActiveHand or ActiveWorld. BEWARE that global event filters can have unexpected effects and may be difficult to debug. Note that you cannot install global event bubble filters in the HandMorph. You have to install such a filter in the world because hands are not part of the event bubbling phase. + + For an example of keyboard capturing filters see SystemWindow >> #addKeyboardShortcuts and SystemWindow >> #filterEvent:for:. You can also take a look at: PasteUpMorph >> #addKeyboardShortcuts and PasteUpMorph >> #filterEvent:for: and DockingBarMorph >> #filterEvent:for: for a more elaborate example. + + Event filters include all the behavior of event listeners. An event listener converted to an event filter would be a global event capture filter that sents a copy of the event to itself: + + | listenerFilter someMorph | + someMorph := Morph new. + listenerFilter := PluggableEventFilter on: [:event :target | event copy sentTo: someMorph. event]. + Project current world activeHand addEventCaptureFilter: listenerFilter. + + Instead of: + + | someMorph | + someMorph := Morph new. + Project current world activeHand addEventListener: someMorph. + + The filter version might look more complicated than the traditional listener version but note that it is quite rare to install global event filters. The example for keyboard shortcuts reflects the simplicity of event filters."! Item was changed: ----- Method: Morph>>handleEvent: (in category 'events-processing') ----- handleEvent: anEvent + "Apply event filters and then handle the resulting event. We have to return the event to chain filters." + + | filteredEvent | + filteredEvent := self sendFilterEventBubble: anEvent for: self. + filteredEvent wasIgnored ifFalse: [filteredEvent sentTo: self]. + ^ filteredEvent! - "Handle the given event" - ^anEvent sentTo: self.! Item was changed: ----- Method: Morph>>handleFocusEvent: (in category 'events-processing') ----- handleFocusEvent: anEvent + "Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand. + + 1) Event bubbling. Do event bubbling known from MorphicEventDispatcher by calling #handleEvent: also on all owners. + 2) Event capture filters. Walk along the owner chain in reverse order and apply capture filters as known from MorphicEventDispatcher. + + If you want to overwrite this in a subclass (for example to implement modal dialogs) ensure to call super instead if #handleEvent: directly." + + | filteredEvent | + filteredEvent := anEvent. + + "TODO: Add a check to ensure that our event dispatcher is actually of kind MorphicEventDispatcher?!! We do copy its behavior though... like self defaultEventDispatcher class == MorphicEventDispatcher? Or #isKindOf:? Anyway, the outermost morph determines the event dispatcher. See HandMorph >> #sendEvent:focus:clear: and PasteUpMorph >> #processEvent:." + + "Event capturing. Filters only because the capturing phase was bypassed by using the keyboard/mouse focus." + self withAllOwners reverseDo: [:morph | "reverse order to comply with default MorphEventDispatcher" + filteredEvent := morph sendFilterEventCapture: filteredEvent for: morph. + filteredEvent wasIgnored ifTrue: [^ filteredEvent]]. + + "Event bubbling. Filters are processed in #handleEvent:." + self withAllOwnersDo: [:morph | + filteredEvent := morph handleEvent: filteredEvent. + filteredEvent wasIgnored ifTrue: [^ filteredEvent]]. + + ^ filteredEvent! - "Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand." - ^self handleEvent: anEvent! Item was added: + ----- Method: Morph>>keyboardBubbleFilters (in category 'events-filtering-bubbling') ----- + keyboardBubbleFilters + ^ self valueOfProperty: #keyboardBubbleFilters! Item was added: + ----- Method: Morph>>keyboardBubbleFilters: (in category 'events-filtering-bubbling') ----- + keyboardBubbleFilters: anArrayOrNil + ^ self setProperty: #keyboardBubbleFilters toValue: anArrayOrNil! Item was added: + ----- Method: Morph>>keyboardCaptureFilters (in category 'events-filtering-capturing') ----- + keyboardCaptureFilters + ^ self valueOfProperty: #keyboardCaptureFilters! Item was added: + ----- Method: Morph>>keyboardCaptureFilters: (in category 'events-filtering-capturing') ----- + keyboardCaptureFilters: anArrayOrNil + ^ self setProperty: #keyboardCaptureFilters toValue: anArrayOrNil! Item was added: + ----- Method: Morph>>mouseBubbleFilters (in category 'events-filtering-bubbling') ----- + mouseBubbleFilters + ^ self valueOfProperty: #mouseBubbleFilters! Item was added: + ----- Method: Morph>>mouseBubbleFilters: (in category 'events-filtering-bubbling') ----- + mouseBubbleFilters: anArrayOrNil + ^ self setProperty: #mouseBubbleFilters toValue: anArrayOrNil! Item was added: + ----- Method: Morph>>mouseCaptureFilters (in category 'events-filtering-capturing') ----- + mouseCaptureFilters + ^ self valueOfProperty: #mouseCaptureFilters! Item was added: + ----- Method: Morph>>mouseCaptureFilters: (in category 'events-filtering-capturing') ----- + mouseCaptureFilters: anArrayOrNil + ^ self setProperty: #mouseCaptureFilters toValue: anArrayOrNil! Item was changed: ----- Method: Morph>>processEvent:using: (in category 'events-processing') ----- processEvent: anEvent using: defaultDispatcher "This is the central entry for dispatching events in morphic. Given some event and a default dispatch strategy, find the right receiver and let him handle it. + WARNING: This is a powerful hook. If you want to use a different event dispatcher from the default, here is the place to hook it in. Depending on how the dispatcher is written (e.g., whether it calls simply #processEvent: or #processEvent:using:) you can change the dispatch strategy for entire trees of morphs. Similarly, you can disable entire trees of morphs from receiving any events whatsoever. Read the documentation in class MorphicEventDispatcher before playing with it. + Event filters for this capture phase can both influence and overrule the way the receiver can reject the event. If the filter ignores the event, the whole event procecssing will stop. If the filtered event is still not ignored, the receiver can decide to still reject it end regular event dispatch will go on." + + | filteredEvent | + filteredEvent := self sendFilterEventCapture: anEvent for: self. + filteredEvent wasIgnored ifTrue: [^ filteredEvent]. + + (self rejectsEvent: filteredEvent) ifTrue:[^#rejected]. + ^defaultDispatcher dispatchEvent: filteredEvent with: self! - WARNING: This is a powerful hook. If you want to use a different event dispatcher from the default, here is the place to hook it in. Depending on how the dispatcher is written (e.g., whether it calls simply #processEvent: or #processEvent:using:) you can change the dispatch strategy for entire trees of morphs. Similarly, you can disable entire trees of morphs from receiving any events whatsoever. Read the documentation in class MorphicEventDispatcher before playing with it. " - (self rejectsEvent: anEvent) ifTrue:[^#rejected]. - ^defaultDispatcher dispatchEvent: anEvent with: self! Item was added: + ----- Method: Morph>>removeEventBubbleFilter: (in category 'events-filtering-bubbling') ----- + removeEventBubbleFilter: anObject + self eventBubbleFilters: (self removeFilter: anObject from: self eventBubbleFilters).! Item was added: + ----- Method: Morph>>removeEventCaptureFilter: (in category 'events-filtering-capturing') ----- + removeEventCaptureFilter: anObject + self eventCaptureFilters: (self removeFilter: anObject from: self eventCaptureFilters).! Item was added: + ----- Method: Morph>>removeFilter:from: (in category 'events-filtering') ----- + removeFilter: anObject from: aFilterGroup + "Remove anObject from the given listener group. Return the new group." + + | filters | + aFilterGroup ifNil: [^nil]. + filters := aFilterGroup. + filters := filters copyWithout: anObject. + filters := filters copyWithout: nil. "obsolete entries" + filters isEmpty ifTrue: [filters := nil]. + ^filters! Item was added: + ----- Method: Morph>>removeKeyboardBubbleFilter: (in category 'events-filtering-bubbling') ----- + removeKeyboardBubbleFilter: anObject + self keyboardBubbleFilters: (self removeFilter: anObject from: self keyboardBubbleFilters).! Item was added: + ----- Method: Morph>>removeKeyboardCaptureFilter: (in category 'events-filtering-capturing') ----- + removeKeyboardCaptureFilter: anObject + self keyboardCaptureFilters: (self removeFilter: anObject from: self keyboardCaptureFilters).! Item was added: + ----- Method: Morph>>removeMouseBubbleFilter: (in category 'events-filtering-bubbling') ----- + removeMouseBubbleFilter: anObject + self mouseBubbleFilters: (self removeFilter: anObject from: self mouseBubbleFilters).! Item was added: + ----- Method: Morph>>removeMouseCaptureFilter: (in category 'events-filtering-capturing') ----- + removeMouseCaptureFilter: anObject + self mouseCaptureFilters: (self removeFilter: anObject from: self mouseCaptureFilters).! Item was added: + ----- Method: Morph>>sendFilterEvent:for:to: (in category 'events-processing') ----- + sendFilterEvent: anEvent for: anObject to: filterGroup + "An event gets filtered if some event filter wants to filter it." + + | filteredEvent | + filterGroup ifNil: [^anEvent]. + + filteredEvent := anEvent. + filterGroup do: [:filterOrNil | filterOrNil ifNotNil: [:filter | + filteredEvent := filter filterEvent: filteredEvent for: anObject]]. + + ^ filteredEvent! Item was added: + ----- Method: Morph>>sendFilterEventBubble:for: (in category 'events-processing') ----- + sendFilterEventBubble: anEvent for: anObject + "Apply event bubbling filters." + + ^ self + sendFilterEventBubbleAgain: (self sendFilterEvent: anEvent for: anObject to: self eventBubbleFilters) + for: anObject! Item was added: + ----- Method: Morph>>sendFilterEventBubbleAgain:for: (in category 'events-processing') ----- + sendFilterEventBubbleAgain: anEvent for: anObject + "Apply keyboard-specific and mouse-specific bubbling filters. If a filter changes the event type, filter again. WARNING: This is a powerful mechanism. Filters can create endless loops, which are difficult to debug." + + | filteredEvent | + filteredEvent := anEvent. + + filteredEvent isKeyboard ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: anObject to: self keyboardBubbleFilters. + filteredEvent isKeyboard not ifTrue: [^ self sendFilterEventBubbleAgain: filteredEvent for: anObject]]. + + filteredEvent isMouse ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: anObject to: self mouseBubbleFilters. + filteredEvent isMouse not ifTrue: [^ self sendFilterEventBubbleAgain: filteredEvent for: anObject]]. + + ^ filteredEvent! Item was added: + ----- Method: Morph>>sendFilterEventCapture:for: (in category 'events-processing') ----- + sendFilterEventCapture: anEvent for: anObject + "Apply event capturing filters." + + ^ self + sendFilterEventCaptureAgain: (self sendFilterEvent: anEvent for: anObject to: self eventCaptureFilters) + for: anObject! Item was added: + ----- Method: Morph>>sendFilterEventCaptureAgain:for: (in category 'events-processing') ----- + sendFilterEventCaptureAgain: anEvent for: anObject + "Apply keyboard-specific and mouse-specific capturing filters. If a filter changes the event type, filter again. WARNING: This is a powerful mechanism. Filters can create endless loops, which are difficult to debug." + + | filteredEvent | + filteredEvent := anEvent. + + filteredEvent isKeyboard ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: anObject to: self keyboardCaptureFilters. + filteredEvent isKeyboard not ifTrue: [^ self sendFilterEventCaptureAgain: filteredEvent for: anObject]]. + + filteredEvent isMouse ifTrue: [ + filteredEvent := self sendFilterEvent: filteredEvent for: anObject to: self mouseCaptureFilters. + filteredEvent isMouse not ifTrue: [^ self sendFilterEventCaptureAgain: filteredEvent for: anObject]]. + + ^ filteredEvent! Item was added: + ----- Method: MorphicEvent>>ignore (in category 'dispatching') ----- + ignore + + self wasIgnored: true.! Item was added: + ----- Method: MorphicEvent>>translateTo: (in category 'transforming') ----- + translateTo: point + ! Item was added: + ----- Method: MorphicEvent>>wasIgnored (in category 'accessing') ----- + wasIgnored + ^ false! Item was added: + ----- Method: MorphicEvent>>wasIgnored: (in category 'accessing') ----- + wasIgnored: boolean + ! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchDefault:with: (in category 'specific') ----- - ----- Method: MorphicEventDispatcher>>dispatchDefault:with: (in category 'dispatching') ----- dispatchDefault: anEvent with: aMorph "Dispatch the given event. The event will be passed to the front-most visible submorph that contains the position wrt. to the event." - | localEvt index child morphs inside | - "See if we're fully outside aMorphs bounds" - (aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. "outside" - "Traverse children" - index := 1. - morphs := aMorph submorphs. - inside := false. - [index <= morphs size] whileTrue:[ - child := morphs at: index. - localEvt := anEvent transformedBy: (child transformedFrom: aMorph). - (child processEvent: localEvt using: self) == #rejected ifFalse:[ - "Not rejected. The event was in some submorph of the receiver" - inside := true. - localEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt]. - index := morphs size. "break" - ]. - index := index + 1. - ]. + "Try to get out quickly" + anEvent wasIgnored ifTrue: [^anEvent "propagate the ignored event"]. + (aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. + + ^ self + dispatchEvent: anEvent + withHandler: aMorph + withMorph: aMorph! - "Check for being inside the receiver" - inside ifFalse:[inside := aMorph containsPoint: anEvent position event: anEvent]. - inside ifTrue:[^aMorph handleEvent: anEvent]. - ^#rejected - ! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchDropEvent:with: (in category 'specific') ----- - ----- Method: MorphicEventDispatcher>>dispatchDropEvent:with: (in category 'dispatching') ----- dispatchDropEvent: anEvent with: aMorph "Find the appropriate receiver for the event and let it handle it. The dispatch is similar to the default dispatch with one difference: Morphs are given the chance to reject an entire drop operation. If the operation is rejected, no drop will be executed." + - | inside index morphs child localEvt | "Try to get out quickly" + anEvent wasIgnored ifTrue: [^anEvent "propagate the ignored event"]. + (aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. + - (aMorph fullBounds containsPoint: anEvent cursorPoint) - ifFalse:[^#rejected]. "Give aMorph a chance to repel the dropping morph" aMorph rejectDropEvent: anEvent. + anEvent wasHandled ifTrue:[^anEvent]. - anEvent wasHandled ifTrue:[^self]. + ^ self + dispatchEvent: anEvent + withHandler: aMorph + withMorph: aMorph! - "Go looking if any of our submorphs wants it" - index := 1. - inside := false. - morphs := aMorph submorphs. - [index <= morphs size] whileTrue:[ - child := morphs at: index. - localEvt := anEvent transformedBy: (child transformedFrom: aMorph). - (child processEvent: localEvt using: self) == #rejected ifFalse:[ - localEvt wasHandled ifTrue:[^anEvent wasHandled: true]. "done" - inside := true. - index := morphs size]. "break" - index := index + 1. - ]. - - inside ifFalse:[inside := aMorph containsPoint: anEvent cursorPoint event: anEvent]. - inside ifTrue:[^aMorph handleEvent: anEvent]. - ^#rejected! Item was added: + ----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'private') ----- + dispatchEvent: anEvent toSubmorphsOf: aMorph + "Dispatch the given event to the submorphs of the given morph. --- PRIVATE!!" + + | filteredEvent | + aMorph submorphsDo: [:child | + filteredEvent := child + processEvent: (anEvent transformedBy: (child transformedFrom: aMorph)) + using: self. "use same dispatcher" + filteredEvent == #rejected ifFalse: [ "filteredEvent or #rejected" + filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" + filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" + self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" + ^ filteredEvent]]. + + ^ #rejected! Item was added: + ----- Method: MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: (in category 'private') ----- + dispatchEvent: anEvent withHandler: aHandler withMorph: aMorph + "Perform the actual event dispatch. Use the given object as handler. Ask submorphs first to handle the event. Then bubble up. Stop if ignored. Note that event rejection and event filters are two separete concepts. Filters come from the outside. Rejection is a morph's decision. + + * The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event. + * When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed. + * If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event." + + | result filteredEvent | + + result := self dispatchEvent: anEvent toSubmorphsOf: aMorph. + + result == #rejected "Anybody?" + ifFalse: [filteredEvent := result] + ifTrue: [ + "My submorphs did not want it. Do I want it anyway? It's about locked children..." + (aMorph containsPoint: anEvent position event: anEvent) + ifFalse: [^ #rejected]. + filteredEvent := anEvent "there was no filtering, only basic rejects"]. + + "Receiver is in the top-most unlocked, visible chain." + (aHandler notNil and: [filteredEvent wasIgnored not]) + ifTrue: [filteredEvent := aHandler handleEvent: filteredEvent]. + + ^ filteredEvent! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchMouseDown:with: (in category 'specific') ----- - ----- Method: MorphicEventDispatcher>>dispatchMouseDown:with: (in category 'dispatching') ----- dispatchMouseDown: anEvent with: aMorph + "Find the appropriate receiver for the event and let it handle it. When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is." + + | handler lastHandler | + - "Find the appropriate receiver for the event and let it handle it. Default rules: - * The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event. - * When travelling down the hierarchy a prospective handler for the event is installed. This prospective handler can be used by submorphs wishing to handle the mouse down for negotiating who the receiver is. - * When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed. - * If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event. - " - | globalPt localEvt index child morphs handler inside lastHandler | "Try to get out quickly" + anEvent wasIgnored ifTrue: [^anEvent "propagate the ignored event"]. + (aMorph fullBounds containsPoint: anEvent position) ifFalse:[^#rejected]. - globalPt := anEvent cursorPoint. - (aMorph fullBounds containsPoint: globalPt) ifFalse:[^#rejected]. + "In case the mouse wasn't even in the receiver" + lastHandler := anEvent handler. + + "Negotiate and install the actual handler." - "Install the prospective handler for the receiver" - lastHandler := anEvent handler. "in case the mouse wasn't even in the receiver" handler := aMorph handlerForMouseDown: anEvent. + handler ifNotNil: [anEvent handler: handler]. - handler ifNotNil:[anEvent handler: handler]. + [^ self + dispatchEvent: anEvent + withHandler: handler + withMorph: aMorph + ] ensure: [ + anEvent handler: lastHandler. "good style"].! - "Now give our submorphs a chance to handle the event" - index := 1. - morphs := aMorph submorphs. - [index <= morphs size] whileTrue:[ - child := morphs at: index. - localEvt := anEvent transformedBy: (child transformedFrom: aMorph). - (child processEvent: localEvt using: self) == #rejected ifFalse:[ - "Some child did contain the point so we're part of the top-most chain." - inside := false. - localEvt wasHandled ifTrue:[anEvent copyHandlerState: localEvt]. - index := morphs size]. - index := index + 1. - ]. - - (inside == false or:[aMorph containsPoint: anEvent cursorPoint event: anEvent]) ifTrue:[ - "Receiver is in the top-most unlocked, visible chain." - handler ifNotNil:[handler handleEvent: anEvent]. - "Note: Re-installing the handler is not really necessary but good style." - anEvent handler: lastHandler. - ^self - ]. - "Mouse was not on receiver nor any of its children" - anEvent handler: lastHandler. - ^#rejected! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchWindowEvent:with: (in category 'specific') ----- - ----- Method: MorphicEventDispatcher>>dispatchWindowEvent:with: (in category 'dispatching') ----- dispatchWindowEvent: anEvent with: aMorph "Host window events do not have a position and are only dispatched to the World" + + anEvent wasIgnored ifTrue: [^anEvent]. aMorph isWorldMorph ifFalse: [^#rejected]. + anEvent wasHandled ifTrue:[^anEvent]. - anEvent wasHandled ifTrue:[^self]. ^aMorph handleEvent: anEvent! Item was added: + ----- Method: Object>>filterEvent:for: (in category '*Morphic-Events-Filtering') ----- + filterEvent: anEvent for: aMorphOrNil + "Get the chance to intercept the event. Note that global event filters might not be provided with the actual target. Returns the event that should be processed any further. If you want to ignore them, call #ignore on them." + + ^ anEvent "no change"! Item was changed: ----- Method: PasteUpMorph>>processEvent:using: (in category 'events-processing') ----- processEvent: anEvent using: defaultDispatcher "Reimplemented to install the receiver as the new ActiveWorld if it is one" | priorWorld result | self isWorldMorph ifFalse:[^super processEvent: anEvent using: defaultDispatcher]. priorWorld := ActiveWorld. ActiveWorld := self. + [result := super processEvent: anEvent using: defaultDispatcher] + ensure: [ActiveWorld := priorWorld]. + ^result + ! - result := super processEvent: anEvent using: defaultDispatcher. - ActiveWorld := priorWorld. - ^result! Item was added: + Object subclass: #PluggableEventFilter + instanceVariableNames: 'filterBlock' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Events'! Item was added: + ----- Method: PluggableEventFilter class>>on: (in category 'instance creation') ----- + on: filterBlock + + ^ self new filterBlock: filterBlock! Item was added: + ----- Method: PluggableEventFilter>>filterBlock (in category 'accessing') ----- + filterBlock + + ^ filterBlock! Item was added: + ----- Method: PluggableEventFilter>>filterBlock: (in category 'accessing') ----- + filterBlock: anObject + + filterBlock := anObject! Item was added: + ----- Method: PluggableEventFilter>>filterEvent:for: (in category 'events-filtering') ----- + filterEvent: event for: target + + ^ self filterBlock + ifNil: [event] + ifNotNil: [:b | b cull: event cull: target]! Item was changed: ----- Method: UserDialogBoxMorph>>handleFocusEvent: (in category 'constructing') ----- handleFocusEvent: evt + "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children. Need to handle keyboard input if we have the focus." - "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children." - self processEvent: evt. + | result filteredEvent | + result := self processEvent: evt. + filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. + + ^ super handleFocusEvent: filteredEvent! - "Need to handle keyboard input if we have the focus." - ^self handleEvent: evt! Item was changed: MorphicEvent subclass: #UserInputEvent + instanceVariableNames: 'type buttons position handler wasHandled wasIgnored' - instanceVariableNames: 'type buttons position handler wasHandled' classVariableNames: '' poolDictionaries: 'EventSensorConstants' category: 'Morphic-Events'! Item was added: + ----- Method: UserInputEvent>>initialize (in category 'initialize') ----- + initialize + + super initialize. + wasIgnored := false.! Item was added: + ----- Method: UserInputEvent>>translateTo: (in category 'transforming') ----- + translateTo: point + + position := point.! Item was added: + ----- Method: UserInputEvent>>wasIgnored (in category 'accessing') ----- + wasIgnored + ^ wasIgnored! Item was added: + ----- Method: UserInputEvent>>wasIgnored: (in category 'accessing') ----- + wasIgnored: aBoolean + wasIgnored := aBoolean.! From commits at source.squeak.org Sat Jun 4 16:43:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 16:43:29 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1162.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1162.mcz ==================== Summary ==================== Name: Morphic-mt.1162 Author: mt Time: 4 June 2016, 6:42:47.44143 pm UUID: 8a06cc2e-c607-3341-96d2-06d6329d41ac Ancestors: Morphic-mt.1161 Quick fix for update issues during last commit. =============== Diff against Morphic-mt.1161 =============== Item was changed: ----- Method: MouseOverHandler>>processMouseOver: (in category 'event handling') ----- processMouseOver: anEvent "Re-establish the z-order for all morphs wrt the given event" | hand localEvt focus evt | + anEvent ifNil: [^ self]. hand := anEvent hand. leftMorphs := mouseOverMorphs asIdentitySet. "Assume some coherence for the number of objects in over list" overMorphs := WriteStream on: (Array new: leftMorphs size). enteredMorphs := WriteStream on: #(). "Now go looking for eventual mouse overs" hand handleEvent: anEvent asMouseOver. "Get out early if there's no change" (leftMorphs isEmpty and: [ enteredMorphs position = 0 ]) ifTrue: [ ^self initializeTrackedMorphs ]. focus := hand mouseFocus. "Send #mouseLeave as appropriate" evt := anEvent asMouseLeave. "Keep the order of the left morphs by recreating it from the mouseOverMorphs" leftMorphs size > 1 ifTrue: [leftMorphs := mouseOverMorphs select: [:m | leftMorphs includes: m]]. leftMorphs do: [ :m | (m == focus or: [m hasOwner: focus]) ifFalse: [ overMorphs nextPut: m ] ifTrue: [ localEvt := evt transformedBy: (m transformedFrom: hand). m handleEvent: localEvt ] ]. enteredMorphs ifNil: [ "inform: was called in handleEvent:" ^self initializeTrackedMorphs ]. "Send #mouseEnter as appropriate" evt := anEvent asMouseEnter. enteredMorphs contents reverseDo: [ :m | (m == focus or: [m hasOwner: focus]) ifTrue: [ localEvt := evt transformedBy: (m transformedFrom: hand). m handleEvent: localEvt ] ]. "And remember the over list" overMorphs ifNotNil: [ mouseOverMorphs := overMorphs contents ]. self initializeTrackedMorphs! From commits at source.squeak.org Sat Jun 4 16:46:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 16:46:21 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.31.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.31.mcz ==================== Summary ==================== Name: 51Deprecated-mt.31 Author: mt Time: 4 June 2016, 6:46:10.09743 pm UUID: 5457e75b-d30d-a843-92b7-e1c3fce84683 Ancestors: 51Deprecated-ul.30 Deprecates old OB method. =============== Diff against 51Deprecated-ul.30 =============== Item was added: + ----- Method: KeyboardEvent>>setType:buttons:position:keyValue:charCode:hand:stamp: (in category '*51Deprecated') ----- + setType: aSymbol buttons: anInteger position: pos keyValue: aValue charCode: ignoredUsedInOBTesting hand: aHand stamp: stamp + self setType: aSymbol buttons: anInteger position: pos keyValue: aValue hand: aHand stamp: stamp! From commits at source.squeak.org Sat Jun 4 16:47:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 16:47:11 2016 Subject: [squeak-dev] The Trunk: MorphicTests-mt.32.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk: http://source.squeak.org/trunk/MorphicTests-mt.32.mcz ==================== Summary ==================== Name: MorphicTests-mt.32 Author: mt Time: 4 June 2016, 6:47:00.72143 pm UUID: 6e6d2a48-7a28-8244-9ade-c9db739c7b17 Ancestors: MorphicTests-mt.31 Adds tests for user input event handling and event filters. =============== Diff against MorphicTests-mt.31 =============== Item was changed: SystemOrganization addCategory: #'MorphicTests-Basic'! SystemOrganization addCategory: #'MorphicTests-Kernel'! SystemOrganization addCategory: #'MorphicTests-Layouts'! SystemOrganization addCategory: #'MorphicTests-Support'! SystemOrganization addCategory: #'MorphicTests-Text Support'! SystemOrganization addCategory: #'MorphicTests-ToolBuilder'! SystemOrganization addCategory: #'MorphicTests-Widgets'! SystemOrganization addCategory: #'MorphicTests-Worlds'! + SystemOrganization addCategory: #'MorphicTests-Events'! Item was added: + Morph subclass: #MorphForEventTests + instanceVariableNames: 'eventsDuringCapture eventsDuringBubble eventsRejected eventsFiltered handlesMouseDown' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: MorphForEventTests>>eventsDuringBubble (in category 'accessing') ----- + eventsDuringBubble + ^ eventsDuringBubble ifNil: [eventsDuringBubble := OrderedCollection new]! Item was added: + ----- Method: MorphForEventTests>>eventsDuringCapture (in category 'accessing') ----- + eventsDuringCapture + ^ eventsDuringCapture ifNil: [eventsDuringCapture := OrderedCollection new]! Item was added: + ----- Method: MorphForEventTests>>eventsFiltered (in category 'accessing') ----- + eventsFiltered + ^ eventsFiltered ifNil: [eventsFiltered := OrderedCollection new]! Item was added: + ----- Method: MorphForEventTests>>eventsRejected (in category 'accessing') ----- + eventsRejected + ^ eventsRejected ifNil: [eventsRejected := OrderedCollection new]! Item was added: + ----- Method: MorphForEventTests>>filterEvent:for: (in category 'event filtering') ----- + filterEvent: anEvent for: aMorphOrNil + + self eventsFiltered add: anEvent copy -> aMorphOrNil. + ^ anEvent! Item was added: + ----- Method: MorphForEventTests>>handleEvent: (in category 'events-processing') ----- + handleEvent: anEvent + + self eventsDuringBubble add: anEvent copy. + ^ super handleEvent: anEvent! Item was added: + ----- Method: MorphForEventTests>>handlesKeyboard: (in category 'event handling') ----- + handlesKeyboard: evt + ^ true! Item was added: + ----- Method: MorphForEventTests>>handlesMouseDown: (in category 'event handling') ----- + handlesMouseDown: evt + ^ handlesMouseDown ifNil: [true]! Item was added: + ----- Method: MorphForEventTests>>handlesMouseMove: (in category 'event handling') ----- + handlesMouseMove: evt + ^ true! Item was added: + ----- Method: MorphForEventTests>>handlesMouseOver: (in category 'event handling') ----- + handlesMouseOver: evt + ^ true! Item was added: + ----- Method: MorphForEventTests>>handlesMouseOverDragging: (in category 'event handling') ----- + handlesMouseOverDragging: evt + ^ true! Item was added: + ----- Method: MorphForEventTests>>handlesMouseStillDown: (in category 'event handling') ----- + handlesMouseStillDown: evt + ^ true! Item was added: + ----- Method: MorphForEventTests>>noMouseDown (in category 'accessing') ----- + noMouseDown + + handlesMouseDown := false.! Item was added: + ----- Method: MorphForEventTests>>processEvent:using: (in category 'events-processing') ----- + processEvent: anEvent using: dispatcher + + self eventsDuringCapture add: anEvent copy. + ^ super processEvent: anEvent using: dispatcher! Item was added: + ----- Method: MorphForEventTests>>rejectsEvent: (in category 'events-processing') ----- + rejectsEvent: anEvent + + ^ (super rejectsEvent: anEvent) + ifTrue: [self eventsRejected add: anEvent copy. true] + ifFalse: [false]! Item was added: + UserInputEventTests subclass: #MorphicEventDispatcherTests + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: MorphicEventDispatcherTests>>test01EventBubbling (in category 'tests') ----- + test01EventBubbling + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + self assert: m3 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringBubble isEmpty. + self assert: m1 eventsDuringBubble isEmpty. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m3 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]). + self assert: (m2 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]). + self assert: (m1 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]).! Item was added: + ----- Method: MorphicEventDispatcherTests>>test02EventCapturing (in category 'tests') ----- + test02EventCapturing + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + self assert: m3 eventsDuringCapture isEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m1 eventsDuringCapture isEmpty. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m3 eventsDuringCapture anySatisfy: [:ea | ea isMouseDown]). + self assert: (m2 eventsDuringCapture anySatisfy: [:ea | ea isMouseDown]). + self assert: (m1 eventsDuringCapture anySatisfy: [:ea | ea isMouseDown]).! Item was added: + ----- Method: MorphicEventDispatcherTests>>test03EventRejecting (in category 'tests') ----- + test03EventRejecting + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m2 lock. "to reject events" + m1 openInWorld: world. + + self assert: m2 eventsRejected isEmpty. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m2 eventsRejected anySatisfy: [:ea | ea isMouseDown]). + self assert: m2 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringCapture notEmpty. + + self assert: m1 eventsRejected isEmpty. + self assert: m1 eventsDuringBubble notEmpty. + self assert: m1 eventsDuringCapture notEmpty. + + self assert: m3 eventsRejected isEmpty. + self assert: m3 eventsDuringBubble isEmpty. + self assert: m3 eventsDuringCapture isEmpty.! Item was added: + ----- Method: MorphicEventDispatcherTests>>test04OverlappingSiblings (in category 'tests') ----- + test04OverlappingSiblings + "Only one of two overlapping siblings gets the event." + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m1 addMorph: m3. + + m2 bounds: m3 bounds. "full overlap" + + m1 openInWorld: world. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m3 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]). + self assert: (m2 eventsDuringBubble isEmpty). + + self assert: (m3 eventsDuringCapture anySatisfy: [:ea | ea isMouseDown]). + self assert: (m2 eventsDuringCapture isEmpty).! Item was added: + ----- Method: MorphicEventDispatcherTests>>test05FocusEventBubbling (in category 'tests') ----- + test05FocusEventBubbling + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + self assert: m3 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringBubble isEmpty. + self assert: m1 eventsDuringBubble isEmpty. + + hand newMouseFocus: m2. "Not m3!! Due to focus, m3 is not considered during capturing/bubbling phase." + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: m3 eventsDuringBubble isEmpty. + self assert: (m2 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]). + self assert: (m1 eventsDuringBubble anySatisfy: [:ea | ea isMouseDown]). + + hand newKeyboardFocus: m2. + hand handleEvent: (self keystroke: $x at: m3 center). + + self assert: m3 eventsDuringBubble isEmpty. + self assert: (m2 eventsDuringBubble anySatisfy: [:ea | ea isKeystroke]). + self assert: (m1 eventsDuringBubble anySatisfy: [:ea | ea isKeystroke]). + ! Item was added: + ----- Method: MorphicEventDispatcherTests>>test06FocusEventCapturing (in category 'tests') ----- + test06FocusEventCapturing + "There is no capturing phase for focus events." + + | m1 m2 m3 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + self assert: m3 eventsDuringCapture isEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m1 eventsDuringCapture isEmpty. + + hand newMouseFocus: m2. "Not m3!! Due to focus, m3 is not considered during capturing/bubbling phase." + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: m3 eventsDuringCapture isEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m1 eventsDuringCapture isEmpty. + + hand newKeyboardFocus: m2. + hand handleEvent: (self keystroke: $x at: m3 center). + + self assert: m3 eventsDuringCapture isEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m1 eventsDuringCapture isEmpty.! Item was added: + ----- Method: MorphicEventDispatcherTests>>test07EventNoBubbling (in category 'tests') ----- + test07EventNoBubbling + "There is no bubbling if no morph handles the event." + + | m1 m2 m3 | + m1 := MorphForEventTests new noMouseDown. + m2 := MorphForEventTests new noMouseDown. + m3 := MorphForEventTests new noMouseDown. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + self assert: m3 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringBubble isEmpty. + self assert: m1 eventsDuringBubble isEmpty. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m3 eventsDuringBubble noneSatisfy: [:ea | ea isMouseDown]). + self assert: (m2 eventsDuringBubble noneSatisfy: [:ea | ea isMouseDown]). + self assert: (m1 eventsDuringBubble noneSatisfy: [:ea | ea isMouseDown]).! Item was added: + UserInputEventTests subclass: #MorphicEventFilterTests + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: MorphicEventFilterTests>>test01EventBubbleFilter (in category 'tests') ----- + test01EventBubbleFilter + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := MorphForEventTests new. + + m1 addEventBubbleFilter: filter. + m2 addEventBubbleFilter: filter. + m3 addEventBubbleFilter: filter. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: {m3.m2.m1} equals: (filter eventsFiltered select: [:ea | ea key isMouseDown] thenCollect: [:ea | ea value]) asArray.! Item was added: + ----- Method: MorphicEventFilterTests>>test02EventCaptureFilter (in category 'tests') ----- + test02EventCaptureFilter + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := MorphForEventTests new. + + m1 addEventCaptureFilter: filter. + m2 addEventCaptureFilter: filter. + m3 addEventCaptureFilter: filter. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: {m1.m2.m3} equals: (filter eventsFiltered select: [:ea | ea key isMouseDown] thenCollect: [:ea | ea value]) asArray.! Item was added: + ----- Method: MorphicEventFilterTests>>test03FocusEventBubbleFilter (in category 'tests') ----- + test03FocusEventBubbleFilter + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := MorphForEventTests new. + + m1 addEventBubbleFilter: filter. + m2 addEventBubbleFilter: filter. + m3 addEventBubbleFilter: filter. + + hand newMouseFocus: m2. + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: {m2.m1} equals: (filter eventsFiltered select: [:ea | ea key isMouseDown] thenCollect: [:ea | ea value]) asArray.! Item was added: + ----- Method: MorphicEventFilterTests>>test04FocusEventCaptureFilter (in category 'tests') ----- + test04FocusEventCaptureFilter + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := MorphForEventTests new. + + m1 addEventCaptureFilter: filter. + m2 addEventCaptureFilter: filter. + m3 addEventCaptureFilter: filter. + + hand newMouseFocus: m2. + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: {m1.m2} equals: (filter eventsFiltered select: [:ea | ea key isMouseDown] thenCollect: [:ea | ea value]) asArray.! Item was added: + ----- Method: MorphicEventFilterTests>>test05IgnoreEvent (in category 'tests') ----- + test05IgnoreEvent + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := PluggableEventFilter on: [:event | event ignore]. + + m1 addEventCaptureFilter: filter. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: m1 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringBubble isEmpty. + self assert: m3 eventsDuringBubble isEmpty. + + self assert: m1 eventsDuringCapture notEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m3 eventsDuringCapture isEmpty.! Item was added: + ----- Method: MorphicEventFilterTests>>test06IgnoreFocusEvent (in category 'tests') ----- + test06IgnoreFocusEvent + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := PluggableEventFilter on: [:event | event ignore]. + + m1 addEventCaptureFilter: filter. + + hand newMouseFocus: m3. + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: m1 eventsDuringBubble isEmpty. + self assert: m2 eventsDuringBubble isEmpty. + self assert: m3 eventsDuringBubble isEmpty. + + self assert: m1 eventsDuringCapture isEmpty. + self assert: m2 eventsDuringCapture isEmpty. + self assert: m3 eventsDuringCapture isEmpty.! Item was added: + ----- Method: MorphicEventFilterTests>>test07TransformEvent (in category 'tests') ----- + test07TransformEvent + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := PluggableEventFilter on: [:event | self keystroke: $x at: m3 center]. + m2 addEventCaptureFilter: filter. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m1 eventsDuringCapture anySatisfy: [:evt | evt isMouseDown]). + self assert: (m2 eventsDuringCapture anySatisfy: [:evt | evt isMouseDown]). + self assert: (m3 eventsDuringCapture anySatisfy: [:evt | evt isKeystroke]). + + self assert: (m3 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + self assert: (m2 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + self assert: (m1 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + ! Item was added: + ----- Method: MorphicEventFilterTests>>test08TransformEventAgain (in category 'tests') ----- + test08TransformEventAgain + + | m1 m2 m3 filter | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := PluggableEventFilter on: [:event | self keystroke: $x at: m3 center]. + m2 addEventBubbleFilter: filter. + + hand handleEvent: (self redMouseDownAt: m3 center). + + self assert: (m1 eventsDuringCapture anySatisfy: [:evt | evt isMouseDown]). + self assert: (m2 eventsDuringCapture anySatisfy: [:evt | evt isMouseDown]). + self assert: (m3 eventsDuringCapture anySatisfy: [:evt | evt isMouseDown]). + + self assert: (m3 eventsDuringBubble anySatisfy: [:evt | evt isMouseDown]). + self assert: (m2 eventsDuringBubble anySatisfy: [:evt | evt isMouseDown]). + self assert: (m1 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + ! Item was added: + ----- Method: MorphicEventFilterTests>>test09KeyboardShortcut (in category 'tests') ----- + test09KeyboardShortcut + + | m1 m2 m3 filter hit | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + m3 := MorphForEventTests new. + + m1 addMorph: m2. + m2 addMorph: m3. + + m1 openInWorld: world. + + filter := PluggableEventFilter on: [:event | + hit := false. + (event isKeystroke and: [event keyCharacter = $x]) ifTrue: [ + hit := true. + event ignore]. + event]. + + m1 addKeyboardCaptureFilter: filter. + + hand handleEvent: (self keystroke: $x at: m3 center). + + self assert: hit. + + self assert: (m1 eventsDuringCapture anySatisfy: [:evt | evt isKeystroke]). + self assert: (m2 eventsDuringCapture noneSatisfy: [:evt | evt isKeystroke]). + self assert: (m3 eventsDuringCapture noneSatisfy: [:evt | evt isKeystroke]). + + self assert: (m3 eventsDuringBubble noneSatisfy: [:evt | evt isKeystroke]). + self assert: (m2 eventsDuringBubble noneSatisfy: [:evt | evt isKeystroke]). + self assert: (m1 eventsDuringBubble noneSatisfy: [:evt | evt isKeystroke]). + + m1 eventsDuringCapture removeAll. + hand handleEvent: (self keystroke: $o at: m3 center). + + self deny: hit. + + self assert: (m1 eventsDuringCapture anySatisfy: [:evt | evt isKeystroke]). + self assert: (m2 eventsDuringCapture anySatisfy: [:evt | evt isKeystroke]). + self assert: (m3 eventsDuringCapture anySatisfy: [:evt | evt isKeystroke]). + + self assert: (m3 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + self assert: (m2 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + self assert: (m1 eventsDuringBubble anySatisfy: [:evt | evt isKeystroke]). + + + + ! Item was added: + UserInputEventTests subclass: #MorphicEventTests + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: MorphicEventTests>>test01WantsKeyboardFocus (in category 'tests') ----- + test01WantsKeyboardFocus + + | ptm | + ptm := PluggableTextMorph new. + ptm setText: 'test01WantsKeyboardFocus'. + ptm openInWorld: world. + + self deny: (ptm hasKeyboardFocus: hand). + self deny: (ptm textMorph hasKeyboardFocus: hand). + + self assert: ptm wantsKeyboardFocus. + self assert: ptm keyboardFocusDelegate == ptm textMorph. + + hand handleEvent: (self redMouseDownAt: ptm center). + self assert: (ptm hasKeyboardFocus: hand). + self assert: (ptm textMorph hasKeyboardFocus: hand). + ! Item was added: + ----- Method: MorphicEventTests>>test02MouserOver (in category 'tests') ----- + test02MouserOver + + | m1 m2 | + m1 := MorphForEventTests new. + m2 := MorphForEventTests new. + + m1 extent: 20@20; topLeft: 0@0. + m2 extent: 20@20; topLeft: 40@0. + + m1 openInWorld: world. + m2 openInWorld: world. + + hand handleEvent: (self redMouseDownAt: m1 center). + hand handleEvent: (self redMouseUpAt: m1 center). + hand handleEvent: (self redMouseDownAt: m2 center). + hand handleEvent: (self redMouseUpAt: m2 center). + + self + checkEventOrder: #(mouseMove mouseEnter mouseDown mouseUp mouseLeave) + forEvents: m1 eventsDuringBubble + ignoreMouseOver: true. + + self + checkEventOrder: #(mouseMove mouseEnter mouseDown mouseUp) + forEvents: m2 eventsDuringBubble + ignoreMouseOver: true. + ! Item was added: + TestCase subclass: #UserInputEventTests + instanceVariableNames: 'hand world' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: UserInputEventTests>>checkEventOrder:forEvents:ignoreMouseOver: (in category 'support') ----- + checkEventOrder: someEventTypes forEvents: someEvents ignoreMouseOver: ignoreMouseOver + "Use this to verify the order of events" + + ((someEvents + select: [:ea | ea isMouseOver not or: [ignoreMouseOver not]]) + collect: [:ea | ea type]) + with: someEventTypes + do: [:t1 :t2 | self assert: t2 equals: t1]. + ! Item was added: + ----- Method: UserInputEventTests>>keystroke:at: (in category 'support') ----- + keystroke: char at: point + + ^ KeyboardEvent new + setType: #keystroke + buttons: 0 "no modifiers" + position: point + keyValue: char asciiValue + hand: hand + stamp: Time millisecondClockValue! Item was added: + ----- Method: UserInputEventTests>>redMouseDownAt: (in category 'support') ----- + redMouseDownAt: point + + ^ MouseButtonEvent new + setType: #mouseDown + position: point + which: 2r000 "no change" + buttons: 2r100 "red/left pressed" + hand: hand + stamp: Time millisecondClockValue! Item was added: + ----- Method: UserInputEventTests>>redMouseUpAt: (in category 'support') ----- + redMouseUpAt: point + + ^ MouseButtonEvent new + setType: #mouseUp + position: point + which: 2r100 "red/left changed" + buttons: 2r000 "nothing pressed" + hand: hand + stamp: Time millisecondClockValue! Item was added: + ----- Method: UserInputEventTests>>setUp (in category 'running') ----- + setUp + + super setUp. + + world := (PasteUpMorph newWorldForProject: nil) + extent: 300@200; + viewBox: (0@0 extent: 300@200); + yourself. + + (world instVarNamed: #worldState) + instVarNamed: #canvas + put: (Form extent: 300@200 depth: 32) getCanvas. + + hand := world firstHand.! From commits at source.squeak.org Sat Jun 4 16:53:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 16:53:51 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1163.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1163.mcz ==================== Summary ==================== Name: Morphic-mt.1163 Author: mt Time: 4 June 2016, 6:53:04.95683 pm UUID: cb5b0690-e94a-a945-8c0b-aa83a2b22cb8 Ancestors: Morphic-mt.1162 Use event filters to implement keyboard shortcuts (world, docking bar, system windows). =============== Diff against Morphic-mt.1162 =============== Item was added: + ----- Method: DockingBarMorph>>filterEvent:for: (in category 'events-processing') ----- + filterEvent: aKeyboardEvent for: anObject + "Provide keyboard shortcuts." + + | index itemToSelect | + + aKeyboardEvent isKeyDown "No #isKeystroke to improve compatibility for all platforms." + ifFalse: [^ aKeyboardEvent]. + + aKeyboardEvent controlKeyPressed + ifFalse: [^ aKeyboardEvent]. + + "Search field." + aKeyboardEvent keyCharacter = $0 + ifTrue: [ + self searchBarMorph ifNotNil: [ :morph | + morph model activate: aKeyboardEvent in: morph ]. + ^ aKeyboardEvent ignore "hit!!"]. + + "Select menu items." + (aKeyboardEvent keyValue + between: $1 asciiValue + and: $9 asciiValue) + ifFalse: [^ aKeyboardEvent]. + + index := aKeyboardEvent keyValue - $1 asciiValue + 1. + itemToSelect := (self submorphs select: [ :each | + each isKindOf: DockingBarItemMorph ]) + at: index + ifAbsent: [^ aKeyboardEvent]. + + self activate: aKeyboardEvent. + self + selectItem: itemToSelect + event: aKeyboardEvent. + + ^ aKeyboardEvent ignore "hit!!"! Item was removed: - ----- Method: DockingBarMorph>>handleListenEvent: (in category 'events-processing') ----- - handleListenEvent: anEvent - " I am registered as a keyboardListener of the ActiveHand, - watching for ctrl- keystrokes, and upon them if I have - an nth menu item, I'll activate myself and select it. " - - (anEvent controlKeyPressed and: [ - anEvent keyValue - between: 48 " $0 asciiValue " - and: 55 " $7 asciiValue " ]) ifTrue: [ - | index itemToSelect | - index := anEvent keyValue - 48. - itemToSelect := (submorphs select: [ :each | - each isKindOf: DockingBarItemMorph ]) - at: index - ifAbsent: [ - ^self searchBarMorph ifNotNil: [ :morph | - morph model activate: anEvent in: morph ] ]. - self activate: anEvent. - self - selectItem: itemToSelect - event: anEvent ]! Item was removed: - ----- Method: DockingBarMorph>>setupGlobalHotKeyEventListeners (in category 'initialize-release') ----- - setupGlobalHotKeyEventListeners - PasteUpMorph globalCommandKeysEnabled - ifTrue: [ ActiveHand addKeyboardListener: self ] - ifFalse: [ ActiveHand removeKeyboardListener: self ]! Item was changed: ----- Method: MorphicProject>>createOrUpdateMainDockingBar (in category 'docking bars support') ----- createOrUpdateMainDockingBar "Private - create a new main docking bar or update the current one" | w mainDockingBars | w := self world. mainDockingBars := w mainDockingBars. mainDockingBars isEmpty ifTrue: [ "no docking bar, just create a new one" self dockingBar createDockingBar + openInWorld: w . - openInWorld: w ; - setupGlobalHotKeyEventListeners. ^ self ]. "update if needed" mainDockingBars do: + [ : each | self dockingBar updateIfNeeded: each ]! - [ : each | self dockingBar updateIfNeeded: each. - each setupGlobalHotKeyEventListeners ]! Item was changed: ----- Method: PasteUpMorph class>>globalCommandKeysEnabled: (in category 'preferences') ----- + globalCommandKeysEnabled: aBoolean + + GlobalCommandKeysEnabled = aBoolean ifTrue: [^ self]. - globalCommandKeysEnabled: aBoolean GlobalCommandKeysEnabled := aBoolean. + + SystemWindow allSubInstancesDo: [:ea | + aBoolean + ifTrue: [ea addKeyboardShortcuts] + ifFalse: [ea removeKeyboardShortcuts]]. + + PasteUpMorph allSubInstancesDo: [:ea | + aBoolean + ifTrue: [ea addKeyboardShortcuts] + ifFalse: [ea removeKeyboardShortcuts]].! - aBoolean - ifTrue: - [ ActiveHand - addKeyboardListener: SystemWindow topWindow ; - addKeyboardListener: ActiveWorld. - ActiveWorld dockingBars do: - [ : each | ActiveHand addKeyboardListener: each ] ] - ifFalse: - [ ActiveHand - removeKeyboardListener: SystemWindow topWindow ; - removeKeyboardListener: ActiveWorld. - ActiveWorld dockingBars do: - [ : each | ActiveHand removeKeyboardListener: each ] ]. - TheWorldMainDockingBar updateInstances! Item was added: + ----- Method: PasteUpMorph>>addKeyboardShortcuts (in category 'initialization') ----- + addKeyboardShortcuts + "Install an event capture filter to add shortcuts for global operations like opening a tool." + + self addKeyboardCaptureFilter: self.! Item was changed: ----- Method: PasteUpMorph>>becomeActiveDuring: (in category 'initialization') ----- becomeActiveDuring: aBlock "Make the receiver the ActiveWorld during the evaluation of aBlock. Note that this method does deliberately *not* use #ensure: to prevent re-installation of the world on project switches." | priorWorld priorHand priorEvent | priorWorld := ActiveWorld. priorHand := ActiveHand. priorEvent := ActiveEvent. - priorHand removeKeyboardListener: priorWorld. ActiveWorld := self. ActiveHand := self hands first. "default" ActiveEvent := nil. "not in event cycle" - self class globalCommandKeysEnabled ifTrue: [ ActiveHand addKeyboardListener: self ]. aBlock on: Error do: [:ex | ActiveWorld := priorWorld. ActiveEvent := priorEvent. ActiveHand := priorHand. ex pass]! Item was added: + ----- Method: PasteUpMorph>>filterEvent:for: (in category 'events-processing') ----- + filterEvent: aKeyboardEvent for: anObject + "Provide keyboard shortcuts." + + "Delegate keyboard shortcuts to my docking bars." + self submorphsDo: [:ea | ea isDockingBar ifTrue: [ + ea filterEvent: aKeyboardEvent for: anObject. "No support for converting events here!!" + aKeyboardEvent wasIgnored ifTrue: [^ aKeyboardEvent "early out"]]]. + + aKeyboardEvent isKeystroke + ifFalse: [^ aKeyboardEvent]. + + aKeyboardEvent commandKeyPressed ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [$R] -> [Utilities browseRecentSubmissions]. + [$L] -> [self findAFileList: aKeyboardEvent]. + [$O] -> [self findAMonticelloBrowser]. + [$P] -> [self findAPreferencesPanel: aKeyboardEvent]. + "[$Z] -> [ChangeList browseRecentLog]." + [$]] -> [Smalltalk snapshot: true andQuit: false]. + } otherwise: [^ aKeyboardEvent "no hit"]. + ^ aKeyboardEvent ignore "hit!!"]. + + ^ aKeyboardEvent "no hit"! Item was removed: - ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') ----- - handleListenEvent: aUserInputEvent - "Handlers for *global* keys, regardless of which widget has keyboard focus." - aUserInputEvent type = #keystroke ifTrue: - [ aUserInputEvent commandKeyPressed ifTrue: - [ aUserInputEvent keyValue = $R asciiValue ifTrue: [ Utilities browseRecentSubmissions ]. - aUserInputEvent keyValue = $L asciiValue ifTrue: [ World findAFileList: aUserInputEvent ]. - aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ]. - aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ]. - "aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ]." - aUserInputEvent keyValue = $] asciiValue ifTrue: - [ Smalltalk - snapshot: true - andQuit: false ] ] ]! Item was changed: ----- Method: PasteUpMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" super initialize. "" cursor := 1. padding := 3. self enableDragNDrop. self isWorldMorph ifTrue: [self setProperty: #automaticPhraseExpansion toValue: true]. + self clipSubmorphs: true. + self initializeKeyboardShortcuts.! - self clipSubmorphs: true! Item was added: + ----- Method: PasteUpMorph>>initializeKeyboardShortcuts (in category 'initialization') ----- + initializeKeyboardShortcuts + "Install an event capture filter to add shortcuts for global operations like opening a tool." + + PasteUpMorph globalCommandKeysEnabled + ifTrue: [self addKeyboardShortcuts].! Item was added: + ----- Method: PasteUpMorph>>removeKeyboardShortcuts (in category 'initialization') ----- + removeKeyboardShortcuts + + self removeKeyboardCaptureFilter: self.! Item was added: + ----- Method: SystemWindow>>addKeyboardShortcuts (in category 'initialization') ----- + addKeyboardShortcuts + "Install an event capture filter to add shortcuts for window control operations." + + self addKeyboardCaptureFilter: self.! Item was changed: ----- Method: SystemWindow>>beKeyWindow (in category 'top window') ----- beKeyWindow "Let me be the most important window on the screen. I am at the top and I can have a shadow to get more attention by the user. I am the window that is responsible for window keyboard shortcuts." | oldKeyWindow | self isKeyWindow ifTrue: [^ self]. oldKeyWindow := TopWindow. TopWindow := self. - PasteUpMorph globalCommandKeysEnabled ifTrue: - [ self activeHand addKeyboardListener: self ]. - self unlockWindowDecorations; "here, because all windows might be active anyway" activate; "if not already active, activate now" comeToFront. "key windows are on top" "Change appearance to get noticed." self hasDropShadow: Preferences menuAppearance3d. (self valueOfProperty: #borderWidthWhenActive) ifNotNil: [:bw | self acquireBorderWidth: bw]. oldKeyWindow ifNotNil: [:wnd | wnd passivateIfNeeded. - self activeHand removeKeyboardListener: oldKeyWindow. - "Change appearance to not look prettier than the new key window." wnd hasDropShadow: false. (wnd valueOfProperty: #borderWidthWhenInactive) ifNotNil: [:bw | wnd acquireBorderWidth: bw]]. "Synchronize focus look with position of current hand because any call could have made this window the new key window." self updateFocusLookAtHand.! Item was added: + ----- Method: SystemWindow>>filterEvent:for: (in category 'events') ----- + filterEvent: aKeyboardEvent for: anObject + "Provide keyboard shortcuts." + + aKeyboardEvent isKeystroke + ifFalse: [^ aKeyboardEvent]. + + aKeyboardEvent commandKeyPressed ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [$\] -> [self class sendTopWindowToBack]. + [Character escape] -> [self delete]. + } otherwise: [^ aKeyboardEvent "no hit"]. + ^ aKeyboardEvent ignore "hit!!"]. + + aKeyboardEvent controlKeyPressed ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [Character escape] -> [self world findWindow: aKeyboardEvent]. + } otherwise: [^ aKeyboardEvent "no hit"]. + ^ aKeyboardEvent ignore "hit!!"]. + + ^ aKeyboardEvent "no hit"! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- handleListenEvent: aUserInputEvent + "See #mouseEnterDragging:. Watch for finished drag-and-drop action and lock contents accordingly." - "1) Handle keyboard shortcuts" - aUserInputEvent type = #keystroke ifTrue: - [ aUserInputEvent commandKeyPressed ifTrue: - [ aUserInputEvent keyValue = $\ asciiValue ifTrue: [ self class sendTopWindowToBack ]. - "Command+Escape" - aUserInputEvent keyValue = 27 ifTrue: - [ aUserInputEvent wasHandled: true. - self delete ] ]. - aUserInputEvent controlKeyPressed ifTrue: - [ aUserInputEvent keyValue = 27 ifTrue: [ self world findWindow: aUserInputEvent ] ] ]. - - "2) See #mouseEnterDragging:. Watch for finished drag-and-drop action and lock contents accordingly." (aUserInputEvent isMouse and: [ aUserInputEvent hand hasSubmorphs not ]) ifTrue: [ self isKeyWindow ifFalse: [ self passivateIfNeeded ]. aUserInputEvent hand removeMouseListener: self ].! Item was changed: ----- Method: SystemWindow>>initialize (in category 'initialization') ----- initialize "Initialize a system window. Add label, stripes, etc., if desired" super initialize. self layoutPolicy: ProportionalLayout new. self wantsPaneSplitters: true. self layoutInset: ProportionalSplitterMorph gripThickness. self cellInset: ProportionalSplitterMorph gripThickness. self initializeLabelArea. self addCornerGrips. self setDefaultParameters. allowReframeHandles := true. isCollapsed := false. paneMorphs := Array new. mustNotClose := false. + updatablePanes := Array new. + + self initializeKeyboardShortcuts.! - updatablePanes := Array new.! Item was added: + ----- Method: SystemWindow>>initializeKeyboardShortcuts (in category 'initialization') ----- + initializeKeyboardShortcuts + "Install an event capture filter to add shortcuts for window control operations." + + PasteUpMorph globalCommandKeysEnabled + ifTrue: [self addKeyboardShortcuts].! Item was added: + ----- Method: SystemWindow>>removeKeyboardShortcuts (in category 'initialization') ----- + removeKeyboardShortcuts + + self removeKeyboardCaptureFilter: self.! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'SystemWindow allSubInstancesDo: [:ea | + ea initializeKeyboardShortcuts. + HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. + PasteUpMorph allSubInstancesDo: [:ea | + ea initializeKeyboardShortcuts. + HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. + DockingBarMorph allSubInstancesDo: [:ea | + HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]].'! - (PackageInfo named: 'Morphic') postscript: 'SystemWindow reconfigureWindowsForFocus.'! From commits at source.squeak.org Sat Jun 4 17:24:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 17:24:05 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1164.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1164.mcz ==================== Summary ==================== Name: Morphic-mt.1164 Author: mt Time: 4 June 2016, 7:23:27.090866 pm UUID: 5e45c00f-7313-1449-86b4-7193cc8c0a62 Ancestors: Morphic-mt.1163 Fixes regression with system windows that get locked-in modally and thus have modal owners or a modal child. There was an endless loop then trying to #comeToFront. CMD+K spawns a font chooser in every text morph, for example, which is modally locked to the underlying code editing window. =============== Diff against Morphic-mt.1163 =============== Item was changed: ----- Method: SystemWindow>>comeToFront (in category 'top window') ----- comeToFront - "If I am modal, bring along my modal owning window and my model child as well. Ensure that my label is visible." + "Modal windows: Walk along the modal owner chain, the bring all to top." + self modalOwner ifNotNil: [:mo | mo isSystemWindow ifTrue: [ + ^ mo modalOwner + ifNil: [mo comeToFrontModally] + ifNotNil: [:omo | omo comeToFront]]]. + self modalChild ifNotNil: [^ self comeToFrontModally]. + - "Model window: Bring up my modal owner behind me." - self modalOwner ifNotNil: - [ : mo | mo isSystemWindow ifTrue: - [ mo comeToFront ] ]. - "Now show me." super comeToFront. + - - "Modal window: Bring up my modal children in front of me." - self modalChild ifNotNil: - [ : modalChild | modalChild owner ifNotNil: - [ modalChild comeToFront. - ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. - "Label should be visible to interact with." self assureLabelAreaVisible. "Handle historic companions. May be removed in the future." self extantSketchEditor ifNotNil: [:sketchEditor | sketchEditor comeToFront. (self world findA: PaintBoxMorph) ifNotNil: [:pal | pal comeToFront]].! Item was added: + ----- Method: SystemWindow>>comeToFrontModally (in category 'top window') ----- + comeToFrontModally + "If I am modal, bring along my modal owning window and my model child as well." + + super comeToFront. + + "Bring up my modal children in front of me." + self modalChild ifNotNil: [:wnd | + wnd comeToFrontModally. + wnd modalChild ifNil: [wnd flash]].! From commits at source.squeak.org Sat Jun 4 17:30:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 17:30:37 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1165.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1165.mcz ==================== Summary ==================== Name: Morphic-mt.1165 Author: mt Time: 4 June 2016, 7:29:48.10522 pm UUID: befe813b-f402-eb44-91db-cbe5582acd62 Ancestors: Morphic-mt.1164 Event listeners receive event copies again. For backwards compatibility. Note that we can now use event filters to implement keyboard shortcuts. A handled shortcut can ignore the respective event directly in the event filter. We might want to remove event listeners in the future. =============== Diff against Morphic-mt.1164 =============== Item was changed: ----- Method: HandMorph>>sendListenEvent:to: (in category 'private events') ----- sendListenEvent: anEvent to: listenerGroup "Send the event to the given group of listeners" listenerGroup ifNil:[^self]. listenerGroup do:[:listener| + listener ifNotNil:[listener handleListenEvent: anEvent copy]].! - listener ifNotNil:[listener handleListenEvent: anEvent]].! From commits at source.squeak.org Sat Jun 4 21:56:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 4 21:56:58 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160604215656.20565.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-June/068177.html Name: Files-dtl.157 Ancestors: Files-tpr.156 Flush before sync, unsure streams are flushed before sync to disk. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068178.html Name: Morphic-mt.1159 Ancestors: Morphic-ul.1158 Fixes a small regression bug where freshly opened tool windows were not raised to the front. Was especially annoying when clicking some button in the code browsers. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068179.html Name: Morphic-mt.1160 Ancestors: Morphic-mt.1159 Moves automatic keyboard focus grabbing from KeyboardEvent into the Morph's key-stroke-handler. More robust when events bubble up again. No accidential focus grab anymore. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068180.html Name: Morphic-mt.1161 Ancestors: Morphic-mt.1160 Adds event filters. Includes refactorings for MorphicEventDispatcher and HandMorph >> #handleEvent:. Also fixes event bubbling for focus events. Sorry for this agglomeration of changes. See Morph >> #eventFilterDocumentation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068181.html Name: Morphic-mt.1162 Ancestors: Morphic-mt.1161 Quick fix for update issues during last commit. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068182.html Name: 51Deprecated-mt.31 Ancestors: 51Deprecated-ul.30 Deprecates old OB method. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068183.html Name: MorphicTests-mt.32 Ancestors: MorphicTests-mt.31 Adds tests for user input event handling and event filters. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068184.html Name: Morphic-mt.1163 Ancestors: Morphic-mt.1162 Use event filters to implement keyboard shortcuts (world, docking bar, system windows). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068185.html Name: Morphic-mt.1164 Ancestors: Morphic-mt.1163 Fixes regression with system windows that get locked-in modally and thus have modal owners or a modal child. There was an endless loop then trying to #comeToFront. CMD+K spawns a font chooser in every text morph, for example, which is modally locked to the underlying code editing window. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068186.html Name: Morphic-mt.1165 Ancestors: Morphic-mt.1164 Event listeners receive event copies again. For backwards compatibility. Note that we can now use event filters to implement keyboard shortcuts. A handled shortcut can ignore the respective event directly in the event filter. We might want to remove event listeners in the future. ============================================= From Marcel.Taeumel at hpi.de Sun Jun 5 05:36:30 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 5 06:14:39 2016 Subject: [squeak-dev] Re: #caseOf:otherwise: -> Parser is way too cautious In-Reply-To: <92547DF2-C045-4059-BD6F-DD02A7DE7BB4@freudenbergs.de> References: <1464511851251-4897986.post@n4.nabble.com> <1464512358297-4897987.post@n4.nabble.com> <92547DF2-C045-4059-BD6F-DD02A7DE7BB4@freudenbergs.de> Message-ID: <1465104990409-4899231.post@n4.nabble.com> Bert Freudenberg wrote >> On 29.05.2016, at 10:59, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> marcel.taeumel wrote >>> Hi, there! >>> >>> I cannot write this without the parser complaining: >>> >>> number caseOf: { >>> 0 -> 1. >>> 1 -> 1. >>> } otherwise: { ... }. >>> >>> Because what I should write is this: >>> >>> number caseOf: { >>> [0] -> [1]. >>> [1] -> [1]. >>> } otherwise: { ... }. >>> >>> I think that this is not for the parser to decide. Numbers do understand >>> #value. > > Only since recently. Still not sure it?s a good idea. > >>> Any object does. So this is fine. Am I missing something? >>> >>> It reminds me of this mistake our students typically make at least once: >>> >>> (someBooleanExpression) and: (someOtherBooleanExpression) >>> versus >>> (someBooleanExpression) and: [someOtherBooleanExpression] >>> versus >>> [someBooleanExpression] and: (someOtherBooleanExpression) >>> versus >>> [someBooleanExpression] and: [someOtherBooleanExpression] >>> >>> Sure, we can offer tool support to help in such situations. But the >>> parser >>> is just too naggy. :-) >>> >>> Best, >>> Marcel >> >> Okay, this was stoopid. ;o) I assumed an implicit comparison: >> >> number caseOf: { >> [number = 0] -> [1]. >> [number = 1] -> [1]. >> } otherwise: { ... }. >> >> Still, no need to force the result also into a block? Why not just modify >> the implementation of #caseOf:otherwise: to make such comparisons if >> there >> is no block given? > > This is exactly the reason we resisted adding Object>>value for a long > time, because it hides errors. E.g. your use of {} in the otherwise-case, > which is wrong. Each case should be evaluated only when the matching > condition is true, hence the need to use a block. Arguably the compiler > should warn about not using a block as argument to ?otherwise:'. > > Perhaps a more Smalltalky way could be added if allowed binary and unary > messages to cascade: > > number = 0 => [24]; > = 1 => [42]; > else => ['hi'] > > Btw this is how things worked in Smalltalk-76/78: > > > > > - Bert - > > > > > > > > Screenshot 2016-05-30 12.48.12.png (4K) > <http://forum.world.st/attachment/4898099/0/Screenshot%202016-05-30%2012.48.12.png> > smime.p7s (5K) > <http://forum.world.st/attachment/4898099/1/smime.p7s> Hi Bert, the debugger revealed my "otherwise: { ... }" mistake pretty quickly. Thanks for the Smalltalk-72 example. Best, Marcel -- View this message in context: http://forum.world.st/caseOf-otherwise-Parser-is-way-too-cautious-tp4897986p4899231.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun Jun 5 05:44:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 5 06:22:14 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> References: <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> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> Message-ID: <1465105445623-4899235.post@n4.nabble.com> Bert Freudenberg wrote >> On 25.03.2016, at 19:28, tim Rowledge < > tim@ > > wrote: >> >> >>> On 25-03-2016, at 7:56 AM, Bert Freudenberg < > bert@ > > 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 > > Well, almost. I just noticed that in the 5.0 All-in-One-VM the Mac corner > grip is visible, and *only* affects the lower right window corner: > > > > ... whereas in a 5.0.3602 Spur VM the grips are invisible and in both > lower-left and lower-right corners. > > Is this a difference between Carbon and Cocoa VMs, maybe? > > - Bert - > > > > > > PastedGraphic-1.png (7K) > <http://forum.world.st/attachment/4886719/0/PastedGraphic-1.png> > smime.p7s (5K) > <http://forum.world.st/attachment/4886719/1/smime.p7s> Hi, there. In Windows 10, the grab handles are outside the (resp. adjacent to) windows and reside in the drop shadow. Since there are no window borders anymore in Windows 10, the window contents would otherwise overlap with the grips. This holds also for the corner grips. I think we should also move our grips to the outside if SystemWindow borders are too small. The only draw back would be that full-screen windows cannot be resized anymore. Should they anyway? Maximized means maximized. :-) Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4899235.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Jun 5 07:32:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 5 07:32:06 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1166.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1166.mcz ==================== Summary ==================== Name: Morphic-mt.1166 Author: mt Time: 5 June 2016, 9:31:27.57571 am UUID: b8c7c456-a88e-3143-8c24-09fae212f9b9 Ancestors: Morphic-mt.1165 Fixes the bug where the text cursor was not blinking in text morphs after a dialog box appeared and was closed again. For blinking text cursors, make the ifNil-check for paragraphs useful again. Using the accessor #paragraph will always create a paragraph. We have to directly check the instance variable to make this improvement effective. Note that regular TextMorphs do not keep track of their editors and paragraphs after they lose keyboard focus. I am not sure why but this seems to be a performance optimization. =============== Diff against Morphic-mt.1165 =============== Item was changed: ----- Method: TextMorph>>keyboardFocusChange: (in category 'event handling') ----- + keyboardFocusChange: weHaveFocus + + paragraph ifNotNil: [:para | para focused: weHaveFocus]. + + weHaveFocus + ifTrue: [ "A hand is wanting to send us characters..." - keyboardFocusChange: aBoolean - | w | - paragraph isNil ifFalse:[paragraph focused: aBoolean]. - aBoolean ifTrue:["A hand is wanting to send us characters..." self hasFocus ifFalse: [self editor "Forces install"]. + Editor blinkingCursor + ifTrue: [self startBlinking] + ifFalse: [self resetBlinkCursor "ensure caret visible"]] + ifFalse: [ "A hand has clicked elsewhere..." + self world ifNotNil: [:w | + self flag: #suspicious. "mt: Why should this be called with 'false' if a hand holds on the focus? Do hands not talk to each other before sending this call? They should..." + w handsDo: [:h | h keyboardFocus == self ifTrue: [^self]]. + "Release control unless some hand is still holding on" + self releaseEditor]. + self stopBlinking]. - Editor blinkingCursor ifTrue: [ self startBlinking ]. - ] ifFalse:["A hand has clicked elsewhere..." - (w := self world) ifNotNil:[ - w handsDo: [:h | h keyboardFocus == self ifTrue: [^self]]. - "Release control unless some hand is still holding on" - self releaseEditor]. - self stopBlinking. - ]. ! Item was changed: ----- Method: TextMorph>>onBlinkCursor (in category 'blinking') ----- onBlinkCursor + - "Blink the cursor" | para | + para := paragraph ifNil: [^nil]. + Time millisecondClockValue < self blinkStart + ifTrue: [para showCaret: para focused] + ifFalse: [para showCaret: para showCaret not]. - para := self paragraph ifNil:[^nil]. - Time millisecondClockValue < self blinkStart ifTrue:[ - "don't blink yet" - ^para showCaret: para focused. - ]. - para showCaret: para showCaret not. para caretRect ifNotNil: [ :r | self invalidRect: r].! Item was changed: ----- Method: TextMorph>>resetBlinkCursor (in category 'blinking') ----- resetBlinkCursor "Reset the blinking cursor" | para | self blinkStart: Time millisecondClockValue + 500. + para := paragraph ifNil: [^self]. - para := self paragraph ifNil:[^self]. para showCaret = para focused ifFalse:[ para caretRect ifNotNil: [ :r | self invalidRect: r]. para showCaret: para focused. ]. ! Item was changed: ----- Method: TextMorph>>stopBlinking (in category 'blinking') ----- stopBlinking self stopSteppingSelector: #onBlinkCursor. + self resetBlinkCursor. "Ensure caret visible."! - ! Item was changed: ----- Method: TextMorphForEditView>>keyboardFocusChange: (in category 'event handling') ----- + keyboardFocusChange: weHaveFocus + "Overwritten because we do not want to release the editor if we do not have the focus. Editors and their paragraphs store the text selection, which we want to reuse after getting keyboard focus again. This supports keyboard navigation." + + paragraph ifNotNil: [:para | para focused: weHaveFocus]. + + weHaveFocus + ifFalse: [self stopBlinking] - keyboardFocusChange: aBoolean - "rr 3/21/2004 22:55 : removed the #ifFalse: branch, - which was responsible of the deselection of text when the - paragraph lost focus. This way selection works in a more standard - way, and this permits the menu keyboard control to be really effective" - paragraph isNil ifFalse:[paragraph focused: aBoolean]. - aBoolean ifTrue: [ + self hasFocus + ifFalse: [self editor "forces install"]. + Editor blinkingCursor + ifTrue: [self startBlinking] + ifFalse: [self resetBlinkCursor "ensure caret visible"]]. + - "A hand is wanting to send us characters..." - self hasFocus ifFalse: [self editor "Forces install"]. - Editor blinkingCursor ifTrue: [self startBlinking]] - ifFalse:[ - self stopBlinking]. self changed. "Tell my edit-view about this because I am his delegate." + self editView keyboardFocusChange: weHaveFocus. - self editView keyboardFocusChange: aBoolean. ! Item was changed: ----- Method: UserDialogBoxMorph>>runModalIn:forHand:at: (in category 'running') ----- runModalIn: aWorld forHand: aHand at: aPointOrNil "Ensure that we have a reasonable minimum size" | oldFocus pos offset | (ProvideAnswerNotification signal: self label asString) ifNotNil:[:answer| ^answer]. self openInWorld: aWorld. pos := aPointOrNil ifNil: [ "If called after a longer UI operation, be sure to use the current mouse cursor. Hand position is not up-to-date. Do one world cycle does not help if there are currently no mouse events. So, we *have to be* this extreme." Sensor cursorPoint]. offset := aPointOrNil ifNil: [selectedButton fullBounds origin - (selectedButton fullBounds extent // 2 * (-1@1))] ifNotNil: [self fullBounds extent // 2]. self setConstrainedPosition: pos - offset hangOut: false. oldFocus := aHand keyboardFocus. aHand newMouseFocus: self. aHand newKeyboardFocus: self. savedLabel := selectedButton label. [self isInWorld] whileTrue:[aWorld doOneSubCycle]. + oldFocus ifNotNil:[aHand newKeyboardFocus: oldFocus]. - oldFocus ifNotNil:[aHand keyboardFocus: oldFocus]. ^value! From karlramberg at gmail.com Sun Jun 5 10:27:43 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sun Jun 5 10:27:46 2016 Subject: [squeak-dev] Problems updating images, NonBooleanReceiver: proceed for truth. Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: SqueakDebug.log Type: application/octet-stream Size: 16559 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160605/6b0bb8c3/SqueakDebug.obj From commits at source.squeak.org Sun Jun 5 11:28:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 5 11:28:01 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1167.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1167.mcz ==================== Summary ==================== Name: Morphic-mt.1167 Author: mt Time: 5 June 2016, 1:27:11.378092 pm UUID: dbeb51b9-bbf3-fa47-b020-b045338dc0d3 Ancestors: Morphic-mt.1166 Fixes bugs in pluggable scroll panes constructed with the tool builder. There were issues with the scroll deltas and resizing hints. =============== Diff against Morphic-mt.1166 =============== Item was changed: ----- Method: PluggableScrollPane>>morph: (in category 'accessing') ----- morph: morphToScroll + morph ifNotNil: [:m | m removeDependent: self]. + morphToScroll topLeft: 0@0. morph := morphToScroll. morphClass := morphToScroll class. + morph addDependent: self. + self scroller removeAllMorphs; addMorph: morph. self updateMorph.! Item was added: + ----- Method: PluggableScrollPane>>update: (in category 'updating') ----- + update: aspect + + aspect == #submorphs + ifTrue: [self updateMorph]. + + super update: aspect.! Item was changed: ----- Method: PluggableScrollPane>>updateMorph (in category 'updating') ----- updateMorph self morph fullBounds. + self setScrollDeltas.! - self setScrollDeltas. - - scrollBar setValue: 0.0. - hScrollBar setValue: 0.0.! From commits at source.squeak.org Sun Jun 5 11:28:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 5 11:28:26 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.98.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.98.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.98 Author: mt Time: 5 June 2016, 1:28:09.522092 pm UUID: 7db99959-90a8-6b47-89ac-bffa8c34a151 Ancestors: ToolBuilder-Kernel-mt.97 Appendix to Morphic-mt.1167. =============== Diff against ToolBuilder-Kernel-mt.97 =============== Item was changed: ----- Method: PluggableScrollPaneSpec>>hScrollBarPolicy (in category 'accessing') ----- hScrollBarPolicy + ^ hScrollBarPolicy! - ^ hScrollBarPolicy ifNil: [#always]! Item was changed: ----- Method: PluggableScrollPaneSpec>>vScrollBarPolicy (in category 'accessing') ----- vScrollBarPolicy + ^ vScrollBarPolicy! - ^ vScrollBarPolicy ifNil: [#always]! From commits at source.squeak.org Sun Jun 5 11:29:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 5 11:29:48 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.167.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.167.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.167 Author: mt Time: 5 June 2016, 1:29:37.065092 pm UUID: d6d3ad9e-f82f-c44d-b2a6-6d907e129fa1 Ancestors: ToolBuilder-Morphic-mt.166 Appendix to Morphic-mt.1167. Fixes construction of pluggable scroll panes and update of pluggable panel morphs, which are used in pluggable scroll panes. =============== Diff against ToolBuilder-Morphic-mt.166 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableScrollPane: (in category 'widgets optional') ----- buildPluggableScrollPane: spec + | widget panel | - | widget | widget := self scrollPaneClass new. widget model: spec model. self register: widget id: spec name. spec children ifNotNil: [:obj | "Create panel morph to scroll it." + panel := self pluggablePanelSpec new + model: spec model; - widget morph: (self pluggablePanelSpec new children: obj; layout: spec layout; + horizontalResizing: (spec layout == #proportional ifTrue: [#rigid] ifFalse: [#shrinkWrap]); + verticalResizing: (spec layout == #proportional ifTrue: [#rigid] ifFalse: [#shrinkWrap]); + buildWith: self. + widget morph: panel. + ] - frame: (0@0 corner: 1@1); - buildWith: self). - spec layout ~~ #proportional ifTrue: [ - "Fix #spaceFill resizing because it does not make sense in scroll pane." - widget morph - hResizing: #shrinkWrap; - vResizing: #shrinkWrap. - widget morph submorphsDo: [:m | - m - extent: 100@100; - flag: #refactor; "mt: Restore orginial properties?" - hResizing: #rigid; - vResizing: #rigid] - ]] ifNil: [spec morph ifNotNil: [:m | widget morph: m] ifNil: [widget morphClass: spec morphClass]]. self setFrame: spec frame in: widget. self setLayoutHintsFor: widget spec: spec. parent ifNotNil: [self add: widget to: parent]. widget borderWidth: spec borderWidth. + "Override default scroll bar policies if needed. Widget will use preference values otherwise." + spec hScrollBarPolicy ifNotNil: [:policy | + policy caseOf: { + [#always] -> [widget alwaysShowHScrollBar]. + [#never] -> [widget hideHScrollBarIndefinitely]. + [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]}]. + spec vScrollBarPolicy ifNotNil: [:policy | + policy caseOf: { + [#always] -> [widget alwaysShowVScrollBar]. + [#never] -> [widget hideVScrollBarIndefinitely]. + [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]}]. - spec hScrollBarPolicy caseOf: { - [#always] -> [widget alwaysShowHScrollBar]. - [#never] -> [widget hideHScrollBarIndefinitely]. - [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]}. - spec vScrollBarPolicy caseOf: { - [#always] -> [widget alwaysShowVScrollBar]. - [#never] -> [widget hideVScrollBarIndefinitely]. - [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]}. ^ widget! Item was changed: ----- Method: PluggablePanelMorph>>update: (in category 'update') ----- update: selectorSymbolOrNil selectorSymbolOrNil ifNil: [ ^ self ]. selectorSymbolOrNil = getChildrenSelector ifTrue: [ self removeAllMorphs ; + addAllMorphs: self children . + + "Let my children take all the place unless my extent is described by them." + self hResizing ~~ #shrinkWrap ifTrue: + [ self submorphsDo: [ : m | m hResizing: #spaceFill ] ]. + self vResizing ~~ #shrinkWrap ifTrue: + [ self submorphsDo: [ : m | m vResizing: #spaceFill ] ]. + + "Tell dependents about this update. There is no pluggable notification for changed submorphs." + self changed: #submorphs ].! - addAllMorphs: self children ; - submorphsDo: - [ : m | m - hResizing: #spaceFill ; - vResizing: #spaceFill ] ]! From Marcel.Taeumel at hpi.de Sun Jun 5 11:00:11 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 5 11:38:22 2016 Subject: [squeak-dev] Re: Problems updating images, NonBooleanReceiver: proceed for truth. In-Reply-To: References: Message-ID: <1465124411642-4899266.post@n4.nabble.com> Karl Ramberg wrote > I suspect it's Morphic-mt.1163.mcz that give the error. > > > See attached debug log. > > Best, > Karl > > Off topic kind of: > (I called the directory for the image trump instead of trunk as a pun for > my self. I did not know I was going to post this. Sorry ) > > > > > SqueakDebug.log (22K) > <http://forum.world.st/attachment/4899257/0/SqueakDebug.log> Hi, Karl. You can safely ignore that. It is just a hick-up because there were many changes in HandMorph and Morph event processing. If you click the update entry in the menu, after the update, there is also code to execute left on the stack (old CompiledMethods) which is only partially valid after the update. The safest way around this "update problem" is by triggering the update *not* with mouse or keyboard input, hence, via the command line. Anyway, you can ignore that issue. Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-images-NonBooleanReceiver-proceed-for-truth-tp4899257p4899266.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun Jun 5 11:14:35 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 5 11:52:46 2016 Subject: [squeak-dev] Re: Problems updating images, NonBooleanReceiver: proceed for truth. In-Reply-To: <1465124411642-4899266.post@n4.nabble.com> References: <1465124411642-4899266.post@n4.nabble.com> Message-ID: <1465125275404-4899267.post@n4.nabble.com> marcel.taeumel wrote > > Karl Ramberg wrote >> I suspect it's Morphic-mt.1163.mcz that give the error. >> >> >> See attached debug log. >> >> Best, >> Karl >> >> Off topic kind of: >> (I called the directory for the image trump instead of trunk as a pun for >> my self. I did not know I was going to post this. Sorry ) >> >> >> >> >> SqueakDebug.log (22K) >> <http://forum.world.st/attachment/4899257/0/SqueakDebug.log> > Hi, Karl. > > You can safely ignore that. It is just a hick-up because there were many > changes in HandMorph and Morph event processing. > > If you click the update entry in the menu, after the update, there is also > code to execute left on the stack (old CompiledMethods) which is only > partially valid after the update. > > The safest way around this "update problem" is by triggering the update > *not* with mouse or keyboard input, hence, via the command line. > > Anyway, you can ignore that issue. > > Best, > Marcel We could change UserInputEvent >> #wasIgnored to check for nil, since during this update process #initialize was not called on the existing instances. However, then it wouldn't be a quick-return anymore. Event handling is critical for performance. I would rather leave it that way... Opinions? Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-images-NonBooleanReceiver-proceed-for-truth-tp4899257p4899267.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Sun Jun 5 13:36:33 2016 From: gettimothy at zoho.com (gettimothy) Date: Sun Jun 5 13:36:39 2016 Subject: [squeak-dev] Re: update on tracking down that 64 linux morphic bug...solved. In-Reply-To: <1465047164537-4899141.post@n4.nabble.com> References: <155180832f2.df729e3d35781.4199381411155167527@zoho.com> <1465047164537-4899141.post@n4.nabble.com> Message-ID: <15520c781ba.10a994dab79662.8398287729873670653@zoho.com> Hi Marcel and Levente Interestingly, the problem was in Rectangle (0.7@0.8) corner: 1.0@1.0 , when evaluated would change the Y coordinate (!) and would store things like 0.7@0.7 The problem is my home-built vm; I used a prebuilt from http://www.mirandabanda.org/files/Cog/VM/latest/cogspur64linuxht-16.21.3732.tgz And the problem goes away. I am going to do a fresh compile and see what happens. I HOPE (crosses fingers) that I don't have a build system issue. Thanks for your help. -- View this message in context: http://forum.world.st/update-on-tracking-down-that-64-linux-morphic-bug-tp4899104p4899141.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/20160605/b1c3e656/attachment.htm From commits at source.squeak.org Sun Jun 5 21:56:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 5 21:56:52 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160605215650.25988.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-June/068187.html Name: Morphic-mt.1166 Ancestors: Morphic-mt.1165 Fixes the bug where the text cursor was not blinking in text morphs after a dialog box appeared and was closed again. For blinking text cursors, make the ifNil-check for paragraphs useful again. Using the accessor #paragraph will always create a paragraph. We have to directly check the instance variable to make this improvement effective. Note that regular TextMorphs do not keep track of their editors and paragraphs after they lose keyboard focus. I am not sure why but this seems to be a performance optimization. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068188.html Name: Morphic-mt.1167 Ancestors: Morphic-mt.1166 Fixes bugs in pluggable scroll panes constructed with the tool builder. There were issues with the scroll deltas and resizing hints. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068189.html Name: ToolBuilder-Kernel-mt.98 Ancestors: ToolBuilder-Kernel-mt.97 Appendix to Morphic-mt.1167. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068190.html Name: ToolBuilder-Morphic-mt.167 Ancestors: ToolBuilder-Morphic-mt.166 Appendix to Morphic-mt.1167. Fixes construction of pluggable scroll panes and update of pluggable panel morphs, which are used in pluggable scroll panes. ============================================= From Marcel.Taeumel at hpi.de Mon Jun 6 15:50:17 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 6 16:28:36 2016 Subject: [squeak-dev] Mouse Wheel Events, "Point and scroll-by-wheel" Message-ID: <1465228217784-4899428.post@n4.nabble.com> Hi, there. Here is a change set that adds MouseWheelEvent and everything related to it (including EventHandler): mouse-wheel-events.cs You have two new preferences (in "Morphic", "keyboard", "mouse" categories): [x] Synthesize Mouse Wheel Events from Keyboard Events [x] Send Mouse Wheel Events to Keyboard Focus Both are enabled by default. I refactored the old-style wheel scrolling to use an event filter in ScrollPane but this is regarded a fall-back only and can be used for old applications. The mouse wheel event synthesis is implemented as keyboard event capture filter in HandMorph itself. See the changeset's postload script or HandMorph >> #initForEvents. Once our VMs deliver real mouse wheel events, we can change that and adapt HandMorph >> #generateMouseEvent:. The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used to switch between Windows and OS X behavior. Please, try it out. Best, Marcel -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Mon Jun 6 16:29:10 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jun 6 16:29:52 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1465105445623-4899235.post@n4.nabble.com> References: <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> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> Message-ID: -1. No ghost grabbing please. Squeak is not Windows 10. Window contents don't overlap with the grips. The close-box is not "content". Changing the mouse to resize shape when one is adjacent to the resizer just plain looks like a bug. The environment should have a "physicality" to it that users can relate to. No one clicks *next* to something to grab it. Why does Microsoft continue to pursue such insanity? Too much overdesign zeal? The big tablet dumb-down? They turn one UI feature into a problem, and then they gotta "solve" it, by introducing another problem... Like what happened with those disasterous "auto maximize" features in Windows 8 / Ubuntu Unity. The same was already available by clicking maximize and then sizing the window down along 1 dimension which is flexible, easy and consistent with the existing window management gestures. On Sun, Jun 5, 2016 at 12:44 AM, marcel.taeumel wrote: > Bert Freudenberg wrote >>> On 25.03.2016, at 19:28, tim Rowledge < > >> tim@ > >> > wrote: >>> >>> >>>> On 25-03-2016, at 7:56 AM, Bert Freudenberg < > >> bert@ > >> > 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 >> >> Well, almost. I just noticed that in the 5.0 All-in-One-VM the Mac corner >> grip is visible, and *only* affects the lower right window corner: >> >> >> >> ... whereas in a 5.0.3602 Spur VM the grips are invisible and in both >> lower-left and lower-right corners. >> >> Is this a difference between Carbon and Cocoa VMs, maybe? >> >> - Bert - >> >> >> >> >> >> PastedGraphic-1.png (7K) >> <http://forum.world.st/attachment/4886719/0/PastedGraphic-1.png> >> smime.p7s (5K) >> <http://forum.world.st/attachment/4886719/1/smime.p7s> > > Hi, there. > > In Windows 10, the grab handles are outside the (resp. adjacent to) windows > and reside in the drop shadow. Since there are no window borders anymore in > Windows 10, the window contents would otherwise overlap with the grips. This > holds also for the corner grips. > > I think we should also move our grips to the outside if SystemWindow borders > are too small. The only draw back would be that full-screen windows cannot > be resized anymore. Should they anyway? Maximized means maximized. :-) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4899235.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Mon Jun 6 16:41:40 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jun 6 16:42:22 2016 Subject: [squeak-dev] Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: <1465228217784-4899428.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> Message-ID: It makes scrolling very choppy. Instead of scrolling by 3-lines at a time, it scrolls by about 10... Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by mouseOverForKeyboardFocus? On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel wrote: > Hi, there. > > Here is a change set that adds MouseWheelEvent and everything related to it > (including EventHandler): > mouse-wheel-events.cs > > > You have two new preferences (in "Morphic", "keyboard", "mouse" categories): > > [x] Synthesize Mouse Wheel Events from Keyboard Events > [x] Send Mouse Wheel Events to Keyboard Focus > > Both are enabled by default. > > I refactored the old-style wheel scrolling to use an event filter in > ScrollPane but this is regarded a fall-back only and can be used for old > applications. > > The mouse wheel event synthesis is implemented as keyboard event capture > filter in HandMorph itself. See the changeset's postload script or HandMorph >>> #initForEvents. Once our VMs deliver real mouse wheel events, we can > change that and adapt HandMorph >> #generateMouseEvent:. > > The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used to > switch between Windows and OS X behavior. > > Please, try it out. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From tim at rowledge.org Mon Jun 6 17:35:19 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 6 17:35:17 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> Message-ID: <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> So, some good news at last. > On 03-06-2016, at 11:36 AM, Yoshiki Ohshima wrote: > > Let us try it with environment variables LC_ALL and LANG to be en_GB.UTF8 first. > > export LC_ALL=en_GB.UTF8 > export LANG=$LC_ALL > > (and reboot.) You should see menus in English (again) I actually had to reset the locale in raspi-config to get it clean. Do we have the same OS version? I have `uname -a` returning 4.4.9-v7+ #884 SMP Fri May 6 etc > > With ibus installed, you should see something like > 'raspi-menu' (http://tinlizzie.org/~ohshima/ibus/raspi-menu.png): > there should be ibus Preferences item there. Pick that > one. > Almost; I had to choose a plain ?Japanese? entry, add it and then choose an input method for it before I could see anything to do with ?anthy?. Once that was ok I could use the menubar icon to choose input method and at last I get a pop-up composition window. Hooray! Of course, it could be inserting Elvish or Klingon (please tell me somebody has made a Klingon input method?) for all I know. If we want to make this accessible we?re going to need a much more precise description of what to do, or better yet a script. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Furnulum pani nolo = I don't want a toaster. From Yoshiki.Ohshima at acm.org Mon Jun 6 17:44:47 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jun 6 17:44:51 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> Message-ID: On Mon, Jun 6, 2016 at 10:35 AM, tim Rowledge wrote: > > Almost; I had to choose a plain ?Japanese? entry, add it and then choose an input method for it before I could see anything to do with ?anthy?. Once that was ok I could use the menubar icon to choose input method and at last I get a pop-up composition window. Hooray! > > Of course, it could be inserting Elvish or Klingon (please tell me somebody has made a Klingon input method?) for all I know. Great! > If we want to make this accessible we?re going to need a much more precise description of what to do, or better yet a script. Sure. My instruction was mostly from memory and might confuse you more than necessary. (Sorry) There are books and web pages that people (including myself) look at but they are not still a single script that anybody can execute to have the environment going. Now you seem to have the composition window show up, you can try it in Scratch that is running under Japanese locale, and with the changes to the image, the composition window should show up where the cursor is, basically. (We can tweak the exact location of it; perhaps it might better go one line worth of height below where the cursor is.) Again I have not looked into all possible places in the Scratch related morphs where it makes sense to have it, but supporting those should now be just a matter of adding a line or two to those morphs' implementations. Thank you! -- -- Yoshiki From tim at rowledge.org Mon Jun 6 17:47:46 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 6 17:47:43 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> Message-ID: <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> > On 06-06-2016, at 10:35 AM, tim Rowledge wrote: > method and at last I get a pop-up composition window. Hooray! > ? except it doesn?t actually seem to input anything to the squeak text morph. Sigh. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IAM: Increase Amperage Above Maximum From Yoshiki.Ohshima at acm.org Mon Jun 6 17:52:29 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jun 6 17:52:32 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> Message-ID: On Mon, Jun 6, 2016 at 10:47 AM, tim Rowledge wrote: > >> On 06-06-2016, at 10:35 AM, tim Rowledge wrote: > >> method and at last I get a pop-up composition window. Hooray! >> > > ? except it doesn?t actually seem to input anything to the squeak text morph. Sigh. I think Squeak Text Morphs are broken for sometime, beside the fact that Squeak does have to load its own fonts. Scratch does the rendering with the OS feature (via UnicodePlugin) so that somehow works. -- -- Yoshiki From tim at rowledge.org Mon Jun 6 18:27:34 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 6 18:27:36 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> Message-ID: <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> > On 06-06-2016, at 10:52 AM, Yoshiki Ohshima wrote: > > On Mon, Jun 6, 2016 at 10:47 AM, tim Rowledge wrote: >> >>> On 06-06-2016, at 10:35 AM, tim Rowledge wrote: >> >>> method and at last I get a pop-up composition window. Hooray! >>> >> >> ? except it doesn?t actually seem to input anything to the squeak text morph. Sigh. > > I think Squeak Text Morphs are broken for sometime, beside the fact > that Squeak does have to load its own fonts. Scratch does the > rendering with the OS feature (via UnicodePlugin) so that somehow So far as I can tell even the Scratch code is simply not getting any input from the composition window; well except for very occasionally and not in any way that I can make a pattern out of yet. When it does the JIS-to-unicode convertor complains about the character value not being in its table. It?s very odd! I think all that I can do for now is look at making the the ST code you added a bit cleaner and wait for a proper config sequence/script. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- One clown short of a circus. From tim at rowledge.org Mon Jun 6 18:34:59 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 6 18:34:59 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> Message-ID: <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> > On 06-06-2016, at 11:27 AM, tim Rowledge wrote: > > So far as I can tell even the Scratch code is simply not getting any input from the composition window; well except for very occasionally and not in any way that I can make a pattern out of yet. When it does the JIS-to-unicode convertor complains about the character value not being in its table. It?s very odd! Sigh. Now it?s working ?properly? to the best of my knowledge. I can type stuff, it looks like probably Japanese script and goes into the sprite name field. Even adding text to the sprite seems to do the right thing, project notes.... OK, after hitting everything I can think of that might involve text entry in Scratch it looks good. So, how on earth did I get here? and can I ever get back to plain old en_GB? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: UDF: Use Disk for Frisbee From Yoshiki.Ohshima at acm.org Mon Jun 6 18:38:49 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jun 6 18:38:52 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <447BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> Message-ID: On Mon, Jun 6, 2016 at 11:34 AM, tim Rowledge wrote: > >> On 06-06-2016, at 11:27 AM, tim Rowledge wrote: >> >> So far as I can tell even the Scratch code is simply not getting any input from the composition window; well except for very occasionally and not in any way that I can make a pattern out of yet. When it does the JIS-to-unicode convertor complains about the character value not being in its table. It?s very odd! > > Sigh. I'd say "Yay!". Scratch specific Morphs such as StringFieldMorphs works okay, right? That convertor complains sounds like it is about the Squeak Text Morphs, that used to have m17n support (as opposed to i18n) but over the course of years it got broken. > Now it?s working ?properly? to the best of my knowledge. I can type stuff, it looks like probably Japanese script and goes into the sprite name field. Even adding text to the sprite seems to do the right thing, project notes.... OK, after hitting everything I can think of that might involve text entry in Scratch it looks good. Great! > So, how on earth did I get here? and can I ever get back to plain old en_GB? Do you have to? -- -- Yoshiki From tim at rowledge.org Mon Jun 6 20:19:49 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 6 20:19:47 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <4! 47BED30-1AD8-4136-8260-61EA2EFC3F0F@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> Message-ID: > On 06-06-2016, at 11:38 AM, Yoshiki Ohshima wrote: > >> So, how on earth did I get here? and can I ever get back to plain old en_GB? > > Do you have to? Well, yes. When I was a mid-teen (around the time that electricity was invented) I could make a faltering conversation in English, Welsh, French, German, Russian or Latin. These days I can mange English ok and can just about remember how to pronounce Welsh. You?ll note that coping with Japanese is not in either list ? It seems to me that we?ve fixed the VM ok, and we know how to start it correctly to use the new option. I?m not at all sure whether it is sensible to use the -compositioninput flag for anyone not wanting the popup window; should the scratch startup script do some working out to decide this? Should it be an option people can set? Automatic if the LANG is set to Japanese (and other languages)? It seems there is a fair bit of package loading required for anyone to have the required fonts and the ibus tools, so perhaps there should be a script/package to handle that and replace/modify the /bin/scratch script. I?m not at all sure about the script changes you posted May 25th, not because I have some reason to dislike them but I just don?t understand. I think my process was - - `sudo apt-get install ibus ibus-anthyttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname` - use raspi-config to set locale to ja_JP.UTF - edit /home/pi/.bashrc to add "export LANG=ja_jp.UTF8 export LC_ALL=$LANG export LANGUAGE=$LANG? to the end. -reboot. - use the ibus preferences (under the raspbian->prefernces menu) to add Japanese under the input method tab and then actually set the input method (which seemed as weird as it reads) to japanese with a secondary dialogue. - start Scratch, set Japanese as language - use the ibus icon at the right end of the raspbian menubar to set ?Anthy? (NOT Japanese) as the input And I *think* that was it. We have outline image code to make use of it, at least for Scratch (though I see that the composition window appears for me in ordinary browsers now) that needs tidying up. I can do that. Somebody what knows what they?re doing needs to produce a nice little shell script I can stick next to the timidity install script in /usr/share/scratch that will load everything and configure it correctly. I can?t imagine the above complications working too wwell in a classroom. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IXM: Initiate X-rated error Messages From Yoshiki.Ohshima at acm.org Mon Jun 6 21:00:13 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Jun 6 21:00:16 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <97A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> Message-ID: On Mon, Jun 6, 2016 at 1:19 PM, tim Rowledge wrote: > >> On 06-06-2016, at 11:38 AM, Yoshiki Ohshima wrote: >> >>> So, how on earth did I get here? and can I ever get back to plain old en_GB? >> >> Do you have to? > > Well, yes. When I was a mid-teen (around the time that electricity was invented) I could make a faltering conversation in English, Welsh, French, German, Russian or Latin. These days I can mange English ok and can just about remember how to pronounce Welsh. You?ll note that coping with Japanese is not in either list ? Oh, sorry. I was facetious but not helpful. > > It seems to me that we?ve fixed the VM ok, and we know how to start it correctly to use the new option. I?m not at all sure whether it is sensible to use the -compositioninput flag for anyone not wanting the popup window; should the scratch startup script do some working out to decide this? Yes. The patch to the scratch script I sent to checks the environment variable XIM, and passes the -compositioninput flag only when there is a spec for it. (connecting to XIM may still fail when a server like ibus is not running, but I think Squeak VM is smart enough to handle it. > Should it be an option people can set? Automatic if the LANG is set to Japanese (and other languages)? It seems there is a fair bit of package loading required for anyone to have the required fonts and the ibus tools, so perhaps there should be a script/package to handle that and replace/modify the /bin/scratch script. I?m not at all sure about the script changes you posted May 25th, not because I have some reason to dislike them but I just don?t understand. Hmm, ok. The change to the shell script may look more complicated, but that is because the logic in the (modified) /usr/bin/squeak was included there and we can bypass /usr/bin/squeak altogether. Otherwise it just checks the XIM environment variable. > I think my process was - > - `sudo apt-get install ibus ibus-anthyttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname` > - use raspi-config to set locale to ja_JP.UTF > - edit /home/pi/.bashrc to add > "export LANG=ja_jp.UTF8 > export LC_ALL=$LANG > export LANGUAGE=$LANG? > to the end. > -reboot. > - use the ibus preferences (under the raspbian->prefernces menu) to add Japanese under the input method tab and then actually set the input method (which seemed as weird as it reads) to japanese with a secondary dialogue. > - start Scratch, set Japanese as language > - use the ibus icon at the right end of the raspbian menubar to set ?Anthy? (NOT Japanese) as the input > > And I *think* that was it. There can be different state such as have ibus installed but not running, have japanese fonts installed but LANG is not using them, etc. As long as LANG and LC_ALL are en_GB.UTF8, there is no harm for English users I believe). > We have outline image code to make use of it, at least for Scratch (though I see that the composition window appears for me in ordinary browsers now) that needs tidying up. I can do that. Somebody what knows what they?re doing needs to produce a nice little shell script I can stick next to the timidity install script in /usr/share/scratch that will load everything and configure it correctly. I can?t imagine the above complications working too wwell in a classroom. Installing the ibus package would do it but for those who don't do that, it should be fine. (And you can remove it by apt-get uninstall ibus). -- -- Yoshiki From tim at rowledge.org Tue Jun 7 00:36:17 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jun 7 00:36:15 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <9! 7A8EEF7-2520-47D7-B57C-82BFA8DC9633@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> Message-ID: <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> > On 06-06-2016, at 2:00 PM, Yoshiki Ohshima wrote: > > On Mon, Jun 6, 2016 at 1:19 PM, tim Rowledge wrote: >> >>> On 06-06-2016, at 11:38 AM, Yoshiki Ohshima wrote: >>> >>>> So, how on earth did I get here? and can I ever get back to plain old en_GB? >>> >>> Do you have to? >> >> Well, yes. When I was a mid-teen (around the time that electricity was invented) I could make a faltering conversation in English, Welsh, French, German, Russian or Latin. These days I can mange English ok and can just about remember how to pronounce Welsh. You?ll note that coping with Japanese is not in either list ? > > Oh, sorry. I was facetious but not helpful. That?s ok - I was being a little sarcastic too. It amazes me that humans can handle such a range of language features. I mean the the only two things I can think of the Japanese and English have in common is that humans use them and both are time-forward grammar. Welsh is fun because it has a few extra items in the alphabet but nothing scary looking - and it?s perfectly phonetic in both directions. Russian was interesting to try out because of the different alphabet, though it?s still nothing like the change to ideographic languages. Scratch does a decent job of handling the fonts via CairoPango & your UTF work, and even deals with right-to-left text ok. Please, don?t anyone ask me for boustrophedon support. >> >> It seems to me that we?ve fixed the VM ok, and we know how to start it correctly to use the new option. I?m not at all sure whether it is sensible to use the -compositioninput flag for anyone not wanting the popup window; should the scratch startup script do some working out to decide this? > > Yes. The patch to the scratch script I sent to checks the environment > variable XIM, and passes the -compositioninput flag only when there is > a spec for it. That would be the - if echo $XMODIFIERS | grep '@im=' > /dev/null; then + VMOPTIONS="$VMOPTIONS -compositioninput" + fi + changes? Could you send me the plain file? I just don?t get the unix diff format and it?s much easier for me to compare manually. I?ve just noticed that attempting numeric input appears not to work because instead of a 0 character I get a 65296 (apparently unicode ?full width 0?) char. www.codetable.net tells me there are fullwidth digits and halfwidth digits and I bet buried in there somewhere are half-wits. Thankfully it seems {big number} asCharacter digitValue does a good enough job of getting the number value and then we just have to more explicitly check for - and . If you take a look at StringFieldMorph>insertCharacter: you?ll see where the problem lies easily enough. To my amazement I can actually enter numbers and the arithmetic gets sorted out ok. Good job somebody! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Dukedom: aristocratic birth control From commits at source.squeak.org Tue Jun 7 00:58:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 7 00:58:29 2016 Subject: [squeak-dev] The Trunk: Morphic-tpr.1168.mcz Message-ID: tim Rowledge uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tpr.1168.mcz ==================== Summary ==================== Name: Morphic-tpr.1168 Author: tpr Time: 6 June 2016, 5:57:35.057325 pm UUID: 25f07e8c-1f07-4c6f-86af-82ada954a115 Ancestors: Morphic-mt.1167 make the preferred position for compositing input window take into account any effect of height offset. Why work out the position and then modify it with ugly code when you can do it right first time? =============== Diff against Morphic-mt.1167 =============== Item was changed: ----- Method: TextMorph>>preferredKeyboardPosition (in category 'editing') ----- preferredKeyboardPosition - | default rects | + default := (self bounds: self bounds in: World) topLeft. + paragraph + ifNil: [^ default]. - default := (self bounds: self bounds in: World) topLeft. - paragraph ifNil: [^ default]. rects := paragraph selectionRects. + rects size = 0 + ifTrue: [^ default]. + ^ rects first bottomLeft! - rects size = 0 ifTrue: [^ default]. - ^ rects first topLeft. - - "^ (self bounds: self bounds in: World) topLeft." - ! Item was changed: ----- Method: TextMorphForEditView>>preferredKeyboardPosition (in category 'event handling') ----- preferredKeyboardPosition | pos | pos := super preferredKeyboardPosition. + ^ pos + (self boundsInWorld) topLeft. - ^ pos + (self bounds: self bounds in: World) topLeft. ! From commits at source.squeak.org Tue Jun 7 00:59:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 7 00:59:43 2016 Subject: [squeak-dev] The Trunk: Multilingual-tpr.214.mcz Message-ID: tim Rowledge uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-tpr.214.mcz ==================== Summary ==================== Name: Multilingual-tpr.214 Author: tpr Time: 6 June 2016, 5:59:22.145354 pm UUID: 221bdccd-de05-41df-a529-c2ad22dd7762 Ancestors: Multilingual-topa.213 make the preferred position for compositing input window take into account any effect of height offset. Why work out the position and then modify it with ugly code when you can do it right first time? See also Morphic-tpr.1168 =============== Diff against Multilingual-topa.213 =============== Item was changed: ----- Method: ImmX11>>keyboardFocusForAMorph: (in category 'keyboard') ----- keyboardFocusForAMorph: aMorph aMorph ifNil: [^ self]. [ | left bottom pos | pos := aMorph preferredKeyboardPosition. left := (pos x min: Display width max: 0) asInteger. + bottom := (pos y min: Display height max: 0) asInteger. - bottom := (pos y min: Display height max: 0) asInteger - + (aMorph paragraph - characterBlockForIndex: aMorph editor selectionInterval first) height. self setCompositionWindowPositionX: left y: bottom ] on: Error do: [:ex |]. ! From Yoshiki.Ohshima at acm.org Tue Jun 7 01:22:27 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue Jun 7 01:22:32 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> Message-ID: On Mon, Jun 6, 2016 at 5:36 PM, tim Rowledge wrote: >> Yes. The patch to the scratch script I sent to checks the environment >> variable XIM, and passes the -compositioninput flag only when there is >> a spec for it. > > That would be the - > if echo $XMODIFIERS | grep '@im=' > /dev/null; then > + VMOPTIONS="$VMOPTIONS -compositioninput" > + fi > + > changes? Yes. (And for that matter, the part that figures out the LD_LIBRARY_PATH may be simplified as there is only one architecture involved on RasPi). > Could you send me the plain file? I just don?t get the unix diff format and it?s much easier for me to compare manually. I don't have the access to the hardware right away... You can: cp /usr/bin/scratch ~/ cd ~ patch -p0 < scratch.diff and ~/scratch should become the file it is intended to be. > I?ve just noticed that attempting numeric input appears not to work because instead of a 0 character I get a 65296 (apparently unicode ?full width 0?) char. www.codetable.net tells me there are fullwidth digits and halfwidth digits and I bet buried in there somewhere are half-wits. Thankfully it seems {big number} asCharacter digitValue does a good enough job of getting the number value and then we just have to more explicitly check for - and . If you take a look at StringFieldMorph>insertCharacter: you?ll see where the problem lies easily enough. To my amazement I can actually enter numbers and the arithmetic gets sorted out ok. Good job somebody! That was my old attempt to keep the DecimalProperty of Unicode table... -- -- Yoshiki From Marcel.Taeumel at hpi.de Tue Jun 7 06:25:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 7 07:03:45 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> Message-ID: <1465280722212-4899504.post@n4.nabble.com> Chris Muller-3 wrote > It makes scrolling very choppy. Instead of scrolling by 3-lines at a > time, it scrolls by about 10... > > Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by > mouseOverForKeyboardFocus? > > On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> Hi, there. >> >> Here is a change set that adds MouseWheelEvent and everything related to >> it >> (including EventHandler): >> mouse-wheel-events.cs >> <http://forum.world.st/file/n4899428/mouse-wheel-events.cs> >> >> You have two new preferences (in "Morphic", "keyboard", "mouse" >> categories): >> >> [x] Synthesize Mouse Wheel Events from Keyboard Events >> [x] Send Mouse Wheel Events to Keyboard Focus >> >> Both are enabled by default. >> >> I refactored the old-style wheel scrolling to use an event filter in >> ScrollPane but this is regarded a fall-back only and can be used for old >> applications. >> >> The mouse wheel event synthesis is implemented as keyboard event capture >> filter in HandMorph itself. See the changeset's postload script or >> HandMorph >>>> #initForEvents. Once our VMs deliver real mouse wheel events, we can >> change that and adapt HandMorph >> #generateMouseEvent:. >> >> The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used >> to >> switch between Windows and OS X behavior. >> >> Please, try it out. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Hi Chris, there should be no change in the observable behavior by this change. In my image, it still scrolls 3 text lines in a text morph and 3 items in a list morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane >> #scrollByKeyboard:). Could you please inspect the vertical scrollbar of one text morph and one list morph and tell me the value of "scrollDelta"? And, if you have time, could you try it in a fresh Squeak Trunk image? You are working under Ubuntu Linux? If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse Wheel to Keyboard Focus" has no effect because the keyboard focus is always where the mouse cursor is. However, there are many users that do disable #mouseOverForKeyboardFocus and wished for the Mac behavior for a very long time. Bert, for example. Now, you can make scrolling by mouse wheel behave like on the Mac: [ ] mouseOverForKeyboardFocus [x] Send Mouse Wheel Events to Keyboard Focus [x] Synthesize Mouse Wheel Events from Keyboard Events Best, Marcel -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899504.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Jun 7 07:04:26 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 7 07:42:49 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> <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> Message-ID: <1465283066384-4899517.post@n4.nabble.com> Chris Muller-3 wrote > -1. No ghost grabbing please. Squeak is not Windows 10. Window > contents don't overlap with the grips. The close-box is not > "content". > > Changing the mouse to resize shape when one is adjacent to the resizer > just plain looks like a bug. The environment should have a > "physicality" to it that users can relate to. No one clicks *next* to > something to grab it. > > Why does Microsoft continue to pursue such insanity? Too much > overdesign zeal? The big tablet dumb-down? They turn one UI feature > into a problem, and then they gotta "solve" it, by introducing another > problem... Like what happened with those disasterous "auto maximize" > features in Windows 8 / Ubuntu Unity. The same was already available > by clicking maximize and then sizing the window down along 1 dimension > which is flexible, easy and consistent with the existing window > management gestures. > > On Sun, Jun 5, 2016 at 12:44 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> Bert Freudenberg wrote >>>> On 25.03.2016, at 19:28, tim Rowledge < >> >>> tim@ >> >>> > wrote: >>>> >>>> >>>>> On 25-03-2016, at 7:56 AM, Bert Freudenberg < >> >>> bert@ >> >>> > 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 >>> >>> Well, almost. I just noticed that in the 5.0 All-in-One-VM the Mac >>> corner >>> grip is visible, and *only* affects the lower right window corner: >>> >>> >>> >>> ... whereas in a 5.0.3602 Spur VM the grips are invisible and in both >>> lower-left and lower-right corners. >>> >>> Is this a difference between Carbon and Cocoa VMs, maybe? >>> >>> - Bert - >>> >>> >>> >>> >>> >>> PastedGraphic-1.png (7K) >>> <http://forum.world.st/attachment/4886719/0/PastedGraphic-1.png> >>> smime.p7s (5K) >>> <http://forum.world.st/attachment/4886719/1/smime.p7s> >> >> Hi, there. >> >> In Windows 10, the grab handles are outside the (resp. adjacent to) >> windows >> and reside in the drop shadow. Since there are no window borders anymore >> in >> Windows 10, the window contents would otherwise overlap with the grips. >> This >> holds also for the corner grips. >> >> I think we should also move our grips to the outside if SystemWindow >> borders >> are too small. The only draw back would be that full-screen windows >> cannot >> be resized anymore. Should they anyway? Maximized means maximized. :-) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4899235.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Hi Chris, after reading your response several times to look for some useful feedback, I think I actually found some. Here is what I found: 1. It is advisable to make suggestions about changes to Squeak without referring to systems were many people have mixed feelings about. A somewhat neutral and objective perspective is more likely to foster fruitful discussions. 2. Squeak's windows do have borders where the resize grips perfectly fit in without covering the window's contents or control buttons. There is no need to move the grips to the outside of the window. 3. From a user perspective, Squeak's resize grips have a visual representation, which is the window border itself. 4. The shadow of a window is not part of the window. A click into the shadow of a window means clicking next to it or behind it. While I totally agree with the points 1 and 2, I kind of disagree with 3 and 4. However, this is just my personal experience. I am not aware of any studies that confirm or refute these statements. Now, just for a moment, let's think about and discuss zero-border windows. Apple's Mac OS has been having them for a long time. Once, there was only the grip in the bottom right corner to resize a window. Nowadays, there are also grips for the edges. Tobias showed me that in a recent version and it seems that the edge grips partially overlap the window contents because there is no window border. They do, however, not really really into the window's shadow. Anyway, the grips do not have a visual representation other than the changing mouse cursor when hovering over them. Looking at the OS X Human Interface Guidelines, grips are only mentioned very briefly: https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowAppearanceBehavior.html Microsoft's Windows 10 reduced window borders down to a single pixel. It looks like the window borders in Mac OS X. The grips, however, do not overlap with the window contents but reach into the window's drop shadow. In my daily experience, I had no troubles resizing windows via the grips. I have no real experience with Ubuntu/Linux (resp. Gnome, KDE, ...). *~*~*~* Why was I writing about this? About a year ago, I refactored some magic numbers to make the border thickness of Squeak's windows configurable. Especially in the face of Hi-DPI, this should work to provide bigger borders in the sense of pixels to keep their effective size similar. Then I thought: "Why does there have to be a border at all?" ... when it might be used for real content instead. But what about the window grips? If they would overlap the content, it would be somewhat annoying. Then I discovered the way Windows 10 does it, and I liked it. That's it. Thanks for your time. Best, Marcel -- View this message in context: http://forum.world.st/Impossible-to-grab-the-scroll-bar-in-the-Transcript-if-tp4886210p4899517.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Jun 7 10:46:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 7 10:46:51 2016 Subject: [squeak-dev] The Trunk: Collections-ul.698.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.698.mcz ==================== Summary ==================== Name: Collections-ul.698 Author: ul Time: 2 June 2016, 11:47:32.688405 pm UUID: cf02bd5c-5cfa-499c-88df-c00ae1760a38 Ancestors: Collections-ul.697 Heap revamp #3: - Heap is a subclass of Collection instead of SequenceableCollection. - Heap has it's own category Collections-Heap; just like how it is with Stack. - Updated class comment. =============== Diff against Collections-ul.697 =============== Item was changed: SystemOrganization addCategory: #'Collections-Abstract'! SystemOrganization addCategory: #'Collections-Arrayed'! SystemOrganization addCategory: #'Collections-Cache'! SystemOrganization addCategory: #'Collections-Exceptions'! SystemOrganization addCategory: #'Collections-Sequenceable'! SystemOrganization addCategory: #'Collections-Stack'! SystemOrganization addCategory: #'Collections-Streams'! SystemOrganization addCategory: #'Collections-Strings'! SystemOrganization addCategory: #'Collections-Support'! SystemOrganization addCategory: #'Collections-Text'! SystemOrganization addCategory: #'Collections-Unordered'! SystemOrganization addCategory: #'Collections-Weak'! + SystemOrganization addCategory: #'Collections-Heap'! Item was changed: + Collection subclass: #Heap - SequenceableCollection subclass: #Heap instanceVariableNames: 'array tally sortBlock indexUpdateBlock' classVariableNames: '' poolDictionaries: '' + category: 'Collections-Heap'! - category: 'Collections-Sequenceable'! + !Heap commentStamp: 'ul 6/2/2016 23:45' prior: 0! + I implement a special data structure called Binary Heap [ https://en.wikipedia.org/wiki/Binary_heap ], which is the most commonly used variant of the Heap data structure [ https://en.wikipedia.org/wiki/Heap_%28data_structure%29 ]. - !Heap commentStamp: 'nice 9/30/2010 23:22' prior: 0! - Class Heap implements a special data structure commonly referred to as 'heap' [ http://en.wikipedia.org/wiki/Heap_%28data_structure%29 ] A Heap is a kind of binary tree stored in a linear array - see details after the instance variables description. Heaps are good at handling priority queues because: 1) greatest priority element according to the sort block will be stored in first position and thus accessed in O(1) operations 2) worse time for inserting or removing an element is in O(log n) operations, where n is the size of the Heap Insertion/Removal times are more efficient than above upper bound, provided that: a) Elements are only removed at the beginning b) Elements are added with arbitrary sort order. 3) there is no need to fully sort the Heap, which makes it more efficient than a SortedCollection + The heap can be fully sorted by sending the message #sort. - The heap can be fully sorted by sending the message #fullySort. Worse time for fully sorting the Heap is in O(n log n) operations, but this is rarely used a feature. Remind that the Heap does not fully sort the collection if you don't ask. Thus don't expect #do: and other iterators to enumerate elements according to the sortBlock order. Instance variables: + array The data repository - array The data repository tally The number of elements in the heap sortBlock A two-argument block defining the sort order, or nil in which case the default sort order is [:element1 :element2| element1 <= element2] indexUpdateBlock A two-argument block of the form [:data :index | ... ] which allows an application object to keep track of its index within the heap. Useful for quick heap update when object's sort value changes (for example, when an object in a priority queue has its priority increased by an external event, you don't want to have to search through the whole heap to find the index before fixing the heap). No update occurs if nil. The Heap can be viewed as a binary tree (every node in the tree has at most two children). The root is stored in first slot of internal array. The children are stored in next two slots. The children of children in next four slots. etc... For a node A of index i (1 based), the two children B1 and B2 are thus stored in indices (2*i) and (2*i+1). Of course, the children indices must be less than the tally otherwise they are considered inexistent. The Heap does arrange to preserve the following invariant: + For any children B of a node A, A is sorted before B, in other words, (sortBlock value: A value: B) = true - For any children B of a node A, A is sorted before B, in other words, (self sort: A before: B) = true This implies that the root is always the first element according to sort order. ! From pbpublist at gmail.com Tue Jun 7 11:04:33 2016 From: pbpublist at gmail.com (Phil (list)) Date: Tue Jun 7 11:04:38 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? Message-ID: <1465297473.2922.114.camel@gmail.com> Does anyone happen to know what version(s) of the Squeak image and VM the STEPS packages at?http://tinlizzie.org/updates/exploratory/packages /?work with? Thanks, Phil From bert at freudenbergs.de Tue Jun 7 11:14:31 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Jun 7 11:14:33 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: <1465297473.2922.114.camel@gmail.com> References: <1465297473.2922.114.camel@gmail.com> Message-ID: <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> On 07.06.2016, at 13:04, Phil (list) wrote: > > Does anyone happen to know what version(s) of the Squeak image and VM > the STEPS packages at http://tinlizzie.org/updates/exploratory/packages > / work with? It was a 4.3 based trunk image updated to update-bf.217.mcm (by way of FrankUpdater>>systemRelease in the Grease package). The VM was a Croquet Cog 4.0 one with the Gezira and Worlds plugins. - 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/20160607/6e180b73/smime.bin From pbpublist at gmail.com Tue Jun 7 11:26:07 2016 From: pbpublist at gmail.com (Phil (list)) Date: Tue Jun 7 11:26:12 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> References: <1465297473.2922.114.camel@gmail.com> <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> Message-ID: <1465298767.2922.118.camel@gmail.com> On Tue, 2016-06-07 at 13:14 +0200, Bert Freudenberg wrote: > On 07.06.2016, at 13:04, Phil (list) wrote: > > > > > > Does anyone happen to know what version(s) of the Squeak image and > > VM > > the STEPS packages at http://tinlizzie.org/updates/exploratory/pack > > ages > > / work with? > > It was a 4.3 based trunk image updated to update-bf.217.mcm (by way > of FrankUpdater>>systemRelease in the Grease package). > Bert,? Thanks, that's quite helpful! > The VM was a Croquet Cog 4.0 one with the Gezira and Worlds plugins. > I didn't know there was such a beast (i.e. a Croquet Cog VM)... is that something I can download somewhere along with the plugins or was it a custom build? > - Bert - > > > From bert at freudenbergs.de Tue Jun 7 11:36:03 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Jun 7 11:36:07 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: <1465298767.2922.118.camel@gmail.com> References: <1465297473.2922.114.camel@gmail.com> <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> <1465298767.2922.118.camel@gmail.com> Message-ID: <51408873-D53D-4C3A-9254-33B15BE5F414@freudenbergs.de> On 07.06.2016, at 13:26, Phil (list) wrote: > > On Tue, 2016-06-07 at 13:14 +0200, Bert Freudenberg wrote: >> On 07.06.2016, at 13:04, Phil (list) wrote: >>> >>> >>> Does anyone happen to know what version(s) of the Squeak image and >>> VM >>> the STEPS packages at http://tinlizzie.org/updates/exploratory/pack >>> ages >>> / work with? >> >> It was a 4.3 based trunk image updated to update-bf.217.mcm (by way >> of FrankUpdater>>systemRelease in the Grease package). >> > > Bert, > > Thanks, that's quite helpful! > >> The VM was a Croquet Cog 4.0 one with the Gezira and Worlds plugins. >> > > I didn't know there was such a beast (i.e. a Croquet Cog VM)... is that > something I can download somewhere along with the plugins or was it a > custom build? Any newer Cog (pre-Spur) VM should be fine. Cog started as a project sponsored by Qwaq who developed a professional collaboration tool based on Croquet (later renamed to Teleplace and now called Terf by 3DICC). - 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/20160607/fda447e4/smime.bin From Yoshiki.Ohshima at acm.org Tue Jun 7 16:35:52 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue Jun 7 16:36:02 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <7956D0A9-4B3D-43B2-B5F9-4C304F8D7641@rowledge.org> <1625F308-347F-4BAE-9320-C537D6A2926F@rowledge.org> <87D463B2-0B43-4459-86F8-9D443E7E3672@rowledge.org> <1F7B3995-7E08-4478-B1EC-5D0273569057@rowledge.org> <1BB917F1-B774-48BC-B46C-B4DD61A65F94@rowledge.org> <6688F519-D4EC-4C39-AFE2-3BDC967C48E2@rowledge.org> Message-ID: Here is a simpler version of the scratch shell script that is not in the diff form: On Mon, Jun 6, 2016 at 6:22 PM, Yoshiki Ohshima wrote: > On Mon, Jun 6, 2016 at 5:36 PM, tim Rowledge wrote: >>> Yes. The patch to the scratch script I sent to checks the environment >>> variable XIM, and passes the -compositioninput flag only when there is >>> a spec for it. >> >> That would be the - >> if echo $XMODIFIERS | grep '@im=' > /dev/null; then >> + VMOPTIONS="$VMOPTIONS -compositioninput" >> + fi >> + >> changes? > > Yes. (And for that matter, the part that figures out the > LD_LIBRARY_PATH may be simplified as there is only one architecture > involved on RasPi). > >> Could you send me the plain file? I just don?t get the unix diff format and it?s much easier for me to compare manually. > > I don't have the access to the hardware right away... You can: > > cp /usr/bin/scratch ~/ > cd ~ > patch -p0 < scratch.diff > > and ~/scratch should become the file it is intended to be. > >> I?ve just noticed that attempting numeric input appears not to work because instead of a 0 character I get a 65296 (apparently unicode ?full width 0?) char. www.codetable.net tells me there are fullwidth digits and halfwidth digits and I bet buried in there somewhere are half-wits. Thankfully it seems {big number} asCharacter digitValue does a good enough job of getting the number value and then we just have to more explicitly check for - and . If you take a look at StringFieldMorph>insertCharacter: you?ll see where the problem lies easily enough. To my amazement I can actually enter numbers and the arithmetic gets sorted out ok. Good job somebody! > > That was my old attempt to keep the DecimalProperty of Unicode table... > > > -- > -- Yoshiki -- -- Yoshiki -------------- next part -------------- A non-text attachment was scrubbed... Name: scratch Type: application/octet-stream Size: 3873 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160607/ec55ecaf/scratch.obj From asqueaker at gmail.com Tue Jun 7 17:29:07 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 7 17:29:49 2016 Subject: [squeak-dev] Re: Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <1465283066384-4899517.post@n4.nabble.com> References: <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> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> <1465283066384-4899517.post@n4.nabble.com> Message-ID: > after reading your response several times to look for some useful feedback, > I think I actually found some. Here is what I found: LOL! Okay. Thanks for understanding that I'm passionate about proposals which I consider to erode the multi-windowing UI metaphor. > 1. It is advisable to make suggestions about changes to Squeak without > referring to systems were many people have mixed feelings about. A somewhat > neutral and objective perspective is more likely to foster fruitful > discussions. > > 2. Squeak's windows do have borders where the resize grips perfectly fit in > without covering the window's contents or control buttons. There is no need > to move the grips to the outside of the window. > > 3. From a user perspective, Squeak's resize grips have a visual > representation, which is the window border itself. > > 4. The shadow of a window is not part of the window. A click into the shadow > of a window means clicking next to it or behind it. > > While I totally agree with the points 1 and 2, I kind of disagree with 3 and > 4. However, this is just my personal experience. I am not aware of any > studies that confirm or refute these statements. > > Now, just for a moment, let's think about and discuss zero-border windows. > > Apple's Mac OS has been having them for a long time. Once, there was only > the grip in the bottom right corner to resize a window. Nowadays, there are > also grips for the edges. Tobias showed me that in a recent version and it > seems that the edge grips partially overlap the window contents because > there is no window border. They do, however, not really really into the > window's shadow. Anyway, the grips do not have a visual representation other > than the changing mouse cursor when hovering over them. Looking at the OS X > Human Interface Guidelines, grips are only mentioned very briefly: > https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/WindowAppearanceBehavior.html > > Microsoft's Windows 10 reduced window borders down to a single pixel. It > looks like the window borders in Mac OS X. The grips, however, do not > overlap with the window contents but reach into the window's drop shadow. In > my daily experience, I had no troubles resizing windows via the grips. > > I have no real experience with Ubuntu/Linux (resp. Gnome, KDE, ...). Ubuntu 14.04 default settings do the same thing Windows does -- make resizing grips well beyond the outer edge of the window -- which is incredibly annoying, because 1) it interferes with the content and/or edges of adjacent windows, which I sometimes want to interact with (or resize to be closely side-by-side), but can't because it keeps grabbing the resizer of the window which I'm not even clicking because, 2) it has defied the physicality of the environment (this is what I referred to as the "insanity"), and established a new paradigm to the user that there are "invisible regions" on the screen which are actually sensitive to input. > Why was I writing about this? About a year ago, I refactored some magic > numbers to make the border thickness of Squeak's windows configurable. > Especially in the face of Hi-DPI, this should work to provide bigger borders > in the sense of pixels to keep their effective size similar. That sounds good.. > Then I thought: > "Why does there have to be a border at all?" ... when it might be used for > real content instead. But what about the window grips? If they would overlap > the content, it would be somewhat annoying. Then I discovered the way > Windows 10 does it, and I liked it. Invisible grips are gonna overlap either to the inside or the outside right? Making the assumption that overlapping to the outside triggers my sensitivity about this subject, because it assumes and encourages that modal-thinking revolution. IMO, we should stand strong against that and show the world what Smalltalk showed them 33 years ago -- windows are visible and physical, and present an object-centric interface (rather than command-centric) which, unlike tablet interfaces, allows seamless integration of disparate domains. Best, Chris From pbpublist at gmail.com Tue Jun 7 19:07:20 2016 From: pbpublist at gmail.com (Phil (list)) Date: Tue Jun 7 19:07:26 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: <51408873-D53D-4C3A-9254-33B15BE5F414@freudenbergs.de> References: <1465297473.2922.114.camel@gmail.com> <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> <1465298767.2922.118.camel@gmail.com> <51408873-D53D-4C3A-9254-33B15BE5F414@freudenbergs.de> Message-ID: <1465326440.2922.133.camel@gmail.com> On Tue, 2016-06-07 at 13:36 +0200, Bert Freudenberg wrote: > On 07.06.2016, at 13:26, Phil (list) wrote: > >? > > > > Does anyone happen to know what version(s) of the Squeak image > > > > and > > > > VM > > > > the STEPS packages at http://tinlizzie.org/updates/exploratory/ > > > > pack > > > > ages > > > > / work with? > > > It was a 4.3 based trunk image updated to update-bf.217.mcm (by > > > way > > > of FrankUpdater>>systemRelease in the Grease package). A follow-up question: once updated using FrankUpater #updateFromSystemRepository, is loading Frank via the latest .mcm the way to go (i.e. exploratory/packages/update-yo.54.mcm) or an alternative approach suggested? ? My first attempt resulted in OMeta attempting to load out of order (postload before preload) and an undefined method (on LObject, iirc) so I'm thinking that either the load configuration is a bit out of date/broken or there's an alternate way I should be doing things? > Cog started as a project sponsored by Qwaq who developed a > professional collaboration tool based on Croquet (later renamed to > Teleplace and now called Terf by 3DICC). > I was familiar with some of the history but don't think I'd heard it referred to as the Croquet Cog VM before. (i.e. I only recall it being called just the Cog VM) From asqueaker at gmail.com Tue Jun 7 19:50:39 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 7 19:51:21 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: <1465280722212-4899504.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> Message-ID: Hi, > there should be no change in the observable behavior by this change. In my > image, it still scrolls 3 text lines in a text morph and 3 items in a list > morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane >> > #scrollByKeyboard:). Could you please inspect the vertical scrollbar of one > text morph and one list morph and tell me the value of "scrollDelta"? 16 and 14, respectively. > And, > if you have time, could you try it in a fresh Squeak Trunk image? You are > working under Ubuntu Linux? Yep. > If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse Wheel > to Keyboard Focus" has no effect because the keyboard focus is always where > the mouse cursor is. However, there are many users that do disable > #mouseOverForKeyboardFocus and wished for the Mac behavior for a very long > time. Bert, for example. Now, you can make scrolling by mouse wheel behave > like on the Mac: > > [ ] mouseOverForKeyboardFocus > [x] Send Mouse Wheel Events to Keyboard Focus > [x] Synthesize Mouse Wheel Events from Keyboard Events Ah, okay, I can see it would slightly alleviates the pain of click-for-focus. It seemed strange for a moment to imagine why the wheel should scrol one list, but use of the arrows or filtering keys would be directed to a different widget. From bert at freudenbergs.de Tue Jun 7 19:56:09 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Jun 7 19:56:15 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: <1465326440.2922.133.camel@gmail.com> References: <1465297473.2922.114.camel@gmail.com> <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> <1465298767.2922.118.camel@gmail.com> <51408873-D53D-4C3A-9254-33B15BE5F414@freudenbergs.de> <1465326440.2922.133.camel@gmail.com> Message-ID: On 07.06.2016, at 21:07, Phil (list) wrote: > > On Tue, 2016-06-07 at 13:36 +0200, Bert Freudenberg wrote: >> On 07.06.2016, at 13:26, Phil (list) wrote: >>> >>>>> Does anyone happen to know what version(s) of the Squeak image >>>>> and >>>>> VM >>>>> the STEPS packages at http://tinlizzie.org/updates/exploratory/ >>>>> pack >>>>> ages >>>>> / work with? >>>> It was a 4.3 based trunk image updated to update-bf.217.mcm (by >>>> way >>>> of FrankUpdater>>systemRelease in the Grease package). > > A follow-up question: once updated using FrankUpater > #updateFromSystemRepository, is loading Frank via the latest .mcm the > way to go (i.e. exploratory/packages/update-yo.54.mcm) or an > alternative approach suggested? My first attempt resulted in OMeta > attempting to load out of order (postload before preload) and an > undefined method (on LObject, iirc) so I'm thinking that either the > load configuration is a bit out of date/broken or there's an alternate > way I should be doing things? Don?t remember to be honest ... Looks like an ordering bug we didn?t notice because we didn?t rebuild our images but just updated them ... Maybe load OMeta-Preload manually first? >> Cog started as a project sponsored by Qwaq who developed a >> professional collaboration tool based on Croquet (later renamed to >> Teleplace and now called Terf by 3DICC). >> > > I was familiar with some of the history but don't think I'd heard it > referred to as the Croquet Cog VM before. (i.e. I only recall it being > called just the Cog VM) The difference is probably just the name and icon. - 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/20160607/e1692166/smime.bin From pbpublist at gmail.com Tue Jun 7 20:16:18 2016 From: pbpublist at gmail.com (Phil (list)) Date: Tue Jun 7 20:16:24 2016 Subject: [squeak-dev] Squeak image and VM version for STEPS packages? In-Reply-To: References: <1465297473.2922.114.camel@gmail.com> <2F0AA1FE-500F-4B3C-B9C9-A775F60E09D9@freudenbergs.de> <1465298767.2922.118.camel@gmail.com> <51408873-D53D-4C3A-9254-33B15BE5F414@freudenbergs.de> <1465326440.2922.133.camel@gmail.com> Message-ID: <1465330578.2922.138.camel@gmail.com> On Tue, 2016-06-07 at 21:56 +0200, Bert Freudenberg wrote: > On 07.06.2016, at 21:07, Phil (list) wrote: > > A follow-up question: once updated using FrankUpater > > #updateFromSystemRepository, is loading Frank via the latest .mcm > > the > > way to go (i.e. exploratory/packages/update-yo.54.mcm) or an > > alternative approach suggested????My first attempt resulted in > > OMeta > > attempting to load out of order (postload before preload) and an > > undefined method (on LObject, iirc) so I'm thinking that either the > > load configuration is a bit out of date/broken or there's an > > alternate > > way I should be doing things? > Don?t remember to be honest ... Looks like an ordering bug we didn?t > notice because we didn?t rebuild our images but just updated them ... > Maybe load OMeta-Preload manually first? Fair enough... just figured I'd ask in case it was something simple I was overlooking. ?Yes, the OMeta ordering was pretty straightforward. ?You've given me a good starting point and I can work through the remaining loading issues. From tim at rowledge.org Tue Jun 7 20:58:36 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jun 7 20:58:34 2016 Subject: [squeak-dev] HostWindow on unix appears to work, at least on Pi Message-ID: I finally got around to building the host window plugin for the Pi builds and the good news is that it works for all the simple tests I?ve tried so far. Manually setting the window handle to 1 makes it possible to query, move, retitle and resize the main window. This is all good. It?s a long time since the last questions about this that I can find any record of (much longer than I thought!) but at least I know it works. I don?t suppose anyone has built a suitable unix host window proxy that I simply haven?t spotted yet? IIRC we were discussing using these prims to handle window resizing and title setting instead of whatever is in place right now? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim fibula: noun, 'a small lie' From commits at source.squeak.org Tue Jun 7 21:56:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 7 21:56:59 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160607215658.20100.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-June/068191.html Name: Morphic-tpr.1168 Ancestors: Morphic-mt.1167 make the preferred position for compositing input window take into account any effect of height offset. Why work out the position and then modify it with ugly code when you can do it right first time? ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068192.html Name: Multilingual-tpr.214 Ancestors: Multilingual-topa.213 make the preferred position for compositing input window take into account any effect of height offset. Why work out the position and then modify it with ugly code when you can do it right first time? See also Morphic-tpr.1168 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068193.html Name: Collections-ul.698 Ancestors: Collections-ul.697 Heap revamp #3: - Heap is a subclass of Collection instead of SequenceableCollection. - Heap has it's own category Collections-Heap; just like how it is with Stack. - Updated class comment. ============================================= From lewis at mail.msen.com Tue Jun 7 22:43:30 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jun 7 22:43:34 2016 Subject: [squeak-dev] HostWindow on unix appears to work, at least on Pi In-Reply-To: References: Message-ID: <20160607224330.GA37107@shell.msen.com> On Tue, Jun 07, 2016 at 01:58:36PM -0700, tim Rowledge wrote: > I finally got around to building the host window plugin for the Pi builds and the good news is that it works for all the simple tests I???ve tried so far. Manually setting the window handle to 1 makes it possible to query, move, retitle and resize the main window. This is all good. > > It???s a long time since the last questions about this that I can find any record of (much longer than I thought!) but at least I know it works. I don???t suppose anyone has built a suitable unix host window proxy that I simply haven???t spotted yet? IIRC we were discussing using these prims to handle window resizing and title setting instead of whatever is in place right now? > I dimly recall that there were working examples involving host windows other than the main Squeak display for Windows and Risc OS and Mac, but nothing that I know of for Unix. So this is as close as we have ever gotten for the Unix VM. I also recall window support with a project with a wierd name starting with too many 'f' letters, ah yes "Areithfa Ffenestri" (couldn't you have just used a Japanese name?) http://wiki.squeak.org/squeak/3862 It looks like someone did some work with this for Pharo back in 2009, probably that was in the "rebranded" Squeak 3.9 era. Apparently there is no HostWindowProxy for Unix at this point, so I guess this might be as good a time as any time to do one. Dave From commits at source.squeak.org Tue Jun 7 23:35:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 7 23:35:48 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1169.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1169.mcz ==================== Summary ==================== Name: Morphic-cmm.1169 Author: cmm Time: 7 June 2016, 6:34:59.086637 pm UUID: b7aecab3-80da-402a-b8ed-1731c010ecd7 Ancestors: Morphic-tpr.1168 - Fix Cmd-Escape to close the *top* window, not the one under the hand. - Introduce new global hot-key Cmd-` (tilde) to bring the window under the hand to the front. Note that window under the hand can now be closed quickly via Cmd-[Tilde] + Cmd-[Escape]. =============== Diff against Morphic-tpr.1168 =============== Item was added: + ----- Method: SystemWindow class>>bringWindowUnderHandToFront (in category 'top window') ----- + bringWindowUnderHandToFront + "This only works when All Windows Active is enabled." + (self windowsIn: World) do: [ : each | each isLookingFocused ifTrue: [ ^ each beKeyWindow ]]! Item was added: + ----- Method: SystemWindow class>>deleteTopWindow (in category 'top window') ----- + deleteTopWindow + TopWindow ifNotNil: [ TopWindow delete ]! Item was changed: ----- Method: SystemWindow>>filterEvent:for: (in category 'events') ----- filterEvent: aKeyboardEvent for: anObject "Provide keyboard shortcuts." aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent]. aKeyboardEvent commandKeyPressed ifTrue: [ aKeyboardEvent keyCharacter caseOf: { [$\] -> [self class sendTopWindowToBack]. + [Character escape] -> [self class deleteTopWindow]. + [$`] -> [self class bringWindowUnderHandToFront]. - [Character escape] -> [self delete]. } otherwise: [^ aKeyboardEvent "no hit"]. ^ aKeyboardEvent ignore "hit!!"]. aKeyboardEvent controlKeyPressed ifTrue: [ aKeyboardEvent keyCharacter caseOf: { [Character escape] -> [self world findWindow: aKeyboardEvent]. } otherwise: [^ aKeyboardEvent "no hit"]. ^ aKeyboardEvent ignore "hit!!"]. ^ aKeyboardEvent "no hit"! From asqueaker at gmail.com Tue Jun 7 23:40:56 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 7 23:41:38 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1169.mcz In-Reply-To: <57575a55.c6f68c0a.f5a24.fffff6ddSMTPIN_ADDED_MISSING@mx.google.com> References: <57575a55.c6f68c0a.f5a24.fffff6ddSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Alt-` cannot be used on Ubuntu OOTB, to fix this: in compizconfig-settings-manager, go to Desktop -> Ubuntu Unity Plugin -> Switcher, then change "Key to flip through windows in the switcher" from disabled to something else. From: http://askubuntu.com/questions/132304/how-to-disable-alt On Tue, Jun 7, 2016 at 6:35 PM, wrote: > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1169.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1169 > Author: cmm > Time: 7 June 2016, 6:34:59.086637 pm > UUID: b7aecab3-80da-402a-b8ed-1731c010ecd7 > Ancestors: Morphic-tpr.1168 > > - Fix Cmd-Escape to close the *top* window, not the one under the hand. > - Introduce new global hot-key Cmd-` (tilde) to bring the window under the hand to the front. > Note that window under the hand can now be closed quickly via Cmd-[Tilde] + Cmd-[Escape]. > > =============== Diff against Morphic-tpr.1168 =============== > > Item was added: > + ----- Method: SystemWindow class>>bringWindowUnderHandToFront (in category 'top window') ----- > + bringWindowUnderHandToFront > + "This only works when All Windows Active is enabled." > + (self windowsIn: World) do: [ : each | each isLookingFocused ifTrue: [ ^ each beKeyWindow ]]! > > Item was added: > + ----- Method: SystemWindow class>>deleteTopWindow (in category 'top window') ----- > + deleteTopWindow > + TopWindow ifNotNil: [ TopWindow delete ]! > > Item was changed: > ----- Method: SystemWindow>>filterEvent:for: (in category 'events') ----- > filterEvent: aKeyboardEvent for: anObject > "Provide keyboard shortcuts." > > aKeyboardEvent isKeystroke > ifFalse: [^ aKeyboardEvent]. > > aKeyboardEvent commandKeyPressed ifTrue: [ > aKeyboardEvent keyCharacter caseOf: { > [$\] -> [self class sendTopWindowToBack]. > + [Character escape] -> [self class deleteTopWindow]. > + [$`] -> [self class bringWindowUnderHandToFront]. > - [Character escape] -> [self delete]. > } otherwise: [^ aKeyboardEvent "no hit"]. > ^ aKeyboardEvent ignore "hit!!"]. > > aKeyboardEvent controlKeyPressed ifTrue: [ > aKeyboardEvent keyCharacter caseOf: { > [Character escape] -> [self world findWindow: aKeyboardEvent]. > } otherwise: [^ aKeyboardEvent "no hit"]. > ^ aKeyboardEvent ignore "hit!!"]. > > ^ aKeyboardEvent "no hit"! > > From Das.Linux at gmx.de Tue Jun 7 23:41:37 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jun 7 23:41:44 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1169.mcz Message-ID: <30418810-E860-4071-BA5B-BAD81B3E1FD1@gmx.de> On 07.06.2016, at 23:35, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-cmm.1169.mcz > > ==================== Summary ==================== > > Name: Morphic-cmm.1169 > Author: cmm > Time: 7 June 2016, 6:34:59.086637 pm > UUID: b7aecab3-80da-402a-b8ed-1731c010ecd7 > Ancestors: Morphic-tpr.1168 > > - Fix Cmd-Escape to close the *top* window, not the one under the hand. > - Introduce new global hot-key Cmd-` (tilde) to bring the window under the hand to the front. > Note that window under the hand can now be closed quickly via Cmd-[Tilde] + Cmd-[Escape]. Note: Cmd-` is the Mac hotkey to _cycle_ through windows... > > =============== Diff against Morphic-tpr.1168 =============== > > Item was added: From commits at source.squeak.org Wed Jun 8 00:05:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 8 00:05:53 2016 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.405.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.405.mcz ==================== Summary ==================== Name: Installer-Core-cmm.405 Author: cmm Time: 7 June 2016, 7:05:42.768795 pm UUID: 303433fc-132f-4759-87e1-b66fe4c09553 Ancestors: Installer-Core-cmm.404 Allow any repository to be conveniently overridden with a single default #local directory repository via: Installer overrideRepository: #squeaksource with: #local Useful for building images without network connection, or for developing new versions or running customized versions of certain packages. =============== Diff against Installer-Core-cmm.404 =============== Item was changed: Object subclass: #Installer instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel currentRepository' classVariableNames: 'InstallerBindings IsSetToTrapErrors Repositories SkipLoadingTests ValidationBlock' poolDictionaries: '' category: 'Installer-Core'! + Installer class + instanceVariableNames: 'localRepository'! !Installer commentStamp: 'kph 3/30/2009 01:29' prior: 0! Documentation now available at http://installer.pbwiki.com/Installer useFileIn - flag to load source.st rather than using Monticello! + Installer class + instanceVariableNames: 'localRepository'! Item was added: + ----- Method: Installer class>>local (in category 'repositories') ----- + local + ^ self localRepository! Item was added: + ----- Method: Installer class>>localRepository (in category 'repository-overrides') ----- + localRepository + ^ localRepository ifNil: [ Installer monticello directory: FileDirectory default / 'mc' ]! Item was added: + ----- Method: Installer class>>localRepository: (in category 'repository-overrides') ----- + localRepository: aMCRepository + localRepository := aMCRepository! Item was added: + ----- Method: Installer class>>useLocalRepository (in category 'repository-overrides') ----- + useLocalRepository + self overrideRemoteRepostoriesWith: #local! From asqueaker at gmail.com Wed Jun 8 00:09:20 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 8 00:10:03 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1169.mcz In-Reply-To: <30418810-E860-4071-BA5B-BAD81B3E1FD1@gmx.de> References: <30418810-E860-4071-BA5B-BAD81B3E1FD1@gmx.de> Message-ID: (woops, I mistakenly said "Tilde" -- in fact I meant the grave accent (a.k.a., "back tick"). > Note: Cmd-` is the Mac hotkey to _cycle_ through windows... Hi Tobias, in which context? Mac? Windows? Squeak? I did not notice this in Squeak before.. From asqueaker at gmail.com Wed Jun 8 00:12:23 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 8 00:13:05 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1169.mcz In-Reply-To: References: <30418810-E860-4071-BA5B-BAD81B3E1FD1@gmx.de> Message-ID: Woops, I see you said Mac. Yeah, same as in Ubuntu. We have to share keys with OS's to make a total computing experience we can live with. On Tue, Jun 7, 2016 at 7:09 PM, Chris Muller wrote: > (woops, I mistakenly said "Tilde" -- in fact I meant the grave accent > (a.k.a., "back tick"). > >> Note: Cmd-` is the Mac hotkey to _cycle_ through windows... > > Hi Tobias, in which context? Mac? Windows? Squeak? I did not > notice this in Squeak before.. From asqueaker at gmail.com Wed Jun 8 00:17:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 8 00:17:57 2016 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.405.mcz In-Reply-To: <57576163.10f08c0a.617d8.ffffbd91SMTPIN_ADDED_MISSING@mx.google.com> References: <57576163.10f08c0a.617d8.ffffbd91SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Woops, it seems 'localRepository' is already used..? Fixing... On Tue, Jun 7, 2016 at 7:05 PM, wrote: > Chris Muller uploaded a new version of Installer-Core to project The Trunk: > http://source.squeak.org/trunk/Installer-Core-cmm.405.mcz > > ==================== Summary ==================== > > Name: Installer-Core-cmm.405 > Author: cmm > Time: 7 June 2016, 7:05:42.768795 pm > UUID: 303433fc-132f-4759-87e1-b66fe4c09553 > Ancestors: Installer-Core-cmm.404 > > Allow any repository to be conveniently overridden with a single default #local directory repository via: > > Installer > overrideRepository: #squeaksource > with: #local > > Useful for building images without network connection, or for developing new versions or running customized versions of certain packages. > > =============== Diff against Installer-Core-cmm.404 =============== > > Item was changed: > Object subclass: #Installer > instanceVariableNames: 'answers packages messagesToSuppress useFileIn noiseLevel currentRepository' > classVariableNames: 'InstallerBindings IsSetToTrapErrors Repositories SkipLoadingTests ValidationBlock' > poolDictionaries: '' > category: 'Installer-Core'! > + Installer class > + instanceVariableNames: 'localRepository'! > > !Installer commentStamp: 'kph 3/30/2009 01:29' prior: 0! > Documentation now available at http://installer.pbwiki.com/Installer > > useFileIn - flag to load source.st rather than using Monticello! > + Installer class > + instanceVariableNames: 'localRepository'! > > Item was added: > + ----- Method: Installer class>>local (in category 'repositories') ----- > + local > + ^ self localRepository! > > Item was added: > + ----- Method: Installer class>>localRepository (in category 'repository-overrides') ----- > + localRepository > + ^ localRepository ifNil: [ Installer monticello directory: FileDirectory default / 'mc' ]! > > Item was added: > + ----- Method: Installer class>>localRepository: (in category 'repository-overrides') ----- > + localRepository: aMCRepository > + localRepository := aMCRepository! > > Item was added: > + ----- Method: Installer class>>useLocalRepository (in category 'repository-overrides') ----- > + useLocalRepository > + self overrideRemoteRepostoriesWith: #local! > > From bert at freudenbergs.de Wed Jun 8 12:00:29 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 8 12:00:34 2016 Subject: [squeak-dev] 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> <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> <1465283066384-4899517.post@n4.nabble.com> Message-ID: <431CCCA1-7C54-4DFD-AF10-C96423565E4D@freudenbergs.de> On 07.06.2016, at 19:29, Chris Muller wrote: > > Ubuntu 14.04 default settings do the same thing Windows does -- make > resizing grips well beyond the outer edge of the window -- which is > incredibly annoying, because 1) it interferes with the content and/or > edges of adjacent windows, which I sometimes want to interact with (or > resize to be closely side-by-side), but can't because it keeps grabbing > the resizer of the window which I'm not even clicking because, > 2) it has defied the physicality of the environment (this is what I > referred to as the "insanity"), and established a new paradigm to the > user that there are "invisible regions" on the screen which are > actually sensitive to input. Zero-width window borders (with a nice soft shadow) manage to provide maximum screen real estate while being exactly as usable as ?wide? borders. I have no problems at all resizing windows on a Mac - I put my mouse pointer on the border (which is very visible, plus the pointer shape changes), drag and resize. > Invisible grips are gonna overlap either to the inside or the outside > right? Making the assumption that overlapping to the outside triggers > my sensitivity about this subject, because it assumes and encourages > that modal-thinking revolution. IMO, we should stand strong against > that and show the world what Smalltalk showed them 33 years ago -- > windows are visible and physical, and present an object-centric > interface (rather than command-centric) which, unlike tablet > interfaces, allows seamless integration of disparate domains. The old Smalltalk UI for resizing was *way* more modal. You had to choose ?reframe? from the blue-button menu and then rubber-band the new window frame. We?ve come a long way from that (so much so that Alan made me put in corner resizing in our Smalltalk-78 revival). Not every ?newer? UX is bad. +1 for zero-width borders (provided we do have nice soft-shadows to indicate window stacking - on slower machines we should have clearly visible opaque borders) - 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/20160608/c4e60152/smime.bin From bert at freudenbergs.de Wed Jun 8 12:05:27 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 8 12:05:31 2016 Subject: [squeak-dev] Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: <1465280722212-4899504.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> Message-ID: On 07.06.2016, at 08:25, marcel.taeumel wrote: > > Chris Muller-3 wrote >> It makes scrolling very choppy. Instead of scrolling by 3-lines at a >> time, it scrolls by about 10... > > Hi Chris, > > there should be no change in the observable behavior by this change. I like being able to point-and-scroll inactive windows very much. But if we are not using keyboard events anymore, we should switch to smooth scrolling, right? Like that legendary one-line change Dan did at Steve?s PARC visit to change from line-based to pixel-based scrolling? Wonder how many lines of code it takes us ;) - 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/20160608/5b4c43fc/smime.bin From timfelgentreff at gmail.com Wed Jun 8 14:43:51 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Wed Jun 8 14:44:13 2016 Subject: [squeak-dev] A speedcenter for Squeak Message-ID: Hi, I sent around a note earlier about a benchmarking tool that we're using internally to track RSqueak/VM performance on each commit. Every time Eliot releases a new set of Cog VMs, I also manually trigger the system to run benchmarks on Cog. (Once we move the proper VM to Github, I will set it up so we test each commit on the main development branch and the release branch, too, so we will have very detailed breakdowns.) We wanted to share this setup and the results with the community. We're collecting results in a Codespeed website (just a frontend to present the data) which we moved to speed.squeak.org today, and it is also linked from the squeak.org website (http://squeak.org/codespeed/). We have some info about the setup on the about page: http://speed.squeak.org/about. On the Changes tab, you can see the most recent results per platform and environment, with details about the machines on the bottom. Note that we calculate all the statistics on the workers themselves and only send the time and std dev, so the results' min and max values you see on the website are bogus. Finally, the code for the workers also is on Github ( https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks are all organized in Squeaksource ( http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). Right now I've just dumped benchmarks from various sources in there, that's why you see the same benchmark implemented multiple times in different ways, and some micro benchmarks don't make too much sense as they are. We're happy to get comments, feedback, or updated versions of the benchmarking packages. Updating the benchmarking code is easy, and we hope this setup proves to be useful enough for the community to warrant continuously updating and extending the set of benchmarks. We are also planning to add more platforms, the setup should make this fairly painless, we just need the dedicated machines. We've been testing the standard Cog/Spur VM on a Ubuntu machine, and today we added a Raspberry Pi 1 that is still churning through the latest Cog and RSqueak/VM commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS and other builds of the Squeak VM, too. Cheers, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160608/9f43bca1/attachment.htm From asqueaker at gmail.com Wed Jun 8 15:04:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 8 15:05:12 2016 Subject: [squeak-dev] Impossible to grab the scroll bar in the Transcript if... In-Reply-To: <431CCCA1-7C54-4DFD-AF10-C96423565E4D@freudenbergs.de> References: <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> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> <1465283066384-4899517.post@n4.nabble.com> <431CCCA1-7C54-4DFD-AF10-C96423565E4D@freudenbergs.de> Message-ID: >> Ubuntu 14.04 default settings do the same thing Windows does -- make >> resizing grips well beyond the outer edge of the window -- which is >> incredibly annoying, because 1) it interferes with the content and/or >> edges of adjacent windows, which I sometimes want to interact with (or >> resize to be closely side-by-side), but can't because it keeps grabbing >> the resizer of the window which I'm not even clicking because, >> 2) it has defied the physicality of the environment (this is what I >> referred to as the "insanity"), and established a new paradigm to the >> user that there are "invisible regions" on the screen which are >> actually sensitive to input. > > Zero-width window borders (with a nice soft shadow) manage to provide maximum screen real estate No, they don't. Did you understand what I wrote? There is no more real-estate available than normal "thick" borders because you don't have use of those 4-pixels that extend beyond that "thin" edge -- i.e.. where the shadow is. That's your "fake thick resizer". Its visually deceptive and totally interferes with usability when one is working with multiple windows. But hey, who ever works in multiple windows right? Taht was my point about designers dumbing interfaces down to "one app at a time like a phone or tablet".. So they give a false appearance that they're "thin", they've crossed a line that had not crossed before -- they took the physicality of the system away in favor of "magic invisible regions". Plus, it is now ambiguous with windows that are not resizable. Remember when it was only non-resizable dialogs that had the thin border? Before, there was that visual cue, now, its ambigous. IMO, its a big design mistake that only ever gained any acceptance because of its "eye-candy" nature. Imagine if they tried to pull this off without a soft shadow, but with a simple translucent rectangle like Squeaks classic shadow -- I think it would never have been accepted over thick borders because it doesn't look pretty enough.. From Marcel.Taeumel at hpi.de Wed Jun 8 15:03:02 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 8 15:41:36 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> Message-ID: <1465398182426-4899961.post@n4.nabble.com> Bert Freudenberg wrote > On 07.06.2016, at 08:25, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> Chris Muller-3 wrote >>> It makes scrolling very choppy. Instead of scrolling by 3-lines at a >>> time, it scrolls by about 10... >> >> Hi Chris, >> >> there should be no change in the observable behavior by this change. > > I like being able to point-and-scroll inactive windows very much. > > But if we are not using keyboard events anymore, we should switch to > smooth scrolling, right? Like that legendary one-line change Dan did at > Steve?s PARC visit to change from line-based to pixel-based scrolling? > Wonder how many lines of code it takes us ;) > > - Bert - > > > > > > smime.p7s (5K) > <http://forum.world.st/attachment/4899870/0/smime.p7s> Hi Bert, sure, it is a one-liner. Just change PluggableListMorph >> #scrollDeltaHeight. ... and PluggableTextMorph >> #scrollDeltaHeight. :-) Return 1 instead of the font height. You might want to call this then: ScrollPane allSubInstancesDo: [:ea | ea vSetScrollDelta]. However, using a regular mouse with a non-free wheel (i.e., one that has "clicks"), this would make scrolling very cumbersome. So, if you had real touch/swipe events and could do kinetic scrolling... this would we very cool. :) Best, Marcel -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899961.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Jun 8 16:16:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 8 16:16:21 2016 Subject: [squeak-dev] The Trunk: Morphic-bf.1170.mcz Message-ID: Bert Freudenberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-bf.1170.mcz ==================== Summary ==================== Name: Morphic-bf.1170 Author: bf Time: 8 June 2016, 6:15:43.393011 pm UUID: 907aecf3-845e-4669-bb24-fd11a542d21f Ancestors: Morphic-cmm.1169 Deal with "old" events having nil in wasIgnored =============== Diff against Morphic-cmm.1169 =============== Item was changed: ----- Method: UserInputEvent>>wasIgnored (in category 'accessing') ----- wasIgnored + ^ wasIgnored == true! - ^ wasIgnored! From bert at freudenbergs.de Wed Jun 8 16:29:43 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 8 16:29:48 2016 Subject: [squeak-dev] 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> <4B25287B-20E6-4CBD-A654-C19D29AFFE31@freudenbergs.de> <67D019F1-A4DA-486A-B0F7-C5D8A14ED0FA@rowledge.org> <41EB7564-8162-4645-92B4-2C1D096F3773@freudenbergs.de> <1465105445623-4899235.post@n4.nabble.com> <1465283066384-4899517.post@n4.nabble.com> <431CCCA1-7C54-4DFD-AF10-C96423565E4D@freudenbergs.de> Message-ID: On 08.06.2016, at 17:04, Chris Muller wrote: > > Bert wrote: >> Zero-width window borders (with a nice soft shadow) manage to provide maximum screen real estate > > No, they don?t. Yes, they do. I see about one character?s width more of the back window. > [...] interferes with usability when one is working with multiple windows Not for me. I should point out that I *like* the wide borders on Squeak windows, just not for the reason of usability (which IMHO is unaffected by that). I like them because I like colored windows, so I want a colored window frame on each system window. Our current ones could be made to look a bit nicer, but they do have a purpose. OTOH I know Marcel likes gray windows, and in that case the borders do not serve a good purpose. So having the option of borderless windows seems useful. - 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/20160608/552efc50/smime.bin From tonyg at ccs.neu.edu Wed Jun 8 17:05:07 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Wed Jun 8 17:05:11 2016 Subject: [squeak-dev] Touchscreen events and non-blocking file I/O (was Re: Mouse Wheel Events, "Point and scroll-by-wheel") In-Reply-To: <1465398182426-4899961.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465398182426-4899961.post@n4.nabble.com> Message-ID: On 06/08/2016 11:03 AM, marcel.taeumel wrote: > So, if you had real touch/swipe events and could do kinetic scrolling... > this would we very cool. :) I've previously tried to read touchscreen events on Linux from /dev/input/event*, but ran into trouble because the Squeak VMs I tried all treat "file I/O" as blocking - that is, bytes will be immediately available, or end-of-file will be immediately available. This is, of course, not true for /dev/input/event* ! Reading from such files is much more like reading from a socket. Does any kind of plugin or overlooked primitive exist that'd allow for non-blocking reads from /dev/input/event* pseudofiles? Tony From commits at source.squeak.org Wed Jun 8 17:22:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 8 17:22:43 2016 Subject: [squeak-dev] The Trunk: Graphics-tpr.342.mcz Message-ID: tim Rowledge uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tpr.342.mcz ==================== Summary ==================== Name: Graphics-tpr.342 Author: tpr Time: 8 June 2016, 10:22:17.667271 am UUID: ef647385-8d46-494e-93b4-e3df81b23313 Ancestors: Graphics-topa.341 When scaling a Form via WarpBlt class>>#rotate:degrees:center:scaleBy:smoothing: the scaling factor seems to have been left out in the calculation of the returned offset. This meant that Scratch sprites did Bad Things at times. The only non-Scratch client I could find for this method is SketchMorph, but that ignores the returned offset anyway; thus it seems reasonable to makes things work ok for Scratch. =============== Diff against Graphics-topa.341 =============== Item was changed: ----- Method: WarpBlt class>>rotate:degrees:center:scaleBy:smoothing: (in category 'form rotation') ----- + rotate: srcForm degrees: angleInDegrees center: rotationCenter scaleBy: scalePoint smoothing: cellSize + "Rotate the given Form angleInDegrees about the given rotationCenter and scale its width and height by x and y of the given scale + point. Smooth using the given cell size, an integer between 1 and 3, where 1 means no smoothing. + Return a pair where the first element is the rotated Form and the second is the position offset required to align the center of the rotated Form with that of the original. + Note that the dimensions of the resulting Form generally differ from those of the original." + | srcRect srcCenter radians dstOrigin dstCorner p dstRect inverseScale quad dstForm warpSrc newRotationPoint oldOffset | - rotate: srcForm degrees: angleInDegrees center: aPoint scaleBy: scalePoint smoothing: cellSize - "Rotate the given Form the given number of degrees about the given center and scale its width and height by x and y of the given scale point. Smooth using the given cell size, an integer between 1 and 3, where 1 means no smoothing. Return a pair where the first element is the rotated Form and the second is the position offset required to align the center of the rotated Form with that of the original. Note that the dimensions of the resulting Form generally differ from those of the original." - - | srcRect center radians dstOrigin dstCorner p dstRect inverseScale quad dstForm newCenter warpSrc | srcRect := srcForm boundingBox. + srcCenter := srcRect center. - center := srcRect center. radians := angleInDegrees degreesToRadians. + dstOrigin := dstCorner := srcCenter. + srcRect corners + do: [:corner | + "find the limits of a rectangle that just encloses the rotated + original; in general, this rectangle will be larger than the + original (e.g., consider a square rotated by 45 degrees)" + p := (corner - srcCenter scaleBy: scalePoint) + srcCenter. + p := (p rotateBy: radians about: srcCenter) rounded. + dstOrigin := dstOrigin min: p. + dstCorner := dstCorner max: p]. - dstOrigin := dstCorner := center. - srcRect corners do: [:corner | - "find the limits of a rectangle that just encloses the rotated - original; in general, this rectangle will be larger than the - original (e.g., consider a square rotated by 45 degrees)" - p := ((corner - center) scaleBy: scalePoint) + center. - p := (p rotateBy: radians about: center) rounded. - dstOrigin := dstOrigin min: p. - dstCorner := dstCorner max: p]. - "rotate the enclosing rectangle back to get the source quadrilateral" dstRect := dstOrigin corner: dstCorner. + inverseScale := 1.0 / scalePoint x @ (1.0 / scalePoint y). + quad := dstRect innerCorners + collect: [:corner | + p := corner rotateBy: radians negated about: srcCenter. + (p - srcCenter scaleBy: inverseScale) + srcCenter]. - inverseScale := (1.0 / scalePoint x)@(1.0 / scalePoint y). - quad := dstRect innerCorners collect: [:corner | - p := corner rotateBy: radians negated about: center. - ((p - center) scaleBy: inverseScale) + center]. "make a Form to hold the result and do the rotation" warpSrc := srcForm. + srcForm isColorForm + ifTrue: [warpSrc := Form extent: srcForm extent depth: 16. + srcForm displayOn: warpSrc. + dstForm := Form extent: dstRect extent depth: 16 + "use 16-bit depth to allow smoothing"] + ifFalse: [dstForm := srcForm species extent: dstRect extent depth: srcForm depth]. - (srcForm isColorForm) - ifTrue: [ - cellSize > 1 | true "ar 12/27/2001: Always enable - else sketches won't work" - ifTrue: [ - warpSrc := Form extent: srcForm extent depth: 16. - srcForm displayOn: warpSrc. - dstForm := Form extent: dstRect extent depth: 16] "use 16-bit depth to allow smoothing" - ifFalse: [ - dstForm := srcForm species extent: dstRect extent depth: srcForm depth]] - ifFalse: [ - dstForm := srcForm species extent: dstRect extent depth: srcForm depth]. - (WarpBlt toForm: dstForm) sourceForm: warpSrc; colorMap: (warpSrc colormapIfNeededFor: dstForm); + cellSize: cellSize; + combinationRule: Form paint; + copyQuad: quad toRect: dstForm boundingBox. - cellSize: cellSize; "installs a new colormap if cellSize > 1" - combinationRule: Form paint; - copyQuad: quad toRect: dstForm boundingBox. + "installs a new colormap if cellSize > 1" + dstForm isColorForm + ifTrue: [dstForm colors: srcForm colors copy]. + + oldOffset := rotationCenter - srcCenter truncated * scalePoint. + newRotationPoint := dstForm extent / 2.0 + (oldOffset rotateBy: radians about: 0 @ 0). + + ^ Array with: dstForm with: newRotationPoint - rotationCenter! - (dstForm isColorForm) ifTrue: [dstForm colors: srcForm colors copy]. - newCenter := (center rotateBy: radians about: aPoint) truncated. - ^ Array with: dstForm with: dstRect origin + (newCenter - center) - ! From leves at caesar.elte.hu Wed Jun 8 17:43:28 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Jun 8 17:43:31 2016 Subject: [squeak-dev] Touchscreen events and non-blocking file I/O (was Re: Mouse Wheel Events, "Point and scroll-by-wheel") In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465398182426-4899961.post@n4.nabble.com> Message-ID: On Wed, 8 Jun 2016, Tony Garnock-Jones wrote: > On 06/08/2016 11:03 AM, marcel.taeumel wrote: >> So, if you had real touch/swipe events and could do kinetic scrolling... >> this would we very cool. :) > > I've previously tried to read touchscreen events on Linux from > /dev/input/event*, but ran into trouble because the Squeak VMs I tried > all treat "file I/O" as blocking - that is, bytes will be immediately > available, or end-of-file will be immediately available. > > This is, of course, not true for /dev/input/event* ! Reading from such > files is much more like reading from a socket. > > Does any kind of plugin or overlooked primitive exist that'd allow for > non-blocking reads from /dev/input/event* pseudofiles? I guess you can use the AIO plugin for that, or you can use OSProcess, which also uses the AIO plugin for non-blocking reads. Levente > > Tony > > From tonyg at ccs.neu.edu Wed Jun 8 18:24:58 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Wed Jun 8 18:25:00 2016 Subject: [squeak-dev] Touchscreen events and non-blocking file I/O (was Re: Mouse Wheel Events, "Point and scroll-by-wheel") In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465398182426-4899961.post@n4.nabble.com> Message-ID: On 06/08/2016 01:43 PM, Levente Uzonyi wrote: > I guess you can use the AIO plugin for that, or you can use OSProcess, > which also uses the AIO plugin for non-blocking reads. Great! Thank you, I'll give it a shot! Regards, Tony From tim at rowledge.org Wed Jun 8 19:04:09 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jun 8 19:04:06 2016 Subject: [squeak-dev] HostWindow on unix appears to work, at least on Pi In-Reply-To: <20160607224330.GA37107@shell.msen.com> References: <20160607224330.GA37107@shell.msen.com> Message-ID: <6B55041C-FC2A-4990-9992-664453A307E5@rowledge.org> > On 07-06-2016, at 3:43 PM, David T. Lewis wrote: > > I dimly recall that there were working examples involving host windows > other than the main Squeak display for Windows and Risc OS and Mac, but > nothing that I know of for Unix. So this is as close as we have ever gotten > for the Unix VM. Starting from a trivial unix proxy class I rapidly discovered that the x11 display code for unix carefully does nothing to open a new host window. Sigh. Despite finding some references to claims of a working version for Pharo I couldn?t find any code that looked different. T?would be nice to have that bit added, hint to any unix guru out there with time to spare. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim To succeed in politics, it is often necessary to rise above your principles. From ma.chris.m at gmail.com Wed Jun 8 20:23:16 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Jun 8 20:23:58 2016 Subject: [squeak-dev] trunk IDE has become sluggish Message-ID: Has anyone noticed, with latest trunk updates, a sluggishness? I use smart-splitters, so I notice it very broadly -- splitters are really creeping while CPU jumps to 100%, compared to a Squeak 5.0 release image.. Possibly the new Event filtering mechanism? From tonyg at ccs.neu.edu Wed Jun 8 21:28:00 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Wed Jun 8 21:28:03 2016 Subject: [squeak-dev] Successful reading of /dev/input/event2 (was Re: Touchscreen events and non-blocking file I/O) In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465398182426-4899961.post@n4.nabble.com> Message-ID: Hello all, Following Levente's suggestion, I managed to read Linux input events from /dev/input/event2 (which is a mouse on this system) without blocking the whole image. Attached is LinuxIO.st. To try it out, d := LinuxInputEventDevice openPath: '/dev/input/event2'. d eventHandler: [:e | Transcript nextPutAll: e printString; crlf; flush]. (Change event2 to the device file for your mouse - or touchscreen!) Then, wiggling the mouse should print messages to Transcript. To stop it, d close. (You can start it again with "d open".) It's just a proof-of-concept; ideally, it'd know to reopen itself at image startup. Plus it'd be useful to have some way of identifying at least device classes. But it's good enough to start playing with reading touchscreens, perhaps! Regards, Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: LinuxIO.st Type: application/squeak-changeset Size: 3248 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160608/54baa622/LinuxIO.bin From commits at source.squeak.org Wed Jun 8 21:56:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 8 21:56:55 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160608215652.17915.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-June/068194.html Name: Morphic-cmm.1169 Ancestors: Morphic-tpr.1168 - Fix Cmd-Escape to close the *top* window, not the one under the hand. - Introduce new global hot-key Cmd-` (tilde) to bring the window under the hand to the front. Note that window under the hand can now be closed quickly via Cmd-[Tilde] + Cmd-[Escape]. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068195.html Name: Installer-Core-cmm.405 Ancestors: Installer-Core-cmm.404 Allow any repository to be conveniently overridden with a single default #local directory repository via: Installer overrideRepository: #squeaksource with: #local Useful for building images without network connection, or for developing new versions or running customized versions of certain packages. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068196.html Name: Morphic-bf.1170 Ancestors: Morphic-cmm.1169 Deal with "old" events having nil in wasIgnored ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068197.html Name: Graphics-tpr.342 Ancestors: Graphics-topa.341 When scaling a Form via WarpBlt class>>#rotate:degrees:center:scaleBy:smoothing: the scaling factor seems to have been left out in the calculation of the returned offset. This meant that Scratch sprites did Bad Things at times. The only non-Scratch client I could find for this method is SketchMorph, but that ignores the returned offset anyway; thus it seems reasonable to makes things work ok for Scratch. ============================================= From tim at rowledge.org Wed Jun 8 22:39:46 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jun 8 22:39:42 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: References: Message-ID: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> > On 08-06-2016, at 1:23 PM, Chris Muller wrote: > > Has anyone noticed, with latest trunk updates, a sluggishness? > > I use smart-splitters, so I notice it very broadly -- splitters are > really creeping while CPU jumps to 100%, compared to a Squeak 5.0 > release image.. Hmm, I?ve just tried out the splitters on a Pi with a 16026 update image and it was ok, then updating to 16033 definitely *seems* to be slower about moving them. I couldn?t call it ?creeping? though, even on the Pi. As an aside, it really is a treat to have a Pi3/CogVM system. Everyone should... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Multitasking: Screwing up several things at once... From commits at source.squeak.org Wed Jun 8 22:42:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 8 22:42:55 2016 Subject: [squeak-dev] The Trunk: Graphics-tpr.343.mcz Message-ID: tim Rowledge uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tpr.343.mcz ==================== Summary ==================== Name: Graphics-tpr.343 Author: tpr Time: 8 June 2016, 3:42:29.069288 pm UUID: 8d4d3260-cfd3-420d-b83e-486e998c5512 Ancestors: Graphics-tpr.342 Add the most trivial beginnings of a unix/x11 host window proxy - just enough to run tests to demonstrate that the plugin needs work =============== Diff against Graphics-tpr.342 =============== Item was added: + HostWindowProxy subclass: #UnixX11WindowProxy + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Graphics-External-Ffenestri'! Item was added: + ----- Method: UnixX11WindowProxy class>>isActiveHostWindowProxyClass (in category 'as yet unclassified') ----- + isActiveHostWindowProxyClass + "Am I active?" + ^Smalltalk platformName = 'unix' ! Item was added: + ----- Method: UnixX11WindowProxy>>defaultWindowType (in category 'window decorations') ----- + defaultWindowType! From lewis at mail.msen.com Wed Jun 8 23:12:00 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 8 23:12:03 2016 Subject: [squeak-dev] Successful reading of /dev/input/event2 (was Re: Touchscreen events and non-blocking file I/O) In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465398182426-4899961.post@n4.nabble.com> Message-ID: <20160608231200.GA68410@shell.msen.com> Very nice, thanks for posting this. Dave On Wed, Jun 08, 2016 at 05:28:00PM -0400, Tony Garnock-Jones wrote: > Hello all, > > Following Levente's suggestion, I managed to read Linux input events > from /dev/input/event2 (which is a mouse on this system) without > blocking the whole image. > > Attached is LinuxIO.st. To try it out, > > d := LinuxInputEventDevice openPath: '/dev/input/event2'. > d eventHandler: > [:e | Transcript nextPutAll: e printString; crlf; flush]. > > (Change event2 to the device file for your mouse - or touchscreen!) > > Then, wiggling the mouse should print messages to Transcript. > > To stop it, > > d close. > > (You can start it again with "d open".) > > It's just a proof-of-concept; ideally, it'd know to reopen itself at > image startup. Plus it'd be useful to have some way of identifying at > least device classes. But it's good enough to start playing with reading > touchscreens, perhaps! > > Regards, > Tony > From lewis at mail.msen.com Thu Jun 9 01:03:30 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 9 01:03:32 2016 Subject: [squeak-dev] The Trunk: Graphics-tpr.343.mcz In-Reply-To: <201606082242.u58MgtnJ066161@shell.msen.com> References: <201606082242.u58MgtnJ066161@shell.msen.com> Message-ID: <20160609010330.GA95282@shell.msen.com> On Wed, Jun 08, 2016 at 10:42:41PM +0000, commits@source.squeak.org wrote: > tim Rowledge uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-tpr.343.mcz > > ==================== Summary ==================== > > Name: Graphics-tpr.343 > Author: tpr > Time: 8 June 2016, 3:42:29.069288 pm > UUID: 8d4d3260-cfd3-420d-b83e-486e998c5512 > Ancestors: Graphics-tpr.342 > > Add the most trivial beginnings of a unix/x11 host window proxy - just enough to run tests to demonstrate that the plugin needs work > Yay! We'll make a unix programmer out of you yet. (apologies in advance for the flame bait) Dave From lewis at mail.msen.com Thu Jun 9 01:15:32 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 9 01:15:34 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> Message-ID: <20160609011532.GB95282@shell.msen.com> On Wed, Jun 08, 2016 at 03:39:46PM -0700, tim Rowledge wrote: > > As an aside, it really is a treat to have a Pi3/CogVM system. Everyone should... > OK, I'm ready. Can you point me to what to buy to get Squeak up and running fast on Pi. I don't want cheap, just easy. Assume that all I know is my credit card number. Thanks, Dave From squeaklist at gmail.com Thu Jun 9 01:25:57 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Jun 9 01:26:01 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: <20160609011532.GB95282@shell.msen.com> References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> Message-ID: Yes i want it and i don't know my credit card number On Wednesday, June 8, 2016, David T. Lewis wrote: > On Wed, Jun 08, 2016 at 03:39:46PM -0700, tim Rowledge wrote: > > > > As an aside, it really is a treat to have a Pi3/CogVM system. Everyone > should... > > > > OK, I'm ready. Can you point me to what to buy to get Squeak up and > running fast on Pi. I don't want cheap, just easy. Assume that all I > know is my credit card number. > > Thanks, > Dave > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160608/2a6990a4/attachment.htm From squeaklist at gmail.com Thu Jun 9 01:27:37 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Jun 9 01:27:39 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> Message-ID: but i think i can get close enough for practical purposes On Wednesday, June 8, 2016, Kjell Godo wrote: > Yes i want it > and i don't know my credit card number > > On Wednesday, June 8, 2016, David T. Lewis > wrote: > >> On Wed, Jun 08, 2016 at 03:39:46PM -0700, tim Rowledge wrote: >> > >> > As an aside, it really is a treat to have a Pi3/CogVM system. Everyone >> should... >> > >> >> OK, I'm ready. Can you point me to what to buy to get Squeak up and >> running fast on Pi. I don't want cheap, just easy. Assume that all I >> know is my credit card number. >> >> Thanks, >> Dave >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160608/08e670dd/attachment.htm From btc at openinworld.com Thu Jun 9 03:08:47 2016 From: btc at openinworld.com (Ben Coman) Date: Thu Jun 9 03:09:11 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: <20160609011532.GB95282@shell.msen.com> References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> Message-ID: Adafruit are reputable. You need only these... RASPBERRY PI 3 MODEL B STARTER PACK - INCLUDES A RASPBERRY PI https://www.adafruit.com/product/3058 Computer Add-On Pack for Raspberry Pi https://www.adafruit.com/products/2129 and optional... Raspberry Pi Sense HAT - For the Pi 3 / 2 / B+ / A+ https://www.adafruit.com/products/2738 Pi-EzConnect Terminal Block Breakout HAT https://www.adafruit.com/products/2711 (Disclaimer, I haven't used those two, but they would be the next thing I buy, and are advertised Pi3 compatible [not every accessory is] ) And... https://learn.adafruit.com/category/raspberry-pi cheers -ben On Thu, Jun 9, 2016 at 9:15 AM, David T. Lewis wrote: > On Wed, Jun 08, 2016 at 03:39:46PM -0700, tim Rowledge wrote: >> >> As an aside, it really is a treat to have a Pi3/CogVM system. Everyone should... >> > > OK, I'm ready. Can you point me to what to buy to get Squeak up and > running fast on Pi. I don't want cheap, just easy. Assume that all I > know is my credit card number. > > Thanks, > Dave > From lewis at mail.msen.com Thu Jun 9 03:47:00 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 9 03:47:02 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> Message-ID: <20160609034700.GA24202@shell.msen.com> On Thu, Jun 09, 2016 at 11:08:47AM +0800, Ben Coman wrote: > Adafruit are reputable. You need only these... > Thank you Ben, that is what I was looking for. Just placed my order. Nice to see that it is a company run by a woman engineer, that sealed the deal for me :-) Dave From tim at rowledge.org Thu Jun 9 04:30:06 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 9 04:30:03 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> Message-ID: <12B1BE72-84ED-4CA1-BE88-1C25448827FF@rowledge.org> > On 08-06-2016, at 8:08 PM, Ben Coman wrote: > > Adafruit are reputable. You need only these... > > RASPBERRY PI 3 MODEL B STARTER PACK - INCLUDES A RASPBERRY PI > https://www.adafruit.com/product/3058 Not a bad collection of bits. I prefer an Anker 6 port 60W usb power supply but then I typically have 3-5 Pis running at once and that handles all of them. > > Computer Add-On Pack for Raspberry Pi > https://www.adafruit.com/products/2129 Not essential unless you have no sub mouse/keyboard spares lying around. I have all my Pis set up to run xrdp so that I can vnc into them instead of needing a bunch of displays. You *do* need a kbd/mouse/display for an initial setup though > > and optional... > > Raspberry Pi Sense HAT - For the Pi 3 / 2 / B+ / A+ > https://www.adafruit.com/products/2738 Wonderful toy. Two up on the ISS right now. > > Pi-EzConnect Terminal Block Breakout HAT > https://www.adafruit.com/products/2711 Neat; hadn?t seen that before - but the starter kit includes a breadboard anyway. I have a really nice Wombat breadboard. http://www.gooligum.com.au/wombat-proto http://www.microcenter.com/product/454348/wombat_prototyping_board_for_raspberry_pi > > I?ll post my initial setup script tomorrow sometime. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim fallacio (n): speaking logical fallacies From Marcel.Taeumel at hpi.de Thu Jun 9 07:06:48 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jun 9 07:45:27 2016 Subject: [squeak-dev] Re: trunk IDE has become sluggish In-Reply-To: References: Message-ID: <1465456008575-4900066.post@n4.nabble.com> Hi Chris, Smart Splitters are as fast as always. :) Do you experience that behavior in a fresh trunk VM or your personal working image? Since SmartSplitters use Morphic stepping, there is no connection to event filters. Best, Marcel -- View this message in context: http://forum.world.st/trunk-IDE-has-become-sluggish-tp4900023p4900066.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Jun 9 07:08:15 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jun 9 07:46:52 2016 Subject: [squeak-dev] Re: trunk IDE has become sluggish In-Reply-To: References: Message-ID: <1465456095767-4900067.post@n4.nabble.com> Hi Chris, since you also noticed a strange behavior with my mouse-wheel change set [1], I suppose your working image has some individual hick-ups, which are unrelated to the trunk. Try setting up a new one. Best, Marcel [1] http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899431.html -- View this message in context: http://forum.world.st/trunk-IDE-has-become-sluggish-tp4900023p4900067.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Jun 9 12:18:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 12:18:58 2016 Subject: [squeak-dev] The Trunk: XML-Parser-topa.38.mcz Message-ID: Tobias Pape uploaded a new version of XML-Parser to project The Trunk: http://source.squeak.org/trunk/XML-Parser-topa.38.mcz ==================== Summary ==================== Name: XML-Parser-topa.38 Author: topa Time: 9 June 2016, 2:18:47.587644 pm UUID: 04dceb47-db2b-4617-86ac-737264db4bbd Ancestors: XML-Parser-bf.37 Fix SAX namespace handling Add FileService to Explore XML files (includes external Drag'n'Drop) =============== Diff against XML-Parser-bf.37 =============== Item was changed: ----- Method: SAXDriver>>handleStartTag:attributes:namespaces: (in category 'handling tokens') ----- handleStartTag: elementName attributes: attributeList namespaces: namespaces | localName namespace namespaceURI | (attributeList includesKey: 'xml:lang') ifTrue: [languageEnvironment := LanguageEnvironment localeID: (LocaleID isoString: (attributeList at: 'xml:lang'))]. self usesNamespaces ifTrue: [ self scope enterScope. "declare any namespaces" namespaces keysAndValuesDo: [:ns :uri | self scope declareNamespace: ns uri: uri]. self splitName: elementName into: [:ns :ln | namespace := ns. localName := ln]. + namespaceURI := self scope + namespaceURIOf: namespace + ifAbsent: [self parseError: 'Start tag ' , elementName , ' refers to undefined namespace ' , namespace asString]. - "ensure our namespace is defined" - namespace - ifNil: [namespace := self scope defaultNamespace] - ifNotNil: [ - namespaceURI := self scope namespaceURIOf: namespace. - namespaceURI - ifNil: [self parseError: 'Start tag ' , elementName , ' refers to undefined namespace ' , namespace asString]]. self validatesAttributes ifTrue: [self scope validateAttributes: attributeList]. "call the handler" self saxHandler checkEOD; startElement: localName namespaceURI: namespaceURI namespace: namespace attributeList: attributeList] ifFalse: [ "call the handler" self saxHandler checkEOD; startElement: elementName namespaceURI: nil namespace: nil attributeList: attributeList]! Item was added: + ----- Method: XMLDOMParser class>>fileReaderServicesForFile:suffix: (in category 'file reader services') ----- + fileReaderServicesForFile: fullName suffix: suffix + + " some known suffixes " + ^ ((#('xml' 'xsl' 'xhtml' 'sif' 'rss' 'atom' '*') includes: suffix) + or: [self looksLikeXML: fullName]) + ifFalse: [#()] + ifTrue: [{self serviceExplore}]! Item was added: + ----- Method: XMLDOMParser class>>initialize (in category 'initialize-release') ----- + initialize + "register the receiver in the global registries" + self environment + at: #FileList + ifPresent: [:cl | cl registerFileReader: self]! Item was added: + ----- Method: XMLDOMParser class>>looksLikeXML: (in category 'file reader services') ----- + looksLikeXML: fullName + + [ | sample | + FileStream readOnlyFileNamed: fullName do: + [:stream | + stream isBinary ifTrue: [^ false]. + sample := (stream next: 20) withBlanksTrimmed]. + ^ sample first = $< + and: [ (#( $!! $? $: $_ ) includes: sample second) + or: [sample second isLetter]] + ] on: Error do: [^ false "backstop"]! Item was added: + ----- Method: XMLDOMParser class>>serviceExplore (in category 'file reader services') ----- + serviceExplore + + ^ SimpleServiceEntry + provider: [:fullName | + (FileStream readOnlyFileNamed: fullName do: + [:file | self parseDocumentFrom: file useNamespaces: true]) explore] + label: 'explore XML' + selector: #value: + description: 'read and partse the file and explore its XML structure' + buttonLabel: 'explore'! Item was added: + ----- Method: XMLDOMParser class>>unload (in category 'initialize-release') ----- + unload + "Unload the receiver from global registries" + self environment + at: #FileList + ifPresent: [:cl | cl unregisterFileReader: self]! From hannes.hirzel at gmail.com Thu Jun 9 13:07:29 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Jun 9 13:07:33 2016 Subject: [squeak-dev] The Trunk: XML-Parser-topa.38.mcz In-Reply-To: <57595eb3.e53aed0a.59dc5.1f7cSMTPIN_ADDED_MISSING@mx.google.com> References: <57595eb3.e53aed0a.59dc5.1f7cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Minor error: instead of + description: 'read and partse the file and explore its XML structure' parse On Thu, 9 Jun 2016 12:18:49.869 0000, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of XML-Parser to project The Trunk: > http://source.squeak.org/trunk/XML-Parser-topa.38.mcz > > ==================== Summary ==================== > > Name: XML-Parser-topa.38 > Author: topa > Time: 9 June 2016, 2:18:47.587644 pm > UUID: 04dceb47-db2b-4617-86ac-737264db4bbd > Ancestors: XML-Parser-bf.37 > > Fix SAX namespace handling > Add FileService to Explore XML files (includes external Drag'n'Drop) > > =============== Diff against XML-Parser-bf.37 =============== > > Item was changed: > ----- Method: SAXDriver>>handleStartTag:attributes:namespaces: (in > category 'handling tokens') ----- > handleStartTag: elementName attributes: attributeList namespaces: > namespaces > > | localName namespace namespaceURI | > > (attributeList includesKey: 'xml:lang') > ifTrue: [languageEnvironment := LanguageEnvironment localeID: (LocaleID > isoString: (attributeList at: 'xml:lang'))]. > self usesNamespaces > ifTrue: [ > self scope enterScope. > "declare any namespaces" > namespaces keysAndValuesDo: [:ns :uri | > self scope declareNamespace: ns uri: uri]. > > self splitName: elementName into: [:ns :ln | > namespace := ns. > localName := ln]. > > + namespaceURI := self scope > + namespaceURIOf: namespace > + ifAbsent: [self parseError: 'Start tag ' , elementName , ' refers to > undefined namespace ' , namespace asString]. > - "ensure our namespace is defined" > - namespace > - ifNil: [namespace := self scope defaultNamespace] > - ifNotNil: [ > - namespaceURI := self scope namespaceURIOf: namespace. > - namespaceURI > - ifNil: [self parseError: 'Start tag ' , elementName , ' refers to > undefined namespace ' , namespace asString]]. > > self validatesAttributes > ifTrue: [self scope validateAttributes: attributeList]. > "call the handler" > self saxHandler > checkEOD; > startElement: localName namespaceURI: namespaceURI namespace: > namespace attributeList: attributeList] > ifFalse: [ > "call the handler" > self saxHandler > checkEOD; > startElement: elementName namespaceURI: nil namespace: nil > attributeList: attributeList]! > > Item was added: > + ----- Method: XMLDOMParser class>>fileReaderServicesForFile:suffix: (in > category 'file reader services') ----- > + fileReaderServicesForFile: fullName suffix: suffix > + > + " some known suffixes " > + ^ ((#('xml' 'xsl' 'xhtml' 'sif' 'rss' 'atom' '*') includes: suffix) > + or: [self looksLikeXML: fullName]) > + ifFalse: [#()] > + ifTrue: [{self serviceExplore}]! > > Item was added: > + ----- Method: XMLDOMParser class>>initialize (in category > 'initialize-release') ----- > + initialize > + "register the receiver in the global registries" > + self environment > + at: #FileList > + ifPresent: [:cl | cl registerFileReader: self]! > > Item was added: > + ----- Method: XMLDOMParser class>>looksLikeXML: (in category 'file reader > services') ----- > + looksLikeXML: fullName > + > + [ | sample | > + FileStream readOnlyFileNamed: fullName do: > + [:stream | > + stream isBinary ifTrue: [^ false]. > + sample := (stream next: 20) withBlanksTrimmed]. > + ^ sample first = $< > + and: [ (#( $!! $? $: $_ ) includes: sample second) > + or: [sample second isLetter]] > + ] on: Error do: [^ false "backstop"]! > > Item was added: > + ----- Method: XMLDOMParser class>>serviceExplore (in category 'file reader > services') ----- > + serviceExplore > + > + ^ SimpleServiceEntry > + provider: [:fullName | > + (FileStream readOnlyFileNamed: fullName do: > + [:file | self parseDocumentFrom: file useNamespaces: true]) explore] > + label: 'explore XML' > + selector: #value: > + description: 'read and partse the file and explore its XML structure' > + buttonLabel: 'explore'! > > Item was added: > + ----- Method: XMLDOMParser class>>unload (in category > 'initialize-release') ----- > + unload > + "Unload the receiver from global registries" > + self environment > + at: #FileList > + ifPresent: [:cl | cl unregisterFileReader: self]! > > > From commits at source.squeak.org Thu Jun 9 13:11:47 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 13:11:49 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1171.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1171.mcz ==================== Summary ==================== Name: Morphic-mt.1171 Author: mt Time: 9 June 2016, 3:10:58.946908 pm UUID: 6747743c-ceec-3940-897f-9dc223e4ce04 Ancestors: Morphic-bf.1170 Fixes a regression in the keyboard shortcuts for the world main docking bar. On Mac OS platforms, recent VMs do not generate correct key-down events but still correct key-stroke events. On Windows platforms, VMs do only generate key-down events for some CTRL modifier combinations, especially numbers, but then no key-strokes. Linux is fine, I guess. =============== Diff against Morphic-bf.1170 =============== Item was changed: ----- Method: DockingBarMorph>>filterEvent:for: (in category 'events-processing') ----- filterEvent: aKeyboardEvent for: anObject "Provide keyboard shortcuts." | index itemToSelect | + - - aKeyboardEvent isKeyDown "No #isKeystroke to improve compatibility for all platforms." - ifFalse: [^ aKeyboardEvent]. - aKeyboardEvent controlKeyPressed ifFalse: [^ aKeyboardEvent]. + + (aKeyboardEvent isKeyDown or: [aKeyboardEvent isKeystroke]) "We also need #keyDown for Windows platforms because CTRL+X does not trigger key strokes there..." + ifFalse: [^ aKeyboardEvent]. + - "Search field." aKeyboardEvent keyCharacter = $0 ifTrue: [ self searchBarMorph ifNotNil: [ :morph | morph model activate: aKeyboardEvent in: morph ]. ^ aKeyboardEvent ignore "hit!!"]. "Select menu items." (aKeyboardEvent keyValue between: $1 asciiValue and: $9 asciiValue) ifFalse: [^ aKeyboardEvent]. index := aKeyboardEvent keyValue - $1 asciiValue + 1. itemToSelect := (self submorphs select: [ :each | each isKindOf: DockingBarItemMorph ]) at: index ifAbsent: [^ aKeyboardEvent]. self activate: aKeyboardEvent. self selectItem: itemToSelect event: aKeyboardEvent. ^ aKeyboardEvent ignore "hit!!"! From Das.Linux at gmx.de Thu Jun 9 13:15:07 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Jun 9 13:15:11 2016 Subject: [squeak-dev] The Trunk: XML-Parser-topa.38.mcz In-Reply-To: References: <57595eb3.e53aed0a.59dc5.1f7cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <94888F3C-69DD-441E-ADC3-D802F74F9C8F@gmx.de> On 09.06.2016, at 15:07, H. Hirzel wrote: > Minor error: > > instead of > > + description: 'read and partse the file and explore its > XML structure' > parse Thanks! I blame it on my plenking-hands :D Best -Tobias > > On Thu, 9 Jun 2016 12:18:49.869 0000, commits@source.squeak.org > wrote: >> Tobias Pape uploaded a new version of XML-Parser to project The Trunk: >> http://source.squeak.org/trunk/XML-Parser-topa.38.mcz >> >> ==================== Summary ==================== >> >> Name: XML-Parser-topa.38 >> Author: topa >> Time: 9 June 2016, 2:18:47.587644 pm >> UUID: 04dceb47-db2b-4617-86ac-737264db4bbd >> Ancestors: XML-Parser-bf.37 >> >> Fix SAX namespace handling >> Add FileService to Explore XML files (includes external Drag'n'Drop) >> >> =============== Diff against XML-Parser-bf.37 =============== >> >> Item was changed: >> ----- Method: SAXDriver>>handleStartTag:attributes:namespaces: (in >> category 'handling tokens') ----- >> handleStartTag: elementName attributes: attributeList namespaces: >> namespaces >> >> | localName namespace namespaceURI | >> >> (attributeList includesKey: 'xml:lang') >> ifTrue: [languageEnvironment := LanguageEnvironment localeID: (LocaleID >> isoString: (attributeList at: 'xml:lang'))]. >> self usesNamespaces >> ifTrue: [ >> self scope enterScope. >> "declare any namespaces" >> namespaces keysAndValuesDo: [:ns :uri | >> self scope declareNamespace: ns uri: uri]. >> >> self splitName: elementName into: [:ns :ln | >> namespace := ns. >> localName := ln]. >> >> + namespaceURI := self scope >> + namespaceURIOf: namespace >> + ifAbsent: [self parseError: 'Start tag ' , elementName , ' refers to >> undefined namespace ' , namespace asString]. >> - "ensure our namespace is defined" >> - namespace >> - ifNil: [namespace := self scope defaultNamespace] >> - ifNotNil: [ >> - namespaceURI := self scope namespaceURIOf: namespace. >> - namespaceURI >> - ifNil: [self parseError: 'Start tag ' , elementName , ' refers to >> undefined namespace ' , namespace asString]]. >> >> self validatesAttributes >> ifTrue: [self scope validateAttributes: attributeList]. >> "call the handler" >> self saxHandler >> checkEOD; >> startElement: localName namespaceURI: namespaceURI namespace: >> namespace attributeList: attributeList] >> ifFalse: [ >> "call the handler" >> self saxHandler >> checkEOD; >> startElement: elementName namespaceURI: nil namespace: nil >> attributeList: attributeList]! >> >> Item was added: >> + ----- Method: XMLDOMParser class>>fileReaderServicesForFile:suffix: (in >> category 'file reader services') ----- >> + fileReaderServicesForFile: fullName suffix: suffix >> + >> + " some known suffixes " >> + ^ ((#('xml' 'xsl' 'xhtml' 'sif' 'rss' 'atom' '*') includes: suffix) >> + or: [self looksLikeXML: fullName]) >> + ifFalse: [#()] >> + ifTrue: [{self serviceExplore}]! >> >> Item was added: >> + ----- Method: XMLDOMParser class>>initialize (in category >> 'initialize-release') ----- >> + initialize >> + "register the receiver in the global registries" >> + self environment >> + at: #FileList >> + ifPresent: [:cl | cl registerFileReader: self]! >> >> Item was added: >> + ----- Method: XMLDOMParser class>>looksLikeXML: (in category 'file reader >> services') ----- >> + looksLikeXML: fullName >> + >> + [ | sample | >> + FileStream readOnlyFileNamed: fullName do: >> + [:stream | >> + stream isBinary ifTrue: [^ false]. >> + sample := (stream next: 20) withBlanksTrimmed]. >> + ^ sample first = $< >> + and: [ (#( $!! $? $: $_ ) includes: sample second) >> + or: [sample second isLetter]] >> + ] on: Error do: [^ false "backstop"]! >> >> Item was added: >> + ----- Method: XMLDOMParser class>>serviceExplore (in category 'file reader >> services') ----- >> + serviceExplore >> + >> + ^ SimpleServiceEntry >> + provider: [:fullName | >> + (FileStream readOnlyFileNamed: fullName do: >> + [:file | self parseDocumentFrom: file useNamespaces: true]) explore] >> + label: 'explore XML' >> + selector: #value: >> + description: 'read and partse the file and explore its XML structure' >> + buttonLabel: 'explore'! >> >> Item was added: >> + ----- Method: XMLDOMParser class>>unload (in category >> 'initialize-release') ----- >> + unload >> + "Unload the receiver from global registries" >> + self environment >> + at: #FileList >> + ifPresent: [:cl | cl unregisterFileReader: self]! From commits at source.squeak.org Thu Jun 9 13:16:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 13:16:27 2016 Subject: [squeak-dev] The Trunk: XML-Parser-topa.39.mcz Message-ID: Tobias Pape uploaded a new version of XML-Parser to project The Trunk: http://source.squeak.org/trunk/XML-Parser-topa.39.mcz ==================== Summary ==================== Name: XML-Parser-topa.39 Author: topa Time: 9 June 2016, 3:16:16.924836 pm UUID: 33e09f13-48b9-47a4-809f-f309fb228dd2 Ancestors: XML-Parser-topa.38 fix typo =============== Diff against XML-Parser-topa.38 =============== Item was changed: ----- Method: XMLDOMParser class>>serviceExplore (in category 'file reader services') ----- serviceExplore ^ SimpleServiceEntry provider: [:fullName | (FileStream readOnlyFileNamed: fullName do: [:file | self parseDocumentFrom: file useNamespaces: true]) explore] label: 'explore XML' selector: #value: + description: 'read and parse the file and explore its XML structure' - description: 'read and partse the file and explore its XML structure' buttonLabel: 'explore'! From commits at source.squeak.org Thu Jun 9 14:23:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 14:23:18 2016 Subject: [squeak-dev] The Trunk: XML-Explorer-topa.1.mcz Message-ID: Tobias Pape uploaded a new version of XML-Explorer to project The Trunk: http://source.squeak.org/trunk/XML-Explorer-topa.1.mcz ==================== Summary ==================== Name: XML-Explorer-topa.1 Author: topa Time: 9 June 2016, 4:23:14.612174 pm UUID: 163e18e6-abb1-4fbc-8648-3c76cedd6809 Ancestors: Improve experience of exploring XML documents ==================== Snapshot ==================== ----- Method: XMLElement>>asExplorerString (in category '*XML-Explorer') ----- asExplorerString ^ String streamContents: [:stream | self elementsAndContentsDo: [:node | node isText ifTrue: [stream nextPutAll: node asExplorerString] ifFalse: [ | writer | writer := XMLWriter on: stream. node printXMLOn: writer]]]! ----- Method: XMLElement>>explorerContents (in category '*XML-Explorer') ----- explorerContents ^ super explorerContents, (self attributes keysSortedSafely collect: [ :key | ObjectExplorerWrapper with: (self attributes at: key) name: (key asString contractTo: 32) model: self attributes ]) ! ----- Method: XMLNodeWithElements>>explorerContents (in category '*XML-Explorer') ----- explorerContents ^ self elementsAndContents collect: [:element | | name | name := element isTag ifTrue: ['<{1}>' format: {element name}] ifFalse: [element isText ifTrue: ['[character data]'] ifFalse: [element]]. ObjectExplorerWrapper with: element name: (name asString contractTo: 32) model: self ] ! ----- Method: XMLDocument>>asExplorerString (in category '*XML-Explorer') ----- asExplorerString ^ String streamContents: [:stream | stream nextPutAll: self topElement localName; nextPutAll: ' (XML'. version ifNotNil: [:v | stream space; nextPutAll: v]. encoding ifNotNil: [:e | stream space; nextPutAll: e]. stream nextPut: $)].! ----- Method: XMLStringNode>>asExplorerString (in category '*XML-Explorer') ----- asExplorerString ^ self string! ----- Method: XMLStringNode>>hasContentsInExplorer (in category '*XML-Explorer') ----- hasContentsInExplorer ^false! From commits at source.squeak.org Thu Jun 9 15:50:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 15:50:23 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1172.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1172.mcz ==================== Summary ==================== Name: Morphic-mt.1172 Author: mt Time: 9 June 2016, 5:49:44.914737 pm UUID: 7edaede6-4c07-6d4c-86da-80fa395b8d3c Ancestors: Morphic-mt.1171 Minor performance improvement by avoiding unnecessary focus look cycling for already focused windows. Affects mouse-down interactions. =============== Diff against Morphic-mt.1171 =============== Item was changed: ----- Method: SystemWindow>>updateFocusLookForKeyboardFocus (in category 'focus') ----- updateFocusLookForKeyboardFocus | f w | (((f := self activeHand keyboardFocus) notNil and: [(w := f containingWindow) notNil]) and: [w isActive]) ifTrue: [ + (self class windowsIn: self world) do: [:window | + w ~~ window ifTrue: [window lookUnfocused]]. - (self class windowsIn: self world) do: [:window | window lookUnfocused]. w lookFocused]! From commits at source.squeak.org Thu Jun 9 16:07:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 16:07:46 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1173.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1173.mcz ==================== Summary ==================== Name: Morphic-mt.1173 Author: mt Time: 9 June 2016, 6:07:00.171737 pm UUID: b06fd718-929f-a048-9edb-bd777dcced92 Ancestors: Morphic-mt.1172 Fixes a bug where pop-up menus in active background windows where occluded by the window after the mouse-down if such windows also do raise on any mouse down. =============== Diff against Morphic-mt.1172 =============== Item was changed: ----- Method: SystemWindow>>beKeyWindowIfNeeded: (in category 'top window') ----- beKeyWindowIfNeeded: evt "Make me the new key window if needed. Ensure that the focus look matches the keyboard focus." (self isKeyWindow not and: [self class windowsRaiseOnClick or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) + ifFalse: [ + "Just ensure the correct look after the event." + self updateFocusLookForKeyboardFocus] + ifTrue: [ + "We are the new key window at the front etc." + self beKeyWindow. + "There may have been a pop-up menu spawned. We do not want to occlude that." + evt hand mouseFocus ifNotNil: [:morph | + morph owner = self world ifTrue: [morph comeToFront]]. + evt hand balloonHelpList do: [:morph | + morph comeToFront]]! - ifTrue: [self beKeyWindow] - ifFalse: [self updateFocusLookForKeyboardFocus].! From lewis at mail.msen.com Thu Jun 9 17:48:39 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 9 17:48:42 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: References: Message-ID: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> This really looks very useful, and the graphs and trend lines are nice for visualization. Would there be any value in adding an interpreter VM as a baseline to show Cog/Spur/RSqueak compared to a non-optimized VM? Dave > Hi, > > I sent around a note earlier about a benchmarking tool that we're using > internally to track RSqueak/VM performance on each commit. Every time > Eliot > releases a new set of Cog VMs, I also manually trigger the system to run > benchmarks on Cog. (Once we move the proper VM to Github, I will set it up > so we test each commit on the main development branch and the release > branch, too, so we will have very detailed breakdowns.) We wanted to share > this setup and the results with the community. > > We're collecting results in a Codespeed website (just a frontend to > present > the data) which we moved to speed.squeak.org today, and it is also linked > from the squeak.org website (http://squeak.org/codespeed/). > > We have some info about the setup on the about page: > http://speed.squeak.org/about. On the Changes tab, you can see the most > recent results per platform and environment, with details about the > machines on the bottom. Note that we calculate all the statistics on the > workers themselves and only send the time and std dev, so the results' min > and max values you see on the website are bogus. > > Finally, the code for the workers also is on Github ( > https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks > are > all organized in Squeaksource ( > http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). > Right now I've just dumped benchmarks from various sources in there, > that's > why you see the same benchmark implemented multiple times in different > ways, and some micro benchmarks don't make too much sense as they are. > We're happy to get comments, feedback, or updated versions of the > benchmarking packages. Updating the benchmarking code is easy, and we hope > this setup proves to be useful enough for the community to warrant > continuously updating and extending the set of benchmarks. > > We are also planning to add more platforms, the setup should make this > fairly painless, we just need the dedicated machines. We've been testing > the standard Cog/Spur VM on a Ubuntu machine, and today we added a > Raspberry Pi 1 that is still churning through the latest Cog and > RSqueak/VM > commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS and > other builds of the Squeak VM, too. > > Cheers, > Tim > > From tim at rowledge.org Thu Jun 9 18:47:51 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 9 18:47:47 2016 Subject: [squeak-dev] trunk IDE has become sluggish In-Reply-To: <12B1BE72-84ED-4CA1-BE88-1C25448827FF@rowledge.org> References: <14F9DCC1-E7AF-4A0B-AB72-096A94FC8B7F@rowledge.org> <20160609011532.GB95282@shell.msen.com> <12B1BE72-84ED-4CA1-BE88-1C25448827FF@rowledge.org> Message-ID: > On 08-06-2016, at 9:30 PM, tim Rowledge wrote: > > I?ll post my initial setup script tomorrow sometime. Try out this as a general setup - using ?raspi-config?, set your locale/tz/etc, as well as setting a host name, enabling ssh and i2c and SPI interfaces. And the camera if you bought one. Which you should, since taking selfies with Scratch is cool. basic packages I find useful - `sudo apt-get install netatalk libnss-mdns xrdp i2c-tools` development tools - `sudo apt-get install libX11-dev uuid-dev libcairo2-dev libpango1.0-dev autoconf libasound2-dev libssl-dev` save some space - `sudo apt-get remove wolfram-engine` - to get rid of wolfram, 450Mb and a broken init script issue I use NFS to connect to my iMac; it seems faster and more usable than samba for my usage. IF you want to do that just let me know and I can send my nfs setup recipe. Oh, yes, curses. As in stupid X11 default cursor is stupid. edit .xsessionrc (creating if required) with `nano .xsessionrc` add "xsetroot -cursor_name left_ptr&" `chmod a+x .xsessionrc` reboot to get proper cursor in X instead of a big ugly X Getting a working Squeak is as simple as downloading the all-in-one, though the cog vm in /usr/lib/squeak is possibly newer. I use microsoft?s remote desktop client on my iMac to save having a separate display, although I do have one Pi with an official 7? touchscreen on one side and three Pi-TopCEED machine arriving soon for classes. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Great leaders inspire by example. When that's not an option, brute intimidation works pretty well. From asqueaker at gmail.com Thu Jun 9 19:59:58 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 9 20:00:41 2016 Subject: [squeak-dev] Re: trunk IDE has become sluggish In-Reply-To: <1465456095767-4900067.post@n4.nabble.com> References: <1465456095767-4900067.post@n4.nabble.com> Message-ID: I figured out SS seem slow on large lists (even in Squeak 5.0), which is strange since I thought I made it only look at the *visible* portions.. I'll have to investigate that later. So probably everything is fine, I'll pay attention in case it happens on a short list. Thanks. On Thu, Jun 9, 2016 at 2:08 AM, marcel.taeumel wrote: > Hi Chris, > > since you also noticed a strange behavior with my mouse-wheel change set > [1], I suppose your working image has some individual hick-ups, which are > unrelated to the trunk. Try setting up a new one. > > Best, > Marcel > > [1] > http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899431.html > > > > -- > View this message in context: http://forum.world.st/trunk-IDE-has-become-sluggish-tp4900023p4900067.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Thu Jun 9 21:56:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 9 21:56:56 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160609215654.25251.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-June/068198.html Name: Graphics-tpr.343 Ancestors: Graphics-tpr.342 Add the most trivial beginnings of a unix/x11 host window proxy - just enough to run tests to demonstrate that the plugin needs work ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068199.html Name: XML-Parser-topa.38 Ancestors: XML-Parser-bf.37 Fix SAX namespace handling Add FileService to Explore XML files (includes external Drag'n'Drop) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068200.html Name: Morphic-mt.1171 Ancestors: Morphic-bf.1170 Fixes a regression in the keyboard shortcuts for the world main docking bar. On Mac OS platforms, recent VMs do not generate correct key-down events but still correct key-stroke events. On Windows platforms, VMs do only generate key-down events for some CTRL modifier combinations, especially numbers, but then no key-strokes. Linux is fine, I guess. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068201.html Name: XML-Parser-topa.39 Ancestors: XML-Parser-topa.38 fix typo ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068202.html Name: XML-Explorer-topa.1 Ancestors: Improve experience of exploring XML documents ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068203.html Name: Morphic-mt.1172 Ancestors: Morphic-mt.1171 Minor performance improvement by avoiding unnecessary focus look cycling for already focused windows. Affects mouse-down interactions. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068204.html Name: Morphic-mt.1173 Ancestors: Morphic-mt.1172 Fixes a bug where pop-up menus in active background windows where occluded by the window after the mouse-down if such windows also do raise on any mouse down. ============================================= From btc at openinworld.com Thu Jun 9 23:55:46 2016 From: btc at openinworld.com (Ben Coman) Date: Thu Jun 9 23:56:09 2016 Subject: [squeak-dev] Pi3 accessories Message-ID: On Fri, Jun 10, 2016 at 2:47 AM, tim Rowledge wrote: > >> On 08-06-2016, at 9:30 PM, tim Rowledge wrote: >> >> I?ll post my initial setup script tomorrow sometime. > > Try out this as a general setup - > using ?raspi-config?, set your locale/tz/etc, as well as setting a host name, enabling ssh and i2c and SPI interfaces. And the camera if you bought one. Which you should, since taking selfies with Scratch is cool. Can you recommend a camera for Pi3. The one I got turned out only Pi2 compatible. cheers -ben From eliot.miranda at gmail.com Fri Jun 10 00:14:01 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 10 00:15:10 2016 Subject: [squeak-dev] Laura Perez Cerrato Message-ID: Hi All, I vote that Laura Perez Cerrato be made a trunk developer with full write rights so that she can commit her changes to ColorForm and the JPEGReadWriter2 code to support greyscale JPEGs in her own right. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160609/e42038b5/attachment.htm From lewis at mail.msen.com Fri Jun 10 00:21:31 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Jun 10 00:21:33 2016 Subject: [squeak-dev] Laura Perez Cerrato In-Reply-To: References: Message-ID: <20160610002131.GA78172@shell.msen.com> On Thu, Jun 09, 2016 at 05:14:01PM -0700, Eliot Miranda wrote: > Hi All, > > I vote that Laura Perez Cerrato be made a > trunk developer with full write rights so that she can commit her changes > to ColorForm and the JPEGReadWriter2 code to support greyscale JPEGs in her > own right. +1 Dave From tim at rowledge.org Fri Jun 10 00:54:29 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 10 00:54:23 2016 Subject: [squeak-dev] Pi3 accessories In-Reply-To: References: Message-ID: > On 09-06-2016, at 4:55 PM, Ben Coman wrote: > > On Fri, Jun 10, 2016 at 2:47 AM, tim Rowledge wrote: >> >>> On 08-06-2016, at 9:30 PM, tim Rowledge wrote: >>> >>> I?ll post my initial setup script tomorrow sometime. >> >> Try out this as a general setup - >> using ?raspi-config?, set your locale/tz/etc, as well as setting a host name, enabling ssh and i2c and SPI interfaces. And the camera if you bought one. Which you should, since taking selfies with Scratch is cool. > > Can you recommend a camera for Pi3. The one I got turned out only Pi2 > compatible. Any of the official modules would do nicely. There?s the original 5Mp unit in normal or no-IR filter form ,or the new 8Mp unit likewise. https://www.raspberrypi.org/products/camera-module-v2/ https://www.adafruit.com/products/3099 I have no experience with any other camera units. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- FUI GENERIS - What's mine is mine From tim at rowledge.org Fri Jun 10 01:06:02 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 10 01:05:55 2016 Subject: [squeak-dev] Laura Perez Cerrato In-Reply-To: <20160610002131.GA78172@shell.msen.com> References: <20160610002131.GA78172@shell.msen.com> Message-ID: <6A44F475-81A3-4BB2-869E-4C6C663457D3@rowledge.org> > On 09-06-2016, at 5:21 PM, David T. Lewis wrote: > > On Thu, Jun 09, 2016 at 05:14:01PM -0700, Eliot Miranda wrote: >> Hi All, >> >> I vote that Laura Perez Cerrato be made a >> trunk developer with full write rights so that she can commit her changes >> to ColorForm and the JPEGReadWriter2 code to support greyscale JPEGs in her >> own right. > > +1 Likewise. Effort deserves reward. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Thesaurus: Ancient reptile with a truly extensive vocabulary From tim at rowledge.org Fri Jun 10 03:43:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 10 03:43:36 2016 Subject: [squeak-dev] Some change, probably in Morphic classes, breaks Scratch between #15852 & 16040 Message-ID: Whilst attempting a build of Scratch in a fully updated image it became clear that something has pretty seriously changed some part of morph dragging that I relied upon; when I drag a script tile and drop it, it no longer gets dropped into the scripting area but stays in the main world (I think). In a 15852 update from late April it works ok. In a 16040 update today it doesn?t. That?s a lot of updates to look over? I was intending to start a quick (hah!) binary search for where things went wrong but I can?t find hoe to load updates up to a certain number. I?m sure it used to be there but it might be 15 years since I had reason to do that :-O McmUpdater doesn?t appear to have any code that could do it but where else might I look? Of course, if anyone can think of a place where my problem might lie, do please let me know. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BFM: Branch on Full Moon From Marcel.Taeumel at hpi.de Fri Jun 10 06:44:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 07:22:50 2016 Subject: [squeak-dev] Re: Laura Perez Cerrato In-Reply-To: References: Message-ID: <1465541045207-4900258.post@n4.nabble.com> +1 :) Best, Marcel -- View this message in context: http://forum.world.st/Laura-Perez-Cerrato-tp4900233p4900258.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From craig at blackpagedigital.com Fri Jun 10 07:25:02 2016 From: craig at blackpagedigital.com (Craig Latta) Date: Fri Jun 10 07:25:21 2016 Subject: [squeak-dev] re: Laura Perez Cerrato In-Reply-To: References: Message-ID: > I vote that Laura Perez Cerrato be made a trunk developer with > full write rights so that she can commit her changes to ColorForm and > the JPEGReadWriter2 code to support greyscale JPEGs in her own right. Agreed! -C -- Craig Latta Black Page Digital Amsterdam craig@blackpagedigital.com +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From Marcel.Taeumel at hpi.de Fri Jun 10 07:01:35 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 07:40:20 2016 Subject: [squeak-dev] Re: Some change, probably in Morphic classes, breaks Scratch between #15852 & 16040 In-Reply-To: References: Message-ID: <1465542095346-4900262.post@n4.nabble.com> tim Rowledge wrote > Whilst attempting a build of Scratch in a fully updated image it became > clear that something has pretty seriously changed some part of morph > dragging that I relied upon; when I drag a script tile and drop it, it no > longer gets dropped into the scripting area but stays in the main world (I > think). > > In a 15852 update from late April it works ok. In a 16040 update today it > doesn?t. That?s a lot of updates to look over? I was intending to start a > quick (hah!) binary search for where things went wrong but I can?t find > hoe to load updates up to a certain number. I?m sure it used to be there > but it might be 15 years since I had reason to do that :-O McmUpdater > doesn?t appear to have any code that could do it but where else might I > look? > > Of course, if anyone can think of a place where my problem might lie, do > please let me know. > > tim > -- > tim Rowledge; > tim@ > ; http://www.rowledge.org/tim > Strange OpCodes: BFM: Branch on Full Moon Hi Tim, can you provide me an image? I think I know where to look for... The following things related to drop changed and suspicious overwrites in custom packages/applications might be affected: HandMorph >> #dropMorph:event: (nobody should have to overwrite this) Morph >> #processEvent:using: (nobody should have to overwrite this) Morph >> #handleFocusEvent: (if overwritten, ensure super-call and watch out for #rejected when manually calling #processEvent:; see DockingBarMorph, MenuMorph, and UserDialogBoxBox for example overwrites) So, I would look for custom implementations in Scratch of the above. Best, Marcel -- View this message in context: http://forum.world.st/Some-change-probably-in-Morphic-classes-breaks-Scratch-between-15852-16040-tp4900243p4900262.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 10 07:03:21 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 07:42:06 2016 Subject: [squeak-dev] Re: A speedcenter for Squeak In-Reply-To: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> References: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> Message-ID: <1465542201349-4900263.post@n4.nabble.com> David T. Lewis wrote > This really looks very useful, and the graphs and trend lines are nice for > visualization. > > Would there be any value in adding an interpreter VM as a baseline to show > Cog/Spur/RSqueak compared to a non-optimized VM? > > Dave > > >> Hi, >> >> I sent around a note earlier about a benchmarking tool that we're using >> internally to track RSqueak/VM performance on each commit. Every time >> Eliot >> releases a new set of Cog VMs, I also manually trigger the system to run >> benchmarks on Cog. (Once we move the proper VM to Github, I will set it >> up >> so we test each commit on the main development branch and the release >> branch, too, so we will have very detailed breakdowns.) We wanted to >> share >> this setup and the results with the community. >> >> We're collecting results in a Codespeed website (just a frontend to >> present >> the data) which we moved to speed.squeak.org today, and it is also linked >> from the squeak.org website (http://squeak.org/codespeed/). >> >> We have some info about the setup on the about page: >> http://speed.squeak.org/about. On the Changes tab, you can see the most >> recent results per platform and environment, with details about the >> machines on the bottom. Note that we calculate all the statistics on the >> workers themselves and only send the time and std dev, so the results' >> min >> and max values you see on the website are bogus. >> >> Finally, the code for the workers also is on Github ( >> https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks >> are >> all organized in Squeaksource ( >> http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). >> Right now I've just dumped benchmarks from various sources in there, >> that's >> why you see the same benchmark implemented multiple times in different >> ways, and some micro benchmarks don't make too much sense as they are. >> We're happy to get comments, feedback, or updated versions of the >> benchmarking packages. Updating the benchmarking code is easy, and we >> hope >> this setup proves to be useful enough for the community to warrant >> continuously updating and extending the set of benchmarks. >> >> We are also planning to add more platforms, the setup should make this >> fairly painless, we just need the dedicated machines. We've been testing >> the standard Cog/Spur VM on a Ubuntu machine, and today we added a >> Raspberry Pi 1 that is still churning through the latest Cog and >> RSqueak/VM >> commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS and >> other builds of the Squeak VM, too. >> >> Cheers, >> Tim >> >> +1 Best, Marcel -- View this message in context: http://forum.world.st/A-speedcenter-for-Squeak-tp4899946p4900263.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Jun 10 08:06:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 10 08:06:19 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1174.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1174.mcz ==================== Summary ==================== Name: Morphic-mt.1174 Author: mt Time: 10 June 2016, 10:05:39.530157 am UUID: c42f6aaa-7a24-d54a-85a7-7a2216238672 Ancestors: Morphic-mt.1173 Removes unused filter-event inst-vars from HandMorph, which I did not intended to commit in the first place. =============== Diff against Morphic-mt.1173 =============== Item was changed: Morph subclass: #HandMorph + instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' - instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventFilters mouseFilters keyboardFilters eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats NewEventRules NormalCursor PasteBuffer ShowEvents' poolDictionaries: 'EventSensorConstants' category: 'Morphic-Kernel'! !HandMorph commentStamp: '' prior: 0! The cursor may be thought of as the HandMorph. The hand's submorphs hold anything being carried by dragging. There is some minimal support for multiple hands in the same world.! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'HandMorph allInstancesDo: [:ea | ea initForEvents]. "Fixes the event handling that occurs in the same control flow after loading this code." + + SystemWindow allSubInstancesDo: [:ea | - (PackageInfo named: 'Morphic') postscript: 'SystemWindow allSubInstancesDo: [:ea | ea initializeKeyboardShortcuts. HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. PasteUpMorph allSubInstancesDo: [:ea | ea initializeKeyboardShortcuts. HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. DockingBarMorph allSubInstancesDo: [:ea | HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]].'! From commits at source.squeak.org Fri Jun 10 09:05:32 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 10 09:05:34 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1175.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1175.mcz ==================== Summary ==================== Name: Morphic-mt.1175 Author: mt Time: 10 June 2016, 11:04:52.621631 am UUID: aa560da5-379c-c542-adff-c909d0a671d2 Ancestors: Morphic-mt.1174 Adds mouse wheel events. For now, these events have to be synthesized from keystroke events (CTRL+up/down). There is a preference to control it. If there are mouse-wheel events, then you can disable "Send Mouse Wheel To Keyboard Focus" to have Mac OS scroll-wheel-feeling. If you also enable #mouseOverForKeyboardFocus, you will not notice a difference. This commit implements #mouseWheel: in ScrollPane but still has support for scroll-by-keyboard, that is, keystroke CTRL+up/down (via keyboard event filters, see ScrollPane >> #filterEvent:for:). This support might be removed in the future. For now, applications can disable "Synthesize Mouse Wheel Events" to not generate MouseWheel events at all and only rely on CTRL+up/down. Note that this commit has a postscript in the Morphic package to install an event filter in all hands to do the conversion of CTRL+up/down to MouseWheelEvent. This is the first application of our new event filters to convert a keyboard event into a mouse event. We should really update our VM to provide real mouse-wheel events... :-) =============== Diff against Morphic-mt.1174 =============== Item was changed: Object subclass: #EventHandler + instanceVariableNames: 'mouseDownRecipient mouseDownSelector mouseMoveRecipient mouseMoveSelector mouseStillDownRecipient mouseStillDownSelector mouseUpRecipient mouseUpSelector mouseEnterRecipient mouseEnterSelector mouseLeaveRecipient mouseLeaveSelector mouseEnterDraggingRecipient mouseEnterDraggingSelector mouseLeaveDraggingRecipient mouseLeaveDraggingSelector mouseWheelRecipient mouseWheelSelector keyStrokeRecipient keyStrokeSelector keyUpRecipient keyUpSelector keyDownRecipient keyDownSelector valueParameter startDragRecipient startDragSelector doubleClickSelector doubleClickRecipient doubleClickTimeoutSelector doubleClickTimeoutRecipient clickSelector clickRecipient keyboardFocusChangeRecipient keyboardFocusChangeSelector wantsEveryMouseMove' - instanceVariableNames: 'mouseDownRecipient mouseDownSelector mouseMoveRecipient mouseMoveSelector mouseStillDownRecipient mouseStillDownSelector mouseUpRecipient mouseUpSelector mouseEnterRecipient mouseEnterSelector mouseLeaveRecipient mouseLeaveSelector mouseEnterDraggingRecipient mouseEnterDraggingSelector mouseLeaveDraggingRecipient mouseLeaveDraggingSelector keyStrokeRecipient keyStrokeSelector keyUpRecipient keyUpSelector keyDownRecipient keyDownSelector valueParameter startDragRecipient startDragSelector doubleClickSelector doubleClickRecipient doubleClickTimeoutSelector doubleClickTimeoutRecipient clickSelector clickRecipient keyboardFocusChangeRecipient keyboardFocusChangeSelector wantsEveryMouseMove' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! !EventHandler commentStamp: '' prior: 0! Events in Morphic originate in a Hand, pass to a target morph, and are then dispatched by an EventHandler. EventHandlers support redirection of mouse and keyboard activity by specifying and independent recipient object and message selector for each of the possible events. In addition each eventHandler can supply an optional value parameter for distinguishing between, eg, events from a number of otherwise identical source morphs. The basic protocol of an event handler is to receive a message of the form mouseDown: event in: targetMorph and redirect this as one of mouseDownRecipient perform: mouseDownSelector0 mouseDownRecipient perform: mouseDownSelector1 with: event mouseDownRecipient perform: mouseDownSelector2 with: event with: targetMorph mouseDownRecipient perform: mouseDownSelector3 with: event with: targetMorph with: valueParameter depending on the arity of the mouseDownSelector. ! Item was added: + ----- Method: EventHandler>>handlesMouseWheel: (in category 'testing') ----- + handlesMouseWheel: evt + mouseWheelRecipient ifNotNil: [^ true]. + ^ false! Item was added: + ----- Method: EventHandler>>mouseWheel:fromMorph: (in category 'events') ----- + mouseWheel: event fromMorph: sourceMorph + ^ self + send: mouseWheelSelector + to: mouseWheelRecipient + withEvent: event + fromMorph: sourceMorph! Item was changed: ----- Method: EventHandler>>on:send:to: (in category 'initialization') ----- on: eventName send: selector to: recipient eventName == #mouseDown ifTrue: [mouseDownRecipient := recipient. mouseDownSelector := selector. ^ self]. eventName == #mouseMove ifTrue: [mouseMoveRecipient := recipient. mouseMoveSelector := selector. ^ self]. eventName == #mouseStillDown ifTrue: [mouseStillDownRecipient := recipient. mouseStillDownSelector := selector. ^ self]. eventName == #mouseUp ifTrue: [mouseUpRecipient := recipient. mouseUpSelector := selector. ^ self]. eventName == #mouseEnter ifTrue: [mouseEnterRecipient := recipient. mouseEnterSelector := selector. ^ self]. eventName == #mouseLeave ifTrue: [mouseLeaveRecipient := recipient. mouseLeaveSelector := selector. ^ self]. eventName == #mouseEnterDragging ifTrue: [mouseEnterDraggingRecipient := recipient. mouseEnterDraggingSelector := selector. ^ self]. eventName == #mouseLeaveDragging ifTrue: [mouseLeaveDraggingRecipient := recipient. mouseLeaveDraggingSelector := selector. ^ self]. eventName == #click ifTrue: [clickRecipient := recipient. clickSelector := selector. ^ self]. eventName == #doubleClick ifTrue: [doubleClickRecipient := recipient. doubleClickSelector := selector. ^ self]. eventName == #doubleClickTimeout ifTrue: [doubleClickTimeoutRecipient := recipient. doubleClickTimeoutSelector := selector. ^ self]. eventName == #startDrag ifTrue: [startDragRecipient := recipient. startDragSelector := selector. ^ self]. + eventName == #mouseWheel ifTrue: + [mouseWheelRecipient := recipient. mouseWheelSelector := selector. ^ self]. eventName == #keyStroke ifTrue: [keyStrokeRecipient := recipient. keyStrokeSelector := selector. ^ self]. eventName == #keyUp ifTrue: [keyUpRecipient := recipient. keyUpSelector := selector. ^ self]. eventName == #keyDown ifTrue: [keyDownRecipient := recipient. keyDownSelector := selector. ^ self]. eventName == #keyboardFocusChange ifTrue: [keyboardFocusChangeRecipient := recipient. keyboardFocusChangeSelector := selector. ^ self]. eventName == #gesture ifTrue: [ ^self onGestureSend: selector to: recipient ]. self error: 'Event name, ' , eventName , ' is not recognizable.' ! Item was changed: ----- Method: EventHandler>>printOn: (in category 'printing') ----- printOn: aStream | recipients | super printOn: aStream. + #('mouseDownSelector' 'mouseStillDownSelector' 'mouseUpSelector' 'mouseEnterSelector' 'mouseLeaveSelector' 'mouseEnterDraggingSelector' 'mouseLeaveDraggingSelector' 'mouseWheelSelector' 'doubleClickSelector' 'keyStrokeSelector' 'keyUpSelector' 'keyDownSelector' 'startDragSelector' 'clickSelector' 'keyboardFocusChangeSelector') - #('mouseDownSelector' 'mouseStillDownSelector' 'mouseUpSelector' 'mouseEnterSelector' 'mouseLeaveSelector' 'mouseEnterDraggingSelector' 'mouseLeaveDraggingSelector' 'doubleClickSelector' 'keyStrokeSelector') do: [:aName | | aVal | (aVal := self instVarNamed: aName) notNil ifTrue: [aStream nextPutAll: '; ' , aName , '=' , aVal]]. (recipients := self allRecipients) notEmpty ifTrue: [aStream nextPutAll: ' recipients: '. recipients printOn: aStream]! Item was changed: Morph subclass: #HandMorph instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' + classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats NewEventRules NormalCursor PasteBuffer SendMouseWheelToKeyboardFocus ShowEvents SynthesizeMouseWheelEvents' - classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats NewEventRules NormalCursor PasteBuffer ShowEvents' poolDictionaries: 'EventSensorConstants' category: 'Morphic-Kernel'! !HandMorph commentStamp: '' prior: 0! The cursor may be thought of as the HandMorph. The hand's submorphs hold anything being carried by dragging. There is some minimal support for multiple hands in the same world.! Item was added: + ----- Method: HandMorph class>>sendMouseWheelToKeyboardFocus (in category 'preferences') ----- + sendMouseWheelToKeyboardFocus + + ^ SendMouseWheelToKeyboardFocus ifNil: [true]! Item was added: + ----- Method: HandMorph class>>sendMouseWheelToKeyboardFocus: (in category 'preferences') ----- + sendMouseWheelToKeyboardFocus: aBoolean + SendMouseWheelToKeyboardFocus := aBoolean.! Item was added: + ----- Method: HandMorph class>>synthesizeMouseWheelEvents (in category 'preferences') ----- + synthesizeMouseWheelEvents + + ^ SynthesizeMouseWheelEvents ifNil: [true]! Item was added: + ----- Method: HandMorph class>>synthesizeMouseWheelEvents: (in category 'preferences') ----- + synthesizeMouseWheelEvents: aBoolean + SynthesizeMouseWheelEvents := aBoolean.! Item was added: + ----- Method: HandMorph>>filterEvent:for: (in category 'events-filtering') ----- + filterEvent: aKeyboardEvent for: aMorphOrNil + "Fixes VM behavior. Usually, there are no mouse wheel events generated by the VM but CTRL+UP/DOWN. Convert these into mouse wheel events. + + We installed ourself as keyboard filter only!! No need to check whether this is a keyboard event or not!! See HandMorph >> #initForEvents. + + Might be removed in the future if this mapping gets obsolete." + + HandMorph synthesizeMouseWheelEvents ifFalse: [^ aKeyboardEvent]. + + (aKeyboardEvent isKeystroke and: [aKeyboardEvent controlKeyPressed]) ifTrue: [ + aKeyboardEvent keyCharacter caseOf: { + [Character arrowUp] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: #up]. + [Character arrowDown] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: #down]. + } otherwise: [^ aKeyboardEvent]]. + + ^ aKeyboardEvent! Item was added: + ----- Method: HandMorph>>generateMouseWheelEvent:direction: (in category 'private events') ----- + generateMouseWheelEvent: keystrokeEvent direction: directionSymbol + "Generate the appropriate mouse wheel event from the keystrokeEvent. Before calling this, ensure that the control key is pressed." + + ^ MouseWheelEvent new + setType: #mouseWheel + position: keystrokeEvent position + direction: directionSymbol + buttons: (keystrokeEvent buttons bitAnd: 2r01111) "drop control key pressed for this conversion" + hand: keystrokeEvent hand + stamp: keystrokeEvent timeStamp! Item was changed: ----- Method: HandMorph>>handleEvent: (in category 'events-processing') ----- handleEvent: unfilteredEvent | filteredEvent | owner ifNil: [^ unfilteredEvent "not necessary but good style -- see Morph >> #handleEvent:"]. self logEvent: unfilteredEvent. "Mouse-over events occur really, really, really often. They are kind of the heart beat of the Morphic UI process." unfilteredEvent isMouseOver ifTrue: [^ self sendMouseEvent: unfilteredEvent]. self showEvent: unfilteredEvent. self sendListenEvents: unfilteredEvent. filteredEvent := self sendFilterEventCapture: unfilteredEvent for: nil. "filteredEvent := unfilteredEvent" " <-- use this to disable global capture filters" filteredEvent wasIgnored ifTrue: [ self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isWindowEvent ifTrue: [ self sendEvent: filteredEvent focus: nil. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isKeyboard ifTrue:[ self sendKeyboardEvent: filteredEvent. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isDropEvent ifTrue:[ self sendEvent: filteredEvent focus: nil. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isMouse ifFalse: [ self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. " ********** MOUSE EVENT *********** " lastMouseEvent := filteredEvent. "Check for pending drag or double click operations." mouseClickState ifNotNil:[ (mouseClickState handleEvent: filteredEvent from: self) ifFalse:[ "Possibly dispatched #click: or something and will not re-establish otherwise" self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]]. filteredEvent isMove ifTrue:[ self position: filteredEvent position. self sendMouseEvent: filteredEvent. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. "Issue a synthetic move event if we're not at the position of the event" filteredEvent position = self position ifFalse: [self moveToEvent: filteredEvent]. "Drop submorphs on button events" self hasSubmorphs ifTrue:[self dropMorphs: filteredEvent] + ifFalse:[ + "This check is here and not in #sendMouseEvent: to avoid unnecessary comparisons for mouse-over events." + (HandMorph sendMouseWheelToKeyboardFocus and: [filteredEvent isMouseWheel]) + ifFalse: [self sendMouseEvent: filteredEvent] + ifTrue: [self sendEvent: filteredEvent focus: self keyboardFocus clear: [self keyboardFocus: nil]]]. - ifFalse:[self sendMouseEvent: filteredEvent]. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent "not necessary but good style -- see Morph >> #handleEvent:" ! Item was changed: ----- Method: HandMorph>>initForEvents (in category 'initialization') ----- initForEvents mouseOverHandler := nil. lastMouseEvent := MouseEvent new setType: #mouseMove position: 0@0 buttons: 0 hand: self. lastEventBuffer := {1. 0. 0. 0. 0. 0. nil. nil}. + self resetClickState. + self addKeyboardCaptureFilter: self. "to convert unusual VM events"! - self resetClickState.! Item was changed: ----- Method: HandMorph>>showEvent: (in category 'events-debugging') ----- showEvent: anEvent "Show details about the event on the display form. Useful for debugging." + | message borderWidth | - | ofs | ShowEvents == true ifFalse: [^ self]. + borderWidth := 5. + message := String streamContents: [:strm | + strm + nextPutAll: '[HandMorph >> #showEvent:]'; cr; + nextPutAll: 'event'; tab; tab; tab; tab; nextPutAll: anEvent printString; cr; + nextPutAll: 'keyboard focus'; tab; nextPutAll: self keyboardFocus printString; cr; + nextPutAll: 'mouse focus'; tab; tab; nextPutAll: self mouseFocus printString]. + + message := message asDisplayText + foregroundColor: Color black + backgroundColor: Color white. + + "Offset to support multiple hands debugging." + Display fill: (0 @ 0 extent: message form extent + (borderWidth asPoint * 2)) rule: Form over fillColor: Color white. + message displayOn: Display at: borderWidth asPoint + (0 @ ((owner hands indexOf: self) - 1 * message form height)).! - Display fill: (0@0 extent: 300@120) rule: Form over fillColor: Color white. - ofs := (owner hands indexOf: self) - 1 * 60. - - anEvent isKeyboard - ifTrue: [ 'key: ', anEvent printString displayAt: (0@ofs) + (0@30) ] - ifFalse: [ 'evt ', anEvent printString displayAt: (0@ofs) + (0@0) ]. - - 'kf: ', self keyboardFocus printString displayAt: (0@ofs)+(0@45). - 'mf: ', self mouseFocus printString displayAt: (0@ofs) + (0@15) - ! Item was changed: ----- Method: KeyboardEvent>>printOn: (in category 'printing') ----- printOn: aStream "Print the receiver on a stream" aStream nextPut: $[. + aStream nextPutAll: self cursorPoint printString; space. aStream nextPutAll: type; nextPutAll: ' '''. self printKeyStringOn: aStream. + aStream nextPut: $'; space. + aStream nextPutAll: timeStamp printString. - aStream nextPut: $'. aStream nextPut: $]! Item was added: + ----- Method: Morph>>handleMouseWheel: (in category 'events-processing') ----- + handleMouseWheel: anEvent + "System level event handling." + + anEvent wasHandled ifTrue: [^self]. + (self handlesMouseWheel: anEvent) ifFalse: [^ self]. + anEvent wasHandled: true. + ^ self mouseWheel: anEvent! Item was added: + ----- Method: Morph>>handlesMouseWheel: (in category 'event handling') ----- + handlesMouseWheel: evt + "Do I want to receive mouseWheel events? The default response is false, except if you have added sensitivity to mouseWheel events using the on:send:to: mechanism. Subclasses that implement these messages directly should override this one to return true." + + self eventHandler ifNotNil: [^ self eventHandler handlesMouseWheel: evt]. + ^ false! Item was added: + ----- Method: Morph>>mouseWheel: (in category 'event handling') ----- + mouseWheel: anEvent + "Handle a mouse wheel event. The default response is to let my eventHandler, if any, handle it." + + self eventHandler ifNotNil: [:handler | + handler mouseWheel: anEvent fromMorph: self].! Item was changed: ----- Method: MorphicEvent class>>readFrom: (in category 'instance creation') ----- readFrom: aStream "Read a MorphicEvent from the given stream." | typeString | typeString := String streamContents: [:s | | c | [(c := aStream next) isLetter] whileTrue: [s nextPut: c]]. typeString = 'mouseMove' ifTrue:[^MouseMoveEvent type: #mouseMove readFrom: aStream]. typeString = 'mouseDown' ifTrue:[^MouseButtonEvent type: #mouseDown readFrom: aStream]. typeString = 'mouseUp' ifTrue:[^MouseButtonEvent type: #mouseUp readFrom: aStream]. + typeString = 'mouseWheel' ifTrue:[^MouseWheelEvent type: #mouseWheel readFrom: aStream]. typeString = 'keystroke' ifTrue:[^KeyboardEvent type: #keystroke readFrom: aStream]. typeString = 'keyDown' ifTrue:[^KeyboardEvent type: #keyDown readFrom: aStream]. typeString = 'keyUp' ifTrue:[^KeyboardEvent type: #keyUp readFrom: aStream]. typeString = 'mouseOver' ifTrue:[^MouseEvent type: #mouseOver readFrom: aStream]. typeString = 'mouseEnter' ifTrue:[^MouseEvent type: #mouseEnter readFrom: aStream]. typeString = 'mouseLeave' ifTrue:[^MouseEvent type: #mouseLeave readFrom: aStream]. typeString = 'unknown' ifTrue:[^MorphicUnknownEvent type: #unknown readFrom: aStream]. ^nil ! Item was added: + ----- Method: MouseButtonEvent>>printOn: (in category 'printing') ----- + printOn: aStream + + aStream nextPut: $[. + aStream nextPutAll: self cursorPoint printString; space. + aStream nextPutAll: type; space. + aStream nextPutAll: self modifierString. + aStream nextPutAll: self buttonString. + aStream nextPutAll: self whichButtonString; space. + aStream nextPutAll: timeStamp printString. + aStream nextPut: $].! Item was added: + ----- Method: MouseButtonEvent>>whichButtonString (in category 'printing') ----- + whichButtonString + "Return a string identifying the changed buttons" + + ^ String streamContents: [:stream | + stream nextPutAll: '( '. + self redButtonChanged ifTrue: [stream nextPutAll: 'red ']. + self yellowButtonChanged ifTrue: [stream nextPutAll: 'yellow ']. + self blueButtonChanged ifTrue: [stream nextPutAll: 'blue ']. + stream nextPutAll: ')']! Item was added: + ----- Method: MouseEvent>>isMouseWheel (in category 'testing') ----- + isMouseWheel + ^ false! Item was added: + MouseEvent subclass: #MouseWheelEvent + instanceVariableNames: 'direction' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Events'! Item was added: + ----- Method: MouseWheelEvent>>direction (in category 'accessing') ----- + direction + ^ direction! Item was added: + ----- Method: MouseWheelEvent>>isMouseWheel (in category 'testing') ----- + isMouseWheel + ^ true! Item was added: + ----- Method: MouseWheelEvent>>isWheelDown (in category 'testing') ----- + isWheelDown + ^ self direction == #down! Item was added: + ----- Method: MouseWheelEvent>>isWheelLeft (in category 'testing') ----- + isWheelLeft + ^ self direction == #left! Item was added: + ----- Method: MouseWheelEvent>>isWheelRight (in category 'testing') ----- + isWheelRight + ^ self direction == #right! Item was added: + ----- Method: MouseWheelEvent>>isWheelUp (in category 'testing') ----- + isWheelUp + ^ self direction == #up! Item was added: + ----- Method: MouseWheelEvent>>printOn: (in category 'printing') ----- + printOn: aStream + + aStream nextPut: $[. + aStream nextPutAll: self cursorPoint printString; space. + aStream nextPutAll: type; space. + aStream print: self direction; space. + aStream nextPutAll: self modifierString. + aStream nextPutAll: self buttonString. + aStream nextPutAll: timeStamp printString; space. + aStream nextPut: $].! Item was added: + ----- Method: MouseWheelEvent>>sentTo: (in category 'dispatching') ----- + sentTo: anObject + "Dispatch the receiver into anObject" + type == #mouseWheel ifTrue: [^ anObject handleMouseWheel: self]. + ^ super sentTo: anObject! Item was added: + ----- Method: MouseWheelEvent>>setType:position:direction:buttons:hand:stamp: (in category 'private') ----- + setType: evtType position: evtPos direction: dirSymbol buttons: evtButtons hand: evtHand stamp: stamp + type := evtType. + position := evtPos. + buttons := evtButtons. + source := evtHand. + wasHandled := false. + direction := dirSymbol. + timeStamp := stamp.! Item was added: + ----- Method: MouseWheelEvent>>storeOn: (in category 'printing') ----- + storeOn: aStream + + super storeOn: aStream. + aStream space. + self direction storeOn: aStream.! Item was added: + ----- Method: MouseWheelEvent>>type:readFrom: (in category 'initialization') ----- + type: eventType readFrom: aStream + + super type: eventType readFrom: aStream. + aStream skip: 1. + direction := Symbol readFrom: aStream. + ! Item was changed: ----- Method: PluggableListMorph>>keyStroke: (in category 'event handling') ----- keyStroke: event "Process keys The model is allowed to preview all keystrokes. If it's not interested: specialKeys are things like up, down, etc. ALWAYS HANDLED modifierKeys are regular characters either 1) accompanied with ctrl, cmd or 2) any character if the list doesn't want to handle basic keys (handlesBasicKeys returns false) basicKeys are any characters" | aChar aSpecialKey | (self previewKeystroke: event) ifTrue: [^ self]. - (self scrollByKeyboard: event) - ifTrue: [^ self]. aChar := event keyCharacter. (aSpecialKey := aChar asciiValue) < 32 ifTrue: [^ self specialKeyPressed: aSpecialKey]. (event anyModifierKeyPressed or: [self handlesBasicKeys not]) ifTrue: [^ self modifierKeyPressed: aChar]. ^ self basicKeyPressed: aChar! Item was added: + ----- Method: ScrollPane>>filterEvent:for: (in category 'event filtering') ----- + filterEvent: aKeyboardEvent for: morphOrNil + "See #initialize. This filter should be installed as keyboard event filter during the capture phase." + + ^ aKeyboardEvent + wasIgnored: (self scrollByKeyboard: aKeyboardEvent); + yourself! Item was added: + ----- Method: ScrollPane>>handlesMouseWheel: (in category 'event handling') ----- + handlesMouseWheel: evt + ^ true! Item was changed: ----- Method: ScrollPane>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" super initialize. "" self initializePreferences. hasFocus := false. self initializeScrollBars. "" self extent: self defaultExtent. self resizeScrollBars; resizeScroller; hideOrShowScrollBars; + updateMinimumExtent. + + self addKeyboardCaptureFilter: self.! - updateMinimumExtent.! Item was changed: ----- Method: ScrollPane>>keyStroke: (in category 'event handling') ----- keyStroke: evt "If pane is not empty, pass the event to the last submorph,  assuming it is the most appropriate recipient (!!)" - (self scrollByKeyboard: evt) ifTrue: [^self]. scroller submorphs last keyStroke: evt! Item was added: + ----- Method: ScrollPane>>mouseWheel: (in category 'event handling') ----- + mouseWheel: evt + + evt isWheelUp ifTrue: [scrollBar scrollUp: 3]. + evt isWheelDown ifTrue: [scrollBar scrollDown: 3].! Item was changed: ----- Method: ScrollPane>>scrollByKeyboard: (in category 'event handling') ----- scrollByKeyboard: event + "If event is ctrl+up/down then scroll and answer true. Backwards compatibility." + + (event controlKeyPressed or:[event commandKeyPressed "??? key decode table in event sensor does not change CTRL+up/down !!!!!!"]) ifFalse: [^ false]. - "If event is ctrl+up/down then scroll and answer true" - (event controlKeyPressed or:[event commandKeyPressed]) ifFalse: [^ false]. event keyCharacter = Character arrowUp ifTrue: [scrollBar scrollUp: 3. ^ true]. event keyCharacter = Character arrowDown ifTrue: [scrollBar scrollDown: 3. ^ true]. "event keyCharacter = Character arrowRight ifTrue: [hScrollBar scrollDown: 3. ^ true]. event keyCharacter = Character arrowLeft ifTrue: [hScrollBar scrollUp: 3. ^ true]." ^ false! 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 ! Item was changed: ----- Method: TextMorphForEditView>>keyStroke: (in category 'event handling') ----- keyStroke: evt | view | editView deleteBalloon. - (editView scrollByKeyboard: evt) ifTrue: [^self]. self editor model: editView model. "For evaluateSelection" view := editView. "Copy into temp for case of a self-mutating doit" (acceptOnCR and: [evt keyCharacter = Character cr]) ifTrue: [^ self editor accept]. super keyStroke: evt. view scrollSelectionIntoView. "Make a cheap check and guess editing. (Alternative would be to copy the old contents and then compare them against the new ones. Maybe add a better hook in the TextEditor." (self readOnly not and: [evt keyCharacter isAlphaNumeric or: [evt keyCharacter isSeparator]]) ifTrue: [view textEdited: self contents].! Item was changed: + (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling that occurs in the same control flow after loading this code." + HandMorph allInstancesDo: [:ea | ea initForEvents]. - (PackageInfo named: 'Morphic') postscript: 'HandMorph allInstancesDo: [:ea | ea initForEvents]. "Fixes the event handling that occurs in the same control flow after loading this code." + "Deploy mouse-wheel event handling to existing scrollpanes and hands." + Project allMorphicProjects do: [:morphicProject | + morphicProject world handsDo: [:hand | + hand addKeyboardCaptureFilter: hand]]. + ScrollPane allSubInstancesDo: [:ea | + ea addKeyboardCaptureFilter: ea].'! - SystemWindow allSubInstancesDo: [:ea | - ea initializeKeyboardShortcuts. - HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. - PasteUpMorph allSubInstancesDo: [:ea | - ea initializeKeyboardShortcuts. - HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]]. - DockingBarMorph allSubInstancesDo: [:ea | - HandMorph allInstancesDo: [:hand | hand removeKeyboardListener: ea]].'! From commits at source.squeak.org Fri Jun 10 09:27:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 10 09:27:45 2016 Subject: [squeak-dev] The Trunk: Graphics-topa.345.mcz Message-ID: Tobias Pape uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-topa.345.mcz ==================== Summary ==================== Name: Graphics-topa.345 Author: topa Time: 10 June 2016, 11:27:12.891768 am UUID: 007198b9-883b-4eda-b957-aa32a0e670b8 Ancestors: Graphics-topa.344 let install handle font reset =============== Diff against Graphics-topa.344 =============== Item was changed: ----- Method: StrikeFont class>>initialize (in category 'class initialization') ----- initialize + StrikeFont + installDejaVuDark; + installDejaVu! - StrikeFont installDejaVu! Item was changed: (PackageInfo named: 'Graphics') postscript: ' " Reset DejaVu to current version " + StrikeFont initialize'! - StrikeFont - installDejaVuDark; - installDejaVu.'! From bert at freudenbergs.de Fri Jun 10 09:28:18 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jun 10 09:28:22 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1175.mcz In-Reply-To: References: Message-ID: On Fri, Jun 10, 2016 at 11:05 AM, wrote: > > Note that this commit has a postscript in the Morphic package to install > an event filter in all hands to do the conversion of CTRL+up/down to > MouseWheelEvent. This is the first application of our new event filters to > convert a keyboard event into a mouse event. > > We should really update our VM to provide real mouse-wheel events... :-) > Yes we should. And in preparation for that, we should generate VM-level mouse-wheel events in EventSensor, not using event filters. Such a wheel event should have x and y delta values in anticipation of smooth scrolling. E.g. Chrome uses 120 per "notch" on clicking wheels and otherwise computes it from the actual scroll amount (e.g. on a trackpad). See https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel#Chrome - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160610/4c23f541/attachment.htm From bert at freudenbergs.de Fri Jun 10 09:40:20 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jun 10 09:40:23 2016 Subject: [squeak-dev] Laura Perez Cerrato In-Reply-To: <20160610002131.GA78172@shell.msen.com> References: <20160610002131.GA78172@shell.msen.com> Message-ID: On Fri, Jun 10, 2016 at 2:21 AM, David T. Lewis wrote: > On Thu, Jun 09, 2016 at 05:14:01PM -0700, Eliot Miranda wrote: > > Hi All, > > > > I vote that Laura Perez Cerrato be > made a > > trunk developer with full write rights so that she can commit her changes > > to ColorForm and the JPEGReadWriter2 code to support greyscale JPEGs in > her > > own right. > > +1 > > Dave > +1 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160610/3cee57b3/attachment.htm From Marcel.Taeumel at hpi.de Fri Jun 10 09:11:26 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 09:50:12 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" Message-ID: <1465549886487-4900330.post@n4.nabble.com> Hi, there. As you may have noticed, there was the commit "The Trunk: Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, which we use for everything: Source code, lists, buttons, balloon texts, ... See for yourself (left is current, right is previous): Thanks very much for this, Tobias! Now, if you browse our "Font Size Summary" via the Help menu, you might also notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 )". Those can be used for High-DPI displays. You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 17 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a dark background to account for correct sub-pixel anti-aliasing. So, this font should be used if you work with bright fonts on dark backgrounds. Also, take a look at "bold", "italic", and "bold italic". :-) Have fun! Best, Marcel -- View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Fri Jun 10 10:23:11 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Jun 10 10:23:15 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <1465549886487-4900330.post@n4.nabble.com> References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: Hurray. The tiny size of . and : was really a big pain in the old version. Thank you Tobias for fixing this Best, Karl On Fri, Jun 10, 2016 at 11:11 AM, marcel.taeumel wrote: > Hi, there. > > As you may have noticed, there was the commit "The Trunk: > Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results > of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, > which we use for everything: Source code, lists, buttons, balloon texts, > ... > > See for yourself (left is current, right is previous): > > > Thanks very much for this, Tobias! > > Now, if you browse our "Font Size Summary" via the Help menu, you might > also > notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 )". > Those can be used for High-DPI displays. > > You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 > 17 > 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a > dark > background to account for correct sub-pixel anti-aliasing. So, this font > should be used if you work with bright fonts on dark backgrounds. > > Also, take a look at "bold", "italic", and "bold italic". :-) > > Have fun! > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330.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/20160610/f863482a/attachment.htm From lists at fniephaus.com Fri Jun 10 10:44:59 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri Jun 10 10:45:11 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: Awesome! :) -- On Fri, Jun 10, 2016 at 12:23 PM karl ramberg wrote: > Hurray. > The tiny size of . and : was really a big pain in the old version. > > Thank you Tobias for fixing this > > Best, > Karl > > On Fri, Jun 10, 2016 at 11:11 AM, marcel.taeumel > wrote: > >> Hi, there. >> >> As you may have noticed, there was the commit "The Trunk: >> Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results >> of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, >> which we use for everything: Source code, lists, buttons, balloon texts, >> ... >> >> See for yourself (left is current, right is previous): >> >> >> Thanks very much for this, Tobias! >> >> Now, if you browse our "Font Size Summary" via the Help menu, you might >> also >> notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 )". >> Those can be used for High-DPI displays. >> >> You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 >> 17 >> 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a >> dark >> background to account for correct sub-pixel anti-aliasing. So, this font >> should be used if you work with bright fonts on dark backgrounds. >> >> Also, take a look at "bold", "italic", and "bold italic". :-) >> >> Have fun! >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330.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/20160610/9181d7d1/attachment-0001.htm From Marcel.Taeumel at hpi.de Fri Jun 10 10:07:10 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 10:45:55 2016 Subject: [squeak-dev] Re: Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <1465549886487-4900330.post@n4.nabble.com> References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: <1465553230005-4900346.post@n4.nabble.com> marcel.taeumel wrote > Hi, there. > > As you may have noticed, there was the commit "The Trunk: > Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results > of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, > which we use for everything: Source code, lists, buttons, balloon texts, > ... > > See for yourself (left is current, right is previous): > > Thanks very much for this, Tobias! > > Now, if you browse our "Font Size Summary" via the Help menu, you might > also notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 > )". Those can be used for High-DPI displays. > > You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 > 17 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a > dark background to account for correct sub-pixel anti-aliasing. So, this > font should be used if you work with bright fonts on dark backgrounds. > > Also, take a look at "bold", "italic", and "bold italic". :-) > > Have fun! > > Best, > Marcel Here is the code that Tobias wrote and used to render the fonts under Mac OS X using Quartz and Freetype: https://github.com/krono/Squeak-Fonts Best, Marcel -- View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330p4900346.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Fri Jun 10 11:29:55 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Fri Jun 10 11:29:59 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <1465549886487-4900330.post@n4.nabble.com> References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: I prefer Juan's version, because it's free of aliasing artifacts, which are clearly visible and are quite annoying in freetype's output. Have a look at the attached image to see the difference. Levente On Fri, 10 Jun 2016, marcel.taeumel wrote: > Hi, there. > > As you may have noticed, there was the commit "The Trunk: > Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results > of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, > which we use for everything: Source code, lists, buttons, balloon texts, ... > > See for yourself (left is current, right is previous): > > > Thanks very much for this, Tobias! > > Now, if you browse our "Font Size Summary" via the Help menu, you might also > notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 )". > Those can be used for High-DPI displays. > > You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 17 > 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a dark > background to account for correct sub-pixel anti-aliasing. So, this font > should be used if you work with bright fonts on dark backgrounds. > > Also, take a look at "bold", "italic", and "bold italic". :-) > > Have fun! > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- A non-text attachment was scrubbed... Name: fonts.png Type: image/png Size: 17483 bytes Desc: Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160610/2f2a1897/fonts.png From bert at freudenbergs.de Fri Jun 10 12:10:29 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri Jun 10 12:10:32 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: On Fri, Jun 10, 2016 at 1:29 PM, Levente Uzonyi wrote: > I prefer Juan's version, because it's free of aliasing artifacts, which > are clearly visible and are quite annoying in freetype's output. > I agree Juan's looks more crisp, but also more delicate. Tobi's version appears stronger, so to me it improves the overall readability. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160610/772807a6/attachment.htm From Marcel.Taeumel at hpi.de Fri Jun 10 13:47:09 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 14:25:55 2016 Subject: [squeak-dev] Mouse Wheel Events - Step 2 of 3: EventSensor Message-ID: <1465566429044-4900411.post@n4.nabble.com> Hi, there. Please find attached a change set that: (0. Merges several peek* and prim* methods in EventSensor as a clean-up.) 1. Extends EventSensor to be prepared for VMs to really send mouse-wheel events. 2. Account for those changes in HandMorph. 3. Support #wheelDelta in MouseWheelEvent instances for fine-granular scrolling. Do only raise flags for, e.g., #isWheelUp and #isWheelDown if the delta is above 120 units [1]. Accumulate this in MouseWheelState. Thanks to Bert and Tim (F.) for the discuss to specify the low-level format: { 7. "EventTypeMouseWheel" stamp. deltaX. "VM converts OS values into multiples of 120 units per notch" deltaY. "(see above)" buttons. "like mouse event" modifiers. "like mouse event" nil. "unused" window index. } Here is the change set: mouse-wheel-event-sensor.cs Step 3 of 3 is to extend the VMs. :-) Best, Marcel [1] https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel#Chrome -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Step-2-of-3-EventSensor-tp4900411.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 10 13:49:08 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 10 14:27:55 2016 Subject: [squeak-dev] Re: Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: <1465566548232-4900413.post@n4.nabble.com> Levente Uzonyi wrote > I prefer Juan's version, because it's free of aliasing artifacts, which > are clearly visible and are quite annoying in freetype's output. > Have a look at the attached image to see the difference. > > Levente > > On Fri, 10 Jun 2016, marcel.taeumel wrote: > >> Hi, there. >> >> As you may have noticed, there was the commit "The Trunk: >> Graphics-topa.344.mcz". In it, Tobias shares with us the effortful >> results >> of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, >> which we use for everything: Source code, lists, buttons, balloon texts, >> ... >> >> See for yourself (left is current, right is previous): >> <http://forum.world.st/file/n4900330/new-squeak-font-rendering.png> >> >> Thanks very much for this, Tobias! >> >> Now, if you browse our "Font Size Summary" via the Help menu, you might >> also >> notice three additional sizes: "Bitmap DejaVu Sans #(7 9 12 14 17 20 )". >> Those can be used for High-DPI displays. >> >> You will also notice an additional font: Darkmap DejaVu Sans #(7 9 12 14 >> 17 >> 20 ) This is the same DejaVu Sans but pre-rendered as white font onto a >> dark >> background to account for correct sub-pixel anti-aliasing. So, this font >> should be used if you work with bright fonts on dark backgrounds. >> >> Also, take a look at "bold", "italic", and "bold italic". :-) >> >> Have fun! >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > > > > fonts.png (23K) > <http://forum.world.st/attachment/4900350/0/fonts.png> Hi Levente, Juans's version have a poor contrast value. Hence, I prefer Tobias'/Freetypes version although a little bit fuzzy on low-dpi screens. Best, Marcel -- View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330p4900413.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From timfelgentreff at gmail.com Fri Jun 10 13:54:24 2016 From: timfelgentreff at gmail.com (timfelgentreff) Date: Fri Jun 10 14:33:12 2016 Subject: [squeak-dev] Re: A speedcenter for Squeak In-Reply-To: <1465542201349-4900263.post@n4.nabble.com> References: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> <1465542201349-4900263.post@n4.nabble.com> Message-ID: <1465566864927-4900414.post@n4.nabble.com> I added the VM today, and then realized I haven't built in a variation point for choosing the image - and I only have a script to build a Spur image right now. So I regret that this wasn't (as I first assumed) a thing of 2 minutes. But I'll get to it. marcel.taeumel wrote > > David T. Lewis wrote >> This really looks very useful, and the graphs and trend lines are nice >> for >> visualization. >> >> Would there be any value in adding an interpreter VM as a baseline to >> show >> Cog/Spur/RSqueak compared to a non-optimized VM? >> >> Dave >> >> >>> Hi, >>> >>> I sent around a note earlier about a benchmarking tool that we're using >>> internally to track RSqueak/VM performance on each commit. Every time >>> Eliot >>> releases a new set of Cog VMs, I also manually trigger the system to run >>> benchmarks on Cog. (Once we move the proper VM to Github, I will set it >>> up >>> so we test each commit on the main development branch and the release >>> branch, too, so we will have very detailed breakdowns.) We wanted to >>> share >>> this setup and the results with the community. >>> >>> We're collecting results in a Codespeed website (just a frontend to >>> present >>> the data) which we moved to speed.squeak.org today, and it is also >>> linked >>> from the squeak.org website (http://squeak.org/codespeed/). >>> >>> We have some info about the setup on the about page: >>> http://speed.squeak.org/about. On the Changes tab, you can see the most >>> recent results per platform and environment, with details about the >>> machines on the bottom. Note that we calculate all the statistics on the >>> workers themselves and only send the time and std dev, so the results' >>> min >>> and max values you see on the website are bogus. >>> >>> Finally, the code for the workers also is on Github ( >>> https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks >>> are >>> all organized in Squeaksource ( >>> http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). >>> Right now I've just dumped benchmarks from various sources in there, >>> that's >>> why you see the same benchmark implemented multiple times in different >>> ways, and some micro benchmarks don't make too much sense as they are. >>> We're happy to get comments, feedback, or updated versions of the >>> benchmarking packages. Updating the benchmarking code is easy, and we >>> hope >>> this setup proves to be useful enough for the community to warrant >>> continuously updating and extending the set of benchmarks. >>> >>> We are also planning to add more platforms, the setup should make this >>> fairly painless, we just need the dedicated machines. We've been testing >>> the standard Cog/Spur VM on a Ubuntu machine, and today we added a >>> Raspberry Pi 1 that is still churning through the latest Cog and >>> RSqueak/VM >>> commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS >>> and >>> other builds of the Squeak VM, too. >>> >>> Cheers, >>> Tim >>> >>> > +1 > > Best, > Marcel -- View this message in context: http://forum.world.st/A-speedcenter-for-Squeak-tp4899946p4900414.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From timfelgentreff at gmail.com Fri Jun 10 14:50:38 2016 From: timfelgentreff at gmail.com (timfelgentreff) Date: Fri Jun 10 15:29:25 2016 Subject: [squeak-dev] Re: Mouse Wheel Events - Step 2 of 3: EventSensor In-Reply-To: <1465566429044-4900411.post@n4.nabble.com> References: <1465566429044-4900411.post@n4.nabble.com> Message-ID: <1465570238386-4900422.post@n4.nabble.com> Yay, thanks Marcel! Already added to RSqueak/VM :) marcel.taeumel wrote > Hi, there. > > Please find attached a change set that: > > (0. Merges several peek* and prim* methods in EventSensor as a clean-up.) > 1. Extends EventSensor to be prepared for VMs to really send mouse-wheel > events. > 2. Account for those changes in HandMorph. > 3. Support #wheelDelta in MouseWheelEvent instances for fine-granular > scrolling. Do only raise flags for, e.g., #isWheelUp and #isWheelDown if > the delta is above 120 units [1]. Accumulate this in MouseWheelState. > > Thanks to Bert and Tim (F.) for the discuss to specify the low-level > format: > > { > 7. "EventTypeMouseWheel" > stamp. > deltaX. "VM converts OS values into multiples of 120 units per notch" > deltaY. "(see above)" > buttons. "like mouse event" > modifiers. "like mouse event" > nil. "unused" > window index. > } > > Here is the change set: > mouse-wheel-event-sensor.cs > > > Step 3 of 3 is to extend the VMs. :-) > > Best, > Marcel > > [1] https://developer.mozilla.org/en-US/docs/Web/Events/mousewheel#Chrome -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Step-2-of-3-EventSensor-tp4900411p4900422.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From smalltalk at stefan-marr.de Fri Jun 10 16:22:23 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Fri Jun 10 16:22:27 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: References: Message-ID: Hi Tim: Out of curiosity, where exactly did you take the GraphSearch and Json benchmarks from? Are they consistent wit the latest versions on https://github.com/smarr/are-we-fast-yet/tree/master/benchmarks/SOM? Just wondering. Of course it would also be interesting to have a highly optimized Smalltalk like TruffleSOM on there, just to keep people motivated to reach some state-of-the-art performance ;) Btw, I recently added the Collision Detection and Havlak benchmarks to AWFY. Those are additional larger benchmarks on the level of Richards and DeltaBlue. They should be a little more representative then microbenchmarks. Best regards Stefan > On 08 Jun 2016, at 16:43, Tim Felgentreff wrote: > > Hi, > > I sent around a note earlier about a benchmarking tool that we're using internally to track RSqueak/VM performance on each commit. Every time Eliot releases a new set of Cog VMs, I also manually trigger the system to run benchmarks on Cog. (Once we move the proper VM to Github, I will set it up so we test each commit on the main development branch and the release branch, too, so we will have very detailed breakdowns.) We wanted to share this setup and the results with the community. > > We're collecting results in a Codespeed website (just a frontend to present the data) which we moved to speed.squeak.org today, and it is also linked from the squeak.org website (http://squeak.org/codespeed/). > > We have some info about the setup on the about page: http://speed.squeak.org/about. On the Changes tab, you can see the most recent results per platform and environment, with details about the machines on the bottom. Note that we calculate all the statistics on the workers themselves and only send the time and std dev, so the results' min and max values you see on the website are bogus. > > Finally, the code for the workers also is on Github (https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks are all organized in Squeaksource (http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). Right now I've just dumped benchmarks from various sources in there, that's why you see the same benchmark implemented multiple times in different ways, and some micro benchmarks don't make too much sense as they are. We're happy to get comments, feedback, or updated versions of the benchmarking packages. Updating the benchmarking code is easy, and we hope this setup proves to be useful enough for the community to warrant continuously updating and extending the set of benchmarks. > > We are also planning to add more platforms, the setup should make this fairly painless, we just need the dedicated machines. We've been testing the standard Cog/Spur VM on a Ubuntu machine, and today we added a Raspberry Pi 1 that is still churning through the latest Cog and RSqueak/VM commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS and other builds of the Squeak VM, too. > > Cheers, > Tim > From tim at rowledge.org Fri Jun 10 16:50:23 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 10 16:50:17 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: <4B41A660-1749-4489-BD33-0E359D17AAB8@rowledge.org> > On 10-06-2016, at 5:10 AM, Bert Freudenberg wrote: > > On Fri, Jun 10, 2016 at 1:29 PM, Levente Uzonyi wrote: > I prefer Juan's version, because it's free of aliasing artifacts, which are clearly visible and are quite annoying in freetype's output. > > I agree Juan's looks more crisp, but also more delicate. Tobi's version appears stronger, so to me it improves the overall readability. Unfortunately on my iMac screen viewing the Pi via xrdp it makes for an effect a little like the old vga lcd screens when the contrast setting wouldn?t quite work. It?s survivable but not ideal for this case; I like the more visible small punctuation but prefer the crispness of the old version. Whilst looking through the other fonts available for comparison I was little disappointed at how most of them look. I think we?re in a hard spot right now since some machines (Pi, old laptops etc) have relatively low resolution display capabilities (although Pi can manage ~2000@~1500 kind of size) whereas nice new iMacs do ~5000@3000. That?s always going to be a pain to cover with bitmap fonts. Maybe we might provide for larger screen/faster machines to actually use anti-aliased fonts via Pango? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Computer and car salesmen differ in that the latter know when they are lying. From tim at rowledge.org Fri Jun 10 19:47:52 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 10 19:47:50 2016 Subject: [squeak-dev] Re: Some change, probably in Morphic classes, breaks Scratch between #15852 & 16040 In-Reply-To: <1465542095346-4900262.post@n4.nabble.com> References: <1465542095346-4900262.post@n4.nabble.com> Message-ID: <394C7F5E-E9CB-4D71-9EB6-397412665A92@rowledge.org> So far as I can work out *something* is causing the drop to go wrong in a very interesting way. There are always fun problems in debugging events, not least completely crashing the system, so I may be being mislead. Anyway, it seems that dropping a Scratch script tile onto the script editing pane works as normal BUT something is thinking the drop failed and so goes up to the next level - a the Scratch application main frame - which most definitely rejects the script tile and so it defers back to the pasteupmorph and the tile is ripped out of the script editor and moved to the World. Nasty! I?m suspicious of the apparent double-send of the events introduced by the filtering, and maybe the whole ?ignored? thing. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MFC: Mangle Following Command From lecteur at zogotounga.net Fri Jun 10 20:33:33 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Fri Jun 10 20:33:04 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <1465549886487-4900330.post@n4.nabble.com> References: <1465549886487-4900330.post@n4.nabble.com> Message-ID: <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> > As you may have noticed, there was the commit "The Trunk: > Graphics-topa.344.mcz". In it, Tobias shares with us the effortful results > of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, > which we use for everything: Source code, lists, buttons, balloon texts, ... > > See for yourself (left is current, right is previous): > > I prefer right, by far :( Stef From commits at source.squeak.org Fri Jun 10 21:56:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 10 21:56:57 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160610215655.22227.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-June/068205.html Name: Morphic-mt.1174 Ancestors: Morphic-mt.1173 Removes unused filter-event inst-vars from HandMorph, which I did not intended to commit in the first place. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068206.html Name: Morphic-mt.1175 Ancestors: Morphic-mt.1174 Adds mouse wheel events. For now, these events have to be synthesized from keystroke events (CTRL+up/down). There is a preference to control it. If there are mouse-wheel events, then you can disable "Send Mouse Wheel To Keyboard Focus" to have Mac OS scroll-wheel-feeling. If you also enable #mouseOverForKeyboardFocus, you will not notice a difference. This commit implements #mouseWheel: in ScrollPane but still has support for scroll-by-keyboard, that is, keystroke CTRL+up/down (via keyboard event filters, see ScrollPane >> #filterEvent:for:). This support might be removed in the future. For now, applications can disable "Synthesize Mouse Wheel Events" to not generate MouseWheel events at all and only rely on CTRL+up/down. Note that this commit has a postscript in the Morphic package to install an event filter in all hands to do the conversion of CTRL+up/down to MouseWheelEvent. This is the first application of our new event filters to convert a keyboard event into a mouse event. We should really update our VM to provide real mouse-wheel events... :-) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068207.html Name: Graphics-topa.344 Ancestors: Graphics-tpr.343 = Bitmap DejaVu Sans = Re-Rendering of the DejaVu Sans fonts - Old version was Latin-9 (ISO 8859-15) encoded, wich does not match our Characters, which are Unicode, which is a super-set of Latin-1 (ISO 8859-1). Re-rendering respects Unicode. - Rendering uses Mac OS X Core Graphics renderin with AA and sub-pixel AA (See https://github.com/krono/Squeak-Fonts) - Adds the sizes 14, 17, and 20, matching the still included 7, 19, and 12 on High-DPI displays. - Adds the 'Darkmap DejaVu Sans' style. The metrics are exactly like the 'Bitmap DejaVu Sans' for all fonts, but the rendering was optimized for light text font on dark backround. (Beware, looks strange with dark font on light backround.) - Support broader font range in StrikeFont>>#buildFromForm:data:name: and use SparseTable's for very large xTables. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068208.html Name: Graphics-topa.345 Ancestors: Graphics-topa.344 let install handle font reset ============================================= From lewis at mail.msen.com Sat Jun 11 01:15:58 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jun 11 01:16:03 2016 Subject: [squeak-dev] Re: A speedcenter for Squeak In-Reply-To: <1465566864927-4900414.post@n4.nabble.com> References: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> <1465542201349-4900263.post@n4.nabble.com> <1465566864927-4900414.post@n4.nabble.com> Message-ID: <20160611011558.GA23605@shell.msen.com> On Fri, Jun 10, 2016 at 06:54:24AM -0700, timfelgentreff wrote: > I added the VM today, and then realized I haven't built in a variation point > for choosing the image - and I only have a script to build a Spur image > right now. So I regret that this wasn't (as I first assumed) a thing of 2 > minutes. But I'll get to it. > Let me know if I can help. Attached is a script for building the VM from latest SVN sources (the install step is commented out). Choosing the image might be harder. ckformat can be used to select a VM for an image, but the interpreter VM can only run a V3 image (not Spur), so maybe the comparison is not so meaningful. I have been maintaining a V3 mirror of Squeak trunk (http://build.squeak.org/job/FollowTrunkOnOldV3Image/) but I will not be maintaining long term (only a few more months or so). On balance, maybe it is better to use a Stack interpreter VM as the baseline. This should be similar enough to the context interpreter VM, and it will run Spur images, so that may be good as a baseline. It would have been nice to say that "Cog is X times faster than the original interpreter VM" but comparing to StackInterpreter may be close enough. Dave > > marcel.taeumel wrote > > > > David T. Lewis wrote > >> This really looks very useful, and the graphs and trend lines are nice > >> for > >> visualization. > >> > >> Would there be any value in adding an interpreter VM as a baseline to > >> show > >> Cog/Spur/RSqueak compared to a non-optimized VM? > >> > >> Dave > >> > >> > >>> Hi, > >>> > >>> I sent around a note earlier about a benchmarking tool that we're using > >>> internally to track RSqueak/VM performance on each commit. Every time > >>> Eliot > >>> releases a new set of Cog VMs, I also manually trigger the system to run > >>> benchmarks on Cog. (Once we move the proper VM to Github, I will set it > >>> up > >>> so we test each commit on the main development branch and the release > >>> branch, too, so we will have very detailed breakdowns.) We wanted to > >>> share > >>> this setup and the results with the community. > >>> > >>> We're collecting results in a Codespeed website (just a frontend to > >>> present > >>> the data) which we moved to speed.squeak.org today, and it is also > >>> linked > >>> from the squeak.org website (http://squeak.org/codespeed/). > >>> > >>> We have some info about the setup on the about page: > >>> http://speed.squeak.org/about. On the Changes tab, you can see the most > >>> recent results per platform and environment, with details about the > >>> machines on the bottom. Note that we calculate all the statistics on the > >>> workers themselves and only send the time and std dev, so the results' > >>> min > >>> and max values you see on the website are bogus. > >>> > >>> Finally, the code for the workers also is on Github ( > >>> https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks > >>> are > >>> all organized in Squeaksource ( > >>> http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). > >>> Right now I've just dumped benchmarks from various sources in there, > >>> that's > >>> why you see the same benchmark implemented multiple times in different > >>> ways, and some micro benchmarks don't make too much sense as they are. > >>> We're happy to get comments, feedback, or updated versions of the > >>> benchmarking packages. Updating the benchmarking code is easy, and we > >>> hope > >>> this setup proves to be useful enough for the community to warrant > >>> continuously updating and extending the set of benchmarks. > >>> > >>> We are also planning to add more platforms, the setup should make this > >>> fairly painless, we just need the dedicated machines. We've been testing > >>> the standard Cog/Spur VM on a Ubuntu machine, and today we added a > >>> Raspberry Pi 1 that is still churning through the latest Cog and > >>> RSqueak/VM > >>> commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS > >>> and > >>> other builds of the Squeak VM, too. > >>> > >>> Cheers, > >>> Tim > >>> > >>> > > +1 > > > > Best, > > Marcel > > > > > > -- > View this message in context: http://forum.world.st/A-speedcenter-for-Squeak-tp4899946p4900414.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- # Fri Jun 10 20:16:37 EDT 2016 dtl # Compile an interpreter VM from the most recent sources in squeakvm.org repository #!/bin/sh REPO=http://squeakvm.org/svn/squeak/trunk # Get or update the latest platforms sources and generated VMMaker sources if test -d platforms then svn update platforms svn update src else svn co $REPO/platforms svn co $REPO/src fi if ! test -d build then mkdir build fi cd build cp ../platforms/unix/cmake/Makefile.example Makefile make clean; make # Notes: Installation requires root privileges. Installation may conflict with # previously installed VMs (e.g. Cog, Spur). if test $? then echo VM build complete echo To install the VM as /usr/local/bin/squeak do \"\$ sudo make install\" in the ./build directory # sudo make install fi From timfelgentreff at gmail.com Sat Jun 11 05:39:01 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Sat Jun 11 05:39:04 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: References: Message-ID: Hi Stefan, the benachmarks are from an older version of SMark that was on SmalltalkHub. I will take a look at integrating your newer versions. About also running TruffleSOM, while it might be interesting for some benchmarks, I am really interested in testing VMs that run the full image (including heartbeat, event sensor) while running those benchmarks. cheers, Tim Am 10.06.2016 6:22 nachm. schrieb "Stefan Marr" : > Hi Tim: > > Out of curiosity, where exactly did you take the GraphSearch and Json > benchmarks from? > Are they consistent wit the latest versions on > https://github.com/smarr/are-we-fast-yet/tree/master/benchmarks/SOM? > > Just wondering. Of course it would also be interesting to have a highly > optimized Smalltalk like TruffleSOM on there, just to keep people motivated > to reach some state-of-the-art performance ;) > > Btw, I recently added the Collision Detection and Havlak benchmarks to > AWFY. Those are additional larger benchmarks on the level of Richards and > DeltaBlue. They should be a little more representative then microbenchmarks. > > Best regards > Stefan > > > On 08 Jun 2016, at 16:43, Tim Felgentreff > wrote: > > > > Hi, > > > > I sent around a note earlier about a benchmarking tool that we're using > internally to track RSqueak/VM performance on each commit. Every time Eliot > releases a new set of Cog VMs, I also manually trigger the system to run > benchmarks on Cog. (Once we move the proper VM to Github, I will set it up > so we test each commit on the main development branch and the release > branch, too, so we will have very detailed breakdowns.) We wanted to share > this setup and the results with the community. > > > > We're collecting results in a Codespeed website (just a frontend to > present the data) which we moved to speed.squeak.org today, and it is > also linked from the squeak.org website (http://squeak.org/codespeed/). > > > > We have some info about the setup on the about page: > http://speed.squeak.org/about. On the Changes tab, you can see the most > recent results per platform and environment, with details about the > machines on the bottom. Note that we calculate all the statistics on the > workers themselves and only send the time and std dev, so the results' min > and max values you see on the website are bogus. > > > > Finally, the code for the workers also is on Github ( > https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the Benchmarks > are all organized in Squeaksource ( > http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html). > Right now I've just dumped benchmarks from various sources in there, that's > why you see the same benchmark implemented multiple times in different > ways, and some micro benchmarks don't make too much sense as they are. > We're happy to get comments, feedback, or updated versions of the > benchmarking packages. Updating the benchmarking code is easy, and we hope > this setup proves to be useful enough for the community to warrant > continuously updating and extending the set of benchmarks. > > > > We are also planning to add more platforms, the setup should make this > fairly painless, we just need the dedicated machines. We've been testing > the standard Cog/Spur VM on a Ubuntu machine, and today we added a > Raspberry Pi 1 that is still churning through the latest Cog and RSqueak/VM > commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS and > other builds of the Squeak VM, too. > > > > Cheers, > > Tim > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160611/1eca38aa/attachment.htm From timfelgentreff at gmail.com Sat Jun 11 05:40:36 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Sat Jun 11 05:40:41 2016 Subject: [squeak-dev] Re: A speedcenter for Squeak In-Reply-To: <20160611011558.GA23605@shell.msen.com> References: <31937.136.1.1.165.1465494519.squirrel@webmail.msen.com> <1465542201349-4900263.post@n4.nabble.com> <1465566864927-4900414.post@n4.nabble.com> <20160611011558.GA23605@shell.msen.com> Message-ID: Hi David, sure, I can easily add the Stack Vm once we have it built on every commit from Github :) cheers, Tim Am 11.06.2016 3:16 vorm. schrieb "David T. Lewis" : > On Fri, Jun 10, 2016 at 06:54:24AM -0700, timfelgentreff wrote: > > I added the VM today, and then realized I haven't built in a variation > point > > for choosing the image - and I only have a script to build a Spur image > > right now. So I regret that this wasn't (as I first assumed) a thing of 2 > > minutes. But I'll get to it. > > > > Let me know if I can help. Attached is a script for building the VM from > latest SVN sources (the install step is commented out). > > Choosing the image might be harder. ckformat can be used to select a VM > for an image, but the interpreter VM can only run a V3 image (not Spur), > so maybe the comparison is not so meaningful. I have been maintaining a V3 > mirror of Squeak trunk ( > http://build.squeak.org/job/FollowTrunkOnOldV3Image/) > but I will not be maintaining long term (only a few more months or so). > > On balance, maybe it is better to use a Stack interpreter VM as the > baseline. > This should be similar enough to the context interpreter VM, and it will > run Spur images, so that may be good as a baseline. It would have been nice > to say that "Cog is X times faster than the original interpreter VM" but > comparing to StackInterpreter may be close enough. > > Dave > > > > > > marcel.taeumel wrote > > > > > > David T. Lewis wrote > > >> This really looks very useful, and the graphs and trend lines are nice > > >> for > > >> visualization. > > >> > > >> Would there be any value in adding an interpreter VM as a baseline to > > >> show > > >> Cog/Spur/RSqueak compared to a non-optimized VM? > > >> > > >> Dave > > >> > > >> > > >>> Hi, > > >>> > > >>> I sent around a note earlier about a benchmarking tool that we're > using > > >>> internally to track RSqueak/VM performance on each commit. Every time > > >>> Eliot > > >>> releases a new set of Cog VMs, I also manually trigger the system to > run > > >>> benchmarks on Cog. (Once we move the proper VM to Github, I will set > it > > >>> up > > >>> so we test each commit on the main development branch and the release > > >>> branch, too, so we will have very detailed breakdowns.) We wanted to > > >>> share > > >>> this setup and the results with the community. > > >>> > > >>> We're collecting results in a Codespeed website (just a frontend to > > >>> present > > >>> the data) which we moved to speed.squeak.org today, and it is also > > >>> linked > > >>> from the squeak.org website (http://squeak.org/codespeed/). > > >>> > > >>> We have some info about the setup on the about page: > > >>> http://speed.squeak.org/about. On the Changes tab, you can see the > most > > >>> recent results per platform and environment, with details about the > > >>> machines on the bottom. Note that we calculate all the statistics on > the > > >>> workers themselves and only send the time and std dev, so the > results' > > >>> min > > >>> and max values you see on the website are bogus. > > >>> > > >>> Finally, the code for the workers also is on Github ( > > >>> https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking) and the > Benchmarks > > >>> are > > >>> all organized in Squeaksource ( > > >>> > http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/BenchmarkRunner.html > ). > > >>> Right now I've just dumped benchmarks from various sources in there, > > >>> that's > > >>> why you see the same benchmark implemented multiple times in > different > > >>> ways, and some micro benchmarks don't make too much sense as they > are. > > >>> We're happy to get comments, feedback, or updated versions of the > > >>> benchmarking packages. Updating the benchmarking code is easy, and we > > >>> hope > > >>> this setup proves to be useful enough for the community to warrant > > >>> continuously updating and extending the set of benchmarks. > > >>> > > >>> We are also planning to add more platforms, the setup should make > this > > >>> fairly painless, we just need the dedicated machines. We've been > testing > > >>> the standard Cog/Spur VM on a Ubuntu machine, and today we added a > > >>> Raspberry Pi 1 that is still churning through the latest Cog and > > >>> RSqueak/VM > > >>> commits. We'd like to add a Mac and a Windows box, and maybe SqueakJS > > >>> and > > >>> other builds of the Squeak VM, too. > > >>> > > >>> Cheers, > > >>> Tim > > >>> > > >>> > > > +1 > > > > > > Best, > > > Marcel > > > > > > > > > > > > -- > > View this message in context: > http://forum.world.st/A-speedcenter-for-Squeak-tp4899946p4900414.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/20160611/e561e147/attachment-0001.htm From smalltalk at stefan-marr.de Sat Jun 11 07:08:14 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Sat Jun 11 07:08:18 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: References: Message-ID: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> Hi Tim: > On 11 Jun 2016, at 07:39, Tim Felgentreff wrote: > > About also running TruffleSOM, while it might be interesting for some benchmarks, I am really interested in testing VMs that run the full image (including heartbeat, event sensor) while running those benchmarks. The JVM generates safe points, yield points, and all the things that are necessary for Java semantics? (i.e., all the equivalents for heartbeat/event sensor overhead). Also, such minor details don?t account for more than a few percent overhead on average. No excuses :-P Best regards Stefan -- Stefan Marr Johannes Kepler Universit?t Linz http://stefan-marr.de/research/ From Marcel.Taeumel at hpi.de Sat Jun 11 07:11:40 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jun 11 07:50:33 2016 Subject: [squeak-dev] Re: Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> References: <1465549886487-4900330.post@n4.nabble.com> <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> Message-ID: <1465629100450-4900484.post@n4.nabble.com> St?phane Rollandin wrote >> As you may have noticed, there was the commit "The Trunk: >> Graphics-topa.344.mcz". In it, Tobias shares with us the effortful >> results >> of improving the quality of our pre-rendered "Bitmap DejaVu Sans" font, >> which we use for everything: Source code, lists, buttons, balloon texts, >> ... >> >> See for yourself (left is current, right is previous): >> <http://forum.world.st/file/n4900330/new-squeak-font-rendering.png> >> > > I prefer right, by far :( > > Stef One could still think about providing the former light rendering of Bitmap DejaVu Sans. Then you could choose depending on your display. Best, Marcel -- View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330p4900484.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Jun 11 07:56:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 11 07:56:06 2016 Subject: [squeak-dev] The Trunk: Tools-mt.704.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.704.mcz ==================== Summary ==================== Name: Tools-mt.704 Author: mt Time: 11 June 2016, 9:52:26.607012 am UUID: 12f40ef5-bf69-0b4d-8587-0d9a622b4195 Ancestors: Tools-cmm.703 Speed-up the code browser if icons or balloon helps are disabled for message lists. Browser >> #messageList is an expensive call. =============== Diff against Tools-cmm.703 =============== 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." + Preferences balloonHelpInMessageLists ifFalse: [^ nil]. self messageList size < anIndex ifTrue: [^ nil]. ^ self messageHelpFor: (self messageList at: anIndex) ! Item was changed: ----- Method: Browser>>messageIconAt: (in category 'message list') ----- messageIconAt: anIndex + self class showMessageIcons ifFalse: [^ nil]. ^ self messageIconFor: (self messageList at: anIndex ifAbsent: [^nil])! From Marcel.Taeumel at hpi.de Sat Jun 11 07:32:38 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jun 11 08:11:30 2016 Subject: [squeak-dev] Re: The Trunk: Tools-mt.704.mcz In-Reply-To: References: Message-ID: <1465630358707-4900489.post@n4.nabble.com> commits-2 wrote > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.704.mcz > > ==================== Summary ==================== > > Name: Tools-mt.704 > Author: mt > Time: 11 June 2016, 9:52:26.607012 am > UUID: 12f40ef5-bf69-0b4d-8587-0d9a622b4195 > Ancestors: Tools-cmm.703 > > Speed-up the code browser if icons or balloon helps are disabled for > message lists. Browser >> #messageList is an expensive call. > > =============== Diff against Tools-cmm.703 =============== > > 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." > + Preferences balloonHelpInMessageLists ifFalse: [^ nil]. > self messageList size < anIndex ifTrue: [^ nil]. > ^ self messageHelpFor: (self messageList at: anIndex) > ! > > Item was changed: > ----- Method: Browser>>messageIconAt: (in category 'message list') ----- > messageIconAt: anIndex > > + self class showMessageIcons ifFalse: [^ nil]. > ^ self messageIconFor: (self messageList at: anIndex ifAbsent: [^nil])! Thanks to Chris for pointing me to this! Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-704-mcz-tp4900487p4900489.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From timfelgentreff at gmail.com Sat Jun 11 08:21:54 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Sat Jun 11 08:22:16 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> References: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> Message-ID: Well Stefan, if you want to contribute the code and setup a hook on your end to trigger the benchmarks, I'm happy to include it in the benchmarking repository at https://github.com/HPI-SWA-Lab/RSqueak-Benchmarking/. You'll have to host the binaries somewhere ;) :P -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160611/2051d3a6/attachment.htm From commits at source.squeak.org Sat Jun 11 09:13:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 11 09:13:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1176.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1176.mcz ==================== Summary ==================== Name: Morphic-mt.1176 Author: mt Time: 11 June 2016, 11:12:09.425012 am UUID: c5d33955-e9e9-0c4b-a0c4-7427c3050cc0 Ancestors: Morphic-mt.1175 Fixes a bug with duplicate handling of morphic drop events. This bug has been there for a long time but showed itself only recently because we recently fixed event bubbling for drop events and focus events. Thanks to Tim (R.) for pointing out this bug during his efforts to port Scratch 1.4 to Squeak Trunk. =============== Diff against Morphic-mt.1175 =============== Item was changed: ----- Method: Morph>>handleDropMorph: (in category 'events-processing') ----- handleDropMorph: anEvent "Handle a dropping morph." | aMorph localPt | + anEvent wasHandled ifTrue: [^ self]. "Not interested" aMorph := anEvent contents. "Do a symmetric check if both morphs like each other" ((self wantsDroppedMorph: aMorph event: anEvent) "I want her" and: [aMorph wantsToBeDroppedInto: self]) "she wants me" ifFalse: [aMorph removeProperty: #undoGrabCommand. ^ self]. anEvent wasHandled: true. "Transform the morph into the receiver's coordinate frame. This is currently incomplete since it only takes the offset into account where it really should take the entire transform." localPt := (self transformedFrom: anEvent hand world) "full transform down" globalPointToLocal: aMorph referencePosition. aMorph referencePosition: localPt. self acceptDroppingMorph: aMorph event: anEvent. aMorph justDroppedInto: self event: anEvent. ! From bert at freudenbergs.de Sat Jun 11 11:01:39 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sat Jun 11 11:01:42 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> References: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> Message-ID: On Saturday, June 11, 2016, Stefan Marr wrote: > Hi Tim: > > > On 11 Jun 2016, at 07:39, Tim Felgentreff > wrote: > > > > About also running TruffleSOM, while it might be interesting for some > benchmarks, I am really interested in testing VMs that run the full image > (including heartbeat, event sensor) while running those benchmarks. > > The JVM generates safe points, yield points, and all the things that are > necessary for Java semantics? (i.e., all the equivalents for > heartbeat/event sensor overhead). > Also, such minor details don?t account for more than a few percent > overhead on average. > > No excuses :-P > The point is that we want to benchmark a full Smalltalk system, not just a language runtime. There *is* a difference ;) - Bert - -- - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160611/78d2e506/attachment.htm From smalltalk at stefan-marr.de Sat Jun 11 11:21:02 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Sat Jun 11 11:21:06 2016 Subject: [squeak-dev] A speedcenter for Squeak In-Reply-To: References: <957D6D81-D3CC-4B83-B04A-EFA773B09232@stefan-marr.de> Message-ID: <2768695E-56B1-4527-9934-4F0C76563E0D@stefan-marr.de> Hi: > On 11 Jun 2016, at 13:01, Bert Freudenberg wrote: > > The point is that we want to benchmark a full Smalltalk system, not just a language runtime. There *is* a difference ;) You measure what the benchmarks exercise. If that?s the same as in another runtime, then it is still a comparison that can provide useful insights ;) Best regards Stefan -- Stefan Marr Johannes Kepler Universit?t Linz http://stefan-marr.de/research/ From tonyg at ccs.neu.edu Sat Jun 11 16:07:27 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Sat Jun 11 16:07:24 2016 Subject: [squeak-dev] State-of-the-art in Android VMs? Message-ID: <575C373F.3030402@ccs.neu.edu> Hello everyone, Are there any modern VMs that can run on Android (ideally 4.3.1 or so, which I have on my tablet)? Googling for it finds much confusion and many defunct projects with broken download links. Tony From rpboland at gmail.com Sat Jun 11 17:05:03 2016 From: rpboland at gmail.com (Ralph Boland) Date: Sat Jun 11 17:05:06 2016 Subject: [squeak-dev] Implementing algorithms on polygons Message-ID: I have some algorithms on polygons I would like to implement. When implemented I will release my implementations as Squeak or Pharo packages under an open souce licence (Mit?) What does Squeak/Pharo have to offer in terms of a GUI for this? It would also be helpful if the package already had an implementation of an algorithm for triangulating polygons. An implementation of an algorithms for constructing Voronoi diagrams of a point set would also be useful. Any advice appreciated. Ralph Boland From karlramberg at gmail.com Sat Jun 11 17:23:05 2016 From: karlramberg at gmail.com (karl ramberg) Date: Sat Jun 11 17:23:08 2016 Subject: [squeak-dev] Implementing algorithms on polygons In-Reply-To: References: Message-ID: Squeak has PolygonMorph. I'm not sure if that is still in Pharo . Best, Karl On Sat, Jun 11, 2016 at 7:05 PM, Ralph Boland wrote: > I have some algorithms on polygons I would like to implement. > When implemented I will release my implementations as Squeak > or Pharo packages under an open souce licence (Mit?) > > What does Squeak/Pharo have to offer in terms of a GUI for this? > > It would also be helpful if the package already had an implementation > of an algorithm for triangulating polygons. > > An implementation of an algorithms for constructing Voronoi diagrams > of a point set would also be useful. > > Any advice appreciated. > > Ralph Boland > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160611/e9f14f6b/attachment.htm From btc at openinworld.com Sat Jun 11 17:25:40 2016 From: btc at openinworld.com (Ben Coman) Date: Sat Jun 11 17:26:04 2016 Subject: [squeak-dev] Implementing algorithms on polygons In-Reply-To: References: Message-ID: On Sun, Jun 12, 2016 at 1:05 AM, Ralph Boland wrote: > I have some algorithms on polygons I would like to implement. > When implemented I will release my implementations as Squeak > or Pharo packages under an open souce licence (Mit?) MIT license is typical for both Squeak and Pharo. > > What does Squeak/Pharo have to offer in terms of a GUI for this? For the drawing part, you would use Morphic on both. For the UI around the drawing, Pharo has Spec on top of Morphic and also Glamour for building interfaces like the System Browser. btw, Pharo questions are better asked in pharo-users mail list. > > It would also be helpful if the package already had an implementation > of an algorithm for triangulating polygons. > > An implementation of an algorithms for constructing Voronoi diagrams > of a point set would also be useful. A couple of threads I remember... http://forum.world.st/Voronoi-diagram-td4728327.html http://forum.world.st/ANN-Voronyj-Diagram-td4770066.html On Sun, Jun 12, 2016 at 1:23 AM, karl ramberg wrote: > Squeak has PolygonMorph. > I'm not sure if that is still in Pharo . It does. cheers -ben From herbertkoenig at gmx.net Sat Jun 11 18:28:02 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sat Jun 11 18:28:01 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> References: <1465549886487-4900330.post@n4.nabble.com> <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> Message-ID: Am 10.06.2016 um 22:33 schrieb St?phane Rollandin: >> See for yourself (left is current, right is previous): >> >> > > I prefer right, by far :( > Same here on my laptop 17'' 1600 by 900, maybe I feel different on my HD Monitor which I'll see again in a week. Cheers, Herbert From herbertkoenig at gmx.net Sat Jun 11 18:54:53 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sat Jun 11 18:54:52 2016 Subject: [squeak-dev] Implementing algorithms on polygons In-Reply-To: References: Message-ID: <80d21a78-8cf6-9595-5aa4-d911ada3a91b@gmx.net> Hi Ralph In Squeak 3.8 there was a Class Subdivision in Graphics-Tools-Triangulation with the class comment: "I perform (constraint) delauney triangulations on a set of points. See my class side for examples." Loong time ago (3.6 times) I used it for triangulation of terrains. IIRC Voronoi Diagrams are just the centers of the triangles generated by a Delaunay triangulation. If I'm right, some archaeology where it got lost and then resurrecting it may get you started. Cheers, Herbert Am 11.06.2016 um 19:05 schrieb Ralph Boland: > I have some algorithms on polygons I would like to implement. > When implemented I will release my implementations as Squeak > or Pharo packages under an open souce licence (Mit?) > > What does Squeak/Pharo have to offer in terms of a GUI for this? > > It would also be helpful if the package already had an implementation > of an algorithm for triangulating polygons. > > An implementation of an algorithms for constructing Voronoi diagrams > of a point set would also be useful. > > Any advice appreciated. > > Ralph Boland > From asqueaker at gmail.com Sat Jun 11 19:51:11 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jun 11 19:51:53 2016 Subject: [squeak-dev] Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> Message-ID: Agree with everything written in this thread from the pictures. Now I've just updated and, upon working with it for just a short time, I must admit I'm struggling with the boldness and seeming lack of crispness.. It reminds me of an old typewriter when the ink was getting low. Observe the riser of the lowercase d, how light it is relative to its bottom half.. On Sat, Jun 11, 2016 at 1:28 PM, Herbert K?nig wrote: > Am 10.06.2016 um 22:33 schrieb St?phane Rollandin: >>> >>> See for yourself (left is current, right is previous): >>> >>> >> >> I prefer right, by far :( >> > Same here on my laptop 17'' 1600 by 900, maybe I feel different on my HD > Monitor which I'll see again in a week. > > Cheers, > > Herbert > From asqueaker at gmail.com Sat Jun 11 20:51:27 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat Jun 11 20:52:10 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: <1465280722212-4899504.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> Message-ID: Hi Marcel, I updated a fresh Squeak5.1-15113 image. After the update, the scrolling jumps to a chunky 9 lines per tick, and Control+[Up Arrow] or Control+[Down Arrow] seems to "triple scroll" for each press -- as if I had pressed it three times... Maybe the problems are related? On Tue, Jun 7, 2016 at 1:25 AM, marcel.taeumel wrote: > Chris Muller-3 wrote >> It makes scrolling very choppy. Instead of scrolling by 3-lines at a >> time, it scrolls by about 10... >> >> Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by >> mouseOverForKeyboardFocus? >> >> On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel < > >> Marcel.Taeumel@ > >> > wrote: >>> Hi, there. >>> >>> Here is a change set that adds MouseWheelEvent and everything related to >>> it >>> (including EventHandler): >>> mouse-wheel-events.cs >>> <http://forum.world.st/file/n4899428/mouse-wheel-events.cs> >>> >>> You have two new preferences (in "Morphic", "keyboard", "mouse" >>> categories): >>> >>> [x] Synthesize Mouse Wheel Events from Keyboard Events >>> [x] Send Mouse Wheel Events to Keyboard Focus >>> >>> Both are enabled by default. >>> >>> I refactored the old-style wheel scrolling to use an event filter in >>> ScrollPane but this is regarded a fall-back only and can be used for old >>> applications. >>> >>> The mouse wheel event synthesis is implemented as keyboard event capture >>> filter in HandMorph itself. See the changeset's postload script or >>> HandMorph >>>>> #initForEvents. Once our VMs deliver real mouse wheel events, we can >>> change that and adapt HandMorph >> #generateMouseEvent:. >>> >>> The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used >>> to >>> switch between Windows and OS X behavior. >>> >>> Please, try it out. >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> > > Hi Chris, > > there should be no change in the observable behavior by this change. In my > image, it still scrolls 3 text lines in a text morph and 3 items in a list > morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane >> > #scrollByKeyboard:). Could you please inspect the vertical scrollbar of one > text morph and one list morph and tell me the value of "scrollDelta"? And, > if you have time, could you try it in a fresh Squeak Trunk image? You are > working under Ubuntu Linux? > > If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse Wheel > to Keyboard Focus" has no effect because the keyboard focus is always where > the mouse cursor is. However, there are many users that do disable > #mouseOverForKeyboardFocus and wished for the Mac behavior for a very long > time. Bert, for example. Now, you can make scrolling by mouse wheel behave > like on the Mac: > > [ ] mouseOverForKeyboardFocus > [x] Send Mouse Wheel Events to Keyboard Focus > [x] Synthesize Mouse Wheel Events from Keyboard Events > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899504.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Sat Jun 11 21:56:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 11 21:56:53 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160611215651.4482.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-June/068209.html Name: Tools-mt.704 Ancestors: Tools-cmm.703 Speed-up the code browser if icons or balloon helps are disabled for message lists. Browser >> #messageList is an expensive call. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068210.html Name: Morphic-mt.1176 Ancestors: Morphic-mt.1175 Fixes a bug with duplicate handling of morphic drop events. This bug has been there for a long time but showed itself only recently because we recently fixed event bubbling for drop events and focus events. Thanks to Tim (R.) for pointing out this bug during his efforts to port Scratch 1.4 to Squeak Trunk. ============================================= From commits at source.squeak.org Sun Jun 12 06:20:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 12 06:20:18 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1177.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1177.mcz ==================== Summary ==================== Name: Morphic-mt.1177 Author: mt Time: 12 June 2016, 8:19:42.040624 am UUID: 0d1a9fef-1e4b-3541-88a5-e3e70b161a0b Ancestors: Morphic-mt.1176 Fixes small regression where key-down, key-stroke, and key-up events where mapped to scroll-by-keyboard via CTRL+up/down arrow. This only affects you if you disabled the preference "Synthesize Mouse Wheel Events from Keyboard Events". =============== Diff against Morphic-mt.1176 =============== Item was changed: ----- Method: ScrollPane>>filterEvent:for: (in category 'event filtering') ----- filterEvent: aKeyboardEvent for: morphOrNil "See #initialize. This filter should be installed as keyboard event filter during the capture phase." + + aKeyboardEvent isKeystroke + ifFalse: [^ aKeyboardEvent]. + - ^ aKeyboardEvent wasIgnored: (self scrollByKeyboard: aKeyboardEvent); yourself! From Marcel.Taeumel at hpi.de Sun Jun 12 05:49:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 12 06:28:41 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> Message-ID: <1465710582540-4900536.post@n4.nabble.com> Chris Muller-3 wrote > Hi Marcel, I updated a fresh Squeak5.1-15113 image. After the update, > the scrolling jumps to a chunky 9 lines per tick, and Control+[Up > Arrow] or Control+[Down Arrow] seems to "triple scroll" for each press > -- as if I had pressed it three times... > > Maybe the problems are related? > > On Tue, Jun 7, 2016 at 1:25 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> Chris Muller-3 wrote >>> It makes scrolling very choppy. Instead of scrolling by 3-lines at a >>> time, it scrolls by about 10... >>> >>> Shouldn't "Send Mouse Wheel Events to Keyboard Focus" be controlled by >>> mouseOverForKeyboardFocus? >>> >>> On Mon, Jun 6, 2016 at 10:50 AM, marcel.taeumel < >> >>> Marcel.Taeumel@ >> >>> > wrote: >>>> Hi, there. >>>> >>>> Here is a change set that adds MouseWheelEvent and everything related >>>> to >>>> it >>>> (including EventHandler): >>>> mouse-wheel-events.cs >>>> <http://forum.world.st/file/n4899428/mouse-wheel-events.cs> >>>> >>>> You have two new preferences (in "Morphic", "keyboard", "mouse" >>>> categories): >>>> >>>> [x] Synthesize Mouse Wheel Events from Keyboard Events >>>> [x] Send Mouse Wheel Events to Keyboard Focus >>>> >>>> Both are enabled by default. >>>> >>>> I refactored the old-style wheel scrolling to use an event filter in >>>> ScrollPane but this is regarded a fall-back only and can be used for >>>> old >>>> applications. >>>> >>>> The mouse wheel event synthesis is implemented as keyboard event >>>> capture >>>> filter in HandMorph itself. See the changeset's postload script or >>>> HandMorph >>>>>> #initForEvents. Once our VMs deliver real mouse wheel events, we can >>>> change that and adapt HandMorph >> #generateMouseEvent:. >>>> >>>> The preferences "Send Mouse Wheel Events to Keyboard Focus" can be used >>>> to >>>> switch between Windows and OS X behavior. >>>> >>>> Please, try it out. >>>> >>>> Best, >>>> Marcel >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428.html >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>>> >> >> Hi Chris, >> >> there should be no change in the observable behavior by this change. In >> my >> image, it still scrolls 3 text lines in a text morph and 3 items in a >> list >> morph. This is specified in ScrollPane >> #mouseWheel: (resp: ScrollPane >> >> >> #scrollByKeyboard:). Could you please inspect the vertical scrollbar of >> one >> text morph and one list morph and tell me the value of "scrollDelta"? >> And, >> if you have time, could you try it in a fresh Squeak Trunk image? You are >> working under Ubuntu Linux? >> >> If the preference #mouseOverForKeyboardFocus is enabled, "Send Mouse >> Wheel >> to Keyboard Focus" has no effect because the keyboard focus is always >> where >> the mouse cursor is. However, there are many users that do disable >> #mouseOverForKeyboardFocus and wished for the Mac behavior for a very >> long >> time. Bert, for example. Now, you can make scrolling by mouse wheel >> behave >> like on the Mac: >> >> [ ] mouseOverForKeyboardFocus >> [x] Send Mouse Wheel Events to Keyboard Focus >> [x] Synthesize Mouse Wheel Events from Keyboard Events >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4899504.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Hi Chris, is the behavior different if you disable "Synthesize Mouse Wheel Events from Keyboard Events"? I did found a regression: http://forum.world.st/The-Trunk-Morphic-mt-1177-mcz-tp4900535.html But this does not affect the filter in HandMorph where MouseWheel events are synthesized. Hmmm... What happens if you modify ScrollPane >> #mouseWheel: an change 3 to 1? Still, this is only a workaround because the 3 denotes 3 lines/items to scroll... Hmmm.... can you monitor for me how many CTRL+up/down events are produced on your platform? Just add a "Transcript showln: anEvent" to HandMorph >> showEvent:, maybe with an "anEvent isKeyboard" check. How many do you get when you operate the mouse wheel? I get only keystrokes: [275@294 keystroke '' 514791296] [275@294 keystroke '' 514792218] [275@294 keystroke '' 514796140] [275@294 keystroke '' 514796593] [275@294 keystroke '' 514796890] [275@294 keystroke '' 514797171] [275@294 keystroke '' 514797484] [275@294 keystroke '' 514797843] [275@294 keystroke '' 514798281] In a recent CogVM in Windows 10. Best, Marcel -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4900536.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun Jun 12 06:04:45 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun Jun 12 06:43:43 2016 Subject: [squeak-dev] Re: Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: References: <1465549886487-4900330.post@n4.nabble.com> <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> Message-ID: <1465711485879-4900538.post@n4.nabble.com> Chris Muller-3 wrote > Agree with everything written in this thread from the pictures. Now > I've just updated and, upon working with it for just a short time, I > must admit I'm struggling with the boldness and seeming lack of > crispness.. > > It reminds me of an old typewriter when the ink was getting low. > Observe the riser of the lowercase d, how light it is relative to its > bottom half.. > > On Sat, Jun 11, 2016 at 1:28 PM, Herbert K?nig < > herbertkoenig@ > > wrote: >> Am 10.06.2016 um 22:33 schrieb St?phane Rollandin: >>>> >>>> See for yourself (left is current, right is previous): >>>> <http://forum.world.st/file/n4900330/new-squeak-font-rendering.png> >>>> >>> >>> I prefer right, by far :( >>> >> Same here on my laptop 17'' 1600 by 900, maybe I feel different on my HD >> Monitor which I'll see again in a week. >> >> Cheers, >> >> Herbert >> I probed some colors of our previous thinner DejaVu Sans rendering, and if you render black text, there are no black pixels in it. The darkest I could find was (0 0 9) in RGB. Most of them where (16 16 17), (24 12 16), or even brighter. I know that this is related to subpixel-AA but this explains my concerns about contrast. Sure, if you render black text on white background, you got used to not seeing black pixels at all. You can still produce a similar effect by changing black text color to the values mentioned above. Best, Marcel -- View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330p4900538.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Sun Jun 12 10:58:20 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun Jun 12 10:58:24 2016 Subject: [squeak-dev] Re: Improved rendering of our "Bitmap DejaVu Sans" In-Reply-To: <1465711485879-4900538.post@n4.nabble.com> References: <1465549886487-4900330.post@n4.nabble.com> <69d2e176-cea3-8ffb-f172-bb153b26a264@zogotounga.net> <1465711485879-4900538.post@n4.nabble.com> Message-ID: On Sat, 11 Jun 2016, marcel.taeumel wrote: > Chris Muller-3 wrote >> Agree with everything written in this thread from the pictures. Now >> I've just updated and, upon working with it for just a short time, I >> must admit I'm struggling with the boldness and seeming lack of >> crispness.. >> >> It reminds me of an old typewriter when the ink was getting low. >> Observe the riser of the lowercase d, how light it is relative to its >> bottom half.. >> >> On Sat, Jun 11, 2016 at 1:28 PM, Herbert K?nig < > >> herbertkoenig@ > >> > wrote: >>> Am 10.06.2016 um 22:33 schrieb St?phane Rollandin: >>>>> >>>>> See for yourself (left is current, right is previous): >>>>> <http://forum.world.st/file/n4900330/new-squeak-font-rendering.png> >>>>> >>>> >>>> I prefer right, by far :( >>>> >>> Same here on my laptop 17'' 1600 by 900, maybe I feel different on my HD >>> Monitor which I'll see again in a week. >>> >>> Cheers, >>> >>> Herbert >>> > > I probed some colors of our previous thinner DejaVu Sans rendering, and if > you render black text, there are no black pixels in it. The darkest I could > find was (0 0 9) in RGB. Most of them where (16 16 17), (24 12 16), or even > brighter. I know that this is related to subpixel-AA but this explains my > concerns about contrast. Sure, if you render black text on white background, > you got used to not seeing black pixels at all. You can still produce a > similar effect by changing black text color to the values mentioned above. I doubt anyone would be annoyed by the contrast improved. The aliasing effect is what people don't want to see. Please take a look at this picture again: http://forum.world.st/attachment/4900350/0/fonts.png . The vertical aliasing is just bad. I picked the E because it's easy to see it on that letter, but all letters have the same problem. Levente > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Improved-rendering-of-our-Bitmap-DejaVu-Sans-tp4900330p4900538.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From commits at source.squeak.org Sun Jun 12 21:57:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Jun 12 21:57:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160612215704.31751.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-June/068211.html Name: Morphic-mt.1177 Ancestors: Morphic-mt.1176 Fixes small regression where key-down, key-stroke, and key-up events where mapped to scroll-by-keyboard via CTRL+up/down arrow. This only affects you if you disabled the preference "Synthesize Mouse Wheel Events from Keyboard Events". ============================================= From commits at source.squeak.org Mon Jun 13 13:38:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 13 13:38:24 2016 Subject: [squeak-dev] The Trunk: Graphics-topa.347.mcz Message-ID: Tobias Pape uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-topa.347.mcz ==================== Summary ==================== Name: Graphics-topa.347 Author: topa Time: 13 June 2016, 3:37:35.948509 pm UUID: a8993135-9c6f-4daf-9f2b-75f5eb4f9fb2 Ancestors: Graphics-topa.346 (Oops. Use 30% smaller PNGs) =============== Diff against Graphics-topa.346 =============== Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBold9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldOblique9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBook9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansOblique9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: (PackageInfo named: 'Graphics') postscript: ' " Reset DejaVu to current version " + StrikeFont initialize'! - StrikeFont initialize.'! From commits at source.squeak.org Mon Jun 13 15:06:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 13 15:06:36 2016 Subject: [squeak-dev] The Trunk: Graphics-topa.348.mcz Message-ID: Tobias Pape uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-topa.348.mcz ==================== Summary ==================== Name: Graphics-topa.348 Author: topa Time: 13 June 2016, 5:06:06.327909 pm UUID: c1b49cca-982f-4f98-998d-2f0df96fcdd8 Ancestors: Graphics-topa.347 Very Small fonts do no longer need descender adjustment =============== Diff against Graphics-topa.347 =============== Item was changed: ----- Method: StrikeFont>>descent (in category 'accessing') ----- descent "Answer the receiver's maximum extent of characters below the baseline." + ^descent! - ^pointSize < 9 - ifTrue: [descent-1] - ifFalse: [descent]! Item was changed: (PackageInfo named: 'Graphics') postscript: ' " Reset DejaVu to current version " + [StrikeFont initialize] value.'! - StrikeFont initialize'! From asqueaker at gmail.com Mon Jun 13 16:52:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jun 13 16:53:19 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: <1465710582540-4900536.post@n4.nabble.com> References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465710582540-4900536.post@n4.nabble.com> Message-ID: I updated from trunk and it seems its fixed. > is the behavior different if you disable "Synthesize Mouse Wheel Events from > Keyboard Events"? > > I did found a regression: > http://forum.world.st/The-Trunk-Morphic-mt-1177-mcz-tp4900535.html That was it. Reverting this fix causes it to scroll by 9 lines instead of 3. Thanks. From eliot.miranda at gmail.com Mon Jun 13 19:50:29 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 13 19:50:33 2016 Subject: [squeak-dev] State-of-the-art in Android VMs? In-Reply-To: <575C373F.3030402@ccs.neu.edu> References: <575C373F.3030402@ccs.neu.edu> Message-ID: Hi Tony, On Sat, Jun 11, 2016 at 9:07 AM, Tony Garnock-Jones wrote: > Hello everyone, > > Are there any modern VMs that can run on Android (ideally 4.3.1 or so, > which I have on my tablet)? > The Cog ARM VM does run on Android, but only if compiled without "-march=armv6 -mfpu=vfp -mfloat-abi=hard", which are flags that we use to build the Linux ARM VM for Rasperry Pi. So if you'd like a VM, and are willing to build one yourself, check-out http://www.squeakvm.org/svn/squeak/branches/Cog, cd to build.linux32ARM/squeak.cog.spur/, edit the mvm scripts in the build* subdirectories, and issue "makeallclean", and find VMs built in products/cogspurlinuxhtARM > > Googling for it finds much confusion and many defunct projects with > broken download links. > Sorry. We're on the verge f transitioning to github and once that's complete we should be able to rationalise and organise all of this and eliminate the cruft. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160613/5c517f9d/attachment-0001.htm From Marcel.Taeumel at hpi.de Mon Jun 13 20:07:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 13 20:46:46 2016 Subject: [squeak-dev] Re: Mouse Wheel Events, "Point and scroll-by-wheel" In-Reply-To: References: <1465228217784-4899428.post@n4.nabble.com> <1465280722212-4899504.post@n4.nabble.com> <1465710582540-4900536.post@n4.nabble.com> Message-ID: <1465848457420-4900755.post@n4.nabble.com> Chris Muller-3 wrote > I updated from trunk and it seems its fixed. > >> is the behavior different if you disable "Synthesize Mouse Wheel Events >> from >> Keyboard Events"? >> >> I did found a regression: >> http://forum.world.st/The-Trunk-Morphic-mt-1177-mcz-tp4900535.html > > That was it. Reverting this fix causes it to scroll by 9 lines instead of > 3. > Thanks. Hi Chris, ah, good. I think it was like this: 1. You got three events: key down, key stroke, key up 2. Key down went into the event filter in the scroll pane and falsely used to scroll: 3 lines. 3. Keystroke was converted into mouse wheel and handled as mouse wheel: 3 lines. 4. Key up went into the event filter in the scroll pane and falsely used to scroll: 3 lines. The fix corrected 2. and 4. Best, Marcel -- View this message in context: http://forum.world.st/Mouse-Wheel-Events-Point-and-scroll-by-wheel-tp4899428p4900755.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Jun 13 21:57:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 13 21:57:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160613215709.27655.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-June/068212.html Name: Graphics-topa.346 Ancestors: Graphics-topa.345 DejaVu rendering: Improve v-fuzz by ensuring integral virtual font heights. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068213.html Name: Graphics-topa.347 Ancestors: Graphics-topa.346 (Oops. Use 30% smaller PNGs) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068214.html Name: Graphics-topa.348 Ancestors: Graphics-topa.347 Very Small fonts do no longer need descender adjustment ============================================= From ma.chris.m at gmail.com Tue Jun 14 02:57:25 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Jun 14 02:58:07 2016 Subject: [squeak-dev] rotated SystemWindows no longer working Message-ID: When showing someone Squeak, one of the classic "wows" has been rotating a window and showing that it still works -- and explaining that there's not a line of code in the "application" code to make that work, its gotten for free from Morphic. Something since the release has it not work anymore. It seems that a drag-and-drop operation is invoked for a regular red click of a rotated window. It can be seen by attempting to click a class or method on a rotated window.. From commits at source.squeak.org Tue Jun 14 09:30:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 14 09:30:25 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-topa.176.mcz Message-ID: Tobias Pape uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-topa.176.mcz ==================== Summary ==================== Name: MorphicExtras-topa.176 Author: topa Time: 14 June 2016, 11:30:05.074834 am UUID: b32dc615-496b-4767-8ea0-3b3e8af40fc5 Ancestors: MorphicExtras-pre.175 Add a HistogramMorph similar to GraphMorph =============== Diff against MorphicExtras-pre.175 =============== Item was added: + RectangleMorph subclass: #HistogramMorph + instanceVariableNames: 'bag cachedForm values counts max sum limit labelBlock countLabelBlock' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicExtras-Widgets'! + + !HistogramMorph commentStamp: 'topa 6/14/2016 11:27' prior: 0! + I display bags as a histogram, that is a bar chart of the counts in the bag. + + Example: + HistogramMorph openOn: (Smalltalk allClasses gather: + [:class | class selectors collect: [:selector | class ]]) + + + Instance Variables + bag: + cachedForm:
+ countLabelBlock: + counts: + labelBlock: + limit: + max: + sum: + values: + + bag + - The bag that forms the data basis for the histogram display + + cachedForm + - A form used to cache the historgram rendering. + + countLabelBlock + - Optional. Block that receives the count for the current bar and should return a String. + Leaving this nil is equivalent to [:count | count asString]. + + counts + - Cached collection of all counts in (value-)frequency-sorted order for rendering speed. + See values. + + labelBlock + - Optional. Block that receives the value for the current bar and should return a + String for the label. Leaving this nil is equivalent to [:value | value asString]. + + limit + - Maximum number of elements from values to consider. Defaults to 25. + + max + - Cached maximum value from values. + + sum + - Cached sum of all elements in values. Determines overall histogram height. + + values + - Cached collection of all values in frequency-sorted order for rendering speed. + See counts.! Item was added: + ----- Method: HistogramMorph class>>on: (in category 'instance creation') ----- + on: aCollection + + ^ self new + bag: aCollection asBag; + yourself! Item was added: + ----- Method: HistogramMorph class>>openOn: (in category 'instance creation') ----- + openOn: aCollection + + ^ (self on: aCollection) + openInHand! Item was added: + ----- Method: HistogramMorph>>bag (in category 'accessing') ----- + bag + + ^ bag! Item was added: + ----- Method: HistogramMorph>>bag: (in category 'accessing') ----- + bag: anObject + + self basicBag: anObject. + self flush. + self changed. + ! Item was added: + ----- Method: HistogramMorph>>basicBag: (in category 'accessing') ----- + basicBag: anObject + + bag := anObject.! Item was added: + ----- Method: HistogramMorph>>basicLimit: (in category 'accessing') ----- + basicLimit: anObject + + limit := anObject. + ! Item was added: + ----- Method: HistogramMorph>>cachedForm (in category 'accessing') ----- + cachedForm + + ^ cachedForm! Item was added: + ----- Method: HistogramMorph>>cachedForm: (in category 'accessing') ----- + cachedForm: anObject + + cachedForm := anObject.! Item was added: + ----- Method: HistogramMorph>>color: (in category 'accessing') ----- + color: aColor + + super color: aColor. + self flushCachedForm. + ! Item was added: + ----- Method: HistogramMorph>>countLabelBlock (in category 'accessing') ----- + countLabelBlock + + ^ countLabelBlock! Item was added: + ----- Method: HistogramMorph>>countLabelBlock: (in category 'accessing') ----- + countLabelBlock: anObject + + countLabelBlock := anObject.! Item was added: + ----- Method: HistogramMorph>>countLabelFor: (in category 'drawing') ----- + countLabelFor: aNumber + + ^ self countLabelBlock + ifNotNil: [:block | block value: aNumber] + ifNil: [aNumber asString] + ! Item was added: + ----- Method: HistogramMorph>>counts (in category 'accessing') ----- + counts + + ^ counts! Item was added: + ----- Method: HistogramMorph>>counts: (in category 'accessing') ----- + counts: anObject + + counts := anObject.! Item was added: + ----- Method: HistogramMorph>>defaultColor (in category 'initialization') ----- + defaultColor + ^ Color veryVeryLightGray! Item was added: + ----- Method: HistogramMorph>>drawBar:value:count:chartHeight:font:on: (in category 'drawing') ----- + drawBar: aRectangle value: anObject count: anInteger chartHeight: chartHeight font: aFont on: aCanvas + + | label countLabel labelWidth countWidth midX | + label := self labelFor: anObject. + countLabel := self countLabelFor: anInteger. + labelWidth := aFont widthOfString: label. + countWidth := aFont widthOfString: countLabel. + midX := aRectangle origin x + (aRectangle width // 2). + + aCanvas fillRectangle: aRectangle color: Color blue. + self drawLabel: label width: labelWidth at: (midX - (labelWidth // 2) @ chartHeight) barWidth: aRectangle width font: aFont on: aCanvas. + countWidth < aRectangle width + ifTrue: [aCanvas drawString: countLabel at: (midX - (countWidth // 2) @ (chartHeight - (3/2 * aFont height))) font: aFont color: Color lightGray]. + ! Item was added: + ----- Method: HistogramMorph>>drawDataOn: (in category 'drawing') ----- + drawDataOn: aCanvas + + | numX elementWidth offsetX font fontHeight offsetY maxY barWidth barRadius chartHeight | + font := TextStyle defaultFont. + fontHeight := font height. + numX := self limit. + maxY := self sum. + elementWidth := self width / (numX + 1). + barWidth := 2 max: (elementWidth * 0.9) floor. + barRadius := barWidth / 2. + offsetX := elementWidth / 2. + offsetY := fontHeight * 1.2 + max: (self values collect: [:value | font widthOfString: (self labelFor: value)]) max. + chartHeight := self height - offsetY. + + 0 to: (self height - offsetY) by: 20 do: [:i | + aCanvas + line: 0@i to: aCanvas clipRect width@i width: 1 color: (Color lightGray lighter alpha: 0.5)]. + + self valuesAndCountsWithIndexDo: + [:value :count :barIndex | | barMidX origin end | + barIndex <= self limit ifTrue: [ + barMidX := barIndex * elementWidth. + origin := barMidX - barRadius @ ((maxY - count) / maxY * chartHeight). + end := barMidX + barRadius @ chartHeight. + + self + drawBar: (origin corner: end) + value: value + count: count + chartHeight: chartHeight + font: font + on: aCanvas]]. + ! Item was added: + ----- Method: HistogramMorph>>drawLabel:width:at:barWidth:font:on: (in category 'drawing') ----- + drawLabel: aString width: aNumber at: aPoint barWidth: barWidth font: aFont on: aCanvas + + aNumber <= barWidth + ifTrue: [aCanvas drawString: aString at: aPoint font: aFont color: Color black] + ifFalse: [ + | c | + c := Display defaultCanvasClass extent: aNumber @ aFont height. + c drawString: aString at: 0 @ 0 font: aFont color: Color black. + aCanvas paintImage: (c form rotateBy: -90 smoothing: 3) at: aPoint].! Item was added: + ----- Method: HistogramMorph>>drawOn: (in category 'drawing') ----- + drawOn: aCanvas + | c | + self cachedForm + ifNil: + [c := Display defaultCanvasClass extent: self bounds extent. + c translateBy: self bounds origin negated + during: [:tempCanvas | super drawOn: tempCanvas]. + self drawDataOn: c. + self cachedForm: c form]. + aCanvas + cache: self bounds + using: self cachedForm + during: [:cachingCanvas | self drawDataOn: cachingCanvas]. + ! Item was added: + ----- Method: HistogramMorph>>flush (in category 'initialization') ----- + flush + + | valuesAndCounts | + self bag ifNil: [^self]. "nothing to do yet" + valuesAndCounts := self bag sortedCounts. + valuesAndCounts size < self limit + ifTrue: [self basicLimit: valuesAndCounts size]. + self values: ((valuesAndCounts collect: [:ea | ea value]) first: self limit). + self counts: ((valuesAndCounts collect: [:ea | ea key]) first: self limit). + self max: self counts max. + self sum: self counts sum. + + self flushCachedForm. + ! Item was added: + ----- Method: HistogramMorph>>flushCachedForm (in category 'initialization') ----- + flushCachedForm + + cachedForm := nil. + ! Item was added: + ----- Method: HistogramMorph>>initialize (in category 'initialization') ----- + initialize + + super initialize. + self + extent: 700 @ 400; + basicLimit: 25; + yourself.! Item was added: + ----- Method: HistogramMorph>>labelBlock (in category 'accessing') ----- + labelBlock + + ^ labelBlock! Item was added: + ----- Method: HistogramMorph>>labelBlock: (in category 'accessing') ----- + labelBlock: anObject + + labelBlock := anObject.! Item was added: + ----- Method: HistogramMorph>>labelFor: (in category 'drawing') ----- + labelFor: aValue + + ^ self labelBlock + ifNotNil: [:block | block value: aValue] + ifNil: [aValue asString] + ! Item was added: + ----- Method: HistogramMorph>>layoutChanged (in category 'layout') ----- + layoutChanged + + super layoutChanged. + cachedForm := nil. + ! Item was added: + ----- Method: HistogramMorph>>limit (in category 'accessing') ----- + limit + + ^ limit! Item was added: + ----- Method: HistogramMorph>>limit: (in category 'accessing') ----- + limit: anObject + + self basicLimit: anObject. + self flush. + self changed! Item was added: + ----- Method: HistogramMorph>>max (in category 'accessing') ----- + max + + ^ max! Item was added: + ----- Method: HistogramMorph>>max: (in category 'accessing') ----- + max: anObject + + max := anObject.! Item was added: + ----- Method: HistogramMorph>>sum (in category 'accessing') ----- + sum + + ^ sum! Item was added: + ----- Method: HistogramMorph>>sum: (in category 'accessing') ----- + sum: anObject + + sum := anObject! Item was added: + ----- Method: HistogramMorph>>values (in category 'accessing') ----- + values + + ^ values! Item was added: + ----- Method: HistogramMorph>>values: (in category 'accessing') ----- + values: anObject + + values := anObject.! Item was added: + ----- Method: HistogramMorph>>valuesAndCountsWithIndexDo: (in category 'enumeration') ----- + valuesAndCountsWithIndexDo: aBlock + + 1 to: self values size do: [:index | + aBlock + value: (self values at: index) + value: (self counts at: index) + value: index]. ! From lecteur at zogotounga.net Tue Jun 14 09:31:52 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Tue Jun 14 09:31:20 2016 Subject: [squeak-dev] rotated SystemWindows no longer working In-Reply-To: References: Message-ID: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> It works here, in a trunk image at update 16050. But I noticed that between update 15953 and 16044, something changed and now selecting a method or a class in a rotated browser beeps and sends a TransferMorph to 0@0 instead of performing the required action. Stef From bert at freudenbergs.de Tue Jun 14 10:13:53 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Jun 14 10:13:57 2016 Subject: [squeak-dev] rotated SystemWindows no longer working In-Reply-To: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> References: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> Message-ID: On Tue, Jun 14, 2016 at 11:31 AM, St?phane Rollandin wrote: > It works here, in a trunk image at update 16050. > > But I noticed that between update 15953 and 16044, something changed and > now selecting a method or a class in a rotated browser beeps and sends a > TransferMorph to 0@0 instead of performing the required action. > Yes. In lists that are drag-enabled the dragging is invoked immediately. My guess is that somehow the event coordinates are not transformed correctly so it detects a drag operation. Perhaps one path is not going through the transformation morph but uses the untransformed coordinates? - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160614/8c37cc69/attachment.htm From Marcel.Taeumel at hpi.de Tue Jun 14 14:44:07 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 14 15:23:23 2016 Subject: [squeak-dev] Re: rotated SystemWindows no longer working In-Reply-To: References: Message-ID: <1465915447166-4900857.post@n4.nabble.com> Chris Muller-4 wrote > When showing someone Squeak, one of the classic "wows" has been > rotating a window and showing that it still works -- and explaining > that there's not a line of code in the "application" code to make that > work, its gotten for free from Morphic. > > Something since the release has it not work anymore. It seems that a > drag-and-drop operation is invoked for a regular red click of a > rotated window. It can be seen by attempting to click a class or > method on a rotated window.. Plus, collapsing a rotate window has also been broken for some time. It is on my list. :-) Best, Marcel -- View this message in context: http://forum.world.st/rotated-SystemWindows-no-longer-working-tp4900772p4900857.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tonyg at ccs.neu.edu Tue Jun 14 16:55:49 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Tue Jun 14 16:55:52 2016 Subject: [squeak-dev] State-of-the-art in Android VMs? In-Reply-To: References: <575C373F.3030402@ccs.neu.edu> Message-ID: <3d98e84b-a9e9-7e5d-59a0-7a3a93b26ccc@ccs.neu.edu> On 06/13/2016 03:50 PM, Eliot Miranda wrote: > The Cog ARM VM does run on Android, but only if compiled without > "-march=armv6 -mfpu=vfp -mfloat-abi=hard", which are flags that we use > to build the Linux ARM VM for Rasperry Pi. So if you'd like a VM, and > are willing to build one yourself, > check-out http://www.squeakvm.org/svn/squeak/branches/Cog, cd > to build.linux32ARM/squeak.cog.spur/, edit the mvm scripts in the build* > subdirectories, and issue "makeallclean", and find VMs built in > products/cogspurlinuxhtARM Thank you, Eliot! I'm looking forward to giving it a try. > We're on the verge f transitioning to github *Excellent*. That's very good news. Cheers, Tony From commits at source.squeak.org Tue Jun 14 21:57:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 14 21:57:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160614215705.4762.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-June/068215.html Name: MorphicExtras-topa.176 Ancestors: MorphicExtras-pre.175 Add a HistogramMorph similar to GraphMorph ============================================= From commits at source.squeak.org Wed Jun 15 05:55:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 05:55:50 2016 Subject: [squeak-dev] The Trunk: Kernel-mt.1028.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.1028.mcz ==================== Summary ==================== Name: Kernel-mt.1028 Author: mt Time: 15 June 2016, 7:55:24.868664 am UUID: ef9df82a-545e-b44a-9084-8b608be6ce69 Ancestors: Kernel-mt.1027 Extends EventSensor to be prepared for VMs to really send mouse-wheel events. (Merges several peek* and prim* methods in EventSensor as a clean-up from the former InputSensor days.) =============== Diff against Kernel-mt.1027 =============== Item was changed: Object subclass: #EventSensor + instanceVariableNames: 'mouseButtons mousePosition mouseWheelDelta keyboardBuffer interruptKey interruptSemaphore eventQueue inputSemaphore lastEventPoll hasInputSemaphore' - instanceVariableNames: 'mouseButtons mousePosition keyboardBuffer interruptKey interruptSemaphore eventQueue inputSemaphore lastEventPoll hasInputSemaphore' classVariableNames: 'ButtonDecodeTable EventPollPeriod EventTicklerProcess InterruptSemaphore InterruptWatcherProcess KeyDecodeTable' poolDictionaries: 'EventSensorConstants' category: 'Kernel-Processes'! !EventSensor commentStamp: 'dtl 1/30/2016 14:44' prior: 0! An EventSensor is an interface to the user input devices. There is at least one instance of EventSensor named Sensor in the system. EventSensor is a replacement for the earlier InputSensor implementation based on a set of (optional) event primitives. An EventSensor updates its state when events are received so that all state based users of Sensor (e.g., Sensor keyboard, Sensor leftShiftDown, Sensor mouseButtons) will work exactly as before, by moving the current VM mechanisms into EventSensor itself. An optional input semaphore is part of the new design. For platforms that support true asynchronous event notification, the semaphore will be signaled to indicate pending events. On platforms that do not support asynchronous notifications about events, the UI will have to poll EventSensor periodically to read events from the VM. Instance variables: mouseButtons - mouse button state as replacement for primMouseButtons mousePosition - mouse position as replacement for primMousePt keyboardBuffer - keyboard input buffer interruptKey - currently defined interrupt key interruptSemaphore - the semaphore signaled when the interruptKey is detected eventQueue - an optional event queue for event driven applications inputSemaphore - the semaphore signaled by the VM if asynchronous event notification is supported lastEventPoll - the last millisecondClockValue at which we called fetchMoreEvents hasInputSemaphore - true if my inputSemaphore has actually been signaled at least once. Class variables: ButtonDecodeTable - maps mouse buttons as reported by the VM to ones reported in the events. KeyDecodeTable SmallInteger>> - maps some keys and their modifiers to other keys (used for instance to map Ctrl-X to Alt-X) InterruptSemaphore - signalled by the the VM and/or the event loop upon receiving an interrupt keystroke. InterruptWatcherProcess - waits on the InterruptSemaphore and then responds as appropriate. EventPollPeriod - the number of milliseconds to wait between polling for more events in the userInterruptHandler. EventTicklerProcess - the process that makes sure that events are polled for often enough (at least every EventPollPeriod milliseconds). Event format: The current event format is very simple. Each event is recorded into an 8 element array. All events must provide some SmallInteger ID (the first field in the event buffer) and a time stamp (the second field in the event buffer), so that the difference between the time stamp of an event and the current time can be reported. Currently, the following events are defined: Null event ============= The Null event is returned when the ST side asks for more events but no more events are available. Structure: [1] - event type 0 [2-8] - unused Mouse event structure ========================== Mouse events are generated when mouse input is detected. Structure: [1] - event type 1 [2] - time stamp [3] - mouse x position [4] - mouse y position [5] - button state; bitfield with the following entries: 1 - yellow (e.g., right) button 2 - blue (e.g., middle) button 4 - red (e.g., left) button [all other bits are currently undefined] [6] - modifier keys; bitfield with the following entries: 1 - shift key 2 - ctrl key 4 - (Mac specific) option key 8 - Cmd/Alt key [all other bits are currently undefined] [7] - reserved. [8] - reserved. Keyboard events ==================== Keyboard events are generated when keyboard input is detected. [1] - event type 2 [2] - time stamp [3] - character code For now the character code is in Mac Roman encoding. [4] - press state; integer with the following meaning 0 - character 1 - key press (down) 2 - key release (up) [5] - modifier keys (same as in mouse events) [6] - reserved. [7] - reserved. [8] - reserved. ! Item was changed: ----- Method: EventSensor>>anyButtonPressed (in category 'mouse') ----- anyButtonPressed "Answer whether at least one mouse button is currently being pressed." + ^ self peekButtons anyMask: 7 - ^ self primMouseButtons anyMask: 7 ! Item was changed: ----- Method: EventSensor>>anyModifierKeyPressed (in category 'modifier keys') ----- anyModifierKeyPressed "ignore, however, the shift keys 'cause that's not REALLY a command key" + ^ self peekButtons anyMask: 16r70 "cmd | opt | ctrl"! - ^ self primMouseButtons anyMask: 16r70 "cmd | opt | ctrl"! Item was changed: ----- Method: EventSensor>>blueButtonPressed (in category 'mouse') ----- blueButtonPressed "Answer whether only the blue mouse button is being pressed. This is the third mouse button or cmd+click on the Mac." + ^ (self peekButtons bitAnd: 7) = 1 - ^ (self primMouseButtons bitAnd: 7) = 1 ! Item was changed: ----- Method: EventSensor>>commandKeyPressed (in category 'modifier keys') ----- commandKeyPressed "Answer whether the command key on the keyboard is being held down." + ^ self peekButtons anyMask: 64! - ^ self primMouseButtons anyMask: 64! Item was changed: ----- Method: EventSensor>>controlKeyPressed (in category 'modifier keys') ----- controlKeyPressed "Answer whether the control key on the keyboard is being held down." + ^ self peekButtons anyMask: 16! - ^ self primMouseButtons anyMask: 16! Item was changed: ----- Method: EventSensor>>createMouseEvent (in category 'mouse') ----- createMouseEvent "create and return a new mouse event from the current mouse position; this is useful for restarting normal event queue processing after manual polling" | buttons modifiers pos mapped eventBuffer | eventBuffer := Array new: 8. + buttons := self peekButtons. + pos := self peekPosition. - buttons := self primMouseButtons. - pos := self primMousePt. modifiers := buttons bitShift: -3. buttons := buttons bitAnd: 7. mapped := self mapButtons: buttons modifiers: modifiers. eventBuffer at: 1 put: EventTypeMouse; at: 2 put: Time eventMillisecondClock; at: 3 put: pos x; at: 4 put: pos y; at: 5 put: mapped; at: 6 put: modifiers. ^ eventBuffer! Item was changed: ----- Method: EventSensor>>initialize (in category 'initialize') ----- initialize "Initialize the receiver" mouseButtons := 0. mousePosition := 0 @ 0. + mouseWheelDelta := 0 @ 0. keyboardBuffer := SharedQueue new. self setInterruptKey: (interruptKey ifNil: [$. asciiValue bitOr: 16r0800 ]). "cmd-." interruptSemaphore := (Smalltalk specialObjectsArray at: 31) ifNil: [Semaphore new]. self flushAllButDandDEvents. inputSemaphore := Semaphore new. hasInputSemaphore := false.! Item was changed: ----- Method: EventSensor>>keyboard (in category 'keyboard') ----- keyboard "Answer the next character from the keyboard." | firstCharacter secondCharactor stream multiCharacter converter | firstCharacter := self characterForKeycode: self primKbdNext. + secondCharactor := self peekKeyboard. - secondCharactor := self characterForKeycode: self primKbdPeek. secondCharactor isNil ifTrue: [^ firstCharacter]. converter := TextConverter defaultSystemConverter. converter isNil ifTrue: [^ firstCharacter]. stream := ReadStream on: (String with: firstCharacter with: secondCharactor). multiCharacter := converter nextFromStream: stream. multiCharacter isOctetCharacter ifTrue: [^ multiCharacter]. self primKbdNext. ^ multiCharacter ! Item was removed: - ----- Method: EventSensor>>keyboardPeek (in category 'keyboard') ----- - keyboardPeek - "Answer the next character in the keyboard buffer without removing it, or nil if it is empty." - - ^ self characterForKeycode: self primKbdPeek! Item was changed: ----- Method: EventSensor>>keyboardPressed (in category 'keyboard') ----- keyboardPressed "Answer true if keystrokes are available." + ^self peekKeyboard notNil! - ^self primKbdPeek notNil! Item was changed: ----- Method: EventSensor>>leftShiftDown (in category 'modifier keys') ----- leftShiftDown "Answer whether the shift key on the keyboard is being held down. The name of this message is a throwback to the Alto, which had independent left and right shift keys." + ^ self peekButtons anyMask: 8! - ^ self primMouseButtons anyMask: 8! Item was changed: ----- Method: EventSensor>>mouseButtons (in category 'mouse') ----- mouseButtons "Answer a number from 0 to 7 that encodes the state of the three mouse buttons in its lowest 3 bits." + ^ self peekButtons bitAnd: 7 - ^ self primMouseButtons bitAnd: 7 ! Item was changed: ----- Method: EventSensor>>nextEventSynthesized (in category 'private') ----- nextEventSynthesized "Return a synthesized event. This method is called if an event driven client wants to receive events but the primary user interface is not event-driven (e.g., the receiver does not have an event queue but only updates its state). This can, for instance, happen if a Morphic World is run in an MVC window. To simplify the clients work this method will always return all available keyboard events first, and then (repeatedly) the mouse events. Since mouse events come last, the client can assume that after one mouse event has been received there are no more to come. Note that it is impossible for EventSensor to determine if a mouse event has been issued before so the client must be aware of the possible problem of getting repeatedly the same mouse events. See HandMorph>>processEvents for an example on how to deal with this." | kbd array buttons pos modifiers mapped | "First check for keyboard" array := Array new: 8. kbd := self primKbdNext. kbd ifNotNil: ["simulate keyboard event" array at: 1 put: EventTypeKeyboard. "evt type" array at: 2 put: Time eventMillisecondClock. "time stamp" array at: 3 put: (kbd bitAnd: 255). "char code" array at: 4 put: EventKeyChar. "key press/release" array at: 5 put: (kbd bitShift: -8). "modifier keys" ^ array]. "Then check for mouse" + pos := self peekPosition. - pos := self primMousePt. buttons := mouseButtons. modifiers := buttons bitShift: -3. buttons := buttons bitAnd: 7. mapped := self mapButtons: buttons modifiers: modifiers. array at: 1 put: EventTypeMouse; at: 2 put: Time eventMillisecondClock; at: 3 put: pos x; at: 4 put: pos y; at: 5 put: mapped; at: 6 put: modifiers. ^ array ! Item was changed: ----- Method: EventSensor>>peekButtons (in category 'accessing') ----- peekButtons self fetchMoreEvents. + self flushNonKbdEvents. + ^ mouseButtons! - ^mouseButtons! Item was added: + ----- Method: EventSensor>>peekKeyboard (in category 'keyboard') ----- + peekKeyboard + "Answer the next character in the keyboard buffer without removing it, or nil if it is empty." + + | char | + self fetchMoreEvents. + keyboardBuffer isEmpty ifFalse: [^ self characterForKeycode: keyboardBuffer peek]. + char := nil. + self eventQueue ifNotNil: [:queue | + queue nextOrNilSuchThat: "NOTE: must not return out of this block, so loop to end" + [:buf | (self isKbdEvent: buf) ifTrue: [char ifNil: [char := buf at: 3]]. + false "NOTE: block value must be false so Queue won't advance"]]. + ^ self characterForKeycode: char! Item was changed: ----- Method: EventSensor>>peekPosition (in category 'accessing') ----- peekPosition + self fetchMoreEvents. + "self flushNonKbdEvents. -- mt: Should not be necessary here." + ^ mousePosition! - ^ self primMousePt! Item was added: + ----- Method: EventSensor>>peekWheelDelta (in category 'accessing') ----- + peekWheelDelta + self fetchMoreEvents. + ^ mouseWheelDelta! Item was changed: ----- Method: EventSensor>>primKbdNext (in category 'private') ----- primKbdNext "Allows for use of old Sensor protocol to get at the keyboard, as when running kbdTest or the InterpreterSimulator in Morphic" | evtBuf | + + self flag: #refactor. "mt: Suspiciously similar to #peekKeyboardEvent" self fetchMoreEvents. keyboardBuffer isEmpty ifFalse:[^ keyboardBuffer next]. self eventQueue ifNotNil: [:queue | evtBuf := queue nextOrNilSuchThat: [:buf | self isKbdEvent: buf]. self flushNonKbdEvents]. ^ evtBuf ifNotNil: [evtBuf at: 3] ! Item was removed: - ----- Method: EventSensor>>primKbdPeek (in category 'private') ----- - primKbdPeek - "Allows for use of old Sensor protocol to get at the keyboard, - as when running kbdTest or the InterpreterSimulator in Morphic" - | char | - self fetchMoreEvents. - keyboardBuffer isEmpty ifFalse: [^ keyboardBuffer peek]. - char := nil. - self eventQueue ifNotNil: [:queue | - queue nextOrNilSuchThat: "NOTE: must not return out of this block, so loop to end" - [:buf | (self isKbdEvent: buf) ifTrue: [char ifNil: [char := buf at: 3]]. - false "NOTE: block value must be false so Queue won't advance"]]. - ^ char! Item was removed: - ----- Method: EventSensor>>primMouseButtons (in category 'private') ----- - primMouseButtons - self fetchMoreEvents. - self flushNonKbdEvents. - ^ mouseButtons! Item was removed: - ----- Method: EventSensor>>primMousePt (in category 'private') ----- - primMousePt - self fetchMoreEvents. - "self flushNonKbdEvents. -- mt: Should not be necessary here." - ^ mousePosition! Item was changed: ----- Method: EventSensor>>processEvent: (in category 'private-I/O') ----- processEvent: evt "Process a single event. This method is run at high priority." | type buttons window | type := evt at: 1. "Only process main window events, forward others to host window proxies" window := evt at: 8. (window isNil or: [window isZero]) ifTrue: [window := 1. evt at: 8 put: window]. window = 1 ifFalse: [ ^Smalltalk at: #HostWindowProxy ifPresent: [:w | w processEvent: evt]]. + "Tackle mouse events and mouse wheel events first" + (type = EventTypeMouse or: [type = EventTypeMouseWheel]) - "Tackle mouse events first" - type = EventTypeMouse ifTrue: [buttons := (ButtonDecodeTable at: (evt at: 5) + 1). evt at: 5 put: (Smalltalk platformName = 'Mac OS' ifTrue: [ buttons ] ifFalse: [ self mapButtons: buttons modifiers: (evt at: 6) ]). self queueEvent: evt. + type = EventTypeMouse ifTrue: [self processMouseEvent: evt]. + type = EventTypeMouseWheel ifTrue: [self processMouseWheelEvent: evt]. - self processMouseEvent: evt . ^self]. - "Store the event in the queue if there's any" type = EventTypeKeyboard ifTrue: [ "Check if the event is a user interrupt" ((evt at: 4) = 0 and: [((evt at: 3) bitOr: (((evt at: 5) bitAnd: 8) bitShift: 8)) = interruptKey]) ifTrue: ["interrupt key is meta - not reported as event" ^ interruptSemaphore signal]. "Else swap ctrl/alt keys if neeeded. Look at the Unicode char first, then ascii." KeyDecodeTable at: {evt at: 6. evt at: 5} ifPresent: [:a | evt at: 6 put: a first; at: 5 put: a second]. KeyDecodeTable at: {evt at: 3. evt at: 5} ifPresent: [:a | evt at: 3 put: a first; at: 5 put: a second]. self queueEvent: evt. self processKeyboardEvent: evt . ^self ]. "Handle all events other than Keyborad or Mouse." self queueEvent: evt. ! Item was added: + ----- Method: EventSensor>>processMouseWheelEvent: (in category 'private-I/O') ----- + processMouseWheelEvent: evt + "process a mouse wheel event, updating EventSensor state" + + | modifiers buttons mapped | + mouseWheelDelta := (evt at: 3) @ (evt at: 4). + buttons := evt at: 5. + modifiers := evt at: 6. + mapped := self mapButtons: buttons modifiers: modifiers. + mouseButtons := mapped bitOr: (modifiers bitShift: 3).! Item was changed: ----- Method: EventSensor>>rawMacOptionKeyPressed (in category 'modifier keys') ----- rawMacOptionKeyPressed "Answer whether the option key on the Macintosh keyboard is being held down. Macintosh specific. Clients are discouraged from calling this directly, since it circumvents bert's attempt to eradicate option-key checks" + ^ self peekButtons anyMask: 32! - ^ self primMouseButtons anyMask: 32! Item was changed: ----- Method: EventSensor>>redButtonPressed (in category 'mouse') ----- redButtonPressed "Answer true if only the red mouse button is being pressed. This is the first mouse button, usually the left one." + ^ (self peekButtons bitAnd: 7) = 4 - ^ (self primMouseButtons bitAnd: 7) = 4 ! Item was changed: ----- Method: EventSensor>>shiftPressed (in category 'modifier keys') ----- shiftPressed "Answer whether the shift key on the keyboard is being held down." + ^ self peekButtons anyMask: 8 - ^ self primMouseButtons anyMask: 8 ! Item was changed: ----- Method: EventSensor>>yellowButtonPressed (in category 'mouse') ----- yellowButtonPressed "Answer whether only the yellow mouse button is being pressed. This is the second mouse button or option+click on the Mac." + ^ (self peekButtons bitAnd: 7) = 2 - ^ (self primMouseButtons bitAnd: 7) = 2 ! Item was changed: SharedPool subclass: #EventSensorConstants instanceVariableNames: '' + classVariableNames: 'BlueButtonBit CommandKeyBit CtrlKeyBit EventKeyChar EventKeyDown EventKeyUp EventTouchCancelled EventTouchDown EventTouchMoved EventTouchStationary EventTouchUp EventTypeComplex EventTypeDragDropFiles EventTypeKeyboard EventTypeMenu EventTypeMouse EventTypeMouseWheel EventTypeNone EventTypeWindow OptionKeyBit RedButtonBit ShiftKeyBit TouchPhaseBegan TouchPhaseCancelled TouchPhaseEnded TouchPhaseMoved TouchPhaseStationary WindowEventActivated WindowEventClose WindowEventIconise WindowEventMetricChange WindowEventPaint WindowEventStinks YellowButtonBit' - classVariableNames: 'BlueButtonBit CommandKeyBit CtrlKeyBit EventKeyChar EventKeyDown EventKeyUp EventTouchCancelled EventTouchDown EventTouchMoved EventTouchStationary EventTouchUp EventTypeComplex EventTypeDragDropFiles EventTypeKeyboard EventTypeMenu EventTypeMouse EventTypeNone EventTypeWindow OptionKeyBit RedButtonBit ShiftKeyBit TouchPhaseBegan TouchPhaseCancelled TouchPhaseEnded TouchPhaseMoved TouchPhaseStationary WindowEventActivated WindowEventClose WindowEventIconise WindowEventMetricChange WindowEventPaint WindowEventStinks YellowButtonBit' poolDictionaries: '' category: 'Kernel-Processes'! Item was changed: ----- Method: EventSensorConstants class>>initialize (in category 'pool initialization') ----- initialize "EventSensorConstants initialize" RedButtonBit := 4. BlueButtonBit := 2. YellowButtonBit := 1. ShiftKeyBit := 1. CtrlKeyBit := 2. OptionKeyBit := 4. CommandKeyBit := 8. "Types of events" EventTypeNone := 0. EventTypeMouse := 1. EventTypeKeyboard := 2. EventTypeDragDropFiles := 3. EventTypeMenu := 4. EventTypeWindow := 5. EventTypeComplex := 6. + EventTypeMouseWheel := 7. "Press codes for keyboard events" EventKeyChar := 0. EventKeyDown := 1. EventKeyUp := 2. "Host window events" WindowEventMetricChange := 1. WindowEventClose := 2. WindowEventIconise := 3. WindowEventActivated := 4. WindowEventPaint := 5. WindowEventStinks := 6. "types for touch events" EventTouchDown := 1. EventTouchUp := 2. EventTouchMoved := 3. EventTouchStationary := 4. EventTouchCancelled := 5. "iOS touch phase constants" TouchPhaseBegan := 0. TouchPhaseMoved := 1. TouchPhaseStationary := 2. TouchPhaseEnded := 3. TouchPhaseCancelled := 4. ! From commits at source.squeak.org Wed Jun 15 05:59:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 05:59:37 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1178.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1178.mcz ==================== Summary ==================== Name: Morphic-mt.1178 Author: mt Time: 15 June 2016, 7:58:44.282664 am UUID: 2cf2827f-2599-f84c-a054-ea09942951c4 Ancestors: Morphic-mt.1177 Appendix to Kernel-mt.1028. Support #wheelDelta in MouseWheelEvent instances for fine-granular scrolling. Do only raise flags for, e.g., #isWheelUp and #isWheelDown if the delta is above 120 units. Accumulate this in MouseWheelState. Wheel-up is every +120 and wheel-down is every -120. =============== Diff against Morphic-mt.1177 =============== Item was changed: Morph subclass: #HandMorph + instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler mouseWheelState lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' - instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler lastMouseEvent targetOffset damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats NewEventRules NormalCursor PasteBuffer SendMouseWheelToKeyboardFocus ShowEvents SynthesizeMouseWheelEvents' poolDictionaries: 'EventSensorConstants' category: 'Morphic-Kernel'! !HandMorph commentStamp: '' prior: 0! The cursor may be thought of as the HandMorph. The hand's submorphs hold anything being carried by dragging. There is some minimal support for multiple hands in the same world.! Item was changed: ----- Method: HandMorph>>filterEvent:for: (in category 'events-filtering') ----- filterEvent: aKeyboardEvent for: aMorphOrNil "Fixes VM behavior. Usually, there are no mouse wheel events generated by the VM but CTRL+UP/DOWN. Convert these into mouse wheel events. We installed ourself as keyboard filter only!! No need to check whether this is a keyboard event or not!! See HandMorph >> #initForEvents. Might be removed in the future if this mapping gets obsolete." HandMorph synthesizeMouseWheelEvents ifFalse: [^ aKeyboardEvent]. (aKeyboardEvent isKeystroke and: [aKeyboardEvent controlKeyPressed]) ifTrue: [ aKeyboardEvent keyCharacter caseOf: { + [Character arrowUp] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r1000]. + [Character arrowDown] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: 2r0100]. - [Character arrowUp] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: #up]. - [Character arrowDown] -> [^ self generateMouseWheelEvent: aKeyboardEvent direction: #down]. } otherwise: [^ aKeyboardEvent]]. ^ aKeyboardEvent! Item was added: + ----- Method: HandMorph>>generateMouseWheelEvent: (in category 'private events') ----- + generateMouseWheelEvent: evtBuf + "Generate the appropriate mouse wheel event for the given raw event buffer" + + | buttons modifiers deltaX deltaY stamp | + stamp := evtBuf second. + stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. + deltaX := evtBuf third. + deltaY := evtBuf fourth. + modifiers := evtBuf fifth. + buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons bitAnd: 7). + ^ MouseWheelEvent new + setType: #mouseWheel + position: self position + delta: deltaX@deltaY + direction: 2r0000 + buttons: buttons + hand: self + stamp: stamp! Item was changed: ----- Method: HandMorph>>generateMouseWheelEvent:direction: (in category 'private events') ----- + generateMouseWheelEvent: keystrokeEvent direction: direction + "Generate the appropriate mouse wheel event from the keystrokeEvent. Before calling this, ensure that the control key is pressed. - generateMouseWheelEvent: keystrokeEvent direction: directionSymbol - "Generate the appropriate mouse wheel event from the keystrokeEvent. Before calling this, ensure that the control key is pressed." + This method can be discarded once the VM produces real mouse wheel events." + ^ MouseWheelEvent new setType: #mouseWheel position: keystrokeEvent position + delta: 0 @ ((direction anyMask: 2r1000 "wheel up") ifTrue: [120] ifFalse: [-120]) + direction: direction - direction: directionSymbol buttons: (keystrokeEvent buttons bitAnd: 2r01111) "drop control key pressed for this conversion" hand: keystrokeEvent hand stamp: keystrokeEvent timeStamp! Item was changed: ----- Method: HandMorph>>handleEvent: (in category 'events-processing') ----- handleEvent: unfilteredEvent | filteredEvent | owner ifNil: [^ unfilteredEvent "not necessary but good style -- see Morph >> #handleEvent:"]. self logEvent: unfilteredEvent. "Mouse-over events occur really, really, really often. They are kind of the heart beat of the Morphic UI process." unfilteredEvent isMouseOver ifTrue: [^ self sendMouseEvent: unfilteredEvent]. self showEvent: unfilteredEvent. self sendListenEvents: unfilteredEvent. filteredEvent := self sendFilterEventCapture: unfilteredEvent for: nil. "filteredEvent := unfilteredEvent" " <-- use this to disable global capture filters" filteredEvent wasIgnored ifTrue: [ self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isWindowEvent ifTrue: [ self sendEvent: filteredEvent focus: nil. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isKeyboard ifTrue:[ self sendKeyboardEvent: filteredEvent. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isDropEvent ifTrue:[ self sendEvent: filteredEvent focus: nil. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. filteredEvent isMouse ifFalse: [ self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. " ********** MOUSE EVENT *********** " lastMouseEvent := filteredEvent. "Check for pending drag or double click operations." mouseClickState ifNotNil:[ (mouseClickState handleEvent: filteredEvent from: self) ifFalse:[ "Possibly dispatched #click: or something and will not re-establish otherwise" self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]]. + filteredEvent isMouseWheel ifTrue: [ + mouseWheelState ifNil: [mouseWheelState := MouseWheelState new]. + mouseWheelState handleEvent: filteredEvent from: self. + self mouseOverHandler processMouseOver: lastMouseEvent. + ^ filteredEvent]. + filteredEvent isMove ifTrue:[ self position: filteredEvent position. self sendMouseEvent: filteredEvent. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent]. "Issue a synthetic move event if we're not at the position of the event" filteredEvent position = self position ifFalse: [self moveToEvent: filteredEvent]. "Drop submorphs on button events" self hasSubmorphs ifTrue:[self dropMorphs: filteredEvent] + ifFalse:[self sendMouseEvent: filteredEvent]. - ifFalse:[ - "This check is here and not in #sendMouseEvent: to avoid unnecessary comparisons for mouse-over events." - (HandMorph sendMouseWheelToKeyboardFocus and: [filteredEvent isMouseWheel]) - ifFalse: [self sendMouseEvent: filteredEvent] - ifTrue: [self sendEvent: filteredEvent focus: self keyboardFocus clear: [self keyboardFocus: nil]]]. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent "not necessary but good style -- see Morph >> #handleEvent:" ! Item was changed: ----- Method: HandMorph>>processEvents (in category 'event handling') ----- processEvents "Process user input events from the local input devices." | evt evtBuf type hadAny | ActiveEvent ifNotNil: ["Meaning that we were invoked from within an event response. Make sure z-order is up to date" self mouseOverHandler processMouseOver: lastMouseEvent]. hadAny := false. [(evtBuf := Sensor nextEvent) isNil] whileFalse: [evt := nil. "for unknown event types" type := evtBuf first. + type = EventTypeMouse + ifTrue: [evt := self generateMouseEvent: evtBuf]. + type = EventTypeMouseWheel + ifTrue: [evt := self generateMouseWheelEvent: evtBuf]. - type = EventTypeMouse ifTrue: [evt := self generateMouseEvent: evtBuf]. type = EventTypeKeyboard ifTrue: [evt := self generateKeyboardEvent: evtBuf]. type = EventTypeDragDropFiles ifTrue: [evt := self generateDropFilesEvent: evtBuf]. type = EventTypeWindow ifTrue:[evt := self generateWindowEvent: evtBuf]. "All other events are ignored" (type ~= EventTypeDragDropFiles and: [evt isNil]) ifTrue: [^self]. evt isNil ifFalse: ["Finally, handle it" self handleEvent: evt. hadAny := true. "For better user feedback, return immediately after a mouse event has been processed." evt isMouse ifTrue: [^self]]]. "note: if we come here we didn't have any mouse events" mouseClickState notNil ifTrue: ["No mouse events during this cycle. Make sure click states time out accordingly" mouseClickState handleEvent: lastMouseEvent asMouseMove from: self]. hadAny ifFalse: ["No pending events. Make sure z-order is up to date" self mouseOverHandler processMouseOver: lastMouseEvent]! Item was changed: Object subclass: #MouseClickState instanceVariableNames: 'clickClient clickState firstClickDown firstClickUp firstClickTime clickSelector dblClickSelector dblClickTime dblClickTimeoutSelector dragSelector dragThreshold' classVariableNames: '' poolDictionaries: '' + category: 'Morphic-Events'! - category: 'Morphic-Kernel'! !MouseClickState commentStamp: '' prior: 0! MouseClickState is a simple class managing the distinction between clicks, double clicks, and drag operations. It has been factored out of HandMorph due to the many instVars. Instance variables: clickClient The client wishing to receive #click:, #dblClick:, or #drag messages clickState The internal state of handling the last event (#firstClickDown, #firstClickUp, #firstClickTimedOut) firstClickDown The #mouseDown event after which the client wished to receive #click: or similar messages firstClickUp The first mouse up event which came in before the double click time out was exceeded (it is sent if there is a timout after the first mouse up event occured) firstClickTime The millisecond clock value of the first event clickSelector The selector to use for sending #click: messages dblClickSelector The selector to use for sending #doubleClick: messages dblClickTime Timout in milliseconds for a double click operation dragSelector The selector to use for sending #drag: messages dragThreshold Threshold used for determining if a #drag: message is sent (pixels!!) ! Item was changed: MouseEvent subclass: #MouseWheelEvent + instanceVariableNames: 'delta direction' - instanceVariableNames: 'direction' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! Item was removed: - ----- Method: MouseWheelEvent>>direction (in category 'accessing') ----- - direction - ^ direction! Item was added: + ----- Method: MouseWheelEvent>>initialize (in category 'initialization') ----- + initialize + + super initialize. + direction := 2r0000. + delta := 0@0.! Item was changed: ----- Method: MouseWheelEvent>>isWheelDown (in category 'testing') ----- isWheelDown + ^ direction anyMask: 2r0100! - ^ self direction == #down! Item was changed: ----- Method: MouseWheelEvent>>isWheelLeft (in category 'testing') ----- isWheelLeft + ^ direction anyMask: 2r0010! - ^ self direction == #left! Item was changed: ----- Method: MouseWheelEvent>>isWheelRight (in category 'testing') ----- isWheelRight + ^ direction anyMask: 2r0001! - ^ self direction == #right! Item was changed: ----- Method: MouseWheelEvent>>isWheelUp (in category 'testing') ----- isWheelUp + ^ direction anyMask: 2r1000! - ^ self direction == #up! Item was changed: ----- Method: MouseWheelEvent>>printOn: (in category 'printing') ----- printOn: aStream aStream nextPut: $[. aStream nextPutAll: self cursorPoint printString; space. aStream nextPutAll: type; space. + aStream nextPutAll: self wheelString. + aStream nextPutAll: self wheelDelta printString; space. - aStream print: self direction; space. aStream nextPutAll: self modifierString. aStream nextPutAll: self buttonString. aStream nextPutAll: timeStamp printString; space. aStream nextPut: $].! Item was added: + ----- Method: MouseWheelEvent>>setType:position:delta:direction:buttons:hand:stamp: (in category 'private') ----- + setType: evtType position: evtPos delta: evtDelta direction: dirFlags buttons: evtButtons hand: evtHand stamp: stamp + type := evtType. + position := evtPos. + buttons := evtButtons. + source := evtHand. + wasHandled := false. + direction := dirFlags. + delta := evtDelta. + timeStamp := stamp.! Item was removed: - ----- Method: MouseWheelEvent>>setType:position:direction:buttons:hand:stamp: (in category 'private') ----- - setType: evtType position: evtPos direction: dirSymbol buttons: evtButtons hand: evtHand stamp: stamp - type := evtType. - position := evtPos. - buttons := evtButtons. - source := evtHand. - wasHandled := false. - direction := dirSymbol. - timeStamp := stamp.! Item was added: + ----- Method: MouseWheelEvent>>setWheelDown (in category 'initialization') ----- + setWheelDown + + direction := direction bitOr: 2r0100.! Item was added: + ----- Method: MouseWheelEvent>>setWheelLeft (in category 'initialization') ----- + setWheelLeft + + direction := direction bitOr: 2r0010.! Item was added: + ----- Method: MouseWheelEvent>>setWheelRight (in category 'initialization') ----- + setWheelRight + + direction := direction bitOr: 2r0001.! Item was added: + ----- Method: MouseWheelEvent>>setWheelUp (in category 'initialization') ----- + setWheelUp + + direction := direction bitOr: 2r1000.! Item was changed: ----- Method: MouseWheelEvent>>storeOn: (in category 'printing') ----- storeOn: aStream + "Note: We generate the same array as provided by the VM. BUT we are a subclass of MouseEvent now even if we cannot store the position right now. This is awkward. But we still store the position and the wheel delta. *sign*" + - super storeOn: aStream. aStream space. + delta x storeOn: aStream. + aStream space. + delta y storeOn: aStream. + aStream space. + direction storeOn: aStream. + ! - self direction storeOn: aStream.! Item was changed: ----- Method: MouseWheelEvent>>type:readFrom: (in category 'initialization') ----- type: eventType readFrom: aStream + | deltaX deltaY | super type: eventType readFrom: aStream. aStream skip: 1. + deltaX := Integer readFrom: aStream. + aStream skip: 1. + deltaY := Integer readFrom: aStream. + aStream skip: 1. + direction := Integer readFrom: aStream. + delta := deltaX @ deltaY. - direction := Symbol readFrom: aStream. ! Item was added: + ----- Method: MouseWheelEvent>>wheelDelta (in category 'accessing') ----- + wheelDelta + + ^ delta! Item was added: + ----- Method: MouseWheelEvent>>wheelString (in category 'printing') ----- + wheelString + "Return a string identifying the wheel state" + + ^ String streamContents: [:stream | + self isWheelUp ifTrue: [stream nextPutAll: 'up ']. + self isWheelDown ifTrue: [stream nextPutAll: 'down ']. + self isWheelLeft ifTrue: [stream nextPutAll: 'left ']. + self isWheelRight ifTrue: [stream nextPutAll: 'right ']]! Item was added: + Object subclass: #MouseWheelState + instanceVariableNames: 'currentDelta' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Events'! Item was added: + ----- Method: MouseWheelState>>handleEvent:from: (in category 'event processing') ----- + handleEvent: aMouseWheelEvent from: aHand + "Every 120 units, raise the wheel flags for convenient mouse wheel programming. We choose not to send multiple mouse-wheel events for multiples of 120 because applications can always react to the actual delta values if they want to do more scrolling or zooming." + + | sign | + currentDelta := currentDelta + aMouseWheelEvent wheelDelta. + + sign := currentDelta sign. + currentDelta := currentDelta abs. + + (currentDelta x // 120) > 0 ifTrue: [ + sign x = 1 + ifTrue: [aMouseWheelEvent setWheelRight] + ifFalse: [aMouseWheelEvent setWheelLeft]]. + + (currentDelta y // 120) > 0 ifTrue: [ + sign y = 1 + ifTrue: [aMouseWheelEvent setWheelUp] + ifFalse: [aMouseWheelEvent setWheelDown]]. + + currentDelta := currentDelta \\ 120. + currentDelta := currentDelta * sign. + + "Finally, send the event." + HandMorph sendMouseWheelToKeyboardFocus + ifFalse: [aHand sendMouseEvent: aMouseWheelEvent] + ifTrue: [aHand sendEvent: aMouseWheelEvent focus: aHand keyboardFocus clear: [aHand keyboardFocus: nil]]. + ! Item was added: + ----- Method: MouseWheelState>>initialize (in category 'initialize-release') ----- + initialize + + super initialize. + currentDelta := 0@0.! From commits at source.squeak.org Wed Jun 15 06:00:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 06:00:15 2016 Subject: [squeak-dev] The Trunk: ST80-mt.213.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.213.mcz ==================== Summary ==================== Name: ST80-mt.213 Author: mt Time: 15 June 2016, 8:00:00.958664 am UUID: 6a865b4f-20e9-1147-b4b7-2dd6d08eca27 Ancestors: ST80-mt.212 Appendix to Kernel-mt.1028. =============== Diff against ST80-mt.212 =============== Item was changed: ----- Method: ParagraphEditor>>backspace: (in category 'typing/selecting keys') ----- backspace: characterStream "Backspace over the last character." | startIndex | sensor leftShiftDown ifTrue: [^ self backWord: characterStream]. startIndex := self markIndex + (self hasCaret ifTrue: [0] ifFalse: [1]). [sensor keyboardPressed and: + [sensor peekKeyboard asciiValue = 8]] whileTrue: [ - [sensor keyboardPeek asciiValue = 8]] whileTrue: [ "process multiple backspaces" sensor keyboard. startIndex := 1 max: startIndex - 1. ]. self backTo: startIndex. ^false! Item was changed: ----- Method: ParagraphEditor>>blinkPrevParen (in category 'parenblinking') ----- blinkPrevParen self deprecated: 'Use #blinkPrevParen:'. + self blinkPrevParen: sensor peekKeyboard! - self blinkPrevParen: sensor keyboardPeek! Item was changed: ----- Method: ParagraphEditor>>readKeyboard (in category 'typing support') ----- readKeyboard "Key struck on the keyboard. Find out which one and, if special, carry out the associated special action. Otherwise, add the character to the stream of characters. Undoer & Redoer: see closeTypeIn." | typeAhead char | typeAhead := WriteStream on: (String new: 128). [sensor keyboardPressed] whileTrue: [self deselect. sensor keyboardPressed ifTrue: + [char := sensor peekKeyboard. - [char := sensor keyboardPeek. (self dispatchOnCharacter: char with: typeAhead) ifTrue: [self doneTyping. self setEmphasisHere. ^self selectAndScroll; updateMarker]. self openTypeIn]. self hasSelection ifTrue: "save highlighted characters" [UndoSelection := self selection]. self zapSelectionWithCompositionWith: typeAhead contents. typeAhead reset. self unselect. sensor keyboardPressed ifFalse: [self selectAndScroll. sensor keyboardPressed ifFalse: [self updateMarker]]]! Item was changed: ----- Method: ScrollController>>scrollByKeyboard (in category 'scrolling') ----- scrollByKeyboard | keyEvent | + keyEvent := sensor peekKeyboard. - keyEvent := sensor keyboardPeek. keyEvent ifNil: [^ false]. (sensor controlKeyPressed or:[sensor commandKeyPressed]) ifFalse: [^ false]. keyEvent asciiValue = 30 ifTrue: [sensor keyboard. self scrollViewDown ifTrue: [self moveMarker]. ^ true]. keyEvent asciiValue = 31 ifTrue: [sensor keyboard. self scrollViewUp ifTrue: [self moveMarker]. ^ true]. ^ false! From commits at source.squeak.org Wed Jun 15 06:28:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 06:29:00 2016 Subject: [squeak-dev] The Trunk: System-mt.833.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.833.mcz ==================== Summary ==================== Name: System-mt.833 Author: mt Time: 15 June 2016, 8:28:35.974896 am UUID: 16d33125-ba8d-6844-b266-b5a4556d16c2 Ancestors: System-mt.832 Make it possible to access the common request strings from other applications. =============== Diff against System-mt.832 =============== Item was added: + ----- Method: Utilities class>>commonRequestStrings (in category 'common requests') ----- + commonRequestStrings + + (CommonRequestStrings == nil or: [CommonRequestStrings isKindOf: Array]) + ifTrue: [self initializeCommonRequestStrings]. + ^ CommonRequestStrings! From commits at source.squeak.org Wed Jun 15 06:29:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 06:29:56 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1179.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1179.mcz ==================== Summary ==================== Name: Morphic-mt.1179 Author: mt Time: 15 June 2016, 8:28:59.901896 am UUID: 798fffba-733f-3444-840e-84baabd04da4 Ancestors: Morphic-mt.1178 Add the world's Do-menu to the world main docking bar. Can be hidden via preferences. =============== Diff against Morphic-mt.1178 =============== Item was added: + ----- Method: TheWorldMainDockingBar class>>showDoMenuInWorldMainDockingBar (in category 'preferences') ----- + showDoMenuInWorldMainDockingBar + + + ^ self getMenuPreference: #showDoMenuInWorldMainDockingBar ifAbsent: [true] + ! Item was added: + ----- Method: TheWorldMainDockingBar class>>showDoMenuInWorldMainDockingBar: (in category 'preferences') ----- + showDoMenuInWorldMainDockingBar: aBoolean + + self + setMenuPreference: #showDoMenuInWorldMainDockingBar + to: aBoolean. + ! Item was added: + ----- Method: TheWorldMainDockingBar>>doMenuOn: (in category 'construction') ----- + doMenuOn: aDockingBar + + aDockingBar addItem: [ :item | + item + contents: 'Do' translated; + subMenuUpdater: self + selector: #listCommonRequestsOn: ]! Item was added: + ----- Method: TheWorldMainDockingBar>>listCommonRequestsOn: (in category 'submenu - do') ----- + listCommonRequestsOn: aMenu + + | strings | + strings := Utilities commonRequestStrings contents. + + strings asString linesDo: [:aString | + aString = '-' + ifTrue: [aMenu addLine] + ifFalse: [aMenu add: (aString ifEmpty: [' ']) target: Utilities selector: #eval: argument: aString]]. + + aMenu addLine. + aMenu add: 'edit this list' translated target: Utilities action: #editCommonRequestStrings.! Item was changed: ----- Method: TheWorldMainDockingBar>>menusOn: (in category 'construction') ----- menusOn: aDockingBar self class showMainMenuInWorldMainDockingBar ifTrue: [ self squeakMenuOn: aDockingBar]. self class showProjectsMenuInWorldMainDockingBar ifTrue: [ self projectsMenuOn: aDockingBar]. self class showToolsMenuInWorldMainDockingBar ifTrue: [ self toolsMenuOn: aDockingBar]. self class showAppsMenuInWorldMainDockingBar ifTrue: [ self appsMenuOn: aDockingBar]. + self class showDoMenuInWorldMainDockingBar ifTrue: [ + self doMenuOn: aDockingBar]. + self class showExtrasMenuInWorldMainDockingBar ifTrue: [ self extrasMenuOn: aDockingBar]. self class showWindowsMenuInWorldMainDockingBar ifTrue: [ self windowsMenuOn: aDockingBar]. self class showHelpMenuInWorldMainDockingBar ifTrue: [ self helpMenuOn: aDockingBar].! Item was changed: (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling that occurs in the same control flow after loading this code." HandMorph allInstancesDo: [:ea | ea initForEvents]. "Deploy mouse-wheel event handling to existing scrollpanes and hands." Project allMorphicProjects do: [:morphicProject | morphicProject world handsDo: [:hand | hand addKeyboardCaptureFilter: hand]]. ScrollPane allSubInstancesDo: [:ea | + ea addKeyboardCaptureFilter: ea]. + + "Add Do-menu." + TheWorldMainDockingBar updateInstances.'! - ea addKeyboardCaptureFilter: ea].'! From lecteur at zogotounga.net Wed Jun 15 07:47:44 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Wed Jun 15 07:47:11 2016 Subject: [squeak-dev] rotated SystemWindows no longer working In-Reply-To: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> References: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> Message-ID: <4c55f017-9c72-3f8c-51cf-ec4268899e16@zogotounga.net> > It works here, in a trunk image at update 16050. > > But I noticed that between update 15953 and 16044, something changed and > now selecting a method or a class in a rotated browser beeps and sends a > TransferMorph to 0@0 instead of performing the required action. > > Stef > Wow I just realized this report of mine is completely useless, as it just repeats what Chris said. I should read twice the posts before responding... sorry for the noise. Stef From commits at source.squeak.org Wed Jun 15 08:18:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 08:18:30 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.349.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.349.mcz ==================== Summary ==================== Name: Graphics-mt.349 Author: mt Time: 15 June 2016, 10:17:51.81283 am UUID: d844e07e-8a5e-584b-9705-c09c8a6b34a4 Ancestors: Graphics-topa.348 Improves dark-map rendering of DejaVu Sans. Now, it does not look so bold anymore but is still way more readable on darker backgrounds than the bitmap version is. =============== Diff against Graphics-topa.348 =============== Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBoldObliqueDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansBookDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark12Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark14Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark17Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark20Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark7Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: ----- Method: StrikeFont class>>dejaVuSansObliqueDark9Form (in category 'dejaVu font data') ----- (excessive size, no diff calculated) Item was changed: (PackageInfo named: 'Graphics') postscript: ' " Reset DejaVu to current version " + StrikeFont initialize.'! - [StrikeFont initialize] value.'! From commits at source.squeak.org Wed Jun 15 08:38:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 08:38:19 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1180.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1180.mcz ==================== Summary ==================== Name: Morphic-mt.1180 Author: mt Time: 15 June 2016, 10:37:35.384378 am UUID: 82bb6072-42a5-7d45-afb0-f324d6604079 Ancestors: Morphic-mt.1179 Fixes a regression with event filterung and bubbling in general, which affects events sent to morphs that are submorphs of the hand. Escaping drag-and-drop, for example, where events are sent to the TransferMorph. =============== Diff against Morphic-mt.1179 =============== Item was changed: ----- Method: Morph>>handleFocusEvent: (in category 'events-processing') ----- handleFocusEvent: anEvent "Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand. 1) Event bubbling. Do event bubbling known from MorphicEventDispatcher by calling #handleEvent: also on all owners. 2) Event capture filters. Walk along the owner chain in reverse order and apply capture filters as known from MorphicEventDispatcher. If you want to overwrite this in a subclass (for example to implement modal dialogs) ensure to call super instead if #handleEvent: directly." | filteredEvent | filteredEvent := anEvent. "TODO: Add a check to ensure that our event dispatcher is actually of kind MorphicEventDispatcher?!! We do copy its behavior though... like self defaultEventDispatcher class == MorphicEventDispatcher? Or #isKindOf:? Anyway, the outermost morph determines the event dispatcher. See HandMorph >> #sendEvent:focus:clear: and PasteUpMorph >> #processEvent:." "Event capturing. Filters only because the capturing phase was bypassed by using the keyboard/mouse focus." self withAllOwners reverseDo: [:morph | "reverse order to comply with default MorphEventDispatcher" + morph == anEvent hand ifFalse: [ "Fixes drag-and-drop bug." + filteredEvent := morph sendFilterEventCapture: filteredEvent for: morph. + filteredEvent wasIgnored ifTrue: [^ filteredEvent]]]. - filteredEvent := morph sendFilterEventCapture: filteredEvent for: morph. - filteredEvent wasIgnored ifTrue: [^ filteredEvent]]. "Event bubbling. Filters are processed in #handleEvent:." self withAllOwnersDo: [:morph | + morph == anEvent hand ifFalse: [ "Fixes drag-and-drop bug." + filteredEvent := morph handleEvent: filteredEvent. + filteredEvent wasIgnored ifTrue: [^ filteredEvent]]]. - filteredEvent := morph handleEvent: filteredEvent. - filteredEvent wasIgnored ifTrue: [^ filteredEvent]]. ^ filteredEvent! From commits at source.squeak.org Wed Jun 15 09:21:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 09:21:20 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1181.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1181.mcz ==================== Summary ==================== Name: Morphic-mt.1181 Author: mt Time: 15 June 2016, 11:20:40.050378 am UUID: 855f8338-73de-5947-9dc5-99e912d115a2 Ancestors: Morphic-mt.1180 ixes regression in event dispatching and coordinate transformations. Do not reset transformation in the event copy delivered to submorphs. They need those for, e.g., double click, drag-and-drop, etc. Our events do, more or less, not change after being created and initialized. The only exception is #wasHandled, #wasIgnored, and #position during event dispatching. Keep it that way. If you plan to change some event state in an event filter, create a new event instead and do not mess around with the current one. =============== Diff against Morphic-mt.1180 =============== Item was changed: ----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'private') ----- dispatchEvent: anEvent toSubmorphsOf: aMorph + "Dispatch the given event to the submorphs of the given morph. For coordinate transformations, work only with copies. Either return the given event or a copy of any filtered event to employ immutability to some extent. --- PRIVATE!!" - "Dispatch the given event to the submorphs of the given morph. --- PRIVATE!!" + | localEvent filteredEvent | - | filteredEvent | aMorph submorphsDo: [:child | + localEvent := anEvent transformedBy: (child transformedFrom: aMorph). filteredEvent := child + processEvent: localEvent - processEvent: (anEvent transformedBy: (child transformedFrom: aMorph)) using: self. "use same dispatcher" + filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol" + self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" + filteredEvent == localEvent + ifTrue: [ + localEvent wasHandled ifTrue: [anEvent copyHandlerState: localEvent]. + anEvent wasIgnored: localEvent wasIgnored. + ^ anEvent] + ifFalse: [ + filteredEvent := filteredEvent copy. + filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" + filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" + ^ filteredEvent]]]. - filteredEvent == #rejected ifFalse: [ "filteredEvent or #rejected" - filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" - filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" - self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" - ^ filteredEvent]]. ^ #rejected! From asqueaker at gmail.com Wed Jun 15 15:28:49 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 15 15:29:32 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1179.mcz In-Reply-To: <5760f5e7.d8a1370a.6e821.454dSMTPIN_ADDED_MISSING@mx.google.com> References: <5760f5e7.d8a1370a.6e821.454dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I was wondering whether Preferences are the best way to control these or whether the user could simply remove the ones they don't want by blue-clicking and then clicking the close halo (X)... I know when the DockingBar is regenerated they would have to re-remove them, but still... we do have a live, direct-manuipulation system, sometimes we should be able to fall back on it..? On Wed, Jun 15, 2016 at 1:29 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1179.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1179 > Author: mt > Time: 15 June 2016, 8:28:59.901896 am > UUID: 798fffba-733f-3444-840e-84baabd04da4 > Ancestors: Morphic-mt.1178 > > Add the world's Do-menu to the world main docking bar. Can be hidden via preferences. > > =============== Diff against Morphic-mt.1178 =============== > > Item was added: > + ----- Method: TheWorldMainDockingBar class>>showDoMenuInWorldMainDockingBar (in category 'preferences') ----- > + showDoMenuInWorldMainDockingBar > + > + + category: 'docking bars' > + description: 'Whether world''s main docking bar should show the ''Do'' menu.' > + type: #Boolean> > + ^ self getMenuPreference: #showDoMenuInWorldMainDockingBar ifAbsent: [true] > + ! > > Item was added: > + ----- Method: TheWorldMainDockingBar class>>showDoMenuInWorldMainDockingBar: (in category 'preferences') ----- > + showDoMenuInWorldMainDockingBar: aBoolean > + > + self > + setMenuPreference: #showDoMenuInWorldMainDockingBar > + to: aBoolean. > + ! > > Item was added: > + ----- Method: TheWorldMainDockingBar>>doMenuOn: (in category 'construction') ----- > + doMenuOn: aDockingBar > + > + aDockingBar addItem: [ :item | > + item > + contents: 'Do' translated; > + subMenuUpdater: self > + selector: #listCommonRequestsOn: ]! > > Item was added: > + ----- Method: TheWorldMainDockingBar>>listCommonRequestsOn: (in category 'submenu - do') ----- > + listCommonRequestsOn: aMenu > + > + | strings | > + strings := Utilities commonRequestStrings contents. > + > + strings asString linesDo: [:aString | > + aString = '-' > + ifTrue: [aMenu addLine] > + ifFalse: [aMenu add: (aString ifEmpty: [' ']) target: Utilities selector: #eval: argument: aString]]. > + > + aMenu addLine. > + aMenu add: 'edit this list' translated target: Utilities action: #editCommonRequestStrings.! > > Item was changed: > ----- Method: TheWorldMainDockingBar>>menusOn: (in category 'construction') ----- > menusOn: aDockingBar > > self class showMainMenuInWorldMainDockingBar ifTrue: [ > self squeakMenuOn: aDockingBar]. > > self class showProjectsMenuInWorldMainDockingBar ifTrue: [ > self projectsMenuOn: aDockingBar]. > > self class showToolsMenuInWorldMainDockingBar ifTrue: [ > self toolsMenuOn: aDockingBar]. > > self class showAppsMenuInWorldMainDockingBar ifTrue: [ > self appsMenuOn: aDockingBar]. > > + self class showDoMenuInWorldMainDockingBar ifTrue: [ > + self doMenuOn: aDockingBar]. > + > self class showExtrasMenuInWorldMainDockingBar ifTrue: [ > self extrasMenuOn: aDockingBar]. > > self class showWindowsMenuInWorldMainDockingBar ifTrue: [ > self windowsMenuOn: aDockingBar]. > > self class showHelpMenuInWorldMainDockingBar ifTrue: [ > self helpMenuOn: aDockingBar].! > > Item was changed: > (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling that occurs in the same control flow after loading this code." > HandMorph allInstancesDo: [:ea | ea initForEvents]. > > "Deploy mouse-wheel event handling to existing scrollpanes and hands." > Project allMorphicProjects do: [:morphicProject | > morphicProject world handsDo: [:hand | > hand addKeyboardCaptureFilter: hand]]. > ScrollPane allSubInstancesDo: [:ea | > + ea addKeyboardCaptureFilter: ea]. > + > + "Add Do-menu." > + TheWorldMainDockingBar updateInstances.'! > - ea addKeyboardCaptureFilter: ea].'! > > From asqueaker at gmail.com Wed Jun 15 15:34:31 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 15 15:35:13 2016 Subject: [squeak-dev] rotated SystemWindows no longer working In-Reply-To: <4c55f017-9c72-3f8c-51cf-ec4268899e16@zogotounga.net> References: <2cb39da3-d3c8-0dd3-cab7-158fd5a96789@zogotounga.net> <4c55f017-9c72-3f8c-51cf-ec4268899e16@zogotounga.net> Message-ID: Heh, well, you did narrow the cause down to a small range of updates. I didn't see it as redundant. No worries. On Wed, Jun 15, 2016 at 2:47 AM, St?phane Rollandin wrote: >> It works here, in a trunk image at update 16050. >> >> But I noticed that between update 15953 and 16044, something changed and >> now selecting a method or a class in a rotated browser beeps and sends a >> TransferMorph to 0@0 instead of performing the required action. >> >> Stef >> > > Wow I just realized this report of mine is completely useless, as it just > repeats what Chris said. I should read twice the posts before responding... > sorry for the noise. > > Stef > > From cunningham.cb at gmail.com Wed Jun 15 15:36:07 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed Jun 15 15:36:09 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1179.mcz In-Reply-To: References: <5760f5e7.d8a1370a.6e821.454dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hmm. Direct manipulation. What if we had a spot in the halo menu to 'remove from DockingBar forever' which then set the preference? One time direct manipulation without having to redo it later. Of course, it would be added back in later via the preferences. -cbc On Wed, Jun 15, 2016 at 8:28 AM, Chris Muller wrote: > I was wondering whether Preferences are the best way to control these > or whether the user could simply remove the ones they don't want by > blue-clicking and then clicking the close halo (X)... > > I know when the DockingBar is regenerated they would have to re-remove > them, but still... we do have a live, direct-manuipulation system, > sometimes we should be able to fall back on it..? > > On Wed, Jun 15, 2016 at 1:29 AM, wrote: > > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > > http://source.squeak.org/trunk/Morphic-mt.1179.mcz > > > > ==================== Summary ==================== > > > > Name: Morphic-mt.1179 > > Author: mt > > Time: 15 June 2016, 8:28:59.901896 am > > UUID: 798fffba-733f-3444-840e-84baabd04da4 > > Ancestors: Morphic-mt.1178 > > > > Add the world's Do-menu to the world main docking bar. Can be hidden via > preferences. > > > > =============== Diff against Morphic-mt.1178 =============== > > > > Item was added: > > + ----- Method: TheWorldMainDockingBar > class>>showDoMenuInWorldMainDockingBar (in category 'preferences') ----- > > + showDoMenuInWorldMainDockingBar > > + > > + > + category: 'docking bars' > > + description: 'Whether world''s main docking bar should > show the ''Do'' menu.' > > + type: #Boolean> > > + ^ self getMenuPreference: #showDoMenuInWorldMainDockingBar > ifAbsent: [true] > > + ! > > > > Item was added: > > + ----- Method: TheWorldMainDockingBar > class>>showDoMenuInWorldMainDockingBar: (in category 'preferences') ----- > > + showDoMenuInWorldMainDockingBar: aBoolean > > + > > + self > > + setMenuPreference: #showDoMenuInWorldMainDockingBar > > + to: aBoolean. > > + ! > > > > Item was added: > > + ----- Method: TheWorldMainDockingBar>>doMenuOn: (in category > 'construction') ----- > > + doMenuOn: aDockingBar > > + > > + aDockingBar addItem: [ :item | > > + item > > + contents: 'Do' translated; > > + subMenuUpdater: self > > + selector: #listCommonRequestsOn: ]! > > > > Item was added: > > + ----- Method: TheWorldMainDockingBar>>listCommonRequestsOn: (in > category 'submenu - do') ----- > > + listCommonRequestsOn: aMenu > > + > > + | strings | > > + strings := Utilities commonRequestStrings contents. > > + > > + strings asString linesDo: [:aString | > > + aString = '-' > > + ifTrue: [aMenu addLine] > > + ifFalse: [aMenu add: (aString ifEmpty: [' ']) > target: Utilities selector: #eval: argument: aString]]. > > + > > + aMenu addLine. > > + aMenu add: 'edit this list' translated target: Utilities action: > #editCommonRequestStrings.! > > > > Item was changed: > > ----- Method: TheWorldMainDockingBar>>menusOn: (in category > 'construction') ----- > > menusOn: aDockingBar > > > > self class showMainMenuInWorldMainDockingBar ifTrue: [ > > self squeakMenuOn: aDockingBar]. > > > > self class showProjectsMenuInWorldMainDockingBar ifTrue: [ > > self projectsMenuOn: aDockingBar]. > > > > self class showToolsMenuInWorldMainDockingBar ifTrue: [ > > self toolsMenuOn: aDockingBar]. > > > > self class showAppsMenuInWorldMainDockingBar ifTrue: [ > > self appsMenuOn: aDockingBar]. > > > > + self class showDoMenuInWorldMainDockingBar ifTrue: [ > > + self doMenuOn: aDockingBar]. > > + > > self class showExtrasMenuInWorldMainDockingBar ifTrue: [ > > self extrasMenuOn: aDockingBar]. > > > > self class showWindowsMenuInWorldMainDockingBar ifTrue: [ > > self windowsMenuOn: aDockingBar]. > > > > self class showHelpMenuInWorldMainDockingBar ifTrue: [ > > self helpMenuOn: aDockingBar].! > > > > Item was changed: > > (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling > that occurs in the same control flow after loading this code." > > HandMorph allInstancesDo: [:ea | ea initForEvents]. > > > > "Deploy mouse-wheel event handling to existing scrollpanes and hands." > > Project allMorphicProjects do: [:morphicProject | > > morphicProject world handsDo: [:hand | > > hand addKeyboardCaptureFilter: hand]]. > > ScrollPane allSubInstancesDo: [:ea | > > + ea addKeyboardCaptureFilter: ea]. > > + > > + "Add Do-menu." > > + TheWorldMainDockingBar updateInstances.'! > > - ea addKeyboardCaptureFilter: ea].'! > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160615/06deffb0/attachment.htm From asqueaker at gmail.com Wed Jun 15 15:36:59 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 15 15:37:40 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1181.mcz In-Reply-To: <57611e12.0d9a370a.fbced.38a9SMTPIN_ADDED_MISSING@mx.google.com> References: <57611e12.0d9a370a.fbced.38a9SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Great! And if it is necessary to create a new Event to extend attributes of an original Event, it could wrap it. I always felt Event data should be basically immutable.. On Wed, Jun 15, 2016 at 4:20 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1181.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1181 > Author: mt > Time: 15 June 2016, 11:20:40.050378 am > UUID: 855f8338-73de-5947-9dc5-99e912d115a2 > Ancestors: Morphic-mt.1180 > > ixes regression in event dispatching and coordinate transformations. Do not reset transformation in the event copy delivered to submorphs. They need those for, e.g., double click, drag-and-drop, etc. > > Our events do, more or less, not change after being created and initialized. The only exception is #wasHandled, #wasIgnored, and #position during event dispatching. Keep it that way. If you plan to change some event state in an event filter, create a new event instead and do not mess around with the current one. > > =============== Diff against Morphic-mt.1180 =============== > > Item was changed: > ----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'private') ----- > dispatchEvent: anEvent toSubmorphsOf: aMorph > + "Dispatch the given event to the submorphs of the given morph. For coordinate transformations, work only with copies. Either return the given event or a copy of any filtered event to employ immutability to some extent. --- PRIVATE!!" > - "Dispatch the given event to the submorphs of the given morph. --- PRIVATE!!" > > + | localEvent filteredEvent | > - | filteredEvent | > aMorph submorphsDo: [:child | > + localEvent := anEvent transformedBy: (child transformedFrom: aMorph). > filteredEvent := child > + processEvent: localEvent > - processEvent: (anEvent transformedBy: (child transformedFrom: aMorph)) > using: self. "use same dispatcher" > + filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol" > + self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" > + filteredEvent == localEvent > + ifTrue: [ > + localEvent wasHandled ifTrue: [anEvent copyHandlerState: localEvent]. > + anEvent wasIgnored: localEvent wasIgnored. > + ^ anEvent] > + ifFalse: [ > + filteredEvent := filteredEvent copy. > + filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" > + filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" > + ^ filteredEvent]]]. > - filteredEvent == #rejected ifFalse: [ "filteredEvent or #rejected" > - filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" > - filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" > - self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" > - ^ filteredEvent]]. > > ^ #rejected! > > From commits at source.squeak.org Wed Jun 15 17:01:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 17:01:59 2016 Subject: [squeak-dev] The Trunk: Graphics-lpc.350.mcz Message-ID: Laura Perez Cerrato uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-lpc.350.mcz ==================== Summary ==================== Name: Graphics-lpc.350 Author: lpc Time: 15 June 2016, 2:00:37.274582 pm UUID: 5d02a1bd-65f6-469c-b8b5-456e1dfef5eb Ancestors: Graphics-mt.349 Support for both the current version and the new version of JPEGReadWriter2Plugin =============== Diff against Graphics-mt.349 =============== Item was changed: Form subclass: #ColorForm instanceVariableNames: 'colors cachedDepth cachedColormap' classVariableNames: '' poolDictionaries: '' category: 'Graphics-Display Objects'! + ColorForm class + instanceVariableNames: 'grayScalePalette'! !ColorForm commentStamp: '' prior: 0! ColorForm is a normal Form plus a color map of up to 2^depth Colors. Typically, one reserves one entry in the color map for transparent. This allows 1, 3, 15, or 255 non-transparent colors in ColorForms of depths 1, 2, 4, and 8 bits per pixel. ColorForms don't support depths greater than 8 bits because that would require excessively large color maps with little real benefit, since 16-bit and 32-bit depths already support thousands and millions of colors. ColorForms have several uses: 1) Precise colors. You can have up to 256 true colors, instead being limited to the 8-bit color palette. 2) Easy transparency. Just store (Color transparent) at the desired position in the color map. 3) Cheap color remapping by changing the color map. A color map is an Array of up to 2^depth Color objects. A Bitmap colorMap is automatically computed and cached for rapid display. Note that if you change the color map, you must resubmit it via the colors: method to flush this cache. ColorForms can be a bit tricky. Note that: a) When you BitBlt from one ColorForm to another, you must remember to copy the color map of the source ColorForm to the destination ColorForm. b) A ColorForm's color map is an array of depth-independent Color objects. BitBlt requires a BitMap of actual pixel values, adjusted to the destination depth. These are different things!! ColorForms automatically maintain a cache of the BitBlt-style color map corresponding to the colors array for the last depth on which the ColorForm was displayed, so there should be little need for clients to work with BitBlt-style color maps. c) The default map for 8 bit depth has black in the first entry, not transparent. Say (cform colors at: 1 put: Color transparent). ! + ColorForm class + instanceVariableNames: 'grayScalePalette'! Item was added: + ----- Method: ColorForm class>>grayScalePalette (in category 'constants') ----- + grayScalePalette + grayScalePalette ifNil: [ + grayScalePalette := (0 to: 255) collect: [:brightness | Color gray: brightness asFloat / 255.0]. + grayScalePalette at: 1 put: Color transparent]. + ^ grayScalePalette! Item was added: + ----- Method: ColorForm>>isGrayScale (in category 'testing') ----- + isGrayScale + ^ self colors = ColorForm grayScalePalette.! Item was changed: ----- Method: Form>>asGrayScale (in category 'converting') ----- asGrayScale "Assume the receiver is a grayscale image. Return a grayscale ColorForm computed by extracting the brightness levels of one color component. This technique allows a 32-bit Form to be converted to an 8-bit ColorForm to save space while retaining a full 255 levels of gray. (The usual colormapping technique quantizes to 8, 16, or 32 levels, which loses information.)" + | f32 srcForm result map bb | - | f32 srcForm result map bb grays | self depth = 32 ifFalse: [ f32 := Form extent: width@height depth: 32. self displayOn: f32. ^ f32 asGrayScale]. self unhibernate. srcForm := Form extent: (width * 4)@height depth: 8. srcForm bits: bits. result := ColorForm extent: width@height depth: 8. map := Bitmap new: 256. 2 to: 256 do: [:i | map at: i put: i - 1]. map at: 1 put: 1. "map zero pixel values to near-black" bb := (BitBlt toForm: result) sourceForm: srcForm; combinationRule: Form over; colorMap: map. 0 to: width - 1 do: [:dstX | bb sourceRect: (((dstX * 4) + 2)@0 extent: 1@height); destOrigin: dstX@0; copyBits]. "final BitBlt to zero-out pixels that were truely transparent in the original" map := Bitmap new: 512. map at: 1 put: 16rFF. (BitBlt toForm: result) sourceForm: self; sourceRect: self boundingBox; destOrigin: 0@0; combinationRule: Form erase; colorMap: map; copyBits. + + result colors: ColorForm grayScalePalette. - grays := (0 to: 255) collect: [:brightness | Color gray: brightness asFloat / 255.0]. - grays at: 1 put: Color transparent. - result colors: grays. ^ result ! Item was added: + ----- Method: Form>>isGrayScale (in category 'testing') ----- + isGrayScale + ^ false! Item was changed: ----- Method: JPEGReadWriter2>>compress:quality: (in category 'public access') ----- compress: aForm quality: quality + "Encode the given Form and answer the compressed ByteArray. Quality goes from 0 (low) to 100 (high), where -1 means default. + We can only compress: + * 32-bit deep Forms + * -32-bit deep Forms + * 16-bit deep Forms + * -16-bit deep Forms + * GrayScale ColorForms (see #isGrayScale)" - "Encode the given Form and answer the compressed ByteArray. Quality goes from 0 (low) to 100 (high), where -1 means default." - | sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount | + aForm unhibernate. + + sourceForm := self supports8BitGrayscaleJPEGs + ifTrue: [ + (aForm depth = 32) | (aForm depth = 16) | (aForm isGrayScale) + ifTrue: [aForm] + ifFalse: [aForm asFormOfDepth: 32 ]] + ifFalse: [ + (aForm nativeDepth > 0) & ((aForm depth = 32) | ((aForm depth = 16) & (aForm width even))) + ifTrue: [aForm] + ifFalse: [aForm asFormOfDepth: 32 ]]. + - "odd width images of depth 16 give problems; avoid them." - sourceForm := (aForm depth = 32) | (aForm width even & (aForm depth = 16)) - ifTrue: [aForm] - ifFalse: [aForm asFormOfDepth: 32]. jpegCompressStruct := ByteArray new: self primJPEGCompressStructSize. jpegErrorMgr2Struct := ByteArray new: self primJPEGErrorMgr2StructSize. buffer := ByteArray new: sourceForm width * sourceForm height + 1024. byteCount := self primJPEGWriteImage: jpegCompressStruct onByteArray: buffer form: sourceForm quality: quality progressiveJPEG: false errorMgr: jpegErrorMgr2Struct. byteCount = 0 ifTrue: [self error: 'buffer too small for compressed data']. ^ buffer copyFrom: 1 to: byteCount ! Item was changed: ----- Method: JPEGReadWriter2>>nextImageSuggestedDepth: (in category 'public access') ----- + nextImageSuggestedDepth: suggestedDepth + "Decode and answer a Form of the given depth from my stream. Close the stream if it is a file stream. + We can read RGB JPEGs into: + * 32-bit Forms + * -32-bit Forms + * 16-bit Forms (with or without dithering!!) + * -16-bit Forms (with or without dithering!!) + We can read grayscale JPEGs into: + * 32-bit Forms + * -32-bit Forms + * 16-bit Forms (with or without dithering!!) + * -16-bit Forms (with or without dithering!!) + * 8-bit grayScale ColorForms (see #isGrayScale) + * -8-bit grayScale ColorForms (see #isGrayScale)" - nextImageSuggestedDepth: depth - "Decode and answer a Form of the given depth from my stream. Close the stream if it is a file stream. Possible depths are 16-bit and 32-bit." + | bytes width height components form jpegDecompressStruct jpegErrorMgr2Struct | - | bytes width height form jpegDecompressStruct jpegErrorMgr2Struct depthToUse | bytes := stream upToEnd. stream close. jpegDecompressStruct := ByteArray new: self primJPEGDecompressStructSize. jpegErrorMgr2Struct := ByteArray new: self primJPEGErrorMgr2StructSize. self primJPEGReadHeader: jpegDecompressStruct fromByteArray: bytes errorMgr: jpegErrorMgr2Struct. width := self primImageWidth: jpegDecompressStruct. height := self primImageHeight: jpegDecompressStruct. + components := self primImageNumComponents: jpegDecompressStruct. + form := + self supports8BitGrayscaleJPEGs + ifTrue: [ + components = 3 + ifTrue: [ Form extent: width@height depth: suggestedDepth ] + ifFalse: [ (Form extent: width@height depth: suggestedDepth) asGrayScale ]] + ifFalse: [ + Form + extent: width@height + depth: + (suggestedDepth = 32 + ifTrue: [ 32 ] + ifFalse: [ + ((suggestedDepth = 16) & (width even)) + ifTrue: [ 16 ] + ifFalse: [ 32 ]])]. + - "Odd width images of depth 16 gave problems. Avoid them (or check carefully!!)" - depthToUse := ((depth = 32) | width odd) ifTrue: [32] ifFalse: [16]. - form := Form extent: width@height depth: depthToUse. - (width = 0 or: [height = 0]) ifTrue: [^ form]. self primJPEGReadImage: jpegDecompressStruct fromByteArray: bytes onForm: form doDithering: true errorMgr: jpegErrorMgr2Struct. + ^ form! - ^ form - ! Item was changed: ----- Method: JPEGReadWriter2>>nextPutImage:quality:progressiveJPEG: (in category 'public access') ----- nextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag + "Encode the given Form on my stream with the given settings. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG. + We can compress: + * 32-bit deep Forms + * -32-bit deep Forms + * 16-bit deep + * -16-bit deep + * GrayScale ColorForms (see #isGrayScale)" - "Encode the given Form on my stream with the given settings. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG." | sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer byteCount | + aForm unhibernate. + + sourceForm := self supports8BitGrayscaleJPEGs + ifTrue: [ + (aForm depth = 32) | (aForm depth = 16) | (aForm isGrayScale) + ifTrue: [aForm] + ifFalse: [aForm asFormOfDepth: 32 ]] + ifFalse: [ + (aForm nativeDepth > 0) & ((aForm depth = 32) | ((aForm depth = 16) & (aForm width even))) + ifTrue: [aForm] + ifFalse: [aForm asFormOfDepth: 32 ]]. + - "odd width images of depth 16 give problems; avoid them." - sourceForm := (aForm depth = 32) | (aForm width even & (aForm depth = 16)) - ifTrue: [aForm] - ifFalse: [aForm asFormOfDepth: 32]. jpegCompressStruct := ByteArray new: self primJPEGCompressStructSize. jpegErrorMgr2Struct := ByteArray new: self primJPEGErrorMgr2StructSize. buffer := ByteArray new: sourceForm width * sourceForm height + 1024. "Try to write the image. Retry with a larger buffer if needed." [ byteCount := self primJPEGWriteImage: jpegCompressStruct onByteArray: buffer form: sourceForm quality: quality progressiveJPEG: progressiveFlag errorMgr: jpegErrorMgr2Struct. byteCount = 0 and: [ buffer size < (sourceForm width * sourceForm height * 3 + 1024) ] ] whileTrue: [ buffer := ByteArray new: buffer size * 2 ]. byteCount = 0 ifTrue: [ self error: 'buffer too small for compressed data' ]. stream next: byteCount putAll: buffer startingAt: 1. self close. ! Item was added: + ----- Method: JPEGReadWriter2>>primImageNumComponents: (in category 'primitives') ----- + primImageNumComponents: aJPEGDecompressStruct + + + ^ 3! Item was added: + ----- Method: JPEGReadWriter2>>primSupports8BitGrayscaleJPEGs (in category 'primitives') ----- + primSupports8BitGrayscaleJPEGs + + ^ false! Item was added: + ----- Method: JPEGReadWriter2>>supports8BitGrayscaleJPEGs (in category 'testing') ----- + supports8BitGrayscaleJPEGs + ^ self primSupports8BitGrayscaleJPEGs! Item was changed: ----- Method: JPEGReadWriter2>>uncompress:into: (in category 'public access') ----- uncompress: aByteArray into: aForm + ^ self uncompress: aByteArray into: aForm doDithering: true - "Uncompress an image from the given ByteArray into the given Form. - Fails if the given Form has the wrong dimensions or depth. - If aForm has depth 16, do ordered dithering." - - | jpegDecompressStruct jpegErrorMgr2Struct w h | - aForm unhibernate. - jpegDecompressStruct := ByteArray new: self primJPEGDecompressStructSize. - jpegErrorMgr2Struct := ByteArray new: self primJPEGErrorMgr2StructSize. - self - primJPEGReadHeader: jpegDecompressStruct - fromByteArray: aByteArray - errorMgr: jpegErrorMgr2Struct. - w := self primImageWidth: jpegDecompressStruct. - h := self primImageHeight: jpegDecompressStruct. - ((aForm width = w) & (aForm height = h)) ifFalse: [ - ^ self error: 'form dimensions do not match']. - - "odd width images of depth 16 give problems; avoid them" - w odd - ifTrue: [ - aForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']] - ifFalse: [ - ((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']]. - - self primJPEGReadImage: jpegDecompressStruct - fromByteArray: aByteArray - onForm: aForm - doDithering: true - errorMgr: jpegErrorMgr2Struct. ! Item was changed: ----- Method: JPEGReadWriter2>>uncompress:into:doDithering: (in category 'public access') ----- uncompress: aByteArray into: aForm doDithering: ditherFlag "Uncompress an image from the given ByteArray into the given Form. Fails if the given Form has the wrong dimensions or depth. + We can read RGB JPEGs into: + * 32-bit Forms + * -32-bit Forms + * 16-bit Forms (with or without dithering!!) + * -16-bit Forms (with or without dithering!!) + We can read grayscale JPEGs into: + * 32-bit Forms + * -32-bit Forms + * 16-bit Forms (with or without dithering!!) + * -16-bit Forms (with or without dithering!!) + * 8-bit grayScale ColorForms (see #isGrayScale) + * -8-bit grayScale ColorForms (see #isGrayScale)" - If aForm has depth 16 and ditherFlag = true, do ordered dithering." + | jpegDecompressStruct jpegErrorMgr2Struct width height components | + - | jpegDecompressStruct jpegErrorMgr2Struct w h | aForm unhibernate. + jpegDecompressStruct := ByteArray new: self primJPEGDecompressStructSize. jpegErrorMgr2Struct := ByteArray new: self primJPEGErrorMgr2StructSize. self primJPEGReadHeader: jpegDecompressStruct fromByteArray: aByteArray errorMgr: jpegErrorMgr2Struct. + width := self primImageWidth: jpegDecompressStruct. + height := self primImageHeight: jpegDecompressStruct. + components := self primImageNumComponents: jpegDecompressStruct. + + ((aForm width = width) & (aForm height = height)) ifFalse: [ + ^ self error: 'form dimensions do not match' ]. + self supports8BitGrayscaleJPEGs - w := self primImageWidth: jpegDecompressStruct. - h := self primImageHeight: jpegDecompressStruct. - ((aForm width = w) & (aForm height = h)) ifFalse: [ - ^ self error: 'form dimensions do not match']. - - "odd width images of depth 16 give problems; avoid them" - w odd ifTrue: [ + components = 3 + ifTrue: [ + aForm depth = 8 + ifTrue: [ ^ self error: 'Cannot uncompress multi-channel JPEGs into 8-bit deep forms' ]]. + components = 1 + ifTrue: [ + aForm depth = 8 + ifTrue: [ + aForm isGrayScale + ifFalse: [ ^ self error: 'Cannot uncompress single-channel JPEGs into 8-bit deep forms that are not grayscale' ]]]] + - aForm depth = 32 ifFalse: [^ self error: 'must use depth 32 with odd width']] ifFalse: [ + aForm nativeDepth < 0 + ifTrue: [ ^ self error: 'Current plugin version doesn''t support uncompressing JPEGs into little-endian forms' ] + ifFalse: [ + aForm depth = 16 + ifTrue: [ + width odd + ifTrue: [ ^ self error: 'Current plugin version doesn''t support uncompressing JPEGs with an odd width into 16-bit deep forms' ]]. + aForm depth = 8 + ifTrue: [ ^ self error: 'Current plugin version doesn''t support uncompressing JPEGs into 8-bit deep forms' ]]]. - ((aForm depth = 16) | (aForm depth = 32)) ifFalse: [^ self error: 'must use depth 16 or 32']]. self primJPEGReadImage: jpegDecompressStruct fromByteArray: aByteArray onForm: aForm doDithering: ditherFlag errorMgr: jpegErrorMgr2Struct. ! From eliot.miranda at gmail.com Wed Jun 15 17:26:09 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jun 15 17:26:13 2016 Subject: [squeak-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC Message-ID: Hi all, we are all finished importing the VM repository to Github, migrating the scripts, and setting up automatic builds and hosting of binaries. We want to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and Fabio will merge any remaining commits on the SVN repository between now and that time and any further development will take place on Github. If possible, you may refrain from committing to SVN, as this will mean less work for Tim and Fabio. The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch is the new default branch and is still called Cog, this is the main focus of development. The old trunk branch has been renamed to "oldTrunk". The master branch will track the Cog branch and will be the repository integrated into for releases. To get started, please refer to the updated README that is shown on the Github page. _,,,^..^,,,_ best, Eliot, Tim & Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160615/38fe897d/attachment.htm From estebanlm at gmail.com Wed Jun 15 17:27:47 2016 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Wed Jun 15 17:27:52 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: <935F476F-0215-41A8-89D2-EEA2A1A23081@gmail.com> whoohoo! thank you very much :) Esteban > On 15 Jun 2016, at 19:26, Eliot Miranda wrote: > > Hi all, > > we are all finished importing the VM repository to Github, migrating the scripts, and setting up automatic builds and hosting of binaries. We want to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and Fabio will merge any remaining commits on the SVN repository between now and that time and any further development will take place on Github. If possible, you may refrain from committing to SVN, as this will mean less work for Tim and Fabio. > > The new repository is at https://github.com/OpenSmalltalk/vm . The Cog branch is the new default branch and is still called Cog, this is the main focus of development. The old trunk branch has been renamed to "oldTrunk". The master branch will track the Cog branch and will be the repository integrated into for releases. > > To get started, please refer to the updated README that is shown on the Github page. > > _,,,^..^,,,_ > best, Eliot, Tim & Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160615/dcb67187/attachment.htm From eliot.miranda at gmail.com Wed Jun 15 17:51:19 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jun 15 17:51:27 2016 Subject: [squeak-dev] The Trunk: Graphics-lpc.350.mcz In-Reply-To: <57618a0b.072e8d0a.e9d00.ffffdb6fSMTPIN_ADDED_MISSING@mx.google.com> References: <57618a0b.072e8d0a.e9d00.ffffdb6fSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Laura, great to see this. Thank you for your energy!! and welcome. On Wed, Jun 15, 2016 at 10:01 AM, wrote: > Laura Perez Cerrato uploaded a new version of Graphics to project The > Trunk: > http://source.squeak.org/trunk/Graphics-lpc.350.mcz > > ==================== Summary ==================== > > Name: Graphics-lpc.350 > Author: lpc > Time: 15 June 2016, 2:00:37.274582 pm > UUID: 5d02a1bd-65f6-469c-b8b5-456e1dfef5eb > Ancestors: Graphics-mt.349 > > Support for both the current version and the new version of > JPEGReadWriter2Plugin > > =============== Diff against Graphics-mt.349 =============== > > Item was changed: > Form subclass: #ColorForm > instanceVariableNames: 'colors cachedDepth cachedColormap' > classVariableNames: '' > poolDictionaries: '' > category: 'Graphics-Display Objects'! > + ColorForm class > + instanceVariableNames: 'grayScalePalette'! > > !ColorForm commentStamp: '' prior: 0! > ColorForm is a normal Form plus a color map of up to 2^depth Colors. > Typically, one reserves one entry in the color map for transparent. This > allows 1, 3, 15, or 255 non-transparent colors in ColorForms of depths 1, > 2, 4, and 8 bits per pixel. ColorForms don't support depths greater than 8 > bits because that would require excessively large color maps with little > real benefit, since 16-bit and 32-bit depths already support thousands and > millions of colors. > > ColorForms have several uses: > 1) Precise colors. You can have up to 256 true colors, instead being > limited to the 8-bit color palette. > 2) Easy transparency. Just store (Color transparent) at the desired > position in the color map. > 3) Cheap color remapping by changing the color map. > > A color map is an Array of up to 2^depth Color objects. A Bitmap > colorMap is automatically computed and cached for rapid display. Note that > if you change the color map, you must resubmit it via the colors: method to > flush this cache. > > ColorForms can be a bit tricky. Note that: > a) When you BitBlt from one ColorForm to another, you must remember to > copy the color map of the source ColorForm to the destination ColorForm. > b) A ColorForm's color map is an array of depth-independent Color > objects. BitBlt requires a BitMap of actual pixel values, adjusted to the > destination depth. These are different things!! ColorForms automatically > maintain a cache of the BitBlt-style color map corresponding to the colors > array for the last depth on which the ColorForm was displayed, so there > should be little need for clients to work with BitBlt-style color maps. > c) The default map for 8 bit depth has black in the first entry, not > transparent. Say (cform colors at: 1 put: Color transparent). > ! > + ColorForm class > + instanceVariableNames: 'grayScalePalette'! > > Item was added: > + ----- Method: ColorForm class>>grayScalePalette (in category > 'constants') ----- > + grayScalePalette > + grayScalePalette ifNil: [ > + grayScalePalette := (0 to: 255) collect: [:brightness | > Color gray: brightness asFloat / 255.0]. > + grayScalePalette at: 1 put: Color transparent]. > + ^ grayScalePalette! > > Item was added: > + ----- Method: ColorForm>>isGrayScale (in category 'testing') ----- > + isGrayScale > + ^ self colors = ColorForm grayScalePalette.! > > Item was changed: > ----- Method: Form>>asGrayScale (in category 'converting') ----- > asGrayScale > "Assume the receiver is a grayscale image. Return a grayscale > ColorForm computed by extracting the brightness levels of one color > component. This technique allows a 32-bit Form to be converted to an 8-bit > ColorForm to save space while retaining a full 255 levels of gray. (The > usual colormapping technique quantizes to 8, 16, or 32 levels, which loses > information.)" > + | f32 srcForm result map bb | > - | f32 srcForm result map bb grays | > self depth = 32 ifFalse: [ > f32 := Form extent: width@height depth: 32. > self displayOn: f32. > ^ f32 asGrayScale]. > self unhibernate. > srcForm := Form extent: (width * 4)@height depth: 8. > srcForm bits: bits. > result := ColorForm extent: width@height depth: 8. > map := Bitmap new: 256. > 2 to: 256 do: [:i | map at: i put: i - 1]. > map at: 1 put: 1. "map zero pixel values to near-black" > bb := (BitBlt toForm: result) > sourceForm: srcForm; > combinationRule: Form over; > colorMap: map. > 0 to: width - 1 do: [:dstX | > bb sourceRect: (((dstX * 4) + 2)@0 extent: 1@height); > destOrigin: dstX@0; > copyBits]. > > "final BitBlt to zero-out pixels that were truely transparent in > the original" > map := Bitmap new: 512. > map at: 1 put: 16rFF. > (BitBlt toForm: result) > sourceForm: self; > sourceRect: self boundingBox; > destOrigin: 0@0; > combinationRule: Form erase; > colorMap: map; > copyBits. > > + > + result colors: ColorForm grayScalePalette. > - grays := (0 to: 255) collect: [:brightness | Color gray: > brightness asFloat / 255.0]. > - grays at: 1 put: Color transparent. > - result colors: grays. > ^ result > ! > > Item was added: > + ----- Method: Form>>isGrayScale (in category 'testing') ----- > + isGrayScale > + ^ false! > > Item was changed: > ----- Method: JPEGReadWriter2>>compress:quality: (in category 'public > access') ----- > compress: aForm quality: quality > + "Encode the given Form and answer the compressed ByteArray. > Quality goes from 0 (low) to 100 (high), where -1 means default. > + We can only compress: > + * 32-bit deep Forms > + * -32-bit deep Forms > + * 16-bit deep Forms > + * -16-bit deep Forms > + * GrayScale ColorForms (see #isGrayScale)" > - "Encode the given Form and answer the compressed ByteArray. > Quality goes from 0 (low) to 100 (high), where -1 means default." > - > | sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer > byteCount | > + > aForm unhibernate. > + > + sourceForm := self supports8BitGrayscaleJPEGs > + ifTrue: [ > + (aForm depth = 32) | (aForm depth = 16) | (aForm > isGrayScale) > + ifTrue: [aForm] > + ifFalse: [aForm asFormOfDepth: 32 ]] > + ifFalse: [ > + (aForm nativeDepth > 0) & ((aForm depth = 32) | > ((aForm depth = 16) & (aForm width even))) > + ifTrue: [aForm] > + ifFalse: [aForm asFormOfDepth: 32 ]]. > + > - "odd width images of depth 16 give problems; avoid them." > - sourceForm := (aForm depth = 32) | (aForm width even & (aForm > depth = 16)) > - ifTrue: [aForm] > - ifFalse: [aForm asFormOfDepth: 32]. > jpegCompressStruct := ByteArray new: self > primJPEGCompressStructSize. > jpegErrorMgr2Struct := ByteArray new: self > primJPEGErrorMgr2StructSize. > buffer := ByteArray new: sourceForm width * sourceForm height + > 1024. > byteCount := self primJPEGWriteImage: jpegCompressStruct > onByteArray: buffer > form: sourceForm > quality: quality > progressiveJPEG: false > errorMgr: jpegErrorMgr2Struct. > byteCount = 0 ifTrue: [self error: 'buffer too small for > compressed data']. > ^ buffer copyFrom: 1 to: byteCount > ! > > Item was changed: > ----- Method: JPEGReadWriter2>>nextImageSuggestedDepth: (in category > 'public access') ----- > + nextImageSuggestedDepth: suggestedDepth > + "Decode and answer a Form of the given depth from my stream. Close > the stream if it is a file stream. > + We can read RGB JPEGs into: > + * 32-bit Forms > + * -32-bit Forms > + * 16-bit Forms (with or without dithering!!) > + * -16-bit Forms (with or without dithering!!) > + We can read grayscale JPEGs into: > + * 32-bit Forms > + * -32-bit Forms > + * 16-bit Forms (with or without dithering!!) > + * -16-bit Forms (with or without dithering!!) > + * 8-bit grayScale ColorForms (see #isGrayScale) > + * -8-bit grayScale ColorForms (see #isGrayScale)" > - nextImageSuggestedDepth: depth > - "Decode and answer a Form of the given depth from my stream. Close > the stream if it is a file stream. Possible depths are 16-bit and 32-bit." > > + | bytes width height components form jpegDecompressStruct > jpegErrorMgr2Struct | > - | bytes width height form jpegDecompressStruct jpegErrorMgr2Struct > depthToUse | > bytes := stream upToEnd. > stream close. > jpegDecompressStruct := ByteArray new: self > primJPEGDecompressStructSize. > jpegErrorMgr2Struct := ByteArray new: self > primJPEGErrorMgr2StructSize. > self > primJPEGReadHeader: jpegDecompressStruct > fromByteArray: bytes > errorMgr: jpegErrorMgr2Struct. > width := self primImageWidth: jpegDecompressStruct. > height := self primImageHeight: jpegDecompressStruct. > + components := self primImageNumComponents: jpegDecompressStruct. > + form := > + self supports8BitGrayscaleJPEGs > + ifTrue: [ > + components = 3 > + ifTrue: [ Form extent: width@height > depth: suggestedDepth ] > + ifFalse: [ (Form extent: > width@height depth: suggestedDepth) asGrayScale ]] > + ifFalse: [ > + Form > + extent: width@height > + depth: > + (suggestedDepth = 32 > + ifTrue: [ 32 ] > + ifFalse: [ > + > ((suggestedDepth = 16) & (width even)) > + > ifTrue: [ 16 ] > + > ifFalse: [ 32 ]])]. > + > - "Odd width images of depth 16 gave problems. Avoid them (or check > carefully!!)" > - depthToUse := ((depth = 32) | width odd) ifTrue: [32] ifFalse: > [16]. > - form := Form extent: width@height depth: depthToUse. > - (width = 0 or: [height = 0]) ifTrue: [^ form]. > self > primJPEGReadImage: jpegDecompressStruct > fromByteArray: bytes > onForm: form > doDithering: true > errorMgr: jpegErrorMgr2Struct. > + ^ form! > - ^ form > - ! > > Item was changed: > ----- Method: JPEGReadWriter2>>nextPutImage:quality:progressiveJPEG: (in > category 'public access') ----- > nextPutImage: aForm quality: quality progressiveJPEG: progressiveFlag > + "Encode the given Form on my stream with the given settings. > Quality goes from 0 (low) to 100 (high), where -1 means default. If > progressiveFlag is true, encode as a progressive JPEG. > + We can compress: > + * 32-bit deep Forms > + * -32-bit deep Forms > + * 16-bit deep > + * -16-bit deep > + * GrayScale ColorForms (see #isGrayScale)" > - "Encode the given Form on my stream with the given settings. > Quality goes from 0 (low) to 100 (high), where -1 means default. If > progressiveFlag is true, encode as a progressive JPEG." > > | sourceForm jpegCompressStruct jpegErrorMgr2Struct buffer > byteCount | > + > aForm unhibernate. > + > + sourceForm := self supports8BitGrayscaleJPEGs > + ifTrue: [ > + (aForm depth = 32) | (aForm depth = 16) | (aForm > isGrayScale) > + ifTrue: [aForm] > + ifFalse: [aForm asFormOfDepth: 32 ]] > + ifFalse: [ > + (aForm nativeDepth > 0) & ((aForm depth = 32) | > ((aForm depth = 16) & (aForm width even))) > + ifTrue: [aForm] > + ifFalse: [aForm asFormOfDepth: 32 ]]. > + > - "odd width images of depth 16 give problems; avoid them." > - sourceForm := (aForm depth = 32) | (aForm width even & (aForm > depth = 16)) > - ifTrue: [aForm] > - ifFalse: [aForm asFormOfDepth: 32]. > jpegCompressStruct := ByteArray new: self > primJPEGCompressStructSize. > jpegErrorMgr2Struct := ByteArray new: self > primJPEGErrorMgr2StructSize. > buffer := ByteArray new: sourceForm width * sourceForm height + > 1024. > "Try to write the image. Retry with a larger buffer if needed." > [ > byteCount := self primJPEGWriteImage: jpegCompressStruct > onByteArray: buffer > form: sourceForm > quality: quality > progressiveJPEG: progressiveFlag > errorMgr: jpegErrorMgr2Struct. > byteCount = 0 and: [ buffer size < (sourceForm width * > sourceForm height * 3 + 1024) ] ] > whileTrue: [ buffer := ByteArray new: buffer size > * 2 ]. > byteCount = 0 ifTrue: [ self error: 'buffer too small for > compressed data' ]. > stream next: byteCount putAll: buffer startingAt: 1. > self close. > ! > > Item was added: > + ----- Method: JPEGReadWriter2>>primImageNumComponents: (in category > 'primitives') ----- > + primImageNumComponents: aJPEGDecompressStruct > + > + 'JPEGReadWriter2Plugin'> > + ^ 3! > > Item was added: > + ----- Method: JPEGReadWriter2>>primSupports8BitGrayscaleJPEGs (in > category 'primitives') ----- > + primSupports8BitGrayscaleJPEGs > + 'JPEGReadWriter2Plugin'> > + ^ false! > > Item was added: > + ----- Method: JPEGReadWriter2>>supports8BitGrayscaleJPEGs (in category > 'testing') ----- > + supports8BitGrayscaleJPEGs > + ^ self primSupports8BitGrayscaleJPEGs! > > Item was changed: > ----- Method: JPEGReadWriter2>>uncompress:into: (in category 'public > access') ----- > uncompress: aByteArray into: aForm > + ^ self uncompress: aByteArray into: aForm doDithering: true > - "Uncompress an image from the given ByteArray into the given Form. > - Fails if the given Form has the wrong dimensions or depth. > - If aForm has depth 16, do ordered dithering." > - > - | jpegDecompressStruct jpegErrorMgr2Struct w h | > - aForm unhibernate. > - jpegDecompressStruct := ByteArray new: self > primJPEGDecompressStructSize. > - jpegErrorMgr2Struct := ByteArray new: self > primJPEGErrorMgr2StructSize. > - self > - primJPEGReadHeader: jpegDecompressStruct > - fromByteArray: aByteArray > - errorMgr: jpegErrorMgr2Struct. > - w := self primImageWidth: jpegDecompressStruct. > - h := self primImageHeight: jpegDecompressStruct. > - ((aForm width = w) & (aForm height = h)) ifFalse: [ > - ^ self error: 'form dimensions do not match']. > - > - "odd width images of depth 16 give problems; avoid them" > - w odd > - ifTrue: [ > - aForm depth = 32 ifFalse: [^ self error: 'must use > depth 32 with odd width']] > - ifFalse: [ > - ((aForm depth = 16) | (aForm depth = 32)) ifFalse: > [^ self error: 'must use depth 16 or 32']]. > - > - self primJPEGReadImage: jpegDecompressStruct > - fromByteArray: aByteArray > - onForm: aForm > - doDithering: true > - errorMgr: jpegErrorMgr2Struct. > ! > > Item was changed: > ----- Method: JPEGReadWriter2>>uncompress:into:doDithering: (in category > 'public access') ----- > uncompress: aByteArray into: aForm doDithering: ditherFlag > "Uncompress an image from the given ByteArray into the given Form. > Fails if the given Form has the wrong dimensions or depth. > + We can read RGB JPEGs into: > + * 32-bit Forms > + * -32-bit Forms > + * 16-bit Forms (with or without dithering!!) > + * -16-bit Forms (with or without dithering!!) > + We can read grayscale JPEGs into: > + * 32-bit Forms > + * -32-bit Forms > + * 16-bit Forms (with or without dithering!!) > + * -16-bit Forms (with or without dithering!!) > + * 8-bit grayScale ColorForms (see #isGrayScale) > + * -8-bit grayScale ColorForms (see #isGrayScale)" > - If aForm has depth 16 and ditherFlag = true, do ordered dithering." > > + | jpegDecompressStruct jpegErrorMgr2Struct width height components > | > + > - | jpegDecompressStruct jpegErrorMgr2Struct w h | > aForm unhibernate. > + > jpegDecompressStruct := ByteArray new: self > primJPEGDecompressStructSize. > jpegErrorMgr2Struct := ByteArray new: self > primJPEGErrorMgr2StructSize. > self > primJPEGReadHeader: jpegDecompressStruct > fromByteArray: aByteArray > errorMgr: jpegErrorMgr2Struct. > + width := self primImageWidth: jpegDecompressStruct. > + height := self primImageHeight: jpegDecompressStruct. > + components := self primImageNumComponents: jpegDecompressStruct. > + > + ((aForm width = width) & (aForm height = height)) ifFalse: [ > + ^ self error: 'form dimensions do not match' ]. > + self supports8BitGrayscaleJPEGs > - w := self primImageWidth: jpegDecompressStruct. > - h := self primImageHeight: jpegDecompressStruct. > - ((aForm width = w) & (aForm height = h)) ifFalse: [ > - ^ self error: 'form dimensions do not match']. > - > - "odd width images of depth 16 give problems; avoid them" > - w odd > ifTrue: [ > + components = 3 > + ifTrue: [ > + aForm depth = 8 > + ifTrue: [ ^ self error: > 'Cannot uncompress multi-channel JPEGs into 8-bit deep forms' ]]. > + components = 1 > + ifTrue: [ > + aForm depth = 8 > + ifTrue: [ > + aForm isGrayScale > + ifFalse: [ > ^ self error: 'Cannot uncompress single-channel JPEGs into 8-bit deep forms > that are not grayscale' ]]]] > + > - aForm depth = 32 ifFalse: [^ self error: 'must use > depth 32 with odd width']] > ifFalse: [ > + aForm nativeDepth < 0 > + ifTrue: [ ^ self error: 'Current plugin > version doesn''t support uncompressing JPEGs into little-endian forms' ] > + ifFalse: [ > + aForm depth = 16 > + ifTrue: [ > + width odd > + ifTrue: [ > ^ self error: 'Current plugin version doesn''t support uncompressing JPEGs > with an odd width into 16-bit deep forms' ]]. > + aForm depth = 8 > + ifTrue: [ ^ self error: > 'Current plugin version doesn''t support uncompressing JPEGs into 8-bit > deep forms' ]]]. > - ((aForm depth = 16) | (aForm depth = 32)) ifFalse: > [^ self error: 'must use depth 16 or 32']]. > > self primJPEGReadImage: jpegDecompressStruct > fromByteArray: aByteArray > onForm: aForm > doDithering: ditherFlag > errorMgr: jpegErrorMgr2Struct. > ! > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160615/6810f65b/attachment-0001.htm From Marcel.Taeumel at hpi.de Wed Jun 15 17:26:50 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 15 18:06:15 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-lpc.350.mcz In-Reply-To: References: Message-ID: <1466011610741-4901064.post@n4.nabble.com> Welcome in the team! :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Graphics-lpc-350-mcz-tp4901052p4901064.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From casimiro.barreto at gmail.com Wed Jun 15 18:18:16 2016 From: casimiro.barreto at gmail.com (Casimiro - GMAIL) Date: Wed Jun 15 18:18:36 2016 Subject: [squeak-dev] Problems installing seaside in fresh 5.0 AIO Message-ID: Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160615/8cf29305/signature.pgp From commits at source.squeak.org Wed Jun 15 21:56:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 15 21:56:57 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160615215656.26534.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-June/068216.html Name: Kernel-mt.1028 Ancestors: Kernel-mt.1027 Extends EventSensor to be prepared for VMs to really send mouse-wheel events. (Merges several peek* and prim* methods in EventSensor as a clean-up from the former InputSensor days.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068217.html Name: Morphic-mt.1178 Ancestors: Morphic-mt.1177 Appendix to Kernel-mt.1028. Support #wheelDelta in MouseWheelEvent instances for fine-granular scrolling. Do only raise flags for, e.g., #isWheelUp and #isWheelDown if the delta is above 120 units. Accumulate this in MouseWheelState. Wheel-up is every +120 and wheel-down is every -120. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068218.html Name: ST80-mt.213 Ancestors: ST80-mt.212 Appendix to Kernel-mt.1028. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068219.html Name: System-mt.833 Ancestors: System-mt.832 Make it possible to access the common request strings from other applications. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068220.html Name: Morphic-mt.1179 Ancestors: Morphic-mt.1178 Add the world's Do-menu to the world main docking bar. Can be hidden via preferences. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068221.html Name: Graphics-mt.349 Ancestors: Graphics-topa.348 Improves dark-map rendering of DejaVu Sans. Now, it does not look so bold anymore but is still way more readable on darker backgrounds than the bitmap version is. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068222.html Name: Morphic-mt.1180 Ancestors: Morphic-mt.1179 Fixes a regression with event filterung and bubbling in general, which affects events sent to morphs that are submorphs of the hand. Escaping drag-and-drop, for example, where events are sent to the TransferMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068223.html Name: Morphic-mt.1181 Ancestors: Morphic-mt.1180 ixes regression in event dispatching and coordinate transformations. Do not reset transformation in the event copy delivered to submorphs. They need those for, e.g., double click, drag-and-drop, etc. Our events do, more or less, not change after being created and initialized. The only exception is #wasHandled, #wasIgnored, and #position during event dispatching. Keep it that way. If you plan to change some event state in an event filter, create a new event instead and do not mess around with the current one. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068224.html Name: Graphics-lpc.350 Ancestors: Graphics-mt.349 Support for both the current version and the new version of JPEGReadWriter2Plugin ============================================= From lewis at mail.msen.com Thu Jun 16 00:05:33 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 16 00:05:35 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1179.mcz In-Reply-To: References: <5760f5e7.d8a1370a.6e821.454dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <20160616000533.GA56281@shell.msen.com> Wouldn't the new Do-menu fit naturally under the exising Extras category? This is a collection of useful menu entries that do not fit under Tools or Apps. If we add the new Do menu as a sub-menu under Extras, then it would be easy to find, and no preference would be needed. Dave On Wed, Jun 15, 2016 at 08:36:07AM -0700, Chris Cunningham wrote: > Hmm. Direct manipulation. > What if we had a spot in the halo menu to 'remove from DockingBar forever' > which then set the preference? One time direct manipulation without having > to redo it later. > Of course, it would be added back in later via the preferences. > -cbc > > On Wed, Jun 15, 2016 at 8:28 AM, Chris Muller wrote: > > > I was wondering whether Preferences are the best way to control these > > or whether the user could simply remove the ones they don't want by > > blue-clicking and then clicking the close halo (X)... > > > > I know when the DockingBar is regenerated they would have to re-remove > > them, but still... we do have a live, direct-manuipulation system, > > sometimes we should be able to fall back on it..? > > > > On Wed, Jun 15, 2016 at 1:29 AM, wrote: > > > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > > > http://source.squeak.org/trunk/Morphic-mt.1179.mcz > > > > > > ==================== Summary ==================== > > > > > > Name: Morphic-mt.1179 > > > Author: mt > > > Time: 15 June 2016, 8:28:59.901896 am > > > UUID: 798fffba-733f-3444-840e-84baabd04da4 > > > Ancestors: Morphic-mt.1178 > > > > > > Add the world's Do-menu to the world main docking bar. Can be hidden via > > preferences. > > > > > > =============== Diff against Morphic-mt.1178 =============== > > > > > > Item was added: > > > + ----- Method: TheWorldMainDockingBar > > class>>showDoMenuInWorldMainDockingBar (in category 'preferences') ----- > > > + showDoMenuInWorldMainDockingBar > > > + > > > + > > + category: 'docking bars' > > > + description: 'Whether world''s main docking bar should > > show the ''Do'' menu.' > > > + type: #Boolean> > > > + ^ self getMenuPreference: #showDoMenuInWorldMainDockingBar > > ifAbsent: [true] > > > + ! > > > > > > Item was added: > > > + ----- Method: TheWorldMainDockingBar > > class>>showDoMenuInWorldMainDockingBar: (in category 'preferences') ----- > > > + showDoMenuInWorldMainDockingBar: aBoolean > > > + > > > + self > > > + setMenuPreference: #showDoMenuInWorldMainDockingBar > > > + to: aBoolean. > > > + ! > > > > > > Item was added: > > > + ----- Method: TheWorldMainDockingBar>>doMenuOn: (in category > > 'construction') ----- > > > + doMenuOn: aDockingBar > > > + > > > + aDockingBar addItem: [ :item | > > > + item > > > + contents: 'Do' translated; > > > + subMenuUpdater: self > > > + selector: #listCommonRequestsOn: ]! > > > > > > Item was added: > > > + ----- Method: TheWorldMainDockingBar>>listCommonRequestsOn: (in > > category 'submenu - do') ----- > > > + listCommonRequestsOn: aMenu > > > + > > > + | strings | > > > + strings := Utilities commonRequestStrings contents. > > > + > > > + strings asString linesDo: [:aString | > > > + aString = '-' > > > + ifTrue: [aMenu addLine] > > > + ifFalse: [aMenu add: (aString ifEmpty: [' ']) > > target: Utilities selector: #eval: argument: aString]]. > > > + > > > + aMenu addLine. > > > + aMenu add: 'edit this list' translated target: Utilities action: > > #editCommonRequestStrings.! > > > > > > Item was changed: > > > ----- Method: TheWorldMainDockingBar>>menusOn: (in category > > 'construction') ----- > > > menusOn: aDockingBar > > > > > > self class showMainMenuInWorldMainDockingBar ifTrue: [ > > > self squeakMenuOn: aDockingBar]. > > > > > > self class showProjectsMenuInWorldMainDockingBar ifTrue: [ > > > self projectsMenuOn: aDockingBar]. > > > > > > self class showToolsMenuInWorldMainDockingBar ifTrue: [ > > > self toolsMenuOn: aDockingBar]. > > > > > > self class showAppsMenuInWorldMainDockingBar ifTrue: [ > > > self appsMenuOn: aDockingBar]. > > > > > > + self class showDoMenuInWorldMainDockingBar ifTrue: [ > > > + self doMenuOn: aDockingBar]. > > > + > > > self class showExtrasMenuInWorldMainDockingBar ifTrue: [ > > > self extrasMenuOn: aDockingBar]. > > > > > > self class showWindowsMenuInWorldMainDockingBar ifTrue: [ > > > self windowsMenuOn: aDockingBar]. > > > > > > self class showHelpMenuInWorldMainDockingBar ifTrue: [ > > > self helpMenuOn: aDockingBar].! > > > > > > Item was changed: > > > (PackageInfo named: 'Morphic') postscript: '"Fixes the event handling > > that occurs in the same control flow after loading this code." > > > HandMorph allInstancesDo: [:ea | ea initForEvents]. > > > > > > "Deploy mouse-wheel event handling to existing scrollpanes and hands." > > > Project allMorphicProjects do: [:morphicProject | > > > morphicProject world handsDo: [:hand | > > > hand addKeyboardCaptureFilter: hand]]. > > > ScrollPane allSubInstancesDo: [:ea | > > > + ea addKeyboardCaptureFilter: ea]. > > > + > > > + "Add Do-menu." > > > + TheWorldMainDockingBar updateInstances.'! > > > - ea addKeyboardCaptureFilter: ea].'! > > > > > > > > > > > From lewis at mail.msen.com Thu Jun 16 00:10:22 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 16 00:10:24 2016 Subject: [squeak-dev] The Trunk: Graphics-lpc.350.mcz In-Reply-To: <201606151702.u5FH20gV077889@shell.msen.com> References: <201606151702.u5FH20gV077889@shell.msen.com> Message-ID: <20160616001022.GB56281@shell.msen.com> On Wed, Jun 15, 2016 at 05:01:36PM +0000, commits@source.squeak.org wrote: > Laura Perez Cerrato uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-lpc.350.mcz > Yay! Thank you Laura for your contributions. Dave From Marcel.Taeumel at hpi.de Thu Jun 16 03:57:55 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jun 16 04:37:20 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1179.mcz In-Reply-To: <20160616000533.GA56281@shell.msen.com> References: <20160616000533.GA56281@shell.msen.com> Message-ID: <1466049475271-4901123.post@n4.nabble.com> David T. Lewis wrote > Wouldn't the new Do-menu fit naturally under the exising Extras category? > This is a collection of useful menu entries that do not fit under Tools or > Apps. If we add the new Do menu as a sub-menu under Extras, then it would > be > easy to find, and no preference would be needed. > > Dave > > > On Wed, Jun 15, 2016 at 08:36:07AM -0700, Chris Cunningham wrote: >> Hmm. Direct manipulation. >> What if we had a spot in the halo menu to 'remove from DockingBar >> forever' >> which then set the preference? One time direct manipulation without >> having >> to redo it later. >> Of course, it would be added back in later via the preferences. >> -cbc >> >> On Wed, Jun 15, 2016 at 8:28 AM, Chris Muller < > asqueaker@ > > wrote: >> >> > I was wondering whether Preferences are the best way to control these >> > or whether the user could simply remove the ones they don't want by >> > blue-clicking and then clicking the close halo (X)... >> > >> > I know when the DockingBar is regenerated they would have to re-remove >> > them, but still... we do have a live, direct-manuipulation system, >> > sometimes we should be able to fall back on it..? >> > >> > On Wed, Jun 15, 2016 at 1:29 AM, < > commits@.squeak > > wrote: >> > > Marcel Taeumel uploaded a new version of Morphic to project The >> Trunk: >> > > http://source.squeak.org/trunk/Morphic-mt.1179.mcz >> > > >> > > ==================== Summary ==================== >> > > >> > > Name: Morphic-mt.1179 >> > > Author: mt >> > > Time: 15 June 2016, 8:28:59.901896 am >> > > UUID: 798fffba-733f-3444-840e-84baabd04da4 >> > > Ancestors: Morphic-mt.1178 >> > > >> > > Add the world's Do-menu to the world main docking bar. Can be hidden >> via >> > preferences. >> > > >> > > =============== Diff against Morphic-mt.1178 =============== >> > > >> > > Item was added: >> > > + ----- Method: TheWorldMainDockingBar >> > class>>showDoMenuInWorldMainDockingBar (in category 'preferences') >> ----- >> > > + showDoMenuInWorldMainDockingBar >> > > + >> > > + > > > > > + category: 'docking bars' >> > > + description: 'Whether world''s main docking bar >> should >> > show the ''Do'' menu.' >> > > + type: #Boolean> >> > > + ^ self getMenuPreference: #showDoMenuInWorldMainDockingBar >> > ifAbsent: [true] >> > > + ! >> > > >> > > Item was added: >> > > + ----- Method: TheWorldMainDockingBar >> > class>>showDoMenuInWorldMainDockingBar: (in category 'preferences') >> ----- >> > > + showDoMenuInWorldMainDockingBar: aBoolean >> > > + >> > > + self >> > > + setMenuPreference: #showDoMenuInWorldMainDockingBar >> > > + to: aBoolean. >> > > + ! >> > > >> > > Item was added: >> > > + ----- Method: TheWorldMainDockingBar>>doMenuOn: (in category >> > 'construction') ----- >> > > + doMenuOn: aDockingBar >> > > + >> > > + aDockingBar addItem: [ :item | >> > > + item >> > > + contents: 'Do' translated; >> > > + subMenuUpdater: self >> > > + selector: #listCommonRequestsOn: ]! >> > > >> > > Item was added: >> > > + ----- Method: TheWorldMainDockingBar>>listCommonRequestsOn: (in >> > category 'submenu - do') ----- >> > > + listCommonRequestsOn: aMenu >> > > + >> > > + | strings | >> > > + strings := Utilities commonRequestStrings contents. >> > > + >> > > + strings asString linesDo: [:aString | >> > > + aString = '-' >> > > + ifTrue: [aMenu addLine] >> > > + ifFalse: [aMenu add: (aString ifEmpty: [' ']) >> > target: Utilities selector: #eval: argument: aString]]. >> > > + >> > > + aMenu addLine. >> > > + aMenu add: 'edit this list' translated target: Utilities >> action: >> > #editCommonRequestStrings.! >> > > >> > > Item was changed: >> > > ----- Method: TheWorldMainDockingBar>>menusOn: (in category >> > 'construction') ----- >> > > menusOn: aDockingBar >> > > >> > > self class showMainMenuInWorldMainDockingBar ifTrue: [ >> > > self squeakMenuOn: aDockingBar]. >> > > >> > > self class showProjectsMenuInWorldMainDockingBar ifTrue: [ >> > > self projectsMenuOn: aDockingBar]. >> > > >> > > self class showToolsMenuInWorldMainDockingBar ifTrue: [ >> > > self toolsMenuOn: aDockingBar]. >> > > >> > > self class showAppsMenuInWorldMainDockingBar ifTrue: [ >> > > self appsMenuOn: aDockingBar]. >> > > >> > > + self class showDoMenuInWorldMainDockingBar ifTrue: [ >> > > + self doMenuOn: aDockingBar]. >> > > + >> > > self class showExtrasMenuInWorldMainDockingBar ifTrue: [ >> > > self extrasMenuOn: aDockingBar]. >> > > >> > > self class showWindowsMenuInWorldMainDockingBar ifTrue: [ >> > > self windowsMenuOn: aDockingBar]. >> > > >> > > self class showHelpMenuInWorldMainDockingBar ifTrue: [ >> > > self helpMenuOn: aDockingBar].! >> > > >> > > Item was changed: >> > > (PackageInfo named: 'Morphic') postscript: '"Fixes the event >> handling >> > that occurs in the same control flow after loading this code." >> > > HandMorph allInstancesDo: [:ea | ea initForEvents]. >> > > >> > > "Deploy mouse-wheel event handling to existing scrollpanes and >> hands." >> > > Project allMorphicProjects do: [:morphicProject | >> > > morphicProject world handsDo: [:hand | >> > > hand addKeyboardCaptureFilter: hand]]. >> > > ScrollPane allSubInstancesDo: [:ea | >> > > + ea addKeyboardCaptureFilter: ea]. >> > > + >> > > + "Add Do-menu." >> > > + TheWorldMainDockingBar updateInstances.'! >> > > - ea addKeyboardCaptureFilter: ea].'! >> > > >> > > >> > >> > > >> Hi Dave, the Do-menu deserves to be top-level. It is the only menu being extensible in a quite simple way. If we hide it in some other sub-menu then it wouldn't be more prominent than it is right now in the world menu. Accessibility could be even more improved by automatically assigning a shortcut per line once open. Or by prefixing its label with its line number to make the menu-keyboard-filter more powerful there. Try this: - Hit CTRL+5 - Type 'de' - Hit return. It will close all open debuggers. Or it will do anything that first matches the query. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1179-mcz-tp4900942p4901123.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Jun 16 04:01:13 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Jun 16 04:40:40 2016 Subject: [squeak-dev] Re: Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: <1466049673417-4901124.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi all, > > we are all finished importing the VM repository to Github, migrating the > scripts, and setting up automatic builds and hosting of binaries. We want > to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim > and > Fabio will merge any remaining commits on the SVN repository between now > and that time and any further development will take place on Github. If > possible, you may refrain from committing to SVN, as this will mean less > work for Tim and Fabio. > > The new repository is at https://github.com/OpenSmalltalk/vm. The Cog > branch > is the new default branch and is still called Cog, this is the main focus > of development. The old trunk branch has been renamed to "oldTrunk". The > master branch will track the Cog branch and will be the repository > integrated into for releases. > > To get started, please refer to the updated README > <https://github.com/OpenSmalltalk/vm/blob/Cog/README.md> that is > shown on the > Github page. > > _,,,^..^,,,_ > best, Eliot, Tim & Fabio Wohooo! :) Best, Marcel -- View this message in context: http://forum.world.st/Moving-the-Cog-subversion-repository-to-githup-at-2016-6-16-7am-UTC-tp4901056p4901124.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Thu Jun 16 05:20:30 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 16 05:20:22 2016 Subject: [squeak-dev] SqueakMap server stuck? Message-ID: I?ve been trying to set up a coupe of packages and it isn?t working very nicely right now. I uploaded to squeaksource ok and even (eventually) worked out how to make first releases. I added two projects to my squeakmap account, and they even appear in the in-image catalogue. But any attempt to get to the SM ?edit releases? page just times out with a 504. Is this me doing wrong things, or the server getting stuck or?? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: ESR: Emulate Slide Rule From timfelgentreff at gmail.com Thu Jun 16 08:24:12 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Thu Jun 16 08:24:36 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi all, as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 was migrated to GitHub. Automatic builds are running ( https://ci.appveyor.com/project/timfel/vm/branch/Cog, https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are uploaded ( https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). Right now we have enabled all platform, object memory and bytecode set combinations that I found build scripts for - most work, but OS X 64-bit Sista is failing right now (32-bit works). At some point we'll have to decide which combinations to put into the CI config as "allowed failures" to get a green badge :) Another thing for those not familiar with Git: Right now the entire repository is 360MB, including all history. Most of that is old images that were at one point committed to SVN and that have been pulled into the repository. We could clean those out (removing them from the history) to make the repository smaller, but I felt ~400MB is still ok (albeit technically over the Github quota. We'll see of they complain). I would like to ask everyone to stop committing large binary files into the repository, however. Git is simply not very suited to dealing with binaries. If there is a need for that, Github has support for git-lfs, which offers 1GB of free storage with a 1GB bandwith limit per month. If we need more, we can look at the different billing levels. If you're familiar with Git, the only new thing to watch out for is the updateSCSSVersions script as described in the README. It's not relevant for the CI, but your own binaries will only show correct versions if this script runs at appropriate times. If you are not familiar with Git and don't care, there are scripts for committing that should take care of everything as described in the README. Again, let us know if anything doesn't work. The only difference vs SVN to watch out for for you will be that the old scripts/svnci would commit your changes to the server, whereas the scripts/gitci script only commits them locally. You'll have to run `git pull` and `git push` to get them up to the server. If you have any questions regarding the repository setup please don't hesitate to ask. You shouldn't be able to break anything, since we've disabled force pushes to both master and Cog (and thus any chance of destroying history). Thanks, Tim & Fabio On 15 June 2016 at 19:26, Eliot Miranda wrote: > > Hi all, > > we are all finished importing the VM repository to Github, migrating the > scripts, and setting up automatic builds and hosting of binaries. We > want to switch over from SVN tomorrow morning at 7am UTC. At that point, > Tim and Fabio will merge any remaining commits on the SVN repository between > now and that time and any further development will take place on Github. > If possible, you may refrain from committing to SVN, as this will mean > less work for Tim and Fabio. > > The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch > is the new default branch and is still called Cog, this is the main focus > of development. The old trunk branch has been renamed to "oldTrunk". The > master branch will track the Cog branch and will be the repository > integrated into for releases. > > To get started, please refer to the updated README > that is shown on the > Github page. > > _,,,^..^,,,_ > best, Eliot, Tim & Fabio > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/d9b776e8/attachment.htm From serge.stinckwich at gmail.com Thu Jun 16 09:10:38 2016 From: serge.stinckwich at gmail.com (Serge Stinckwich) Date: Thu Jun 16 09:11:22 2016 Subject: [squeak-dev] Re: [Pharo-dev] [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: On Thu, Jun 16, 2016 at 9:24 AM, Tim Felgentreff wrote: > Hi all, Very impressive work, Tim&Fabio ! The power of full-automation ! > as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 was > migrated to GitHub. Automatic builds are running > (https://ci.appveyor.com/project/timfel/vm/branch/Cog, > https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are uploaded > (https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). About uploading binary artifacts, this is something I asked and this nice that Fabio make it work :-) Apparently there is some problems with some artifacts that have a double .zip extension. > Right now we have enabled all platform, object memory and bytecode set > combinations that I found build scripts for - most work, but OS X 64-bit > Sista is failing right now (32-bit works). At some point we'll have to > decide which combinations to put into the CI config as "allowed failures" to > get a green badge :) > > Another thing for those not familiar with Git: Right now the entire > repository is 360MB, including all history. Most of that is old images that > were at one point committed to SVN and that have been pulled into the > repository. We could clean those out (removing them from the history) to > make the repository smaller, but I felt ~400MB is still ok (albeit > technically over the Github quota. We'll see of they complain). I would like > to ask everyone to stop committing large binary files into the repository, > however. Git is simply not very suited to dealing with binaries. If there is > a need for that, Github has support for git-lfs, which offers 1GB of free > storage with a 1GB bandwith limit per month. If we need more, we can look at > the different billing levels. > > If you're familiar with Git, the only new thing to watch out for is the > updateSCSSVersions script as described in the README. It's not relevant for > the CI, but your own binaries will only show correct versions if this script > runs at appropriate times. > > If you are not familiar with Git and don't care, there are scripts for > committing that should take care of everything as described in the README. > Again, let us know if anything doesn't work. The only difference vs SVN to > watch out for for you will be that the old scripts/svnci would commit your > changes to the server, whereas the scripts/gitci script only commits them > locally. You'll have to run `git pull` and `git push` to get them up to the > server. > > If you have any questions regarding the repository setup please don't > hesitate to ask. You shouldn't be able to break anything, since we've > disabled force pushes to both master and Cog (and thus any chance of > destroying history). What is favorite way of contributing for people outside the vm team ? pull-requests ? Regards, -- Serge Stinckwich UCBN & UMI UMMISCO 209 (IRD/UPMC) Every DSL ends up being Smalltalk http://www.doesnotunderstand.org/ From commits at source.squeak.org Thu Jun 16 11:56:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 16 11:56:54 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.351.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.351.mcz ==================== Summary ==================== Name: Graphics-mt.351 Author: mt Time: 16 June 2016, 1:56:13.140696 pm UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8 Ancestors: Graphics-lpc.350 Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore. =============== Diff against Graphics-lpc.350 =============== Item was changed: ----- Method: StrikeFont>>ascentKern (in category 'accessing') ----- ascentKern "Return the kern delta for ascenders." + + self depth > 1 ifTrue: [^ 0]. + + "Optimization for traditional 1-bit fonts." + ^ (emphasis allMask: 2) + ifFalse: [0] + ifTrue: [(self ascent-5+4)//4 max: 0] "See makeItalicGlyphs" - (emphasis noMask: 2) ifTrue: [^ 0]. - ^ (self ascent-5+4)//4 max: 0 "See makeItalicGlyphs" ! Item was changed: ----- Method: StrikeFont>>baseKern (in category 'accessing') ----- baseKern "Return the base kern value to be used for all characters." + self depth > 1 ifTrue: [^ 0]. - | italic | - italic := emphasis allMask: 2. + "Optimization for traditional 1-bit fonts." + ^ (emphasis allMask: 2) + ifFalse: [0] + ifTrue: [((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" + + (((self ascent-5+4)//4 max: 0))]! - glyphs depth > 1 ifTrue: [ - ^(italic or: [ pointSize < 9 ]) - ifTrue: [ 1 ] - ifFalse: [ 0] ]. - - italic ifFalse: [^ 0]. - ^ ((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" - + (((self ascent-5+4)//4 max: 0))! Item was changed: ----- Method: StrikeFont>>descentKern (in category 'accessing') ----- descentKern "Return the kern delta for descenders." - (emphasis noMask: 2) ifTrue: [^ 0]. - ^ (self height-1-self ascent+4)//4 max: 0 "See makeItalicGlyphs" + self depth > 1 ifTrue: [^ 0]. + + "Optimization for traditional 1-bit fonts." + ^ (emphasis allMask: 2) + ifFalse: [0] + ifTrue: [(self height-1-self ascent+4)//4 max: 0] "See makeItalicGlyphs" + ! From marianopeck at gmail.com Thu Jun 16 12:37:20 2016 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Thu Jun 16 12:37:27 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: This is very very cool. Thanks to all the people involved, and thanks Eliot for listening the "community's wishes". I honestly thought it would take much longer or never happened. I am so glad to have been proven wrong! Best, On Thu, Jun 16, 2016 at 5:24 AM, Tim Felgentreff wrote: > > Hi all, > > as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 was > migrated to GitHub. Automatic builds are running ( > https://ci.appveyor.com/project/timfel/vm/branch/Cog, > https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are uploaded > (https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). > > Right now we have enabled all platform, object memory and bytecode set > combinations that I found build scripts for - most work, but OS X 64-bit > Sista is failing right now (32-bit works). At some point we'll have to > decide which combinations to put into the CI config as "allowed failures" > to get a green badge :) > > Another thing for those not familiar with Git: Right now the entire > repository is 360MB, including all history. Most of that is old images that > were at one point committed to SVN and that have been pulled into the > repository. We could clean those out (removing them from the history) to > make the repository smaller, but I felt ~400MB is still ok (albeit > technically over the Github quota. We'll see of they complain). I would > like to ask everyone to stop committing large binary files into the > repository, however. Git is simply not very suited to dealing with > binaries. If there is a need for that, Github has support for git-lfs, > which offers 1GB of free storage with a 1GB bandwith limit per month. If we > need more, we can look at the different billing levels. > > If you're familiar with Git, the only new thing to watch out for is the > updateSCSSVersions script as described in the README. It's not relevant for > the CI, but your own binaries will only show correct versions if this > script runs at appropriate times. > > If you are not familiar with Git and don't care, there are scripts for > committing that should take care of everything as described in the README. > Again, let us know if anything doesn't work. The only difference vs SVN to > watch out for for you will be that the old scripts/svnci would commit your > changes to the server, whereas the scripts/gitci script only commits them > locally. You'll have to run `git pull` and `git push` to get them up to the > server. > > If you have any questions regarding the repository setup please don't > hesitate to ask. You shouldn't be able to break anything, since we've > disabled force pushes to both master and Cog (and thus any chance of > destroying history). > > Thanks, > Tim & Fabio > > > > On 15 June 2016 at 19:26, Eliot Miranda wrote: > >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the >> scripts, and setting up automatic builds and hosting of binaries. We >> want to switch over from SVN tomorrow morning at 7am UTC. At that point, >> Tim and Fabio will merge any remaining commits on the SVN repository between >> now and that time and any further development will take place on >> Github. If possible, you may refrain from committing to SVN, as this >> will mean less work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch >> is the new default branch and is still called Cog, this is the main >> focus of development. The old trunk branch has been renamed to "oldTrunk". >> The master branch will track the Cog branch and will be the repository >> integrated into for releases. >> >> To get started, please refer to the updated README >> that is shown >> on the Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio >> >> > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/9b4af4d3/attachment.htm From eliot.miranda at gmail.com Thu Jun 16 17:37:05 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 16 17:37:09 2016 Subject: [squeak-dev] Re: [Pharo-dev] [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Laura, Hi Tim, On Thu, Jun 16, 2016 at 10:09 AM, Laura Perez Cerrato < lauraperezcerrato@gmail.com> wrote: > > Hi everyone, > > First of all, thanks a lot! > > Meaning to ask the same question as Serge, what's the preferred way of > collaborating for anyone who's not a contributor? forking and then > submitting a pull request? > thats on you, Tim, and I to update the README.md with a description of the contributor and change staging process. I'm going to be checking out the repository for the first time in a few minutes. I guess we can bat aroun drafts between us using git itself, but perhaps email would be more sensible ;-) > > Cheers! > > -Laura Perez Cerrato > > On 16 June 2016 at 06:10, Serge Stinckwich > wrote: > >> >> On Thu, Jun 16, 2016 at 9:24 AM, Tim Felgentreff >> wrote: >> > Hi all, >> >> Very impressive work, Tim&Fabio ! The power of full-automation ! >> >> > as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 was >> > migrated to GitHub. Automatic builds are running >> > (https://ci.appveyor.com/project/timfel/vm/branch/Cog, >> > https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are >> uploaded >> > (https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). >> >> About uploading binary artifacts, this is something I asked and this >> nice that Fabio >> make it work :-) >> >> Apparently there is some problems with some artifacts that have a >> double .zip extension. >> >> > Right now we have enabled all platform, object memory and bytecode set >> > combinations that I found build scripts for - most work, but OS X 64-bit >> > Sista is failing right now (32-bit works). At some point we'll have to >> > decide which combinations to put into the CI config as "allowed >> failures" to >> > get a green badge :) >> > >> > Another thing for those not familiar with Git: Right now the entire >> > repository is 360MB, including all history. Most of that is old images >> that >> > were at one point committed to SVN and that have been pulled into the >> > repository. We could clean those out (removing them from the history) to >> > make the repository smaller, but I felt ~400MB is still ok (albeit >> > technically over the Github quota. We'll see of they complain). I would >> like >> > to ask everyone to stop committing large binary files into the >> repository, >> > however. Git is simply not very suited to dealing with binaries. If >> there is >> > a need for that, Github has support for git-lfs, which offers 1GB of >> free >> > storage with a 1GB bandwith limit per month. If we need more, we can >> look at >> > the different billing levels. >> > >> > If you're familiar with Git, the only new thing to watch out for is the >> > updateSCSSVersions script as described in the README. It's not relevant >> for >> > the CI, but your own binaries will only show correct versions if this >> script >> > runs at appropriate times. >> > >> > If you are not familiar with Git and don't care, there are scripts for >> > committing that should take care of everything as described in the >> README. >> > Again, let us know if anything doesn't work. The only difference vs SVN >> to >> > watch out for for you will be that the old scripts/svnci would commit >> your >> > changes to the server, whereas the scripts/gitci script only commits >> them >> > locally. You'll have to run `git pull` and `git push` to get them up to >> the >> > server. >> > >> > If you have any questions regarding the repository setup please don't >> > hesitate to ask. You shouldn't be able to break anything, since we've >> > disabled force pushes to both master and Cog (and thus any chance of >> > destroying history). >> >> What is favorite way of contributing for people outside the vm team ? >> pull-requests ? >> >> Regards, >> -- >> Serge Stinckwich >> UCBN & UMI UMMISCO 209 (IRD/UPMC) >> Every DSL ends up being Smalltalk >> http://www.doesnotunderstand.org/ >> > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/9e36801c/attachment.htm From eliot.miranda at gmail.com Thu Jun 16 18:29:09 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 16 18:29:14 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Tim, this morning as I prepared to cone the repository I felt a rush of relief spread over me as I realised that I never haves to build and upload VMs again. Thank you, thank you, thank you, everyone who encouraged and helped me in making this transition. I am a happier human as a result. On Thu, Jun 16, 2016 at 1:24 AM, Tim Felgentreff wrote: > > Hi all, > > as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 was > migrated to GitHub. Automatic builds are running ( > https://ci.appveyor.com/project/timfel/vm/branch/Cog, > https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are uploaded > (https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). > > Right now we have enabled all platform, object memory and bytecode set > combinations that I found build scripts for - most work, but OS X 64-bit > Sista is failing right now (32-bit works). At some point we'll have to > decide which combinations to put into the CI config as "allowed failures" > to get a green badge :) > > Another thing for those not familiar with Git: Right now the entire > repository is 360MB, including all history. Most of that is old images that > were at one point committed to SVN and that have been pulled into the > repository. We could clean those out (removing them from the history) to > make the repository smaller, but I felt ~400MB is still ok (albeit > technically over the Github quota. We'll see of they complain). I would > like to ask everyone to stop committing large binary files into the > repository, however. Git is simply not very suited to dealing with > binaries. If there is a need for that, Github has support for git-lfs, > which offers 1GB of free storage with a 1GB bandwith limit per month. If we > need more, we can look at the different billing levels. > > If you're familiar with Git, the only new thing to watch out for is the > updateSCSSVersions script as described in the README. It's not relevant for > the CI, but your own binaries will only show correct versions if this > script runs at appropriate times. > > If you are not familiar with Git and don't care, there are scripts for > committing that should take care of everything as described in the README. > Again, let us know if anything doesn't work. The only difference vs SVN to > watch out for for you will be that the old scripts/svnci would commit your > changes to the server, whereas the scripts/gitci script only commits them > locally. You'll have to run `git pull` and `git push` to get them up to the > server. > > If you have any questions regarding the repository setup please don't > hesitate to ask. You shouldn't be able to break anything, since we've > disabled force pushes to both master and Cog (and thus any chance of > destroying history). > > Thanks, > Tim & Fabio > > > > On 15 June 2016 at 19:26, Eliot Miranda wrote: > >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the >> scripts, and setting up automatic builds and hosting of binaries. We >> want to switch over from SVN tomorrow morning at 7am UTC. At that point, >> Tim and Fabio will merge any remaining commits on the SVN repository between >> now and that time and any further development will take place on >> Github. If possible, you may refrain from committing to SVN, as this >> will mean less work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch >> is the new default branch and is still called Cog, this is the main >> focus of development. The old trunk branch has been renamed to "oldTrunk". >> The master branch will track the Cog branch and will be the repository >> integrated into for releases. >> >> To get started, please refer to the updated README >> that is shown >> on the Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio >> >> > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/0e0e3378/attachment-0001.htm From eliot.miranda at gmail.com Thu Jun 16 20:07:23 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 16 20:07:27 2016 Subject: [squeak-dev] Unambiguously differentiating official and local builds [Was [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC] Message-ID: Hi All, so after fixing "git remote get-url origin" to fail over to "git remote show origin | filter and munge" the culture shock of "git commit -a" (git commit does nothing ?!?!?) I have a VM that outputs a reasonable version info: /Users/eliot/oscogvm/build.macos32x86/squeak.cog.spur/CocoaFast.app/Contents/MacOS/Squeak 5.0 5.0.201606161953 Mac OS X built on Jun 16 2016 12:56:52 PDT Compiler: 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57) [Production Spur VM] CoInterpreter VMMaker.oscog-eem.1886 uuid: d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016 StackToRegisterMappingCogit VMMaker.oscog-eem.1886 uuid: d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016 VM: r201606161953 http://github.com/OpenSmalltalk/vm $ Date: Thu Jun 16 12:53:33 2016 -0700 $ Plugins: r201606161953 http://github.com/OpenSmalltalk/vm $ Which begs the question how do I differentiate this from something built officially via Travis? Arguably the URL is wrong, and should only say " http://github.com/OpenSmalltalk/vm" for travis builds, and perhaps should just include my local hostname and current directory when I make any kind of local modification. So the above would read ... VM: r201606161953 McStalker:?users/eliot/oscogvm $ Date: Thu Jun 16 12:53:33 2016 -0700 $ Plugins: r201606161953 McStalker:?users/eliot/oscogvm $ Alternatively we could add another field, or modify one of the existing fields to say "I'm official" however one would do that. I don't know how, I just know we need this. I shouldn't be able to pollute the VM pool by putting some VM on some site somewhere that i just happened to build after several sherries and some cannabis brownies that looks to all intents and purposes just like a VM built by our official Travis slaves. Hic. Chillin' _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/01f1e9c4/attachment.htm From asqueaker at gmail.com Thu Jun 16 21:34:41 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 16 21:35:23 2016 Subject: [squeak-dev] SqueakMap server stuck? In-Reply-To: References: Message-ID: Every time the SM model changes, it'll end up doing a resave of the SM model to a serialized file within the next 5-minute period or so. That save burdens the image so badly for a few minutes that it isn't able to respond to other requests temporarily. (It runs using Goran's HTTPView web framework, still on an old interpreter image because there are a couple of methods that exceed the maximum length (or, was it # of literals?) allowed by cog images. After the model change, the next time you access it'll download that new file. Wait a few minutes, then try again, it will work. On Thu, Jun 16, 2016 at 12:20 AM, tim Rowledge wrote: > I?ve been trying to set up a coupe of packages and it isn?t working very nicely right now. > I uploaded to squeaksource ok and even (eventually) worked out how to make first releases. I added two projects to my squeakmap account, and they even appear in the in-image catalogue. But any attempt to get to the SM ?edit releases? page just times out with a 504. > > Is this me doing wrong things, or the server getting stuck or?? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: ESR: Emulate Slide Rule > > > From commits at source.squeak.org Thu Jun 16 21:56:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 16 21:56:53 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160616215651.18391.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-June/068225.html Name: Graphics-mt.351 Ancestors: Graphics-lpc.350 Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore. ============================================= From eliot.miranda at gmail.com Thu Jun 16 22:11:09 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 16 22:11:12 2016 Subject: [squeak-dev] SqueakMap server stuck? In-Reply-To: References: Message-ID: Hi Chris, On Thu, Jun 16, 2016 at 2:34 PM, Chris Muller wrote: > Every time the SM model changes, it'll end up doing a resave of the SM > model to a serialized file within the next 5-minute period or so. > That save burdens the image so badly for a few minutes that it isn't > able to respond to other requests temporarily. > > (It runs using Goran's HTTPView web framework, still on an old > interpreter image because there are a couple of methods that exceed > the maximum length (or, was it # of literals?) allowed by cog images. > Neither of these are limits that are different in Cog VMs; they're limitations of the byte code set. Maybe something in the closure changes affected the image? I;m sure we could have this running on Cog and Spur with a little bit of work. Volunteers? > > After the model change, the next time you access it'll download that new > file. > > Wait a few minutes, then try again, it will work. > > > > On Thu, Jun 16, 2016 at 12:20 AM, tim Rowledge wrote: > > I?ve been trying to set up a coupe of packages and it isn?t working very > nicely right now. > > I uploaded to squeaksource ok and even (eventually) worked out how to > make first releases. I added two projects to my squeakmap account, and they > even appear in the in-image catalogue. But any attempt to get to the SM > ?edit releases? page just times out with a 504. > > > > Is this me doing wrong things, or the server getting stuck or?? > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > Strange OpCodes: ESR: Emulate Slide Rule > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160616/a9c4e66c/attachment.htm From tim at rowledge.org Thu Jun 16 23:11:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 16 23:12:01 2016 Subject: [squeak-dev] SqueakMap server stuck? In-Reply-To: References: Message-ID: > On 16-06-2016, at 2:34 PM, Chris Muller wrote: > > Every time the SM model changes, it'll end up doing a resave of the SM > model to a serialized file within the next 5-minute period or so. > That save burdens the image so badly for a few minutes that it isn't > able to respond to other requests temporarily. Hmm, ok. It didn?t *seem* like that was the sort of thing going on and indeed it was still unable to respond this morning. Once I had managed to use the in-image release creator ( a long and swear filled story) to make at least one release it would respond immediately. It?s been an awful long time since I created/saved/published anything on SM and if anything past familiarity got in the way more than helped. The create-release browser is more than slightly painful to use and the swiki pages purporting to explain it seem rather out of date and incomplete. Having to manually accept each and every pane?s data is ridiculous! It took some time to realise that I had to make an install script even for a single mcz file because of this lack of clarity. I?m pretty sure I never had to do anything like that with the VMMaker way back when. A live example of the simplest install script in the tool would be nice I think, something akin to the class template in the code browser. It would be nice if the whole process could be done within the image too, rather than (so far as I can tell, correct me if I?m wonrg) a bit on the webpage, a bit in the image, a bit in Sanskrit, etc. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: DPN: Double Precision No-op From commits at source.squeak.org Thu Jun 16 23:19:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 16 23:19:09 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1029.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1029.mcz ==================== Summary ==================== Name: Kernel-eem.1029 Author: eem Time: 16 June 2016, 4:17:52.232323 pm UUID: 118ce27e-414e-4a37-940d-ce167fa5afb7 Ancestors: Kernel-mt.1028 Supply missing simulation methods for the new Mutex primitives and hence render through on code like the following funcitonal again: Mutex new critical: [[Object new] on: Notification do: [:noti| ]] =============== Diff against Kernel-mt.1028 =============== Item was added: + ----- Method: Mutex>>primitiveEnterCriticalSectionOnBehalfOf: (in category 'system simulation') ----- + primitiveEnterCriticalSectionOnBehalfOf: effectiveProcess + "Primitive. Simulate primitiveEnterCriticalSection. The receiver + must be unowned or owned by the effectiveProcess to proceed. + Answer if the process is already owned by the current process." + + ^{ContextPart primitiveFailToken. nil}! Item was added: + ----- Method: Mutex>>primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf: (in category 'system simulation') ----- + primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf: effectiveProcess + "Primitive. Simulate primitiveEnterCriticalSection. Attempt to set the ownership + of the receiver. If the receiver is unowned set its owningProcess to the + effectiveProcess and answer false. If the receiver is owned by the effectiveProcess + answer true. If the receiver is owned by some other process answer nil." + + ^{ContextPart primitiveFailToken. nil}! From commits at source.squeak.org Fri Jun 17 00:13:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 17 00:14:01 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1030.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1030.mcz ==================== Summary ==================== Name: Kernel-eem.1030 Author: eem Time: 16 June 2016, 5:12:46.623829 pm UUID: 67cc43ba-8129-470e-b40f-36d8fc58dee7 Ancestors: Kernel-eem.1029 Fix simulation of the withArgs:executeMethod: and tryPrimitive:withArgs: primitives, as well as providing support for receiver:tryPrimitive:withArgs: when it is implemented. =============== Diff against Kernel-eem.1029 =============== Item was changed: ----- Method: ContextPart>>doPrimitive:method:receiver:args: (in category 'private') ----- + doPrimitive: primitiveIndex method: meth receiver: receiver args: arguments - doPrimitive: primitiveIndex method: meth receiver: receiver args: arguments "Simulate a primitive method whose index is primitiveIndex. The simulated receiver and arguments are given as arguments to this message. If successful, push result and return resuming context, else ^ {errCode, PrimitiveFailToken}. Any primitive which provokes execution needs to be intercepted and simulated to avoid execution running away." | value | "Judicious use of primitive 19 (a null primitive that doesn't do anything) prevents the debugger from entering various run-away activities such as spawning a new process, etc. Injudicious use results in the debugger not being able to debug interesting code, such as the debugger itself. hence use primitive 19 with care :-)" "SystemNavigation new browseAllSelect: [:m| m primitive = 19]" primitiveIndex = 19 ifTrue: [ToolSet debugContext: self label:'Code simulation error' contents: nil]. ((primitiveIndex between: 201 and: 222) and: [(self objectClass: receiver) includesBehavior: BlockClosure]) ifTrue: [((primitiveIndex between: 201 and: 205) "BlockClosure>>value[:value:...]" or: [primitiveIndex between: 221 and: 222]) ifTrue: "BlockClosure>>valueNoContextSwitch[:]" [^receiver simulateValueWithArguments: arguments caller: self]. primitiveIndex = 206 ifTrue: "BlockClosure>>valueWithArguments:" [^receiver simulateValueWithArguments: arguments first caller: self]]. primitiveIndex = 83 ifTrue: "afr 9/11/1998 19:50" "Object>>perform:[with:...]" [^self send: arguments first to: receiver with: arguments allButFirst super: false]. primitiveIndex = 84 ifTrue: "afr 9/11/1998 19:50 & eem 8/18/2009 17:04" "Object>>perform:withArguments:" [^self send: arguments first to: receiver with: (arguments at: 2) lookupIn: (self objectClass: receiver)]. primitiveIndex = 100 ifTrue: "eem 8/18/2009 16:57" "Object>>perform:withArguments:inSuperclass:" [^self send: arguments first to: receiver with: (arguments at: 2) lookupIn: (arguments at: 3)]. "Mutex>>primitiveEnterCriticalSection Mutex>>primitiveTestAndSetOwnershipOfCriticalSection" (primitiveIndex = 186 or: [primitiveIndex = 187]) ifTrue: + [| effective | + effective := Processor activeProcess effectiveProcess. - [| active effective | - active := Processor activeProcess. - effective := active effectiveProcess. "active == effective" value := primitiveIndex = 186 ifTrue: [receiver primitiveEnterCriticalSectionOnBehalfOf: effective] ifFalse: [receiver primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf: effective]. ^(self isPrimFailToken: value) ifTrue: [value] ifFalse: [self push: value]]. primitiveIndex = 188 ifTrue: "eem 5/27/2008 11:10 Object>>withArgs:executeMethod:" + [((self objectClass: (arguments at: 1)) == Array + and: [(self objectClass: (arguments at: 2)) includesBehavior: CompiledMethod]) ifFalse: + [^ContextPart primitiveFailTokenFor: #'bad argument']. + (arguments at: 2) numArgs = (arguments at: 1) size ifFalse: + [^ContextPart primitiveFailTokenFor: #'bad number of arguments']. + (arguments at: 2) primitive > 0 ifTrue: + [(arguments at: 2) isQuick ifTrue: + [^self push: (receiver withArgs: (arguments at: 1) executeMethod: (arguments at: 2))]. + ^self doPrimitive: (arguments at: 2) primitive method: (arguments at: 2) receiver: receiver args: (arguments at: 1)]. + ^MethodContext - [^MethodContext sender: self receiver: receiver method: (arguments at: 2) arguments: (arguments at: 1)]. "Closure primitives" (primitiveIndex = 200 and: [self == receiver]) ifTrue: "ContextPart>>closureCopy:copiedValues:; simulated to get startpc right" [^self push: (BlockClosure outerContext: receiver startpc: pc + 2 numArgs: arguments first copiedValues: arguments last)]. + primitiveIndex = 118 ifTrue: "[receiver:]tryPrimitive:withArgs:; avoid recursing in the VM" + [(arguments size = 3 + and: [(self objectClass: arguments second) == SmallInteger + and: [(self objectClass: arguments last) == Array]]) ifTrue: + [^self doPrimitive: arguments second method: meth receiver: arguments first args: arguments last]. + (arguments size = 2 + and: [(self objectClass: arguments first) == SmallInteger - primitiveIndex = 118 ifTrue: "tryPrimitive:withArgs:; avoid recursing in the VM" - [(arguments size = 2 - and: [arguments first isInteger and: [(self objectClass: arguments last) == Array]]) ifFalse: [^ContextPart primitiveFailTokenFor: nil]. ^self doPrimitive: arguments first method: meth receiver: receiver args: arguments last]. value := primitiveIndex = 120 "FFI method" ifTrue: [(meth literalAt: 1) tryInvokeWithArguments: arguments] ifFalse: [primitiveIndex = 117 "named primitives" ifTrue: [self tryNamedPrimitiveIn: meth for: receiver withArgs: arguments] + ifFalse: + ["should use self receiver: receiver tryPrimitive: primitiveIndex withArgs: arguments but this is only in later VMs" + receiver tryPrimitive: primitiveIndex withArgs: arguments]]. - ifFalse: [receiver tryPrimitive: primitiveIndex withArgs: arguments]]. ^(self isPrimFailToken: value) ifTrue: [value] ifFalse: [self push: value]! From tim at rowledge.org Fri Jun 17 00:22:25 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 00:22:13 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? Message-ID: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> I?ve got dizzy trying to dig through all the remote file and server directory and URI and Url andHttp* classes. Do we really have three completely different ways of handling files out on the web? What I need to do is access a zip file on a server, download it and save a directory of the constituent parts. The contained files are assorted gifs, jpegs, wav etc media files. Ideally I?d like to decode those without even saving the separate files and then re-loading them but let?s see if I can just get the data and unzip it first. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Why do we want intelligent terminals when there are so many stupid users? From tim at rowledge.org Fri Jun 17 00:41:11 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 00:40:59 2016 Subject: [squeak-dev] Re: Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> Message-ID: <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> > On 16-06-2016, at 5:22 PM, tim Rowledge wrote: > > What I need to do is access a zip file on a server, download it OK, that bit I can now do with ?http://foo.com/thingy.zip' asUrl retrieveContents, which even makes sense. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never test for an error condition you don't know how to handle. From tim at rowledge.org Fri Jun 17 01:03:13 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 01:03:02 2016 Subject: [squeak-dev] Re: Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> Message-ID: <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> > On 16-06-2016, at 5:41 PM, tim Rowledge wrote: > > >> On 16-06-2016, at 5:22 PM, tim Rowledge wrote: >> >> What I need to do is access a zip file on a server, download it > > OK, that bit I can now do with ?http://foo.com/thingy.zip' asUrl retrieveContents, which even makes sense. Except that any attempt to get a zip file from github, for example, fails because of some problem with unknown protocol. THat?s even after discovering that github wants 'https://github.com/foo/bar/master/thing.zip?raw=true' in order to actually see the data and not the damn page. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: DST: Deadlock System Tables From ma.chris.m at gmail.com Fri Jun 17 02:16:21 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Jun 17 02:17:04 2016 Subject: [squeak-dev] SqueakMap server stuck? In-Reply-To: References: Message-ID: Tim, the documentation is up-to-date. Nothing has changed in a few years since the renewal, it just basically works the same as it has. If you would provide more specific criticism about its failings then I would maybe be able address your concern, make an improvement... Here it is: http://wiki.squeak.org/squeak/6182 Scroll down to "Guidelines for writing the script for a fixed-configuration". This is "the simplest example" you want. Just copy, paste, change the names to your packages, delete the pre-req instruction. Done. You're a trunk committer, you're welcome to make the change to auto-accept all fields when the user presses the "Save" button... On Thu, Jun 16, 2016 at 6:11 PM, tim Rowledge wrote: > >> On 16-06-2016, at 2:34 PM, Chris Muller wrote: >> >> Every time the SM model changes, it'll end up doing a resave of the SM >> model to a serialized file within the next 5-minute period or so. >> That save burdens the image so badly for a few minutes that it isn't >> able to respond to other requests temporarily. > > Hmm, ok. It didn?t *seem* like that was the sort of thing going on and indeed it was still unable to respond this morning. Once I had managed to use the in-image release creator ( a long and swear filled story) to make at least one release it would respond immediately. > > It?s been an awful long time since I created/saved/published anything on SM and if anything past familiarity got in the way more than helped. > > The create-release browser is more than slightly painful to use and the swiki pages purporting to explain it seem rather out of date and incomplete. Having to manually accept each and every pane?s data is ridiculous! It took some time to realise that I had to make an install script even for a single mcz file because of this lack of clarity. I?m pretty sure I never had to do anything like that with the VMMaker way back when. A live example of the simplest install script in the tool would be nice I think, something akin to the class template in the code browser. > > It would be nice if the whole process could be done within the image too, rather than (so far as I can tell, correct me if I?m wonrg) a bit on the webpage, a bit in the image, a bit in Sanskrit, etc. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: DPN: Double Precision No-op > > From Marcel.Taeumel at hpi.de Fri Jun 17 06:27:43 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 07:07:17 2016 Subject: [squeak-dev] Re: The Trunk: Kernel-eem.1029.mcz In-Reply-To: References: Message-ID: <1466144863540-4901302.post@n4.nabble.com> Yay! Thanks! +1 Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Kernel-eem-1029-mcz-tp4901278p4901302.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Fri Jun 17 07:11:27 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Jun 17 07:11:31 2016 Subject: [squeak-dev] Re: Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> Message-ID: <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> On 17.06.2016, at 03:03, tim Rowledge wrote: >> On 16-06-2016, at 5:41 PM, tim Rowledge wrote: >> >> >>> On 16-06-2016, at 5:22 PM, tim Rowledge wrote: >>> >>> What I need to do is access a zip file on a server, download it >> >> OK, that bit I can now do with ?http://foo.com/thingy.zip' asUrl retrieveContents, which even makes sense. > > Except that any attempt to get a zip file from github, for example, fails because of some problem with unknown protocol. THat?s even after discovering that github wants 'https://github.com/foo/bar/master/thing.zip?raw=true' in order to actually see the data and not the damn page. > Or even: https://raw.githubusercontent.com/foo/bar/master/thing.zip Best -Tobias > tim From timfelgentreff at gmail.com Fri Jun 17 07:18:02 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Jun 17 07:18:26 2016 Subject: [squeak-dev] Re: [Pharo-dev] [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Laura, we will update the README to carify this, but yes, the Github workflow of forking and submitting pull requests should be preferred. The CI will test all changes, we can discuss on the pull requests and so on. People who continue to contribute will eventually be promoted to core contributors so they can work on the main repository, but the nice thing is that the workflow on Github with forks isn't actually very different either :) cheers, Tim On 16 June 2016 at 19:37, Eliot Miranda wrote: > Hi Laura, Hi Tim, > > On Thu, Jun 16, 2016 at 10:09 AM, Laura Perez Cerrato > wrote: >> >> >> Hi everyone, >> >> First of all, thanks a lot! >> >> Meaning to ask the same question as Serge, what's the preferred way of >> collaborating for anyone who's not a contributor? forking and then >> submitting a pull request? > > > thats on you, Tim, and I to update the README.md with a description of the > contributor and change staging process. I'm going to be checking out the > repository for the first time in a few minutes. I guess we can bat aroun > drafts between us using git itself, but perhaps email would be more sensible > ;-) > > >> >> >> Cheers! >> >> -Laura Perez Cerrato >> >> On 16 June 2016 at 06:10, Serge Stinckwich >> wrote: >>> >>> >>> On Thu, Jun 16, 2016 at 9:24 AM, Tim Felgentreff >>> wrote: >>> > Hi all, >>> >>> Very impressive work, Tim&Fabio ! The power of full-automation ! >>> >>> > as of 7:30 UTC the entire history of the SVN up to SVN revision 3745 >>> > was >>> > migrated to GitHub. Automatic builds are running >>> > (https://ci.appveyor.com/project/timfel/vm/branch/Cog, >>> > https://travis-ci.org/OpenSmalltalk/vm) and binary artifacts are >>> > uploaded >>> > (https://bintray.com/opensmalltalk/vm/cog/_latestVersion#files). >>> >>> About uploading binary artifacts, this is something I asked and this >>> nice that Fabio >>> make it work :-) >>> >>> Apparently there is some problems with some artifacts that have a >>> double .zip extension. >>> >>> > Right now we have enabled all platform, object memory and bytecode set >>> > combinations that I found build scripts for - most work, but OS X >>> > 64-bit >>> > Sista is failing right now (32-bit works). At some point we'll have to >>> > decide which combinations to put into the CI config as "allowed >>> > failures" to >>> > get a green badge :) >>> > >>> > Another thing for those not familiar with Git: Right now the entire >>> > repository is 360MB, including all history. Most of that is old images >>> > that >>> > were at one point committed to SVN and that have been pulled into the >>> > repository. We could clean those out (removing them from the history) >>> > to >>> > make the repository smaller, but I felt ~400MB is still ok (albeit >>> > technically over the Github quota. We'll see of they complain). I would >>> > like >>> > to ask everyone to stop committing large binary files into the >>> > repository, >>> > however. Git is simply not very suited to dealing with binaries. If >>> > there is >>> > a need for that, Github has support for git-lfs, which offers 1GB of >>> > free >>> > storage with a 1GB bandwith limit per month. If we need more, we can >>> > look at >>> > the different billing levels. >>> > >>> > If you're familiar with Git, the only new thing to watch out for is the >>> > updateSCSSVersions script as described in the README. It's not relevant >>> > for >>> > the CI, but your own binaries will only show correct versions if this >>> > script >>> > runs at appropriate times. >>> > >>> > If you are not familiar with Git and don't care, there are scripts for >>> > committing that should take care of everything as described in the >>> > README. >>> > Again, let us know if anything doesn't work. The only difference vs SVN >>> > to >>> > watch out for for you will be that the old scripts/svnci would commit >>> > your >>> > changes to the server, whereas the scripts/gitci script only commits >>> > them >>> > locally. You'll have to run `git pull` and `git push` to get them up to >>> > the >>> > server. >>> > >>> > If you have any questions regarding the repository setup please don't >>> > hesitate to ask. You shouldn't be able to break anything, since we've >>> > disabled force pushes to both master and Cog (and thus any chance of >>> > destroying history). >>> >>> What is favorite way of contributing for people outside the vm team ? >>> pull-requests ? >>> >>> Regards, >>> -- >>> Serge Stinckwich >>> UCBN & UMI UMMISCO 209 (IRD/UPMC) >>> Every DSL ends up being Smalltalk >>> http://www.doesnotunderstand.org/ >> >> >> > > > > -- > _,,,^..^,,,_ > best, Eliot From timfelgentreff at gmail.com Fri Jun 17 07:22:00 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Jun 17 07:22:23 2016 Subject: [squeak-dev] Unambiguously differentiating official and local builds [Was [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC] In-Reply-To: References: Message-ID: Hi Eliot, how secure does this need to be? One way to differentiate the official VMs is to sign them directly on Travis (which we'll want to do anyway, just didn't get to it, yet). Another option is to just change the URL replacement code to do something else when not running on Travis --- like adding your hostname and path instead --- but this could be fairly easily messed with. Not sure how much malicious intent we want to prevent. cheers, Tim On 16 June 2016 at 22:07, Eliot Miranda wrote: > Hi All, > > so after fixing "git remote get-url origin" to fail over to "git remote > show origin | filter and munge" the culture shock of "git commit -a" (git > commit does nothing ?!?!?) I have a VM that outputs a reasonable version > info: > > /Users/eliot/oscogvm/build.macos32x86/squeak.cog.spur/CocoaFast.app/Contents/MacOS/Squeak > 5.0 5.0.201606161953 Mac OS X built on Jun 16 2016 12:56:52 PDT Compiler: > 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57) [Production Spur VM] > CoInterpreter VMMaker.oscog-eem.1886 uuid: > d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016 > StackToRegisterMappingCogit VMMaker.oscog-eem.1886 uuid: > d413db9f-37cc-4c5d-bfc6-87b11203ee96 Jun 16 2016 > VM: r201606161953 http://github.com/OpenSmalltalk/vm $ Date: Thu Jun 16 > 12:53:33 2016 -0700 $ > Plugins: r201606161953 http://github.com/OpenSmalltalk/vm $ > > Which begs the question how do I differentiate this from something built > officially via Travis? Arguably the URL is wrong, and should only say > "http://github.com/OpenSmalltalk/vm" for travis builds, and perhaps should > just include my local hostname and current directory when I make any kind of > local modification. So the above would read > > ... > VM: r201606161953 McStalker:?users/eliot/oscogvm $ Date: Thu Jun 16 12:53:33 > 2016 -0700 $ > Plugins: r201606161953 McStalker:?users/eliot/oscogvm $ > > Alternatively we could add another field, or modify one of the existing > fields to say "I'm official" however one would do that. I don't know how, I > just know we need this. I shouldn't be able to pollute the VM pool by > putting some VM on some site somewhere that i just happened to build after > several sherries and some cannabis brownies that looks to all intents and > purposes just like a VM built by our official Travis slaves. Hic. Chillin' > > _,,,^..^,,,_ > best, Eliot > > > From karlramberg at gmail.com Fri Jun 17 13:15:18 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Jun 17 13:15:21 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> Message-ID: With projects you can do this in the etoys image. No need really for any files other than the project/ image segment. But getting the projects/ image segments to to work in a trunk image could be tricky ;-) Best, Karl On Fri, Jun 17, 2016 at 2:22 AM, tim Rowledge wrote: > I?ve got dizzy trying to dig through all the remote file and server > directory and URI and Url andHttp* classes. Do we really have three > completely different ways of handling files out on the web? > > What I need to do is access a zip file on a server, download it and save a > directory of the constituent parts. The contained files are assorted gifs, > jpegs, wav etc media files. Ideally I?d like to decode those without even > saving the separate files and then re-loading them but let?s see if I can > just get the data and unzip it first. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Why do we want intelligent terminals when there are so many stupid users? > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/03499290/attachment.htm From karlramberg at gmail.com Fri Jun 17 13:22:52 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri Jun 17 13:22:59 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Will Win x64 VM be built also ? Best, Karl On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda wrote: > > Hi all, > > we are all finished importing the VM repository to Github, migrating the > scripts, and setting up automatic builds and hosting of binaries. We > want to switch over from SVN tomorrow morning at 7am UTC. At that point, > Tim and Fabio will merge any remaining commits on the SVN repository between > now and that time and any further development will take place on Github. > If possible, you may refrain from committing to SVN, as this will mean > less work for Tim and Fabio. > > The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch > is the new default branch and is still called Cog, this is the main focus > of development. The old trunk branch has been renamed to "oldTrunk". The > master branch will track the Cog branch and will be the repository > integrated into for releases. > > To get started, please refer to the updated README > that is shown on the > Github page. > > _,,,^..^,,,_ > best, Eliot, Tim & Fabio > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/798bb10e/attachment.htm From eliot.miranda at gmail.com Fri Jun 17 14:17:53 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 17 14:17:59 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Karl, > On Jun 17, 2016, at 6:22 AM, karl ramberg wrote: > > Will Win x64 VM be built also ? Not yet. No one has done the work to produce this. And because Microsoft in their infinite wisdom have chosen to make sizeof(long) = 4 in their 64-bit model, not 8 as everyone else has, means that we will have significant problems generating sources that will work. > Best, > Karl > >> On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda wrote: >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the scripts, and setting up automatic builds and hosting of binaries. We want to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and Fabio will merge any remaining commits on the SVN repository between now and that time and any further development will take place on Github. If possible, you may refrain from committing to SVN, as this will mean less work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog branch is the new default branch and is still called Cog, this is the main focus of development. The old trunk branch has been renamed to "oldTrunk". The master branch will track the Cog branch and will be the repository integrated into for releases. >> >> To get started, please refer to the updated README that is shown on the Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/c7336bba/attachment.htm From timfelgentreff at gmail.com Fri Jun 17 14:59:59 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Jun 17 15:00:24 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Karl, As soon as there is a build script for one, yes :) cheers, Tim On 17 June 2016 at 15:22, karl ramberg wrote: > Will Win x64 VM be built also ? > > Best, > Karl > > On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda > wrote: >> >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the >> scripts, and setting up automatic builds and hosting of binaries. We want >> to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and >> Fabio will merge any remaining commits on the SVN repository between now and >> that time and any further development will take place on Github. If >> possible, you may refrain from committing to SVN, as this will mean less >> work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog >> branch is the new default branch and is still called Cog, this is the main >> focus of development. The old trunk branch has been renamed to "oldTrunk". >> The master branch will track the Cog branch and will be the repository >> integrated into for releases. >> >> To get started, please refer to the updated README that is shown on the >> Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio >> > > > > From timfelgentreff at gmail.com Fri Jun 17 15:01:30 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Jun 17 15:01:53 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Eliot, it's funny that this problem seems to bite other VMs, too :) PyPy and RSqueak have the same issue. On 17 June 2016 at 16:17, Eliot Miranda wrote: > Hi Karl, > > > On Jun 17, 2016, at 6:22 AM, karl ramberg wrote: > > Will Win x64 VM be built also ? > > > Not yet. No one has done the work to produce this. And because Microsoft > in their infinite wisdom have chosen to make sizeof(long) = 4 in their > 64-bit model, not 8 as everyone else has, means that we will have > significant problems generating sources that will work. > > Best, > Karl > > On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda > wrote: >> >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the >> scripts, and setting up automatic builds and hosting of binaries. We want >> to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and >> Fabio will merge any remaining commits on the SVN repository between now and >> that time and any further development will take place on Github. If >> possible, you may refrain from committing to SVN, as this will mean less >> work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog >> branch is the new default branch and is still called Cog, this is the main >> focus of development. The old trunk branch has been renamed to "oldTrunk". >> The master branch will track the Cog branch and will be the repository >> integrated into for releases. >> >> To get started, please refer to the updated README that is shown on the >> Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio >> > > > > > From btc at openinworld.com Fri Jun 17 15:59:12 2016 From: btc at openinworld.com (Ben Coman) Date: Fri Jun 17 15:59:35 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: > On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda > wrote: >> >> >> Hi all, >> >> we are all finished importing the VM repository to Github, migrating the >> scripts, and setting up automatic builds and hosting of binaries. We want >> to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim and >> Fabio will merge any remaining commits on the SVN repository between now and >> that time and any further development will take place on Github. If >> possible, you may refrain from committing to SVN, as this will mean less >> work for Tim and Fabio. >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog >> branch is the new default branch and is still called Cog, this is the main >> focus of development. The old trunk branch has been renamed to "oldTrunk". >> The master branch will track the Cog branch and will be the repository >> integrated into for releases. >> >> To get started, please refer to the updated README that is shown on the >> Github page. >> >> _,,,^..^,,,_ >> best, Eliot, Tim & Fabio > On Jun 17, 2016, at 6:22 AM, karl ramberg wrote: > Will Win x64 VM be built also ? On Fri, Jun 17, 2016 at 10:17 PM, Eliot Miranda wrote: > Hi Karl, > Not yet. No one has done the work to produce this. And because Microsoft > in their infinite wisdom have chosen to make sizeof(long) = 4 in their > 64-bit model, not 8 as everyone else has, means that we will have > significant problems generating sources that will work. Hi Karl, In the meantime, though highly experimental and likely to fail, maybe you'd like to try a Linux x86 VM for Unbuntu On Windows... https://msdn.microsoft.com/en-au/commandline/wsl/about Running GUI apps.. http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html Some benchmarks... http://www.phoronix.com/scan.php?page=article&item=windows-10-lxcore&num=1 cheers -ben From leves at caesar.elte.hu Fri Jun 17 15:59:33 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Fri Jun 17 15:59:41 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.351.mcz In-Reply-To: References: Message-ID: Hi Marcel, I suppose this change has broken all StrikeFonts other than Bitmap DejaVu Sans. Levente On Thu, 16 Jun 2016, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-mt.351.mcz > > ==================== Summary ==================== > > Name: Graphics-mt.351 > Author: mt > Time: 16 June 2016, 1:56:13.140696 pm > UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8 > Ancestors: Graphics-lpc.350 > > Removes manual kerning corrections for the 7-point DejaVu Sans, which are not necessary anymore. > > =============== Diff against Graphics-lpc.350 =============== > > Item was changed: > ----- Method: StrikeFont>>ascentKern (in category 'accessing') ----- > ascentKern > "Return the kern delta for ascenders." > + > + self depth > 1 ifTrue: [^ 0]. > + > + "Optimization for traditional 1-bit fonts." > + ^ (emphasis allMask: 2) > + ifFalse: [0] > + ifTrue: [(self ascent-5+4)//4 max: 0] "See makeItalicGlyphs" > - (emphasis noMask: 2) ifTrue: [^ 0]. > - ^ (self ascent-5+4)//4 max: 0 "See makeItalicGlyphs" > > ! > > Item was changed: > ----- Method: StrikeFont>>baseKern (in category 'accessing') ----- > baseKern > "Return the base kern value to be used for all characters." > > + self depth > 1 ifTrue: [^ 0]. > - | italic | > - italic := emphasis allMask: 2. > > + "Optimization for traditional 1-bit fonts." > + ^ (emphasis allMask: 2) > + ifFalse: [0] > + ifTrue: [((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" > + + (((self ascent-5+4)//4 max: 0))]! > - glyphs depth > 1 ifTrue: [ > - ^(italic or: [ pointSize < 9 ]) > - ifTrue: [ 1 ] > - ifFalse: [ 0] ]. > - > - italic ifFalse: [^ 0]. > - ^ ((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" > - + (((self ascent-5+4)//4 max: 0))! > > Item was changed: > ----- Method: StrikeFont>>descentKern (in category 'accessing') ----- > descentKern > "Return the kern delta for descenders." > - (emphasis noMask: 2) ifTrue: [^ 0]. > - ^ (self height-1-self ascent+4)//4 max: 0 "See makeItalicGlyphs" > > + self depth > 1 ifTrue: [^ 0]. > + > + "Optimization for traditional 1-bit fonts." > + ^ (emphasis allMask: 2) > + ifFalse: [0] > + ifTrue: [(self height-1-self ascent+4)//4 max: 0] "See makeItalicGlyphs" > + > ! > > > From tim at rowledge.org Fri Jun 17 17:23:50 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 17:23:38 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> Message-ID: <7679DEDF-2B5E-4049-A5C3-1402A8E56771@rowledge.org> > On 17-06-2016, at 6:15 AM, karl ramberg wrote: > > With projects you can do this in the etoys image. No need really for any files other than the project/ image segment. But getting the projects/ image segments to to work in a trunk image could be tricky ;-) In many ways I?d love to use an image segment, especially if there is a way to include one on squeaksource etc. However, the best route - I think - it to download the zip file provided by a third party and either save it to local storage, unzip it and read in, or directly split it in-image and save trying to write local. That would save any worries about permissions. I may be over-thinking this I suppose. Perhaps the simplest answer is to make sure the initialisation code is ok with *not* having those files there and make sure to warn the user to fetch them, unzip, and run some method to load up? I do like the idea of magically doing it though... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim 29A, the hexadecimal of the Beast. From tim at rowledge.org Fri Jun 17 17:54:19 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 17:54:07 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> Message-ID: <5DFB821A-B7BF-4BB3-8BEC-4303B48285DA@rowledge.org> > On 17-06-2016, at 12:11 AM, Tobias Pape wrote: > > https://raw.githubusercontent.com/foo/bar/master/thing.zip That works better, thanks. It also helps if you have the ssl plugin working, as I discovered while trying this out on my iMac instead of the Pi. So that means I have to see if it even gets built on a Pi? So far (just for the record) this is showing promise - fetch the data with 'https://raw.githubusercontent.com/user/repo/branch/myimportant.zip' asUrl retrieveContents then extract with UIManager default informUserDuring: [:bar| (ZipArchive new readFrom: (ReadStream on: content asByteArray)) extractAllTo: (FileDirectory default) informing: bar]. where ?content? is the content from the MIMEDocument you get back. The files are all extracted ok. Next step is to see how I can ?load? each file more directly. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: PSM: Print and SMear From tim at rowledge.org Fri Jun 17 18:49:05 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 18:48:53 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <5DFB821A-B7BF-4BB3-8BEC-4303B48285DA@rowledge.org> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> <5DFB821A-B7BF-4BB3-8BEC-4303B48285DA@rowledge.org> Message-ID: > On 17-06-2016, at 10:54 AM, tim Rowledge wrote: > > > That works better, thanks. It also helps if you have the ssl plugin working, as I discovered while trying this out on my iMac instead of the Pi. So that means I have to see if it even gets built on a Pi? Looks like the ssl plugin is indeed built and used on my Pi but fails somehow. The ssl tests all claim to succeed though. The error is reported in the stdout stream as 1996092684:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795: It appears to be a fairly common issue in some manner (quite a lot of google results) but I have no experience at all with ssl and so on. Can?t find any of the plausible looking words in the vm sources so far. That?s going to make it interesting to try catching in gdb. Oh, and actually I see Chris M reported the same error last July so at least it?s nothing I?ve recently caused... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim .signature not found! reformat hard drive? [Yn] From commits at source.squeak.org Fri Jun 17 19:00:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 17 19:00:46 2016 Subject: [squeak-dev] The Trunk: WebClient-Core-topa.101.mcz Message-ID: Tobias Pape uploaded a new version of WebClient-Core to project The Trunk: http://source.squeak.org/trunk/WebClient-Core-topa.101.mcz ==================== Summary ==================== Name: WebClient-Core-topa.101 Author: topa Time: 17 June 2016, 9:00:40.215483 pm UUID: 97088e21-0ce9-4029-be2c-4e82d0f0050a Ancestors: WebClient-Core-ul.100 Only close streams that are still connected. =============== Diff against WebClient-Core-ul.100 =============== Item was changed: ----- Method: WebClient>>close (in category 'initialize') ----- close "Close the client's stream" stream ifNotNil:[ + stream isConnected ifTrue: [stream close]. + stream := nil]. - stream close. - stream := nil. - ]. ! From Das.Linux at gmx.de Fri Jun 17 19:03:07 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Jun 17 19:03:10 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> <5DFB821A-B7BF-4BB3-8BEC-4303B48285DA@rowledge.org> Message-ID: <84F2C89B-EADC-48F2-BBBE-3947F0B0C7F6@gmx.de> On 17.06.2016, at 20:49, tim Rowledge wrote: >> On 17-06-2016, at 10:54 AM, tim Rowledge wrote: >> >> >> That works better, thanks. It also helps if you have the ssl plugin working, as I discovered while trying this out on my iMac instead of the Pi. So that means I have to see if it even gets built on a Pi? > > Looks like the ssl plugin is indeed built and used on my Pi but fails somehow. The ssl tests all claim to succeed though. > > The error is reported in the stdout stream as > 1996092684:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:795: > > It appears to be a fairly common issue in some manner (quite a lot of google results) but I have no experience at all with ssl and so on. Can?t find any of the plausible looking words in the vm sources so far. That?s going to make it interesting to try catching in gdb. > > Oh, and actually I see Chris M reported the same error last July so at least it?s nothing I?ve recently caused... Mea culpa, maybe. The State of SqueakSSL is not satisfying but in the last month I hadn't had enough time on my hand to delve in to the pit that Proper SSL is (hint: it's a mess). I had prepared SqueakSSL binaries for Linux[1] that are linked statically agains LibreSSL (To avoid the Linux equivalent of DLL hell: different .so-names for RedHat/Centos and Debian-based systems). There, the SSL23_GET_SERVER_HELLO:unknown protocol: error does not show. Alas, these are x86 (32bit) only, yet, and integrating this thing into the main vm generation process posed as hard for me. I'll tackle that again. Also, there are 2..3 bugs in WebClient[2] and the image-Part of SqueakSSL. Also, verification only really works on Windows. Please keep poking me. Best regards -Tobias [1]: https://github.com/squeak-smalltalk/squeakssl/releases [2]: One is fixed in WebClient-topa.101 From tim at rowledge.org Fri Jun 17 20:10:42 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 17 20:10:31 2016 Subject: [squeak-dev] Fetch zip file from web, unzip, save constituent parts? In-Reply-To: <84F2C89B-EADC-48F2-BBBE-3947F0B0C7F6@gmx.de> References: <9C6B5F71-5666-42D2-8304-12D890196E19@rowledge.org> <2F17247B-C26D-484E-AA57-6F266F3EDEBE@rowledge.org> <3CD87A72-5FC4-4F1A-B5B6-BD7755360A05@rowledge.org> <1E014972-2707-4569-B95E-FDC5F43600C7@gmx.de> <5DFB821A-B7BF-4BB3-8BEC-4303B48285DA@rowledge.org> <84F2C89B-EADC-48F2-BBBE-3947F0B0C7F6@gmx.de> Message-ID: <309F7F22-6846-47BF-8425-F6E19795EC41@rowledge.org> > On 17-06-2016, at 12:03 PM, Tobias Pape wrote: > > The State of SqueakSSL is not satisfying but in the last month I hadn't > had enough time on my hand to delve in to the pit that Proper SSL is (hint: it's a mess). I wouldn?t know enough to be able to tell :-) Since Raspbian is based on Debian it is possible that the ssl libraries are older and may lack bugfixes? The good news is that the mac version is fine so the basics of the code clearly get it mostly right. For now I think I?ll have to go with alerting the user when attempting to load my package and get them to manually download & unzip the relevant files. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Permanently out to lunch. From eliot.miranda at gmail.com Fri Jun 17 20:14:55 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 17 20:14:59 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: <20160613215709.27655.qmail@box4.squeak.org> References: <20160613215709.27655.qmail@box4.squeak.org> Message-ID: Hi Tobias, is there any chance of a 10 point font, especially for code? I find the 9 point a little painful for my eyes but find the 12 point font way too big. On Mon, Jun 13, 2016 at 2:57 PM, wrote: > Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 > hours: > > http://lists.squeakfoundation.org/pipermail/packages/2016-June/068212.html > > Name: Graphics-topa.346 > Ancestors: Graphics-topa.345 > > DejaVu rendering: Improve v-fuzz by ensuring integral virtual font heights. > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2016-June/068213.html > > Name: Graphics-topa.347 > Ancestors: Graphics-topa.346 > > (Oops. Use 30% smaller PNGs) > > ============================================= > > http://lists.squeakfoundation.org/pipermail/packages/2016-June/068214.html > > Name: Graphics-topa.348 > Ancestors: Graphics-topa.347 > > Very Small fonts do no longer need descender adjustment > > ============================================= > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/96f63a35/attachment.htm From eliot.miranda at gmail.com Fri Jun 17 20:15:29 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 17 20:15:34 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: References: <20160613215709.27655.qmail@box4.squeak.org> Message-ID: On Fri, Jun 17, 2016 at 1:14 PM, Eliot Miranda wrote: > Hi Tobias, > > is there any chance of a 10 point font, especially for code? I find > the 9 point a little painful for my eyes but find the 12 point font way too > big. > And BTW, the new font/font rendering looks great! Thanks. > > On Mon, Jun 13, 2016 at 2:57 PM, wrote: > >> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 >> hours: >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068212.html >> >> Name: Graphics-topa.346 >> Ancestors: Graphics-topa.345 >> >> DejaVu rendering: Improve v-fuzz by ensuring integral virtual font >> heights. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068213.html >> >> Name: Graphics-topa.347 >> Ancestors: Graphics-topa.346 >> >> (Oops. Use 30% smaller PNGs) >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068214.html >> >> Name: Graphics-topa.348 >> Ancestors: Graphics-topa.347 >> >> Very Small fonts do no longer need descender adjustment >> >> ============================================= >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/a66157a1/attachment.htm From eliot.miranda at gmail.com Fri Jun 17 20:49:32 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 17 20:49:35 2016 Subject: [squeak-dev] 64-bit bug(s) Message-ID: Hi Timothy, Hi All, I know some people have seen UI bugs with the 64-bit VM and image. This is just to report that I see one very obvious bug. In a recent messages browser on 64-bits any attempt to select a method other than the first in the list works, but immediately the selection reverts to the first element in the list. I suspect something in the event chain. But it's nice to have an obvious bug to chase instead of the much harder visual bugs people have been reporting up until now. Hopefully the same root cause will account for both bugs. Fingers crossed. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/0607e7d8/attachment.htm From eliot.miranda at gmail.com Fri Jun 17 21:01:05 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 17 21:01:09 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: References: <20160613215709.27655.qmail@box4.squeak.org> Message-ID: On Fri, Jun 17, 2016 at 1:15 PM, Eliot Miranda wrote: > > > On Fri, Jun 17, 2016 at 1:14 PM, Eliot Miranda > wrote: > >> Hi Tobias, >> >> is there any chance of a 10 point font, especially for code? I find >> the 9 point a little painful for my eyes but find the 12 point font way too >> big. >> > > And BTW, the new font/font rendering looks great! Thanks. > Except that the tab width doesn't scale with font size. IMO it must ;-) A tab in a Smalltalk code font should always have a width of about 4 spaces. With the current system I presume it will be the same width as a space in a sufficiently large font. > > >> >> On Mon, Jun 13, 2016 at 2:57 PM, wrote: >> >>> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 >>> hours: >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068212.html >>> >>> Name: Graphics-topa.346 >>> Ancestors: Graphics-topa.345 >>> >>> DejaVu rendering: Improve v-fuzz by ensuring integral virtual font >>> heights. >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068213.html >>> >>> Name: Graphics-topa.347 >>> Ancestors: Graphics-topa.346 >>> >>> (Oops. Use 30% smaller PNGs) >>> >>> ============================================= >>> >>> >>> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068214.html >>> >>> Name: Graphics-topa.348 >>> Ancestors: Graphics-topa.347 >>> >>> Very Small fonts do no longer need descender adjustment >>> >>> ============================================= >>> >>> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot >> > > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/5ba945a6/attachment.htm From gettimothy at zoho.com Fri Jun 17 21:04:45 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri Jun 17 21:04:51 2016 Subject: [squeak-dev] 64-bit bug(s) In-Reply-To: References: Message-ID: <155602e293f.da9f9beb1377.2601467184095460221@zoho.com> Hi Eliot. First thank you, thank you, thank you, for making my dream of developing on Squeak on a 64x64 bit system a reality. The UI bug I had was from a custom-compiled VM. The cause was a rectangle such as 1@1 evaluating to random reals 1@1 inspect => 0.79@0.02 (exagerated for effect) The effect was a "Modern Art" layout manager with no recognizable perspective and a refusal to abide by the norms of established practice. Picasso-ish. When I upgraded to a pre-built VM from your site, the "fun rectangles" went away and where replaced with the "predictable rectangles" we programmer types like to depend on. cheers, tty ---- On Fri, 17 Jun 2016 16:49:32 -0400 Eliot Miranda<eliot.miranda@gmail.com> wrote ---- Hi Timothy, Hi All, I know some people have seen UI bugs with the 64-bit VM and image. This is just to report that I see one very obvious bug. In a recent messages browser on 64-bits any attempt to select a method other than the first in the list works, but immediately the selection reverts to the first element in the list. I suspect something in the event chain. But it's nice to have an obvious bug to chase instead of the much harder visual bugs people have been reporting up until now. Hopefully the same root cause will account for both bugs. Fingers crossed. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/1b7eb8be/attachment.htm From Marcel.Taeumel at hpi.de Fri Jun 17 20:53:53 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 21:33:31 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.351.mcz In-Reply-To: References: Message-ID: <1466196833144-4901561.post@n4.nabble.com> Levente Uzonyi wrote > Hi Marcel, > > I suppose this change has broken all StrikeFonts other than Bitmap DejaVu > Sans. > > Levente > > On Thu, 16 Jun 2016, > commits@.squeak > wrote: > >> Marcel Taeumel uploaded a new version of Graphics to project The Trunk: >> http://source.squeak.org/trunk/Graphics-mt.351.mcz >> >> ==================== Summary ==================== >> >> Name: Graphics-mt.351 >> Author: mt >> Time: 16 June 2016, 1:56:13.140696 pm >> UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8 >> Ancestors: Graphics-lpc.350 >> >> Removes manual kerning corrections for the 7-point DejaVu Sans, which are >> not necessary anymore. >> >> =============== Diff against Graphics-lpc.350 =============== >> >> Item was changed: >> ----- Method: StrikeFont>>ascentKern (in category 'accessing') ----- >> ascentKern >> "Return the kern delta for ascenders." >> + >> + self depth > 1 ifTrue: [^ 0]. >> + >> + "Optimization for traditional 1-bit fonts." >> + ^ (emphasis allMask: 2) >> + ifFalse: [0] >> + ifTrue: [(self ascent-5+4)//4 max: 0] "See makeItalicGlyphs" >> - (emphasis noMask: 2) ifTrue: [^ 0]. >> - ^ (self ascent-5+4)//4 max: 0 "See makeItalicGlyphs" >> >> ! >> >> Item was changed: >> ----- Method: StrikeFont>>baseKern (in category 'accessing') ----- >> baseKern >> "Return the base kern value to be used for all characters." >> >> + self depth > 1 ifTrue: [^ 0]. >> - | italic | >> - italic := emphasis allMask: 2. >> >> + "Optimization for traditional 1-bit fonts." >> + ^ (emphasis allMask: 2) >> + ifFalse: [0] >> + ifTrue: [((self height-1-self ascent+4)//4 max: 0) "See >> makeItalicGlyphs" >> + + (((self ascent-5+4)//4 max: 0))]! >> - glyphs depth > 1 ifTrue: [ >> - ^(italic or: [ pointSize < 9 ]) >> - ifTrue: [ 1 ] >> - ifFalse: [ 0] ]. >> - >> - italic ifFalse: [^ 0]. >> - ^ ((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" >> - + (((self ascent-5+4)//4 max: 0))! >> >> Item was changed: >> ----- Method: StrikeFont>>descentKern (in category 'accessing') ----- >> descentKern >> "Return the kern delta for descenders." >> - (emphasis noMask: 2) ifTrue: [^ 0]. >> - ^ (self height-1-self ascent+4)//4 max: 0 "See makeItalicGlyphs" >> >> + self depth > 1 ifTrue: [^ 0]. >> + >> + "Optimization for traditional 1-bit fonts." >> + ^ (emphasis allMask: 2) >> + ifFalse: [0] >> + ifTrue: [(self height-1-self ascent+4)//4 max: 0] "See >> makeItalicGlyphs" >> + >> ! >> >> >> Hi Levente, no, not at all. :) The interesting thing was that the only <9-point font (i.e. 7 point) there that had glyphs with more than 1-bit depth was the pre-rendered DejaVu Sans. It was an optimization that Juan put in for it, I guess. Or are you referring to the way our Font Importer Tools is rendering fonts? That tool imports the point sizes 9 12 15 24 36 -- so, no "< 9" either. However, you are, right. If you modify TTCFont class >> pointSizes to also import fonts <9 points, the glyphs look too close together. Still, currently, there are no broken fonts: Accuat #(18 ) Accujen #(9 10 12 14 18 24 ) Accula #(12 24 ) Accumon #(9 10 12 ) Accuny #(9 10 12 14 18 24 ) Accusf #(18 ) Accushi #(12 ) Accuve #(12 14 ) Atlanta #(11 22 ) Bitmap DejaVu Sans #(7 9 12 14 17 20 ) BitstreamVeraSans #(9 12 13 15 24 36 ) BitstreamVeraSansMono #(9 12 15 24 36 ) BitstreamVeraSerif #(9 12 15 18 24 36 ) ComicSansMS #(6 9 11 17 26 ) Darkmap DejaVu Sans #(7 9 12 14 17 20 ) DefaultFixedTextStyle #(11 22 ) DefaultMultiStyle #(9 10 12 14 18 24 ) DefaultTextStyle #(7 9 12 14 17 20 ) Anyway, the right step would be to fix the glyph creation like Tobias did generate glyphs for the 7pt Deja Vu Sans with correct widths. That general kerning correction in StrikeFont was not a good idea. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Graphics-mt-351-mcz-tp4901175p4901561.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 17 20:56:23 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 21:36:00 2016 Subject: [squeak-dev] Re: 64-bit bug(s) In-Reply-To: References: Message-ID: <1466196983063-4901564.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi Timothy, Hi All, > > I know some people have seen UI bugs with the 64-bit VM and image. > This is just to report that I see one very obvious bug. In a recent > messages browser on 64-bits any attempt to select a method other than the > first in the list works, but immediately the selection reverts to the > first > element in the list. I suspect something in the event chain. But it's > nice to have an obvious bug to chase instead of the much harder visual > bugs > people have been reporting up until now. Hopefully the same root cause > will > account for both bugs. Fingers crossed. > > _,,,^..^,,,_ > best, Eliot Hi Eliot, once we have a 64-bit VM for Windows, I can help. :) Best, Marcel -- View this message in context: http://forum.world.st/64-bit-bug-s-tp4901548p4901564.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 17 21:02:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 21:41:59 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.351.mcz In-Reply-To: <1466196833144-4901561.post@n4.nabble.com> References: <1466196833144-4901561.post@n4.nabble.com> Message-ID: <1466197342117-4901566.post@n4.nabble.com> marcel.taeumel wrote > > Levente Uzonyi wrote >> Hi Marcel, >> >> I suppose this change has broken all StrikeFonts other than Bitmap DejaVu >> Sans. >> >> Levente >> >> On Thu, 16 Jun 2016, >> commits@.squeak >> wrote: >> >>> Marcel Taeumel uploaded a new version of Graphics to project The Trunk: >>> http://source.squeak.org/trunk/Graphics-mt.351.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Graphics-mt.351 >>> Author: mt >>> Time: 16 June 2016, 1:56:13.140696 pm >>> UUID: 40df15d7-0c28-2b4e-8be2-231d75e087f8 >>> Ancestors: Graphics-lpc.350 >>> >>> Removes manual kerning corrections for the 7-point DejaVu Sans, which >>> are not necessary anymore. >>> >>> =============== Diff against Graphics-lpc.350 =============== >>> >>> Item was changed: >>> ----- Method: StrikeFont>>ascentKern (in category 'accessing') ----- >>> ascentKern >>> "Return the kern delta for ascenders." >>> + >>> + self depth > 1 ifTrue: [^ 0]. >>> + >>> + "Optimization for traditional 1-bit fonts." >>> + ^ (emphasis allMask: 2) >>> + ifFalse: [0] >>> + ifTrue: [(self ascent-5+4)//4 max: 0] "See makeItalicGlyphs" >>> - (emphasis noMask: 2) ifTrue: [^ 0]. >>> - ^ (self ascent-5+4)//4 max: 0 "See makeItalicGlyphs" >>> >>> ! >>> >>> Item was changed: >>> ----- Method: StrikeFont>>baseKern (in category 'accessing') ----- >>> baseKern >>> "Return the base kern value to be used for all characters." >>> >>> + self depth > 1 ifTrue: [^ 0]. >>> - | italic | >>> - italic := emphasis allMask: 2. >>> >>> + "Optimization for traditional 1-bit fonts." >>> + ^ (emphasis allMask: 2) >>> + ifFalse: [0] >>> + ifTrue: [((self height-1-self ascent+4)//4 max: 0) "See >>> makeItalicGlyphs" >>> + + (((self ascent-5+4)//4 max: 0))]! >>> - glyphs depth > 1 ifTrue: [ >>> - ^(italic or: [ pointSize < 9 ]) >>> - ifTrue: [ 1 ] >>> - ifFalse: [ 0] ]. >>> - >>> - italic ifFalse: [^ 0]. >>> - ^ ((self height-1-self ascent+4)//4 max: 0) "See makeItalicGlyphs" >>> - + (((self ascent-5+4)//4 max: 0))! >>> >>> Item was changed: >>> ----- Method: StrikeFont>>descentKern (in category 'accessing') ----- >>> descentKern >>> "Return the kern delta for descenders." >>> - (emphasis noMask: 2) ifTrue: [^ 0]. >>> - ^ (self height-1-self ascent+4)//4 max: 0 "See makeItalicGlyphs" >>> >>> + self depth > 1 ifTrue: [^ 0]. >>> + >>> + "Optimization for traditional 1-bit fonts." >>> + ^ (emphasis allMask: 2) >>> + ifFalse: [0] >>> + ifTrue: [(self height-1-self ascent+4)//4 max: 0] "See >>> makeItalicGlyphs" >>> + >>> ! >>> >>> >>> > Hi Levente, > > no, not at all. :) The interesting thing was that the only <9-point font > (i.e. 7 point) there that had glyphs with more than 1-bit depth was the > pre-rendered DejaVu Sans. It was an optimization that Juan put in for it, > I guess. > > Or are you referring to the way our Font Importer Tools is rendering > fonts? That tool imports the point sizes 9 12 15 24 36 -- so, no "< 9" > either. However, you are, right. If you modify TTCFont class >> pointSizes > to also import fonts <9 points, the glyphs look too close together. > > Still, currently, there are no broken fonts: > > Accuat #(18 ) > Accujen #(9 10 12 14 18 24 ) > Accula #(12 24 ) > Accumon #(9 10 12 ) > Accuny #(9 10 12 14 18 24 ) > Accusf #(18 ) > Accushi #(12 ) > Accuve #(12 14 ) > Atlanta #(11 22 ) > Bitmap DejaVu Sans #(7 9 12 14 17 20 ) > BitstreamVeraSans #(9 12 13 15 24 36 ) > BitstreamVeraSansMono #(9 12 15 24 36 ) > BitstreamVeraSerif #(9 12 15 18 24 36 ) > ComicSansMS #(6 9 11 17 26 ) > Darkmap DejaVu Sans #(7 9 12 14 17 20 ) > DefaultFixedTextStyle #(11 22 ) > DefaultMultiStyle #(9 10 12 14 18 24 ) > DefaultTextStyle #(7 9 12 14 17 20 ) > > Anyway, the right step would be to fix the glyph creation like Tobias did > generate glyphs for the 7pt Deja Vu Sans with correct widths. That general > kerning correction in StrikeFont was not a good idea. > > Best, > Marcel It's also interesting that the Font Importer renders fonts with 96 Squeak-DPI but still produces glyphs smaller than Tobias (and Juan also, I guess) did for the DejaVu Sans with 72 DPI. There is a bug somewhere. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Graphics-mt-351-mcz-tp4901175p4901566.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 17 21:12:19 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 21:51:56 2016 Subject: [squeak-dev] Re: 64-bit bug(s) In-Reply-To: References: Message-ID: <1466197939570-4901567.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi Timothy, Hi All, > > I know some people have seen UI bugs with the 64-bit VM and image. > This is just to report that I see one very obvious bug. In a recent > messages browser on 64-bits any attempt to select a method other than the > first in the list works, but immediately the selection reverts to the > first > element in the list. I suspect something in the event chain. But it's > nice to have an obvious bug to chase instead of the much harder visual > bugs > people have been reporting up until now. Hopefully the same root cause > will > account for both bugs. Fingers crossed. > > _,,,^..^,,,_ > best, Eliot Don't we have tests for numbers and rectangles? Do they pass? A quick look at the selection mechanism in lists revealed these calls: PluggableListMorph >> #rowAtLocation: (with a coordinate transformation) LazyListMorph >> #rowAtLocation: (with calls to #min: #min:max: etc.) You could write event positions to the transcript. Best, Marcel -- View this message in context: http://forum.world.st/64-bit-bug-s-tp4901548p4901567.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri Jun 17 21:13:46 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 17 21:53:23 2016 Subject: [squeak-dev] Re: Daily Commit Log In-Reply-To: References: <20160613215709.27655.qmail@box4.squeak.org> Message-ID: <1466198026631-4901568.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi Tobias, > > is there any chance of a 10 point font, especially for code? I find > the 9 point a little painful for my eyes but find the 12 point font way > too > big. > > On Mon, Jun 13, 2016 at 2:57 PM, < > commits@.squeak > > wrote: > >> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 >> hours: >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068212.html >> >> Name: Graphics-topa.346 >> Ancestors: Graphics-topa.345 >> >> DejaVu rendering: Improve v-fuzz by ensuring integral virtual font >> heights. >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068213.html >> >> Name: Graphics-topa.347 >> Ancestors: Graphics-topa.346 >> >> (Oops. Use 30% smaller PNGs) >> >> ============================================= >> >> http://lists.squeakfoundation.org/pipermail/packages/2016-June/068214.html >> >> Name: Graphics-topa.348 >> Ancestors: Graphics-topa.347 >> >> Very Small fonts do no longer need descender adjustment >> >> ============================================= >> >> > > > -- > _,,,^..^,,,_ > best, Eliot +1 Maybe 10 or 11 point. Best, Marcel -- View this message in context: http://forum.world.st/Daily-Commit-Log-tp4900761p4901568.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Jun 17 21:56:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 17 21:56:52 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160617215650.25097.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-June/068226.html Name: Kernel-eem.1029 Ancestors: Kernel-mt.1028 Supply missing simulation methods for the new Mutex primitives and hence render through on code like the following funcitonal again: Mutex new critical: [[Object new] on: Notification do: [:noti| ]] ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068227.html Name: Kernel-eem.1030 Ancestors: Kernel-eem.1029 Fix simulation of the withArgs:executeMethod: and tryPrimitive:withArgs: primitives, as well as providing support for receiver:tryPrimitive:withArgs: when it is implemented. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068228.html Name: WebClient-Core-topa.101 Ancestors: WebClient-Core-ul.100 Only close streams that are still connected. ============================================= From timfelgentreff at gmail.com Fri Jun 17 22:20:38 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Jun 17 22:20:42 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: Hi Ben and Karl Wsl only runs ELF64 binaries anyway, so maybe we eventually just don't need to worry about 64bit Windows anymore :) Am 17.06.2016 5:59 nachm. schrieb "Ben Coman" : > > On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda > > wrote: > >> > >> > >> Hi all, > >> > >> we are all finished importing the VM repository to Github, migrating the > >> scripts, and setting up automatic builds and hosting of binaries. We > want > >> to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim > and > >> Fabio will merge any remaining commits on the SVN repository between > now and > >> that time and any further development will take place on Github. If > >> possible, you may refrain from committing to SVN, as this will mean less > >> work for Tim and Fabio. > >> > >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog > >> branch is the new default branch and is still called Cog, this is the > main > >> focus of development. The old trunk branch has been renamed to > "oldTrunk". > >> The master branch will track the Cog branch and will be the repository > >> integrated into for releases. > >> > >> To get started, please refer to the updated README that is shown on the > >> Github page. > >> > >> _,,,^..^,,,_ > >> best, Eliot, Tim & Fabio > > > > On Jun 17, 2016, at 6:22 AM, karl ramberg wrote: > > Will Win x64 VM be built also ? > > > On Fri, Jun 17, 2016 at 10:17 PM, Eliot Miranda > wrote: > > Hi Karl, > > Not yet. No one has done the work to produce this. And because > Microsoft > > in their infinite wisdom have chosen to make sizeof(long) = 4 in their > > 64-bit model, not 8 as everyone else has, means that we will have > > significant problems generating sources that will work. > > > Hi Karl, > > In the meantime, though highly experimental and likely to fail, > maybe you'd like to try a Linux x86 VM for Unbuntu On Windows... > https://msdn.microsoft.com/en-au/commandline/wsl/about > > Running GUI apps.. > > http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html > > Some benchmarks... > http://www.phoronix.com/scan.php?page=article&item=windows-10-lxcore&num=1 > > cheers -ben > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160618/4681e052/attachment-0001.htm From btc at openinworld.com Fri Jun 17 23:57:24 2016 From: btc at openinworld.com (Ben Coman) Date: Fri Jun 17 23:57:47 2016 Subject: [squeak-dev] Re: [Vm-dev] Moving the Cog subversion repository to githup at 2016-6-16 7am UTC In-Reply-To: References: Message-ID: On Sat, Jun 18, 2016 at 6:20 AM, Tim Felgentreff wrote: > Hi Ben and Karl > > Wsl only runs ELF64 binaries anyway, so maybe we eventually just don't need > to worry about 64bit Windows anymore :) Its only Win10, and it'll be a few years before Microsoft manages to force upgrade everyone ;). But maybe it will help streamline the build system. cheers -ben > > Am 17.06.2016 5:59 nachm. schrieb "Ben Coman" : >> >> > On Wed, Jun 15, 2016 at 7:26 PM, Eliot Miranda >> > wrote: >> >> >> >> >> >> Hi all, >> >> >> >> we are all finished importing the VM repository to Github, migrating >> >> the >> >> scripts, and setting up automatic builds and hosting of binaries. We >> >> want >> >> to switch over from SVN tomorrow morning at 7am UTC. At that point, Tim >> >> and >> >> Fabio will merge any remaining commits on the SVN repository between >> >> now and >> >> that time and any further development will take place on Github. If >> >> possible, you may refrain from committing to SVN, as this will mean >> >> less >> >> work for Tim and Fabio. >> >> >> >> The new repository is at https://github.com/OpenSmalltalk/vm. The Cog >> >> branch is the new default branch and is still called Cog, this is the >> >> main >> >> focus of development. The old trunk branch has been renamed to >> >> "oldTrunk". >> >> The master branch will track the Cog branch and will be the repository >> >> integrated into for releases. >> >> >> >> To get started, please refer to the updated README that is shown on the >> >> Github page. >> >> >> >> _,,,^..^,,,_ >> >> best, Eliot, Tim & Fabio >> >> >> > On Jun 17, 2016, at 6:22 AM, karl ramberg wrote: >> > Will Win x64 VM be built also ? >> >> >> On Fri, Jun 17, 2016 at 10:17 PM, Eliot Miranda >> wrote: >> > Hi Karl, >> > Not yet. No one has done the work to produce this. And because >> > Microsoft >> > in their infinite wisdom have chosen to make sizeof(long) = 4 in their >> > 64-bit model, not 8 as everyone else has, means that we will have >> > significant problems generating sources that will work. >> >> >> Hi Karl, >> >> In the meantime, though highly experimental and likely to fail, >> maybe you'd like to try a Linux x86 VM for Unbuntu On Windows... >> https://msdn.microsoft.com/en-au/commandline/wsl/about >> >> Running GUI apps.. >> >> http://www.pcworld.com/article/3055403/windows/windows-10s-bash-shell-can-run-graphical-linux-applications-with-this-trick.html >> >> Some benchmarks... >> http://www.phoronix.com/scan.php?page=article&item=windows-10-lxcore&num=1 >> >> cheers -ben >> > > > From tim at rowledge.org Sat Jun 18 02:19:11 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat Jun 18 02:18:59 2016 Subject: [squeak-dev] NuScratch source on SqueakMap Message-ID: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry Pi. It is a rather substantial collection of bug fixes, performance improvements, tidy-ups, speed-ups etc to the original Scratch developed by the MIT team. Project files read and saved are fully compatible with the original system. It runs on modern Squeak systems - I use a 5.0 with updates and it is likely that it won?t run perfectly on anything earlier than say #15852 because some time around then the help balloon stuff changed. I use a Cog/Spur system and make no representation about how well it might work on a non-spur or non-Cog system - I just don?t know and don?t really care. On a RaspberryPi3 it runs large game-like Scratch programs about twice as fast as the original Scratch (a 2.8-ish image on a contemporary interpreter) runs on a modest mac laptop. Or to put it another way, it?s about a gazillion times faster than original Scratch on the same Pi. The licensing remains as per the Scratch Source Code License (google it). You will need to download and unzip a copy of http://download.scratch.mit.edu/source-code/ScratchSkin1.4.zip *before* attempting to install the package. It does *not* include the RaspberryPi specific GPIOServer code; that will appear in a separate package soon. That provides a way to drive al sorts of fun add-on hardware from Scratch - and indeed the lower level driver code for that provides a general Squeak access to the gpio pins and add-ons. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Fac ut vivas. = Get a life. From eliot.miranda at gmail.com Sat Jun 18 02:23:56 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Jun 18 02:24:01 2016 Subject: [squeak-dev] 64-bit bug(s) In-Reply-To: <155602e293f.da9f9beb1377.2601467184095460221@zoho.com> References: <155602e293f.da9f9beb1377.2601467184095460221@zoho.com> Message-ID: <90D2C2CC-2BAD-4BE8-BB3C-F68B3CD6832F@gmail.com> Tim, > On Jun 17, 2016, at 2:04 PM, gettimothy wrote: > > Hi Eliot. > > First thank you, thank you, thank you, for making my dream of developing on Squeak on a 64x64 bit system a reality. > > The UI bug I had was from a custom-compiled VM. The cause was a rectangle such as 1@1 evaluating to random reals > > 1@1 inspect => 0.79@0.02 > (exagerated for effect) > > The effect was a "Modern Art" layout manager with no recognizable perspective and a refusal to abide by the norms of established practice. Picasso-ish. > > When I upgraded to a pre-built VM from your site, the "fun rectangles" went away and where replaced with the "predictable rectangles" we programmer types like to depend on. ROTLF! and there's a moral in there somewhere too :-) > cheers, > > tty > > ---- On Fri, 17 Jun 2016 16:49:32 -0400 Eliot Miranda wrote ---- > Hi Timothy, Hi All, > > I know some people have seen UI bugs with the 64-bit VM and image. This is just to report that I see one very obvious bug. In a recent messages browser on 64-bits any attempt to select a method other than the first in the list works, but immediately the selection reverts to the first element in the list. I suspect something in the event chain. But it's nice to have an obvious bug to chase instead of the much harder visual bugs people have been reporting up until now. Hopefully the same root cause will account for both bugs. Fingers crossed. > > _,,,^..^,,,_ > best, Eliot > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160617/47d3418b/attachment.htm From eliot.miranda at gmail.com Sat Jun 18 02:25:22 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Jun 18 02:25:27 2016 Subject: [squeak-dev] Re: 64-bit bug(s) In-Reply-To: <1466197939570-4901567.post@n4.nabble.com> References: <1466197939570-4901567.post@n4.nabble.com> Message-ID: Hi Marcel, > On Jun 17, 2016, at 2:12 PM, marcel.taeumel wrote: > > Eliot Miranda-2 wrote >> Hi Timothy, Hi All, >> >> I know some people have seen UI bugs with the 64-bit VM and image. >> This is just to report that I see one very obvious bug. In a recent >> messages browser on 64-bits any attempt to select a method other than the >> first in the list works, but immediately the selection reverts to the >> first >> element in the list. I suspect something in the event chain. But it's >> nice to have an obvious bug to chase instead of the much harder visual >> bugs >> people have been reporting up until now. Hopefully the same root cause >> will >> account for both bugs. Fingers crossed. >> >> _,,,^..^,,,_ >> best, Eliot > > Don't we have tests for numbers and rectangles? Do they pass? > > A quick look at the selection mechanism in lists revealed these calls: > PluggableListMorph >> #rowAtLocation: (with a coordinate transformation) > LazyListMorph >> #rowAtLocation: (with calls to #min: #min:max: etc.) > > You could write event positions to the transcript. Well the annoying thing is that the bug has disappeared and the #%^*?> recent submissions browser is working fine. Sigh... > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/64-bit-bug-s-tp4901548p4901567.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From lewis at mail.msen.com Sat Jun 18 04:57:00 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Jun 18 04:57:01 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> Message-ID: <20160618045700.GA17085@shell.msen.com> On Fri, Jun 17, 2016 at 07:19:11PM -0700, tim Rowledge wrote: > There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry Pi. It is a rather substantial collection of bug fixes, performance improvements, tidy-ups, speed-ups etc to the original Scratch developed by the MIT team. Project files read and saved are fully compatible with the original system. > Excellent! Thank you for posting this Tim. Dave > It runs on modern Squeak systems - I use a 5.0 with updates and it is likely that it won???t run perfectly on anything earlier than say #15852 because some time around then the help balloon stuff changed. I use a Cog/Spur system and make no representation about how well it might work on a non-spur or non-Cog system - I just don???t know and don???t really care. > > On a RaspberryPi3 it runs large game-like Scratch programs about twice as fast as the original Scratch (a 2.8-ish image on a contemporary interpreter) runs on a modest mac laptop. Or to put it another way, it???s about a gazillion times faster than original Scratch on the same Pi. > > The licensing remains as per the Scratch Source Code License (google it). You will need to download and unzip a copy of http://download.scratch.mit.edu/source-code/ScratchSkin1.4.zip *before* attempting to install the package. > > It does *not* include the RaspberryPi specific GPIOServer code; that will appear in a separate package soon. That provides a way to drive al sorts of fun add-on hardware from Scratch - and indeed the lower level driver code for that provides a general Squeak access to the gpio pins and add-ons. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Fac ut vivas. = Get a life. > > From maxleske at gmail.com Sun Jun 19 09:03:03 2016 From: maxleske at gmail.com (Max Leske) Date: Sun Jun 19 09:03:08 2016 Subject: [squeak-dev] System and user processes Message-ID: Hi, In Pharo and Squeak we have no separation between processes that belong to the IDE, tools etc. and processes that are spawned as part of an application. I?d like to know your opinion on the following (rough) idea: 1. We introduce two subclasses of Process: SystemProcess and UserProcess 2. We define #isSystemProcess and #isUserProcess 3. We introduce #newSystemProcess and #newUserProcess 4. We deprecate #newProcess and delegate to #newUserProcess (thereby modifying all users of #forkXXX to yield instances of UserProcess) Of the following I?m less sure: 5. We introduce #forkSystemProcess et. al I?ve tried this out in Pharo 6 and there seem to be no problems with the VM. The benefit would be improved separation between system and user space. It would allow us to implement stuff for processes in general (e.g. for the debugger) which we do not want to affect system processes like the UI process or the background process. One concrete example: the process browser could hide all system processes and make them visible on demand (that would greatly improve the view because you can now better find your own processes). I?m looking forward to your comments. Cheers, Max From commits at source.squeak.org Mon Jun 20 15:14:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 20 15:14:38 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1182.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1182.mcz ==================== Summary ==================== Name: Morphic-mt.1182 Author: mt Time: 20 June 2016, 5:13:55.570796 pm UUID: 825d8e52-1878-af49-9f7a-437b23e68d8c Ancestors: Morphic-mt.1181 Moves implementation of focus event dispatching from various places into MorphicEventDispatcher. This will ensure consistency in the future because MorphicEventDispatcher encode the tree iteration with capturing and bubbling. Doing a focus event is just a shortcut into the tree. TextMorphs use that. Pop-up menus use that. Modal dialogs use that. Fixes missing coordinate transformations when capturing and bubbling for focus events. Simplify focus-related code in MenuMorph, UserDialogBoxMorph, and DockingBarMorph. At the time of writing, there seems to be no need anymore for Morph >> #handleFocusEvent:. Still, keep it for compatibility to other projects. =============== Diff against Morphic-mt.1181 =============== Item was removed: - ----- Method: DockingBarMorph>>handleFocusEvent: (in category 'events-processing') ----- - handleFocusEvent: evt - "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children." - - | result filteredEvent | - (evt isMouse and:[ evt isMouseUp ]) ifTrue:[^ evt]. - - result := self processEvent: evt. - filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. - - "Need to handle keyboard input if we have the focus." - filteredEvent isKeyboard ifTrue: [^ super handleFocusEvent: filteredEvent]. - - "We need to handle button clicks outside and transitions to local popUps so throw away everything else" - (filteredEvent isMouseOver or:[filteredEvent isMouse not]) ifTrue:[^filteredEvent]. - "What remains are mouse buttons and moves" - filteredEvent isMove ifFalse:[^super handleFocusEvent: filteredEvent]. "handle clicks outside by regular means" - "Now it's getting tricky. On #mouseMove we might transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." - selectedItem ifNotNil:[(selectedItem activateSubmenu: filteredEvent) ifTrue:[^filteredEvent]]. - ! Item was added: + ----- Method: DockingBarMorph>>mouseMove: (in category 'events-processing') ----- + mouseMove: evt + "We might transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." + + selectedItem ifNotNil:[selectedItem activateSubmenu: evt].! Item was added: + ----- Method: DockingBarMorph>>processFocusEvent:using: (in category 'events-processing') ----- + processFocusEvent: evt using: dispatcher + + ^ dispatcher dispatchFocusEventFully: evt with: self! Item was added: + ----- Method: DockingBarMorph>>wantsEveryMouseMove (in category 'events-processing') ----- + wantsEveryMouseMove + ^ true! Item was changed: ----- Method: HandMorph>>sendFocusEvent:to:clear: (in category 'private events') ----- sendFocusEvent: anEvent to: focusHolder clear: aBlock "Send the event to the morph currently holding the focus" + | result w | w := focusHolder world ifNil:[aBlock value. ^ anEvent]. w becomeActiveDuring:[ ActiveHand := self. ActiveEvent := anEvent. + result := focusHolder processFocusEvent: anEvent. - result := focusHolder handleFocusEvent: - (anEvent transformedBy: (focusHolder transformedFrom: self)). ]. + ^ result == #rejected ifTrue: [anEvent] ifFalse: [result "filtered event"]! - ^result == #rejected ifTrue: [anEvent] ifFalse: [result "filtered event"]! Item was removed: - ----- Method: MenuMorph>>handleFocusEvent: (in category 'events') ----- - handleFocusEvent: evt - "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children." - | result filteredEvent | - result := self processEvent: evt. - filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. - - "Need to handle keyboard input if we have the focus." - filteredEvent isKeyboard ifTrue: [^ super handleFocusEvent: filteredEvent]. - - "We need to handle button clicks outside and transitions to local popUps so throw away everything else" - (filteredEvent isMouseOver or:[filteredEvent isMouse not]) ifTrue:[^filteredEvent]. - "What remains are mouse buttons and moves" - filteredEvent isMove ifFalse:[^super handleFocusEvent: filteredEvent]. "handle clicks outside by regular means" - "Now it's getting tricky. On #mouseMove we might transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." - selectedItem ifNotNil: [ - (selectedItem activateSubmenu: filteredEvent) - ifTrue: [ ^filteredEvent ] - ifFalse: [ - (self containsPoint: filteredEvent position) ifFalse: [ - self selectItem: nil event: filteredEvent ] ] ]. - "Note: The following does not traverse upwards but it's the best I can do for now" - popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: filteredEvent) ifTrue:[^filteredEvent]]. - ^ filteredEvent! Item was removed: - ----- Method: MenuMorph>>handleMouseMove: (in category 'events') ----- - handleMouseMove: evt - " If the mouse moves over an item not selected, we try to set it as selected. - If this happens depends on that the current selected item wants to release - its selection. " - - self selectedItem ifNil: [ ^super handleMouseMove: evt ]. - (self selectedItem containsPoint: evt position) ifTrue: [ ^super handleMouseMove: evt ]. - self - selectItem: ( - self items - detect: [ :each | each containsPoint: evt position ] - ifNone: [ nil ]) - event: evt. - super handleMouseMove: evt! Item was added: + ----- Method: MenuMorph>>mouseMove: (in category 'events') ----- + mouseMove: evt + " If the mouse moves over an item not selected, we try to set it as selected. + If this happens depends on that the current selected item wants to release + its selection. " + + self selectedItem ifNil: [ ^ self ]. + (self selectedItem containsPoint: evt position) ifTrue: [ ^ self ]. + self + selectItem: ( + self items + detect: [ :each | each containsPoint: evt position ] + ifNone: [ nil ]) + event: evt. + + "Transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." + selectedItem ifNotNil: [ + (selectedItem activateSubmenu: evt) + ifTrue: [ ^self ] + ifFalse: [ + (self containsPoint: evt position) ifFalse: [ + self selectItem: nil event: evt ] ] ]. + + "Note: The following does not traverse upwards but it's the best I can do for now" + popUpOwner ifNotNil:[popUpOwner activateOwnerMenu: evt]! Item was added: + ----- Method: MenuMorph>>processFocusEvent:using: (in category 'events') ----- + processFocusEvent: evt using: dispatcher + + ^ dispatcher dispatchFocusEventFully: evt with: self! Item was added: + ----- Method: MenuMorph>>wantsEveryMouseMove (in category 'events') ----- + wantsEveryMouseMove + ^ true! Item was changed: ----- Method: Morph>>handleFocusEvent: (in category 'events-processing') ----- handleFocusEvent: anEvent + "Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand. However, it might already have been handled due to overrides in #processFocusEvent:using:. We might want to get rid of this call-back in the future..." - "Handle the given event. This message is sent if the receiver currently has the focus and is therefore receiving events directly from some hand. + ^ anEvent wasHandled + ifTrue: [anEvent] + ifFalse: [self handleEvent: anEvent]! - 1) Event bubbling. Do event bubbling known from MorphicEventDispatcher by calling #handleEvent: also on all owners. - 2) Event capture filters. Walk along the owner chain in reverse order and apply capture filters as known from MorphicEventDispatcher. - - If you want to overwrite this in a subclass (for example to implement modal dialogs) ensure to call super instead if #handleEvent: directly." - - | filteredEvent | - filteredEvent := anEvent. - - "TODO: Add a check to ensure that our event dispatcher is actually of kind MorphicEventDispatcher?!! We do copy its behavior though... like self defaultEventDispatcher class == MorphicEventDispatcher? Or #isKindOf:? Anyway, the outermost morph determines the event dispatcher. See HandMorph >> #sendEvent:focus:clear: and PasteUpMorph >> #processEvent:." - - "Event capturing. Filters only because the capturing phase was bypassed by using the keyboard/mouse focus." - self withAllOwners reverseDo: [:morph | "reverse order to comply with default MorphEventDispatcher" - morph == anEvent hand ifFalse: [ "Fixes drag-and-drop bug." - filteredEvent := morph sendFilterEventCapture: filteredEvent for: morph. - filteredEvent wasIgnored ifTrue: [^ filteredEvent]]]. - - "Event bubbling. Filters are processed in #handleEvent:." - self withAllOwnersDo: [:morph | - morph == anEvent hand ifFalse: [ "Fixes drag-and-drop bug." - filteredEvent := morph handleEvent: filteredEvent. - filteredEvent wasIgnored ifTrue: [^ filteredEvent]]]. - - ^ filteredEvent! Item was added: + ----- Method: Morph>>processFocusEvent: (in category 'events-processing') ----- + processFocusEvent: anEvent + + ^self processFocusEvent: anEvent using: self defaultEventDispatcher! Item was added: + ----- Method: Morph>>processFocusEvent:using: (in category 'events-processing') ----- + processFocusEvent: anEvent using: defaultDispatcher + "Event dispatching shortcut." + + ^ defaultDispatcher dispatchFocusEvent: anEvent with: self! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'support') ----- - ----- Method: MorphicEventDispatcher>>dispatchEvent:toSubmorphsOf: (in category 'private') ----- dispatchEvent: anEvent toSubmorphsOf: aMorph "Dispatch the given event to the submorphs of the given morph. For coordinate transformations, work only with copies. Either return the given event or a copy of any filtered event to employ immutability to some extent. --- PRIVATE!!" | localEvent filteredEvent | aMorph submorphsDo: [:child | localEvent := anEvent transformedBy: (child transformedFrom: aMorph). filteredEvent := child processEvent: localEvent using: self. "use same dispatcher" filteredEvent == #rejected ifFalse: [ "some event or #rejected symbol" self flag: #overlappingChildren. "mt: We cannot give two overlapping siblings the chance to handle the event!!" + ^ self nextFromOriginal: anEvent local: localEvent filtered: filteredEvent]]. - filteredEvent == localEvent - ifTrue: [ - localEvent wasHandled ifTrue: [anEvent copyHandlerState: localEvent]. - anEvent wasIgnored: localEvent wasIgnored. - ^ anEvent] - ifFalse: [ - filteredEvent := filteredEvent copy. - filteredEvent translateTo: anEvent position. "restore to untransformed coordinates" - filteredEvent wasHandled ifFalse: [filteredEvent copyHandlerState: anEvent]. "restore handler if needed" - ^ filteredEvent]]]. ^ #rejected! Item was changed: + ----- Method: MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: (in category 'support') ----- - ----- Method: MorphicEventDispatcher>>dispatchEvent:withHandler:withMorph: (in category 'private') ----- dispatchEvent: anEvent withHandler: aHandler withMorph: aMorph "Perform the actual event dispatch. Use the given object as handler. Ask submorphs first to handle the event. Then bubble up. Stop if ignored. Note that event rejection and event filters are two separete concepts. Filters come from the outside. Rejection is a morph's decision. * The top-most chain of visible, unlocked morphs containing the event position will get a chance to handle the event. * When travelling up, the prospective handler is always executed. The handler needs to check if the event was handled before as well as checking if somebody else's handler has been installed. * If another handler has been installed but the event was not handled it means that somebody up in the hierarchy wants to handle the event." | result filteredEvent | result := self dispatchEvent: anEvent toSubmorphsOf: aMorph. result == #rejected "Anybody?" ifFalse: [filteredEvent := result] ifTrue: [ "My submorphs did not want it. Do I want it anyway? It's about locked children..." (aMorph containsPoint: anEvent position event: anEvent) ifFalse: [^ #rejected]. filteredEvent := anEvent "there was no filtering, only basic rejects"]. "Receiver is in the top-most unlocked, visible chain." (aHandler notNil and: [filteredEvent wasIgnored not]) ifTrue: [filteredEvent := aHandler handleEvent: filteredEvent]. ^ filteredEvent! Item was added: + ----- Method: MorphicEventDispatcher>>dispatchFocusEvent:with: (in category 'focus events') ----- + dispatchFocusEvent: anEventWithGlobalPosition with: focusMorph + "Dispatch the given event to the given morph. Simulate capturing phase, handle the event, then do bubbling." + + | currentEvent | + "1) Capturing phase." + currentEvent := self doCapturingForFocusEvent: anEventWithGlobalPosition with: focusMorph. + currentEvent == #rejected ifTrue: [^ #rejected]. + currentEvent wasIgnored ifTrue: [^ currentEvent]. + + "2) No sub-tree processing here. Use #dispatchFocusEventFully:with: if you want that, too." + + "3) Let the focus morph handle the event." + currentEvent := self doHandlingForFocusEvent: currentEvent with: focusMorph. + currentEvent wasIgnored ifTrue: [^ currentEvent]. + + "4) Bubbling phase" + ^ self doBubblingForFocusEvent: currentEvent with: focusMorph! Item was added: + ----- Method: MorphicEventDispatcher>>dispatchFocusEventFully:with: (in category 'focus events') ----- + dispatchFocusEventFully: anEventWithGlobalPosition with: focusMorph + "Dispatch the given event to the given morph. Do capturing, processing in sub-tree, and bubbling." + + | currentEvent | + "1) Capturing phase." + currentEvent := self doCapturingForFocusEvent: anEventWithGlobalPosition with: focusMorph. + currentEvent == #rejected ifTrue: [^ #rejected]. + currentEvent wasIgnored ifTrue: [^ currentEvent]. + + "2) Sub-tree processing." + currentEvent := self doProcessingForFocusEvent: currentEvent with: focusMorph. + currentEvent wasIgnored ifTrue: [^ currentEvent]. + + "3) Let the focus morph handle the event. Usually no effect because previous sub-tree processing involved the focus morph already -- at least in the bubbling phase. Skip it?" + currentEvent := self doHandlingForFocusEvent: currentEvent with: focusMorph. + currentEvent wasIgnored ifTrue: [^ currentEvent]. + + "4) Bubbling phase." + ^ self doBubblingForFocusEvent: currentEvent with: focusMorph! Item was added: + ----- Method: MorphicEventDispatcher>>doBubblingForFocusEvent:with: (in category 'support') ----- + doBubblingForFocusEvent: anEvent with: focusMorph + "Simulate real event bubbling up to the focused morph's outermost owner. Applies event bubble filters via Morph >> #handleEvent:. Watch out for coordinate transformations and some globals (ActiveWorld, ...)." + + | currentEvent filteredEvent localEvent referenceMorph | + currentEvent := anEvent. + referenceMorph := anEvent hand. + + focusMorph allOwnersDo: [:ownerMorph | + ownerMorph == anEvent hand ifFalse: [ "Never bubble up to the hand morph but only up to the world." + localEvent := currentEvent transformedBy: (ownerMorph transformedFrom: referenceMorph). + filteredEvent := ownerMorph handleEvent: localEvent. + currentEvent := self nextFromOriginal: currentEvent local: localEvent filtered: filteredEvent. + currentEvent wasIgnored ifTrue: [^ currentEvent]]]. + + ^ currentEvent! Item was added: + ----- Method: MorphicEventDispatcher>>doCapturingForFocusEvent:with: (in category 'support') ----- + doCapturingForFocusEvent: anEvent with: focusMorph + "Simulate real event capturing down to the focused morph. Apply event capture filters. Watch out for coordinate transformations. Keep the filter-ignore-reject order like in Morph >> #processEvent:using:." + + | currentEvent filteredEvent localEvent referenceMorph | + currentEvent := anEvent. + referenceMorph := anEvent hand. + + "Event capturing. Filters only because the capturing phase was bypassed by using the keyboard/mouse focus." + focusMorph withAllOwners reverseDo: [:ownerMorph | "reverse order to comply with regular dispatching" + ownerMorph == anEvent hand ifFalse: [ "Never dispatch the hand morph. It already did so." + localEvent := currentEvent transformedBy: (ownerMorph transformedFrom: referenceMorph). + + filteredEvent := ownerMorph sendFilterEventCapture: localEvent for: ownerMorph. + + "Ignoring has higher priority but the reject-check must be with local event coodinates." + (filteredEvent wasIgnored not and: [ownerMorph rejectsEvent: filteredEvent]) + ifTrue: [^ #rejected]. + + currentEvent := self nextFromOriginal: currentEvent local: localEvent filtered: filteredEvent. + currentEvent wasIgnored ifTrue: [^ currentEvent]]]. + + ^ currentEvent! Item was added: + ----- Method: MorphicEventDispatcher>>doHandlingForFocusEvent:with: (in category 'support') ----- + doHandlingForFocusEvent: currentEvent with: focusMorph + + | localEvent filteredEvent | + localEvent := currentEvent transformedBy: (focusMorph transformedFrom: currentEvent hand). + filteredEvent := focusMorph handleFocusEvent: localEvent. + ^ self nextFromOriginal: currentEvent local: localEvent filtered: filteredEvent.! Item was added: + ----- Method: MorphicEventDispatcher>>doProcessingForFocusEvent:with: (in category 'support') ----- + doProcessingForFocusEvent: currentEvent with: focusMorph + "Sub-tree processing (including capturing from focus morph down to something and bubbling up back to focus morph). Never reject in the end." + + | localEvent filteredEvent | + localEvent := currentEvent transformedBy: (focusMorph transformedFrom: currentEvent hand). + filteredEvent := focusMorph processEvent: localEvent using: self. + ^ filteredEvent == #rejected + ifTrue: [currentEvent] "Can happen if you click, e.g., outside the bounds of the focus morph" + ifFalse: [self nextFromOriginal: currentEvent local: localEvent filtered: filteredEvent]! Item was added: + ----- Method: MorphicEventDispatcher>>nextFromOriginal:local:filtered: (in category 'support') ----- + nextFromOriginal: originalEvent local: localEvent filtered: filteredEvent + "Take the filtered event if different but always keep the original coordinates." + + filteredEvent == localEvent + ifTrue: [ "Use original event but keep track of ignored flag." + localEvent wasHandled ifTrue: [originalEvent copyHandlerState: localEvent]. + originalEvent wasIgnored: localEvent wasIgnored. + ^ originalEvent] + ifFalse: [ "There was an event transformation. Copy, revert coordinates, keep handler state." + | result | + result := filteredEvent copy. "Never mutate position without copying. MouseClickState etc. will break otherwise." + result translateTo: originalEvent position. "restore to untransformed coordinates" + result wasHandled ifFalse: [result copyHandlerState: originalEvent]. + ^ result]. + ! Item was removed: - ----- Method: UserDialogBoxMorph>>handleFocusEvent: (in category 'constructing') ----- - handleFocusEvent: evt - "Handle focus events. Valid menu transitions are determined based on the menu currently holding the focus after the mouse went down on one of its children. Need to handle keyboard input if we have the focus." - - | result filteredEvent | - result := self processEvent: evt. - filteredEvent := result == #rejected ifTrue: [evt] ifFalse: [result]. - - ^ super handleFocusEvent: filteredEvent! Item was added: + ----- Method: UserDialogBoxMorph>>processFocusEvent:using: (in category 'events') ----- + processFocusEvent: evt using: dispatcher + + ^ dispatcher dispatchFocusEventFully: evt with: self! From commits at source.squeak.org Mon Jun 20 15:14:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 20 15:15:01 2016 Subject: [squeak-dev] The Trunk: MorphicTests-mt.33.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicTests to project The Trunk: http://source.squeak.org/trunk/MorphicTests-mt.33.mcz ==================== Summary ==================== Name: MorphicTests-mt.33 Author: mt Time: 20 June 2016, 5:14:51.500796 pm UUID: 18fd6b33-66f2-d541-84a8-d8ede4a28134 Ancestors: MorphicTests-mt.32 More tests for Morphic event dispatchs. Use custom hand morph for these tests. =============== Diff against MorphicTests-mt.32 =============== Item was added: + HandMorph subclass: #HandMorphForEventTests + instanceVariableNames: 'eventsDuringCapture eventsDuringBubble eventsRejected eventsFiltered isHandling' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicTests-Events'! Item was added: + ----- Method: HandMorphForEventTests>>eventsDuringBubble (in category 'accessing') ----- + eventsDuringBubble + ^ eventsDuringBubble ifNil: [eventsDuringBubble := OrderedCollection new]! Item was added: + ----- Method: HandMorphForEventTests>>eventsDuringCapture (in category 'accessing') ----- + eventsDuringCapture + ^ eventsDuringCapture ifNil: [eventsDuringCapture := OrderedCollection new]! Item was added: + ----- Method: HandMorphForEventTests>>eventsFiltered (in category 'accessing') ----- + eventsFiltered + ^ eventsFiltered ifNil: [eventsFiltered := OrderedCollection new]! Item was added: + ----- Method: HandMorphForEventTests>>eventsRejected (in category 'accessing') ----- + eventsRejected + ^ eventsRejected ifNil: [eventsRejected := OrderedCollection new]! Item was added: + ----- Method: HandMorphForEventTests>>filterEvent:for: (in category 'event filtering') ----- + filterEvent: anEvent for: aMorphOrNil + + self eventsFiltered add: anEvent copy -> aMorphOrNil. + ^ anEvent! Item was added: + ----- Method: HandMorphForEventTests>>handleEvent: (in category 'events-processing') ----- + handleEvent: anEvent + + (isHandling == true and: [(#(mouseOver mouseMove) includes: anEvent type) not]) ifTrue: [Error signal: 'Recursive handling detected!!']. + isHandling := true. + self eventsDuringBubble add: anEvent copy. + [^ super handleEvent: anEvent] + ensure: [isHandling := false].! Item was added: + ----- Method: HandMorphForEventTests>>handleEventSilently: (in category 'events-processing') ----- + handleEventSilently: anEvent + + ^ super handleEvent: anEvent! Item was added: + ----- Method: HandMorphForEventTests>>processEvent:using: (in category 'events-processing') ----- + processEvent: anEvent using: dispatcher + + self eventsDuringCapture add: anEvent copy. + ^ super processEvent: anEvent using: dispatcher! Item was added: + ----- Method: HandMorphForEventTests>>rejectsEvent: (in category 'events-processing') ----- + rejectsEvent: anEvent + + ^ (super rejectsEvent: anEvent) + ifTrue: [self eventsRejected add: anEvent copy. true] + ifFalse: [false]! Item was added: + ----- Method: MorphicEventDispatcherTests>>test08FocusEventBubblingNoHand (in category 'tests') ----- + test08FocusEventBubblingNoHand + "If you drag something, do not bubble up to the hand." + + | m1 | + m1 := MorphForEventTests new noMouseDown. + hand grabMorph: m1. + + hand newKeyboardFocus: m1. + + self assert: (hand eventsDuringBubble noneSatisfy: [:ea | ea isKeystroke]). + self assert: (m1 eventsDuringBubble noneSatisfy: [:ea | ea isKeystroke]). + + self + shouldnt: [hand handleEventSilently: (self keystroke: $x at: 0@0)] + raise: Error. + + self assert: (hand eventsDuringBubble noneSatisfy: [:ea | ea isKeystroke]). + self assert: (m1 eventsDuringBubble anySatisfy: [:ea | ea isKeystroke]). + ! Item was added: + ----- Method: MorphicEventDispatcherTests>>test09FocusEventCapturingNoHand (in category 'tests') ----- + test09FocusEventCapturingNoHand + "Avoid duplication of capture step in hand for focus events." + + | m1 | + m1 := MorphForEventTests new noMouseDown. + hand grabMorph: m1. + + hand newKeyboardFocus: m1. + + self assert: (hand eventsDuringCapture noneSatisfy: [:ea | ea isKeystroke]). + self assert: (m1 eventsDuringCapture noneSatisfy: [:ea | ea isKeystroke]). + + hand handleEventSilently: (self keystroke: $x at: 0@0). + + self assert: (hand eventsDuringCapture noneSatisfy: [:ea | ea isKeystroke]). + self assert: (m1 eventsDuringCapture noneSatisfy: [:ea | ea isKeystroke]).! Item was changed: ----- Method: UserInputEventTests>>setUp (in category 'running') ----- setUp super setUp. + - world := (PasteUpMorph newWorldForProject: nil) extent: 300@200; viewBox: (0@0 extent: 300@200); yourself. (world instVarNamed: #worldState) instVarNamed: #canvas put: (Form extent: 300@200 depth: 32) getCanvas. + hand := HandMorphForEventTests new. + + world + removeHand: world firstHand; "the default hand" + addHand: hand.! - hand := world firstHand.! Item was added: + ----- Method: UserInputEventTests>>tearDown (in category 'running') ----- + tearDown + + hand showHardwareCursor: true. "Nasty side-effect" + super tearDown.! From Marcel.Taeumel at hpi.de Mon Jun 20 14:59:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 20 15:39:41 2016 Subject: [squeak-dev] Re: System and user processes In-Reply-To: References: Message-ID: <1466434784156-4901914.post@n4.nabble.com> Max Leske wrote > Hi, > > In Pharo and Squeak we have no separation between processes that belong to > the IDE, tools etc. and processes that are spawned as part of an > application. I?d like to know your opinion on the following (rough) idea: > > 1. We introduce two subclasses of Process: SystemProcess and UserProcess > 2. We define #isSystemProcess and #isUserProcess > 3. We introduce #newSystemProcess and #newUserProcess > 4. We deprecate #newProcess and delegate to #newUserProcess (thereby > modifying all users of #forkXXX to yield instances of UserProcess) > > Of the following I?m less sure: > 5. We introduce #forkSystemProcess et. al > > I?ve tried this out in Pharo 6 and there seem to be no problems with the > VM. The benefit would be improved separation between system and user > space. It would allow us to implement stuff for processes in general (e.g. > for the debugger) which we do not want to affect system processes like the > UI process or the background process. One concrete example: the process > browser could hide all system processes and make them visible on demand > (that would greatly improve the view because you can now better find your > own processes). > > > I?m looking forward to your comments. > > Cheers, > Max Hi Max, I like the idea. Let's see... System processes in Squeak could be: - the timer interrupt watcher - the event tickler - the low space watcher - the user interrupt watcher - the idle process I am not so sure about: - the WeakArray finalization process (still needed for Ephemerons?) Then we have the UI framework(s). The frameworks' processes could be user processes or system processes, too? Hmm... for Morphic, there is only one. Stepping is implemented with the same UI process. Applications that spawn other (user) processes work around Morphic anyway. Tweak uses (or used) many processes to execute scripts. So, the Tweak UI has a set of related processes, not just a single UI process. MVC has only one process running but creates/terminates processes when switching controllers. If you play a MIDI or a Sound, should that process also be a system process, right? Hmm... Interactive debugging is tricky only with respect to the current UI framework because you want to be able to also debug that frameworks code and its applications. While writing the debugger in that framework, too. So, it is above the level of processes but at the level of the UI framework (resp. projects). At least in Squeak. Hmm... for a filter in the process browser, a simple flag would be enough. No need to add subclasses. So, whout be the benefits of distinguishing between UserProcess and SystemProcess at process creation time? How to decide? Might it be related to additional warnings? Calling "Smalltalk snapshot: true andQuit: true" from a process in an endless loop might be detected if you do that from within a UserProcess. :-D Maybe introduce restrictions/warnings at the level of message dispatch for UserProcesses? Hmm... Best, Marcel -- View this message in context: http://forum.world.st/System-and-user-processes-tp4901765p4901914.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon Jun 20 15:01:51 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 20 15:41:48 2016 Subject: [squeak-dev] Re: Angry my self In-Reply-To: <1466391475964-4901835.post@n4.nabble.com> References: <1466391475964-4901835.post@n4.nabble.com> Message-ID: <1466434911705-4901915.post@n4.nabble.com> Hi Sergio, did you try to download the all-in-one [1] and did not get it running on Windows (32-bit)? Was it Windows 7, 8, 8.1, 10? XP? Best, Marcel [1] http://files.squeak.org/5.0/Squeak-5.0-All-in-One.zip -- View this message in context: http://forum.world.st/Angry-my-self-tp4901835p4901915.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon Jun 20 15:03:26 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 20 15:43:24 2016 Subject: [squeak-dev] Re: NuScratch source on SqueakMap In-Reply-To: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> Message-ID: <1466435006892-4901916.post@n4.nabble.com> tim Rowledge wrote > There is now a SM entry pointing to a SqueakSource copy of the current > NuScratch as per the Raspberry Pi. It is a rather substantial collection > of bug fixes, performance improvements, tidy-ups, speed-ups etc to the > original Scratch developed by the MIT team. Project files read and saved > are fully compatible with the original system. > > It runs on modern Squeak systems - I use a 5.0 with updates and it is > likely that it won?t run perfectly on anything earlier than say #15852 > because some time around then the help balloon stuff changed. I use a > Cog/Spur system and make no representation about how well it might work on > a non-spur or non-Cog system - I just don?t know and don?t really care. > > On a RaspberryPi3 it runs large game-like Scratch programs about twice as > fast as the original Scratch (a 2.8-ish image on a contemporary > interpreter) runs on a modest mac laptop. Or to put it another way, it?s > about a gazillion times faster than original Scratch on the same Pi. > > The licensing remains as per the Scratch Source Code License (google it). > You will need to download and unzip a copy of > http://download.scratch.mit.edu/source-code/ScratchSkin1.4.zip *before* > attempting to install the package. > > It does *not* include the RaspberryPi specific GPIOServer code; that will > appear in a separate package soon. That provides a way to drive al sorts > of fun add-on hardware from Scratch - and indeed the lower level driver > code for that provides a general Squeak access to the gpio pins and > add-ons. > > tim > -- > tim Rowledge; > tim@ > ; http://www.rowledge.org/tim > Useful Latin Phrases:- Fac ut vivas. = Get a life. Hi Tim, if you have troubles with the NewBalloonMorph, try disabling the preference "use new balloon morphs". We are still working on harmonizing both. The new one has no good support to not appear at the mouse cursor. :-) Best, Marcel -- View this message in context: http://forum.world.st/NuScratch-source-on-SqueakMap-tp4901584p4901916.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Mon Jun 20 17:48:50 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jun 20 17:49:34 2016 Subject: [squeak-dev] Re: [Vm-dev] System and user processes In-Reply-To: References: Message-ID: Hi Max, I had a similar idea, and made a ClientProcess class. Its primary purpose is to provide a nice wrapping API for *users* to manage their "background running tasks" (i.e., #start, #stop, #pause, #resume, #progress, #priority adjustment), as well as a nice API for *developers* to report its progress via a simple signaling mechanism, which also gives the user all the performance stats for "free" too like #unitsCompleted, #runningTime, #ratePerSecond, #remainingTime, etc. On Sun, Jun 19, 2016 at 4:03 AM, Max Leske wrote: > > Hi, > > In Pharo and Squeak we have no separation between processes that belong to the IDE, tools etc. and processes that are spawned as part of an application. I?d like to know your opinion on the following (rough) idea: > > 1. We introduce two subclasses of Process: SystemProcess and UserProcess > 2. We define #isSystemProcess and #isUserProcess > 3. We introduce #newSystemProcess and #newUserProcess > 4. We deprecate #newProcess and delegate to #newUserProcess (thereby modifying all users of #forkXXX to yield instances of UserProcess) > > Of the following I?m less sure: > 5. We introduce #forkSystemProcess et. al > > I?ve tried this out in Pharo 6 and there seem to be no problems with the VM. The benefit would be improved separation between system and user space. It would allow us to implement stuff for processes in general (e.g. for the debugger) which we do not want to affect system processes like the UI process or the background process. One concrete example: the process browser could hide all system processes and make them visible on demand (that would greatly improve the view because you can now better find your own processes). > > > I?m looking forward to your comments. > > Cheers, > Max From tonyg at ccs.neu.edu Mon Jun 20 19:32:14 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Mon Jun 20 19:32:17 2016 Subject: [squeak-dev] System and user processes In-Reply-To: References: Message-ID: Hi Max, Perhaps a notion of process grouping might make sense? Following the zero-one-infinity principle, having exactly two kinds of process seems a bit odd. Having process grouping would lead to a tree of processes. For example, the outermost level could be "system" processes, of which one was a group containing all "user" processes. Or, the outermost level could have two children, one group of "system" procs, one of "user" procs; or, ... The "current process group" would be a kind of dynamic parameter, and newly-forked processes would by default become siblings of the forker in the current group. Regards, Tony On 06/19/2016 05:03 AM, Max Leske wrote: > Hi, > > In Pharo and Squeak we have no separation between processes that > belong to the IDE, tools etc. and processes that are spawned as part > of an application. I?d like to know your opinion on the following > (rough) idea: > > 1. We introduce two subclasses of Process: SystemProcess and > UserProcess 2. We define #isSystemProcess and #isUserProcess 3. We > introduce #newSystemProcess and #newUserProcess 4. We deprecate > #newProcess and delegate to #newUserProcess (thereby modifying all > users of #forkXXX to yield instances of UserProcess) > > Of the following I?m less sure: 5. We introduce #forkSystemProcess > et. al > > I?ve tried this out in Pharo 6 and there seem to be no problems with > the VM. The benefit would be improved separation between system and > user space. It would allow us to implement stuff for processes in > general (e.g. for the debugger) which we do not want to affect system > processes like the UI process or the background process. One concrete > example: the process browser could hide all system processes and make > them visible on demand (that would greatly improve the view because > you can now better find your own processes). > > > I?m looking forward to your comments. > > Cheers, Max > From commits at source.squeak.org Mon Jun 20 21:56:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Jun 20 21:56:56 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160620215655.17039.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-June/068229.html Name: Morphic-mt.1182 Ancestors: Morphic-mt.1181 Moves implementation of focus event dispatching from various places into MorphicEventDispatcher. This will ensure consistency in the future because MorphicEventDispatcher encode the tree iteration with capturing and bubbling. Doing a focus event is just a shortcut into the tree. TextMorphs use that. Pop-up menus use that. Modal dialogs use that. Fixes missing coordinate transformations when capturing and bubbling for focus events. Simplify focus-related code in MenuMorph, UserDialogBoxMorph, and DockingBarMorph. At the time of writing, there seems to be no need anymore for Morph >> #handleFocusEvent:. Still, keep it for compatibility to other projects. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068230.html Name: MorphicTests-mt.33 Ancestors: MorphicTests-mt.32 More tests for Morphic event dispatchs. Use custom hand morph for these tests. ============================================= From btc at openinworld.com Tue Jun 21 04:59:04 2016 From: btc at openinworld.com (Ben Coman) Date: Tue Jun 21 04:59:28 2016 Subject: [squeak-dev] System and user processes In-Reply-To: References: Message-ID: > On 06/19/2016 05:03 AM, Max Leske wrote: >> Hi, >> >> In Pharo and Squeak we have no separation between processes that >> belong to the IDE, tools etc. and processes that are spawned as part >> of an application. I?d like to know your opinion on the following >> (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and >> UserProcess 2. We define #isSystemProcess and #isUserProcess 3. We >> introduce #newSystemProcess and #newUserProcess 4. We deprecate >> #newProcess and delegate to #newUserProcess (thereby modifying all >> users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: 5. We introduce #forkSystemProcess >> et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with >> the VM. The benefit would be improved separation between system and >> user space. It would allow us to implement stuff for processes in >> general (e.g. for the debugger) which we do not want to affect system >> processes like the UI process or the background process. One concrete >> example: the process browser could hide all system processes and make >> them visible on demand (that would greatly improve the view because >> you can now better find your own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, Max >> > On Tue, Jun 21, 2016 at 3:32 AM, Tony Garnock-Jones wrote: > Hi Max, > > Perhaps a notion of process grouping might make sense? Following the > zero-one-infinity principle, having exactly two kinds of process seems a > bit odd. > > Having process grouping would lead to a tree of processes. > > For example, the outermost level could be "system" processes, of which > one was a group containing all "user" processes. > > Or, the outermost level could have two children, one group of "system" > procs, one of "user" procs; or, ... > > The "current process group" would be a kind of dynamic parameter, and > newly-forked processes would by default become siblings of the forker in > the current group. > > Regards, > Tony This sounds like a good idea. It would make it easier for a user of multiple applications in one image to properly kill one. For this reason, perhaps there should be some impediment on apps adding processes adding the System Process group(??) cheers -ben From maxleske at gmail.com Tue Jun 21 06:13:48 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 21 06:13:53 2016 Subject: [squeak-dev] Re: [Pharo-dev] [Vm-dev] System and user processes In-Reply-To: References: Message-ID: <6AA5B65F-4994-43EF-976E-E8FEFE99D4C4@gmail.com> > On 20 Jun 2016, at 19:48, Chris Muller wrote: > > Hi Max, I had a similar idea, and made a ClientProcess class. Its > primary purpose is to provide a nice wrapping API for *users* to > manage their "background running tasks" (i.e., #start, #stop, #pause, > #resume, #progress, #priority adjustment), as well as a nice API for > *developers* to report its progress via a simple signaling mechanism, > which also gives the user all the performance stats for "free" too > like #unitsCompleted, #runningTime, #ratePerSecond, #remainingTime, > etc. Very nice! So I don?t seem to be the only one to think there may be room for improvement :) Your idea focuses on a different aspect of course but both ideas would go well together I think. Is your code public somewhere? Just in case this gains some traction. Cheers, Max > > On Sun, Jun 19, 2016 at 4:03 AM, Max Leske wrote: >> >> Hi, >> >> In Pharo and Squeak we have no separation between processes that belong to the IDE, tools etc. and processes that are spawned as part of an application. I?d like to know your opinion on the following (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and UserProcess >> 2. We define #isSystemProcess and #isUserProcess >> 3. We introduce #newSystemProcess and #newUserProcess >> 4. We deprecate #newProcess and delegate to #newUserProcess (thereby modifying all users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: >> 5. We introduce #forkSystemProcess et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with the VM. The benefit would be improved separation between system and user space. It would allow us to implement stuff for processes in general (e.g. for the debugger) which we do not want to affect system processes like the UI process or the background process. One concrete example: the process browser could hide all system processes and make them visible on demand (that would greatly improve the view because you can now better find your own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, >> Max > From Marcel.Taeumel at hpi.de Tue Jun 21 07:33:17 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 21 08:13:20 2016 Subject: [squeak-dev] Re: [Vm-dev] System and user processes In-Reply-To: References: Message-ID: <1466494397918-4902025.post@n4.nabble.com> Chris Muller-3 wrote > Hi Max, I had a similar idea, and made a ClientProcess class. Its > primary purpose is to provide a nice wrapping API for *users* to > manage their "background running tasks" (i.e., #start, #stop, #pause, > #resume, #progress, #priority adjustment), as well as a nice API for > *developers* to report its progress via a simple signaling mechanism, > which also gives the user all the performance stats for "free" too > like #unitsCompleted, #runningTime, #ratePerSecond, #remainingTime, > etc. > > On Sun, Jun 19, 2016 at 4:03 AM, Max Leske < > maxleske@ > > wrote: >> >> Hi, >> >> In Pharo and Squeak we have no separation between processes that belong >> to the IDE, tools etc. and processes that are spawned as part of an >> application. I?d like to know your opinion on the following (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and UserProcess >> 2. We define #isSystemProcess and #isUserProcess >> 3. We introduce #newSystemProcess and #newUserProcess >> 4. We deprecate #newProcess and delegate to #newUserProcess (thereby >> modifying all users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: >> 5. We introduce #forkSystemProcess et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with the >> VM. The benefit would be improved separation between system and user >> space. It would allow us to implement stuff for processes in general >> (e.g. for the debugger) which we do not want to affect system processes >> like the UI process or the background process. One concrete example: the >> process browser could hide all system processes and make them visible on >> demand (that would greatly improve the view because you can now better >> find your own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, >> Max Hi Chris, Hmm... I would implement such an API rather via composition than inheritance. Such a task does not necessarily have to run in the same image but could also be accomplished on another machine. OSProcess has RemoteTask for this. Inheritance would make things complicated once one would decide to not carry out the computation as a Squeak process. I do like Tony's idea of process groups. We could think this one step further an add multiple tags (symbols?) to processes to support fine-granular or cross-cutting classifications. Tools like the process browser could show these tags, group by them, etc. There could be tags to identify processes that would stop working once you close the Squeak image (e.g. "not resumable")... Hmmm... Application developers could use tags to provide hints for other developers and users. Best, Marcel -- View this message in context: http://forum.world.st/System-and-user-processes-tp4901765p4902025.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Jun 21 12:06:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 21 12:06:15 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1183.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1183.mcz ==================== Summary ==================== Name: Morphic-mt.1183 Author: mt Time: 21 June 2016, 2:05:38.378974 pm UUID: 56a07e0a-08c1-6d4b-8275-9c6a2affdba7 Ancestors: Morphic-mt.1182 Fixes regression in docking bar. A simple click now keeps the menu open again. =============== Diff against Morphic-mt.1182 =============== Item was changed: ----- Method: DockingBarItemMorph>>mouseDown: (in category 'events') ----- mouseDown: evt "Handle a mouse down event. Menu items get activated when the mouse is over them." (evt shiftPressed and:[self wantsKeyboardFocusOnShiftClick]) ifTrue: [ ^super mouseDown: evt ]. "enable label editing" isSelected ifTrue: [ - evt hand newMouseFocus: nil. owner selectItem: nil event: evt. ] ifFalse: [ - (self containsPoint: evt position) ifFalse: [ self halt ]. owner activate: evt. "Redirect to menu for valid transitions" owner selectItem: self event: evt. ] ! Item was changed: ----- Method: DockingBarItemMorph>>mouseUp: (in category 'events') ----- mouseUp: evt "Handle a mouse up event. Menu items get activated when the mouse is over them. Do nothing if we're not in a 'valid menu transition', meaning that the current hand focus must be aimed at the owning menu." evt hand mouseFocus == owner ifFalse: [ ^self ]. self contentString ifNotNil: [ self contents: self contentString withMarkers: true inverse: true. self refreshWorld. + (Delay forMilliseconds: 200) wait ].! - (Delay forMilliseconds: 200) wait ]. - owner rootMenu selectItem: nil event: evt. - self invokeWithEvent: evt! Item was added: + ----- Method: DockingBarMorph>>indicateKeyboardFocus (in category 'testing') ----- + indicateKeyboardFocus + ^ false! Item was changed: ----- Method: DockingBarMorph>>mouseDown: (in category 'events-processing') ----- mouseDown: evt (self fullContainsPoint: evt position) ifFalse: [ self selectItem: nil event: evt. + self deleteIfPopUp: evt ]! - evt hand releaseMouseFocus: self ]! Item was added: + ----- Method: DockingBarMorph>>mouseUp: (in category 'events-processing') ----- + mouseUp: evt + + evt hand newMouseFocus: self.! Item was changed: ----- Method: MenuMorph>>mouseMove: (in category 'events') ----- mouseMove: evt " If the mouse moves over an item not selected, we try to set it as selected. If this happens depends on that the current selected item wants to release its selection. " + "Note: The following does not traverse upwards but it's the best I can do for now" + popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue: [^ self]]. + self selectedItem ifNil: [ ^ self ]. (self selectedItem containsPoint: evt position) ifTrue: [ ^ self ]. self selectItem: ( self items detect: [ :each | each containsPoint: evt position ] ifNone: [ nil ]) event: evt. "Transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." selectedItem ifNotNil: [ (selectedItem activateSubmenu: evt) ifTrue: [ ^self ] ifFalse: [ (self containsPoint: evt position) ifFalse: [ + self selectItem: nil event: evt ] ] ].! - self selectItem: nil event: evt ] ] ]. - - "Note: The following does not traverse upwards but it's the best I can do for now" - popUpOwner ifNotNil:[popUpOwner activateOwnerMenu: evt]! Item was changed: ----- Method: MenuMorph>>mouseUp: (in category 'events') ----- mouseUp: evt "Handle a mouse up event. Note: This might be sent from a modal shell." (self fullContainsPoint: evt position) ifFalse:[ + ^ self deleteIfPopUp: evt]. - "Mouse up outside. Release eventual focus and delete if pop up." - evt hand releaseMouseFocus: self. - ^self deleteIfPopUp: evt]. stayUp ifFalse:[ "Still in pop-up transition; keep focus" evt hand newMouseFocus: self].! From commits at source.squeak.org Tue Jun 21 12:12:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 21 12:12:58 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1184.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1184.mcz ==================== Summary ==================== Name: Morphic-mt.1184 Author: mt Time: 21 June 2016, 2:12:23.053974 pm UUID: 6dad4a60-1b46-d049-a8af-afaae6989874 Ancestors: Morphic-mt.1183 Fixes regression (?) to make opening sub-sub menus -- not to the right but to the left due to limited screen space -- work again. =============== Diff against Morphic-mt.1183 =============== Item was changed: ----- Method: MenuMorph>>mouseMove: (in category 'events') ----- mouseMove: evt " If the mouse moves over an item not selected, we try to set it as selected. If this happens depends on that the current selected item wants to release its selection. " + self selectedItem ifNil: [ + self + selectItem: ( + self items + detect: [ :each | each containsPoint: evt position ] + ifNone: [ nil ]) + event: evt]. - "Note: The following does not traverse upwards but it's the best I can do for now" - popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue: [^ self]]. - self selectedItem ifNil: [ ^ self ]. - (self selectedItem containsPoint: evt position) ifTrue: [ ^ self ]. - self - selectItem: ( - self items - detect: [ :each | each containsPoint: evt position ] - ifNone: [ nil ]) - event: evt. - "Transfer control to *either* the currently active submenu or the pop up owner, if any. Since the active sub menu is always displayed upfront check it first." + self selectedItem ifNotNil: [ + (self selectedItem activateSubmenu: evt) - selectedItem ifNotNil: [ - (selectedItem activateSubmenu: evt) ifTrue: [ ^self ] ifFalse: [ (self containsPoint: evt position) ifFalse: [ + self selectItem: nil event: evt ] ] ]. + + "Note: The following does not traverse upwards but it's the best I can do for now" + popUpOwner ifNotNil:[(popUpOwner activateOwnerMenu: evt) ifTrue: [^ self]]. + ! - self selectItem: nil event: evt ] ] ].! From maxleske at gmail.com Tue Jun 21 13:27:24 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 21 13:27:29 2016 Subject: [squeak-dev] Re: System and user processe In-Reply-To: <57692dc3.0480370a.e93a2.4ec8SMTPIN_ADDED_MISSING@mx.google.com> References: <57692dc3.0480370a.e93a2.4ec8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <68797D11-3333-482E-90FB-42386719EFCB@gmail.com> > Max Leske wrote >> Hi, >> >> In Pharo and Squeak we have no separation between processes that belong to >> the IDE, tools etc. and processes that are spawned as part of an >> application. I?d like to know your opinion on the following (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and UserProcess >> 2. We define #isSystemProcess and #isUserProcess >> 3. We introduce #newSystemProcess and #newUserProcess >> 4. We deprecate #newProcess and delegate to #newUserProcess (thereby >> modifying all users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: >> 5. We introduce #forkSystemProcess et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with the >> VM. The benefit would be improved separation between system and user >> space. It would allow us to implement stuff for processes in general (e.g. >> for the debugger) which we do not want to affect system processes like the >> UI process or the background process. One concrete example: the process >> browser could hide all system processes and make them visible on demand >> (that would greatly improve the view because you can now better find your >> own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, >> Max > > Hi Max, > > I like the idea. Let's see... > > System processes in Squeak could be: > - the timer interrupt watcher > - the event tickler > - the low space watcher > - the user interrupt watcher > - the idle process > > I am not so sure about: > - the WeakArray finalization process (still needed for Ephemerons?) > > Then we have the UI framework(s). The frameworks' processes could be user > processes or system processes, too? Hmm... for Morphic, there is only one. > Stepping is implemented with the same UI process. Applications that spawn > other (user) processes work around Morphic anyway. > > Tweak uses (or used) many processes to execute scripts. So, the Tweak UI has > a set of related processes, not just a single UI process. > > MVC has only one process running but creates/terminates processes when > switching controllers. > > If you play a MIDI or a Sound, should that process also be a system process, > right? Hmm... > > Interactive debugging is tricky only with respect to the current UI > framework because you want to be able to also debug that frameworks code and > its applications. While writing the debugger in that framework, too. So, it > is above the level of processes but at the level of the UI framework (resp. > projects). At least in Squeak. > > Hmm... for a filter in the process browser, a simple flag would be enough. > No need to add subclasses. So, whout be the benefits of distinguishing > between UserProcess and SystemProcess at process creation time? How to > decide? Might it be related to additional warnings? Calling "Smalltalk > snapshot: true andQuit: true" from a process in an endless loop might be > detected if you do that from within a UserProcess. :-D > > Maybe introduce restrictions/warnings at the level of message dispatch for > UserProcesses? Hmm? You essentially get my point. For the process browser a flag would be enough, yes, but that?s not really OO, is it? :) Anyway, I see a couple of ?direct? benefits: - better implementation of user interrupt handling (user processes can always be interrupted) - kill all user processes (system will keep running) - different low space settings for system and user processes (yes, that would probably require a VM change, but still?) - system processes could be prevented from starving (e.g. a user process must yield at least every n milliseconds) ... > > Best, > Marcel > > From maxleske at gmail.com Tue Jun 21 13:35:25 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 21 13:35:30 2016 Subject: [squeak-dev] Re: System and user processe Message-ID: <1FBA226F-25E2-4BFE-A7DD-DAD4B3A985B4@gmail.com> > Hi Max, > > Perhaps a notion of process grouping might make sense? Following the > zero-one-infinity principle, having exactly two kinds of process seems a > bit odd. I agree. I just wanted to get the idea out there without proposing a complete POSIX process model. And I found it interesting that we actually could use subclasses without needing special support from the VM. > > Having process grouping would lead to a tree of processes. > > For example, the outermost level could be "system" processes, of which > one was a group containing all "user" processes. > > Or, the outermost level could have two children, one group of "system" > procs, one of "user" procs; or, ... > > The "current process group" would be a kind of dynamic parameter, and > newly-forked processes would by default become siblings of the forker in > the current group. > > Regards, > Tony I think that grouping makes a lot of sense. However, the current model has also served us well, maybe exactly because it is simple. Adding a lot of complexity will not necessarily make things better (especially for newcomers). Maybe there?s a middle ground where high level processes maintain a very simple API (like Chris proposed) and where you don?t have to know about process groups (those processes might just go into a default group, essentially what you describe with ?current process group"). Really not sure? Cheers, Max > > > > On 06/19/2016 05:03 AM, Max Leske wrote: > Hi, > > In Pharo and Squeak we have no separation between processes that > belong to the IDE, tools etc. and processes that are spawned as part > of an application. I?d like to know your opinion on the following > (rough) idea: > > 1. We introduce two subclasses of Process: SystemProcess and > UserProcess 2. We define #isSystemProcess and #isUserProcess 3. We > introduce #newSystemProcess and #newUserProcess 4. We deprecate > #newProcess and delegate to #newUserProcess (thereby modifying all > users of #forkXXX to yield instances of UserProcess) > > Of the following I?m less sure: 5. We introduce #forkSystemProcess > et. al > > I?ve tried this out in Pharo 6 and there seem to be no problems with > the VM. The benefit would be improved separation between system and > user space. It would allow us to implement stuff for processes in > general (e.g. for the debugger) which we do not want to affect system > processes like the UI process or the background process. One concrete > example: the process browser could hide all system processes and make > them visible on demand (that would greatly improve the view because > you can now better find your own processes). > > > I?m looking forward to your comments. > > Cheers, Max From maxleske at gmail.com Tue Jun 21 13:37:31 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 21 13:37:36 2016 Subject: [squeak-dev] Re: System and user processe Message-ID: <2C326DF7-9D68-4F91-880B-3921B273599A@gmail.com> >> On 06/19/2016 05:03 AM, Max Leske wrote: >> Hi, >> >> In Pharo and Squeak we have no separation between processes that >> belong to the IDE, tools etc. and processes that are spawned as part >> of an application. I?d like to know your opinion on the following >> (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and >> UserProcess 2. We define #isSystemProcess and #isUserProcess 3. We >> introduce #newSystemProcess and #newUserProcess 4. We deprecate >> #newProcess and delegate to #newUserProcess (thereby modifying all >> users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: 5. We introduce #forkSystemProcess >> et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with >> the VM. The benefit would be improved separation between system and >> user space. It would allow us to implement stuff for processes in >> general (e.g. for the debugger) which we do not want to affect system >> processes like the UI process or the background process. One concrete >> example: the process browser could hide all system processes and make >> them visible on demand (that would greatly improve the view because >> you can now better find your own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, Max >> >> >> >> On Tue, Jun 21, 2016 at 3:32 AM, Tony Garnock-Jones wrote: >> Hi Max, >> >> Perhaps a notion of process grouping might make sense? Following the >> zero-one-infinity principle, having exactly two kinds of process seems a >> bit odd. >> >> Having process grouping would lead to a tree of processes. >> >> For example, the outermost level could be "system" processes, of which >> one was a group containing all "user" processes. >> >> Or, the outermost level could have two children, one group of "system" >> procs, one of "user" procs; or, ... >> >> The "current process group" would be a kind of dynamic parameter, and >> newly-forked processes would by default become siblings of the forker in >> the current group. >> >> Regards, >> Tony > > This sounds like a good idea. It would make it easier for a user of > multiple applications in one image to properly kill one. For this > reason, perhaps there should be some impediment on apps adding > processes adding the System Process group(??) > > cheers -ben Yes. That?s why in my proposal the default is to create a user process. Cheers, Max From maxleske at gmail.com Tue Jun 21 13:46:37 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 21 13:46:42 2016 Subject: [squeak-dev] Re: System and user processe Message-ID: <388BD9D2-8BF2-47E4-BBBD-4BBB0380D1F2@gmail.com> >> Message: 17 >> Date: Tue, 21 Jun 2016 00:33:17 -0700 (PDT) >> From: "marcel.taeumel" >> Subject: [squeak-dev] Re: [Vm-dev] System and user processes >> To: squeak-dev@lists.squeakfoundation.org >> Message-ID: <1466494397918-4902025.post@n4.nabble.com> >> Content-Type: text/plain; charset=UTF-8 >> >> Chris Muller-3 wrote >> Hi Max, I had a similar idea, and made a ClientProcess class. Its >> primary purpose is to provide a nice wrapping API for *users* to >> manage their "background running tasks" (i.e., #start, #stop, #pause, >> #resume, #progress, #priority adjustment), as well as a nice API for >> *developers* to report its progress via a simple signaling mechanism, >> which also gives the user all the performance stats for "free" too >> like #unitsCompleted, #runningTime, #ratePerSecond, #remainingTime, >> etc. >> >> On Sun, Jun 19, 2016 at 4:03 AM, Max Leske < >> >> maxleske@ >> >> > wrote: >> >> Hi, >> >> In Pharo and Squeak we have no separation between processes that belong >> to the IDE, tools etc. and processes that are spawned as part of an >> application. I?d like to know your opinion on the following (rough) idea: >> >> 1. We introduce two subclasses of Process: SystemProcess and UserProcess >> 2. We define #isSystemProcess and #isUserProcess >> 3. We introduce #newSystemProcess and #newUserProcess >> 4. We deprecate #newProcess and delegate to #newUserProcess (thereby >> modifying all users of #forkXXX to yield instances of UserProcess) >> >> Of the following I?m less sure: >> 5. We introduce #forkSystemProcess et. al >> >> I?ve tried this out in Pharo 6 and there seem to be no problems with the >> VM. The benefit would be improved separation between system and user >> space. It would allow us to implement stuff for processes in general >> (e.g. for the debugger) which we do not want to affect system processes >> like the UI process or the background process. One concrete example: the >> process browser could hide all system processes and make them visible on >> demand (that would greatly improve the view because you can now better >> find your own processes). >> >> >> I?m looking forward to your comments. >> >> Cheers, >> Max > > Hi Chris, > > Hmm... I would implement such an API rather via composition than > inheritance. Such a task does not necessarily have to run in the same image > but could also be accomplished on another machine. OSProcess has RemoteTask > for this. Inheritance would make things complicated once one would decide to > not carry out the computation as a Squeak process. > > I do like Tony's idea of process groups. We could think this one step > further an add multiple tags (symbols?) to processes to support > fine-granular or cross-cutting classifications. Tools like the process > browser could show these tags, group by them, etc. There could be tags to > identify processes that would stop working once you close the Squeak image > (e.g. "not resumable")... Hmmm... Application developers could use tags to > provide hints for other developers and users. > > Best, > Marcel Good point. Inheritance is nice but as for our infamous stream hierarchy processes would probably need to be grouped by different traits. But I think that groups and tags may be two different things. Tony?s ?current process group? for instance would have to implemented as a special tag already, unless a new process simply inherited all tags. In Pharo (I don?t know about Squeak) we now have a session manager that can be asked if the current session has changed, i.e. whether the image has been restarted. Now, instead of checking in with the session manager explicitly I could use a ?session dependant? process, which terminates when the session changes. Cheers, Max From asqueaker at gmail.com Tue Jun 21 15:37:04 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 21 15:37:45 2016 Subject: [squeak-dev] Re: System and user processe In-Reply-To: <388BD9D2-8BF2-47E4-BBBD-4BBB0380D1F2@gmail.com> References: <388BD9D2-8BF2-47E4-BBBD-4BBB0380D1F2@gmail.com> Message-ID: >> Hmm... I would implement such an API rather via composition than >> inheritance. Such a task does not necessarily have to run in the same image >> but could also be accomplished on another machine. OSProcess has RemoteTask >> for this. Inheritance would make things complicated once one would decide to >> not carry out the computation as a Squeak process. It is implemented via composition, not inheritance. Maybe it is name, ClientProcess, that made you assume it is a subclass of Process..? It is not. :) >> I do like Tony's idea of process groups. We could think this one step >> further an add multiple tags (symbols?) to processes to support >> fine-granular or cross-cutting classifications. > >Tools like the process >> browser could show these tags, group by them, etc. There could be tags to >> identify processes that would stop working once you close the Squeak image >> (e.g. "not resumable")... Hmmm... Application developers could use tags to >> provide hints for other developers and users. Processes already have names, which could facilitate a hierarchical naming if someone wanted, and list filtering in the Process browser would make "grouping" or "finding" a Process pretty much free.. If all you want to do is tag and group processes, I would consider putting them into named groups/containers rather than add more process-level attributes.. From commits at source.squeak.org Tue Jun 21 20:29:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 21 20:29:30 2016 Subject: [squeak-dev] The Trunk: SMLoader-tpr.87.mcz Message-ID: tim Rowledge uploaded a new version of SMLoader to project The Trunk: http://source.squeak.org/trunk/SMLoader-tpr.87.mcz ==================== Summary ==================== Name: SMLoader-tpr.87 Author: tpr Time: 21 June 2016, 1:29:19.632444 pm UUID: e1857350-474a-4c4d-a5af-f8d6226c3f79 Ancestors: SMLoader-mt.86 Improve (hopefully) the SM release browser so that a) when hitting the save button it automatically accepts changed text in the name/version/script etc views, thus avoiding the need to accept each one individually. b) instead of a blank script view we provide some examples to offer a clue to the user =============== Diff against SMLoader-mt.86 =============== Item was added: + ----- Method: SMReleaseBrowser>>exampleLoadScript (in category 'private') ----- + exampleLoadScript + "this is an example load script to offer the user rather than a blank view" + + ^'"This is where you need to provide an install script; you may need to handle prerequisites first and then load the actual package(s) Take a look at http://wiki.squeak.org/squeak/6182 for more info, especially about creating a ''load latest version'' script" + "Example to load a prerequisite package - " + SMSqueakMap default + installPackageNamed: ''myPackage'' + version: ''release name''. + "Example to load myPackage if a certain class is not already in the image -" + (Smalltalk hasClassNamed: #MyPackage) + ifFalse:[SMSqueakMap default + installPackageNamed: ''myPackage'' + version: ''release name'']. + "Or load several specifc mcz files -" + #( ''MyPackagePartA-abc.1.mcz'' ''MyPackagePartB-abc.42.mcz'' ) do: + [:each| (Installer repository: ''http://www.squeaksource.com/MyPackages'') install: each]'! Item was changed: ----- Method: SMReleaseBrowser>>loadScript (in category 'model access') ----- loadScript "The Smalltalk code needed to install this release of this package." + ^ loadScript + ifNil: [| scriptName | + scriptName := release downloadFileName. + loadScript := scriptName isEmptyOrNil + ifFalse: [(scriptName asLowercase endsWith: '.st') + ifTrue: [release contents]] + ifTrue: [self exampleLoadScript]]! - ^ loadScript ifNil: - [ | scriptName | - scriptName := release downloadFileName. - loadScript := scriptName isEmptyOrNil ifFalse: - [ (scriptName asLowercase endsWith: '.st') ifTrue: [ release contents ] ] ]! Item was changed: ----- Method: SMReleaseBrowser>>validateCanSave (in category 'private') ----- validateCanSave + "accept any changes in the text field morphs etc, then validate the input as best we can" + self changed: #acceptChanges. self username isEmptyOrNil ifTrue: [ self userError: 'username required' ]. self note isEmptyOrNil ifTrue: [ self userError: 'note required' ]. self version isEmptyOrNil ifTrue: [ self userError: 'version required' ] ifFalse: [ (self version includes: $+) ifTrue: [ self userError: 'Plus sign not allowed in version name because it is reserved by HTTP.' ] ]! From tim at rowledge.org Tue Jun 21 20:31:52 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jun 21 20:31:38 2016 Subject: [squeak-dev] SqueakMap server stuck? In-Reply-To: References: Message-ID: <350DD7DA-B979-4B2F-B4BC-7F2A45D2ED6A@rowledge.org> > On 16-06-2016, at 7:16 PM, Chris Muller wrote: > > You're a trunk committer, you're welcome to make the change to > auto-accept all fields when the user presses the "Save" button? I?ve just committed a small pair of improvements that I think make life a little simpler. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Last one out, turn off the computer! From commits at source.squeak.org Tue Jun 21 21:57:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 21 21:57:07 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160621215705.4984.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-June/068231.html Name: Morphic-mt.1183 Ancestors: Morphic-mt.1182 Fixes regression in docking bar. A simple click now keeps the menu open again. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068232.html Name: Morphic-mt.1184 Ancestors: Morphic-mt.1183 Fixes regression (?) to make opening sub-sub menus -- not to the right but to the left due to limited screen space -- work again. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068233.html Name: SMLoader-tpr.87 Ancestors: SMLoader-mt.86 Improve (hopefully) the SM release browser so that a) when hitting the save button it automatically accepts changed text in the name/version/script etc views, thus avoiding the need to accept each one individually. b) instead of a blank script view we provide some examples to offer a clue to the user ============================================= From asqueaker at gmail.com Tue Jun 21 22:53:21 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 21 22:54:03 2016 Subject: [squeak-dev] The Trunk: SMLoader-tpr.87.mcz In-Reply-To: <5769a3ad.422e370a.3cdc3.2716SMTPIN_ADDED_MISSING@mx.google.com> References: <5769a3ad.422e370a.3cdc3.2716SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Very nice. :) On Tue, Jun 21, 2016 at 3:29 PM, wrote: > tim Rowledge uploaded a new version of SMLoader to project The Trunk: > http://source.squeak.org/trunk/SMLoader-tpr.87.mcz > > ==================== Summary ==================== > > Name: SMLoader-tpr.87 > Author: tpr > Time: 21 June 2016, 1:29:19.632444 pm > UUID: e1857350-474a-4c4d-a5af-f8d6226c3f79 > Ancestors: SMLoader-mt.86 > > Improve (hopefully) the SM release browser so that > a) when hitting the save button it automatically accepts changed text in the name/version/script etc views, thus avoiding the need to accept each one individually. > b) instead of a blank script view we provide some examples to offer a clue to the user > > =============== Diff against SMLoader-mt.86 =============== > > Item was added: > + ----- Method: SMReleaseBrowser>>exampleLoadScript (in category 'private') ----- > + exampleLoadScript > + "this is an example load script to offer the user rather than a blank view" > + > + ^'"This is where you need to provide an install script; you may need to handle prerequisites first and then load the actual package(s) Take a look at http://wiki.squeak.org/squeak/6182 for more info, especially about creating a ''load latest version'' script" > + "Example to load a prerequisite package - " > + SMSqueakMap default > + installPackageNamed: ''myPackage'' > + version: ''release name''. > + "Example to load myPackage if a certain class is not already in the image -" > + (Smalltalk hasClassNamed: #MyPackage) > + ifFalse:[SMSqueakMap default > + installPackageNamed: ''myPackage'' > + version: ''release name'']. > + "Or load several specifc mcz files -" > + #( ''MyPackagePartA-abc.1.mcz'' ''MyPackagePartB-abc.42.mcz'' ) do: > + [:each| (Installer repository: ''http://www.squeaksource.com/MyPackages'') install: each]'! > > Item was changed: > ----- Method: SMReleaseBrowser>>loadScript (in category 'model access') ----- > loadScript > "The Smalltalk code needed to install this release of this package." > + ^ loadScript > + ifNil: [| scriptName | > + scriptName := release downloadFileName. > + loadScript := scriptName isEmptyOrNil > + ifFalse: [(scriptName asLowercase endsWith: '.st') > + ifTrue: [release contents]] > + ifTrue: [self exampleLoadScript]]! > - ^ loadScript ifNil: > - [ | scriptName | > - scriptName := release downloadFileName. > - loadScript := scriptName isEmptyOrNil ifFalse: > - [ (scriptName asLowercase endsWith: '.st') ifTrue: [ release contents ] ] ]! > > Item was changed: > ----- Method: SMReleaseBrowser>>validateCanSave (in category 'private') ----- > validateCanSave > + "accept any changes in the text field morphs etc, then validate the input as best we can" > + self changed: #acceptChanges. > self username isEmptyOrNil ifTrue: [ self userError: 'username required' ]. > self note isEmptyOrNil ifTrue: [ self userError: 'note required' ]. > self version isEmptyOrNil > ifTrue: [ self userError: 'version required' ] > ifFalse: > [ (self version includes: $+) ifTrue: [ self userError: 'Plus sign not allowed in version name because it is reserved by HTTP.' ] ]! > > From lewis at mail.msen.com Wed Jun 22 03:50:36 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 22 03:50:39 2016 Subject: [squeak-dev] Adding UTCDateAndTime to trunk (was: 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: <20160622035036.GA54539@shell.msen.com> I would like to consider offering UTCDateAndTime for inclusion in trunk. On 64-bit Spur, overall performance is almost twice that of the base Chronology package. In addition, the representation of DateAndTime as Posix time plus time zone offset is simpler and easier to test and understand. I cannot easily put this into the inbox, but loading the package into a trunk image is done as follows: (MCMcmUpdater updateMapNamed: 'update' repository: 'http://www.squeaksource.com/UTCDateAndTime') doUpdate: false. I have not modified any of the Chronology tests. After loading UTCDateAndTime into a trunk image, here are the tests that will fail, along with my explanation for the failures: DateAndTimeEpochTest>>testHash - DateAndTime>>hash works differently now. Test should be either updated or eliminated. DateAndTimeLeapTest>>testAsSeconds - Discussion required. I claim that #asSeconds can only make sense if it means elapsed seconds since the epoch. The prior implemention and the test are both wrong. DateAndTimeLeapTest>>testHash - DateAndTime>>hash works differently now. Test should be either updated or eliminated. DateAndTimeTest>>testPrecision - Discussion required. It is simply wrong to assume that two calls to DateAndTime class>>now will always answer different values, and it is even more wrong to fudge the clock accessors to make it appear to be doing this when it is not. Yes I know that certain database applications require distinct time stamps, but hacking the actual system clock is not the right thing to do. TimespanDoTest>>testDatesDo - Need to change the test setUp method. The original intent is to test date iteration using a time span begining with a UTC midnight. Test will pass if the start time is constructed accordingly. Note however that date iteration is suspect for durations starting at times other than midnight in the local time zone, so additional tests may be needed. TimespanDoTest>>testNext - Same issue as testDatesDo, fix the setUp method and the test will pass, but additional tests may be needed. The necessary #primitiveUtcWithOffset is present in all Cog/Spur/interpreter VMs. It is an optional named primitive (not numbered). If not present, the fallback code uses the Posix epoch for all new time values, resulting in a runnable image but with incorrect time stamps for new DateAndTime instances. Falling back to the original millisecond clock logic and primitives is possible, but it seemed to me to be an unnecessary complication so I got rid of it. Does anyone think that adding UTCDateAndTime to trunk is /not/ a good thing to do? Dave From Das.Linux at gmx.de Wed Jun 22 08:40:52 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Jun 22 08:40:54 2016 Subject: [squeak-dev] etarsoinl: Message-ID: <0E54C356-C559-4DB1-9014-A9F2ECE0FB1B@gmx.de> Hi all I was curious about the relative distribution of characters in Squeak Code. I sampled the source code[1] and drew a histogram (Attached) Here are my results: - The most frequent (printable) characters are in order etarsoinl: and more detailed, the 90 most frequent characters: etarsoinl:cdfumhpg.ybwSv"=1CT'x][0F)(k2ANPI|M^B4O7D6R3598#EL-,zWVjU;H+q/>*ITRSACkNL.P1O/wD2My"{}UF&3GB4q86HV5:ATx0<1R[]@S{}CE|2?-zjDMIPN+BO\F3L5!HU%&4*98GW6;YV7J`X - underscore shows, but not so much as in C. - The : is (like in Smalltalk) more important - Uppercase is more uncommon than in both C and Smalltalk. Have fun! Best regards -Tobias [1]: " Uses the new HistogramMorph " | characterFrequency | CurrentReadOnlySourceFiles cacheDuring: [ characterFrequency := ((CompiledMethod allInstances select: [:method | (method allLiterals detectSum: [:lit | lit isCollection ifFalse: [0] ifTrue: [lit size]]) < 1500]) gather: [:method | method getSource reject: [:c |c isSeparator]]) asBag]. (HistogramMorph on: characterFrequency) labelBlock: [:c | c codePoint > 32 ifTrue:[c asString] ifFalse: [c printString]]; openInWorld. ((characterFrequency sortedCounts collect: [:ea | ea value]) first: 90) join. -------------- next part -------------- Skipped content of type multipart/related From Marcel.Taeumel at hpi.de Wed Jun 22 09:11:02 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 22 09:51:11 2016 Subject: [squeak-dev] Re: System and user processe In-Reply-To: References: <68797D11-3333-482E-90FB-42386719EFCB@gmail.com> <388BD9D2-8BF2-47E4-BBBD-4BBB0380D1F2@gmail.com> Message-ID: <1466586662741-4902392.post@n4.nabble.com> Chris Muller-3 wrote >>> Hmm... I would implement such an API rather via composition than >>> inheritance. Such a task does not necessarily have to run in the same >>> image >>> but could also be accomplished on another machine. OSProcess has >>> RemoteTask >>> for this. Inheritance would make things complicated once one would >>> decide to >>> not carry out the computation as a Squeak process. > > It is implemented via composition, not inheritance. > > Maybe it is name, ClientProcess, that made you assume it is a subclass > of Process..? It is not. :) > >>> I do like Tony's idea of process groups. We could think this one step >>> further an add multiple tags (symbols?) to processes to support >>> fine-granular or cross-cutting classifications. >> >Tools like the process >>> browser could show these tags, group by them, etc. There could be tags >>> to >>> identify processes that would stop working once you close the Squeak >>> image >>> (e.g. "not resumable")... Hmmm... Application developers could use tags >>> to >>> provide hints for other developers and users. > > Processes already have names, which could facilitate a hierarchical > naming if someone wanted, and list filtering in the Process browser > would make "grouping" or "finding" a Process pretty much free.. > > If all you want to do is tag and group processes, I would consider > putting them into named groups/containers rather than add more > process-level attributes.. Managing tags would be easier than managing groups. Tags are not so restictive compared to groups. Tags are like groups but more flexible. Take our message categories as an example. If those would be like tags, you wouldn't have to descide for a dominant structure: accessing - geometry - private vs. geometry - accessing - private vs. private - geometry - accessing vs. ... See? Best, Marcel -- View this message in context: http://forum.world.st/Re-System-and-user-processe-tp4902160p4902392.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Wed Jun 22 09:54:47 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed Jun 22 09:54:51 2016 Subject: [squeak-dev] etarsoinl: In-Reply-To: <0E54C356-C559-4DB1-9014-A9F2ECE0FB1B@gmx.de> References: <0E54C356-C559-4DB1-9014-A9F2ECE0FB1B@gmx.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: etarsoinl.png Type: image/png Size: 7312 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160622/25f6feda/etarsoinl-0001.png From Marcel.Taeumel at hpi.de Wed Jun 22 09:17:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 22 09:57:32 2016 Subject: [squeak-dev] Re: etarsoinl: In-Reply-To: <0E54C356-C559-4DB1-9014-A9F2ECE0FB1B@gmx.de> References: <0E54C356-C559-4DB1-9014-A9F2ECE0FB1B@gmx.de> Message-ID: <1466587042193-4902397.post@n4.nabble.com> Tobias Pape wrote > Hi all > > I was curious about the relative distribution of characters in Squeak > Code. > I sampled the source code[1] and drew a histogram (Attached) > Here are my results: > > - The most frequent (printable) characters are in order > > etarsoinl: > > and more detailed, the 90 most frequent characters: > > > etarsoinl:cdfumhpg.ybwSv"=1CT'x][0F)(k2ANPI|M^B4O7D6R3598#EL-,zWVjU;H+q/>*<G@KX${}YQZJ\~?! > > - This is quit close to actual English: > > etaonishrlducmwyfgpbvkjxqz > > - Observations: > - The most frequent punctuation is : and . follows quite long after. > - Cascading is comparatively rare. We have more blocks and > equality/identity comparisons than ; > - Blocks are more common than parenthesis and literal arrays > - You cannot spell ifTrue or ifFalse with the 20 most common characters > - ifTrue: is far more common than ifFalse: > - The most frequent uppercase Character is S. I have no conjecture here, > tho. > > - Comparison: > - Here's C, sampling the Linux kernel: > > > et_risancodlupfm,);(*0hvgb-E=x>ITRSACkNL.P1O/wD2My"{}UF&3GB4q86HV5:<X#[]+zK7W9Y|%\!jQZ' > > - under_score_case vs. camelCase is rather obvious. > - (not displayed but tab and newline are amog the 6 most frequent > characters!) > - Punctuation starts much earlier. > - The beginning differs a lot, the ending not so much. > - 0 is far more important than 1 > - : is unimportant > > - Here's Ruby, sampling Rails: > > > etsaonridl_cupmh.f:,"gb')(=y#vw/kq>ATx0<1R[]@S{}CE|2?-zjDMIPN+BO\F3L5!HU%&4*98GW6;YV7J`X > > - underscore shows, but not so much as in C. > - The : is (like in Smalltalk) more important > - Uppercase is more uncommon than in both C and Smalltalk. > > > Have fun! > > Best regards > -Tobias > > > > > [1]: > " Uses the new HistogramMorph " > | characterFrequency | > CurrentReadOnlySourceFiles cacheDuring: [ > characterFrequency := ((CompiledMethod allInstances select: > [:method | (method allLiterals detectSum: > [:lit | lit isCollection ifFalse: [0] ifTrue: [lit size]]) < 1500]) > gather: [:method | method getSource > reject: [:c |c isSeparator]]) asBag]. > > (HistogramMorph on: characterFrequency) > labelBlock: [:c | c codePoint > 32 ifTrue:[c asString] ifFalse: [c > printString]]; > openInWorld. > > ((characterFrequency sortedCounts collect: [:ea | ea value]) first: 90) > join. > > > > > > etarsoinl.png (9K) > <http://forum.world.st/attachment/4902372/0/etarsoinl.png> :) "Do you think the author might be interested in rewriting his work to cut it down? If you cut out all the 'O's, you might lose six pages there." http://www.dailymotion.com/video/x4n10h_mr-mann-bookshop_fun Best, Marcel -- View this message in context: http://forum.world.st/etarsoinl-tp4902372p4902397.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed Jun 22 09:24:15 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 22 10:04:27 2016 Subject: [squeak-dev] Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' Message-ID: <1466587455498-4902398.post@n4.nabble.com> Hi there, we have a system version: "SystemVersion current". For trunk images, it used to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even add the 'alpha' suffix. Can we change that to 'SqueakTrunk'? What would break? Right now, SystemVersion works with a string rather than major/minor numbers. I assume that there is some code that parses that string. Metacello does that, for example. Any thoughts? Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Wed Jun 22 11:07:35 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Jun 22 11:07:38 2016 Subject: [squeak-dev] Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <1466587455498-4902398.post@n4.nabble.com> References: <1466587455498-4902398.post@n4.nabble.com> Message-ID: <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> On 22.06.2016, at 11:24, marcel.taeumel wrote: > Hi there, > > we have a system version: "SystemVersion current". For trunk images, it used > to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even add > the 'alpha' suffix. > > Can we change that to 'SqueakTrunk'? What would break? Right now, > SystemVersion works with a string rather than major/minor numbers. I assume > that there is some code that parses that string. Metacello does that, for > example. > Any thoughts? Yes. SystemVersion current should give the following for 4.6 Squeak4.6 for 5.0 Squeak5.0 for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please Squeak{stable+1}{dev-indicator}) Best -Tobias > > Best, > Marcel From Marcel.Taeumel at hpi.de Wed Jun 22 10:57:54 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 22 11:38:04 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> Message-ID: <1466593074719-4902424.post@n4.nabble.com> Tobias Pape wrote > On 22.06.2016, at 11:24, marcel.taeumel < > Marcel.Taeumel@ > > wrote: > >> Hi there, >> >> we have a system version: "SystemVersion current". For trunk images, it >> used >> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even >> add >> the 'alpha' suffix. >> >> Can we change that to 'SqueakTrunk'? What would break? Right now, >> SystemVersion works with a string rather than major/minor numbers. I >> assume >> that there is some code that parses that string. Metacello does that, for >> example. >> Any thoughts? > > Yes. > > SystemVersion current should give the following > > for 4.6 Squeak4.6 > for 5.0 Squeak5.0 > for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please > Squeak{stable+1}{dev-indicator}) > > Best > -Tobias > > >> >> Best, >> Marcel Okay, we good improve the version number in trunk images and treat them as (Git) tags. ... Squeak5.1alpha Squeak5.1beta Squeak5.1rc1 Squeak5.1rc2 Squeak5.1rtm Squeak5.2alpha Squeak6.0alpha Squeak6.0beta ... Even if we decide to not make a minor release but a major the tag can jump. So, any suffix after the version number indicates the trunk stream. Alpha = Open to any code submittions Beta = Feature freeze, bug fixes only Rc1...n = Some bugs fixed, next try Rtm = Full code freeze, will be the one to release Would this work? Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Wed Jun 22 17:59:16 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Jun 22 17:59:19 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> Message-ID: On Fri, Jun 17, 2016 at 7:19 PM, tim Rowledge wrote: > There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry Pi. It is a rather substantial collection of bug fixes, performance improvements, tidy-ups, speed-ups etc to the original Scratch developed by the MIT team. Project files read and saved are fully compatible with the original system. > > It runs on modern Squeak systems - I use a 5.0 with updates and it is likely that it won?t run perfectly on anything earlier than say #15852 because some time around then the help balloon stuff changed. I use a Cog/Spur system and make no representation about how well it might work on a non-spur or non-Cog system - I just don?t know and don?t really care. > > On a RaspberryPi3 it runs large game-like Scratch programs about twice as fast as the original Scratch (a 2.8-ish image on a contemporary interpreter) runs on a modest mac laptop. Or to put it another way, it?s about a gazillion times faster than original Scratch on the same Pi. > > The licensing remains as per the Scratch Source Code License (google it). You will need to download and unzip a copy of http://download.scratch.mit.edu/source-code/ScratchSkin1.4.zip *before* attempting to install the package. > > It does *not* include the RaspberryPi specific GPIOServer code; that will appear in a separate package soon. That provides a way to drive al sorts of fun add-on hardware from Scratch - and indeed the lower level driver code for that provides a general Squeak access to the gpio pins and add-ons. Great! And let us know about the status of /usr/bin/scratch shell script. We have people lined up to test things out so it'd be good if we make sure it works smoothly on the next release. -- -- Yoshiki From tim at rowledge.org Wed Jun 22 19:53:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jun 22 19:53:27 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> Message-ID: <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> > On 22-06-2016, at 10:59 AM, Yoshiki Ohshima wrote: > > On Fri, Jun 17, 2016 at 7:19 PM, tim Rowledge wrote: >> There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry {snip} > > Great! And let us know about the status of /usr/bin/scratch shell > script. We have people lined up to test things out so it'd be good if > we make sure it works smoothly on the next release. Excellent; I?ve been trying to get around to talking with you about this but the number of things that can get in the way is amazing. We seem to have all the image parts fixed. We appear to have all the VM parts working too. I?ve been able to make it all work together, though it can be very confusing to an english-only user when all the menus and dialogues are in a very out-of-band script. So I can?t offer any opinion of whether it works ?properly? or not. I guess we need a script to go alongside the timidity midi-synth install script, that can load the ibus and relevant fonts etc. We?ll want some good documentation about what to do to both install and use *and* stop using it that can be put on the Pi website. I can?t offer any opinion on the shell script since it simply makes no sense to me at all; I have no idea why we need to do things like BIN=`/usr/bin/dirname $VM` etc. Nor why we have to mess around with env LD_LIBRARY_PATH? how did we end up with such a deranged OS? I?ve tried a quick test of your script and it just doesn?t want to work for me. a) with only the 5.0-3663 vm in the ?official? place we get a failure because -composition-input on its own doesn't work; it needs the x11 thing too I suppose. b) after copying my latest 3758 vm to /usr/lib/squeak the VM=`echo /usr?.`` line results in listing two vm directories, which seems plain wrong. It certainly looks like it breaks the later ldd related code. Whatever it is that that is supposed to do? c) In fact it appears that the `sort -r` produces exactly the same output as `sort`, so that would appear to be a problem? And then the `head` returns both paths too. Sigh. So the way of finding the latest vm available is just not working tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: HCFI: Halt and Catch Fire Immediate From Yoshiki.Ohshima at acm.org Wed Jun 22 20:27:27 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Jun 22 20:27:36 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> Message-ID: At Wed, 22 Jun 2016 12:53:41 -0700, tim Rowledge wrote: > > > > On 22-06-2016, at 10:59 AM, Yoshiki Ohshima wrote: > > > > On Fri, Jun 17, 2016 at 7:19 PM, tim Rowledge wrote: > >> There is now a SM entry pointing to a SqueakSource copy of the current NuScratch as per the Raspberry > > {snip} > > > > Great! And let us know about the status of /usr/bin/scratch shell > > script. We have people lined up to test things out so it'd be good if > > we make sure it works smoothly on the next release. > > Excellent; I$B!G(Bve been trying to get around to talking with you about this but the number of things that can get in the way is amazing. > > We seem to have all the image parts fixed. We appear to have all the > VM parts working too. I$B!G(Bve been able to make it all work together, > though it can be very confusing to an english-only user when all the > menus and dialogues are in a very out-of-band script. So I can$B!G(Bt > offer any opinion of whether it works $B!F(Bproperly$B!G(B or not. > I guess we need a script to go alongside the timidity midi-synth install script, that can load the ibus and relevant fonts etc. We$B!G(Bll want some good documentation about what to do to both install and use *and* stop using it that can be put on the Pi website. Speaking of different use cases and languages, one thing I have not tried is to have an on screen keyboard but in the English or European locale. The script I sent was just checking the presence of the XIM environment variable but this may not be what we want. > I can$B!G(Bt offer any opinion on the shell script since it simply makes no sense to me at all; I have no idea why we need to do things like > BIN=`/usr/bin/dirname $VM` > etc. Nor why we have to mess around with env LD_LIBRARY_PATH$B!D(B how did we end up with such a deranged OS? Ah, perhaps it is fine not to have to detect LD_LIBRARY_PATH, as this is going to run on only one architecture (for a while). But defining LD_LIBRARY_PATH is needed IIUC. > I$B!G(Bve tried a quick test of your script and it just doesn$B!G(Bt want to work for me. > a) with only the 5.0-3663 vm in the $B!F(Bofficial$B!G(B place we get a failure because -composition-input on its own doesn't work; it needs the x11 thing too I suppose. Right. the main VM only started passing -composition-input to the display module after that revision. > b) after copying my latest 3758 vm to /usr/lib/squeak the VM=`echo /usr$B!D(B.`` line results in listing two vm directories, which seems plain wrong. It certainly looks like it breaks the later ldd related code. Whatever it is that that is supposed to do$B!D(B > > c) In fact it appears that the `sort -r` produces exactly the same output as `sort`, so that would appear to be a problem? And then the `head` returns both paths too. Sigh. So the way of finding the latest vm available is just not working Hmm, that is weird. The idea is that when there are multiple VMs, the one with the biggest number will be chosen by "sort -r | head -1" -- Yoshiki From asqueaker at gmail.com Wed Jun 22 23:07:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 22 23:07:44 2016 Subject: [squeak-dev] Adding UTCDateAndTime to trunk (was: UTCDateAndTime updated for Squeak trunk Chronology and Spur (was: UTCDateAndTime updated for Squeak 4.6/5.0)) In-Reply-To: <20160622035036.GA54539@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> <20160622035036.GA54539@shell.msen.com> Message-ID: Hi David, thanks for proceeding with caution, clearly, this is a core framework upon which everyone's Squeak everything depends. Some questions: > DateAndTimeLeapTest>>testAsSeconds > - Discussion required. I claim that #asSeconds can only make sense > if it means elapsed seconds since the epoch. The prior implemention > and the test are both wrong. Is there a context where the number of seconds since the epoch would ever "make sense" except to the software which needs to compare it to another result of #asSeconds? Why does it matter what number we start at? > DateAndTimeLeapTest>>testHash > - DateAndTime>>hash works differently now. Test should be either > updated or eliminated. > > DateAndTimeTest>>testPrecision > - Discussion required. It is simply wrong to assume that two calls > to DateAndTime class>>now will always answer different values, and > it is even more wrong to fudge the clock accessors to make it appear > to be doing this when it is not. Yes I know that certain database > applications require distinct time stamps, but hacking the actual > system clock is not the right thing to do. > > TimespanDoTest>>testDatesDo > - Need to change the test setUp method. The original intent is to test > date iteration using a time span begining with a UTC midnight. Test > will pass if the start time is constructed accordingly. Note however > that date iteration is suspect for durations starting at times other > than midnight in the local time zone, so additional tests may be needed. > > TimespanDoTest>>testNext > - Same issue as testDatesDo, fix the setUp method and the test will pass, > but additional tests may be needed. Can you clarify why the setUp method needs to be changed? What is the core difference between your framework and Chronology which makes this test not work as-is? I want to understand whether there are any compatibility issues to worry about other than the internal format and the #hash calculation? > The necessary #primitiveUtcWithOffset is present in all Cog/Spur/interpreter VMs. > It is an optional named primitive (not numbered). If not present, the fallback > code uses the Posix epoch for all new time values, resulting in a runnable image > but with incorrect time stamps for new DateAndTime instances. Falling back to the > original millisecond clock logic and primitives is possible, but it seemed to me > to be an unnecessary complication so I got rid of it. Wrong timestamps are a big deal. It would be better to have an unrunnable image than incorrect timestamps. The former makes a visible issue, the latter, an invisible, insidious one.. > Does anyone think that adding UTCDateAndTime to trunk is /not/ a good thing to do? Until we're sure its a good idea, it's /not/ a good thing to do. I would like to encourage us all to take the due time to really understand all the differences, and would ask someone to produce documentation (on the wiki) which explains exactly what developers need to do to, 1) update their application code, 2) update any persistent instances from Chronology of DateAndTime, etc. I think this will be a lot of work for me, but the reward will be faster dates and times, which is a good thing, thanks for pushing on this Dave. From commits at source.squeak.org Thu Jun 23 02:03:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 23 02:03:32 2016 Subject: [squeak-dev] The Trunk: Installer-Core-cmm.406.mcz Message-ID: Chris Muller uploaded a new version of Installer-Core to project The Trunk: http://source.squeak.org/trunk/Installer-Core-cmm.406.mcz ==================== Summary ==================== Name: Installer-Core-cmm.406 Author: cmm Time: 22 June 2016, 9:03:21.329276 pm UUID: b5f775d3-5f20-49bf-be10-edd2cec2d1bf Ancestors: Installer-Core-cmm.405 - Factor ability to #packageDependenciesFor:do:. - Fix for repository overriding. =============== Diff against Installer-Core-cmm.405 =============== Item was changed: ----- Method: Installer>>merge: (in category 'public interface') ----- merge: structureOrSymbol | toUncache | toUncache := Set new. + self + packageDependenciesFor: structureOrSymbol + do: + [ : eachPackageName : eachRepositorySpec | | repo | + (repo := self class repositoryFor: eachRepositorySpec) cacheAllFilenames. + toUncache add: repo. + self primMerge: eachPackageName ]. + toUncache do: [ : each | each flushAllFilenames ]! - structureOrSymbol isSymbol - ifTrue: [ self merge: (self perform: structureOrSymbol) ] - ifFalse: - [ self - depthFirstOf: structureOrSymbol - do: - [ : each | each isVariableBinding - ifTrue: - [ currentRepository := self class repositoryFor: each. - currentRepository cacheAllFilenames. - toUncache add: currentRepository ] - ifFalse: - [ each isString - ifTrue: [ self primMerge: each ] - ifFalse: [ self error: 'invalid specification' ] ] ] ]. - toUncache do: - [ : each | each flushAllFilenames ]! Item was added: + ----- Method: Installer>>packageDependenciesFor:do: (in category 'private') ----- + packageDependenciesFor: structureOrSymbol do: twoArgBlock + "Value twoArgBlock with each package name and the currently-specified repository where that package resides." + structureOrSymbol isSymbol + ifTrue: + [ self + packageDependenciesFor: (self perform: structureOrSymbol) + do: twoArgBlock ] + ifFalse: + [ self + depthFirstOf: structureOrSymbol + do: + [ : each | each isVariableBinding + ifTrue: [ currentRepository := each ] + ifFalse: + [ each isString + ifTrue: + [ twoArgBlock + value: each + value: currentRepository ] + ifFalse: [ self error: 'invalid specification' ] ] ] ]! Item was changed: ----- Method: Installer>>primMerge: (in category 'private') ----- primMerge: packageName + | version repo | + repo := self class repositoryFor: currentRepository. + version := (repo includesVersionNamed: packageName) + ifTrue: [ repo versionNamed: packageName ] + ifFalse: [ repo highestNumberedVersionForPackageNamed: packageName ]. - | version | - version := (currentRepository includesVersionNamed: packageName) - ifTrue: [ currentRepository versionNamed: packageName ] - ifFalse: [ currentRepository highestNumberedVersionForPackageNamed: packageName ]. [ version shouldMerge ifTrue: [ version merge ] ifFalse: [ version load ] ] on: MCNoChangesException + do: [ : req | req resume ] - do: - [ : req | req resume ] on: MCMergeResolutionRequest do: [ : request | request merger conflicts isEmpty ifTrue: [ request resume: true ] ifFalse: [ request pass ] ]. + version workingCopy repositoryGroup addRepository: repo! - version workingCopy repositoryGroup addRepository: currentRepository! From lewis at mail.msen.com Thu Jun 23 02:10:50 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 23 02:10:53 2016 Subject: [squeak-dev] Adding UTCDateAndTime to trunk (was: 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> <20160622035036.GA54539@shell.msen.com> Message-ID: <20160623021050.GA22848@shell.msen.com> On Wed, Jun 22, 2016 at 06:07:00PM -0500, Chris Muller wrote: > Hi David, thanks for proceeding with caution, clearly, this is a core > framework upon which everyone's Squeak everything depends. Some > questions: > > > DateAndTimeLeapTest>>testAsSeconds > > - Discussion required. I claim that #asSeconds can only make sense > > if it means elapsed seconds since the epoch. The prior implemention > > and the test are both wrong. > > Is there a context where the number of seconds since the epoch would > ever "make sense" except to the software which needs to compare it to > another result of #asSeconds? Why does it matter what number we start > at? > > > DateAndTimeLeapTest>>testHash > > - DateAndTime>>hash works differently now. Test should be either > > updated or eliminated. > > > > DateAndTimeTest>>testPrecision > > - Discussion required. It is simply wrong to assume that two calls > > to DateAndTime class>>now will always answer different values, and > > it is even more wrong to fudge the clock accessors to make it appear > > to be doing this when it is not. Yes I know that certain database > > applications require distinct time stamps, but hacking the actual > > system clock is not the right thing to do. > > > > TimespanDoTest>>testDatesDo > > - Need to change the test setUp method. The original intent is to test > > date iteration using a time span begining with a UTC midnight. Test > > will pass if the start time is constructed accordingly. Note however > > that date iteration is suspect for durations starting at times other > > than midnight in the local time zone, so additional tests may be needed. > > > > TimespanDoTest>>testNext > > - Same issue as testDatesDo, fix the setUp method and the test will pass, > > but additional tests may be needed. > > Can you clarify why the setUp method needs to be changed? What is the > core difference between your framework and Chronology which makes this > test not work as-is? I believe that the following would be consistent with the intent of the test, and will permit the tests to pass. The test is trying to interate dates through a time span of 91 days, and was written such that the time span would start on a midnight, such that it would iterate over 91 (not 92) dates. The change below accomplishes that in the #setUp. TimespanToTest>>setUp aDate := DateAndTime year: 2003 month: 01 day: 07 hour: 0 minute: 0 second: 0 offset: Duration zero. aDuration := Duration days: 91 hours: 0 minutes: 0 seconds: 0 nanoSeconds: 0. aTimespan := Timespan starting: aDate makeUTC duration: aDuration > > I want to understand whether there are any compatibility issues to > worry about other than the internal format and the #hash calculation? None that I can think of, but I have been looking at this much too long and I might easily be missing something. Let me know if you can think of anything, more eyeballs on this would be helpful. > > > The necessary #primitiveUtcWithOffset is present in all Cog/Spur/interpreter VMs. > > It is an optional named primitive (not numbered). If not present, the fallback > > code uses the Posix epoch for all new time values, resulting in a runnable image > > but with incorrect time stamps for new DateAndTime instances. Falling back to the > > original millisecond clock logic and primitives is possible, but it seemed to me > > to be an unnecessary complication so I got rid of it. > > Wrong timestamps are a big deal. It would be better to have an > unrunnable image than incorrect timestamps. The former makes a > visible issue, the latter, an invisible, insidious one.. I think the image must remain runnable, even if in a degraded mode. Otherwise you cannot fix it. I think (but am not sure) that someone would quickly notice if all new DateAndTime instances are 45 years old. We could restore the backward compatibility for running in fallback mode on the old millisecond primitives. I initially planned to keep that, but ended up concluding that it was just to much ugly old cruft to keep in the image. On the other hand, you may have noticed that I tend to be a big fan of backward compatibility, so you probably would not have a hard time convincing me if you think it is a good thing to do ;-) > > > Does anyone think that adding UTCDateAndTime to trunk is /not/ a good thing to do? > > Until we're sure its a good idea, it's /not/ a good thing to do. I > would like to encourage us all to take the due time to really > understand all the differences, and would ask someone to produce > documentation (on the wiki) which explains exactly what developers > need to do to, 1) update their application code, 2) update any > persistent instances from Chronology of DateAndTime, etc. > Agreed. And you have just confirmed my hypothesis that asking for positive feedback never works, while tossing out some flame bait can be tremendously effective. Maybe I'll try running for president next ;-) > I think this will be a lot of work for me, but the reward will be > faster dates and times, which is a good thing, thanks for pushing on > this Dave. I think that it actually will provide a good improvement. One thing I really do not know is how much of the improvement will be perceptible to the user in everyday activities. I am expecting speedups for things related to source code lookups, but I don't know if the low level speed improvements that I measure will translate into meaningful differences in real life. Do we have any benchmarks that might show if the DateAndTime speedups will result in improvements that would be noticed by an end user? Dave From tim at rowledge.org Thu Jun 23 02:27:17 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 23 02:27:04 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> Message-ID: > On 22-06-2016, at 1:27 PM, Yoshiki Ohshima wrote: > {snip} > > Ah, perhaps it is fine not to have to detect LD_LIBRARY_PATH, as this is > going to run on only one architecture (for a while). But defining > LD_LIBRARY_PATH is needed IIUC. We?re already way out of my zone? {snip} >> b) after copying my latest 3758 vm to /usr/lib/squeak the VM=`echo /usr?.`` line results in listing two vm directories, which seems plain wrong. It certainly looks like it breaks the later ldd related code. Whatever it is that that is supposed to do? >> >> c) In fact it appears that the `sort -r` produces exactly the same output as `sort`, so that would appear to be a problem? And then the `head` returns both paths too. Sigh. So the way of finding the latest vm available is just not working > > Hmm, that is weird. The idea is that when there are multiple VMs, the > one with the biggest number will be chosen by "sort -r | head -1? So far as I can see it can?t work because the ?echo? gives us a single line as an answer and my best guess (since man pages are so very carefully written to present a wall of text that makes no sense unless you already know the answer) is that the ?sort? expects some cr or nl in there. Thus we (probably) just get the one line and ?head? does nothing to help. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: DO: Deadstart Operator From Yoshiki.Ohshima at acm.org Thu Jun 23 02:40:14 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Jun 23 02:40:17 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> Message-ID: On Wed, Jun 22, 2016 at 7:27 PM, tim Rowledge wrote: > >> On 22-06-2016, at 1:27 PM, Yoshiki Ohshima wrote: >> {snip} >> >> Ah, perhaps it is fine not to have to detect LD_LIBRARY_PATH, as this is >> going to run on only one architecture (for a while). But defining >> LD_LIBRARY_PATH is needed IIUC. > > We?re already way out of my zone? > {snip} > >>> b) after copying my latest 3758 vm to /usr/lib/squeak the VM=`echo /usr?.`` line results in listing two vm directories, which seems plain wrong. It certainly looks like it breaks the later ldd related code. Whatever it is that that is supposed to do? >>> >>> c) In fact it appears that the `sort -r` produces exactly the same output as `sort`, so that would appear to be a problem? And then the `head` returns both paths too. Sigh. So the way of finding the latest vm available is just not working >> >> Hmm, that is weird. The idea is that when there are multiple VMs, the >> one with the biggest number will be chosen by "sort -r | head -1? > > So far as I can see it can?t work because the ?echo? gives us a single line as an answer and my best guess (since man pages are so very carefully written to present a wall of text that makes no sense unless you already know the answer) is that the ?sort? expects some cr or nl in there. Thus we (probably) just get the one line and ?head? does nothing to help. You're so right. It should be 'ls' instead of 'echo'. -- -- Yoshiki From eliot.miranda at gmail.com Thu Jun 23 03:46:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 23 03:46:35 2016 Subject: [squeak-dev] Functional callbacks on all Cog platforms Message-ID: Hi All, just wanted to report that as of Alien-eem.35 and https://github.com/OpenSmalltalk/vm/commit/da3fafdec9444754af104e0ed9f613f6eb1888d9 we now have functional callbacks on all x86 platforms, ARM32 platforms and x86_64 platforms. There's a simple example Alien class>>exampleCqsort that shows how to use the system and tests the implementation using the C library's sort quick sort implementation that takes a function pointer as an argument to use for comparing pairs of elements. This is mapped onto a Smalltalk block by Alien's callback implementation. The example sorts 100 random double-precision floats using qsort and a callback into Smalltalk. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160622/1f699a2b/attachment.htm From commits at source.squeak.org Thu Jun 23 07:55:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 23 07:55:55 2016 Subject: [squeak-dev] The Trunk: Tools-topa.705.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.705.mcz ==================== Summary ==================== Name: Tools-topa.705 Author: topa Time: 23 June 2016, 9:55:41.768774 am UUID: e819d324-b58e-4e35-b988-395da379fdb5 Ancestors: Tools-mt.704 disable buttons in the browser when they do not apply =============== Diff against Tools-mt.704 =============== Item was changed: ----- Method: CodeHolder>>buildOptionalButtonsWith: (in category 'toolbuilder') ----- buildOptionalButtonsWith: builder | panelSpec | panelSpec := builder pluggablePanelSpec new. panelSpec children: OrderedCollection new. self optionalButtonPairs do:[:spec| | buttonSpec | buttonSpec := builder pluggableActionButtonSpec new. buttonSpec model: self. buttonSpec label: spec first. buttonSpec action: spec second. + spec second == #methodHierarchy + ifTrue:[buttonSpec + enabled: #inheritanceButtonEnabled; + color: #inheritanceButtonColor]. + spec second == #browseVersions + ifTrue:[buttonSpec enabled: #versionsButtonEnabled]. - spec second == #methodHierarchy ifTrue:[ - buttonSpec color: #inheritanceButtonColor. - ]. spec size > 2 ifTrue:[buttonSpec help: spec third]. + panelSpec children add: buttonSpec]. - panelSpec children add: buttonSpec. - ]. "What to show" panelSpec children add: builder pluggableSpacerSpec new. self addCodeProvenanceButtonTo: panelSpec using: builder. panelSpec layout: #horizontal. "buttons" ^panelSpec! Item was added: + ----- Method: CodeHolder>>inheritanceButtonEnabled (in category 'toolbuilder') ----- + inheritanceButtonEnabled + "The inheritance button is only enabled when a method is selected" + + ^ self selectedMessageName notNil + ! Item was added: + ----- Method: CodeHolder>>versionsButtonEnabled (in category 'toolbuilder') ----- + versionsButtonEnabled + "The versions button is only enabled when a method is selected or we view the + class comment." + + ^ self selectedMessageName notNil or: [self classCommentIndicated]! Item was changed: ----- Method: StringHolder>>browseVersions (in category '*Tools') ----- browseVersions "Create and schedule a Versions Browser, showing all versions of the currently selected message. Answer the browser or nil." + ^ self classCommentIndicated + ifTrue: [ClassCommentVersionsBrowser browseCommentOf: self selectedClass] + ifFalse: [self selectedMessageName ifNotNil: + [:selector | + ToolSet browseVersionsOf: self selectedClassOrMetaClass selector: selector]]! - | selector | - self classCommentIndicated ifTrue: - [ClassCommentVersionsBrowser browseCommentOf: self selectedClass. - ^nil]. - - ^(selector := self selectedMessageName) - ifNil: [self inform: 'Sorry, only actual methods have retrievable versions.'. nil] - ifNotNil: [ToolSet browseVersionsOf: self selectedClassOrMetaClass selector: selector]! From lewis at mail.msen.com Thu Jun 23 13:05:51 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 23 13:05:55 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates 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> <20160622035036.GA54539@shell.msen.com> Message-ID: <20160623130551.GA52947@shell.msen.com> The class comment says: Instances of Date are Timespans with duration of 1 day. Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. I no longer see #localizedDates in the image, so I think the comment needs an update. For reference, and earlier version of the class comment said this: Instances of Date are Timespans with duration of 1 day. Their default creation assumes a start of midnight in the local time zone. I am not sure what the comment should say, but I would be happy if it could better convey the intended meaning of "Date" in addition to the explanation about creating instances relative to UTC versus local time zone. My expectation would be that a Date is a Timespan with a start value set to midnight in some time zone. The start value is a DateAndTime, and the offset instance variable of that DateAndTime would reflect that time zone. I would therefore expect that a "globalized" Date is a special case of a Date that was created with the start of the Timespan at midnight UTC, regardless of the current local time zone. A "globalized" Date is no different from any other Date, it is simply a Date that was created with time zone UTC. Is that right? Dave From commits at source.squeak.org Thu Jun 23 21:56:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 23 21:56:57 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160623215655.10883.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-June/068234.html Name: Installer-Core-cmm.406 Ancestors: Installer-Core-cmm.405 - Factor ability to #packageDependenciesFor:do:. - Fix for repository overriding. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068235.html Name: Tools-topa.705 Ancestors: Tools-mt.704 disable buttons in the browser when they do not apply ============================================= From eliot.miranda at gmail.com Thu Jun 23 23:27:22 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Jun 23 23:27:26 2016 Subject: [squeak-dev] Interesting Windows menu bug... Message-ID: In an updated trunk open two Monticello browsers. Now try and select the second one through the Windows menu... :-) _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160623/525c7b03/attachment.htm From commits at source.squeak.org Thu Jun 23 23:29:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 23 23:29:42 2016 Subject: [squeak-dev] The Trunk: Collections-eem.699.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-eem.699.mcz ==================== Summary ==================== Name: Collections-eem.699 Author: eem Time: 23 June 2016, 4:28:17.428149 pm UUID: b82a57a1-a212-4ebe-a738-59abebf9a380 Ancestors: Collections-ul.698 Fix growth on become failure due to insufficient memory. =============== Diff against Collections-ul.698 =============== Item was changed: ----- Method: Array>>elementsExchangeIdentityWith: (in category 'converting') ----- elementsExchangeIdentityWith: otherArray "This primitive performs a bulk mutation, causing all pointers to the elements of the receiver to be replaced by pointers to the corresponding elements of otherArray. At the same time, all pointers to the elements of otherArray are replaced by pointers to the corresponding elements of this array. The identityHashes remain with the pointers rather than with the objects so that objects in hashed structures should still be properly indexed after the mutation." ec == #'bad receiver' ifTrue: [^self error: 'receiver must be of class Array']. ec == #'bad argument' ifTrue: [^self error: (otherArray class == Array ifTrue: ['arg must be of class Array'] ifFalse: ['receiver and argument must have the same size'])]. ec == #'inappropriate operation' ifTrue: [^self error: 'can''t become immediates such as SmallIntegers or Characters']. ec == #'no modification' ifTrue: [^self error: 'can''t become immutable objects']. ec == #'object is pinned' ifTrue: [^self error: 'can''t become pinned objects']. ec == #'insufficient object memory' ifTrue: + [| maxRequired | + "In Spur, two-way become may involve making each pair of objects into a forwarder into a copy of the other. + So if become fails with #'insufficient object memory', garbage collect, and if necessary, grow memory." + maxRequired := (self detectSum: [:obj | obj class byteSizeOfInstanceOfSize: obj basicSize]) + + (otherArray detectSum: [:obj | obj class byteSizeOfInstanceOfSize: obj basicSize]). + (Smalltalk garbageCollectMost < maxRequired + and: [Smalltalk garbageCollect < maxRequired]) ifTrue: + [Smalltalk growMemoryByAtLeast: maxRequired]. - [Smalltalk garbageCollect < 1048576 ifTrue: - [Smalltalk growMemoryByAtLeast: 1048576]. ^self elementsExchangeIdentityWith: otherArray]. self primitiveFailed! Item was changed: ----- Method: Array>>elementsForwardIdentityTo: (in category 'converting') ----- elementsForwardIdentityTo: otherArray "This primitive performs a bulk mutation, causing all pointers to the elements of the receiver to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." ec == #'bad receiver' ifTrue: [^self error: 'receiver must be of class Array']. ec == #'bad argument' ifTrue: [^self error: (otherArray class == Array ifTrue: ['arg must be of class Array'] ifFalse: ['receiver and argument must have the same size'])]. ec == #'inappropriate operation' ifTrue: [^self error: 'can''t become immediates such as SmallIntegers or Characters']. ec == #'no modification' ifTrue: [^self error: 'can''t become immutable objects']. ec == #'object is pinned' ifTrue: [^self error: 'can''t become pinned objects']. ec == #'insufficient object memory' ifTrue: + [self error: 'The virtual machine is out-of-date. Please upgrade.']. - [Smalltalk garbageCollect < 1048576 ifTrue: - [Smalltalk growMemoryByAtLeast: 1048576]. - ^self elementsForwardIdentityTo: otherArray]. self primitiveFailed! From commits at source.squeak.org Thu Jun 23 23:32:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 23 23:32:08 2016 Subject: [squeak-dev] The Trunk: System-eem.834.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.834.mcz ==================== Summary ==================== Name: System-eem.834 Author: eem Time: 23 June 2016, 4:30:25.198834 pm UUID: d42d7b14-27ee-49c9-9469-b7f7d1b48395 Ancestors: System-mt.833 More accurately comment the semantics of the growMemoryByAtLeast: primitive on Spur. =============== Diff against System-mt.833 =============== Item was changed: ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- growMemoryByAtLeast: numBytes "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential. + N.B. In Spur, the heap is composed of segments. Growing memory adds a new + segment; it does not extend existing segments. Growth is by at least that + established by SmalltalkImage current vmParameterAt: 25, which defaults to 16Mb." - Primitive. Essential. Fail if no memory is available." + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! - (numBytes isInteger and: [numBytes > 0]) ifTrue: - [OutOfMemory signal]. - ^self primitiveFailed! Item was changed: ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- growMemoryByAtLeast: numBytes "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential. + N.B. In Spur, the heap is composed of segments. Growing memory adds a new + segment; it does not extend existing segments. Growth is by at least that + established by SmalltalkImage current vmParameterAt: 25, which defaults to 16Mb." - Primitive. Fail if no memory is available. Essential." ^(numBytes isInteger and: [numBytes > 0]) ifTrue: [OutOfMemory signal] ifFalse: [self primitiveFailed]! From Marcel.Taeumel at hpi.de Fri Jun 24 10:15:24 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 24 10:55:48 2016 Subject: [squeak-dev] Re: Interesting Windows menu bug... In-Reply-To: References: Message-ID: <1466763324369-4902867.post@n4.nabble.com> Eliot Miranda-2 wrote > In an updated trunk open two Monticello browsers. Now try and select the > second one through the Windows menu... :-) > > _,,,^..^,,,_ > best, Eliot Hi Eliot, what's the bug? The order of the windows in the menu is the submorph order in the world. Top windows come to the front. Best, Marcel -- View this message in context: http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4902867.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Fri Jun 24 17:38:05 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 24 17:38:10 2016 Subject: [squeak-dev] Re: Interesting Windows menu bug... In-Reply-To: <1466763324369-4902867.post@n4.nabble.com> References: <1466763324369-4902867.post@n4.nabble.com> Message-ID: <36CB0B65-5A72-4B4E-A257-23AB801FFA04@gmail.com> Hi M, > On Jun 24, 2016, at 3:15 AM, marcel.taeumel wrote: > > Eliot Miranda-2 wrote >> In an updated trunk open two Monticello browsers. Now try and select the >> second one through the Windows menu... :-) >> >> _,,,^..^,,,_ >> best, Eliot > > Hi Eliot, > > what's the bug? The order of the windows in the menu is the submorph order > in the world. Top windows come to the front. That you simply cannot select the second instance in the menu. Both entries say "Monticello browser". As one moves the mouse down the menu the first highlights, but then the selection jumps to the one following the second instance. Hence you can't unbury the second instance until you delete the first. Most unsatisfactory :-) > > Best, > Marcel > > -- > View this message in context: http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4902867.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. _,,,^..^,,,_ (phone) From tim at rowledge.org Fri Jun 24 18:06:02 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 24 18:05:45 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> Message-ID: <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> > On 22-06-2016, at 7:40 PM, Yoshiki Ohshima wrote: > > On Wed, Jun 22, 2016 at 7:27 PM, tim Rowledge wrote: >>> {snip} >> >> So far as I can see it can?t work because the ?echo? gives us a single line as an answer and my best guess (since man pages are so very carefully written to present a wall of text that makes no sense unless you already know the answer) is that the ?sort? expects some cr or nl in there. Thus we (probably) just get the one line and ?head? does nothing to help. > > You're so right. It should be 'ls' instead of 'echo?. Except that with the git based builds it looks like we are moving to a somewhat different numbering sequence and so comparing any possible old copies with new ones is going to become harder. For example, a freshly built Pi vm is tagged as 5.0-201606241150 (ie the date/time) I have no idea how we can solve that. Aside from the trivial solution of me including an explicit vm path in the Pi script, of course. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim He who hesitates is probably right. From Marcel.Taeumel at hpi.de Fri Jun 24 18:52:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Jun 24 19:33:11 2016 Subject: [squeak-dev] Re: Interesting Windows menu bug... In-Reply-To: <36CB0B65-5A72-4B4E-A257-23AB801FFA04@gmail.com> References: <1466763324369-4902867.post@n4.nabble.com> <36CB0B65-5A72-4B4E-A257-23AB801FFA04@gmail.com> Message-ID: <1466794364305-4903124.post@n4.nabble.com> Eliot Miranda-2 wrote > Hi M, > >> On Jun 24, 2016, at 3:15 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> Eliot Miranda-2 wrote >>> In an updated trunk open two Monticello browsers. Now try and select >>> the >>> second one through the Windows menu... :-) >>> >>> _,,,^..^,,,_ >>> best, Eliot >> >> Hi Eliot, >> >> what's the bug? The order of the windows in the menu is the submorph >> order >> in the world. Top windows come to the front. > > That you simply cannot select the second instance in the menu. Both > entries say "Monticello browser". As one moves the mouse down the menu > the first highlights, but then the selection jumps to the one following > the second instance. Hence you can't unbury the second instance until you > delete the first. Most unsatisfactory :-) > >> >> Best, >> Marcel >> >> -- >> View this message in context: >> http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4902867.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > _,,,^..^,,,_ (phone) Ah, yeah. But this just affects hovering. You can always click on it and you can also use the keyboard to navigate to the menu item. Sure, it's a bug. I suspect that it is a new one that I introduced with changing the focus event handling of MenuMorph. Best, Marcel -- View this message in context: http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4903124.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Fri Jun 24 19:54:56 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Jun 24 19:54:59 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> Message-ID: On Fri, Jun 24, 2016 at 11:06 AM, tim Rowledge wrote: > >> On 22-06-2016, at 7:40 PM, Yoshiki Ohshima wrote: >> >> On Wed, Jun 22, 2016 at 7:27 PM, tim Rowledge wrote: >>>> > {snip} >>> >>> So far as I can see it can?t work because the ?echo? gives us a single line as an answer and my best guess (since man pages are so very carefully written to present a wall of text that makes no sense unless you already know the answer) is that the ?sort? expects some cr or nl in there. Thus we (probably) just get the one line and ?head? does nothing to help. >> >> You're so right. It should be 'ls' instead of 'echo?. > > Except that with the git based builds it looks like we are moving to a somewhat different numbering sequence and so comparing any possible old copies with new ones is going to become harder. For example, a freshly built Pi vm is tagged as 5.0-201606241150 (ie the date/time) Oh... That is interesting. If the squeak VM package for the next release of Raspian follows this new scheme, is it true that we'd only have to support this format? Or people may install or keep older versions and we'd better support both? > I have no idea how we can solve that. Aside from the trivial solution of me including an explicit vm path in the Pi script, of course. Ok.. Somebody should be able to write a few more shell commands to figure that out... -- -- Yoshiki From eliot.miranda at gmail.com Fri Jun 24 20:26:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Jun 24 20:26:46 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> Message-ID: Hi Yoshiki, On Fri, Jun 24, 2016 at 12:54 PM, Yoshiki Ohshima wrote: > On Fri, Jun 24, 2016 at 11:06 AM, tim Rowledge wrote: > > > >> On 22-06-2016, at 7:40 PM, Yoshiki Ohshima > wrote: > >> > >> On Wed, Jun 22, 2016 at 7:27 PM, tim Rowledge wrote: > >>>> > > {snip} > >>> > >>> So far as I can see it can?t work because the ?echo? gives us a single > line as an answer and my best guess (since man pages are so very carefully > written to present a wall of text that makes no sense unless you already > know the answer) is that the ?sort? expects some cr or nl in there. Thus we > (probably) just get the one line and ?head? does nothing to help. > >> > >> You're so right. It should be 'ls' instead of 'echo?. > > > > Except that with the git based builds it looks like we are moving to a > somewhat different numbering sequence and so comparing any possible old > copies with new ones is going to become harder. For example, a freshly > built Pi vm is tagged as 5.0-201606241150 (ie the date/time) > > Oh... That is interesting. If the squeak VM package for the next > release of Raspian follows this new scheme, is it true that we'd only > have to support this format? Or people may install or keep older > versions and we'd better support both? > The VM is backward compatible (at least for Spur, which I think is the only format NuScratch has been released in) so there's no need to maintain older versions. A current VM should work. And with a little bit of trickery in the launch script one could have it update the VM at suitable times, for example when a serious VM bug is identified and fixed, or a significant performance increase has been achieved. > > I have no idea how we can solve that. Aside from the trivial solution of > me including an explicit vm path in the Pi script, of course. > > Ok.. Somebody should be able to write a few more shell commands to > figure that out... > > -- Yoshiki > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160624/543edf86/attachment.htm From Yoshiki.Ohshima at acm.org Fri Jun 24 20:38:48 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Jun 24 20:38:51 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> Message-ID: On Fri, Jun 24, 2016 at 1:26 PM, Eliot Miranda wrote: > Hi Yoshiki, > > On Fri, Jun 24, 2016 at 12:54 PM, Yoshiki Ohshima > wrote: >> >> On Fri, Jun 24, 2016 at 11:06 AM, tim Rowledge wrote: >> > >> >> On 22-06-2016, at 7:40 PM, Yoshiki Ohshima >> >> wrote: >> >> >> >> On Wed, Jun 22, 2016 at 7:27 PM, tim Rowledge wrote: >> >>>> >> > {snip} >> >>> >> >>> So far as I can see it can?t work because the ?echo? gives us a single >> >>> line as an answer and my best guess (since man pages are so very carefully >> >>> written to present a wall of text that makes no sense unless you already >> >>> know the answer) is that the ?sort? expects some cr or nl in there. Thus we >> >>> (probably) just get the one line and ?head? does nothing to help. >> >> >> >> You're so right. It should be 'ls' instead of 'echo?. >> > >> > Except that with the git based builds it looks like we are moving to a >> > somewhat different numbering sequence and so comparing any possible old >> > copies with new ones is going to become harder. For example, a freshly built >> > Pi vm is tagged as 5.0-201606241150 (ie the date/time) >> >> Oh... That is interesting. If the squeak VM package for the next >> release of Raspian follows this new scheme, is it true that we'd only >> have to support this format? Or people may install or keep older >> versions and we'd better support both? > > > The VM is backward compatible (at least for Spur, which I think is the only > format NuScratch has been released in) so there's no need to maintain older > versions. A current VM should work. And with a little bit of trickery in > the launch script one could have it update the VM at suitable times, for > example when a serious VM bug is identified and fixed, or a significant > performance increase has been achieved. Thanks for chiming in. The matter is more about to write shell script that can find the latest VM when multiple ones are installed. My first attempt was to search in /usr/lib/squeak, sort entries and pick the one with the biggest number (which used to be the svn revision number). I'm thinking to add two step detection; if the scheme that is based on the yyyymmdd format does not turn up a VM, we then search the older style version-revision VM in /usr/lib/squeak. -- -- Yoshiki From tim at rowledge.org Fri Jun 24 20:58:40 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Jun 24 20:58:23 2016 Subject: [squeak-dev] NuScratch source on SqueakMap In-Reply-To: References: <98FE8A11-CD52-41B4-8BF1-BE47C10644F2@rowledge.org> <338F626C-B919-43C1-8367-667DB71764AE@rowledge.org> <2EF31304-2700-4981-8423-2BA17635FB50@rowledge.org> Message-ID: <17E3EF66-725E-4AEE-9CA5-4B9B91F435F3@rowledge.org> > On 24-06-2016, at 1:38 PM, Yoshiki Ohshima wrote: >> {lots of snippy} > > Thanks for chiming in. The matter is more about to write shell script > that can find the latest VM when multiple ones are installed. My > first attempt was to search in /usr/lib/squeak, sort entries and pick > the one with the biggest number (which used to be the svn revision > number). I'm thinking to add two step detection; if the scheme that > is based on the yyyymmdd format does not turn up a VM, we then search > the older style version-revision VM in /usr/lib/squeak. Well the good news is that we can (since this is a shell script aimed at the Pi install of nuScratch) be a bit less general and assuming that from now on vm versions are indeed MAJOR.MINOR-DATETIME format then we need only handle those. The script will go into the next Pi release and need not concern itself with dealing with older VMs. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim You never really learn to swear until you learn to drive in Silicon Valley From commits at source.squeak.org Fri Jun 24 21:56:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Jun 24 21:57:00 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160624215658.25836.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-June/068236.html Name: Collections-eem.699 Ancestors: Collections-ul.698 Fix growth on become failure due to insufficient memory. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068237.html Name: System-eem.834 Ancestors: System-mt.833 More accurately comment the semantics of the growMemoryByAtLeast: primitive on Spur. ============================================= From commits at source.squeak.org Sat Jun 25 06:51:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 25 06:51:46 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1185.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1185.mcz ==================== Summary ==================== Name: Morphic-mt.1185 Author: mt Time: 25 June 2016, 8:51:08.59647 am UUID: 05385b8c-0ff4-6443-9c57-52be6dc91bbb Ancestors: Morphic-mt.1184 Fixes several bugs with selection and hovering in menus and docking-bar menus and their sub-menus. =============== Diff against Morphic-mt.1184 =============== Item was changed: ----- Method: DockingBarItemMorph>>mouseEnter: (in category 'events') ----- mouseEnter: evt + "Do not hover docking bar items directory. Mouse-down required. But if you already see a submenu, support hovering." - "The mouse entered the receiver" + owner selectedItem ifNotNil: [owner selectItem: self event: evt]! - super mouseEnter: evt. - (owner selectedItem notNil and: [ owner selectedItem ~~ self ]) ifTrue: [ - owner selectItem: self event: evt. ]! Item was removed: - ----- Method: DockingBarItemMorph>>mouseLeaveDragging: (in category 'events') ----- - mouseLeaveDragging: evt ! Item was changed: StringMorph subclass: #MenuItemMorph + instanceVariableNames: 'isEnabled subMenu isSelected target selector arguments icon' - instanceVariableNames: 'isEnabled subMenu isSelected target selector arguments icon lastMousePosition' classVariableNames: 'SubMenuMarker' poolDictionaries: '' category: 'Morphic-Menus'! !MenuItemMorph commentStamp: '' prior: 0! I represent an item in a menu. Instance variables: isEnabled True if the menu item can be executed. subMenu The submenu to activate automatically when the user mouses over the item. isSelected True if the item is currently selected. target The target of the associated action. selector The associated action. arguments The arguments for the associated action. icon An optional icon form to be displayed to my left. If I have a dynamic marker, created by strings like or in my contents, it will be installed as a submorph.! Item was changed: ----- Method: MenuItemMorph>>activateSubmenu: (in category 'events') ----- activateSubmenu: evt "Activate our submenu; e.g., pass control to it" subMenu ifNil:[^false]. "not applicable" (subMenu fullContainsPoint: evt position) ifFalse:[^false]. subMenu activate: evt. - self removeAlarm: #deselectTimeOut:. ^true! Item was changed: ----- Method: MenuItemMorph>>deselect: (in category 'selecting') ----- deselect: evt self isSelected: false. - lastMousePosition := nil. subMenu ifNotNil: [ owner ifNotNil: [ owner activeSubmenu: nil ] ].! Item was removed: - ----- Method: MenuItemMorph>>deselectTimeOut: (in category 'events') ----- - deselectTimeOut: evt - "Deselect timout. Now really deselect" - owner selectedItem == self - ifTrue:[ - evt hand newMouseFocus: nil. - owner selectItem: nil event: evt]. - ! Item was changed: ----- Method: MenuItemMorph>>mouseEnter: (in category 'events') ----- mouseEnter: evt "The mouse entered the receiver" + owner ifNotNil: [ owner selectItem: self event: evt ]! - owner ifNotNil: [ owner stayUp ifFalse: [ self mouseEnterDragging: evt ] ]! Item was changed: ----- Method: MenuItemMorph>>mouseEnterDragging: (in category 'events') ----- mouseEnterDragging: evt + + self mouseEnter: evt.! - "The mouse entered the receiver. Do nothing if we're not in a 'valid menu transition', meaning that the current hand focus must be aimed at the owning menu." - evt hand mouseFocus == owner ifTrue:[owner selectItem: self event: evt]! Item was removed: - ----- Method: MenuItemMorph>>mouseLeave: (in category 'events') ----- - mouseLeave: evt - "The mouse has left the interior of the receiver..." - - owner ifNotNil: [owner stayUp ifFalse: [self mouseLeaveDragging: evt]]! Item was removed: - ----- Method: MenuItemMorph>>mouseLeaveDragging: (in category 'events') ----- - mouseLeaveDragging: evt - "The mouse left the receiver. Do nothing if we're not in a 'valid menu transition', meaning that the current hand focus must be aimed at the owning menu." - - owner ifNil: [^self]. - evt hand mouseFocus == owner ifFalse: [ ^self ]. - lastMousePosition := evt position. - owner selectItem: nil event: evt! Item was removed: - ----- Method: MenuItemMorph>>releasesSelection: (in category 'events') ----- - releasesSelection: evt - " Returns a boolean indicating that this menu item is ready to go deselected. - It answers false if the mouse is moving towards its submenu. - We check this by testing that the current mouse position lays in the triangle of - the last mouse position and the two corners of the submenu facing our menu item. " - - | triangle submenuIsOnTheRightSide | - self hasSubMenu ifFalse: [ - lastMousePosition := nil. - ^true ]. - lastMousePosition ifNil: [ - lastMousePosition := evt position. - ^false ]. - submenuIsOnTheRightSide := self left < subMenu left. - triangle := { - lastMousePosition. - submenuIsOnTheRightSide - ifTrue: [ subMenu topLeft ] - ifFalse: [ subMenu topRight ]. - submenuIsOnTheRightSide - ifTrue: [ subMenu bottomLeft ] - ifFalse: [ subMenu bottomRight ] }. - lastMousePosition := evt position. - (self triangle: triangle containsPoint: evt position) - ifTrue: [ ^false ] - ifFalse: [ - lastMousePosition := nil. - ^true ]! Item was changed: ----- Method: MenuItemMorph>>veryDeepInner: (in category 'copying') ----- veryDeepInner: deepCopier "Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!!!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment." super veryDeepInner: deepCopier. isEnabled := isEnabled veryDeepCopyWith: deepCopier. subMenu := subMenu veryDeepCopyWith: deepCopier. isSelected := isSelected veryDeepCopyWith: deepCopier. icon := icon veryDeepCopyWith: deepCopier. "target := target. Weakly copied" "selector := selector. a Symbol" + arguments := arguments.! - arguments := arguments. - lastMousePosition := nil! Item was added: + ----- Method: MenuMorph>>handlesMouseOver: (in category 'events') ----- + handlesMouseOver: evt + ^ true! Item was added: + ----- Method: MenuMorph>>mouseLeave: (in category 'events') ----- + mouseLeave: evt + self selectItem: nil event: evt.! Item was removed: - ----- Method: MenuMorph>>releasesSelection: (in category 'events') ----- - releasesSelection: evt - " The MenuMorph releases its selection if the selected item releases it. - Used in #selectItem:event: " - - self selectedItem ifNil: [ ^true ]. - evt ifNil: [ ^true ]. - evt isKeyboard ifTrue: [ ^true ]. - (self selectedItem containsPoint: evt position) ifTrue: [ ^true ]. - ^self selectedItem releasesSelection: evt! Item was changed: ----- Method: MenuMorph>>selectItem:event: (in category 'control') ----- selectItem: aMenuItem event: anEvent + "Change the selected item." + - - " Change the selected item, but first ask the currently selected item - if it want to release it. " - (self releasesSelection: anEvent) ifFalse: [ ^self ]. selectedItem ifNotNil:[selectedItem deselect: anEvent]. selectedItem := aMenuItem. selectedItem ifNotNil:[selectedItem select: anEvent].! From Marcel.Taeumel at hpi.de Sat Jun 25 06:18:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat Jun 25 06:58:34 2016 Subject: [squeak-dev] Re: Interesting Windows menu bug... In-Reply-To: <1466794364305-4903124.post@n4.nabble.com> References: <1466763324369-4902867.post@n4.nabble.com> <36CB0B65-5A72-4B4E-A257-23AB801FFA04@gmail.com> <1466794364305-4903124.post@n4.nabble.com> Message-ID: <1466835485523-4903188.post@n4.nabble.com> marcel.taeumel wrote > > Eliot Miranda-2 wrote >> Hi M, >> >>> On Jun 24, 2016, at 3:15 AM, marcel.taeumel < >> Marcel.Taeumel@ >> > wrote: >>> >>> Eliot Miranda-2 wrote >>>> In an updated trunk open two Monticello browsers. Now try and select >>>> the >>>> second one through the Windows menu... :-) >>>> >>>> _,,,^..^,,,_ >>>> best, Eliot >>> >>> Hi Eliot, >>> >>> what's the bug? The order of the windows in the menu is the submorph >>> order >>> in the world. Top windows come to the front. >> >> That you simply cannot select the second instance in the menu. Both >> entries say "Monticello browser". As one moves the mouse down the menu >> the first highlights, but then the selection jumps to the one following >> the second instance. Hence you can't unbury the second instance until >> you delete the first. Most unsatisfactory :-) >> >>> >>> Best, >>> Marcel >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4902867.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> >> _,,,^..^,,,_ (phone) > Ah, yeah. But this just affects hovering. You can always click on it and > you can also use the keyboard to navigate to the menu item. > > Sure, it's a bug. I suspect that it is a new one that I introduced with > changing the focus event handling of MenuMorph. > > Best, > Marcel Hi Eliot, is it better now? http://forum.world.st/The-Trunk-Morphic-mt-1185-mcz-td4903183.html Best, Marcel -- View this message in context: http://forum.world.st/Interesting-Windows-menu-bug-tp4902751p4903188.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From jdelgado.pin at gmail.com Sat Jun 25 09:55:51 2016 From: jdelgado.pin at gmail.com (Jordi Delgado) Date: Sat Jun 25 09:55:54 2016 Subject: [squeak-dev] ESUG 2016, 13th Innovation Technology Awards Message-ID: *ESUG 2016, 13th Innovation Technology Awards* Have you written innovative Smalltalk? The developers of any Smalltalk-based software can enter by submitting a 3-5min video of their software. Entrants demo their systems in a session at the end of Monday August 22, 2016, after which the conference attendees vote. (A vote consists in providing a sorted list of 3 preferred pieces of software.) The top 3 teams with the most innovative software will receive, respectively, 500 Euros, 300 Euros and 200 Euros. The results are announced in the Awards ceremony that is held during the social event. Applicants should provide the following information on the conference registration server (registration.esug.org). Once you have registered your personal info, an 'Awards' menu allows submitting your software. You can provide this information when you first register, or login again later and update your details. Info to provide: - Name of the software - Licence information (free, shareware, or commercial) - Name of the Smalltalk dialect used - Name, Affiliation and Country of developers Besides, it would be great if the submission could include: - URL for a video (3-5 min) showing a screencast / demo of the software - URL for downloading the software or at least a runnable demo - Deadline: *August 21, 2016* Any Smalltalker can apply (students, companies, ...). The presented piece of code/software should be written in Smalltalk or directly support Smalltalk (e.g. Smalltalk VM). All Smalltalk dialects are accepted. The applicant should be "strongly related" to the presented code, be it as an author, as owner of the copyright/copyleft, or as an official representative of the copyright/copyleft owner. Bests, Jordi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160625/3c7a7e20/attachment.htm From hannes.hirzel at gmail.com Sat Jun 25 11:05:27 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Jun 25 11:05:29 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <1466593074719-4902424.post@n4.nabble.com> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: +1 Makes sense. BTW, what does Rtm stand for? And how will minor maintenance releases be marked, which happen from time to time? As Tobias writes SystemVersion current does not return an 'alpha' suffix, this should be fixed. --Hannes On 6/22/16, marcel.taeumel wrote: > Tobias Pape wrote >> On 22.06.2016, at 11:24, marcel.taeumel < > >> Marcel.Taeumel@ > >> > wrote: >> >>> Hi there, >>> >>> we have a system version: "SystemVersion current". For trunk images, it >>> used >>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even >>> add >>> the 'alpha' suffix. >>> >>> Can we change that to 'SqueakTrunk'? What would break? Right now, >>> SystemVersion works with a string rather than major/minor numbers. I >>> assume >>> that there is some code that parses that string. Metacello does that, >>> for >>> example. >>> Any thoughts? >> >> Yes. >> >> SystemVersion current should give the following >> >> for 4.6 Squeak4.6 >> for 5.0 Squeak5.0 >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please >> Squeak{stable+1}{dev-indicator}) >> >> Best >> -Tobias >> >> >>> >>> Best, >>> Marcel > > Okay, we good improve the version number in trunk images and treat them as > (Git) tags. > > ... > Squeak5.1alpha > Squeak5.1beta > Squeak5.1rc1 > Squeak5.1rc2 > Squeak5.1rtm > Squeak5.2alpha > Squeak6.0alpha > Squeak6.0beta > ... > > Even if we decide to not make a minor release but a major the tag can jump. > So, any suffix after the version number indicates the trunk stream. > > Alpha = Open to any code submittions > Beta = Feature freeze, bug fixes only > Rc1...n = Some bugs fixed, next try > Rtm = Full code freeze, will be the one to release > > Would this work? > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From Das.Linux at gmx.de Sat Jun 25 14:23:40 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Jun 25 14:23:43 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> On 25.06.2016, at 13:05, H. Hirzel wrote: > +1 Makes sense. > > BTW, what does Rtm stand for? > And how will minor maintenance releases be marked, which happen from > time to time? Should be an additional digit, right? 4.5.1 or 5.1.2, for example. Best regards -Tobias > > As Tobias writes > > SystemVersion current > > > does not return an 'alpha' suffix, this should be fixed. > > > --Hannes > > On 6/22/16, marcel.taeumel wrote: >> Tobias Pape wrote >>> On 22.06.2016, at 11:24, marcel.taeumel < >> >>> Marcel.Taeumel@ >> >>> > wrote: >>> >>>> Hi there, >>>> >>>> we have a system version: "SystemVersion current". For trunk images, it >>>> used >>>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even >>>> add >>>> the 'alpha' suffix. >>>> >>>> Can we change that to 'SqueakTrunk'? What would break? Right now, >>>> SystemVersion works with a string rather than major/minor numbers. I >>>> assume >>>> that there is some code that parses that string. Metacello does that, >>>> for >>>> example. >>>> Any thoughts? >>> >>> Yes. >>> >>> SystemVersion current should give the following >>> >>> for 4.6 Squeak4.6 >>> for 5.0 Squeak5.0 >>> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please >>> Squeak{stable+1}{dev-indicator}) >>> >>> Best >>> -Tobias >>> >>> >>>> >>>> Best, >>>> Marcel >> >> Okay, we good improve the version number in trunk images and treat them as >> (Git) tags. >> >> ... >> Squeak5.1alpha >> Squeak5.1beta >> Squeak5.1rc1 >> Squeak5.1rc2 >> Squeak5.1rtm >> Squeak5.2alpha >> Squeak6.0alpha >> Squeak6.0beta >> ... >> >> Even if we decide to not make a minor release but a major the tag can jump. >> So, any suffix after the version number indicates the trunk stream. >> >> Alpha = Open to any code submittions >> Beta = Feature freeze, bug fixes only >> Rc1...n = Some bugs fixed, next try >> Rtm = Full code freeze, will be the one to release >> >> Would this work? >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Jun 25 21:56:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Jun 25 21:56:56 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160625215654.28798.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-June/068238.html Name: Morphic-mt.1185 Ancestors: Morphic-mt.1184 Fixes several bugs with selection and hovering in menus and docking-bar menus and their sub-menus. ============================================= From asqueaker at gmail.com Sun Jun 26 00:34:02 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sun Jun 26 00:34:45 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160623130551.GA52947@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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> Message-ID: Hi Dave, Dates created as positions by default is the definitely the correct behavior. The original Date implementation inherited the abstraction from Timespan of a custom duration starting at a particular DateAndTime. While that is a fine for abstract Timespans, it turned out to be a bad idea for Dates, since the vast majority of the use of Dates are as positions, not spans. Check out the discussion surrounding Berts recent clarification of the implementation, where the timezone for Dates-as-positions is now set to nil, so the "localized" or "globalized" nomenclature can be removed from the comment. - Chris On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis wrote: > The class comment says: > > Instances of Date are Timespans with duration of 1 day. > > Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. > > > I no longer see #localizedDates in the image, so I think the comment needs an update. > > > For reference, and earlier version of the class comment said this: > > Instances of Date are Timespans with duration of 1 day. > Their default creation assumes a start of midnight in the local time zone. > > > I am not sure what the comment should say, but I would be happy if it could > better convey the intended meaning of "Date" in addition to the explanation > about creating instances relative to UTC versus local time zone. > > My expectation would be that a Date is a Timespan with a start value set to > midnight in some time zone. The start value is a DateAndTime, and the offset > instance variable of that DateAndTime would reflect that time zone. > > I would therefore expect that a "globalized" Date is a special case of a Date > that was created with the start of the Timespan at midnight UTC, regardless > of the current local time zone. A "globalized" Date is no different from any > other Date, it is simply a Date that was created with time zone UTC. > > Is that right? > > Dave > > From lewis at mail.msen.com Mon Jun 27 03:30:35 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Jun 27 03:30:38 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates 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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> Message-ID: <20160627033035.GA59892@shell.msen.com> Hi Chris, I was really just trying to ask for a good class comment. The current comment contains an error, and I used that as an excuse for raising the question. I want to know the *meaning* of the Date class. And I would like the class comment to say what it means. The meaning seems to have changed considerably over the last ten or fifteen years as the implementations have changed, and I think that it would be helpful if the current definition could be stated as clearly as possible. On Sat, Jun 25, 2016 at 07:34:02PM -0500, Chris Muller wrote: > Hi Dave, Dates created as positions by default is the definitely the > correct behavior. The original Date implementation inherited the > abstraction from Timespan of a custom duration starting at a > particular DateAndTime. While that is a fine for abstract Timespans, > it turned out to be a bad idea for Dates, since the vast majority of > the use of Dates are as positions, not spans. I am not sure what is meant by "Dates as positions". When I first read this, I was thinking of "position relative to GMT" but on reading it again I realized that it probably means "position on a continuum of date values". Or maybe I am just completely confused (hence my plea for a good class comment). Despite my confusion, my own best guess at the current intended meaning of "Date" was in my original question below. A bit off topic, but is is worth asking: If we really want to model Date as a position on a continuum of date values, and if we think that the implementation of Date as a kind of Timespan is not right, then shouldn't we just consider going back to the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, rather than Date as a Timespan? Dave > > Check out the discussion surrounding Berts recent clarification of the > implementation, where the timezone for Dates-as-positions is now set > to nil, so the "localized" or "globalized" nomenclature can be removed > from the comment. > > - Chris > > > On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis wrote: > > The class comment says: > > > > Instances of Date are Timespans with duration of 1 day. > > > > Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. > > > > > > I no longer see #localizedDates in the image, so I think the comment needs an update. > > > > > > For reference, and earlier version of the class comment said this: > > > > Instances of Date are Timespans with duration of 1 day. > > Their default creation assumes a start of midnight in the local time zone. > > > > > > I am not sure what the comment should say, but I would be happy if it could > > better convey the intended meaning of "Date" in addition to the explanation > > about creating instances relative to UTC versus local time zone. > > > > My expectation would be that a Date is a Timespan with a start value set to > > midnight in some time zone. The start value is a DateAndTime, and the offset > > instance variable of that DateAndTime would reflect that time zone. > > > > I would therefore expect that a "globalized" Date is a special case of a Date > > that was created with the start of the Timespan at midnight UTC, regardless > > of the current local time zone. A "globalized" Date is no different from any > > other Date, it is simply a Date that was created with time zone UTC. > > > > Is that right? > > > > Dave > > > > From lewis at mail.msen.com Mon Jun 27 03:53:52 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Jun 27 03:53:54 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160627033035.GA59892@shell.msen.com> References: <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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: <20160627035352.GA74521@shell.msen.com> Would the following work as a class comment for Date? Date provides methods for dealing with calendar dates in different formats. Instances of Date are Timespans with duration of 1 day beginning at midnight. The start value of midnight, and possibly the duration of 1 day, depend on the time zone in which the Date is defined. In the most common usage, a Date is defined relative to UTC (time zone offset zero), and thus may be treated as a location independent calendar value. The current date, Date today, is assumed to be defined as a UTC date without consideration of local time zone. Dave On Sun, Jun 26, 2016 at 11:30:35PM -0400, David T. Lewis wrote: > Hi Chris, > > I was really just trying to ask for a good class comment. The current > comment contains an error, and I used that as an excuse for raising the > question. > > I want to know the *meaning* of the Date class. And I would like the > class comment to say what it means. The meaning seems to have changed > considerably over the last ten or fifteen years as the implementations > have changed, and I think that it would be helpful if the current > definition could be stated as clearly as possible. > > > On Sat, Jun 25, 2016 at 07:34:02PM -0500, Chris Muller wrote: > > Hi Dave, Dates created as positions by default is the definitely the > > correct behavior. The original Date implementation inherited the > > abstraction from Timespan of a custom duration starting at a > > particular DateAndTime. While that is a fine for abstract Timespans, > > it turned out to be a bad idea for Dates, since the vast majority of > > the use of Dates are as positions, not spans. > > I am not sure what is meant by "Dates as positions". When I first read > this, I was thinking of "position relative to GMT" but on reading it > again I realized that it probably means "position on a continuum of date > values". Or maybe I am just completely confused (hence my plea for a > good class comment). Despite my confusion, my own best guess at the > current intended meaning of "Date" was in my original question below. > > A bit off topic, but is is worth asking: > If we really want to model Date as a position on a continuum of date > values, and if we think that the implementation of Date as a kind of > Timespan is not right, then shouldn't we just consider going back to > the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, > rather than Date as a Timespan? > > Dave > > > > > Check out the discussion surrounding Berts recent clarification of the > > implementation, where the timezone for Dates-as-positions is now set > > to nil, so the "localized" or "globalized" nomenclature can be removed > > from the comment. > > > > - Chris > > > > > > On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis wrote: > > > The class comment says: > > > > > > Instances of Date are Timespans with duration of 1 day. > > > > > > Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. > > > > > > > > > I no longer see #localizedDates in the image, so I think the comment needs an update. > > > > > > > > > For reference, and earlier version of the class comment said this: > > > > > > Instances of Date are Timespans with duration of 1 day. > > > Their default creation assumes a start of midnight in the local time zone. > > > > > > > > > I am not sure what the comment should say, but I would be happy if it could > > > better convey the intended meaning of "Date" in addition to the explanation > > > about creating instances relative to UTC versus local time zone. > > > > > > My expectation would be that a Date is a Timespan with a start value set to > > > midnight in some time zone. The start value is a DateAndTime, and the offset > > > instance variable of that DateAndTime would reflect that time zone. > > > > > > I would therefore expect that a "globalized" Date is a special case of a Date > > > that was created with the start of the Timespan at midnight UTC, regardless > > > of the current local time zone. A "globalized" Date is no different from any > > > other Date, it is simply a Date that was created with time zone UTC. > > > > > > Is that right? > > > > > > Dave > > > > > > From Marcel.Taeumel at hpi.de Mon Jun 27 08:12:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 27 08:52:44 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> Message-ID: <1467015121595-4903508.post@n4.nabble.com> Tobias Pape wrote > On 25.06.2016, at 13:05, H. Hirzel < > hannes.hirzel@ > > wrote: > >> +1 Makes sense. >> >> BTW, what does Rtm stand for? >> And how will minor maintenance releases be marked, which happen from >> time to time? > > Should be an additional digit, right? > > 4.5.1 or 5.1.2, for example. > > Best regards > -Tobias > >> >> As Tobias writes >> >> SystemVersion current >> >> >> does not return an 'alpha' suffix, this should be fixed. >> >> >> --Hannes >> >> On 6/22/16, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >>> Tobias Pape wrote >>>> On 22.06.2016, at 11:24, marcel.taeumel < >>> >>>> Marcel.Taeumel@ >>> >>>> > wrote: >>>> >>>>> Hi there, >>>>> >>>>> we have a system version: "SystemVersion current". For trunk images, >>>>> it >>>>> used >>>>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't >>>>> even >>>>> add >>>>> the 'alpha' suffix. >>>>> >>>>> Can we change that to 'SqueakTrunk'? What would break? Right now, >>>>> SystemVersion works with a string rather than major/minor numbers. I >>>>> assume >>>>> that there is some code that parses that string. Metacello does that, >>>>> for >>>>> example. >>>>> Any thoughts? >>>> >>>> Yes. >>>> >>>> SystemVersion current should give the following >>>> >>>> for 4.6 Squeak4.6 >>>> for 5.0 Squeak5.0 >>>> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please >>>> Squeak{stable+1}{dev-indicator}) >>>> >>>> Best >>>> -Tobias >>>> >>>> >>>>> >>>>> Best, >>>>> Marcel >>> >>> Okay, we good improve the version number in trunk images and treat them >>> as >>> (Git) tags. >>> >>> ... >>> Squeak5.1alpha >>> Squeak5.1beta >>> Squeak5.1rc1 >>> Squeak5.1rc2 >>> Squeak5.1rtm >>> Squeak5.2alpha >>> Squeak6.0alpha >>> Squeak6.0beta >>> ... >>> >>> Even if we decide to not make a minor release but a major the tag can >>> jump. >>> So, any suffix after the version number indicates the trunk stream. >>> >>> Alpha = Open to any code submittions >>> Beta = Feature freeze, bug fixes only >>> Rc1...n = Some bugs fixed, next try >>> Rtm = Full code freeze, will be the one to release >>> >>> Would this work? >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. Would it make sense to keep track of the release build number and show the current increment in a separate way? Releases are basically branches from Trunk. E.g.: source.squeak.org/trunk source.squeak.org/squeak50 At release time, the code base is identical. Then, things might get cherry-picked from trunk into the release branch (here "squeak50"). Then, the summative build number would be confusing because "14023" in squeak50 is not the same as it is in trunk. What about doing it like GitHub branches and show "number of commits your are behind the main branch"? It could displayed like this: "Squeak 5.0 (Build 14000 +23/-324)" This means that the current image is a release image, created from trunk build 14000. There were 23 fixes in this branch since then and current Trunk is already 324 builds ahead. What do you think? Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903508.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From jakob.reschke at student.hpi.de Mon Jun 27 09:45:42 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Jun 27 09:46:05 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <4abec85167b947ef8b23f7b3c5812880@MX2015-DAG2.hpi.uni-potsdam.de> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> <4abec85167b947ef8b23f7b3c5812880@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-06-27 10:12 GMT+02:00 Taeumel, Marcel : > > Would it make sense to keep track of the release build number and show the > current increment in a separate way? Releases are basically branches from > Trunk. E.g.: > > source.squeak.org/trunk > source.squeak.org/squeak50 > > At release time, the code base is identical. Then, things might get > cherry-picked from trunk into the release branch (here "squeak50"). Then, > the summative build number would be confusing because "14023" in squeak50 is > not the same as it is in trunk. > > What about doing it like GitHub branches and show "number of commits your > are behind the main branch"? It could displayed like this: > > "Squeak 5.0 (Build 14000 +23/-324)" > > This means that the current image is a release image, created from trunk > build 14000. There were 23 fixes in this branch since then and current Trunk > is already 324 builds ahead. > > What do you think? That looks very cryptic to me. IMHO, if you need to see your build's detailed relation to the initial release or the current trunk, you should ask the SCM system (Monticello) itself. If I were a newcomer, these +/- numbers would confuse me when I want to download a specific image version from the website. I would not expect someone to read a manual to understand the version numbering. For reference, in the Maven/Java world, artifacts get a version suffixed with -SNAPSHOT until you do a "release". If you have an artifact with a version of 1.2.3-SNAPSHOT you know that there will be dozens of other builds with the same version number because the snapshot suffix indicates that this number "1.2.3" has not been fixed yet. That is, it is semantically equivalent to your current notion of (or suffix) "trunk". If you do a release, you strip the -SNAPSHOT from the version number (or rather jump to the intended fixed version number), commit, tag, publish that version, then bump the version number and append -SNAPSHOT again. The fixed version labelled "1.2.3" is not expected to ever change again, so if you download one of these artifacts, you can be quite sure it is identical to other "1.2.3"s of that artifact you download later. I consider this a sufficient scheme in many cases. However, it does not map to an alpha-beta-rc process, unless you put that into the less significant parts of the version number (which makes comparing versions harder for machines). From bert at freudenbergs.de Mon Jun 27 10:41:28 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Jun 27 10:41:32 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160627033035.GA59892@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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: On Mon, Jun 27, 2016 at 5:30 AM, David T. Lewis wrote: > A bit off topic, but is is worth asking: > If we really want to model Date as a position on a continuum of date > values, and if we think that the implementation of Date as a kind of > Timespan is not right, then shouldn't we just consider going back to > the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, > rather than Date as a Timespan? > I think this is a very relevant question. We may have to distinguish a Day from a Date. IMHO a birthday is a perfect example. It's defined by a day+month+year. If I was traveling I would celebrate the birthday in local time, so the generic "birthday" needs to compare equal to all the local dates independent of time zone. This is how Dates worked before we made them Timespans (because they had no time, and hence no time zone). And this is also how they worked after I added the "nil" offset hack (which ignores the timezone). But it's a hack, not a good design. I'm not entirely sure what a good design would look like that also does not break old code. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/5aad318c/attachment.htm From Marcel.Taeumel at hpi.de Mon Jun 27 10:44:14 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon Jun 27 11:25:02 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> Message-ID: <1467024254623-4903565.post@n4.nabble.com> Jakob Reschke wrote > 2016-06-27 10:12 GMT+02:00 Taeumel, Marcel < > Marcel.Taeumel@ > >: >> >> Would it make sense to keep track of the release build number and show >> the >> current increment in a separate way? Releases are basically branches from >> Trunk. E.g.: >> >> source.squeak.org/trunk >> source.squeak.org/squeak50 >> >> At release time, the code base is identical. Then, things might get >> cherry-picked from trunk into the release branch (here "squeak50"). Then, >> the summative build number would be confusing because "14023" in squeak50 >> is >> not the same as it is in trunk. >> >> What about doing it like GitHub branches and show "number of commits your >> are behind the main branch"? It could displayed like this: >> >> "Squeak 5.0 (Build 14000 +23/-324)" >> >> This means that the current image is a release image, created from trunk >> build 14000. There were 23 fixes in this branch since then and current >> Trunk >> is already 324 builds ahead. >> >> What do you think? > > That looks very cryptic to me. IMHO, if you need to see your build's > detailed relation to the initial release or the current trunk, you > should ask the SCM system (Monticello) itself. If I were a newcomer, > these +/- numbers would confuse me when I want to download a specific > image version from the website. I would not expect someone to read a > manual to understand the version numbering. > > For reference, in the Maven/Java world, artifacts get a version > suffixed with -SNAPSHOT until you do a "release". If you have an > artifact with a version of 1.2.3-SNAPSHOT you know that there will be > dozens of other builds with the same version number because the > snapshot suffix indicates that this number "1.2.3" has not been fixed > yet. That is, it is semantically equivalent to your current notion of > (or suffix) "trunk". If you do a release, you strip the -SNAPSHOT from > the version number (or rather jump to the intended fixed version > number), commit, tag, publish that version, then bump the version > number and append -SNAPSHOT again. The fixed version labelled "1.2.3" > is not expected to ever change again, so if you download one of these > artifacts, you can be quite sure it is identical to other "1.2.3"s of > that artifact you download later. I consider this a sufficient scheme > in many cases. However, it does not map to an alpha-beta-rc process, > unless you put that into the less significant parts of the version > number (which makes comparing versions harder for machines). Hi Jakob, you're right. This information would have to appear in the file name of the downloads on the website. Hmm... right now, our build number is the sum of all MCZ versions in the trunk update stream. The goal here is to find a simple solution for that branching thing. Maybe the combination of release number and build number is enough to discriminate. I do not quite get your example about Maven/Java. I think that you relate to the ideas of suffixing the Trunk versions with alpha, beta, rc1, ..., rcn, alpha, ... However, my previous comment addresses the naming of release versions only and the role of the respective build number. :-) I think that an alternative to summing up the MCZ versions could be to only show the most recent commit date/time of the packages in the update map. Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903565.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From jakob.reschke at student.hpi.de Mon Jun 27 12:15:15 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Mon Jun 27 12:15:41 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <4A1187D7-DBF1-4A3F-B112-18437254C581@gmx.de> Message-ID: I didn't want to touch the build numbers issue directly because I did not read all of that recent, related discussion about the VM versions. What is the purpose of each number? I thought the release version number ("5.1", "5.2 Trunk", ...) exists for publicity reasons and to find out if you should consider to "upgrade" your Squeak. The build number allows you to refer to a specific version/configuration, mainly for issue hunting, right? Can't we treat build numbers and release numbers independently from each other then? If yes, we could simply apply the Maven style version numbering (with "mutable" and "immutable" versions) to the release version numbers. It is very similar to what Tobias suggested, though, so you might as well consider my Maven paragraph as supporting Tobias' suggestion. ;-) "Squeak x.y" then just happens to also have a build number z, by chance. That's the current situation anyway, is it? If the release branch is updated, I would prefer if the patch number of that release were increased at the same time, instead of referring to a different build number for that release from now on. I don't know how an update map is made up, but would it be possible to version its configuration/state just like regular configurations, packages, or baselines? Then you could just use its SCM version number (hash/uuid, consecutive number if available, or timestamp) instead of summing up contained version numbers. 2016-06-27 12:44 GMT+02:00 Taeumel, Marcel : > Jakob Reschke wrote >> 2016-06-27 10:12 GMT+02:00 Taeumel, Marcel < > >> Marcel.Taeumel@ > >> >: >>> >>> Would it make sense to keep track of the release build number and show >>> the >>> current increment in a separate way? Releases are basically branches from >>> Trunk. E.g.: >>> >>> source.squeak.org/trunk >>> source.squeak.org/squeak50 >>> >>> At release time, the code base is identical. Then, things might get >>> cherry-picked from trunk into the release branch (here "squeak50"). Then, >>> the summative build number would be confusing because "14023" in squeak50 >>> is >>> not the same as it is in trunk. >>> >>> What about doing it like GitHub branches and show "number of commits your >>> are behind the main branch"? It could displayed like this: >>> >>> "Squeak 5.0 (Build 14000 +23/-324)" >>> >>> This means that the current image is a release image, created from trunk >>> build 14000. There were 23 fixes in this branch since then and current >>> Trunk >>> is already 324 builds ahead. >>> >>> What do you think? >> >> That looks very cryptic to me. IMHO, if you need to see your build's >> detailed relation to the initial release or the current trunk, you >> should ask the SCM system (Monticello) itself. If I were a newcomer, >> these +/- numbers would confuse me when I want to download a specific >> image version from the website. I would not expect someone to read a >> manual to understand the version numbering. >> >> For reference, in the Maven/Java world, artifacts get a version >> suffixed with -SNAPSHOT until you do a "release". If you have an >> artifact with a version of 1.2.3-SNAPSHOT you know that there will be >> dozens of other builds with the same version number because the >> snapshot suffix indicates that this number "1.2.3" has not been fixed >> yet. That is, it is semantically equivalent to your current notion of >> (or suffix) "trunk". If you do a release, you strip the -SNAPSHOT from >> the version number (or rather jump to the intended fixed version >> number), commit, tag, publish that version, then bump the version >> number and append -SNAPSHOT again. The fixed version labelled "1.2.3" >> is not expected to ever change again, so if you download one of these >> artifacts, you can be quite sure it is identical to other "1.2.3"s of >> that artifact you download later. I consider this a sufficient scheme >> in many cases. However, it does not map to an alpha-beta-rc process, >> unless you put that into the less significant parts of the version >> number (which makes comparing versions harder for machines). > > Hi Jakob, > > you're right. This information would have to appear in the file name of the > downloads on the website. Hmm... right now, our build number is the sum of > all MCZ versions in the trunk update stream. The goal here is to find a > simple solution for that branching thing. Maybe the combination of release > number and build number is enough to discriminate. > > I do not quite get your example about Maven/Java. I think that you relate to > the ideas of suffixing the Trunk versions with alpha, beta, rc1, ..., rcn, > alpha, ... However, my previous comment addresses the naming of release > versions only and the role of the respective build number. :-) > > I think that an alternative to summing up the MCZ versions could be to only > show the most recent commit date/time of the packages in the update map. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903565.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Lou at Keystone-Software.com Mon Jun 27 12:47:10 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Mon Jun 27 12:47:21 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates References: <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: Hi Dave, Not that it matters too much to the Squeak world but a Date in VA Smalltalk is a Magnitude. I'm very glad you are trying to think all this data/time stuff through. A while ago (like ten years) VA Smalltalk went from keeping time as an integer number of seconds to keeping them as milliseconds. In and of itself that was fine but they changed #asSeconds from answering that number of seconds to answering a rounded number of milliseconds. This broke some of my code as it made some time values (when represented as seconds) look like a time in the future. IMHO rounding shouldn't be used unless it is needed just before a value is being displayed for humans. That wasn't the case here and although many if not most people agreed with me, I didn't discover the change until it had been in place for a long time and Instantiations was reluctant to fix it. Lou On Sun, 26 Jun 2016 23:30:35 -0400, "David T. Lewis" wrote: >Hi Chris, > >I was really just trying to ask for a good class comment. The current >comment contains an error, and I used that as an excuse for raising the >question. > >I want to know the *meaning* of the Date class. And I would like the >class comment to say what it means. The meaning seems to have changed >considerably over the last ten or fifteen years as the implementations >have changed, and I think that it would be helpful if the current >definition could be stated as clearly as possible. > > >On Sat, Jun 25, 2016 at 07:34:02PM -0500, Chris Muller wrote: >> Hi Dave, Dates created as positions by default is the definitely the >> correct behavior. The original Date implementation inherited the >> abstraction from Timespan of a custom duration starting at a >> particular DateAndTime. While that is a fine for abstract Timespans, >> it turned out to be a bad idea for Dates, since the vast majority of >> the use of Dates are as positions, not spans. > >I am not sure what is meant by "Dates as positions". When I first read >this, I was thinking of "position relative to GMT" but on reading it >again I realized that it probably means "position on a continuum of date >values". Or maybe I am just completely confused (hence my plea for a >good class comment). Despite my confusion, my own best guess at the >current intended meaning of "Date" was in my original question below. > >A bit off topic, but is is worth asking: >If we really want to model Date as a position on a continuum of date >values, and if we think that the implementation of Date as a kind of >Timespan is not right, then shouldn't we just consider going back to >the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, >rather than Date as a Timespan? > >Dave > >> >> Check out the discussion surrounding Berts recent clarification of the >> implementation, where the timezone for Dates-as-positions is now set >> to nil, so the "localized" or "globalized" nomenclature can be removed >> from the comment. >> >> - Chris >> >> >> On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis wrote: >> > The class comment says: >> > >> > Instances of Date are Timespans with duration of 1 day. >> > >> > Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. >> > >> > >> > I no longer see #localizedDates in the image, so I think the comment needs an update. >> > >> > >> > For reference, and earlier version of the class comment said this: >> > >> > Instances of Date are Timespans with duration of 1 day. >> > Their default creation assumes a start of midnight in the local time zone. >> > >> > >> > I am not sure what the comment should say, but I would be happy if it could >> > better convey the intended meaning of "Date" in addition to the explanation >> > about creating instances relative to UTC versus local time zone. >> > >> > My expectation would be that a Date is a Timespan with a start value set to >> > midnight in some time zone. The start value is a DateAndTime, and the offset >> > instance variable of that DateAndTime would reflect that time zone. >> > >> > I would therefore expect that a "globalized" Date is a special case of a Date >> > that was created with the start of the Timespan at midnight UTC, regardless >> > of the current local time zone. A "globalized" Date is no different from any >> > other Date, it is simply a Date that was created with time zone UTC. >> > >> > Is that right? >> > >> > Dave >> > >> > > -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From cunningham.cb at gmail.com Mon Jun 27 15:31:28 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jun 27 15:31:30 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates 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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: So, Time and Dates are hard. When Date was a magnitude, it was easy. Now that it is a duration, it is occassionally wrong. Think about daylight savings time - at least one a year the day length is 25 hours, and once it is 23 hours (although in some places there are no Daylight Savings, so this isn't true, and in others, there are 2 switches, so it happens twice). Our current implementation doesn't take this into account - which is reasonable because it is hard to take this into account without a lot of work. If we want to keep Date as a timespan (with rough correctness), maybe we could also add in Day (as a magnitude) to work like the old Date? For what it is worth, I spend >80% of my time working with dates/timestamps, trying to turn them into Magnitudes for manipulations. The other 20%, I really enjoy them as timespans with locales since I deal with times from around the world. But the two uses are not quite easy to deal with - doable, just not quite intuitive. -cbc On Mon, Jun 27, 2016 at 3:41 AM, Bert Freudenberg wrote: > On Mon, Jun 27, 2016 at 5:30 AM, David T. Lewis > wrote: > >> A bit off topic, but is is worth asking: >> If we really want to model Date as a position on a continuum of date >> values, and if we think that the implementation of Date as a kind of >> Timespan is not right, then shouldn't we just consider going back to >> the earlier (Squeak 3.6 and earlier) implementation of Date as a >> Magnitude, >> rather than Date as a Timespan? >> > > I think this is a very relevant question. We may have to distinguish a Day > from a Date. > > IMHO a birthday is a perfect example. It's defined by a day+month+year. If > I was traveling I would celebrate the birthday in local time, so the > generic "birthday" needs to compare equal to all the local dates > independent of time zone. > > This is how Dates worked before we made them Timespans (because they had > no time, and hence no time zone). And this is also how they worked after I > added the "nil" offset hack (which ignores the timezone). But it's a hack, > not a good design. I'm not entirely sure what a good design would look like > that also does not break old code. > > - Bert - > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/66f0296e/attachment.htm From asqueaker at gmail.com Mon Jun 27 15:55:38 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Jun 27 15:56:20 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160627035352.GA74521@shell.msen.com> References: <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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160627035352.GA74521@shell.msen.com> Message-ID: Hi Dave, all of the Timespans are instantiated as positions by default (e.g., ignoring timezone), which is the common case. If/when someone might need a Date, Month, Week, etc. which begins at a timezone-specific time, they will be glad to see that it is handled automatically. For example, when adding a Timespan to a DateAndTime with the #+ message, the result gets the same offset as the receiver. But this uncommon case is revealed at method-level code and comments, so I would just simplify the class comment to: Instances of Date are Timespans with duration of 1 day. Oh, i like that. It reflects the simplicity and elegance of Chronology's implementation which is able to interoperate with itself. Best, Chris > Would the following work as a class comment for Date? > > Date provides methods for dealing with calendar dates in different formats. > > Instances of Date are Timespans with duration of 1 day beginning at midnight. > The start value of midnight, and possibly the duration of 1 day, depend on > the time zone in which the Date is defined. > > In the most common usage, a Date is defined relative to UTC (time zone offset > zero), and thus may be treated as a location independent calendar value. > > The current date, Date today, is assumed to be defined as a UTC date without > consideration of local time zone. > > > Dave > > > On Sun, Jun 26, 2016 at 11:30:35PM -0400, David T. Lewis wrote: >> Hi Chris, >> >> I was really just trying to ask for a good class comment. The current >> comment contains an error, and I used that as an excuse for raising the >> question. >> >> I want to know the *meaning* of the Date class. And I would like the >> class comment to say what it means. The meaning seems to have changed >> considerably over the last ten or fifteen years as the implementations >> have changed, and I think that it would be helpful if the current >> definition could be stated as clearly as possible. >> >> >> On Sat, Jun 25, 2016 at 07:34:02PM -0500, Chris Muller wrote: >> > Hi Dave, Dates created as positions by default is the definitely the >> > correct behavior. The original Date implementation inherited the >> > abstraction from Timespan of a custom duration starting at a >> > particular DateAndTime. While that is a fine for abstract Timespans, >> > it turned out to be a bad idea for Dates, since the vast majority of >> > the use of Dates are as positions, not spans. >> >> I am not sure what is meant by "Dates as positions". When I first read >> this, I was thinking of "position relative to GMT" but on reading it >> again I realized that it probably means "position on a continuum of date >> values". Or maybe I am just completely confused (hence my plea for a >> good class comment). Despite my confusion, my own best guess at the >> current intended meaning of "Date" was in my original question below. >> >> A bit off topic, but is is worth asking: >> If we really want to model Date as a position on a continuum of date >> values, and if we think that the implementation of Date as a kind of >> Timespan is not right, then shouldn't we just consider going back to >> the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, >> rather than Date as a Timespan? >> >> Dave >> >> > >> > Check out the discussion surrounding Berts recent clarification of the >> > implementation, where the timezone for Dates-as-positions is now set >> > to nil, so the "localized" or "globalized" nomenclature can be removed >> > from the comment. >> > >> > - Chris >> > >> > >> > On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis wrote: >> > > The class comment says: >> > > >> > > Instances of Date are Timespans with duration of 1 day. >> > > >> > > Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. >> > > >> > > >> > > I no longer see #localizedDates in the image, so I think the comment needs an update. >> > > >> > > >> > > For reference, and earlier version of the class comment said this: >> > > >> > > Instances of Date are Timespans with duration of 1 day. >> > > Their default creation assumes a start of midnight in the local time zone. >> > > >> > > >> > > I am not sure what the comment should say, but I would be happy if it could >> > > better convey the intended meaning of "Date" in addition to the explanation >> > > about creating instances relative to UTC versus local time zone. >> > > >> > > My expectation would be that a Date is a Timespan with a start value set to >> > > midnight in some time zone. The start value is a DateAndTime, and the offset >> > > instance variable of that DateAndTime would reflect that time zone. >> > > >> > > I would therefore expect that a "globalized" Date is a special case of a Date >> > > that was created with the start of the Timespan at midnight UTC, regardless >> > > of the current local time zone. A "globalized" Date is no different from any >> > > other Date, it is simply a Date that was created with time zone UTC. >> > > >> > > Is that right? >> > > >> > > Dave >> > > >> > > > From eliot.miranda at gmail.com Mon Jun 27 17:01:40 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 27 17:01:44 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel wrote: > +1 Makes sense. > > BTW, what does Rtm stand for? > I'd like to know this too. No one seems to have answered this yet. What does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) > And how will minor maintenance releases be marked, which happen from > time to time? > > As Tobias writes > > SystemVersion current > > > does not return an 'alpha' suffix, this should be fixed. > > > --Hannes > > On 6/22/16, marcel.taeumel wrote: > > Tobias Pape wrote > >> On 22.06.2016, at 11:24, marcel.taeumel < > > > >> Marcel.Taeumel@ > > > >> > wrote: > >> > >>> Hi there, > >>> > >>> we have a system version: "SystemVersion current". For trunk images, it > >>> used > >>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't > even > >>> add > >>> the 'alpha' suffix. > >>> > >>> Can we change that to 'SqueakTrunk'? What would break? Right now, > >>> SystemVersion works with a string rather than major/minor numbers. I > >>> assume > >>> that there is some code that parses that string. Metacello does that, > >>> for > >>> example. > >>> Any thoughts? > >> > >> Yes. > >> > >> SystemVersion current should give the following > >> > >> for 4.6 Squeak4.6 > >> for 5.0 Squeak5.0 > >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but > please > >> Squeak{stable+1}{dev-indicator}) > >> > >> Best > >> -Tobias > >> > >> > >>> > >>> Best, > >>> Marcel > > > > Okay, we good improve the version number in trunk images and treat them > as > > (Git) tags. > > > > ... > > Squeak5.1alpha > > Squeak5.1beta > > Squeak5.1rc1 > > Squeak5.1rc2 > > Squeak5.1rtm > > Squeak5.2alpha > > Squeak6.0alpha > > Squeak6.0beta > > ... > > > > Even if we decide to not make a minor release but a major the tag can > jump. > > So, any suffix after the version number indicates the trunk stream. > > > > Alpha = Open to any code submittions > > Beta = Feature freeze, bug fixes only > > Rc1...n = Some bugs fixed, next try > > Rtm = Full code freeze, will be the one to release > > > > Would this work? > > > > Best, > > Marcel > > > > > > > > -- > > View this message in context: > > > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.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/20160627/fa137a17/attachment.htm From btc at openinworld.com Mon Jun 27 17:25:51 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Jun 27 17:26:14 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: Release To Manfacture On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda wrote: > > > On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel wrote: >> >> +1 Makes sense. >> >> BTW, what does Rtm stand for? > > > I'd like to know this too. No one seems to have answered this yet. What > does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) > >> >> And how will minor maintenance releases be marked, which happen from >> time to time? >> >> As Tobias writes >> >> SystemVersion current >> >> >> does not return an 'alpha' suffix, this should be fixed. >> >> >> --Hannes >> >> On 6/22/16, marcel.taeumel wrote: >> > Tobias Pape wrote >> >> On 22.06.2016, at 11:24, marcel.taeumel < >> > >> >> Marcel.Taeumel@ >> > >> >> > wrote: >> >> >> >>> Hi there, >> >>> >> >>> we have a system version: "SystemVersion current". For trunk images, >> >>> it >> >>> used >> >>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't >> >>> even >> >>> add >> >>> the 'alpha' suffix. >> >>> >> >>> Can we change that to 'SqueakTrunk'? What would break? Right now, >> >>> SystemVersion works with a string rather than major/minor numbers. I >> >>> assume >> >>> that there is some code that parses that string. Metacello does that, >> >>> for >> >>> example. >> >>> Any thoughts? >> >> >> >> Yes. >> >> >> >> SystemVersion current should give the following >> >> >> >> for 4.6 Squeak4.6 >> >> for 5.0 Squeak5.0 >> >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but >> >> please >> >> Squeak{stable+1}{dev-indicator}) >> >> >> >> Best >> >> -Tobias >> >> >> >> >> >>> >> >>> Best, >> >>> Marcel >> > >> > Okay, we good improve the version number in trunk images and treat them >> > as >> > (Git) tags. >> > >> > ... >> > Squeak5.1alpha >> > Squeak5.1beta >> > Squeak5.1rc1 >> > Squeak5.1rc2 >> > Squeak5.1rtm >> > Squeak5.2alpha >> > Squeak6.0alpha >> > Squeak6.0beta >> > ... >> > >> > Even if we decide to not make a minor release but a major the tag can >> > jump. >> > So, any suffix after the version number indicates the trunk stream. >> > >> > Alpha = Open to any code submittions >> > Beta = Feature freeze, bug fixes only >> > Rc1...n = Some bugs fixed, next try >> > Rtm = Full code freeze, will be the one to release >> > >> > Would this work? >> > >> > Best, >> > Marcel >> > >> > >> > >> > -- >> > View this message in context: >> > >> > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >> > Sent from the Squeak - Dev mailing list archive at Nabble.com. >> > >> > >> > > > > -- > _,,,^..^,,,_ > best, Eliot > > > From eliot.miranda at gmail.com Mon Jun 27 17:32:05 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 27 17:32:09 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: References: <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: On Mon, Jun 27, 2016 at 5:47 AM, Louis LaBrunda wrote: > Hi Dave, > > Not that it matters too much to the Squeak world but a Date in VA > Smalltalk is a Magnitude. > > I'm very glad you are trying to think all this data/time stuff through. A > while ago (like ten > years) VA Smalltalk went from keeping time as an integer number of seconds > to keeping them as > milliseconds. In and of itself that was fine but they changed #asSeconds > from answering that > number of seconds to answering a rounded number of milliseconds. This > broke some of my code as > it made some time values (when represented as seconds) look like a time in > the future. IMHO > rounding shouldn't be used unless it is needed just before a value is > being displayed for > humans. That wasn't the case here and although many if not most people > agreed with me, I > didn't discover the change until it had been in place for a long time and > Instantiations was > reluctant to fix it. > I hope we can settle on representing them as microseconds. Using nanoseconds (the Microsoft granularity) shrinks their usable time span to 36 years if using 61-bit SmallIntegers, which is too short even if we use the posix epoch, and horrible if we want to rebase things, e.g. at 2000 or 2001. Keeping microseconds, which is the VM representation gives us ~36,000 years within the 61-bit SmallInteger range (- 2^60 - 2^60 - 1) in 64-bit Spur. Using milliseconds throws away precision and introduces a divide. Multiplying, or worse still dividing, by 1000 n every instantiation seems like a bad idea to me. > Lou > > > On Sun, 26 Jun 2016 23:30:35 -0400, "David T. Lewis" > wrote: > > >Hi Chris, > > > >I was really just trying to ask for a good class comment. The current > >comment contains an error, and I used that as an excuse for raising the > >question. > > > >I want to know the *meaning* of the Date class. And I would like the > >class comment to say what it means. The meaning seems to have changed > >considerably over the last ten or fifteen years as the implementations > >have changed, and I think that it would be helpful if the current > >definition could be stated as clearly as possible. > > > > > >On Sat, Jun 25, 2016 at 07:34:02PM -0500, Chris Muller wrote: > >> Hi Dave, Dates created as positions by default is the definitely the > >> correct behavior. The original Date implementation inherited the > >> abstraction from Timespan of a custom duration starting at a > >> particular DateAndTime. While that is a fine for abstract Timespans, > >> it turned out to be a bad idea for Dates, since the vast majority of > >> the use of Dates are as positions, not spans. > > > >I am not sure what is meant by "Dates as positions". When I first read > >this, I was thinking of "position relative to GMT" but on reading it > >again I realized that it probably means "position on a continuum of date > >values". Or maybe I am just completely confused (hence my plea for a > >good class comment). Despite my confusion, my own best guess at the > >current intended meaning of "Date" was in my original question below. > > > >A bit off topic, but is is worth asking: > >If we really want to model Date as a position on a continuum of date > >values, and if we think that the implementation of Date as a kind of > >Timespan is not right, then shouldn't we just consider going back to > >the earlier (Squeak 3.6 and earlier) implementation of Date as a > Magnitude, > >rather than Date as a Timespan? > > > >Dave > > > >> > >> Check out the discussion surrounding Berts recent clarification of the > >> implementation, where the timezone for Dates-as-positions is now set > >> to nil, so the "localized" or "globalized" nomenclature can be removed > >> from the comment. > >> > >> - Chris > >> > >> > >> On Thu, Jun 23, 2016 at 8:05 AM, David T. Lewis > wrote: > >> > The class comment says: > >> > > >> > Instances of Date are Timespans with duration of 1 day. > >> > > >> > Their default creation assumes a start of midnight of UTC to > provide the fast, globalized Dates out of the box. The legacy behavior > that creates Timezone-sensitive Dates can be used by sending > #localizedDates. > >> > > >> > > >> > I no longer see #localizedDates in the image, so I think the comment > needs an update. > >> > > >> > > >> > For reference, and earlier version of the class comment said this: > >> > > >> > Instances of Date are Timespans with duration of 1 day. > >> > Their default creation assumes a start of midnight in the local > time zone. > >> > > >> > > >> > I am not sure what the comment should say, but I would be happy if it > could > >> > better convey the intended meaning of "Date" in addition to the > explanation > >> > about creating instances relative to UTC versus local time zone. > >> > > >> > My expectation would be that a Date is a Timespan with a start value > set to > >> > midnight in some time zone. The start value is a DateAndTime, and the > offset > >> > instance variable of that DateAndTime would reflect that time zone. > >> > > >> > I would therefore expect that a "globalized" Date is a special case > of a Date > >> > that was created with the start of the Timespan at midnight UTC, > regardless > >> > of the current local time zone. A "globalized" Date is no different > from any > >> > other Date, it is simply a Date that was created with time zone UTC. > >> > > >> > Is that right? > >> > > >> > Dave > >> > > >> > > > > -- > Louis LaBrunda > Keystone Software Corp. > SkypeMe callto://PhotonDemon > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/b304493e/attachment.htm From eliot.miranda at gmail.com Mon Jun 27 17:34:00 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 27 17:34:04 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates 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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: Hi Chris, On Mon, Jun 27, 2016 at 8:31 AM, Chris Cunningham wrote: > So, Time and Dates are hard. When Date was a magnitude, it was easy. Now > that it is a duration, it is occassionally wrong. Think about daylight > savings time - at least one a year the day length is 25 hours, and once it > is 23 hours (although in some places there are no Daylight Savings, so this > isn't true, and in others, there are 2 switches, so it happens twice). Our > current implementation doesn't take this into account - which is reasonable > because it is hard to take this into account without a lot of work. > > If we want to keep Date as a timespan (with rough correctness), maybe we > could also add in Day (as a magnitude) to work like the old Date? > That's what I wonder. Can't we simply store the start time (ideally UTC microseconds or local microseconds) internally and then compute the duration programmatically, depending on the timezone in effect? > > For what it is worth, I spend >80% of my time working with > dates/timestamps, trying to turn them into Magnitudes for manipulations. > The other 20%, I really enjoy them as timespans with locales since I deal > with times from around the world. But the two uses are not quite easy to > deal with - doable, just not quite intuitive. > So if we store the start time isn't the conversion to a magnitude simply an inst var access? > -cbc > > On Mon, Jun 27, 2016 at 3:41 AM, Bert Freudenberg > wrote: > >> On Mon, Jun 27, 2016 at 5:30 AM, David T. Lewis >> wrote: >> >>> A bit off topic, but is is worth asking: >>> If we really want to model Date as a position on a continuum of date >>> values, and if we think that the implementation of Date as a kind of >>> Timespan is not right, then shouldn't we just consider going back to >>> the earlier (Squeak 3.6 and earlier) implementation of Date as a >>> Magnitude, >>> rather than Date as a Timespan? >>> >> >> I think this is a very relevant question. We may have to distinguish a >> Day from a Date. >> >> IMHO a birthday is a perfect example. It's defined by a day+month+year. >> If I was traveling I would celebrate the birthday in local time, so the >> generic "birthday" needs to compare equal to all the local dates >> independent of time zone. >> >> This is how Dates worked before we made them Timespans (because they had >> no time, and hence no time zone). And this is also how they worked after I >> added the "nil" offset hack (which ignores the timezone). But it's a hack, >> not a good design. I'm not entirely sure what a good design would look like >> that also does not break old code. >> >> - Bert - >> >> >> >> >> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/a2583448/attachment.htm From eliot.miranda at gmail.com Mon Jun 27 17:35:31 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 27 17:35:35 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman wrote: > Release To Manfacture > I much prefer "final". > > On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda > wrote: > > > > > > On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel > wrote: > >> > >> +1 Makes sense. > >> > >> BTW, what does Rtm stand for? > > > > > > I'd like to know this too. No one seems to have answered this yet. What > > does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) > > > >> > >> And how will minor maintenance releases be marked, which happen from > >> time to time? > >> > >> As Tobias writes > >> > >> SystemVersion current > >> > >> > >> does not return an 'alpha' suffix, this should be fixed. > >> > >> > >> --Hannes > >> > >> On 6/22/16, marcel.taeumel wrote: > >> > Tobias Pape wrote > >> >> On 22.06.2016, at 11:24, marcel.taeumel < > >> > > >> >> Marcel.Taeumel@ > >> > > >> >> > wrote: > >> >> > >> >>> Hi there, > >> >>> > >> >>> we have a system version: "SystemVersion current". For trunk images, > >> >>> it > >> >>> used > >> >>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't > >> >>> even > >> >>> add > >> >>> the 'alpha' suffix. > >> >>> > >> >>> Can we change that to 'SqueakTrunk'? What would break? Right now, > >> >>> SystemVersion works with a string rather than major/minor numbers. I > >> >>> assume > >> >>> that there is some code that parses that string. Metacello does > that, > >> >>> for > >> >>> example. > >> >>> Any thoughts? > >> >> > >> >> Yes. > >> >> > >> >> SystemVersion current should give the following > >> >> > >> >> for 4.6 Squeak4.6 > >> >> for 5.0 Squeak5.0 > >> >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but > >> >> please > >> >> Squeak{stable+1}{dev-indicator}) > >> >> > >> >> Best > >> >> -Tobias > >> >> > >> >> > >> >>> > >> >>> Best, > >> >>> Marcel > >> > > >> > Okay, we good improve the version number in trunk images and treat > them > >> > as > >> > (Git) tags. > >> > > >> > ... > >> > Squeak5.1alpha > >> > Squeak5.1beta > >> > Squeak5.1rc1 > >> > Squeak5.1rc2 > >> > Squeak5.1rtm > >> > Squeak5.2alpha > >> > Squeak6.0alpha > >> > Squeak6.0beta > >> > ... > >> > > >> > Even if we decide to not make a minor release but a major the tag can > >> > jump. > >> > So, any suffix after the version number indicates the trunk stream. > >> > > >> > Alpha = Open to any code submittions > >> > Beta = Feature freeze, bug fixes only > >> > Rc1...n = Some bugs fixed, next try > >> > Rtm = Full code freeze, will be the one to release > >> > > >> > Would this work? > >> > > >> > Best, > >> > Marcel > >> > > >> > > >> > > >> > -- > >> > View this message in context: > >> > > >> > > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html > >> > Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > > >> > > >> > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/fa03e387/attachment.htm From eliot.miranda at gmail.com Mon Jun 27 17:48:23 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Jun 27 17:48:30 2016 Subject: [squeak-dev] Re: Become Identity Forward In-Reply-To: References: Message-ID: Hi, I don't see the bug. Look at this example: | a b ha hb | a := Object new. b := Object new. ha := a identityHash. hb := b identityHash. a becomeForward: b copyHash: true. { ha = hb. a == b. a identityHash == ha }. #(false true true) So here a has indeed become b; all references to a are now references to b. But b's identityHash is now that of what a's was before the become. That's as specified. Let's extend the example: | a b ha hb is | a := Object new. b := Object new. is := IdentitySet new. *is add: b.* ha := a identityHash. hb := b identityHash. a becomeForward: b copyHash: true. { ha = hb. a == b. a identityHash == ha. *is includes: a* }. #(false true true false) This is correct; a (and b) is (are) now in the set at the old hash of b, which is no longer its hash. So... | a b ha hb is | a := Object new. b := Object new. is := IdentitySet new. is add: b. ha := a identityHash. hb := b identityHash. a becomeForward: b copyHash: true. *is rehash.* { ha = hb. a == b. a identityHash == ha. is includes: a }. #(false true true true) Good. So instead what you might have meant to say was | a b ha hb is | a := Object new. b := Object new. is := IdentitySet new. *is add: a.* ha := a identityHash. hb := b identityHash. a becomeForward: b copyHash: true. { ha = hb. a == b. a identityHash == ha. is includes: a }. #(false true true true) That looks good. On Mon, Jun 27, 2016 at 2:50 AM, tesonep@gmail.com wrote: > Hello, > I'm trying to become forward some objects, these objects are stored > in IdentitySets so I need to copy the identityHash of the older objects to > the new ones. So that the IdentitySets are still well constructed. > > I have read the comments in Array >> elementsForwardIdentityTo: copyHash: > , and Array >> elementsForwardIdentityTo:, so I realise that the operation > I want to use is the first with copyHash in true or the later (that should > be doing the same, from the comments). > > But after trying it, it is not working as expected. > > If I try with: > > x := Object new. > y := Object new. > z := Object new. > > set := IdentitySet new. > set add: x. > set add: y. > > hash := x identityHash. > bhash := x basicIdentityHash. > > self assert:(set isHealthy). > > z becomeForward: x copyHash: true. > > set isHealthy "false" > > z basicIdentityHash = bhash. "false" > z identityHash = hash "false" > > It is not working, but if I changed the copyHash parameter to false, it > works. > > Something is not right (the comment or the implementation), because the > comment says: > > "If copyHash is true, the identityHashes remain with the pointers rather > than with the > objects so that the objects in the receiver should still be properly > indexed in any > existing hashed structures after the mutation. If copyHash is false, then > the hashes > of the objects in otherArray remain unchanged." > > Do I have understanded everything wrong or there is something that is not > working (or at least the comment is not clear) > > Is somebody using these operations? How do you expect to work? > > Maybe If you can help me to understand the situation I can fix the > comments. > > Thanks in advance. > > -- > Pablo Tesone. > tesonep@gmail.com > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/4a68acaa/attachment-0001.htm From cunningham.cb at gmail.com Mon Jun 27 18:27:12 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Mon Jun 27 18:27:15 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates 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> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: > > For what it is worth, I spend >80% of my time working with > dates/timestamps, trying to turn them into Magnitudes for manipulations. > The other 20%, I really enjoy them as timespans with locales since I deal > with times from around the world. But the two uses are not quite easy to > deal with - doable, just not quite intuitive. > So if we store the start time isn't the conversion to a magnitude simply an inst var access? That's mostly what I do. But it depends on how the Date is created. For instance, unless you live in the UTC time zone, the following is true: Date today = DateAndTime now asDate "==>true" Date today start = DateAndTime now asDate start "==>false" Date today start asSeconds = DateAndTime now asDate start asSeconds "==>true" And, of course, it isn't a DAY that we are talking about - it is a DateAndTime (a specific point in time). It's just remembering which corner cases are true, and which aren't, at any given time. (as an aside, I find it interesting that Timespan current gives you a day. It is what Date today is based off of - so don't ever change that Timespan #current method!) -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160627/5baefbdb/attachment.htm From tim at rowledge.org Mon Jun 27 21:27:47 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Jun 27 21:27:28 2016 Subject: [squeak-dev] rounded corner morphs seem to be broken Message-ID: <0D6B52FA-8E04-4124-9FDF-49D7B0181506@rowledge.org> I?m trying to work out why the comment morphs in nuScratch are not getting the rounded corners that they should. This is something that changed a while ago without me really noticing. I think we?re talking late last year as best I can tell from trying out older releases to attempt to triangulate on the problem. In the olden days we used a CornerRounder class to handle things, which has gone away. So far as I can work out now we don?t really do the job thoroughly. Individual morphs can draw with rounded corners ok although the rounding is not very nicely drawn below a radius of 8 pixels, which is admittedly not a huge surprise. If you make a composite morph - like the comment morphs - the submorphs are not affected at all any more. This makes the comment morph fairy very sad. The comment fairy wants her morphs to look like this - and when the little magic triangle is tickled it should look like this - Instead we get this - and - The comment is currently implemented as an AlignmentMorph containing a topbar (another alignment containing the triangle and a usually empty string morph) and the lower area holding a ?MultilineStringMorph? and the resize icon morph. The lower-right corner looks ok because the resize icon is small enough not to overlap the rounding. I managed improve things a little by making the background to the lower text transparent; before that the lower left corner was squared off too. Looking around for rounding related code I note that the Morph>roundedCorners method which appears to be a way to designate which corners are actually rounded is no longer used. Which is a pity since it would possibly solve my problem by allowing me to round the top two corners of the upper alignment morph. Hmm, actually since the colours of the upper and lower backgrounds are very close it kinda-sorta looks acceptable if I just round the entire upper morph - but it ain?t proper I tell you! Can anyone recall messing about with rounding morphs over the last year or thereabouts? I think it happened between 4.5-13860 and 4.6-15102 tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BIB: Branch If Branch if branch... -------------- next part -------------- Skipped content of type multipart/related From smalltalker2 at mac.com Mon Jun 27 23:08:38 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Mon Jun 27 23:09:02 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: <15AC25C6-ACCF-41D5-A12E-00A1FDE5E1E8@mac.com> Rtm - release to manufacturing Sent from my iPad > On Jun 27, 2016, at 10:01, Eliot Miranda wrote: > > > >> On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel wrote: >> +1 Makes sense. >> >> BTW, what does Rtm stand for? > > I'd like to know this too. No one seems to have answered this yet. What does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) > >> And how will minor maintenance releases be marked, which happen from >> time to time? >> >> As Tobias writes >> >> SystemVersion current >> >> >> does not return an 'alpha' suffix, this should be fixed. >> >> >> --Hannes >> >> On 6/22/16, marcel.taeumel wrote: >> > Tobias Pape wrote >> >> On 22.06.2016, at 11:24, marcel.taeumel < >> > >> >> Marcel.Taeumel@ >> > >> >> > wrote: >> >> >> >>> Hi there, >> >>> >> >>> we have a system version: "SystemVersion current". For trunk images, it >> >>> used >> >>> to say 'Squeak4.1alpha' or something like it. Right now, it doesn't even >> >>> add >> >>> the 'alpha' suffix. >> >>> >> >>> Can we change that to 'SqueakTrunk'? What would break? Right now, >> >>> SystemVersion works with a string rather than major/minor numbers. I >> >>> assume >> >>> that there is some code that parses that string. Metacello does that, >> >>> for >> >>> example. >> >>> Any thoughts? >> >> >> >> Yes. >> >> >> >> SystemVersion current should give the following >> >> >> >> for 4.6 Squeak4.6 >> >> for 5.0 Squeak5.0 >> >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but please >> >> Squeak{stable+1}{dev-indicator}) >> >> >> >> Best >> >> -Tobias >> >> >> >> >> >>> >> >>> Best, >> >>> Marcel >> > >> > Okay, we good improve the version number in trunk images and treat them as >> > (Git) tags. >> > >> > ... >> > Squeak5.1alpha >> > Squeak5.1beta >> > Squeak5.1rc1 >> > Squeak5.1rc2 >> > Squeak5.1rtm >> > Squeak5.2alpha >> > Squeak6.0alpha >> > Squeak6.0beta >> > ... >> > >> > Even if we decide to not make a minor release but a major the tag can jump. >> > So, any suffix after the version number indicates the trunk stream. >> > >> > Alpha = Open to any code submittions >> > Beta = Feature freeze, bug fixes only >> > Rc1...n = Some bugs fixed, next try >> > Rtm = Full code freeze, will be the one to release >> > >> > Would this work? >> > >> > Best, >> > Marcel >> > >> > >> > >> > -- >> > View this message in context: >> > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.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/20160627/61b11d17/attachment.htm From lewis at mail.msen.com Tue Jun 28 04:03:35 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jun 28 04:03:38 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: References: <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: <20160628040335.GA28510@shell.msen.com> On Mon, Jun 27, 2016 at 12:41:28PM +0200, Bert Freudenberg wrote: > On Mon, Jun 27, 2016 at 5:30 AM, David T. Lewis wrote: > > > A bit off topic, but is is worth asking: > > If we really want to model Date as a position on a continuum of date > > values, and if we think that the implementation of Date as a kind of > > Timespan is not right, then shouldn't we just consider going back to > > the earlier (Squeak 3.6 and earlier) implementation of Date as a Magnitude, > > rather than Date as a Timespan? > > > > I think this is a very relevant question. We may have to distinguish a Day > from a Date. This seems like a useful distinction to me. The concepts are different, and they deserve different representations. To me as a native American English speaker, I would say that "Day" implies duration, and "Date" implies magnitude. I would expect that the current implementation of date as duration might map most directly to a Smalltalk class named "Day". And the earlier Squeak implementation of date as a magnitude would map directly to a Smalltalk class named "Date". > IMHO a birthday is a perfect example. It's defined by a day+month+year. If > I was traveling I would celebrate the birthday in local time, so the > generic "birthday" needs to compare equal to all the local dates > independent of time zone. > > This is how Dates worked before we made them Timespans (because they had no > time, and hence no time zone). And this is also how they worked after I > added the "nil" offset hack (which ignores the timezone). But it's a hack, > not a good design. I'm not entirely sure what a good design would look like > that also does not break old code. > > - Bert - If we can assume that the current Squeak implementation of Date as a duration makes sense for a class named "Day" and that the prior implementation of Date as a magnitude makes sense for a class named "Date", then a possible way forward would be (in someone's local image, not yet in trunk): - Rename class Date as Day - Copy the Date tests to a new class for the Day tests. - Make sure that the tests for Day are working. - Load an old version of Date from the most recent Squeak version that had Date as a magnitude. - Make the unit tests work for Date. Dave From lewis at mail.msen.com Tue Jun 28 04:40:59 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jun 28 04:41:01 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: References: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> Message-ID: <20160628044059.GA37864@shell.msen.com> On Mon, Jun 27, 2016 at 08:31:28AM -0700, Chris Cunningham wrote: > So, Time and Dates are hard. When Date was a magnitude, it was easy. Now > that it is a duration, it is occassionally wrong. Think about daylight > savings time - at least one a year the day length is 25 hours, and once it > is 23 hours (although in some places there are no Daylight Savings, so this > isn't true, and in others, there are 2 switches, so it happens twice). Our > current implementation doesn't take this into account - which is reasonable > because it is hard to take this into account without a lot of work. Quite right. The concept of "one day" is ambiguous unless we know the local time zone in which it if defined. DST transitions, and possibly also handling of leap seconds, make it impossible to know the duration of one day without also knowing the time zone in which that day is defined. > > If we want to keep Date as a timespan (with rough correctness), maybe we > could also add in Day (as a magnitude) to work like the old Date? If we have Day and Date, then IMHO the Day class should represent duration, and the Date class should represent magnitude. > > For what it is worth, I spend >80% of my time working with > dates/timestamps, trying to turn them into Magnitudes for manipulations. > The other 20%, I really enjoy them as timespans with locales since I deal > with times from around the world. But the two uses are not quite easy to > deal with - doable, just not quite intuitive. > > -cbc Based on your experience, do you think that it would make sense to have two classes for Day and Date, where one represents date as duration, and the other represents date as magnitude? Dave > > On Mon, Jun 27, 2016 at 3:41 AM, Bert Freudenberg > wrote: > > > On Mon, Jun 27, 2016 at 5:30 AM, David T. Lewis > > wrote: > > > >> A bit off topic, but is is worth asking: > >> If we really want to model Date as a position on a continuum of date > >> values, and if we think that the implementation of Date as a kind of > >> Timespan is not right, then shouldn't we just consider going back to > >> the earlier (Squeak 3.6 and earlier) implementation of Date as a > >> Magnitude, > >> rather than Date as a Timespan? > >> > > > > I think this is a very relevant question. We may have to distinguish a Day > > from a Date. > > > > IMHO a birthday is a perfect example. It's defined by a day+month+year. If > > I was traveling I would celebrate the birthday in local time, so the > > generic "birthday" needs to compare equal to all the local dates > > independent of time zone. > > > > This is how Dates worked before we made them Timespans (because they had > > no time, and hence no time zone). And this is also how they worked after I > > added the "nil" offset hack (which ignores the timezone). But it's a hack, > > not a good design. I'm not entirely sure what a good design would look like > > that also does not break old code. > > > > - Bert - > > > > > > > > > > > From Marcel.Taeumel at hpi.de Tue Jun 28 07:36:41 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 28 08:17:33 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> Message-ID: <1467099401770-4903774.post@n4.nabble.com> Eliot Miranda-2 wrote > On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman < > btc@ > > wrote: > >> Release To Manfacture >> > > I much prefer "final". > > > >> >> On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda < > eliot.miranda@ > > >> wrote: >> > >> > >> > On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel < > hannes.hirzel@ > > >> wrote: >> >> >> >> +1 Makes sense. >> >> >> >> BTW, what does Rtm stand for? >> > >> > >> > I'd like to know this too. No one seems to have answered this yet. >> What >> > does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) >> > >> >> >> >> And how will minor maintenance releases be marked, which happen from >> >> time to time? >> >> >> >> As Tobias writes >> >> >> >> SystemVersion current >> >> >> >> >> >> does not return an 'alpha' suffix, this should be fixed. >> >> >> >> >> >> --Hannes >> >> >> >> On 6/22/16, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> > Tobias Pape wrote >> >> >> On 22.06.2016, at 11:24, marcel.taeumel < >> >> > >> >> >> Marcel.Taeumel@ >> >> > >> >> >> > wrote: >> >> >> >> >> >>> Hi there, >> >> >>> >> >> >>> we have a system version: "SystemVersion current". For trunk >> images, >> >> >>> it >> >> >>> used >> >> >>> to say 'Squeak4.1alpha' or something like it. Right now, it >> doesn't >> >> >>> even >> >> >>> add >> >> >>> the 'alpha' suffix. >> >> >>> >> >> >>> Can we change that to 'SqueakTrunk'? What would break? Right now, >> >> >>> SystemVersion works with a string rather than major/minor numbers. >> I >> >> >>> assume >> >> >>> that there is some code that parses that string. Metacello does >> that, >> >> >>> for >> >> >>> example. >> >> >>> Any thoughts? >> >> >> >> >> >> Yes. >> >> >> >> >> >> SystemVersion current should give the following >> >> >> >> >> >> for 4.6 Squeak4.6 >> >> >> for 5.0 Squeak5.0 >> >> >> for trunk Squeak5.1alpha (or Squeak5.1trunk if it must be, but >> >> >> please >> >> >> Squeak{stable+1}{dev-indicator}) >> >> >> >> >> >> Best >> >> >> -Tobias >> >> >> >> >> >> >> >> >>> >> >> >>> Best, >> >> >>> Marcel >> >> > >> >> > Okay, we good improve the version number in trunk images and treat >> them >> >> > as >> >> > (Git) tags. >> >> > >> >> > ... >> >> > Squeak5.1alpha >> >> > Squeak5.1beta >> >> > Squeak5.1rc1 >> >> > Squeak5.1rc2 >> >> > Squeak5.1rtm >> >> > Squeak5.2alpha >> >> > Squeak6.0alpha >> >> > Squeak6.0beta >> >> > ... >> >> > >> >> > Even if we decide to not make a minor release but a major the tag >> can >> >> > jump. >> >> > So, any suffix after the version number indicates the trunk stream. >> >> > >> >> > Alpha = Open to any code submittions >> >> > Beta = Feature freeze, bug fixes only >> >> > Rc1...n = Some bugs fixed, next try >> >> > Rtm = Full code freeze, will be the one to release >> >> > >> >> > Would this work? >> >> > >> >> > Best, >> >> > Marcel >> >> > >> >> > >> >> > >> >> > -- >> >> > View this message in context: >> >> > >> >> > >> http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >> >> > Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > >> >> > >> >> >> > >> > >> > >> > -- >> > _,,,^..^,,,_ >> > best, Eliot >> > >> > >> > >> >> > > > -- > _,,,^..^,,,_ > best, Eliot RTM is not needed. After rc_n comes alpha plus the release with no suffix. Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903774.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue Jun 28 07:43:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 28 08:24:28 2016 Subject: [squeak-dev] Re: rounded corner morphs seem to be broken In-Reply-To: <0D6B52FA-8E04-4124-9FDF-49D7B0181506@rowledge.org> References: <0D6B52FA-8E04-4124-9FDF-49D7B0181506@rowledge.org> Message-ID: <1467099817651-4903787.post@n4.nabble.com> tim Rowledge wrote > I?m trying to work out why the comment morphs in nuScratch are not getting > the rounded corners that they should. This is something that changed a > while ago without me really noticing. I think we?re talking late last year > as best I can tell from trying out older releases to attempt to > triangulate on the problem. > > In the olden days we used a CornerRounder class to handle things, which > has gone away. So far as I can work out now we don?t really do the job > thoroughly. Individual morphs can draw with rounded corners ok although > the rounding is not very nicely drawn below a radius of 8 pixels, which is > admittedly not a huge surprise. If you make a composite morph - like the > comment morphs - the submorphs are not affected at all any more. This > makes the comment morph fairy very sad. > > The comment fairy wants her morphs to look like this - > > and when the little magic triangle is tickled it should look like this - > > > Instead we get this - > > and - > > > The comment is currently implemented as an AlignmentMorph containing a > topbar (another alignment containing the triangle and a usually empty > string morph) and the lower area holding a ?MultilineStringMorph? and the > resize icon morph. The lower-right corner looks ok because the resize icon > is small enough not to overlap the rounding. I managed improve things a > little by making the background to the lower text transparent; before that > the lower left corner was squared off too. > > Looking around for rounding related code I note that the > Morph>roundedCorners method which appears to be a way to designate which > corners are actually rounded is no longer used. Which is a pity since it > would possibly solve my problem by allowing me to round the top two > corners of the upper alignment morph. Hmm, actually since the colours of > the upper and lower backgrounds are very close it kinda-sorta looks > acceptable if I just round the entire upper morph - but it ain?t proper I > tell you! > > Can anyone recall messing about with rounding morphs over the last year or > thereabouts? I think it happened between 4.5-13860 and 4.6-15102 > > tim > -- > tim Rowledge; > tim@ > ; http://www.rowledge.org/tim > Strange OpCodes: BIB: Branch If Branch if branch... > > > > > > > Screen Shot 2016-06-27 at 2.09.27 PM.png (6K) > <http://forum.world.st/attachment/4903723/0/Screen%20Shot%202016-06-27%20at%202.09.27%20PM.png> > Screen Shot 2016-06-27 at 2.10.21 PM.png (6K) > <http://forum.world.st/attachment/4903723/1/Screen%20Shot%202016-06-27%20at%202.10.21%20PM.png> > Screen Shot 2016-06-27 at 2.12.11 PM.png (5K) > <http://forum.world.st/attachment/4903723/2/Screen%20Shot%202016-06-27%20at%202.12.11%20PM.png> > Screen Shot 2016-06-27 at 2.12.39 PM.png (4K) > <http://forum.world.st/attachment/4903723/3/Screen%20Shot%202016-06-27%20at%202.12.39%20PM.png> Hi Tim, rounded corners are implemented in a Morph's #drawOn: method. See Morph >> #drawOn: for an example. It was a refactoring that removed many low-level hacks and added the possibility to configure the corner radius. Your example reminds me of our UserDialogBoxMorph. If you want to only round two of four corners, you have to draw an additional rectangle because there is no call in our drawing engine that draws a "partially" rounded rectangle. See UserDialogBoxMorph >> #drawSubmorphsOn:. You have do modify NuScratch code. Sorry for the inconvenience. We could think about adding a new call to Canvas that does this. Best, Marcel -- View this message in context: http://forum.world.st/rounded-corner-morphs-seem-to-be-broken-tp4903723p4903787.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Tue Jun 28 08:27:08 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jun 28 08:27:12 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <1467099401770-4903774.post@n4.nabble.com> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <1467099401770-4903774.post@n4.nabble.com> Message-ID: On 28.06.2016, at 09:36, marcel.taeumel wrote: > Eliot Miranda-2 wrote >> On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman < > >> btc@ > >> > wrote: >> >>> Release To Manfacture >>> >> >> I much prefer "final". >> >> >> >>> >>> On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda < > >> eliot.miranda@ > >> > >>> wrote: >>>> >>>> >>>> On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel < > >> hannes.hirzel@ > >> > >>> wrote: >>>>> >>>>> +1 Makes sense. >>>>> >>>>> BTW, what does Rtm stand for? >>>> >>>> >>>> I'd like to know this too. No one seems to have answered this yet. >>> What >>>> does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here ;-) >>>> >>>>> >>>>> And how will minor maintenance releases be marked, which happen from >>>>> time to time? >>>>> >>>>> As Tobias writes >>>>> >>>>> SystemVersion current >>>>> >>>>> >>>>> does not return an 'alpha' suffix, this should be fixed. >>>>> >>>>> >>>>> --Hannes >>>>> >>>>> On 6/22/16, marcel.taeumel < > >> Marcel.Taeumel@ > >> > wrote: >>> images, >>> doesn't >>> I >>> that, >>> them >>> can >>> http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >>>>> >>>> >>>> >>>> >>>> -- >>>> _,,,^..^,,,_ >>>> best, Eliot >>>> >>>> >>>> >>> >>> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > > RTM is not needed. After rc_n comes alpha plus the release with no suffix. I thought alpha always precedes rc's? :D > > Best, > Marcel From lists at fniephaus.com Tue Jun 28 08:38:19 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Tue Jun 28 08:38:32 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <1467099401770-4903774.post@n4.nabble.com> Message-ID: How about: ... - final (new release) --------------------------- - alpha + build number - beta + build number (as soon as there is a release manager / we are working towards a new release) - rc1, rc2, ... (release candidates built or approved by release manager) - final (new release) --------------------------- ... If we agree that the next version should be called for example 5.2, it will be called 5.2 all along the release process except if we decide it should be a major release. Then we do the renaming in or after the release candidate phase. Example: 5.2 alpha-X, 5.2 beta-X, [ major release decision ], 6.0 RC1, 6.0 Final. On Tue, Jun 28, 2016 at 10:27 AM Tobias Pape wrote: > > On 28.06.2016, at 09:36, marcel.taeumel wrote: > > > Eliot Miranda-2 wrote > >> On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman < > > > >> btc@ > > > >> > wrote: > >> > >>> Release To Manfacture > >>> > >> > >> I much prefer "final". > >> > >> > >> > >>> > >>> On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda < > > > >> eliot.miranda@ > > > >> > > >>> wrote: > >>>> > >>>> > >>>> On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel < > > > >> hannes.hirzel@ > > > >> > > >>> wrote: > >>>>> > >>>>> +1 Makes sense. > >>>>> > >>>>> BTW, what does Rtm stand for? > >>>> > >>>> > >>>> I'd like to know this too. No one seems to have answered this yet. > >>> What > >>>> does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here > ;-) > >>>> > >>>>> > >>>>> And how will minor maintenance releases be marked, which happen from > >>>>> time to time? > >>>>> > >>>>> As Tobias writes > >>>>> > >>>>> SystemVersion current > >>>>> > >>>>> > >>>>> does not return an 'alpha' suffix, this should be fixed. > >>>>> > >>>>> > >>>>> --Hannes > >>>>> > >>>>> On 6/22/16, marcel.taeumel < > > > >> Marcel.Taeumel@ > > > >> > wrote: > >>> images, > >>> doesn't > >>> I > >>> that, > >>> them > >>> can > >>> > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> _,,,^..^,,,_ > >>>> best, Eliot > >>>> > >>>> > >>>> > >>> > >>> > >> > >> > >> -- > >> _,,,^..^,,,_ > >> best, Eliot > > > > RTM is not needed. After rc_n comes alpha plus the release with no > suffix. > > I thought alpha always precedes rc's? > > :D > > > > > Best, > > Marcel > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160628/c5b0317f/attachment.htm From Marcel.Taeumel at hpi.de Tue Jun 28 08:03:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 28 08:44:16 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <1467099401770-4903774.post@n4.nabble.com> Message-ID: <1467101005503-4903794.post@n4.nabble.com> fniephaus wrote > How about: > > ... > - final (new release) > --------------------------- > - alpha + build number > - beta + build number (as soon as there is a release manager / we are > working towards a new release) > - rc1, rc2, ... (release candidates built or approved by release manager) > - final (new release) > --------------------------- > ... > > If we agree that the next version should be called for example 5.2, it > will > be called 5.2 all along the release process except if we decide it should > be a major release. Then we do the renaming in or after the release > candidate phase. Example: 5.2 alpha-X, 5.2 beta-X, [ major release > decision > ], 6.0 RC1, 6.0 Final. > > > On Tue, Jun 28, 2016 at 10:27 AM Tobias Pape < > Das.Linux@ > > wrote: > >> >> On 28.06.2016, at 09:36, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> > Eliot Miranda-2 wrote >> >> On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman < >> > >> >> btc@ >> > >> >> > wrote: >> >> >> >>> Release To Manfacture >> >>> >> >> >> >> I much prefer "final". >> >> >> >> >> >> >> >>> >> >>> On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda < >> > >> >> eliot.miranda@ >> > >> >> > >> >>> wrote: >> >>>> >> >>>> >> >>>> On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel < >> > >> >> hannes.hirzel@ >> > >> >> > >> >>> wrote: >> >>>>> >> >>>>> +1 Makes sense. >> >>>>> >> >>>>> BTW, what does Rtm stand for? >> >>>> >> >>>> >> >>>> I'd like to know this too. No one seems to have answered this yet. >> >>> What >> >>>> does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here >> ;-) >> >>>> >> >>>>> >> >>>>> And how will minor maintenance releases be marked, which happen >> from >> >>>>> time to time? >> >>>>> >> >>>>> As Tobias writes >> >>>>> >> >>>>> SystemVersion current >> >>>>> >> >>>>> >> >>>>> does not return an 'alpha' suffix, this should be fixed. >> >>>>> >> >>>>> >> >>>>> --Hannes >> >>>>> >> >>>>> On 6/22/16, marcel.taeumel < >> > >> >> Marcel.Taeumel@ >> > >> >> > wrote: >> >>> images, >> >>> doesn't >> >>> I >> >>> that, >> >>> them >> >>> can >> >>> >> http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html >> >>>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> _,,,^..^,,,_ >> >>>> best, Eliot >> >>>> >> >>>> >> >>>> >> >>> >> >>> >> >> >> >> >> >> -- >> >> _,,,^..^,,,_ >> >> best, Eliot >> > >> > RTM is not needed. After rc_n comes alpha plus the release with no >> suffix. >> >> I thought alpha always precedes rc's? >> >> :D >> >> > >> > Best, >> > Marcel >> >> >> >> >> Again, there is no need for "final" because the release itself does not need a suffix. It has its own repository, a version number, and usually also a build number. Only for the trunk versions, we need alpha, beta, rc to distinguish feature freeze and code freeze. "beta" is feature freeze and "rc" is code freeze. Best, Marcel -- View this message in context: http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903794.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lists at fniephaus.com Tue Jun 28 08:55:22 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Tue Jun 28 08:55:34 2016 Subject: [squeak-dev] Re: Renaming Squeak's system version from 'Squeak*alpha' to 'SqueakTrunk' In-Reply-To: <1467101005503-4903794.post@n4.nabble.com> References: <1466587455498-4902398.post@n4.nabble.com> <7EE00389-F722-4175-9111-9FCEE77490CD@gmx.de> <1466593074719-4902424.post@n4.nabble.com> <1467099401770-4903774.post@n4.nabble.com> <1467101005503-4903794.post@n4.nabble.com> Message-ID: -- On Tue, Jun 28, 2016 at 10:44 AM marcel.taeumel wrote: > fniephaus wrote > > How about: > > > > ... > > - final (new release) > > --------------------------- > > - alpha + build number > > - beta + build number (as soon as there is a release manager / we are > > working towards a new release) > > - rc1, rc2, ... (release candidates built or approved by release manager) > > - final (new release) > > --------------------------- > > ... > > > > If we agree that the next version should be called for example 5.2, it > > will > > be called 5.2 all along the release process except if we decide it should > > be a major release. Then we do the renaming in or after the release > > candidate phase. Example: 5.2 alpha-X, 5.2 beta-X, [ major release > > decision > > ], 6.0 RC1, 6.0 Final. > > > > > > On Tue, Jun 28, 2016 at 10:27 AM Tobias Pape < > > > Das.Linux@ > > > > wrote: > > > >> > >> On 28.06.2016, at 09:36, marcel.taeumel < > > > Marcel.Taeumel@ > > > > wrote: > >> > >> > Eliot Miranda-2 wrote > >> >> On Mon, Jun 27, 2016 at 10:25 AM, Ben Coman < > >> > > >> >> btc@ > >> > > >> >> > wrote: > >> >> > >> >>> Release To Manfacture > >> >>> > >> >> > >> >> I much prefer "final". > >> >> > >> >> > >> >> > >> >>> > >> >>> On Tue, Jun 28, 2016 at 1:01 AM, Eliot Miranda < > >> > > >> >> eliot.miranda@ > >> > > >> >> > > >> >>> wrote: > >> >>>> > >> >>>> > >> >>>> On Sat, Jun 25, 2016 at 4:05 AM, H. Hirzel < > >> > > >> >> hannes.hirzel@ > >> > > >> >> > > >> >>> wrote: > >> >>>>> > >> >>>>> +1 Makes sense. > >> >>>>> > >> >>>>> BTW, what does Rtm stand for? > >> >>>> > >> >>>> > >> >>>> I'd like to know this too. No one seems to have answered this yet. > >> >>> What > >> >>>> does "Rtm" mean? I know what RTFM means. Doesn't seem to fit here > >> ;-) > >> >>>> > >> >>>>> > >> >>>>> And how will minor maintenance releases be marked, which happen > >> from > >> >>>>> time to time? > >> >>>>> > >> >>>>> As Tobias writes > >> >>>>> > >> >>>>> SystemVersion current > >> >>>>> > >> >>>>> > >> >>>>> does not return an 'alpha' suffix, this should be fixed. > >> >>>>> > >> >>>>> > >> >>>>> --Hannes > >> >>>>> > >> >>>>> On 6/22/16, marcel.taeumel < > >> > > >> >> Marcel.Taeumel@ > >> > > >> >> > wrote: > >> >>> images, > >> >>> doesn't > >> >>> I > >> >>> that, > >> >>> them > >> >>> can > >> >>> > >> > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4902424.html > >> >>>>> > >> >>>> > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> _,,,^..^,,,_ > >> >>>> best, Eliot > >> >>>> > >> >>>> > >> >>>> > >> >>> > >> >>> > >> >> > >> >> > >> >> -- > >> >> _,,,^..^,,,_ > >> >> best, Eliot > >> > > >> > RTM is not needed. After rc_n comes alpha plus the release with no > >> suffix. > >> > >> I thought alpha always precedes rc's? > >> > >> :D > >> > >> > > >> > Best, > >> > Marcel > >> > >> > >> > >> > >> > > Again, there is no need for "final" because the release itself does not > need > a suffix. It has its own repository, a version number, and usually also a > build number. > Agreed. I wouldn't put "final" in the version string, so when I see a 6.0, I know it is final. :) > > Only for the trunk versions, we need alpha, beta, rc to distinguish feature > freeze and code freeze. "beta" is feature freeze and "rc" is code freeze. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Renaming-Squeak-s-system-version-from-Squeak-alpha-to-SqueakTrunk-tp4902398p4903794.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/20160628/41f96e22/attachment-0001.htm From commits at source.squeak.org Tue Jun 28 09:40:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 28 09:40:23 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1186.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1186.mcz ==================== Summary ==================== Name: Morphic-mt.1186 Author: mt Time: 28 June 2016, 11:39:43.639008 am UUID: 471c6534-59eb-c84c-8742-e4fa50706ebb Ancestors: Morphic-mt.1185 Account for broken morphs in the Object Explorer by catching in-computable icons. (Icons for morphs are usually their own graphical representation scaled down.) Comparable to error handling in ObjectExplorerWrapper >> #asString. Fixes a bug with columns cache invalidation in tree morphs. =============== Diff against Morphic-mt.1185 =============== Item was changed: ----- Method: ObjectExplorerWrapper>>icon (in category 'accessing') ----- icon "Answer a form to be used as icon" ^ Preferences visualExplorer + ifTrue: [([self object iconOrThumbnailOfSize: 12] on: Error do: [nil]) - ifTrue: [(self object iconOrThumbnailOfSize: 12) ifNil: [self class showContentsInColumns ifTrue: [ToolIcons iconNamed: #blank] ifFalse: [nil]]] ifFalse: [nil]! Item was changed: ----- Method: SimpleHierarchicalListMorph>>columns: (in category 'accessing') ----- columns: anArray "You can specify columns or specs for columns. This depends on the actual morph that is used as item. ObjectExplorers produce items that support exact numbers, blocks, and nil for max width." + columns := anArray. + self clearColumnsCache.! - columns := anArray! From maxleske at gmail.com Tue Jun 28 10:04:51 2016 From: maxleske at gmail.com (Max Leske) Date: Tue Jun 28 10:04:57 2016 Subject: [squeak-dev] The .changes file should be bound to a single image Message-ID: Hi, Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. I?ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image Cheers, Max From Marcel.Taeumel at hpi.de Tue Jun 28 12:23:53 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue Jun 28 13:04:45 2016 Subject: [squeak-dev] Re: The .changes file should be bound to a single image In-Reply-To: References: Message-ID: <1467116633074-4903828.post@n4.nabble.com> Max Leske wrote > Hi, > > Opening the same image twice works fine as long as no writes to the > .changes file occur. When both images write to the .changes file however > it will be broken for both because the offsets for the changes are wrong. > This can lead to lost data and predominantly to invalid method source > code, which is a pain with Monticello. > > I suggest that we implement a kind of lock mechanism to ensure that only > one image (the first one opened) can write to the .changes file. > > > I?ve opened an issue for Pharo here: > https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > > > Cheers, > Max Hi Max, if I have a running VM in Windows 10, I cannot open a second one on the same image and also get write access to it. A warning appears. So, it never happens that two images write into the same changes file. Best, Marcel -- View this message in context: http://forum.world.st/The-changes-file-should-be-bound-to-a-single-image-tp4903811p4903828.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Tue Jun 28 13:16:33 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Jun 28 13:16:38 2016 Subject: [squeak-dev] Re: The .changes file should be bound to a single image In-Reply-To: <1467116633074-4903828.post@n4.nabble.com> References: <1467116633074-4903828.post@n4.nabble.com> Message-ID: <1729FA56-1D89-4D71-9E39-00C8D79F6EFC@gmx.de> On 28.06.2016, at 14:23, marcel.taeumel wrote: > Max Leske wrote >> Hi, >> >> Opening the same image twice works fine as long as no writes to the >> .changes file occur. When both images write to the .changes file however >> it will be broken for both because the offsets for the changes are wrong. >> This can lead to lost data and predominantly to invalid method source >> code, which is a pain with Monticello. >> >> I suggest that we implement a kind of lock mechanism to ensure that only >> one image (the first one opened) can write to the .changes file. >> >> >> I?ve opened an issue for Pharo here: >> https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image >> >> >> Cheers, >> Max > > Hi Max, > > if I have a running VM in Windows 10, I cannot open a second one on the same > image and also get write access to it. A warning appears. So, it never > happens that two images write into the same changes file. On Mac and Linux this is a problem, however. Best -Tobias From ron at usmedrec.com Tue Jun 28 16:18:19 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Tue Jun 28 16:18:17 2016 Subject: [squeak-dev] What is wrong with squeaksource.com? Message-ID: <25ee01d1d158$af4ea870$0debf950$@usmedrec.com> Hi All, Looking at squeak source the front page is not rendering. Modifying a project to add a developer doesn't seem to have an OK button. Thanks, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160628/ba8e639e/attachment.htm From lewis at mail.msen.com Tue Jun 28 16:56:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Jun 28 16:56:09 2016 Subject: [squeak-dev] What is wrong with squeaksource.com? In-Reply-To: <25ee01d1d158$af4ea870$0debf950$@usmedrec.com> References: <25ee01d1d158$af4ea870$0debf950$@usmedrec.com> Message-ID: <50681.136.1.1.113.1467132967.squirrel@webmail.msen.com> There is a bug in the system that produces this situation if a new user registers on squeaksource.com with a user name that uses wide characters. It may take up to a day to get this fixed (it's a matter of connecting to the system through VNC, but I cannot do that now and I'm not sure if someone else can help before then). Meanwhile the actual repository is fine, and if you need to use the web interface for any existing project, you can connect like this (using OSProcess as an example), then click on a link and you should then see working screens. Example: http://www.squeaksource.com/OSProcess Then click on the link to the OSProcess project page. Dave > Hi All, > > > > Looking at squeak source the front page is not rendering. > > > > Modifying a project to add a developer doesn't seem to have an OK button. > > > > Thanks, > > > > Ron Teitelbaum > > > From tim at rowledge.org Tue Jun 28 17:14:24 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Jun 28 17:14:04 2016 Subject: [squeak-dev] Re: The .changes file should be bound to a single image In-Reply-To: <1729FA56-1D89-4D71-9E39-00C8D79F6EFC@gmx.de> References: <1467116633074-4903828.post@n4.nabble.com> <1729FA56-1D89-4D71-9E39-00C8D79F6EFC@gmx.de> Message-ID: Now don?t get me started.. I?ve ranted about this off and on since ?96! Be happy that I have to leave now to take my subaru in for service... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Out there where the buses don't run. From asqueaker at gmail.com Tue Jun 28 18:41:28 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 28 18:42:11 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160628040335.GA28510@shell.msen.com> References: <20160312160411.GA15714@shell.msen.com> <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160628040335.GA28510@shell.msen.com> Message-ID: > If we can assume that the current Squeak implementation of Date as > a duration makes sense for a class named "Day" and that the prior > implementation of Date as a magnitude makes sense for a class named > "Date", then a possible way forward would be (in someone's local image, > not yet in trunk): > > - Rename class Date as Day > - Copy the Date tests to a new class for the Day tests. > - Make sure that the tests for Day are working. > - Load an old version of Date from the most recent Squeak version that had Date as a magnitude. > - Make the unit tests work for Date. Hi Dave, I appreciate your point about the semantics of the word "Date" vs. "Day" but since DateAndTime is also part of Chronology, I hope you don't intend to rename it to "DayAndTime" and make it work with Days.. :) DateAndTime has #asHour, #asDate, #asMonth, #asYear -- each one returning an instance of the appropriate Timespan subclass. This proposal would interject a totally orthogonal "exception" into the API of Chronology. Your Magnitude version of Date would have a different API like #isTimespan, for example. So, it would break many applications not just from the format change, but their application logic too. That's too big a cost. I worked a lot with Brent for several years, I know his style is to make terse and elegant API's. Chronology provides us with a robust interoperation of inputs with its outputs. I happen to know the compactness of the API was a deliberate part of his legacy creation. We should respect that. > I was really just trying to ask for a good class comment. I really do think this is the best way to do this clarification. Did you notice that Bert already updated the class comment of Timespan to mention the dual capability? So, I think simply removing that old stuff from Date's comment is simple and effective solution without breaking legacy apps. From leves at caesar.elte.hu Tue Jun 28 20:43:20 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Jun 28 20:43:23 2016 Subject: [squeak-dev] What is wrong with squeaksource.com? In-Reply-To: <25ee01d1d158$af4ea870$0debf950$@usmedrec.com> References: <25ee01d1d158$af4ea870$0debf950$@usmedrec.com> Message-ID: Hi All, It should be back to normal. Levente On Tue, 28 Jun 2016, Ron Teitelbaum wrote: > > Hi All, > > ? > > Looking at squeak source the front page is not rendering. > > ? > > Modifying a project to add a developer doesn?t seem to have an OK button. > > ? > > Thanks, > > ? > > Ron Teitelbaum > > > From asqueaker at gmail.com Tue Jun 28 21:47:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Jun 28 21:47:42 2016 Subject: [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: Message-ID: I have several applications which launch multiple copies of the same image for multicore processing. The images do their work, commit it to database, then exit themselves without saving. Its a great feature. I know OSProcess, when combined with CommandShell, has a RemoteTask which allows efficient forking of the image (via Linux copy-on-write memory sharing) and so a solution like what happens in Windows is not really good. Instead of putting a pop-up in front of the user, perhaps one way to solve the problem would be to, upon image save, simply goes through all the changes since the last save and re-flushes them to the .changes file. That way, if someone does want to save the same image on top of themself, at least it would be whichever saved last "wins".... On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: > Hi, > > Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. > > I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. > > > I?ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > > > Cheers, > Max From javier_diaz_r at mac.com Tue Jun 28 21:48:04 2016 From: javier_diaz_r at mac.com (Javier Diaz-Reinoso) Date: Tue Jun 28 21:48:40 2016 Subject: [squeak-dev] Where to load FFI? Message-ID: <2FBA4282-0B30-4776-B787-31494B837268@mac.com> I am upgrading a project, now working in 4.1 who depends of FFI, I try loading from http://source.squeakfoundation.org/FFI with MC, this work in 4.1 and 4.2, but fails > 4.3 with: MessageNotUnderstood: ExternalFunction class>>callingConventionModifierFor: who is called in: Parser>>externalFunctionDeclaration (nice 9/6/2013). So, is other newer version in other site? From commits at source.squeak.org Tue Jun 28 21:56:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Jun 28 21:56:54 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160628215653.6958.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-June/068239.html Name: Morphic-mt.1186 Ancestors: Morphic-mt.1185 Account for broken morphs in the Object Explorer by catching in-computable icons. (Icons for morphs are usually their own graphical representation scaled down.) Comparable to error handling in ObjectExplorerWrapper >> #asString. Fixes a bug with columns cache invalidation in tree morphs. ============================================= From lewis at mail.msen.com Wed Jun 29 00:06:37 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 29 00:07:25 2016 Subject: [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: Message-ID: <20160629000637.GA61892@shell.msen.com> On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: > > On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: > > Hi, > > > > Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. > > > > I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. > > If the offsets are wrong in this scenario, it's a bug in the image. The image is supposed to seek to the end of the changes file before writing the next chunk. While this sounds horrible in theory, in practice it works remarkably well, and I have been happily surprised at how reliable it is after many years of using and abusing the feature. That is a very good thing. Adding a lock to prevent the scenario would be bad, because it would surely break a number of other legitimate use cases. > > > > I???ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > > > > > I have several applications which launch multiple copies of the same > image for multicore processing. The images do their work, commit it > to database, then exit themselves without saving. Its a great > feature. That is consistent with my experience. I remember expecting horrible things to happen if I had two images sharing a changes file, but nothing bad ever happened. It just works. > > I know OSProcess, when combined with CommandShell, has a RemoteTask > which allows efficient forking of the image (via Linux copy-on-write > memory sharing) and so a solution like what happens in Windows is not > really good. My assumption with RemoteTask was that someone doing complex or long-running jobs would more or less know what they were doing, and would have the good sense to stop writing to the changes file from a bunch of forked images. But in actual practice, I have never seen a problem related to this. It just works. > > Instead of putting a pop-up in front of the user, perhaps one way to > solve the problem would be to, upon image save, simply goes through > all the changes since the last save and re-flushes them to the > .changes file. > > That way, if someone does want to save the same image on top of > themself, at least it would be whichever saved last "wins".... > There must be a problem somewhere, otherwise Max would not be raising the issue. So whatever combination of operating system and image is having a problem, I would be inclined fix that. Windows cannot be a problem, because the operating system will not permit you to open the changes file twice. The Unix/Linux systems that I have used all work fine. Max, which operating system/VM/image are you using? Is this on a Mac? Dave From lewis at mail.msen.com Wed Jun 29 00:18:53 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 29 00:18:56 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: References: <3540.70.194.7.10.1457843875.squirrel@webmail.msen.com> <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160628040335.GA28510@shell.msen.com> Message-ID: <20160629001853.GA79945@shell.msen.com> On Tue, Jun 28, 2016 at 01:41:28PM -0500, Chris Muller wrote: > > > I was really just trying to ask for a good class comment. > > I really do think this is the best way to do this clarification. Did > you notice that Bert already updated the class comment of Timespan to > mention the dual capability? So, I think simply removing that old > stuff from Date's comment is simple and effective solution without > breaking legacy apps. This was my attempt at a class comment for Date: Date provides methods for dealing with calendar dates in different formats. Instances of Date are Timespans with duration of 1 day beginning at midnight. The start value of midnight, and possibly the duration of 1 day, depend on the time zone in which the Date is defined. In the most common usage, a Date is defined relative to UTC (time zone offset zero), and thus may be treated as a location independent calendar value. The current date, Date today, is assumed to be defined as a UTC date without consideration of local time zone. Alternative attempts welcome :-) Dave From asqueaker at gmail.com Wed Jun 29 01:31:58 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Jun 29 01:32:41 2016 Subject: [squeak-dev] Where to load FFI? In-Reply-To: <2FBA4282-0B30-4776-B787-31494B837268@mac.com> References: <2FBA4282-0B30-4776-B787-31494B837268@mac.com> Message-ID: SqueakMap. On Tue, Jun 28, 2016 at 4:48 PM, Javier Diaz-Reinoso wrote: > I am upgrading a project, now working in 4.1 who depends of FFI, I try loading from http://source.squeakfoundation.org/FFI with MC, this work in 4.1 and 4.2, but fails > 4.3 with: > > MessageNotUnderstood: ExternalFunction class>>callingConventionModifierFor: > > who is called in: Parser>>externalFunctionDeclaration (nice 9/6/2013). > > So, is other newer version in other site? > > From javier_diaz_r at mac.com Wed Jun 29 02:10:41 2016 From: javier_diaz_r at mac.com (Javier Diaz-Reinoso) Date: Wed Jun 29 02:11:19 2016 Subject: [squeak-dev] Where to load FFI? In-Reply-To: References: <2FBA4282-0B30-4776-B787-31494B837268@mac.com> Message-ID: Searching for FFI in SqueakMap Package Loader, squeak 5.0: > No package matching FFI > On Jun 28, 2016, at 20:31, Chris Muller wrote: > > SqueakMap. > > On Tue, Jun 28, 2016 at 4:48 PM, Javier Diaz-Reinoso > wrote: >> I am upgrading a project, now working in 4.1 who depends of FFI, I try loading from http://source.squeakfoundation.org/FFI with MC, this work in 4.1 and 4.2, but fails > 4.3 with: >> >> MessageNotUnderstood: ExternalFunction class>>callingConventionModifierFor: >> >> who is called in: Parser>>externalFunctionDeclaration (nice 9/6/2013). >> >> So, is other newer version in other site? >> >> > From commits at source.squeak.org Wed Jun 29 02:38:39 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 29 02:38:41 2016 Subject: [squeak-dev] The Trunk: Chronology-Core-cmm.6.mcz Message-ID: Chris Muller uploaded a new version of Chronology-Core to project The Trunk: http://source.squeak.org/trunk/Chronology-Core-cmm.6.mcz ==================== Summary ==================== Name: Chronology-Core-cmm.6 Author: cmm Time: 28 June 2016, 9:38:09.069292 pm UUID: 29a5a2b4-59f0-4bb4-a3d4-56fe680d31ec Ancestors: Chronology-Core-bf.5 Fix Date class comment. Add Date>>#@ shortcut for constructing DateAndTime's. =============== Diff against Chronology-Core-bf.5 =============== Item was changed: Timespan subclass: #Date instanceVariableNames: '' classVariableNames: '' poolDictionaries: 'ChronologyConstants' category: 'Chronology-Core'! + !Date commentStamp: 'cmm 6/28/2016 21:36' prior: 0! + Instances of Date are Timespans with duration of 1 day. As with all Chronology Timespan sub-instances, Dates can be instantiated as position values which compare equally to any other instance of the same Date, irregardless of the timezone in which either is created. - !Date commentStamp: 'cmm 2/3/2012 17:30' prior: 0! - Instances of Date are Timespans with duration of 1 day. + However, like the other Timespan subInstances, there are rare cases where it may be desirable to use instances of Date to represent a particular 1-day span of time at a particular locality on the globe. All Timespans, including Dates, may specify a particular timezone offset for this purpose.! - Their default creation assumes a start of midnight of UTC to provide the fast, globalized Dates out of the box. The legacy behavior that creates Timezone-sensitive Dates can be used by sending #localizedDates. - ! Item was added: + ----- Method: Date>>@ (in category 'squeak protocol') ----- + @ aTime + ^ DateAndTime + date: self + time: aTime! From ma.chris.m at gmail.com Wed Jun 29 03:01:31 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Jun 29 03:02:12 2016 Subject: [squeak-dev] Where to load FFI? In-Reply-To: References: <2FBA4282-0B30-4776-B787-31494B837268@mac.com> Message-ID: Yellow click on the package list, then select "Clear all filters" from the menu. Then you'll be able to scroll down to FFI. If you're upgrading to 4.6, 5.0 or trunk (which I recommend), then load the (head) version. - Chris On Tue, Jun 28, 2016 at 9:10 PM, Javier Diaz-Reinoso wrote: > Searching for FFI in SqueakMap Package Loader, squeak 5.0: >> No package matching FFI > >> On Jun 28, 2016, at 20:31, Chris Muller wrote: >> >> SqueakMap. >> >> On Tue, Jun 28, 2016 at 4:48 PM, Javier Diaz-Reinoso >> wrote: >>> I am upgrading a project, now working in 4.1 who depends of FFI, I try loading from http://source.squeakfoundation.org/FFI with MC, this work in 4.1 and 4.2, but fails > 4.3 with: >>> >>> MessageNotUnderstood: ExternalFunction class>>callingConventionModifierFor: >>> >>> who is called in: Parser>>externalFunctionDeclaration (nice 9/6/2013). >>> >>> So, is other newer version in other site? >>> >>> >> > From maxleske at gmail.com Wed Jun 29 06:53:12 2016 From: maxleske at gmail.com (Max Leske) Date: Wed Jun 29 06:53:17 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <20160629000637.GA61892@shell.msen.com> References: <20160629000637.GA61892@shell.msen.com> Message-ID: > On 29 Jun 2016, at 02:06, David T. Lewis wrote: > > On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: >> >> On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: >>> Hi, >>> >>> Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. >>> >>> I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. >>> > > If the offsets are wrong in this scenario, it's a bug in the image. The > image is supposed to seek to the end of the changes file before writing > the next chunk. While this sounds horrible in theory, in practice it works > remarkably well, and I have been happily surprised at how reliable it > is after many years of using and abusing the feature. That is a very > good thing. > > Adding a lock to prevent the scenario would be bad, because it would > surely break a number of other legitimate use cases. > > >>> >>> I???ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image >>> >> >> >> I have several applications which launch multiple copies of the same >> image for multicore processing. The images do their work, commit it >> to database, then exit themselves without saving. Its a great >> feature. Doing work is not the problem. Modifying source code is the problem. > > That is consistent with my experience. I remember expecting horrible > things to happen if I had two images sharing a changes file, but nothing > bad ever happened. It just works. > >> >> I know OSProcess, when combined with CommandShell, has a RemoteTask >> which allows efficient forking of the image (via Linux copy-on-write >> memory sharing) and so a solution like what happens in Windows is not >> really good. > > My assumption with RemoteTask was that someone doing complex or long-running > jobs would more or less know what they were doing, and would have the good > sense to stop writing to the changes file from a bunch of forked images. > But in actual practice, I have never seen a problem related to this. > It just works. > >> >> Instead of putting a pop-up in front of the user, perhaps one way to >> solve the problem would be to, upon image save, simply goes through >> all the changes since the last save and re-flushes them to the >> .changes file. >> >> That way, if someone does want to save the same image on top of >> themself, at least it would be whichever saved last "wins".... >> > > There must be a problem somewhere, otherwise Max would not be raising > the issue. So whatever combination of operating system and image is > having a problem, I would be inclined fix that. :) Thanks Dave! > > Windows cannot be a problem, because the operating system will not > permit you to open the changes file twice. The Unix/Linux systems that > I have used all work fine. > > Max, which operating system/VM/image are you using? Is this on a Mac? Mac OS X 10.11.5, Pharo 6 (60086) > > Dave > > I actually didn?t open the issue for myself but because of a student who ran into this. I?ve been in the same situation before but I?m an experienced user while students at the research group sometimes just spend a couple of weeks with Pharo and then such things are a real problem. Interestingly the issue is, as you already suggested, pretty hard to reproduce i.e., modifying arbitrary methods in both images did not show the symptoms I was looking for. Here?s a reproducible case (at least on my machine): 1. create a new method in both images: foo ^ nil 2. Modify it in one image: foo "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." ^ nil + 1 3. Modify it in the other image: foo ^ nil - 1 isEmpty ifTrue: [ "blah" nil ] In my case saving in step three produces a syntax error when the source is loaded from file again. I don?t really have a clue as to what the underlying issue is, but I suspect it may have to do with comments and a particular situation in which the position is not being correctly updated before or after writing. I agree with Chris that locks may be problematic, it just seemed like the simplest obvious solution (although of course it gets complicated when an image crashes and doesn?t clean up the lock?). Cheers, Max > From commits at source.squeak.org Wed Jun 29 07:37:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 29 07:37:13 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1187.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1187.mcz ==================== Summary ==================== Name: Morphic-mt.1187 Author: mt Time: 29 June 2016, 9:36:32.707121 am UUID: 9ec766fe-db1a-cd4f-957e-b95afcb2f8ff Ancestors: Morphic-mt.1186 Fixes a bug with the Morphic main loop when the serverMode is enabled. We still should double-check if we still need this 50-ms-hack to keep servers responsive. It should be the duty of the caller of #interCyclePause: to provide the 50 for servers. =============== Diff against Morphic-mt.1186 =============== Item was changed: ----- Method: WorldState>>interCyclePause: (in category 'update cycle') ----- interCyclePause: milliSecs "delay enough that the previous cycle plus the amount of delay will equal milliSecs. If the cycle is already expensive, then no delay occurs. However, if the system is idly waiting for interaction from the user, the method will delay for a proportionally long time and cause the overall CPU usage of Squeak to be low. If the preference #serverMode is enabled, always do a complete delay of 50ms, independant of my argument. This prevents the freezing problem described in Mantis #6581" | millisecondsToWait | millisecondsToWait := Preferences serverMode ifTrue: [ 50 ] ifFalse: [ (lastCycleTime isNil or: [ CanSurrenderToOS == false ]) ifTrue: [ 0 ] ifFalse: [ milliSecs - (Time millisecondsSince: lastCycleTime) ] ]. + (Preferences serverMode or: [millisecondsToWait > 0 and: [millisecondsToWait <= milliSecs]]) + ifTrue: [ + (interCycleDelay isNil or: [ interCycleDelay beingWaitedOn ]) + ifTrue: [ interCycleDelay := Delay forMilliseconds: millisecondsToWait ] + ifFalse: [ interCycleDelay delayDuration: millisecondsToWait ]. + interCycleDelay wait ]. - (millisecondsToWait > 0 and: [millisecondsToWait <= milliSecs]) ifTrue: [ - (interCycleDelay isNil or: [ interCycleDelay beingWaitedOn ]) - ifTrue: [ interCycleDelay := Delay forMilliseconds: millisecondsToWait ] - ifFalse: [ interCycleDelay delayDuration: millisecondsToWait ]. - interCycleDelay wait ]. lastCycleTime := Time millisecondClockValue. CanSurrenderToOS := true.! From lewis at mail.msen.com Wed Jun 29 12:45:49 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 29 12:46:36 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> Message-ID: <20160629124549.GA12105@shell.msen.com> Max, Confirming on Linux and Squeak. See below. On Wed, Jun 29, 2016 at 08:53:12AM +0200, Max Leske wrote: > > > On 29 Jun 2016, at 02:06, David T. Lewis wrote: > > > > On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: > >> > >> On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: > >>> Hi, > >>> > >>> Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. > >>> > >>> I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. > >>> > > > > If the offsets are wrong in this scenario, it's a bug in the image. The > > image is supposed to seek to the end of the changes file before writing > > the next chunk. While this sounds horrible in theory, in practice it works > > remarkably well, and I have been happily surprised at how reliable it > > is after many years of using and abusing the feature. That is a very > > good thing. > > > > Adding a lock to prevent the scenario would be bad, because it would > > surely break a number of other legitimate use cases. > > > > > >>> > >>> I???ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > >>> > >> > >> > >> I have several applications which launch multiple copies of the same > >> image for multicore processing. The images do their work, commit it > >> to database, then exit themselves without saving. Its a great > >> feature. > > Doing work is not the problem. Modifying source code is the problem. > > > > > That is consistent with my experience. I remember expecting horrible > > things to happen if I had two images sharing a changes file, but nothing > > bad ever happened. It just works. > > > >> > >> I know OSProcess, when combined with CommandShell, has a RemoteTask > >> which allows efficient forking of the image (via Linux copy-on-write > >> memory sharing) and so a solution like what happens in Windows is not > >> really good. > > > > My assumption with RemoteTask was that someone doing complex or long-running > > jobs would more or less know what they were doing, and would have the good > > sense to stop writing to the changes file from a bunch of forked images. > > But in actual practice, I have never seen a problem related to this. > > It just works. > > > >> > >> Instead of putting a pop-up in front of the user, perhaps one way to > >> solve the problem would be to, upon image save, simply goes through > >> all the changes since the last save and re-flushes them to the > >> .changes file. > >> > >> That way, if someone does want to save the same image on top of > >> themself, at least it would be whichever saved last "wins".... > >> > > > > There must be a problem somewhere, otherwise Max would not be raising > > the issue. So whatever combination of operating system and image is > > having a problem, I would be inclined fix that. > > :) Thanks Dave! > > > > > Windows cannot be a problem, because the operating system will not > > permit you to open the changes file twice. The Unix/Linux systems that > > I have used all work fine. > > > > Max, which operating system/VM/image are you using? Is this on a Mac? > > Mac OS X 10.11.5, > Pharo 6 (60086) > > > > > Dave > > > > > > I actually didn???t open the issue for myself but because of a student who ran into this. I???ve been in the same situation before but I???m an experienced user while students at the research group sometimes just spend a couple of weeks with Pharo and then such things are a real problem. > > Interestingly the issue is, as you already suggested, pretty hard to reproduce i.e., modifying arbitrary methods in both images did not show the symptoms I was looking for. > > Here???s a reproducible case (at least on my machine): > > 1. create a new method in both images: > > foo > ^ nil > > 2. Modify it in one image: > > foo > "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." > ^ nil + 1 > > 3. Modify it in the other image: > > foo > ^ nil - 1 isEmpty ifTrue: [ "blah" nil ] > Confirmed on Linux + Squeak. I did your test above using #forkSqueak so that I had two identical images sharing the same changes file. In each image, I saved the #foo method. At that point, the changes file conntained exactly what I would expect. I then did a save and exit from the child image, followed by a save and exit from the original image. I can see that the changes from the child image are now overwriting the changes from the original parent image. Since the parent image is the one that was saved last, its #foo method now has corrupted source. This is not a scenario that I have ever encountered, but I can see how it might happen in a classroom setting. I can't look into this further right now, but it seems possible that the problem happens only when saving the image, in which case we could force the changes file to seek to end of file before doing the save. But we'll need to do some more testing to make sure that this is the only scenario in which it happens. Dave > In my case saving in step three produces a syntax error when the source is loaded from file again. I don???t really have a clue as to what the underlying issue is, but I suspect it may have to do with comments and a particular situation in which the position is not being correctly updated before or after writing. > > > I agree with Chris that locks may be problematic, it just seemed like the simplest obvious solution (although of course it gets complicated when an image crashes and doesn???t clean up the lock???). > > Cheers, > Max > > > > From Marcel.Taeumel at hpi.de Wed Jun 29 13:10:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed Jun 29 13:51:36 2016 Subject: [squeak-dev] Deferring code update calls ... Message-ID: <1467205837268-4904046.post@n4.nabble.com> Hi, there. What do you think about triggering code updates not directly but deferred via a project's deferred UI messages? Here is a change set that does that: thin-update-process.cs Since we do not update the compiled methods in existing process call stacks, update code would be more robust if the respective call stack would be small. For example, this affects code that uses direct inst var accesses like HandMorph >> #handleEvent:. Drawback: If you want to update the system programmatically such as in a deployment scenario, you would have to account for that. Fabio? :D Best, Marcel -- View this message in context: http://forum.world.st/Deferring-code-update-calls-tp4904046.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Wed Jun 29 13:55:06 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Jun 29 13:55:09 2016 Subject: [squeak-dev] Deferring code update calls ... In-Reply-To: <1467205837268-4904046.post@n4.nabble.com> References: <1467205837268-4904046.post@n4.nabble.com> Message-ID: On Wed, Jun 29, 2016 at 3:10 PM, marcel.taeumel wrote: > Hi, there. > > What do you think about triggering code updates not directly but deferred > via a project's deferred UI messages? > Yes. > Drawback: If you want to update the system programmatically such as in a > deployment scenario, you would have to account for that. Fabio? :D > No. Don't put it in the updater code, but into the menu item handler. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160629/e59284d1/attachment.htm From maxleske at gmail.com Wed Jun 29 13:57:51 2016 From: maxleske at gmail.com (Max Leske) Date: Wed Jun 29 13:57:59 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <20160629124549.GA12105@shell.msen.com> References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> Message-ID: <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> > On 29 Jun 2016, at 14:45, David T. Lewis wrote: > > Max, > > Confirming on Linux and Squeak. See below. > > On Wed, Jun 29, 2016 at 08:53:12AM +0200, Max Leske wrote: >> >>> On 29 Jun 2016, at 02:06, David T. Lewis wrote: >>> >>> On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: >>>> >>>> On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: >>>>> Hi, >>>>> >>>>> Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. >>>>> >>>>> I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. >>>>> >>> >>> If the offsets are wrong in this scenario, it's a bug in the image. The >>> image is supposed to seek to the end of the changes file before writing >>> the next chunk. While this sounds horrible in theory, in practice it works >>> remarkably well, and I have been happily surprised at how reliable it >>> is after many years of using and abusing the feature. That is a very >>> good thing. >>> >>> Adding a lock to prevent the scenario would be bad, because it would >>> surely break a number of other legitimate use cases. >>> >>> >>>>> >>>>> I???ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image >>>>> >>>> >>>> >>>> I have several applications which launch multiple copies of the same >>>> image for multicore processing. The images do their work, commit it >>>> to database, then exit themselves without saving. Its a great >>>> feature. >> >> Doing work is not the problem. Modifying source code is the problem. >> >>> >>> That is consistent with my experience. I remember expecting horrible >>> things to happen if I had two images sharing a changes file, but nothing >>> bad ever happened. It just works. >>> >>>> >>>> I know OSProcess, when combined with CommandShell, has a RemoteTask >>>> which allows efficient forking of the image (via Linux copy-on-write >>>> memory sharing) and so a solution like what happens in Windows is not >>>> really good. >>> >>> My assumption with RemoteTask was that someone doing complex or long-running >>> jobs would more or less know what they were doing, and would have the good >>> sense to stop writing to the changes file from a bunch of forked images. >>> But in actual practice, I have never seen a problem related to this. >>> It just works. >>> >>>> >>>> Instead of putting a pop-up in front of the user, perhaps one way to >>>> solve the problem would be to, upon image save, simply goes through >>>> all the changes since the last save and re-flushes them to the >>>> .changes file. >>>> >>>> That way, if someone does want to save the same image on top of >>>> themself, at least it would be whichever saved last "wins".... >>>> >>> >>> There must be a problem somewhere, otherwise Max would not be raising >>> the issue. So whatever combination of operating system and image is >>> having a problem, I would be inclined fix that. >> >> :) Thanks Dave! >> >>> >>> Windows cannot be a problem, because the operating system will not >>> permit you to open the changes file twice. The Unix/Linux systems that >>> I have used all work fine. >>> >>> Max, which operating system/VM/image are you using? Is this on a Mac? >> >> Mac OS X 10.11.5, >> Pharo 6 (60086) >> >>> >>> Dave >>> >>> >> >> I actually didn???t open the issue for myself but because of a student who ran into this. I???ve been in the same situation before but I???m an experienced user while students at the research group sometimes just spend a couple of weeks with Pharo and then such things are a real problem. >> >> Interestingly the issue is, as you already suggested, pretty hard to reproduce i.e., modifying arbitrary methods in both images did not show the symptoms I was looking for. >> >> Here???s a reproducible case (at least on my machine): >> >> 1. create a new method in both images: >> >> foo >> ^ nil >> >> 2. Modify it in one image: >> >> foo >> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." >> ^ nil + 1 >> >> 3. Modify it in the other image: >> >> foo >> ^ nil - 1 isEmpty ifTrue: [ "blah" nil ] >> > > Confirmed on Linux + Squeak. > > I did your test above using #forkSqueak so that I had two identical images > sharing the same changes file. In each image, I saved the #foo method. At > that point, the changes file conntained exactly what I would expect. > > I then did a save and exit from the child image, followed by a save and exit > from the original image. I can see that the changes from the child image are > now overwriting the changes from the original parent image. Since the > parent image is the one that was saved last, its #foo method now has > corrupted source. > > This is not a scenario that I have ever encountered, but I can see how > it might happen in a classroom setting. > > I can't look into this further right now, but it seems possible that the > problem happens only when saving the image, in which case we could force > the changes file to seek to end of file before doing the save. But we'll > need to do some more testing to make sure that this is the only scenario > in which it happens. > > Dave Great, thanks. In the scenario I described I did not save either image. Of course, without saving the problem will not exist as soon as you start the image anew (the old pointers are still valid and new content will be written to the end). The problem does exhibit itself without saving though. Since this is not anything critical, don?t put too much effort into it. I?ll have time in a couple of weeks to look at it in detail and then, once we understand the problem, we can discuss possible solutions. Cheers, Max > > > >> In my case saving in step three produces a syntax error when the source is loaded from file again. I don???t really have a clue as to what the underlying issue is, but I suspect it may have to do with comments and a particular situation in which the position is not being correctly updated before or after writing. >> >> >> I agree with Chris that locks may be problematic, it just seemed like the simplest obvious solution (although of course it gets complicated when an image crashes and doesn???t clean up the lock???). >> >> Cheers, >> Max -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160629/e924e37e/attachment-0001.htm From leves at caesar.elte.hu Wed Jun 29 14:08:50 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Jun 29 14:08:56 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: This seems to be a missing #flush after changes are written to the file. Without #flush both processes (unix) will maintain their own version of the file in memory. Levente On Wed, 29 Jun 2016, Max Leske wrote: > > On 29 Jun 2016, at 14:45, David T. Lewis wrote: > > Max, > > Confirming on Linux and Squeak. See below. > > On Wed, Jun 29, 2016 at 08:53:12AM +0200, Max Leske wrote: > > On 29 Jun 2016, at 02:06, David T. Lewis wrote: > > On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: > > On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: > Hi, > > Opening the same image twice works fine as long as no writes to the .changes file occur. > When both images write to the .changes file however it will be broken for both because the > offsets for the changes are wrong. This can lead to lost data and predominantly to invalid > method source code, which is a pain with Monticello. > > I suggest that we implement a kind of lock mechanism to ensure that only one image (the > first one opened) can write to the .changes file. > > > If the offsets are wrong in this scenario, it's a bug in the image. The > image is supposed to seek to the end of the changes file before writing > the next chunk. While this sounds horrible in theory, in practice it works > remarkably well, and I have been happily surprised at how reliable it > is after many years of using and abusing the feature. That is a very > good thing. > > Adding a lock to prevent the scenario would be bad, because it would > surely break a number of other legitimate use cases. > > > > I???ve opened an issue for Pharo here: > https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > > > > I have several applications which launch multiple copies of the same > image for multicore processing. ?The images do their work, commit it > to database, then exit themselves without saving. ?Its a great > feature. > > > Doing work is not the problem. Modifying source code is the problem. > > > That is consistent with my experience. I remember expecting horrible > things to happen if I had two images sharing a changes file, but nothing > bad ever happened. It just works. > > > I know OSProcess, when combined with CommandShell, has a RemoteTask > which allows efficient forking of the image (via Linux copy-on-write > memory sharing) and so a solution like what happens in Windows is not > really good. > > > My assumption with RemoteTask was that someone doing complex or long-running > jobs would more or less know what they were doing, and would have the good > sense to stop writing to the changes file from a bunch of forked images. > But in actual practice, I have never seen a problem related to this. > It just works. > > > Instead of putting a pop-up in front of the user, perhaps one way to > solve the problem would be to, upon image save, simply goes through > all the changes since the last save and re-flushes them to the > .changes file. > > That way, if someone does want to save the same image on top of > themself, at least it would be whichever saved last "wins".... > > > There must be a problem somewhere, otherwise Max would not be raising > the issue. So whatever combination of operating system and image is > having a problem, I would be inclined fix that. > > > :) Thanks Dave! > > > Windows cannot be a problem, because the operating system will not > permit you to open the changes file twice. The Unix/Linux systems that > I have used all work fine. > > Max, which operating system/VM/image are you using? Is this on a Mac? > > > Mac OS X 10.11.5, > Pharo 6 (60086) > > > Dave > > > > I actually didn???t open the issue for myself but because of a student who ran into this. I???ve been in the same situation > before but I???m an experienced user while students at the research group sometimes just spend a couple of weeks with Pharo and > then such things are a real problem. > > Interestingly the issue is, as you already suggested, pretty hard to reproduce i.e., modifying arbitrary methods in both images > did not show the symptoms I was looking for. > > Here???s a reproducible case (at least on my machine): > > 1. create a new method in both images: > > foo > ^ nil > > 2. Modify it in one image: > > foo > "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut > enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor > in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, > sunt in culpa qui officia deserunt mollit anim id est laborum." > ^ nil + 1 > > 3. Modify it in the other image: > > foo > ^ nil - 1 isEmpty ifTrue: [ "blah" nil ] > > > Confirmed on Linux + Squeak. > > I did your test above using #forkSqueak so that I had two identical images > sharing the same changes file. In each image, I saved the #foo method. At > that point, the changes file conntained exactly what I would expect. > > I then did a save and exit from the child image, followed by a save and exit > from the original image. I can see that the changes from the child image are > now overwriting the changes from the original parent image. Since the > parent image is the one that was saved last, its #foo method now has > corrupted source. > > This is not a scenario that I have ever encountered, but I can see how > it might happen in a classroom setting. > > I can't look into this further right now, but it seems possible that the > problem happens only when saving the image, in which case we could force > the changes file to seek to end of file before doing the save. But we'll > need to do some more testing to make sure that this is the only scenario > in which it happens. > > Dave > > > Great, thanks. > > In the scenario I described I did not save either image. Of course, without saving the problem will not exist as soon as you start the image anew > (the old pointers are still valid and new content will be written to the end). The problem does exhibit itself without saving though. > > Since this is not anything critical, don?t put too much effort into it. I?ll have time in a couple of weeks to look at it in detail and then, once > we understand the problem, we can discuss possible solutions. > > Cheers, > Max > > > > > In my case saving in step three produces a syntax error when the source is loaded from file again. I don???t really have a > clue as to what the underlying issue is, but I suspect it may have to do with comments and a particular situation in which > the position is not being correctly updated before or after writing. > > > I agree with Chris that locks may be problematic, it just seemed like the simplest obvious solution (although of course it > gets complicated when an image crashes and doesn???t clean up the lock???). > > Cheers, > Max > > > > From maxleske at gmail.com Wed Jun 29 14:13:58 2016 From: maxleske at gmail.com (Max Leske) Date: Wed Jun 29 14:14:03 2016 Subject: [squeak-dev] Re: The .changes file should be bound to a single image In-Reply-To: <5773d3f5.cb4c370a.dd0b8.ffff95adSMTPIN_ADDED_MISSING@mx.google.com> References: <5773d3f5.cb4c370a.dd0b8.ffff95adSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <689D447E-D41A-455C-A255-7D6F1CA3D12F@gmail.com> > On 29 Jun 2016, at 15:58, squeak-dev-request@lists.squeakfoundation.org wrote: > > Now don?t get me started.. I?ve ranted about this off and on since ?96! Be happy that I have to leave now to take my subaru in for service? :D Sorry, I?m so late! > > > > tim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160629/5f9c344c/attachment.htm From Lou at Keystone-Software.com Wed Jun 29 15:00:40 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Wed Jun 29 15:00:55 2016 Subject: [squeak-dev] [Pharo-dev] The .changes file should be bound to a single image References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: Hi Levente, Without having looked into this at all I think you are on to something with the missing #flush and maybe even a #close is needed because jumping to the end of a file unclosed in another process may not (probably does not) go to the end. Lou On Wed, 29 Jun 2016 16:08:50 +0200 (CEST), Levente Uzonyi wrote: >This seems to be a missing #flush after changes are written to the file. >Without #flush both processes (unix) will maintain their own version of >the file in memory. > >Levente > >On Wed, 29 Jun 2016, Max Leske wrote: > >> >> On 29 Jun 2016, at 14:45, David T. Lewis wrote: >> >> Max, >> >> Confirming on Linux and Squeak. See below. >> >> On Wed, Jun 29, 2016 at 08:53:12AM +0200, Max Leske wrote: >> >> On 29 Jun 2016, at 02:06, David T. Lewis wrote: >> >> On Tue, Jun 28, 2016 at 04:47:00PM -0500, Chris Muller wrote: >> >> On Tue, Jun 28, 2016 at 5:04 AM, Max Leske wrote: >> Hi, >> >> Opening the same image twice works fine as long as no writes to the .changes file occur. >> When both images write to the .changes file however it will be broken for both because the >> offsets for the changes are wrong. This can lead to lost data and predominantly to invalid >> method source code, which is a pain with Monticello. >> >> I suggest that we implement a kind of lock mechanism to ensure that only one image (the >> first one opened) can write to the .changes file. >> >> >> If the offsets are wrong in this scenario, it's a bug in the image. The >> image is supposed to seek to the end of the changes file before writing >> the next chunk. While this sounds horrible in theory, in practice it works >> remarkably well, and I have been happily surprised at how reliable it >> is after many years of using and abusing the feature. That is a very >> good thing. >> >> Adding a lock to prevent the scenario would be bad, because it would >> surely break a number of other legitimate use cases. >> >> >> >> I???ve opened an issue for Pharo here: >> https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image >> >> >> >> I have several applications which launch multiple copies of the same >> image for multicore processing. ?The images do their work, commit it >> to database, then exit themselves without saving. ?Its a great >> feature. >> >> >> Doing work is not the problem. Modifying source code is the problem. >> >> >> That is consistent with my experience. I remember expecting horrible >> things to happen if I had two images sharing a changes file, but nothing >> bad ever happened. It just works. >> >> >> I know OSProcess, when combined with CommandShell, has a RemoteTask >> which allows efficient forking of the image (via Linux copy-on-write >> memory sharing) and so a solution like what happens in Windows is not >> really good. >> >> >> My assumption with RemoteTask was that someone doing complex or long-running >> jobs would more or less know what they were doing, and would have the good >> sense to stop writing to the changes file from a bunch of forked images. >> But in actual practice, I have never seen a problem related to this. >> It just works. >> >> >> Instead of putting a pop-up in front of the user, perhaps one way to >> solve the problem would be to, upon image save, simply goes through >> all the changes since the last save and re-flushes them to the >> .changes file. >> >> That way, if someone does want to save the same image on top of >> themself, at least it would be whichever saved last "wins".... >> >> >> There must be a problem somewhere, otherwise Max would not be raising >> the issue. So whatever combination of operating system and image is >> having a problem, I would be inclined fix that. >> >> >> :) Thanks Dave! >> >> >> Windows cannot be a problem, because the operating system will not >> permit you to open the changes file twice. The Unix/Linux systems that >> I have used all work fine. >> >> Max, which operating system/VM/image are you using? Is this on a Mac? >> >> >> Mac OS X 10.11.5, >> Pharo 6 (60086) >> >> >> Dave >> >> >> >> I actually didn???t open the issue for myself but because of a student who ran into this. I???ve been in the same situation >> before but I???m an experienced user while students at the research group sometimes just spend a couple of weeks with Pharo and >> then such things are a real problem. >> >> Interestingly the issue is, as you already suggested, pretty hard to reproduce i.e., modifying arbitrary methods in both images >> did not show the symptoms I was looking for. >> >> Here???s a reproducible case (at least on my machine): >> >> 1. create a new method in both images: >> >> foo >> ^ nil >> >> 2. Modify it in one image: >> >> foo >> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut >> enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor >> in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, >> sunt in culpa qui officia deserunt mollit anim id est laborum." >> ^ nil + 1 >> >> 3. Modify it in the other image: >> >> foo >> ^ nil - 1 isEmpty ifTrue: [ "blah" nil ] >> >> >> Confirmed on Linux + Squeak. >> >> I did your test above using #forkSqueak so that I had two identical images >> sharing the same changes file. In each image, I saved the #foo method. At >> that point, the changes file conntained exactly what I would expect. >> >> I then did a save and exit from the child image, followed by a save and exit >> from the original image. I can see that the changes from the child image are >> now overwriting the changes from the original parent image. Since the >> parent image is the one that was saved last, its #foo method now has >> corrupted source. >> >> This is not a scenario that I have ever encountered, but I can see how >> it might happen in a classroom setting. >> >> I can't look into this further right now, but it seems possible that the >> problem happens only when saving the image, in which case we could force >> the changes file to seek to end of file before doing the save. But we'll >> need to do some more testing to make sure that this is the only scenario >> in which it happens. >> >> Dave >> >> >> Great, thanks. >> >> In the scenario I described I did not save either image. Of course, without saving the problem will not exist as soon as you start the image anew >> (the old pointers are still valid and new content will be written to the end). The problem does exhibit itself without saving though. >> >> Since this is not anything critical, don?t put too much effort into it. I?ll have time in a couple of weeks to look at it in detail and then, once >> we understand the problem, we can discuss possible solutions. >> >> Cheers, >> Max >> >> >> >> >> In my case saving in step three produces a syntax error when the source is loaded from file again. I don???t really have a >> clue as to what the underlying issue is, but I suspect it may have to do with comments and a particular situation in which >> the position is not being correctly updated before or after writing. >> >> >> I agree with Chris that locks may be problematic, it just seemed like the simplest obvious solution (although of course it >> gets complicated when an image crashes and doesn???t clean up the lock???). >> >> Cheers, >> Max >> >> >> >> -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From tim at rowledge.org Wed Jun 29 17:24:28 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jun 29 17:24:09 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: > On 29-06-2016, at 7:08 AM, Levente Uzonyi wrote: > > This seems to be a missing #flush after changes are written to the file. > Without #flush both processes (unix) will maintain their own version of the file in memory. Pretty much exactly what I was about to type. We just had part of this discussion wrt Scratch project files on the Pi - adding flush/sync etc. In many cases letting an OS buffer the buffering of the buffer?s buffer buffer is tolerable - though insane, and wasteful, and a symptom of the lack of careful analysis that seems to pervade the world of software these days - because nothing goes horribly wrong in most cases. Everything eventually gets pushed to actual hardware, the system doesn?t crash, evaporate, get zapped by Zargon DeathRay(?) emissions, the power doesn?t get ripped out etc. Evidently, on a Pi in a classroom we can?t assign quite such a low probability to the Zargon problem. However, the changes file is supposed to be a transaction log and as such I claim the data ought to hit hardware as soon as possible and in a way that as near as dammit guarantees correct results. So the mega-layer buffering is An Issue so far as I?m concerned. We also, still, and for decades now, have the behaviour I consider stupid beyond all reason whereby a file write is done by a) tell the file pointer to move to a certain location b) think about it c) oh, finally write some text to the file. With the obvious possibility that the file pointer can be changed in b) Then if you can open-for-write a file multiple times, how much confusion can that actually cause? What about a forked process with nominally the same file objects? Are we at all sure any OS properly deals with it? Are we sure that what is purportedly ?proper? makes any sense for our requirements? The most obvious place where this is an issue is where two images are using the same changes file and think they?re appending. Image A seeks to the end of the file, ?writes? stuff. Image B near-simultaneously does the same. Eventually each process gets around to pushing data to hardware. Oops! And let?s not dwell too much on the problems possible if either process causes a truncation of the file. Oh, wait, I think we actually had a problem with that some years ago. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Daddy, what does FORMATTING DRIVE C mean?" From eliot.miranda at gmail.com Wed Jun 29 17:35:38 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Jun 29 17:35:44 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: Hi Tim, On Wed, Jun 29, 2016 at 10:24 AM, tim Rowledge wrote: > > > On 29-06-2016, at 7:08 AM, Levente Uzonyi wrote: > > > > This seems to be a missing #flush after changes are written to the file. > > Without #flush both processes (unix) will maintain their own version of > the file in memory. > > Pretty much exactly what I was about to type. We just had part of this > discussion wrt Scratch project files on the Pi - adding flush/sync etc. > > In many cases letting an OS buffer the buffering of the buffer?s buffer > buffer is tolerable - though insane, and wasteful, and a symptom of the > lack of careful analysis that seems to pervade the world of software these > days - because nothing goes horribly wrong in most cases. Everything > eventually gets pushed to actual hardware, the system doesn?t crash, > evaporate, get zapped by Zargon DeathRay(?) emissions, the power doesn?t > get ripped out etc. Evidently, on a Pi in a classroom we can?t assign quite > such a low probability to the Zargon problem. > > However, the changes file is supposed to be a transaction log and as such > I claim the data ought to hit hardware as soon as possible and in a way > that as near as dammit guarantees correct results. So the mega-layer > buffering is An Issue so far as I?m concerned. > > We also, still, and for decades now, have the behaviour I consider stupid > beyond all reason whereby a file write is done by > a) tell the file pointer to move to a certain location > b) think about it > c) oh, finally write some text to the file. > With the obvious possibility that the file pointer can be changed in b) > Then if you can open-for-write a file multiple times, how much confusion > can that actually cause? What about a forked process with nominally the > same file objects? Are we at all sure any OS properly deals with it? Are we > sure that what is purportedly ?proper? makes any sense for our requirements? > > The most obvious place where this is an issue is where two images are > using the same changes file and think they?re appending. Image A seeks to > the end of the file, ?writes? stuff. Image B near-simultaneously does the > same. Eventually each process gets around to pushing data to hardware. > Oops! And let?s not dwell too much on the problems possible if either > process causes a truncation of the file. Oh, wait, I think we actually had > a problem with that some years ago. > The thing is that this problem bites even if we have a unitary primitive that both positions and writes if that primitive is written above a substrate that, as unix and stdio streams do, separates positioning from writing. The primitive is neat but it simply drives the problem further underground. A more robust solution might be to position, write, reposition, read, and compare, shortening on corruption, and retrying, using exponential back-off like ethernet packet transmission. Most of the time this adds only the overhead of reading what's written. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160629/adada25f/attachment.htm From tim at rowledge.org Wed Jun 29 17:44:37 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Jun 29 17:44:16 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: > On 29-06-2016, at 10:35 AM, Eliot Miranda wrote: > {snip much rant} > The most obvious place where this is an issue is where two images are using the same changes file and think they?re appending. Image A seeks to the end of the file, ?writes? stuff. Image B near-simultaneously does the same. Eventually each process gets around to pushing data to hardware. Oops! And let?s not dwell too much on the problems possible if either process causes a truncation of the file. Oh, wait, I think we actually had a problem with that some years ago. > > The thing is that this problem bites even if we have a unitary primitive that both positions and writes if that primitive is written above a substrate that, as unix and stdio streams do, separates positioning from writing. The primitive is neat but it simply drives the problem further underground. Oh absolutely - we only have real control over a small part of it. It would probably be worth making use of that where we can. > > A more robust solution might be to position, write, reposition, read, and compare, shortening on corruption, and retrying, using exponential back-off like ethernet packet transmission. Most of the time this adds only the overhead of reading what's written. Yes, for anything we want reliable that?s probably a good way. A limit on the number of retries would probably be smart to stop infinite recursion. Imagine the fun of an error causing infinite retries of writing an error log about an infinite recursion. On an infinitely large Beowulf cluster! It?s all yet another example of where software meeting reality leads to nightmares. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim If it was easy, the hardware people would take care of it. From lewis at mail.msen.com Wed Jun 29 18:00:19 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 29 18:00:22 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> Message-ID: <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> Let's not solve the wrong problem folks. I only looked at this for 10 minutes this morning, and I think (but I am not sure) that the issue affects the case of saving the image, and that the normal writing of changes is fine. Max was running on Pharo, which may or may not be handling changes the same way. I think he may be seeing a different problem from the one I confirmed. So a bit more testing and verification would be in order. I can't look at it now though. Dave > >> On 29-06-2016, at 10:35 AM, Eliot Miranda >> wrote: >> > {snip much rant} > >> The most obvious place where this is an issue is where two images are >> using the same changes file and think they???re appending. Image A seeks >> to the end of the file, ???writes??? stuff. Image B near-simultaneously >> does the same. Eventually each process gets around to pushing data to >> hardware. Oops! And let???s not dwell too much on the problems possible >> if either process causes a truncation of the file. Oh, wait, I think we >> actually had a problem with that some years ago. >> >> The thing is that this problem bites even if we have a unitary primitive >> that both positions and writes if that primitive is written above a >> substrate that, as unix and stdio streams do, separates positioning from >> writing. The primitive is neat but it simply drives the problem further >> underground. > > > Oh absolutely - we only have real control over a small part of it. It > would probably be worth making use of that where we can. > >> >> A more robust solution might be to position, write, reposition, read, >> and compare, shortening on corruption, and retrying, using exponential >> back-off like ethernet packet transmission. Most of the time this adds >> only the overhead of reading what's written. > > Yes, for anything we want reliable that???s probably a good way. A limit > on the number of retries would probably be smart to stop infinite > recursion. Imagine the fun of an error causing infinite retries of writing > an error log about an infinite recursion. On an infinitely large Beowulf > cluster! > > It???s all yet another example of where software meeting reality leads to > nightmares. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > If it was easy, the hardware people would take care of it. > > > From commits at source.squeak.org Wed Jun 29 21:56:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Jun 29 21:56:59 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160629215656.25140.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-June/068240.html Name: Chronology-Core-cmm.6 Ancestors: Chronology-Core-bf.5 Fix Date class comment. Add Date>>#@ shortcut for constructing DateAndTime's. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-June/068241.html Name: Morphic-mt.1187 Ancestors: Morphic-mt.1186 Fixes a bug with the Morphic main loop when the serverMode is enabled. We still should double-check if we still need this 50-ms-hack to keep servers responsive. It should be the duty of the caller of #interCyclePause: to provide the 50 for servers. ============================================= From lewis at mail.msen.com Wed Jun 29 23:07:13 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Jun 29 23:07:58 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> Message-ID: <20160629230713.GA32310@shell.msen.com> On Wed, Jun 29, 2016 at 02:00:19PM -0400, David T. Lewis wrote: > Let's not solve the wrong problem folks. I only looked at this for 10 > minutes this morning, and I think (but I am not sure) that the issue > affects the case of saving the image, and that the normal writing of > changes is fine. I am wrong. I spent some more time with this, and it is clear that two images saving chunks to the same changes file will result in corrupted change records in the changes file. It is not just an issue related to the image save as I suggested above. In practice, this is not an issue that either Chris or I have noticed, probably because we are not doing software development (saving method changes) at the same time that we are running RemoteTask and similar. But I can certainly see how it might be a problem if, for example, I had a bunch of students running the same image from a network shared folder. Dave > > Max was running on Pharo, which may or may not be handling changes the > same way. I think he may be seeing a different problem from the one I > confirmed. > > So a bit more testing and verification would be in order. I can't look at > it now though. > > Dave > > > > >> On 29-06-2016, at 10:35 AM, Eliot Miranda > >> wrote: > >> > > {snip much rant} > > > >> The most obvious place where this is an issue is where two images are > >> using the same changes file and think they???re appending. Image A seeks > >> to the end of the file, ???writes??? stuff. Image B near-simultaneously > >> does the same. Eventually each process gets around to pushing data to > >> hardware. Oops! And let???s not dwell too much on the problems possible > >> if either process causes a truncation of the file. Oh, wait, I think we > >> actually had a problem with that some years ago. > >> > >> The thing is that this problem bites even if we have a unitary primitive > >> that both positions and writes if that primitive is written above a > >> substrate that, as unix and stdio streams do, separates positioning from > >> writing. The primitive is neat but it simply drives the problem further > >> underground. > > > > > > Oh absolutely - we only have real control over a small part of it. It > > would probably be worth making use of that where we can. > > > >> > >> A more robust solution might be to position, write, reposition, read, > >> and compare, shortening on corruption, and retrying, using exponential > >> back-off like ethernet packet transmission. Most of the time this adds > >> only the overhead of reading what's written. > > > > Yes, for anything we want reliable that???s probably a good way. A limit > > on the number of retries would probably be smart to stop infinite > > recursion. Imagine the fun of an error causing infinite retries of writing > > an error log about an infinite recursion. On an infinitely large Beowulf > > cluster! > > > > It???s all yet another example of where software meeting reality leads to > > nightmares. > > > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > If it was easy, the hardware people would take care of it. > > > > > > > From lewis at mail.msen.com Thu Jun 30 00:47:36 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 30 00:47:39 2016 Subject: [squeak-dev] Class comment for Date mentions #localizedDates In-Reply-To: <20160629001853.GA79945@shell.msen.com> References: <20160313190355.GA20838@shell.msen.com> <20160622035036.GA54539@shell.msen.com> <20160623130551.GA52947@shell.msen.com> <20160627033035.GA59892@shell.msen.com> <20160628040335.GA28510@shell.msen.com> <20160629001853.GA79945@shell.msen.com> Message-ID: <20160630004736.GA49555@shell.msen.com> On Tue, Jun 28, 2016 at 08:18:53PM -0400, David T. Lewis wrote: > On Tue, Jun 28, 2016 at 01:41:28PM -0500, Chris Muller wrote: > > > > > I was really just trying to ask for a good class comment. > > > > I really do think this is the best way to do this clarification. Did > > you notice that Bert already updated the class comment of Timespan to > > mention the dual capability? So, I think simply removing that old > > stuff from Date's comment is simple and effective solution without > > breaking legacy apps. > > This was my attempt at a class comment for Date: > > Date provides methods for dealing with calendar dates in different formats. > > Instances of Date are Timespans with duration of 1 day beginning at midnight. > The start value of midnight, and possibly the duration of 1 day, depend on > the time zone in which the Date is defined. > > In the most common usage, a Date is defined relative to UTC (time zone offset > zero), and thus may be treated as a location independent calendar value. > > The current date, Date today, is assumed to be defined as a UTC date without > consideration of local time zone. > > Alternative attempts welcome :-) > > Dave > Chris, thanks for updating the class comment for Date. Summarizing where we are now: Brent's original class comment is: Instances of Date are Timespans with duration of 1 day. Their default creation assumes a start of midnight in the local time zone. And our class comment (Chronology-Core-cmm.6.mcz) is: Instances of Date are Timespans with duration of 1 day. As with all Chronology Timespan sub-instances, Dates can be instantiated as position values which compare equally to any other instance of the same Date, irregardless of the timezone in which either is created. However, like the other Timespan subInstances, there are rare cases where it may be desirable to use instances of Date to represent a particular 1-day span of time at a particular locality on the globe. All Timespans, including Dates, may specify a particular timezone offset for this purpose. It seems that Brent's intent was to represent a date starting at midnight in the local time zone. For various reasons, we now treat it more like a magnitude, representing it as a one day duration beginning at midnight UTC. That works better for most actual usage of class Date, but it does leave me thinking that we are mashing up two different concepts. To be clear, I am not planning to actually /do/ anything about this, I am just trying to clarify the documentation and my own understanding. It might well be a good idea to have two different classes to represent date as duration versus date as magnitude, but I certainly have no intention of taking that on until we decide to use or discard the UTCDateAndTime updates that I previously proposed. My primary motiviation is to make sure that the changes in UTCDateAndTime pass the unit tests while also respecting the design intent. So I am not trying to be a pain in the ass, I am really trying to understand the intended meaning of the class, and I am trying to reconcile Brent's original intent with the various changes that we have made since its introduction. Thanks :-) Dave From btc at openinworld.com Thu Jun 30 03:09:41 2016 From: btc at openinworld.com (Ben Coman) Date: Thu Jun 30 03:10:05 2016 Subject: [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: Message-ID: On Tue, Jun 28, 2016 at 6:04 PM, Max Leske wrote: > Hi, > > Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. > > I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. > > > I?ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > > > Cheers, > Max I just learnt something quite surprising that is probably important to be aware of... "Locks given by fcntl are not associated with the file-descriptor or open-file table entries. Instead, they are bound to the process itself. For example, a process has multiple open file descriptors for a particular file and gets a read/write lock using any one of these descriptors. Now closing any of these file descriptors will release the lock, the process holds on the file. The descriptor that was used to acquire the lock in the first place might still be open, but the process will loose its lock. So, it does not require an explicit unlock or a close ONLY on the descriptor that was used to acquire the lock in fcntl call. Doing unlock or close on any of the open file descriptors will release the lock owned by the process on the particular file." https://loonytek.com/2015/01/15/advisory-file-locking-differences-between-posix-and-bsd-locks/ cheers -ben From btc at openinworld.com Thu Jun 30 04:48:21 2016 From: btc at openinworld.com (Ben Coman) Date: Thu Jun 30 04:48:46 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <20160629230713.GA32310@shell.msen.com> References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: On Thu, Jun 30, 2016 at 7:07 AM, David T. Lewis wrote: > On Wed, Jun 29, 2016 at 02:00:19PM -0400, David T. Lewis wrote: >> Let's not solve the wrong problem folks. I only looked at this for 10 >> minutes this morning, and I think (but I am not sure) that the issue >> affects the case of saving the image, and that the normal writing of >> changes is fine. > > I am wrong. > > I spent some more time with this, and it is clear that two images saving > chunks to the same changes file will result in corrupted change records > in the changes file. It is not just an issue related to the image save > as I suggested above. > > In practice, this is not an issue that either Chris or I have noticed, > probably because we are not doing software development (saving method > changes) at the same time that we are running RemoteTask and similar. > But I can certainly see how it might be a problem if, for example, I > had a bunch of students running the same image from a network shared > folder. Maybe its time to consider a fundamental change in how method-sources are referred to. Taking inspiration from git... A content addressable key-value file store might solve concurrent access. Each CompiledMethod gets written to a file named for the hash of its contents, which is the only reference the Image getsto a method's source. Each such file would *only* need be written once and thereafter could be read simultaneously by multiple Images. Anyone on the network wanting store the same source would see the file already exists and have nothing to do. Perhaps having many individual files implies abysmal performance, Or maybe something similar to Mecurial's reflog format [1] could be used, one file per class. The thing about the Image *only* referring to a method's source by its content hash would seem to great flexibility in backends to locate/store that source. Possibly... * stored as individual files as above * bundled in a zip file in random order * a school could configure a database server in Image provided to students * hashes could be thrown at a service on the Internet * cached locally with a key-value database like LMDB [2] * remote replication to multiple internet backup locations * in an emergency you could throw bundle of hashes as a query to the mail list and get an adhoc response of individual files. * Inter-Smalltalk image communication Pharo has a stated goal to get rid of the changes file. Changing to content-hash-addressable method-source seems a logicial step along that road. Even if the Squeak community doesn't want to go so far as eliminating the .changes file, can they see value in changing method source references to be content-hashes rather than indexes into a particular file? [1] http://blog.prasoonshukla.com/mercurial-vs-git-scaling [2] https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database Just having a poke at this, it seems a new form of CompiledMethodTrailer may need to be defined, being invoked from CompiledMethod>>sourceCode. CompiledMethodTrailer>>sourceCode would find the source code based on a content-hash held by the CompiledMethod. If found, the call to #getSourceFromFile that accesses the .changes file will be bypassed, and could remain as a backup. cheers -ben > > Dave > > >> >> Max was running on Pharo, which may or may not be handling changes the >> same way. I think he may be seeing a different problem from the one I >> confirmed. >> >> So a bit more testing and verification would be in order. I can't look at >> it now though. >> >> Dave >> >> > >> >> On 29-06-2016, at 10:35 AM, Eliot Miranda >> >> wrote: >> >> >> > {snip much rant} >> > >> >> The most obvious place where this is an issue is where two images are >> >> using the same changes file and think they???re appending. Image A seeks >> >> to the end of the file, ???writes??? stuff. Image B near-simultaneously >> >> does the same. Eventually each process gets around to pushing data to >> >> hardware. Oops! And let???s not dwell too much on the problems possible >> >> if either process causes a truncation of the file. Oh, wait, I think we >> >> actually had a problem with that some years ago. >> >> >> >> The thing is that this problem bites even if we have a unitary primitive >> >> that both positions and writes if that primitive is written above a >> >> substrate that, as unix and stdio streams do, separates positioning from >> >> writing. The primitive is neat but it simply drives the problem further >> >> underground. >> > >> > >> > Oh absolutely - we only have real control over a small part of it. It >> > would probably be worth making use of that where we can. >> > >> >> >> >> A more robust solution might be to position, write, reposition, read, >> >> and compare, shortening on corruption, and retrying, using exponential >> >> back-off like ethernet packet transmission. Most of the time this adds >> >> only the overhead of reading what's written. >> > >> > Yes, for anything we want reliable that???s probably a good way. A limit >> > on the number of retries would probably be smart to stop infinite >> > recursion. Imagine the fun of an error causing infinite retries of writing >> > an error log about an infinite recursion. On an infinitely large Beowulf >> > cluster! >> > >> > It???s all yet another example of where software meeting reality leads to >> > nightmares. >> > >> > >> > tim >> > -- >> > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> > If it was easy, the hardware people would take care of it. >> > >> > >> > >> > From maxleske at gmail.com Thu Jun 30 07:59:37 2016 From: maxleske at gmail.com (Max Leske) Date: Thu Jun 30 07:59:42 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: Message-ID: <8DE35A42-AC63-4FC7-AB1D-9FD273C7CA6D@gmail.com> > On 30 Jun 2016, at 05:09, Ben Coman wrote: > > On Tue, Jun 28, 2016 at 6:04 PM, Max Leske wrote: >> Hi, >> >> Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. >> >> I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. >> >> >> I?ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image >> >> >> Cheers, >> Max > > I just learnt something quite surprising that is probably important to > be aware of... "Locks given by fcntl are not associated with the > file-descriptor or open-file table entries. Instead, they are bound to > the process itself. For example, a process has multiple open file > descriptors for a particular file and gets a read/write lock using any > one of these descriptors. Now closing any of these file descriptors > will release the lock, the process holds on the file. The descriptor > that was used to acquire the lock in the first place might still be > open, but the process will loose its lock. So, it does not require an > explicit unlock or a close ONLY on the descriptor that was used to > acquire the lock in fcntl call. Doing unlock or close on any of the > open file descriptors will release the lock owned by the process on > the particular file." > > https://loonytek.com/2015/01/15/advisory-file-locking-differences-between-posix-and-bsd-locks/ > > cheers -ben > Which would solve the problem of a crashed image not cleaning up its lock. Thanks for sharing Ben. From lewis at mail.msen.com Thu Jun 30 12:38:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Jun 30 12:39:33 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: <8DE35A42-AC63-4FC7-AB1D-9FD273C7CA6D@gmail.com> References: <8DE35A42-AC63-4FC7-AB1D-9FD273C7CA6D@gmail.com> Message-ID: <20160630123844.GA98870@shell.msen.com> On Thu, Jun 30, 2016 at 09:59:37AM +0200, Max Leske wrote: > > > On 30 Jun 2016, at 05:09, Ben Coman wrote: > > > > On Tue, Jun 28, 2016 at 6:04 PM, Max Leske wrote: > >> Hi, > >> > >> Opening the same image twice works fine as long as no writes to the .changes file occur. When both images write to the .changes file however it will be broken for both because the offsets for the changes are wrong. This can lead to lost data and predominantly to invalid method source code, which is a pain with Monticello. > >> > >> I suggest that we implement a kind of lock mechanism to ensure that only one image (the first one opened) can write to the .changes file. > >> > >> > >> I???ve opened an issue for Pharo here: https://pharo.fogbugz.com/f/cases/18635/The-changes-file-should-be-bound-to-a-single-image > >> > >> > >> Cheers, > >> Max > > > > I just learnt something quite surprising that is probably important to > > be aware of... "Locks given by fcntl are not associated with the > > file-descriptor or open-file table entries. Instead, they are bound to > > the process itself. For example, a process has multiple open file > > descriptors for a particular file and gets a read/write lock using any > > one of these descriptors. Now closing any of these file descriptors > > will release the lock, the process holds on the file. The descriptor > > that was used to acquire the lock in the first place might still be > > open, but the process will loose its lock. So, it does not require an > > explicit unlock or a close ONLY on the descriptor that was used to > > acquire the lock in fcntl call. Doing unlock or close on any of the > > open file descriptors will release the lock owned by the process on > > the particular file." > > > > https://loonytek.com/2015/01/15/advisory-file-locking-differences-between-posix-and-bsd-locks/ > > > > cheers -ben > > > > Which would solve the problem of a crashed image not cleaning up its lock. Thanks for sharing Ben. FYI, file locking for Unix/Linux/OS X is supported in OSProcess, see UnixProcessFileLockTestCase and the 'file locking' tests in UnixProcessAccessorTestCase. Dave From asqueaker at gmail.com Thu Jun 30 20:10:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 30 20:10:42 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: >> In practice, this is not an issue that either Chris or I have noticed, >> probably because we are not doing software development (saving method >> changes) at the same time that we are running RemoteTask and similar. >> But I can certainly see how it might be a problem if, for example, I >> had a bunch of students running the same image from a network shared >> folder. > > Maybe its time to consider a fundamental change in how method-sources > are referred to. > Taking inspiration from git... A content addressable key-value file > store might solve concurrent access. Each CompiledMethod gets written > to a file named for the hash of its contents, which is the only > reference the Image getsto a method's source. Each such file would It sounds like a lot of files.. so how would I move an image to another computer? I gotta know which files go with which image? Plus, it doesn't really solve the fundamental problem of two images writing to the same file. Mutliple images could still change the same method to the same contents at the same time. You may have made the problem less-likely, except for when you have your first hash-collision of *different* sources (it COULD happen), in which case it wouldn't even require the changes to occur at the same time. I guess it would also lose the order-sequence of the change log too... unless you were to try to use the underlying filesystem's timestamps on each file but... it wouldn't work after I've copied all the files via scp and because they all get new timestamps... Might be better to teach the class, who are learning about Smalltalk anyway, about the nature of the changes file..? From asqueaker at gmail.com Thu Jun 30 20:31:04 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Jun 30 20:31:48 2016 Subject: [Pharo-dev] [squeak-dev] The .changes file should be bound to a single image In-Reply-To: References: <20160629000637.GA61892@shell.msen.com> <20160629124549.GA12105@shell.msen.com> <9E311AF4-321C-421B-AABB-F51F82E1104A@gmail.com> <6071.136.1.1.171.1467223219.squirrel@webmail.msen.com> <20160629230713.GA32310@shell.msen.com> Message-ID: Another thought... Upon launching of the image, start a, temporary changes file, [image-name]-[some UUID].changes. Upon image save, append the temp changes file to the main changes file, but in an atomic way (first do the append as a new unique filename, then rename it to the original changes file name). Hmm, but then we would have to check two changes files when accessing sources.. On Thu, Jun 30, 2016 at 3:10 PM, Chris Muller wrote: >>> In practice, this is not an issue that either Chris or I have noticed, >>> probably because we are not doing software development (saving method >>> changes) at the same time that we are running RemoteTask and similar. >>> But I can certainly see how it might be a problem if, for example, I >>> had a bunch of students running the same image from a network shared >>> folder. >> >> Maybe its time to consider a fundamental change in how method-sources >> are referred to. >> Taking inspiration from git... A content addressable key-value file >> store might solve concurrent access. Each CompiledMethod gets written >> to a file named for the hash of its contents, which is the only >> reference the Image getsto a method's source. Each such file would > > It sounds like a lot of files.. so how would I move an image to > another computer? I gotta know which files go with which image? > > Plus, it doesn't really solve the fundamental problem of two images > writing to the same file. Mutliple images could still change the same > method to the same contents at the same time. You may have made the > problem less-likely, except for when you have your first > hash-collision of *different* sources (it COULD happen), in which case > it wouldn't even require the changes to occur at the same time. > > I guess it would also lose the order-sequence of the change log too... > unless you were to try to use the underlying filesystem's timestamps > on each file but... it wouldn't work after I've copied all the files > via scp and because they all get new timestamps... > > Might be better to teach the class, who are learning about Smalltalk > anyway, about the nature of the changes file..? From commits at source.squeak.org Thu Jun 30 21:38:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 30 21:38:05 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1188.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1188.mcz ==================== Summary ==================== Name: Morphic-cmm.1188 Author: cmm Time: 30 June 2016, 4:37:17.550411 pm UUID: dbffb365-18a5-414e-8584-48756b1592b3 Ancestors: Morphic-mt.1187 Update the key for #bringWindowUnderHandToFront to Cmd+/ (forward slash). This not only avoids the conflict with Ubuntu and Mac OS keys (sigh), but is a more sensible counterpart to the key which sends windows to the back (backward slash). =============== Diff against Morphic-mt.1187 =============== Item was changed: ----- Method: SystemWindow>>filterEvent:for: (in category 'events') ----- filterEvent: aKeyboardEvent for: anObject "Provide keyboard shortcuts." aKeyboardEvent isKeystroke ifFalse: [^ aKeyboardEvent]. aKeyboardEvent commandKeyPressed ifTrue: [ aKeyboardEvent keyCharacter caseOf: { [$\] -> [self class sendTopWindowToBack]. [Character escape] -> [self class deleteTopWindow]. + [$/] -> [self class bringWindowUnderHandToFront]. - [$`] -> [self class bringWindowUnderHandToFront]. } otherwise: [^ aKeyboardEvent "no hit"]. ^ aKeyboardEvent ignore "hit!!"]. aKeyboardEvent controlKeyPressed ifTrue: [ aKeyboardEvent keyCharacter caseOf: { [Character escape] -> [self world findWindow: aKeyboardEvent]. } otherwise: [^ aKeyboardEvent "no hit"]. ^ aKeyboardEvent ignore "hit!!"]. ^ aKeyboardEvent "no hit"! From commits at source.squeak.org Thu Jun 30 21:56:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 30 21:57:00 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160630215657.30940.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-June/068242.html Name: Morphic-cmm.1188 Ancestors: Morphic-mt.1187 Update the key for #bringWindowUnderHandToFront to Cmd+/ (forward slash). This not only avoids the conflict with Ubuntu and Mac OS keys (sigh), but is a more sensible counterpart to the key which sends windows to the back (backward slash). ============================================= From commits at source.squeak.org Thu Jun 30 22:36:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Jun 30 22:36:18 2016 Subject: [squeak-dev] The Trunk: Monticello-cmm.634.mcz Message-ID: Chris Muller uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-cmm.634.mcz ==================== Summary ==================== Name: Monticello-cmm.634 Author: cmm Time: 30 June 2016, 5:35:56.346888 pm UUID: 7dd41647-3d9a-413f-8508-2e73208eddfd Ancestors: Monticello-kfr.633 Update client-side Monticello history access. Soon, any properly configured HTTP server can provide MC history, not just trunk. =============== Diff against Monticello-kfr.633 =============== Item was changed: ----- Method: BrowserRequestor>>browseMcClassHistory (in category '*monticello-history') ----- browseMcClassHistory "Open a browser on all versions of this class available in the MC repository for this package." self getClass ifNil: [ UIManager inform: 'No class selected' ] ifNotNilDo: + [ : theClass | theClass theNonMetaClass mcModel + ifNil: [ UIManager inform: 'Only Magma-backed HTTP repositories (or MCMagmaRepositorys) support Monticello history.' ] + ifNotNil: + [ : mcModel | (MCOperationsList operations: (Cursor wait showWhile: [ theClass theNonMetaClass mcPatchOperations ])) browse ] ]! - [ : theClass | (MCWorkingCopyBrowser mcModelFor: theClass theNonMetaClass) ifNotNil: - [ : mcModel | (MCOperationsList operations: (Cursor wait showWhile: [ theClass theNonMetaClass mcPatchOperations ])) browse ] ]! Item was changed: ----- Method: BrowserRequestor>>browseMcMethodHistory (in category '*monticello-history') ----- browseMcMethodHistory "Open a browser on all versions of this method available in the MC repository for this package." self selectedMethodReference ifNil: [ UIManager inform: 'No method selected' ] ifNotNilDo: + [ : methodReference | methodReference mcModel + ifNil: [ UIManager inform: 'Only Magma-backed HTTP repositories (or MCMagmaRepositorys) support Monticello history.' ] + ifNotNil: [ (MCOperationsList operations: (Cursor wait showWhile: [ methodReference mcPatchOperations ])) browse ] ]! - [ : methodReference | (MCWorkingCopyBrowser mcModelFor: methodReference) ifNotNil: [ (MCOperationsList operations: (Cursor wait showWhile: [ methodReference mcPatchOperations ])) browse ] ]! Item was changed: ----- Method: MCHttpRepository>>mcModel (in category 'overriding') ----- mcModel "Answer the object which can respond to #historyOf: and #originOf:." + ^ self! - ^ ((location beginsWith: 'http://localhost:8888/') or: [ location beginsWith: self class trunkBackupUrlString ]) ifTrue: [ self ]! Item was changed: ----- Method: MCOperationsBrowser>>browseSelectionOrigin (in category 'actions') ----- browseSelectionOrigin | mcDefinition | selection ifNil: [ UIManager inform: 'Make a selection.' ]. mcDefinition := selection definition. Cursor wait showWhile: + [ mcDefinition mcModel ifNotNil: - [ (MCWorkingCopyBrowser mcModelFor: mcDefinition) ifNotNil: [ : mcModel | (mcModel originOf: mcDefinition) ifNil: [ UIManager inform: mcDefinition asString , ' was not found in any historical MC repository.' ] ifNotNilDo: [ : version | version open ] ] ]! Item was removed: - ----- Method: MCWorkingCopyBrowser class>>mcModelFor: (in category 'hooks') ----- - mcModelFor: aClassOrMethodReference - ^ aClassOrMethodReference mcModel ifNil: - [ | pkgName rep | (UIManager confirm: 'Okay to add historical repository ' , (rep := MCHttpRepository trunkBackup) description , ' to ' , (pkgName := aClassOrMethodReference packageInfo packageName) , '?') ifTrue: - [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup addRepository: rep. - aClassOrMethodReference mcModel ] ]! From tim at rowledge.org Thu Jun 30 23:32:26 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Jun 30 23:32:03 2016 Subject: [squeak-dev] A $140 pc for running Squeak Message-ID: <81C530DB-6D5B-4394-B571-EE90356D38B9@rowledge.org> I just got my pi-top CEED (don?t ask me what that stands for?) and after a few minutes setup - inserting the SD card into the provided Pi3, connecting up a couple of cables, inserting the little plastic-magnet ?feet? etc - I was up and running. What on earth is a pi-top CEED you ask? Well, think of a small iMac all-in-one with a quite decent 14? lcd and a pi3 inside. Add your own spare mouse/kbd, plug together, insert power plug (psu provided) and press the Magic Button. A moment later you have ? what? Err, this is a bit odd looking? ah, escape to a normal desktop and all is well. Run some updating to get stuff sorted out a little (the Scratch version definitely needs updating for example) and all is well. It?s a Pi3 in a nice case with a nice display, a beefy power supply, a neat way of providing space for some add-ons, a proper power switch and a slightly odd OS wrapper. See www.pi-top.com for more details. For US$140! OK, so maybe you have to spend $20 on a mouse & keyboard too. And perhaps you want their speaker unit for another $20. You can get just the lcd/case/pus for $99 if you already have a spare Pi. Given that the Pi 7? touch lcd is $70 on its own, this seems a steal to me. I?m planning to use my three in Scratch classes over the summer. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim All the simple programs have been written, and all the good names taken.