From trygver at ifi.uio.no Sun Nov 1 10:09:55 2020 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Sun, 1 Nov 2020 11:09:55 +0100 Subject: [squeak-dev] Not allowed to change a Squeak Wiki entry Message-ID: <0c3c197c-18ef-ce08-9491-3296fd20b0cd@ifi.uio.no> Hi, My BabyIDE is described in https://wiki.squeak.org/squeak/2540.version?id=16 The entry contains an outdated URL so I need to change it. I click /edit /and am asked to /sign in/. I have a few Squeak-related accounts, but none of my old account details help me. Can somebody please tell me what I should do? Thanks Trygve -- /The essence of object orientation is that objects collaborateto achieve a goal. / Trygve Reenskaug mailto: trygver at ifi.uio.no Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway                     Tel: (+47) 468 58 625 -------------- next part -------------- An HTML attachment was scrubbed... URL: From karlramberg at gmail.com Sun Nov 1 10:36:08 2020 From: karlramberg at gmail.com (karl ramberg) Date: Sun, 1 Nov 2020 11:36:08 +0100 Subject: [squeak-dev] Not allowed to change a Squeak Wiki entry In-Reply-To: <0c3c197c-18ef-ce08-9491-3296fd20b0cd@ifi.uio.no> References: <0c3c197c-18ef-ce08-9491-3296fd20b0cd@ifi.uio.no> Message-ID: Default should be Username: squeak Password: viewpoints Best, Karl On Sun, Nov 1, 2020 at 11:10 AM Trygve Reenskaug wrote: > Hi, > My BabyIDE is described in > https://wiki.squeak.org/squeak/2540.version?id=16 > > The entry contains an outdated URL so I need to change it. I click *edit *and > am asked to *sign in*. I have a few Squeak-related accounts, but none of > my old account details help me. Can somebody please tell me what I should > do? > > Thanks > Trygve > > -- > > *The essence of object orientation is that objects collaborate to achieve > a goal. * > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > N-0378 Oslo http://fullOO.info > Norway Tel: (+47) 468 58 625 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sun Nov 1 13:13:50 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 1 Nov 2020 13:13:50 0000 Subject: [squeak-dev] The Inbox: MorphicExtras-ct.283.mcz Message-ID: A new version of MorphicExtras was added to project The Inbox: http://source.squeak.org/inbox/MorphicExtras-ct.283.mcz ==================== Summary ==================== Name: MorphicExtras-ct.283 Author: ct Time: 1 November 2020, 2:13:44.005544 pm UUID: 50d9e7fa-55ad-4c4c-acd4-6ba27932b25a Ancestors: MorphicExtras-pre.279 Proposal: Override Bag >> #asMorph to create a HistogramMorph. Usage example: ((PackageInfo named: #Morphic) methods collect: [:method | method timeStamp findTokens ifEmpty: nil ifNotEmpty: #first] as: Bag) openAsMorph =============== Diff against MorphicExtras-pre.279 =============== Item was added: + ----- Method: Bag>>asMorph (in category '*MorphicExtras-converting') ----- + asMorph + + ^ HistogramMorph on: self! From commits at source.squeak.org Sun Nov 1 13:58:50 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 1 Nov 2020 13:58:50 0000 Subject: [squeak-dev] The Inbox: Tools-ct.1015.mcz Message-ID: Christoph Thiede uploaded a new version of Tools to project The Inbox: http://source.squeak.org/inbox/Tools-ct.1015.mcz ==================== Summary ==================== Name: Tools-ct.1015 Author: ct Time: 1 November 2020, 3:58:41.62325 pm UUID: 0f1723d1-90c5-ca4e-88ad-56f6800b2b17 Ancestors: Tools-tpr.1014 Beautify CodeHolder >> #annotationForSelector:ofClass: implementation and output. Remove dangling separator character and add multilingual support. Example - before: mt 2/13/2020 13:49 � running � 2 implementors � in change sets: Morphic-pre.1466 Morphic-mt.1507 Morphic-mt.1607 Morphic-cmm.1617 Morphic-mt.1622 � Example - after: mt 2/13/2020 13:49 � running � 2 implementors � in change sets: Morphic-pre.1466, Morphic-mt.1507, Morphic-mt.1607, Morphic-cmm.1617 and Morphic-mt.1622 =============== Diff against Tools-tpr.1014 =============== Item was changed: ----- Method: CodeHolder>>annotationForSelector:ofClass: (in category 'annotation') ----- annotationForSelector: aSelector ofClass: aClass "Provide a line of content for an annotation pane, representing information about the given selector and class" | separator aStream requestList | aSelector == #Comment ifTrue: [^ self annotationForClassCommentFor: aClass]. aSelector == #Definition ifTrue: [^ self annotationForClassDefinitionFor: aClass]. aSelector == #Hierarchy ifTrue: [^ self annotationForHierarchyFor: aClass]. aStream := (String new: 512) writeStream. requestList := self annotationRequests. + separator := self annotationSeparator. - separator := requestList size > 1 - ifTrue: [self annotationSeparator] - ifFalse: ['']. requestList do: [:aRequest | | aString sendersCount aComment aCategory implementorsCount aList stamp authorInitials | aRequest == #firstComment ifTrue: [aComment := aClass firstCommentAt: aSelector. aComment isEmptyOrNil + ifFalse: [aStream nextPutAll: aComment]]. - ifFalse: [aStream nextPutAll: aComment , separator]]. aRequest == #masterComment ifTrue: [aComment := aClass supermostPrecodeCommentFor: aSelector. aComment isEmptyOrNil + ifFalse: [aStream nextPutAll: aComment]]. - ifFalse: [aStream nextPutAll: aComment , separator]]. aRequest == #documentation ifTrue: [aComment := aClass precodeCommentOrInheritedCommentFor: aSelector. aComment isEmptyOrNil + ifFalse: [aStream nextPutAll: aComment]]. - ifFalse: [aStream nextPutAll: aComment , separator]]. aRequest == #timeStamp ifTrue: [stamp := self timeStamp. aStream + nextPutAll: (stamp ifEmpty: ['no timeStamp' translated])]. - nextPutAll: (stamp size > 0 - ifTrue: [stamp , separator] - ifFalse: ['no timeStamp' , separator])]. aRequest == #author ifTrue: [authorInitials := self timeStamp findTokens ifEmpty: [''] ifNotEmpty: [:tokens | tokens first]. aStream nextPutAll: (SystemNavigation authorsInverted at: authorInitials ifPresent: [:fullNames | fullNames anyOne] ifAbsent: ['unknown author']), separator]. aRequest == #messageCategory ifTrue: [aCategory := aClass organization categoryOfElement: aSelector. aCategory ifNotNil: ["woud be nil for a method no longer present, e.g. in a recent-submissions browser" + aStream nextPutAll: aCategory]]. - aStream nextPutAll: aCategory , separator]]. aRequest == #sendersCount ifTrue: [sendersCount := (self systemNavigation allCallsOn: aSelector) size. sendersCount := sendersCount = 1 + ifTrue: ['1 sender' translated] + ifFalse: ['{1} senders' translated format: {sendersCount}]. + aStream nextPutAll: sendersCount]. - ifTrue: ['1 sender'] - ifFalse: [sendersCount printString , ' senders']. - aStream nextPutAll: sendersCount , separator]. aRequest == #implementorsCount ifTrue: [implementorsCount := self systemNavigation numberOfImplementorsOf: aSelector. implementorsCount := implementorsCount = 1 + ifTrue: ['1 implementor' translated] + ifFalse: ['{1} implementors' translated format: {implementorsCount}]. + aStream nextPutAll: implementorsCount]. - ifTrue: ['1 implementor'] - ifFalse: [implementorsCount printString , ' implementors']. - aStream nextPutAll: implementorsCount , separator]. aRequest == #priorVersionsCount ifTrue: [self addPriorVersionsCountForSelector: aSelector ofClass: aClass to: aStream]. aRequest == #priorTimeStamp ifTrue: [stamp := VersionsBrowser timeStampFor: aSelector class: aClass reverseOrdinal: 2. stamp + ifNotNil: [aStream nextPutAll: 'prior time stamp: ' translated , stamp]]. - ifNotNil: [aStream nextPutAll: 'prior time stamp: ' , stamp , separator]]. aRequest == #recentChangeSet ifTrue: [aString := ChangesOrganizer mostRecentChangeSetWithChangeForClass: aClass selector: aSelector. + aStream nextPutAll: aString]. - aString size > 0 - ifTrue: [aStream nextPutAll: aString , separator]]. aRequest == #allChangeSets ifTrue: [aList := ChangesOrganizer allChangeSetsWithClass: aClass selector: aSelector. + aList + ifNotEmpty: [aList size = 1 + ifTrue: [aStream nextPutAll: 'only in change set ' translated] + ifFalse: [aStream nextPutAll: 'in change sets: ' translated]. + aStream nextPutAll: (aList collect: + [:changeSet | changeSet name]) asCommaStringAnd] + ifEmpty: [aStream nextPutAll: 'in no change set' translated]]] + separatedBy: [ + aStream nextPutAll: separator]. - aList size > 0 - ifTrue: [aList size = 1 - ifTrue: [aStream nextPutAll: 'only in change set '] - ifFalse: [aStream nextPutAll: 'in change sets: ']. - aList - do: [:aChangeSet | aStream nextPutAll: aChangeSet name , ' ']] - ifFalse: [aStream nextPutAll: 'in no change set']. - aStream nextPutAll: separator]]. ^ aStream contents! From trygver at ifi.uio.no Sun Nov 1 16:07:15 2020 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Sun, 1 Nov 2020 17:07:15 +0100 Subject: [squeak-dev] Not allowed to change a Squeak Wiki entry In-Reply-To: References: <0c3c197c-18ef-ce08-9491-3296fd20b0cd@ifi.uio.no> Message-ID: <8d51cf02-ef9b-a5b6-9c68-2833960cb3e8@ifi.uio.no> Karl, Thank you. Your magic did the trick. Trygve On 2020-11-01 11:36, karl ramberg wrote: > Default should be > Username: squeak > Password: viewpoints > > Best, > Karl > > On Sun, Nov 1, 2020 at 11:10 AM Trygve Reenskaug > wrote: > > Hi, > My BabyIDE is described in > https://wiki.squeak.org/squeak/2540.version?id=16 > > > The entry contains an outdated URL so I need to change it. I click > /edit /and am asked to /sign in/. I have a few Squeak-related > accounts, but none of my old account details help me. Can somebody > please tell me what I should do? > > Thanks > Trygve > > -- > > /The essence of object orientation is that objects collaborateto > achieve a goal. / > Trygve Reenskaug mailto: trygver at ifi.uio.no > > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > > N-0378 Oslo http://fullOO.info > Norway                     Tel: (+47) 468 58 625 > > -- /The essence of object orientation is that objects collaborateto achieve a goal. / Trygve Reenskaug mailto: trygver at ifi.uio.no Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway                     Tel: (+47) 468 58 625 -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sun Nov 1 17:29:07 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 1 Nov 2020 17:29:07 0000 Subject: [squeak-dev] The Inbox: Tools-ct.1016.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-ct.1016.mcz ==================== Summary ==================== Name: Tools-ct.1016 Author: ct Time: 1 November 2020, 6:29:01.297544 pm UUID: 6d13e111-bc02-d342-9591-6dc4cdbd41f3 Ancestors: Tools-tpr.1014 Fine-tune message adding in a MessageTrace. When the user is asked for one of many selectors and cancels the menu, don't add any message. Reuse the selector search known from browsing implementors for browsing senders as well. Improve multilingual support. =============== Diff against Tools-tpr.1014 =============== Item was changed: ----- Method: MessageTrace>>addChildMethodsNamed: (in category 'building') ----- addChildMethodsNamed: selectorSymbol | methodsReferences | messageListIndex = 0 ifTrue: + [ ^(PopUpMenu labels: 'OK' translated) + startUpWithCaption: 'Please reselect a method.' translated ]. - [ ^(PopUpMenu labels: ' OK ') - startUpWithCaption: 'Please reselect a method.' ]. (methodsReferences := self filteredSelectorsNamed: selectorSymbol) isEmpty ifTrue: + [ ^(PopUpMenu labels: 'OK' translated) + startUpWithCaption: ('There are no methods named {1}' translated format: {selectorSymbol}) ] - [ ^(PopUpMenu labels: ' OK ') - startUpWithCaption: 'There are no methods named ', selectorSymbol ] ifFalse: [ self addChildMessages: methodsReferences + autoSelectString: selectorSymbol ]! - autoSelectString: selectorSymbol ] - ! Item was changed: ----- Method: MessageTrace>>addParentMethodsSending: (in category 'building') ----- addParentMethodsSending: selectorSymbol | methodsList | (methodsList := self systemNavigation allCallsOn: selectorSymbol) isEmpty ifTrue: + [ ^ (PopUpMenu labels: 'OK' translated) + startUpWithCaption: ('There are no methods that send {1}' translated format: {selectorSymbol}) ] - [ ^(PopUpMenu labels: ' OK ') - startUpWithCaption: 'There are no methods that send ', selectorSymbol ] ifFalse: [ self addParentMessages: methodsList + autoSelectString: selectorSymbol ]! - autoSelectString: selectorSymbol ] - ! Item was changed: ----- Method: MessageTrace>>browseAllCallsOn: (in category 'actions') ----- browseAllCallsOn: selectorSymbol + | selectorToBrowse | + selectorToBrowse := self selection + ifNil: [ selectorSymbol ] + ifNotNil: [ self + getSelectorNamed: selectorSymbol + toBrowseAs: 'senders' translated ]. + selectorToBrowse ifNil: [^ self]. (self hasUnacceptedEdits or: [ Preferences traceMessages not ]) + ifTrue: [ super browseAllCallsOn: selectorToBrowse ] + ifFalse: [ self addParentMethodsSending: selectorToBrowse ]! - ifTrue: [ super browseAllCallsOn: selectorSymbol ] - ifFalse: [ self addParentMethodsSending: selectorSymbol ]! Item was changed: ----- Method: MessageTrace>>browseAllImplementorsOf: (in category 'actions') ----- browseAllImplementorsOf: selectorSymbol | selectorToBrowse | selectorToBrowse := self selection ifNil: [ selectorSymbol ] + ifNotNil: [ self + getSelectorNamed: selectorSymbol + toBrowseAs: 'implementors' translated ]. + selectorToBrowse ifNil: [^ self]. - ifNotNil: [ self getImplementorNamed: selectorSymbol asSymbol "since we can get passed literals"]. (self hasUnacceptedEdits or: [ Preferences traceMessages not ]) ifTrue: [ super browseAllImplementorsOf: selectorToBrowse ] ifFalse: [ self addChildMethodsNamed: selectorToBrowse ] ! Item was removed: - ----- Method: MessageTrace>>getImplementorNamed: (in category 'private accessing') ----- - getImplementorNamed: selectorSymbol - | allPossibilities | - allPossibilities := (((self selection compiledMethod messages - select: [ :eachSelector | eachSelector beginsWith: selectorSymbol ]) - copyWith: selectorSymbol) - select: [ :each | (Symbol lookup: each) notNil ]) - asSet asOrderedCollection sort. - (allPossibilities includes: selectorSymbol) ifTrue: - [ allPossibilities addFirst: (allPossibilities remove: selectorSymbol) ]. - ^allPossibilities size > 1 - ifTrue: - [ | selectionIndex | - selectionIndex := (PopUpMenu labelArray: allPossibilities lines: #(1)) - startUpWithCaption: - 'Browse implementors of - which message?'. - selectionIndex = 0 ifTrue: [ selectorSymbol ] ifFalse: [ allPossibilities at: selectionIndex ] ] - ifFalse: [ allPossibilities isEmpty - ifTrue: [ selectorSymbol ] - ifFalse: [ allPossibilities first ] ] - ! Item was added: + ----- Method: MessageTrace>>getSelectorNamed:toBrowseAs: (in category 'private accessing') ----- + getSelectorNamed: selectorSymbol toBrowseAs: selectorRole + | allPossibilities | + allPossibilities := (((self selection compiledMethod messages + select: [ :eachSelector | eachSelector beginsWith: selectorSymbol asString ]) + copyWith: selectorSymbol) + select: [ :each | (Symbol lookup: each) notNil ]) + asSet asOrderedCollection sort. + (allPossibilities includes: selectorSymbol) ifTrue: + [ allPossibilities addFirst: (allPossibilities remove: selectorSymbol) ]. + ^allPossibilities size > 1 + ifTrue: + [ | selectionIndex | + selectionIndex := (PopUpMenu labelArray: allPossibilities lines: #(1)) + startUpWithCaption: ('Browse {1} of which message?' translated format: {selectorRole}). + selectionIndex = 0 ifTrue: [ nil ] ifFalse: [ allPossibilities at: selectionIndex ] ] + ifFalse: [ allPossibilities isEmpty + ifTrue: [ selectorSymbol ] + ifFalse: [ allPossibilities first ] ]! From commits at source.squeak.org Sun Nov 1 18:51:13 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 1 Nov 2020 18:51:13 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1359.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1359.mcz ==================== Summary ==================== Name: Kernel-ct.1359 Author: ct Time: 1 November 2020, 7:50:24.183428 pm UUID: 3b12b316-79f3-de41-8765-8296d964b821 Ancestors: Kernel-mt.1353 Revise and extend Context #runSimulated: implementation. Remove restriction to blocks that do not have a method return. Add support for exception signaling during the execution, which caused unterminated simulation of the calling process in the past. Support argless contextAtEachStep blocks. Benchmarks: code: [Context runSimulated: [100 at 100 corner: 200 at 200]] bench before: 16.7 ms/run after: 19.8 ms/run I think this should be okay, given the fact that the primary purpose of simulation is providing explorability but not efficiency ... =============== Diff against Kernel-mt.1353 =============== Item was changed: ----- Method: Context class>>runSimulated: (in category 'simulation') ----- runSimulated: aBlock + "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns." - "Simulate the execution of the argument, current. Answer the result it - returns." ^ thisContext sender runSimulated: aBlock + contextAtEachStep: [] - contextAtEachStep: [:ignored] "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- + runSimulated: aBlock contextAtEachStep: anotherBlock + "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." + + | current resume ensure | + resume := false. - runSimulated: aBlock contextAtEachStep: block2 - "Simulate the execution of the argument, aBlock, until it ends. aBlock - MUST NOT contain an '^'. Evaluate block2 with the current context - prior to each instruction executed. Answer the simulated value of aBlock." - | current | - aBlock hasMethodReturn - ifTrue: [self error: 'simulation of blocks with ^ can run loose']. current := aBlock asContext. + ensure := current insertSender: (Context contextEnsure: [resume := true]). + ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead." + + (anotherBlock numArgs = 0 + ifTrue: ["optimized" [resume]] + ifFalse: ["stop execution on time, don't expose simulation details to caller" + [current == ensure or: + ["Context >> #resume:" + current size >= 2 and: + [(current at: 2) == ensure]]] ]) - current pushArgs: Array new from: self. - [current == self] whileFalse: + [anotherBlock cull: current. - [block2 value: current. current := current step]. + + ^ current jump! - ^self pop! From commits at source.squeak.org Sun Nov 1 18:54:43 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 1 Nov 2020 18:54:43 0000 Subject: [squeak-dev] The Inbox: KernelTests-ct.389.mcz Message-ID: A new version of KernelTests was added to project The Inbox: http://source.squeak.org/inbox/KernelTests-ct.389.mcz ==================== Summary ==================== Name: KernelTests-ct.389 Author: ct Time: 1 November 2020, 7:54:42.403428 pm UUID: 7c294d2e-59a7-9746-b613-997d1aa4521c Ancestors: KernelTests-ul.386 Extend tests for Context #runSimulated:. Depends on Kernel-ct.1359. =============== Diff against KernelTests-ul.386 =============== Item was added: + ----- Method: BlockClosureTest>>return: (in category 'private') ----- + return: something + + ^ something! Item was changed: ----- Method: BlockClosureTest>>testRunSimulated (in category 'tests') ----- testRunSimulated + self assert: Rectangle equals: + (Context runSimulated: aBlockClosure asContext) class. + self assert: 42 equals: + (Context runSimulated: [self return: 42]). + self + should: [Context runSimulated: [self halt]] + raise: Halt.! - self assert: Rectangle equals: (Context runSimulated: aBlockClosure asContext) class! Item was added: + ----- Method: BlockClosureTest>>testRunSimulatedContextAtEachStep (in category 'tests') ----- + testRunSimulatedContextAtEachStep + + | context | + context := aBlockClosure asContext. + self assert: Rectangle equals: (thisContext + runSimulated: context + contextAtEachStep: [:ctxt | self assert: + [ctxt == context or: [ctxt hasSender: context]]]) class.! From eliot.miranda at gmail.com Sun Nov 1 19:02:19 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun, 1 Nov 2020 11:02:19 -0800 Subject: [squeak-dev] The Inbox: Kernel-ct.1359.mcz In-Reply-To: References: Message-ID: Hi Christoph, can you please submit a merge of your changes here with Kernel-eem.1359 and then we can move your contribution to trunk. Always submitting deltas to other inbox versions means one of us has to merge and that could be perceived as a little passive aggressive ;-). On Sun, Nov 1, 2020 at 10:51 AM wrote: > A new version of Kernel was added to project The Inbox: > http://source.squeak.org/inbox/Kernel-ct.1359.mcz > > ==================== Summary ==================== > > Name: Kernel-ct.1359 > Author: ct > Time: 1 November 2020, 7:50:24.183428 pm > UUID: 3b12b316-79f3-de41-8765-8296d964b821 > Ancestors: Kernel-mt.1353 > > Revise and extend Context #runSimulated: implementation. Remove > restriction to blocks that do not have a method return. Add support for > exception signaling during the execution, which caused unterminated > simulation of the calling process in the past. Support argless > contextAtEachStep blocks. > > Benchmarks: > code: > [Context runSimulated: [100 at 100 corner: 200 at 200]] bench > before: > 16.7 ms/run > after: > 19.8 ms/run > I think this should be okay, given the fact that the primary purpose of > simulation is providing explorability but not efficiency ... > > =============== Diff against Kernel-mt.1353 =============== > > Item was changed: > ----- Method: Context class>>runSimulated: (in category 'simulation') > ----- > runSimulated: aBlock > + "Simulate the execution of aBlock, until it ends or is curtailed. > Answer the result it returns." > - "Simulate the execution of the argument, current. Answer the > result it > - returns." > > ^ thisContext sender > runSimulated: aBlock > + contextAtEachStep: [] > - contextAtEachStep: [:ignored] > > "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! > > Item was changed: > ----- Method: Context>>runSimulated:contextAtEachStep: (in category > 'system simulation') ----- > + runSimulated: aBlock contextAtEachStep: anotherBlock > + "Simulate the execution of the argument, aBlock, until it ends or > is curtailed. If any exception is signaled during the execution, simulate > it being handled on the present caller stack. Evaluate anotherBlock with > the current context prior to each instruction executed. Answer the > simulated value of aBlock." > + > + | current resume ensure | > + resume := false. > - runSimulated: aBlock contextAtEachStep: block2 > - "Simulate the execution of the argument, aBlock, until it ends. > aBlock > - MUST NOT contain an '^'. Evaluate block2 with the current context > - prior to each instruction executed. Answer the simulated value of > aBlock." > - | current | > - aBlock hasMethodReturn > - ifTrue: [self error: 'simulation of blocks with ^ can run > loose']. > current := aBlock asContext. > + ensure := current insertSender: (Context contextEnsure: [resume := > true]). > + ensure sender ifNil: [ensure privSender: self]. "For backward > compatibility, do not fail if aBlock is dead." > + > + (anotherBlock numArgs = 0 > + ifTrue: ["optimized" [resume]] > + ifFalse: ["stop execution on time, don't expose simulation > details to caller" > + [current == ensure or: > + ["Context >> #resume:" > + current size >= 2 and: > + [(current at: 2) == ensure]]] ]) > - current pushArgs: Array new from: self. > - [current == self] > whileFalse: > + [anotherBlock cull: current. > - [block2 value: current. > current := current step]. > + > + ^ current jump! > - ^self pop! > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 2 08:55:26 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 09:55:26 +0100 Subject: [squeak-dev] Fixing the infinite debugger chains? (was: Code simulation error (was Re: I broke the debugger?)) In-Reply-To: <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> References: <1603889444900-0.post@n4.nabble.com> <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> Message-ID: Hi Eliot. > Therefore, *any* error which occurs during the block is not an error in the process > being debugged (that error delivery should be simulated, and delivered within the > process being debugged), but an error in the simulation, and should stop the simulation. Well, unfortunately, one cannot know. Think of simulating "7/0". Best, Marcel Am 28.10.2020 14:44:06 schrieb Eliot Miranda : Hi all, > On Oct 28, 2020, at 5:50 AM, Christoph Thiede wrote: > > Hi all! :-) > > After a lot of time, I would like to give this issue another push. These > bugs are really serious and we should finally fix them. > > Short summary for everyone who would not like to re-read the whole thread: > / > Over the last months, several issues have been reported about infinite > chains of debuggers popping up in your image and, most of the time, > eventually making it unusable. Some months ago, I traced these issues down > to several simulation errors that occurred while pressing the Over button in > the debugger. The simulation errors can be fixed separately, but the > debugger chains are caused by a second phenomenon which I could break down > in the following snippet: > > Processor activeProcess > evaluate: [self error: #first. self inform: #second] > onBehalfOf: [] newProcess > > You would expect to see first a debugger window for the #error, and > second, after you resume this error, a dialog window for the #inform:. > However, surprisingly, both windows appear at the same time. The opening > debugger does not suspend the process correctly. > / > > > I also had a talk about it with Marcel and Patrick and we ended up with the > finding that the semantics of Process >> #evaluate:onBehalfOf: are not 100% > clear at the moment. Its method comment states: > > "Evaluate aBlock setting effectiveProcess to aProcess, and all other > variables other than the scheduling ones to those of aProcess." > > However, the situation is unclear when an exception is raised from aBlock. > Should it be handled still on behalf of the behalfOf process or rather on > the original receiver process instead? Conceptually Process >> #evaluate:onBehalfOf: is a private method if the debugger, which exists only to ensure that while simulating code on behalf of done process being debugged, the right process is found by the simulated code even though another process is actually executing the code. Therefore the block being evaluated within Process >> #evaluate:onBehalfOf: is always evaluating some simulation on behalf of the debugger. Therefore, *any* error which occurs during the block is not an error in the process being debugged (that error delivery should be simulated, and delivered within the process being debugged), but an error in the simulation, and should stop the simulation. Therefore, an error within the evaluate block of Process >> #evaluate:onBehalfOf: could be caught within Process >> #evaluate:onBehalfOf: but delivered outside. One could experiment with adding an exception handler around the evaluation block that would copy the stack of the exception, terminate the block, and then open a debugger on the copy of the stack once the effectiveProcess has been restored. [P.S. I think the right way to implement this is to use Context>>cut: to snip the section of the stack containing the simulation error and stitch this back in after the evaluate block, but I *think* I am seeing bugs in the context-to-stack mapping machinery in the VM which is causing the stitching back of the stack to fail, which is why I’m trying (successfully does far) to simulate the simulator. So hopefully in a few days the stitching approach will be viable, but did the moment the stack copying approach will work, even though it introduces unnecessary overhead.] I hope this helps, and I hope I’m understanding the issue correctly. If I’m not I thank you for your patience :-). > At the moment, the former is the case, and this leads to the problem that > the behalfOf process is debugged (i.e. interrupted) when an error is raised > from aBlock while the - technically actually causing - receiver process > keeps running, eventually ignoring the just-raised exception. See > StandardToolSet class >> #handleError: for the place where "Processor > activeProcess" is determined for debugging, which is redirected to the > onBehalf process during the execution of aBlock. > At this place, we actually would like to see something like this: > > thisContext process > debug: anError signalerContext > title: anError description > > Which, however, is not possible because a stack frame cannot know its > containing process. > So in my first changeset (fix-infinite-debuggers.2.cs below), I had proposed > to rewrite that method like this: > > Processor basicActiveProcess > debug: anError signalerContext > title: anError description > > where basicActiveProcess would return the "true" active process neglecting > the onBehalfOf redirection. > However, *could there be any situation where you would like to respect the > process redirection indeed in #handleError:?* (highlighting this as the open > key question of this thread) > We did not find a plausible example, the only case I could imagine is the > following situation (which, admittedly, is not an every-day use case): > > Debug the expression "self halt", step down until in StandardToolSet > class>>handleError:, step into #activeProcess and then step over repeatedly > until #debug:title: is sent. > In Trunk, this opens a second debugger on the same process. When using > #basicActiveProcess, however, the first debugger stops working (dead > process). > > > So, your comments and thoughts are important: How would you think about the > proposed #basicActiveProcess solution? Do you see any scenario where the > onBehalfOf redirection needs to be perpetuated in ToolSet >> #handleError:? > Or would you prefer another approach to fix the problem? > Looking forward to an interesting discussion! :-) > > Best, > Christoph Eliot _,,,^..^,,,_ (phone) -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 2 09:26:18 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 2 Nov 2020 09:26:18 +0000 Subject: [squeak-dev] The Inbox: EToys-kfr.414.mcz In-Reply-To: References: Message-ID: Hi Karl, iirc, in Morphic code you should prefer self currentWorld over Project current world. See these guidelines by Marcel: http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-tp5121690p5123334.html :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Samstag, 31. Oktober 2020 20:59:05 An: squeak-dev at lists.squeakfoundation.org Betreff: [squeak-dev] The Inbox: EToys-kfr.414.mcz A new version of EToys was added to project The Inbox: http://source.squeak.org/inbox/EToys-kfr.414.mcz ==================== Summary ==================== Name: EToys-kfr.414 Author: kfr Time: 31 October 2020, 8:58:48.943742 pm UUID: 5e186cb9-67d7-124d-901e-ae50d4bacbe8 Ancestors: EToys-eem.413 self world returns nil when the morph is not visible/ opened yet =============== Diff against EToys-eem.413 =============== Item was changed: ----- Method: CategoryViewer>>assureCategoryFullyVisible (in category '*Etoys-Squeakland-categories') ----- assureCategoryFullyVisible "Keep deleting categoryviewers other than the receiver until the receiver is fully visible." | ready toDelete | ready := false. + [(self bounds bottom > Project current world bottom) and: [ready not]] whileTrue: [ - [(self bounds bottom > self world bottom) and: [ready not]] whileTrue: [ owner submorphs size > 2 ifTrue: [ toDelete := owner submorphs allButFirst reversed detect: [:cv | cv ~~ self] ifNone: [^ self]. toDelete delete. self world doOneCycleNow] ifFalse: [ ready := true]].! -------------- next part -------------- An HTML attachment was scrubbed... URL: From gettimothy at zoho.com Mon Nov 2 13:07:04 2020 From: gettimothy at zoho.com (gettimothy) Date: Mon, 02 Nov 2020 08:07:04 -0500 Subject: [squeak-dev] sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory Message-ID: <175891177c2.127859da92689.6927504194758103623@zoho.com> Hi folks. I have a rather large 5.5G image that will run for a time and then throw the error in the subject line. I suspect I have too many apps in it, but I figured I would run it by the board first. Squeak6.0alpha-19802-64bit.image vm is ./squeak6.0alpha/bin/squeak -version 5.0-202003021730  Tue Mar  3 08:27:37 UTC 2020 clang [Production Spur 64-bit VM] CoInterpreter VMMaker.oscog-nice.2715 uuid: 78e2f556-9829-42fe-963d-e19dfc43c0e9 Mar  3 2020 StackToRegisterMappingCogit VMMaker.oscog-eem.2719 uuid: e40f3e94-3a54-411b-9613-5d19114ea131 Mar  3 2020 VM: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Mon Mar 2 18:30:55 2020 CommitHash: 6a0bc96 Plugins: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Linux travis-job-16fcd698-43db-40d8-82c2-9f02c4a1c566 4.15.0-1028-gcp #29~16.04.1-Ubuntu SMP Tue Feb 12 16:31:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux plugin path: /home/wm/usr/src/BigFork/infogalactic/squeak/squeak6.0alpha/bin/ [default: /home/wm/usr/src/BigFork/infogalactic/squeak/squeak6.0alpha/bin/] cordially, t -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 13:26:59 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 13:26:59 0000 Subject: [squeak-dev] The Trunk: Morphic-mt.1709.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1709.mcz ==================== Summary ==================== Name: Morphic-mt.1709 Author: mt Time: 2 November 2020, 2:26:52.294816 pm UUID: 0fd8180a-3b57-1b48-8292-3d6e2d45adc8 Ancestors: Morphic-mt.1708 Adds an is-check for the drag-and-drop helper TransferMorph, which is the check usually needed to discriminate between "has meta data" or "drop morph as is" in all kinds of tools and widgets. =============== Diff against Morphic-mt.1708 =============== Item was added: + ----- Method: Morph>>isTransferMorph (in category 'testing') ----- + isTransferMorph + + ^ false! Item was changed: ----- Method: TextMorphForEditView>>wantsDroppedMorph:event: (in category 'dropping/grabbing') ----- wantsDroppedMorph: aMorph event: evt ^ ((super wantsDroppedMorph: aMorph event: evt) + and: [aMorph isTransferMorph]) - and: [aMorph isKindOf: TransferMorph]) and: [aMorph passenger isString or: [aMorph passenger isText]]! Item was added: + ----- Method: TransferMorph>>isTransferMorph (in category 'testing') ----- + isTransferMorph + + ^ true! From commits at source.squeak.org Mon Nov 2 13:27:38 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 13:27:38 0000 Subject: [squeak-dev] The Trunk: Tools-mt.1015.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.1015.mcz ==================== Summary ==================== Name: Tools-mt.1015 Author: mt Time: 2 November 2020, 2:27:36.057816 pm UUID: 47544cd1-c6a1-8146-aa8b-82aa9658ff93 Ancestors: Tools-tpr.1014 Complements Morphic-mt.1709. Thanks to Christoph (ct)! =============== Diff against Tools-tpr.1014 =============== Item was changed: ----- Method: Workspace>>wantsDroppedMorph:event:inMorph: (in category 'drag and drop') ----- wantsDroppedMorph: dropee event: evt inMorph: target + ^ acceptDroppedMorphs or: [dropee isTransferMorph] - ^ acceptDroppedMorphs or: [dropee isKindOf: TransferMorph] ! From commits at source.squeak.org Mon Nov 2 13:28:07 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 13:28:07 0000 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.269.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.269.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.269 Author: mt Time: 2 November 2020, 2:28:06.554816 pm UUID: 305f872b-8971-d743-af47-f0aef148f1e7 Ancestors: ToolBuilder-Morphic-mt.268 Complements Morphic-mt.1709. Thanks to Christoph (ct)! =============== Diff against ToolBuilder-Morphic-mt.268 =============== Item was changed: ----- Method: PluggableListMorphPlus>>wantsDroppedMorph:event: (in category 'drag and drop') ----- wantsDroppedMorph: aTransferMorph event: anEvent dropItemSelector ifNil: [^ false]. + aTransferMorph isTransferMorph ifFalse: [^ false]. - (aTransferMorph isKindOf: TransferMorph) ifFalse: [^ false]. wantsDropSelector ifNil: [^ true]. ^ model perform: wantsDropSelector withEnoughArguments: { aTransferMorph passenger. aTransferMorph dragTransferType. aTransferMorph source. aTransferMorph}! Item was changed: ----- Method: PluggableTreeMorph>>wantsDroppedMorph:event: (in category 'drag and drop') ----- wantsDroppedMorph: aTransferMorph event: anEvent dropItemSelector ifNil: [^ false]. wantsDropSelector ifNil: [^ true]. + aTransferMorph isTransferMorph ifFalse: [^ false]. - (aTransferMorph isKindOf: TransferMorph) ifFalse: [^ false]. ^ model perform: wantsDropSelector withEnoughArguments: { aTransferMorph passenger. aTransferMorph dragTransferType. aTransferMorph source. aTransferMorph}! From commits at source.squeak.org Mon Nov 2 13:42:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 13:42:55 0000 Subject: [squeak-dev] The Trunk: System-mt.1187.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1187.mcz ==================== Summary ==================== Name: System-mt.1187 Author: mt Time: 2 November 2020, 2:42:51.691816 pm UUID: fb19b021-de9d-284a-bdea-0d3fd23508c4 Ancestors: System-tpr.1186 Minor code clean-up. Thanks to Christoph (ct)! =============== Diff against System-tpr.1186 =============== Item was changed: ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') ----- chooseServiceFrom: aCollection + "private - choose a service from aCollection asking the user if needed" + ^ aCollection size = 1 - "private - choose a service from aCollection asking the user if needed" - ^aCollection size = 1 ifTrue: [aCollection anyOne] + ifFalse: [UIManager default + chooseFrom: (aCollection collect: [:each | each label]) - ifFalse:[UIManager default - chooseFrom: (aCollection collect:[:each| each label]) values: aCollection title: 'You dropped a file. Please choose a service:' translated withCRs].! Item was changed: ----- Method: DefaultExternalDropHandler>>handle:in:dropEvent: (in category 'event handling') ----- handle: dropStream in: pasteUp dropEvent: anEvent "the file was just droped, let's do our job" | fileName services chosen | fileName := dropStream name. services := self servicesForFileNamed: fileName. + - "no service, default behavior" + services ifEmpty: [ + ^ UIManager default edit: dropStream contentsOfEntireFile]. + - services isEmpty - ifTrue: [^UIManager default edit: dropStream contentsOfEntireFile]. - chosen := self chooseServiceFrom: services. + chosen ifNotNil: [chosen performServiceFor: dropStream].! - chosen ifNotNil:[chosen performServiceFor: dropStream]! Item was changed: ----- Method: DefaultExternalDropHandler>>servicesForFileNamed: (in category 'private') ----- servicesForFileNamed: aString + "private - answer a collection of file-services for the file named aString" + + ^ (FileServices itemsForFile: aString) + copyWithoutAll: self unwantedSelectors! - "private - answer a collection of file-services for the file named - aString" - | allServices | - allServices := FileServices itemsForFile: aString. - ^ allServices - reject: [:svc | self unwantedSelectors includes: svc selector]! From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 2 13:54:41 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 2 Nov 2020 13:54:41 +0000 Subject: [squeak-dev] The Trunk: System-mt.1187.mcz In-Reply-To: References: Message-ID: Thanks for merging! This was a duplicate of System-ct.1156 (inbox), or are there any differences? :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Montag, 2. November 2020 14:42:55 An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org Betreff: [squeak-dev] The Trunk: System-mt.1187.mcz Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1187.mcz ==================== Summary ==================== Name: System-mt.1187 Author: mt Time: 2 November 2020, 2:42:51.691816 pm UUID: fb19b021-de9d-284a-bdea-0d3fd23508c4 Ancestors: System-tpr.1186 Minor code clean-up. Thanks to Christoph (ct)! =============== Diff against System-tpr.1186 =============== Item was changed: ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') ----- chooseServiceFrom: aCollection + "private - choose a service from aCollection asking the user if needed" + ^ aCollection size = 1 - "private - choose a service from aCollection asking the user if needed" - ^aCollection size = 1 ifTrue: [aCollection anyOne] + ifFalse: [UIManager default + chooseFrom: (aCollection collect: [:each | each label]) - ifFalse:[UIManager default - chooseFrom: (aCollection collect:[:each| each label]) values: aCollection title: 'You dropped a file. Please choose a service:' translated withCRs].! Item was changed: ----- Method: DefaultExternalDropHandler>>handle:in:dropEvent: (in category 'event handling') ----- handle: dropStream in: pasteUp dropEvent: anEvent "the file was just droped, let's do our job" | fileName services chosen | fileName := dropStream name. services := self servicesForFileNamed: fileName. + - "no service, default behavior" + services ifEmpty: [ + ^ UIManager default edit: dropStream contentsOfEntireFile]. + - services isEmpty - ifTrue: [^UIManager default edit: dropStream contentsOfEntireFile]. - chosen := self chooseServiceFrom: services. + chosen ifNotNil: [chosen performServiceFor: dropStream].! - chosen ifNotNil:[chosen performServiceFor: dropStream]! Item was changed: ----- Method: DefaultExternalDropHandler>>servicesForFileNamed: (in category 'private') ----- servicesForFileNamed: aString + "private - answer a collection of file-services for the file named aString" + + ^ (FileServices itemsForFile: aString) + copyWithoutAll: self unwantedSelectors! - "private - answer a collection of file-services for the file named - aString" - | allServices | - allServices := FileServices itemsForFile: aString. - ^ allServices - reject: [:svc | self unwantedSelectors includes: svc selector]! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 2 13:56:17 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 14:56:17 +0100 Subject: [squeak-dev] The Trunk: System-mt.1187.mcz In-Reply-To: References: Message-ID: I am just processing your recent drag-and-drop changest. Best, Marcel Am 02.11.2020 14:54:50 schrieb Thiede, Christoph : Thanks for merging! This was a duplicate of System-ct.1156 (inbox), or are there any differences? :-) Best, Christoph [http://www.hpi.de/] Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Montag, 2. November 2020 14:42:55 An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org Betreff: [squeak-dev] The Trunk: System-mt.1187.mcz   Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1187.mcz [http://source.squeak.org/trunk/System-mt.1187.mcz] ==================== Summary ==================== Name: System-mt.1187 Author: mt Time: 2 November 2020, 2:42:51.691816 pm UUID: fb19b021-de9d-284a-bdea-0d3fd23508c4 Ancestors: System-tpr.1186 Minor code clean-up. Thanks to Christoph (ct)! =============== Diff against System-tpr.1186 =============== Item was changed:   ----- Method: DefaultExternalDropHandler>>chooseServiceFrom: (in category 'private') -----   chooseServiceFrom: aCollection +        "private - choose a service from aCollection asking the user if needed" +        ^ aCollection size = 1 -        "private - choose a service from aCollection asking the user if  needed" -        ^aCollection size = 1                  ifTrue: [aCollection anyOne] +                ifFalse: [UIManager default +                        chooseFrom: (aCollection collect: [:each | each label]) -                ifFalse:[UIManager default -                        chooseFrom: (aCollection collect:[:each| each label])                          values: aCollection                          title: 'You dropped a file. Please choose a service:' translated withCRs].! Item was changed:   ----- Method: DefaultExternalDropHandler>>handle:in:dropEvent: (in category 'event handling') -----   handle: dropStream in: pasteUp dropEvent: anEvent          "the file was just droped, let's do our job"          | fileName services chosen |          fileName := dropStream name.          services := self servicesForFileNamed: fileName. +        -          "no service, default behavior" +        services ifEmpty: [ +                ^ UIManager default edit: dropStream contentsOfEntireFile]. +        -        services isEmpty -                ifTrue: [^UIManager default edit: dropStream contentsOfEntireFile]. -          chosen := self chooseServiceFrom: services. +        chosen ifNotNil: [chosen performServiceFor: dropStream].! -        chosen ifNotNil:[chosen performServiceFor: dropStream]! Item was changed:   ----- Method: DefaultExternalDropHandler>>servicesForFileNamed: (in category 'private') -----   servicesForFileNamed: aString +        "private - answer a collection of file-services for the file named aString" + +        ^ (FileServices itemsForFile: aString) +                copyWithoutAll: self unwantedSelectors! -        "private - answer a collection of file-services for the file named  -        aString" -        | allServices | -        allServices := FileServices itemsForFile: aString. -        ^ allServices -                reject: [:svc | self unwantedSelectors includes: svc selector]! -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 15:37:21 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 15:37:21 0000 Subject: [squeak-dev] The Trunk: Morphic-mt.1710.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1710.mcz ==================== Summary ==================== Name: Morphic-mt.1710 Author: mt Time: 2 November 2020, 4:37:15.795816 pm UUID: c0f2f967-9599-0d4b-831a-be2df0cb9b1e Ancestors: Morphic-mt.1709 Let file-drag/drop events from the host system arrive as regular (in-image) drag/drop events for a uniform look-and-feel. Thanks to Christoph (ct)! For backwards compatibility, DropFilesEvent stays functional until the package 60Deprecated is unloaded. Users should move away from Morph >> #(handle|wants|.)dropFiles to use #acceptDroppingMorph:event: (etc.) and check #dragTransferType for #filesAndDirectories. Note that, in the long term, this unification (to always use DropEvent) makes sense because it will help extract event handling from Morphic to a more generic, object-oriented, GUI-framework-agnostic mechanism to be used in -- for example -- Morphic, MVC, and SqueakShell. =============== Diff against Morphic-mt.1709 =============== Item was removed: - DropEvent subclass: #DropFilesEvent - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Morphic-Events'! Item was removed: - ----- Method: DropFilesEvent>>sentTo: (in category 'dispatching') ----- - sentTo: anObject - "Dispatch the receiver into anObject" - self type == #dropFilesEvent ifTrue:[^anObject handleDropFiles: self].! Item was removed: - ----- Method: DropFilesEvent>>type (in category 'accessing') ----- - type - ^#dropFilesEvent! Item was changed: Morph subclass: #HandMorph + instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler targetOffset lastMouseEvent damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter externalDropMorph' - instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler targetOffset lastMouseEvent damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats MinimalWheelDelta 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 added: + ----- Method: HandMorph>>cleanUp: (in category 'initialize-release') ----- + cleanUp: aggressive + + aggressive ifTrue: [ + externalDropMorph := nil].! Item was added: + ----- Method: HandMorph>>collectDropFilesAndDirectories: (in category 'private events') ----- + collectDropFilesAndDirectories: numFiles + + ^ (1 to: numFiles) collect: [:index | + (FileDirectory requestDropDirectory: index) + ifNil: [FileStream requestDropStream: index]]! 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]. - (anEvent isMouseUp and:[aMorph shouldDropOnMouseUp not]) ifTrue:[^self]. + "Note: For robustness in drag and drop handling, we remove the morph BEFORE we drop it, but we keep its 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." - "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]. - 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" event wasHandled ifFalse: [aMorph rejectDropMorphEvent: event] ] ensure: [ aMorph owner == self ifTrue: [aMorph delete] ]. self mouseOverHandler processMouseOver: anEvent.! Item was changed: ----- Method: HandMorph>>generateDropFilesEvent: (in category 'private events') ----- generateDropFilesEvent: evtBuf + "Generate the appropriate mouse event for the given raw event buffer." - "Generate the appropriate mouse event for the given raw event buffer" - "Note: This is still in an experimental phase and will need more work" - | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. + stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. - stamp = 0 ifTrue: [stamp := Sensor eventTimeNow]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. + buttons := MouseEvent redButton. "hacked because necessary for correct mouseMoveDragging handling" - buttons := 0. modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. + + dragType caseOf: { + [1] -> [ "dragEnter" + externalDropMorph := TransferMorph new + dragTransferType: #filesAndDirectories; + source: self; + passenger: (numFiles = 0 "Usually, numFiles and drop paths are delivered on dragDrop only. Still reserving this possibility for able host implementations." + ifTrue: [self flag: #vmCapabilityMissing. 'Unknown host content' translated] + ifFalse: [self collectDropFilesAndDirectories: numFiles]); + yourself. + + "During the drag operation, the host system is responsible for displaying the cursor." + self grabMorph: externalDropMorph. + self showTemporaryCursor: Cursor blank. + externalDropMorph bottomRight: self topLeft. "Southeast area of the cursor is blocked by drawings from the source application. Display our drop morph at the opposite corner of the cursor." ]. + [2] -> [ "dragMove" + ^ MouseMoveEvent new + setType: #mouseMove + startPoint: self position + endPoint: position + trail: "{self position. position}"(self mouseDragTrailFrom: evtBuf) + buttons: buttons + hand: self + stamp: stamp ]. + [3] -> [ "dragLeave" + externalDropMorph ifNotNil: #abandon. + externalDropMorph := nil. + self showTemporaryCursor: nil ]. + [4] -> [ "dragDrop" + | oldButtons | + externalDropMorph ifNil: [ + "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been called again (aka #launchDrop)." + ^ self error: 'Launch drop for singleton Squeak not yet implemented.']. + + self showTemporaryCursor: nil. + externalDropMorph passenger isString ifTrue: [ + self flag: #vmCapabilityMissing. "See above." + externalDropMorph passenger: (self collectDropFilesAndDirectories: numFiles)]. + externalDropMorph := nil. + + (Smalltalk classNamed: #DropFilesEvent) ifNotNil: [:eventClass | + | classicEvent | + "Generate classic DropFilesEvent, providing backward compatibility." + classicEvent := eventClass new + setPosition: position + contents: numFiles + hand: self. + self processEvent: classicEvent. + classicEvent wasHandled ifTrue: [^ nil]]. + + oldButtons := lastEventBuffer fifth + bitOr: (lastEventBuffer sixth bitShift: 3). + ^ MouseButtonEvent new + setType: #mouseUp + position: position + which: (oldButtons bitXor: buttons) + buttons: buttons + nClicks: 0 + hand: self + stamp: stamp ]. + [5] -> [ "drag request" + "For dnd out. Not properly implemented at the moment." + self shouldBeImplemented] }. + ^ nil! - dragType = 4 - ifTrue: - ["e.g., drop" - - owner borderWidth: 0. - ^DropFilesEvent new - setPosition: position - contents: numFiles - hand: self]. - "the others are currently not handled by morphs themselves" - dragType = 1 - ifTrue: - ["experimental drag enter" - - owner - borderWidth: 4; - borderColor: owner color asColor negated]. - dragType = 2 - ifTrue: - ["experimental drag move" - - ]. - dragType = 3 - ifTrue: - ["experimental drag leave" - - owner borderWidth: 0]. - ^nil! Item was changed: ----- 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.! - 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>>mouseDragTrailFrom: (in category 'private events') ----- + mouseDragTrailFrom: currentBuf + "Current event, a dragMove event buffer, is about to be processed. If there are other similar dragMove events queued up, then drop them from the queue, and report the positions inbetween. Adapted version of #mouseTrailFrom:." + + | nextEvent trail | + trail := WriteStream on: (Array new: 1). + trail nextPut: currentBuf fourth @ currentBuf fifth. + [(nextEvent := Sensor peekEvent) isNil] whileFalse: [ + nextEvent first = currentBuf first + ifFalse: [^ trail contents "different event type"]. + nextEvent third = currentBuf third + ifFalse: [^ trail contents "dragType changed"]. + nextEvent sixth = currentBuf sixth + ifFalse: [^ trail contents "modifiers changed"]. + nextEvent seventh = currentBuf seventh + ifFalse: [^ trail contents "numFiles changed"]. + "nextEvent is similar. Remove it from the queue, and check the next." + nextEvent := Sensor nextEvent. + trail nextPut: nextEvent fourth @ nextEvent fifth]. + ^ trail contents! Item was changed: ----- Method: HandMorph>>processEvents (in category 'event handling') ----- processEvents "Process user input events from the local input devices." + | evtBuf hadAny | - | evt evtBuf type hadAny | self currentEvent ~= lastMouseEvent ifTrue: [ "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 | + evt := evtBuf first "type" + caseOf: { + [EventTypeMouse] -> [self generateMouseEvent: evtBuf]. + [EventTypeMouseWheel] -> [self generateMouseWheelEvent: evtBuf]. + [EventTypeKeyboard] -> [self generateKeyboardEvent: evtBuf]. + [EventTypeDragDropFiles] -> [self generateDropFilesEvent: evtBuf]. + [EventTypeWindow] -> [self generateWindowEvent: evtBuf] } + otherwise: [nil "All other events are ignored"]. + + evt ifNotNil: [ + "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] ] ]. - [(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 = 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 ifNotNil: ["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 ifNotNil: [ "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 removed: - ----- Method: Morph>>asDraggableMorph (in category 'converting') ----- - asDraggableMorph - "Huge or complex morphs have a serious impact on performance while being dragged. Use the thumbnail version." - - ^ self thumbnail asMorph! Item was removed: - ----- Method: Morph>>dropFiles: (in category 'event handling') ----- - dropFiles: anEvent - "Handle a number of files dropped from the OS" - ! Item was removed: - ----- Method: Morph>>handleDropFiles: (in category 'events-processing') ----- - handleDropFiles: anEvent - "Handle a drop from the OS." - anEvent wasHandled ifTrue:[^self]. "not interested" - (self wantsDropFiles: anEvent) ifFalse:[^self]. - anEvent wasHandled: true. - self dropFiles: anEvent. - ! Item was removed: - ----- Method: Morph>>wantsDropFiles: (in category 'event handling') ----- - wantsDropFiles: anEvent - "Return true if the receiver wants files dropped from the OS." - ^false! Item was removed: - ----- Method: Object>>asDraggableMorph (in category '*morphic') ----- - asDraggableMorph - "Converts the receiver into a Morph suitable for dragging" - ^(StringMorph contents: ( - (self respondsTo: #dragLabel) - ifTrue:[self dragLabel] - ifFalse:[self printString])) - color: ((self userInterfaceTheme get: #textColor for: #TransferMorph) ifNil: [Color black]); - font: ((self userInterfaceTheme get: #font for: #TransferMorph) ifNil: [TextStyle defaultFont]) - yourself! Item was changed: ----- Method: PasteUpMorph>>acceptDroppingMorph:event: (in category 'dropping/grabbing') ----- acceptDroppingMorph: dropped event: evt "The supplied morph, known to be acceptable to the receiver, is now to be assimilated; the precipitating event is supplied" | aMorph | + (self isWorldMorph and: + [dropped isTransferMorph and: + [dropped dragTransferType = #filesAndDirectories]]) ifTrue: + [^ self dropFiles: dropped passenger event: evt]. + aMorph := self morphToDropFrom: dropped. self isWorldMorph + ifFalse: [super acceptDroppingMorph: aMorph event: evt] + ifTrue: + ["Add the given morph to this world and start stepping it if it wants to be." + aMorph isInWorld ifFalse: [aMorph position: evt position]. + self addMorphFront: aMorph. + (aMorph fullBounds intersects: self viewBox) ifFalse: + [Beeper beep. + aMorph position: self bounds center]]. + - ifTrue:["Add the given morph to this world and start stepping it if it wants to be." - aMorph isInWorld not ifTrue: [aMorph position: evt position]. - self addMorphFront: aMorph. - (aMorph fullBounds intersects: self viewBox) ifFalse: - [Beeper beep. aMorph position: self bounds center]] - ifFalse:[super acceptDroppingMorph: aMorph event: evt]. - aMorph submorphsDo: [:m | (m isKindOf: HaloMorph) ifTrue: [m delete]]. aMorph allMorphsDo: "Establish any penDown morphs in new world" [:m | | tfm mm | m player ifNotNil: [m player getPenDown ifTrue: [((mm := m player costume) notNil and: [(tfm := mm owner transformFrom: self) notNil]) ifTrue: [self noteNewLocation: (tfm localPointToGlobal: mm referencePosition) forPlayer: m player]]]]. + - self isPartsBin ifTrue: [aMorph isPartsDonor: true. aMorph stopSteppingSelfAndSubmorphs. aMorph suspendEventHandler] ifFalse: [self world startSteppingSubmorphsOf: aMorph]. + - " self presenter morph: aMorph droppedIntoPasteUpMorph: self." self griddingOn ifTrue: [aMorph position: (self gridPoint: aMorph position)]. self showingListView ifTrue: [self sortSubmorphsBy: (self valueOfProperty: #sortOrder). self currentWorld abandonAllHalos]. + + self bringTopmostsToFront.! - - self bringTopmostsToFront. - ! Item was removed: - ----- Method: PasteUpMorph>>dropFiles: (in category 'event handling') ----- - dropFiles: anEvent - "Handle a number of dropped files from the OS. - TODO: - - use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu) - - remember the resource location or (when in browser) even the actual file handle - " - | numFiles | - numFiles := anEvent contents. - 1 to: numFiles do: [ :i | - (FileDirectory requestDropDirectory: i) - ifNotNil: [:directory | self handleDroppedItem: directory event: anEvent] - ifNil: [(FileStream requestDropStream: i) ifNotNil: [:stream | - [self handleDroppedItem: stream event: anEvent] ensure: [stream close]]]]. - ! Item was added: + ----- Method: PasteUpMorph>>dropFiles:event: (in category 'event handling') ----- + dropFiles: filesAndDirectories event: anEvent + "Handle a number of dropped files from the OS." + + filesAndDirectories do: [ :file | + self handleDroppedItem: file event: anEvent].! Item was changed: ----- Method: PasteUpMorph>>morphToDropFrom: (in category 'dropping/grabbing') ----- morphToDropFrom: aMorph + "Given a morph being carried by the hand which the hand is about to drop, answer the actual morph to be deposited. Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service." - "Given a morph being carried by the hand, which the hand is about to drop, answer the actual morph to be deposited. Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service." | aNail representee handy posBlock | handy := self primaryHand. posBlock := [:z | | tempPos | tempPos := handy position - ((handy targetOffset - aMorph formerPosition) * (z extent / aMorph extent)) rounded. self pointFromWorld: tempPos]. self alwaysShowThumbnail ifTrue: [aNail := aMorph representativeNoTallerThan: self maxHeightToAvoidThumbnailing norWiderThan: self maximumThumbnailWidth thumbnailHeight: self heightForThumbnails. aNail == aMorph ifFalse: [aMorph formerPosition: aMorph position. aNail position: (posBlock value: aNail)]. ^aNail]. ((aMorph isKindOf: MorphThumbnail) and: [(representee := aMorph morphRepresented) owner isNil]) ifTrue: [representee position: (posBlock value: representee). ^representee]. self showingListView ifTrue: [^aMorph listViewLineForFieldList: (self valueOfProperty: #fieldListSelectors)]. (aMorph hasProperty: #newPermanentScript) ifTrue: [^aMorph asEmptyPermanentScriptor]. ((aMorph isPhraseTileMorph) or: [aMorph isSyntaxMorph]) ifFalse: [^aMorph morphToDropInPasteUp: self]. aMorph userScriptSelector isEmptyOrNil ifTrue: ["non-user" self automaticPhraseExpansion ifFalse: [^aMorph]]. ^aMorph morphToDropInPasteUp: self! Item was removed: - ----- Method: PasteUpMorph>>wantsDropFiles: (in category 'event handling') ----- - wantsDropFiles: anEvent - ^self isWorldMorph! Item was added: + ----- Method: PasteUpMorph>>wantsDroppedTransferMorph: (in category 'dropping/grabbing') ----- + wantsDroppedTransferMorph: transferMorph + + ^ self hasTransferMorphConverter + or: [transferMorph dragTransferType = #filesAndDirectories]! Item was removed: - ----- Method: Text>>asDraggableMorph (in category '*Morphic-converting') ----- - asDraggableMorph - - ^ self copy - addAttribute: (TextFontReference toFont: ((self userInterfaceTheme get: #font for: #TransferMorph) ifNil: [TextStyle defaultFont])); - asMorph! Item was added: + ----- Method: TransferMorph>>createDraggableMorph: (in category 'initialization') ----- + createDraggableMorph: anObject + + (anObject respondsTo: #asDraggableMorph) + ifTrue: [^ anObject asDraggableMorph]. + + anObject isMorph + ifTrue: ["Huge or complex morphs have a serious impact on performance while being dragged. Use the thumbnail version." + ^ anObject thumbnail asMorph]. + + anObject isText + ifTrue: [ + ^ anObject copy + addAttribute: (TextFontReference toFont: (self userInterfaceTheme font ifNil: [TextStyle defaultFont])); + asMorph]. + + ^ ((anObject respondsTo: #dragLabel) ifTrue: [anObject dragLabel] ifFalse: [anObject printString]) asMorph + color: (self userInterfaceTheme textColor ifNil: [Color black]); + font: (self userInterfaceTheme font ifNil: [TextStyle defaultFont]) + yourself + ! Item was changed: ----- Method: TransferMorph>>passenger: (in category 'accessing') ----- passenger: anObject passenger := anObject. self removeAllMorphs; + addMorph: (self createDraggableMorph: passenger); - addMorph: passenger asDraggableMorph; updateCopyIcon; setDefaultParameters.! Item was changed: ----- Method: TransferMorph>>wantsToBeDroppedInto: (in category 'dropping/grabbing') ----- wantsToBeDroppedInto: aMorph + ^ aMorph isWorldMorph + ifTrue: [aMorph wantsDroppedTransferMorph: self] + ifFalse: [super wantsToBeDroppedInto: aMorph]! - ifTrue: [ aMorph hasTransferMorphConverter ] - ifFalse: [ super wantsToBeDroppedInto: aMorph ]! Item was removed: - ----- Method: WorldState class>>cleanUp (in category 'class initialization') ----- - cleanUp - "Reset command histories" - - self allInstances do: [ :ea | ea clearCommandHistory ].! Item was added: + ----- Method: WorldState class>>cleanUp: (in category 'class initialization') ----- + cleanUp: aggressive + + self allInstancesDo: [:worldState | worldState cleanUp: aggressive].! Item was added: + ----- Method: WorldState>>cleanUp: (in category 'initialization') ----- + cleanUp: aggressive + + self clearCommandHistory. + self handsDo: [:hand | hand cleanUp: aggressive].! From commits at source.squeak.org Mon Nov 2 15:38:10 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 15:38:10 0000 Subject: [squeak-dev] The Trunk: 60Deprecated-mt.84.mcz Message-ID: Marcel Taeumel uploaded a new version of 60Deprecated to project The Trunk: http://source.squeak.org/trunk/60Deprecated-mt.84.mcz ==================== Summary ==================== Name: 60Deprecated-mt.84 Author: mt Time: 2 November 2020, 4:38:10.357816 pm UUID: 0bda9ad6-f334-ab4c-bdb2-bc8c79931c55 Ancestors: 60Deprecated-pre.83 Complements Morphic-mt.1710. =============== Diff against 60Deprecated-pre.83 =============== Item was changed: SystemOrganization addCategory: #'60Deprecated-Collections-Streams'! SystemOrganization addCategory: #'60Deprecated-HelpSystem-Core-Model'! SystemOrganization addCategory: #'60Deprecated-Kernel-Methods'! + SystemOrganization addCategory: #'60Deprecated-Morphic-Events'! SystemOrganization addCategory: #'60Deprecated-Morphic-Widgets'! SystemOrganization addCategory: #'60Deprecated-NSPlugin-System-Support'! SystemOrganization addCategory: #'60Deprecated-System-Support'! SystemOrganization addCategory: #'60Deprecated-Tools-Inspector'! SystemOrganization addCategory: #'60Deprecated-Tools-Menus'! Item was added: + DropEvent subclass: #DropFilesEvent + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: '60Deprecated-Morphic-Events'! + + !DropFilesEvent commentStamp: 'ct 10/15/2020 18:15' prior: 0! + THIS CLASS IS DEPRECATED!! The #dropFiles/#wantsDropFiles: protocol has been replaced. Use #acceptDroppingMorph:event:/#wantsDroppedMorph:event: instead and scan for dragTransferType: #filesAndDirectories.! Item was added: + ----- Method: DropFilesEvent>>sentTo: (in category 'dispatching') ----- + sentTo: anObject + "Dispatch the receiver into anObject" + self type == #dropFilesEvent ifTrue:[^anObject handleDropFiles: self].! Item was added: + ----- Method: DropFilesEvent>>type (in category 'accessing') ----- + type + ^#dropFilesEvent! Item was added: + ----- Method: Morph>>dropFiles: (in category '*60Deprecated-event handling') ----- + dropFiles: anEvent + "Handle a number of files dropped from the OS." + + self flag: #deprecated. "Use #acceptDroppingMorph:event: instead and scan for dragTransferType: #filesAndDirectories.'"! Item was added: + ----- Method: Morph>>handleDropFiles: (in category '*60Deprecated-events-processing') ----- + handleDropFiles: anEvent + "Handle a drop from the OS. Deprecated protocol. Use #handleDropMorph: instead and scan for dragTransferType: #filesAndDirectories." + anEvent wasHandled ifTrue: [^ self]. "not interested" + (self wantsDropFiles: anEvent) ifFalse: [^ self]. + anEvent wasHandled: true. + self deprecated: 'ct: #dropFiles/#wantsDropFiles: protocol is deprecated. Use #acceptDroppingMorph:event:/#wantsDroppedMorph:event: instead and scan for dragTransferType: #filesAndDirectories.'. + self dropFiles: anEvent.! Item was added: + ----- Method: Morph>>wantsDropFiles: (in category '*60Deprecated-event handling') ----- + wantsDropFiles: anEvent + "Return true if the receiver wants files dropped from the OS." + + self flag: #deprecated. "Use #wantsDroppedMorph:event: instead and scan for dragTransferType: #filesAndDirectories.'" + ^ false! From marcel.taeumel at hpi.de Mon Nov 2 15:40:23 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 16:40:23 +0100 Subject: [squeak-dev] Changeset: Enhanced integration of drag'n'drop from host In-Reply-To: References: Message-ID: Done and merged into Trunk. Best, Marcel Am 26.10.2020 07:47:02 schrieb Marcel Taeumel : Hi Christoph! This is great news! I will take a look at it and test it for the Windows platform. Best, Marcel Am 23.10.2020 14:11:28 schrieb Thiede, Christoph : Hi all! :-) I'm glad to officially submit my dropFiles changeset today, finally. It enhances the integration of drag'n'drop (DnD) events delivered by the VM from the host operating system to the image, following one of Marcel's ideas: Instead of generating separate DropFilesEvent instances, every DnD event from the VM is translated into a TransferMorph that can be dragged into every morph or tool like every other Morph of TransferMorph, too. What is the goal of this changeset? This design change entails two key advantages: First, every dragged host element is represented by a first-class object (which is a TransferMorph) instance. Second, as a consequence, applications do no longer need to implement a separate protocol for handling host DnDs (which was #dropFiles:/#wantsDropFiles:) but only need to provide one single proper implementation of #acceptDroppingMorph:event:/#wantsDroppedTransferMorph:. In particular, this also enables developers who use the ToolBuilder(Spec) framework to handle contents dropped from the host system since the old dropFiles protocol was never forwarded to the ToolBuilder framework. How does it work? There have already been complete implementations of the DropPlugin on the VM side for all important platforms (Windows, Linux, and macOS) for a long time (almost 20 years ...) which record four different types of drag events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, until now, only the last of them, #dragDrop, has been handled on the image side (see HandMorph >> #generateDropFilesEvent:). The main work of this changeset can be found in just this method where I added support for the other drag types in order to create, move, and release a TransferMorph accordingly. Other changes include: * Deprecated, but kept working the old DropFilesEvent protocol (these events are still processed, but a DeprecationWarning is signaled if any morph actually handles them). * Migrated the only implementation of the old dropFiles protocol, which is PasteUpMorph, to the unified TransferMorph protocol. * Introduced a new event class + protocol for SystemLaunchEvent (aka #launchDrop) which is generated by a singleton VM when it has been invoked with a new image file (see class comment). That #launchDrop is a curious hack on the VM side to reuse the DnD protocol but has completely different semantics that now are separated on the image side. * Implemented the SystemLaunchEvent protocol on PasteUpMorph. Besides the changeset, I have also fixed a few minor inconsistencies with several VM-specific implementations in the OpenSmalltalk-VM repository (see #508 [https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508], #514 [https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514], and #518 [https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/518]) that have already been merged (thanks to all reviewers!). What's the current state of the changeset? I have successfully tested the changeset on Windows (Win 2004) and Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. However, I do not have any possibility to test it on the OSVM implementations for macOS and iOS, so your help and feedback especially for these platforms will be greatly appreciated! Please see the attached demo video on how to test the changeset: Simply drag some files into an inspector field or a workspace and you should receive a list of FileStreams and/or FileDirectories. Also, aborting a drag operation should not fail, i.e. drag a file over the image but then drop the file in another window. What's next? There is much more potential for a comfortable host DnD integration! Concretely, I am having two downstream goals in mind: First, dropping other content types besides files and/or directories in your image, such as texts or images (currently, the DropPlugin implementations that I could try out are restricted to the former two types). Second, dragging objects out of the VM to save them as a file, or even better, to drop them in a second image! Vanessa has told me [https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655021654] that this was even possible in the past for certain platforms, but unfortunately, the relevant code appears to be dead nowadays. Nevertheless, I have stumbled upon a lot of stubs for both features in the DropPlugin and HandMorph code, and I'm looking forward to reviving them in some interesting follow-up projects! Which related contributions/discussions are there else? * System-ct.1156 (Inbox, fixes double prompt for handling a dropped file when the first dialog was canceled; not included in the changeset) * [squeak-dev] Re: Please try out | Inspector Refactoring =) [http://forum.world.st/Please-try-out-Inspector-Refactoring-tp5114974p5116422.html] (the thread contains some interesting brainstorming about MIME type support for dragging inside the image) Please test and review! And many thanks to Marcel for his helpful tips! Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 133740 bytes Desc: not available URL: From eliot.miranda at gmail.com Mon Nov 2 15:50:25 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 2 Nov 2020 07:50:25 -0800 Subject: [squeak-dev] sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory In-Reply-To: <175891177c2.127859da92689.6927504194758103623@zoho.com> References: <175891177c2.127859da92689.6927504194758103623@zoho.com> Message-ID: <9741911C-C214-4BAB-84A9-39B5E1EF8145@gmail.com> Hi Timothy, a few weeks ago debugging an issue raised by Andrei Chis I ran a test runner in the simulator and the out of memory test it included caused the simulator to grow its central byte array to 17Gb. When I saved the image it was 34Gb. The workflow threw up a policy error. The VM would not shrink memory unless it had done a GC but once it had 17 Gb of free space it wasn’t going to do a GC. So I updated the vm and fixed the policy error and now the vm will happily shrink back after growing yo many gigabytes. This is all just to point out that a match 3rd vm is a tad on the old side. BTW, how much ram do you have on your system? The vm will happily use all of it and more unless you set an upper bound on the size of memory (command line and vm parameter). _,,,^..^,,,_ (phone) > On Nov 2, 2020, at 5:07 AM, gettimothy via Squeak-dev wrote: > >  > Hi folks. > > I have a rather large 5.5G image that will run for a time and then throw the error in the subject line. > > I suspect I have too many apps in it, but I figured I would run it by the board first. > > > Squeak6.0alpha-19802-64bit.image > > vm is > > ./squeak6.0alpha/bin/squeak -version > 5.0-202003021730 Tue Mar 3 08:27:37 UTC 2020 clang [Production Spur 64-bit VM] > CoInterpreter VMMaker.oscog-nice.2715 uuid: 78e2f556-9829-42fe-963d-e19dfc43c0e9 Mar 3 2020 > StackToRegisterMappingCogit VMMaker.oscog-eem.2719 uuid: e40f3e94-3a54-411b-9613-5d19114ea131 Mar 3 2020 > VM: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git > Date: Mon Mar 2 18:30:55 2020 CommitHash: 6a0bc96 > Plugins: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git > Linux travis-job-16fcd698-43db-40d8-82c2-9f02c4a1c566 4.15.0-1028-gcp #29~16.04.1-Ubuntu SMP Tue Feb 12 16:31:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux > plugin path: /home/wm/usr/src/BigFork/infogalactic/squeak/squeak6.0alpha/bin/ [default: /home/wm/usr/src/BigFork/infogalactic/squeak/squeak6.0alpha/bin/] > > cordially, > > t > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 16:02:38 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 16:02:38 0000 Subject: [squeak-dev] The Trunk: EToys-mt.414.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.414.mcz ==================== Summary ==================== Name: EToys-mt.414 Author: mt Time: 2 November 2020, 5:02:31.547788 pm UUID: 4ace51ba-f0be-044c-8710-9d6a2c4bfbc1 Ancestors: EToys-eem.413 Do the most basic installs so Etoys appears with right icons. A few more icons for BookMorph. Thanks to Karl (kfr)! =============== Diff against EToys-eem.413 =============== Item was changed: ----- Method: CategoryViewer>>assureCategoryFullyVisible (in category '*Etoys-Squeakland-categories') ----- assureCategoryFullyVisible "Keep deleting categoryviewers other than the receiver until the receiver is fully visible." | ready toDelete | ready := false. + [(self bounds bottom > self currentWorld bottom) and: [ready not]] whileTrue: [ - [(self bounds bottom > self world bottom) and: [ready not]] whileTrue: [ owner submorphs size > 2 ifTrue: [ toDelete := owner submorphs allButFirst reversed detect: [:cv | cv ~~ self] ifNone: [^ self]. toDelete delete. self world doOneCycleNow] ifFalse: [ ready := true]].! Item was added: + ----- Method: ReleaseBuilderSqueakland class>>loadMostUsedEtoysForms (in category 'preparing') ----- + loadMostUsedEtoysForms + "Add most used Etoy icons to ScriptingSystem formDictionary." + + "ReleaseBuilderSqueakland loadMostUsedEtoysForms" + + "RoundGoldBox, TryItPressed, TryIt, MenuIcon, AddCategoryViewer, AddInstanceVariable, TanOPressed, TanO, Gets, RightCaret, DownCaret, NextPage, NextPagePressed, PrevPage, PrevPagePressed" + + | assoc | + #(scriptingSystemImage109 scriptingSystemImage127 scriptingSystemImage064 scriptingSystemImage038 scriptingSystemImage165 scriptingSystemImage171 scriptingSystemImage014 scriptingSystemImage053 scriptingSystemImage080 scriptingSystemImage044 scriptingSystemImage023 scriptingSystemImage032 scriptingSystemImage107 scriptingSystemImage153) + do: [:sym | + assoc := (self perform: sym). + ScriptingSystem saveForm: assoc value atKey: assoc key].! From commits at source.squeak.org Mon Nov 2 16:04:07 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 16:04:07 0000 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.214.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.214.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.214 Author: mt Time: 2 November 2020, 5:04:06.718788 pm UUID: 21106749-548f-064d-9d8d-70e620a355b4 Ancestors: ReleaseBuilder-mt.213 Improve first impression of Etoys features, which are always accessible through a morph's halo. Thanks to Karl (kfr) for taking care! =============== Diff against ReleaseBuilder-mt.213 =============== Item was added: + ----- Method: ReleaseBuilder class>>beautifyEtoys (in category 'scripts - ui') ----- + beautifyEtoys + "If users invoke Etoys features without preparing the system's look-and-feel via #setEtoysMode, some icons look strange. Fix that to improve the first impression." + + (self environment classNamed: #ReleaseBuilderSqueakland) + ifNotNil: [:builder | builder loadMostUsedEtoysForms].! Item was changed: ----- Method: ReleaseBuilder class>>configureTools (in category 'scripts') ----- configureTools "Initialize well-known tools and other resources." FileList initialize. FileServices initialize. "register file reader services" RealEstateAgent standardSize: 600 @ 400. SMLoaderPlus setDefaultFilters: #(filterSafelyAvailable). + self beautifyEtoys. + "Default applications and tools." SystemBrowser default: Browser. MailSender default: nil. SoundService default: BaseSoundSystem. ToolSet default: StandardToolSet. WebBrowser default: nil. ! From marcel.taeumel at hpi.de Mon Nov 2 16:05:21 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 17:05:21 +0100 Subject: [squeak-dev] The Inbox: EToys-kfr.412.mcz In-Reply-To: References: <1C318624-9DFB-44DE-A32C-AAB72F753F02@rowledge.org> Message-ID: Hi Karl, done and already merged into Trunk. Next build artifacts on files.squeak.org will have those icons loaded. Thanks! Marcel Am 30.10.2020 19:18:01 schrieb karl ramberg :  It loads these just the most used forms and so it should be fine for standard image. It makes etoys and BookMorph look ok. It should be called from ReleaseBuilder. But I'm not sure where to trigger the loading. Here are a list of the forms: "RoundGoldBox, TryItPressed, TryIt, MenuIcon, AddCategoryViewer, AddInstanceVariable, TanOPressed, TanO, Gets, RightCaret, DownCaret, NextPage, NextPagePressed, PrevPage, PrevPagePressed" On Fri, Oct 30, 2020 at 7:13 PM karl ramberg wrote: I made a method that load the most essential Etoy Icons so Etoys look ok even in standard Squeak. On Fri, Oct 30, 2020 at 7:07 PM Marcel Taeumel wrote: > I'm not sure where in ReleaseBuilder to hook up the initialization of the Etoy icons. Any suggestions? You mean after or even before calling "ReleaseBuilderSqueakland setEtoysMode"? Best, Marcel Am 30.10.2020 19:04:25 schrieb karl ramberg : Cool. I'll revise the other changes once I have time. I'm not sure where in ReleaseBuilder to hook up the initialization of the Etoy icons. Any suggestions? Best, Karl On Thu, Oct 29, 2020 at 5:06 PM Marcel Taeumel wrote: Hi Karl. > Removed from inbox now Just meant that for contributions to come. ^.^' Sorry for the mix up.  Would you re-upload the contents from: EToys-kfr.413 EToys-kfr.412 EToys-kfr.392 (I managed to merge Etoys-kfr.377 up to 380 from my local package-cache.) Best, Marcel Am 21.10.2020 20:30:28 schrieb karl ramberg : Removed from inbox now Best, Karl On Wed, Oct 21, 2020 at 6:12 PM Marcel Taeumel wrote: Hi Karl, please do not chain unprocessed inbox items in the ancestry. This way, we can never copy over your versions but always have to re-commit your changes method-by-method. Instead, base your changes on the most recent Trunk version. EToys-kfr.413 (inbox) needs kfr.412 (inbox) but is unrelated EToys-kfr.412 (inbox) needs kfr.392 (inbox) and eem.411 (trunk) EToys-kfr.392 (inbox) needs kfr.378 (inbox) and mt.391 (trunk) ... Yes, we will see to merge your EToys contributions ASAP. Thanks! ^__^ Best, Marcel Am 17.10.2020 20:03:09 schrieb tim Rowledge : > On 2020-10-17, at 9:03 AM, commits at source.squeak.org [mailto:commits at source.squeak.org] wrote: > > self world can return nil That is somehow both deeply philosophical and sad tim -- tim Rowledge; tim at rowledge.org [mailto:tim at rowledge.org]; http://www.rowledge.org/tim [http://www.rowledge.org/tim] Useful random insult:- Settled some during shipping and handling. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gettimothy at zoho.com Mon Nov 2 16:06:16 2020 From: gettimothy at zoho.com (gettimothy) Date: Mon, 02 Nov 2020 11:06:16 -0500 Subject: [squeak-dev] sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory Message-ID: <17589b58606.c46ba8835469.6251398448268406543@zoho.com> Hi Eliot, Hi Timothy,     a few weeks ago debugging an issue raised by Andrei Chis I ran a test runner in the simulator and the out of memory test it included caused the simulator to grow its central byte array to 17Gb.  When I saved the image it was 34Gb.  The workflow threw up a policy error.  The VM would not shrink memory unless it had done a GC but once it had 17 Gb of free space it wasn’t going to do a GC.  So I updated the vm and fixed the policy error and now the vm will happily shrink back after growing yo many gigabytes. This is all just to point out that a match 3rd vm is a tad on the old side. Thx, I will upgrade the VM ASAP. BTW, how much ram do you have on your system? .free -h               total        used        free      shared  buff/cache   available Mem:           6.7G        6.0G        225M        1.0M        506M        358M Swap:            0B          0B          0B The vm will happily use all of it and more unless you set an upper bound on the size of memory (command line and vm parameter) ./squeak6.0alpha/bin/squeak  --headless  --memory 3000 squeak6.0alpha/shared/Squeak6.0alpha-19802-64bit.image & is the command I use. I am not sure what the '3000' refers to, I am assuming it is 3G. thanks for your help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 2 16:06:29 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 17:06:29 +0100 Subject: [squeak-dev] The Inbox: EToys-kfr.414.mcz In-Reply-To: References: Message-ID: Treated and in Trunk. Best, Marcel Am 02.11.2020 10:26:31 schrieb Thiede, Christoph : Hi Karl, iirc, in Morphic code you should prefer self currentWorld over Project current world. See these guidelines by Marcel: http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-tp5121690p5123334.html [http://forum.world.st/Changeset-Eliminating-global-state-from-Morphic-tp5121690p5123334.html] :-) Best, Christoph [http://www.hpi.de/] Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Samstag, 31. Oktober 2020 20:59:05 An: squeak-dev at lists.squeakfoundation.org Betreff: [squeak-dev] The Inbox: EToys-kfr.414.mcz   A new version of EToys was added to project The Inbox: http://source.squeak.org/inbox/EToys-kfr.414.mcz [http://source.squeak.org/inbox/EToys-kfr.414.mcz] ==================== Summary ==================== Name: EToys-kfr.414 Author: kfr Time: 31 October 2020, 8:58:48.943742 pm UUID: 5e186cb9-67d7-124d-901e-ae50d4bacbe8 Ancestors: EToys-eem.413 self world returns nil when the morph is not visible/ opened yet =============== Diff against EToys-eem.413 =============== Item was changed:   ----- Method: CategoryViewer>>assureCategoryFullyVisible (in category '*Etoys-Squeakland-categories') -----   assureCategoryFullyVisible          "Keep deleting categoryviewers other than the receiver  until the receiver is fully visible."            | ready toDelete |          ready := false. +        [(self bounds bottom > Project current world bottom) and: [ready not]] whileTrue: [ -        [(self bounds bottom > self world bottom) and: [ready not]] whileTrue: [                  owner submorphs size > 2                          ifTrue: [                                  toDelete := owner submorphs allButFirst reversed                                          detect: [:cv | cv ~~ self]                                          ifNone: [^ self].                                  toDelete delete.                                  self world doOneCycleNow]                          ifFalse: [                                  ready := true]].! -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 16:10:00 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 16:10:00 0000 Subject: [squeak-dev] The Trunk: Services-Base-mt.70.mcz Message-ID: Marcel Taeumel uploaded a new version of Services-Base to project The Trunk: http://source.squeak.org/trunk/Services-Base-mt.70.mcz ==================== Summary ==================== Name: Services-Base-mt.70 Author: mt Time: 2 November 2020, 5:09:59.542788 pm UUID: 1ed9981b-d99a-6a46-9dc2-8e5c9235b1db Ancestors: Services-Base-mt.69, Services-Base-cmfcmf.69 Merged. =============== Diff against Services-Base-mt.69 =============== Item was changed: ----- Method: Browser>>browseReference: (in category '*services-base') ----- browseReference: ref + self okToChange ifTrue: [ self selectCategoryForClass: ref actualClass theNonMetaClass. self selectClass: ref actualClass theNonMetaClass . + ref actualClass isMeta ifTrue: [self indicateClassMessages] ifFalse: [self indicateInstanceMessages]. - ref actualClass isMeta ifTrue: [self indicateClassMessages]. self changed: #classSelectionChanged. self selectMessageCategoryNamed: ref category. self selectedMessageName: ref methodSymbol. ]! From commits at source.squeak.org Mon Nov 2 16:10:02 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 16:10:02 0000 Subject: [squeak-dev] The Trunk: Services-Base-cmfcmf.69.mcz Message-ID: Marcel Taeumel uploaded a new version of Services-Base to project The Trunk: http://source.squeak.org/trunk/Services-Base-cmfcmf.69.mcz ==================== Summary ==================== Name: Services-Base-cmfcmf.69 Author: cmfcmf Time: 30 October 2020, 3:19:26.82353 pm UUID: 8f518c2e-77bb-cc40-a4ff-524c896eabc6 Ancestors: Services-Base-jr.68 Indicate instance messages when instance-side reference is browsed. Otherwise the browser may reach an invalid state, where the class button is still selected, even though an instance message is browsed: b := Browser open. b browseReference: (Color >> #asColor) asCodeReference. b browseReference: (Color class >> #green) asCodeReference. b browseReference: (Color >> #asColor) asCodeReference. =============== Diff against Services-Base-jr.68 =============== Item was changed: ----- Method: Browser>>browseReference: (in category '*services-base') ----- browseReference: ref + self okToChange ifTrue: [ self selectCategoryForClass: ref actualClass theNonMetaClass. self selectClass: ref actualClass theNonMetaClass . + ref actualClass isMeta ifTrue: [self indicateClassMessages] ifFalse: [self indicateInstanceMessages]. - ref actualClass isMeta ifTrue: [self indicateClassMessages]. self changed: #classSelectionChanged. self selectMessageCategoryNamed: ref category. self selectedMessageName: ref methodSymbol. ]! From marcel.taeumel at hpi.de Mon Nov 2 16:17:29 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 17:17:29 +0100 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: Hi Tim. > Dare I ask why it tries to set a property on a method? A cache because package-name lookup for methods is expensive: m := Morph >> #drawOn:. [PackageOrganizer default packageOfMethod: m methodReference ifNone: []] bench. --- '3,580 per second. 279 microseconds per run. 0.41983 % GC time.' Almost as expensive as that not optimized #translatedInAllDomains ^__^ ['Hello World' translatedInAllDomains] bench. --- '9,250 per second. 108 microseconds per run. 3.19872 % GC time.' Best, Marcel Am 29.10.2020 20:41:02 schrieb tim Rowledge : Wow. That's some expensive code. Dare I ask why it tries to set a property on a method? Is this a place where A Dreaded Preference might actually be sensible? tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: D: Detonate -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 2 16:19:20 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 2 Nov 2020 17:19:20 +0100 Subject: [squeak-dev] Some labels broke in a recent update In-Reply-To: References: <130BDE56-7BAE-433A-AA7C-B9C22E4A959F@gmail.com> <4192CC1F-8E08-4107-A920-492A09D09B11@mac.com> <74E09547-5357-40E7-900B-EA5B65185EF0@rowledge.org> Message-ID: Hi all! Labels work again in update 20054. Thanks! Best, Marcel Am 29.10.2020 19:54:52 schrieb Javier Diaz-Reinoso via Squeak-dev : Sorry the correct .cs is: about the window menu, IMHO is better that this functionality have there own button so is a one click away, the '<=>' can be replace for a better icon, with the down arrow. > On 29 Oct 2020, at 13:15, tim Rowledge wrote: > > > >> On 2020-10-29, at 10:32 AM, Javier Diaz-Reinoso via Squeak-dev wrote: >> >> I say already but repeat here: is better to add an extra visible button to the title bar, no depend of a invisible button, like this: >> >> > > Given that we already have a window menu (the blue icon with the down arrow) I'm puzzled why that isn't used to handle the multi-window stuff. > > {Wow - the 'random' sigline machine is on a real tear today} > > tim > -- > tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim [http://www.rowledge.org/tim] > Dopeler effect (n): The tendency of stupid ideas to seem smarter when they come at you rapidly. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gettimothy at zoho.com Mon Nov 2 16:20:20 2020 From: gettimothy at zoho.com (gettimothy) Date: Mon, 02 Nov 2020 11:20:20 -0500 Subject: [squeak-dev] 45B vm at https://bintray.com/opensmalltalk/vm/cog/202011010259#files Message-ID: <17589c265f0.108bcd0575672.1527719238698794228@zoho.com> heh. Fantastic space optimization on the latest VM! 45 Bytes! j.k. something funky somewhere, thought I would let you know. cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 16:53:29 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 16:53:29 0000 Subject: [squeak-dev] The Trunk: KernelTests-ct.389.mcz Message-ID: Eliot Miranda uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-ct.389.mcz ==================== Summary ==================== Name: KernelTests-ct.389 Author: ct Time: 1 November 2020, 7:54:42.403428 pm UUID: 7c294d2e-59a7-9746-b613-997d1aa4521c Ancestors: KernelTests-ul.386 Extend tests for Context #runSimulated:. Depends on Kernel-ct.1359. =============== Diff against KernelTests-ul.386 =============== Item was added: + ----- Method: BlockClosureTest>>return: (in category 'private') ----- + return: something + + ^ something! Item was changed: ----- Method: BlockClosureTest>>testRunSimulated (in category 'tests') ----- testRunSimulated + self assert: Rectangle equals: + (Context runSimulated: aBlockClosure asContext) class. + self assert: 42 equals: + (Context runSimulated: [self return: 42]). + self + should: [Context runSimulated: [self halt]] + raise: Halt.! - self assert: Rectangle equals: (Context runSimulated: aBlockClosure asContext) class! Item was added: + ----- Method: BlockClosureTest>>testRunSimulatedContextAtEachStep (in category 'tests') ----- + testRunSimulatedContextAtEachStep + + | context | + context := aBlockClosure asContext. + self assert: Rectangle equals: (thisContext + runSimulated: context + contextAtEachStep: [:ctxt | self assert: + [ctxt == context or: [ctxt hasSender: context]]]) class.! From tim at rowledge.org Mon Nov 2 16:54:12 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 2 Nov 2020 08:54:12 -0800 Subject: [squeak-dev] 45B vm at https://bintray.com/opensmalltalk/vm/cog/202011010259#files In-Reply-To: <17589c265f0.108bcd0575672.1527719238698794228@zoho.com> References: <17589c265f0.108bcd0575672.1527719238698794228@zoho.com> Message-ID: <042519A1-C3F5-436F-B70C-2B04D79C6CD8@rowledge.org> Nw cmprsn lgrthm > On 2020-11-02, at 8:20 AM, gettimothy via Squeak-dev wrote: > > heh. > > Fantastic space optimization on the latest VM! > > 45 Bytes! > > j.k. > > something funky somewhere, thought I would let you know. > > cheers. > > tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim To err is human; to really foul things up requires a computer. From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 2 17:07:01 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 2 Nov 2020 17:07:01 +0000 Subject: [squeak-dev] The Inbox: EToys-kfr.412.mcz In-Reply-To: References: <1C318624-9DFB-44DE-A32C-AAB72F753F02@rowledge.org> , Message-ID: <4e1c7b0dfff64dc7aa006b07f836dcad@student.hpi.uni-potsdam.de> Hi Karl, hi Marcel, thanks for caring. Can we backport this change to at least Squeak 5.3? I'm sure the users will love to know what their buttons do in older versions, too. In other words, I'd consider the current appearance in Squeak 5.3 a bug ... This should be quite easy by writing an adequate postscript, shouldn't it? Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Montag, 2. November 2020 17:05:21 An: squeak-dev Betreff: Re: [squeak-dev] The Inbox: EToys-kfr.412.mcz Hi Karl, done and already merged into Trunk. Next build artifacts on files.squeak.org will have those icons loaded. Thanks! Marcel Am 30.10.2020 19:18:01 schrieb karl ramberg : It loads these just the most used forms and so it should be fine for standard image. It makes etoys and BookMorph look ok. It should be called from ReleaseBuilder. But I'm not sure where to trigger the loading. Here are a list of the forms: "RoundGoldBox, TryItPressed, TryIt, MenuIcon, AddCategoryViewer, AddInstanceVariable, TanOPressed, TanO, Gets, RightCaret, DownCaret, NextPage, NextPagePressed, PrevPage, PrevPagePressed" On Fri, Oct 30, 2020 at 7:13 PM karl ramberg > wrote: I made a method that load the most essential Etoy Icons so Etoys look ok even in standard Squeak. On Fri, Oct 30, 2020 at 7:07 PM Marcel Taeumel > wrote: > I'm not sure where in ReleaseBuilder to hook up the initialization of the Etoy icons. Any suggestions? You mean after or even before calling "ReleaseBuilderSqueakland setEtoysMode"? Best, Marcel Am 30.10.2020 19:04:25 schrieb karl ramberg >: Cool. I'll revise the other changes once I have time. I'm not sure where in ReleaseBuilder to hook up the initialization of the Etoy icons. Any suggestions? Best, Karl On Thu, Oct 29, 2020 at 5:06 PM Marcel Taeumel > wrote: Hi Karl. > Removed from inbox now Just meant that for contributions to come. ^.^' Sorry for the mix up. Would you re-upload the contents from: EToys-kfr.413 EToys-kfr.412 EToys-kfr.392 (I managed to merge Etoys-kfr.377 up to 380 from my local package-cache.) Best, Marcel Am 21.10.2020 20:30:28 schrieb karl ramberg >: Removed from inbox now Best, Karl On Wed, Oct 21, 2020 at 6:12 PM Marcel Taeumel > wrote: Hi Karl, please do not chain unprocessed inbox items in the ancestry. This way, we can never copy over your versions but always have to re-commit your changes method-by-method. Instead, base your changes on the most recent Trunk version. EToys-kfr.413 (inbox) needs kfr.412 (inbox) but is unrelated EToys-kfr.412 (inbox) needs kfr.392 (inbox) and eem.411 (trunk) EToys-kfr.392 (inbox) needs kfr.378 (inbox) and mt.391 (trunk) ... Yes, we will see to merge your EToys contributions ASAP. Thanks! ^__^ Best, Marcel Am 17.10.2020 20:03:09 schrieb tim Rowledge >: > On 2020-10-17, at 9:03 AM, commits at source.squeak.org wrote: > > self world can return nil That is somehow both deeply philosophical and sad tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Useful random insult:- Settled some during shipping and handling. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 2 18:10:54 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 18:10:54 0000 Subject: [squeak-dev] The Trunk: Kernel-eem.1360.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1360.mcz ==================== Summary ==================== Name: Kernel-eem.1360 Author: eem Time: 2 November 2020, 10:10:50.874417 am UUID: 2041d4e1-746a-49f9-9098-8fbd6ba2f787 Ancestors: Kernel-eem.1359, Kernel-ct.1359 Merge Kernel-ct.1359 from inbox Author: ct Time: 1 November 2020, 7:50:24.183428 pm UUID: 3b12b316-79f3-de41-8765-8296d964b821 Ancestors: Kernel-mt.1353 Revise and extend Context #runSimulated: implementation. Remove restriction to blocks that do not have a method return. Add support for exception signaling during the execution, which caused unterminated simulation of the calling process in the past. Support argless contextAtEachStep blocks. Benchmarks: code: [Context runSimulated: [100 at 100 corner: 200 at 200]] bench before: 16.7 ms/run after: 19.8 ms/run I think this should be okay, given the fact that the primary purpose of simulation is providing explorability but not efficiency ... eem: Fix a bug in the use of runSimulated:contextAtEachStep:. Presumably because of the pre-closure block model existing senders were of the form thisContext sender runSimulated: aBlock contextAtEachStep: [....] but this caused the jump at the end of runSimulated:contextAtEachStep: to short-cut any processing done after runSimulated:contextAtEachStep:. So rewrite all users of runSimulated:contextAtEachStep: in this form: thisContext runSimulated: aBlock contextAtEachStep: [....] and consequently have tallyInstruction: rallyMethods: et al answer their intended results. =============== Diff against Kernel-eem.1359 =============== Item was changed: ----- Method: Context class>>runSimulated: (in category 'simulation') ----- runSimulated: aBlock + "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns." - "Simulate the execution of the argument, current. Answer the result it - returns." + ^thisContext - ^ thisContext sender runSimulated: aBlock + contextAtEachStep: [] - contextAtEachStep: [:ignored] "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! Item was changed: ----- Method: Context class>>tallyInstructions: (in category 'examples') ----- tallyInstructions: aBlock "This method uses the simulator to count the number of occurrences of each of the Smalltalk instructions executed during evaluation of aBlock. Results appear in order of the byteCode set." | tallies | tallies := Bag new. + thisContext - thisContext sender runSimulated: aBlock contextAtEachStep: [:current | tallies add: current nextByte]. ^tallies sortedElements "Context tallyInstructions: [3.14159 printString]"! Item was changed: ----- Method: Context class>>tallyMethods: (in category 'examples') ----- tallyMethods: aBlock "This method uses the simulator to count the number of calls on each method invoked in evaluating aBlock. Results are given in order of decreasing counts." | prev tallies | tallies := Bag new. prev := aBlock. + thisContext - thisContext sender runSimulated: aBlock contextAtEachStep: [:current | current == prev ifFalse: "call or return" [prev sender == nil ifFalse: "call only" [tallies add: current printString]. prev := current]]. ^tallies sortedCounts "Context tallyMethods: [3.14159 printString]"! Item was changed: ----- Method: Context class>>trace:on: (in category 'examples') ----- trace: aBlock on: aStream "Context trace: [3 factorial]" "This method uses the simulator to print calls to a file." | prev | prev := aBlock. + ^thisContext - ^ thisContext sender runSimulated: aBlock contextAtEachStep: [:current | + Sensor anyButtonPressed ifTrue: [^nil]. + current == prev ifFalse: + [prev sender ifNil: + [aStream space; nextPut: $^. + self carefullyPrint: current top on: aStream]. + aStream cr. + (current depthBelow: aBlock) timesRepeat: [aStream space]. + self carefullyPrint: current receiver on: aStream. + aStream space; nextPutAll: current selector; flush. + prev := current]]! - Sensor anyButtonPressed ifTrue: [^ nil]. - current == prev - ifFalse: - [prev sender ifNil: - [aStream space; nextPut: $^. - self carefullyPrint: current top on: aStream]. - aStream cr. - (current depthBelow: aBlock) timesRepeat: [aStream space]. - self carefullyPrint: current receiver on: aStream. - aStream space; nextPutAll: current selector; flush. - prev := current]]! Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- + runSimulated: aBlock contextAtEachStep: anotherBlock + "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." + + | current resume ensure | + resume := false. - runSimulated: aBlock contextAtEachStep: block2 - "Simulate the execution of the argument, aBlock, until it ends. aBlock - MUST NOT contain an '^'. Evaluate block2 with the current context - prior to each instruction executed. Answer the simulated value of aBlock." - | current | - aBlock hasMethodReturn - ifTrue: [self error: 'simulation of blocks with ^ can run loose']. current := aBlock asContext. + ensure := current insertSender: (Context contextEnsure: [resume := true]). + ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead." + + (anotherBlock numArgs = 0 + ifTrue: ["optimized" [resume]] + ifFalse: ["stop execution on time, don't expose simulation details to caller" + [current == ensure or: + ["Context >> #resume:" + current size >= 2 and: + [(current at: 2) == ensure]]] ]) - current pushArgs: Array new from: self. - [current == self] whileFalse: + [anotherBlock cull: current. - [block2 value: current. current := current step]. + + ^ current jump! - ^self pop! From eliot.miranda at gmail.com Mon Nov 2 18:17:32 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 2 Nov 2020 10:17:32 -0800 Subject: [squeak-dev] sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory In-Reply-To: <17589b58606.c46ba8835469.6251398448268406543@zoho.com> References: <17589b58606.c46ba8835469.6251398448268406543@zoho.com> Message-ID: On Mon, Nov 2, 2020 at 8:06 AM gettimothy via Squeak-dev < squeak-dev at lists.squeakfoundation.org> wrote: > > > Hi Eliot, > > Hi Timothy, > > a few weeks ago debugging an issue raised by Andrei Chis I ran a test > runner in the simulator and the out of memory test it included caused the > simulator to grow its central byte array to 17Gb. When I saved the image > it was 34Gb. The workflow threw up a policy error. The VM would not > shrink memory unless it had done a GC but once it had 17 Gb of free space > it wasn’t going to do a GC. So I updated the vm and fixed the policy error > and now the vm will happily shrink back after growing yo many gigabytes. > > This is all just to point out that a match 3rd vm is a tad on the old side. > > > > > > Thx, I will upgrade the VM ASAP. > > > > > BTW, how much ram do you have on your system? > > .free -h > total used free shared buff/cache > available > Mem: 6.7G 6.0G 225M 1.0M 506M > 358M > Swap: 0B 0B 0B > > The vm will happily use all of it and more unless you set an upper bound > on the size of memory (command line and vm parameter) > > ./squeak6.0alpha/bin/squeak --headless --memory 3000 > squeak6.0alpha/shared/Squeak6.0alpha-19802-64bit.image & > > is the command I use. I am not sure what the '3000' refers to, I am > assuming it is 3G. > Now you can use "-memory 3g" and have no doubt. Note that "--" is Pharo, and "-" is Squeak. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 2 18:27:57 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 2 Nov 2020 18:27:57 +0000 Subject: [squeak-dev] WindowEvents and new SystemLaunchEvent/#launchDrop from singleton VM (was: Changeset: Enhanced integration of drag'n'drop from host) In-Reply-To: References: , Message-ID: <2842ec379f444e54a3eeaa86238a5c76@student.hpi.uni-potsdam.de> Hi Marcel, thanks for the feedback & merge! :-) One part of the patch remains to be reviewed that you did not yet merge because it requires additional discussion; I'm speaking about the SystemLaunchEvent feature. I'd like to ask everyone interested in this proposal to have a look at my original changeset, but because I know its easier just to read this email without downloading and trying out anything, I'm citing the relevant diff here again: MorphicEvent subclass: #SystemLaunchEvent instanceVariableNames: 'arguments wasHandled' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! !SystemLaunchEvent commentStamp: 'ct 1/18/586455 02:22' prior: 0! I am signaled by the VM that is configured as a singleton application when it has been invoked with a new image file. This feature is also known as #launchDrop as well as under several platform-specific names: Unix - runAsSingleInstance Win32 - RunSingleApp Instance Variables arguments: A collection of FileStreams. wasHandled: A Boolean.! !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:31'! handlesSystemLaunch: evt "Do I want to receive #systemLaunch: when the VM instance is invoked with a second image file? See #handleSystemLaunch:." ^ false! ! !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:36'! systemLaunch: evt "Handle a systemLaunch event, signaled when the VM instance is invoked with a second image file. See #handleSystemLaunch:. Hook for subclasses."! ! !Morph methodsFor: 'events-processing' stamp: 'ct 10/15/2020 19:32'! handleSystemLaunch: anEvent "Handle a system launch event from the OS. Signaled if them VM is configured as a singleton application when it has been invoked again with a second image file. See SystemLaunchEvent comment." anEvent wasHandled ifTrue: [^ self]. "not interested" (self handlesSystemLaunch: anEvent) ifFalse: [^ self]. anEvent wasHandled: true. self systemLaunch: anEvent.! ! !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:32'! handlesSystemLaunch: anEvent ^ self isWorldMorph! ! !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:57'! systemLaunch: anEvent "Handle a number of files the singleton VM was called with again. See SystemLaunchEvent comment." self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." ^ self dropFiles: anEvent arguments event: anEvent! ! !HandMorph methodsFor: 'private events' stamp: 'ct 1/18/586455 10:01'! generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := 1. "red" "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { ... [4] -> [ "dragDrop" | oldButtons | externalDropMorph ifNil: [ "dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)." ^ SystemLaunchEvent new setArguments: (self collectDropFilesAndDirectories: numFiles) source: self stamp: stamp]. ... So the question is: Do we need an additional event class for this, and if yes, how do we want to propagate these events? I have already spent some thoughts on this before submitting the changeset, and I did not want to make this event exclusive for the world only but accessible for every morph. However, was this a good idea, or would this be a rather different approach from how "system events" work (or should work)? A good precedent may be WindowEvent which is indeed dispatched to the world morph only - at least at the moment. I'm trying to construct an example where another morph could be interested in these events, too. For example, a tool might have opened a session to some critical external system, maybe an SSH shell, and this tool would like to output an extra warning to the user when a #windowClose event is received. However, should it get access to WindowEvents for this purpose, or should they be hidden behind the PasteUpMorph facade and we would prefer to design some high-level hook on the world instead which the SSH tool then could register itself against as a "critical operation"? (NB: The shutDown list would not be the right solution in this fictive example - when #shutDown: is called, the shutdown operation is already in progress which would be "too late" for our tool to reject the shutdown.) I'm pretty sure we can conduct more or less the same debate for the new proposed SystemLaunchEvent because a SystemLaunchEvent is basically very similar to a WindowEvent, just without a position but with one or multiple file paths (internally: file streams). Should you be able to watch an event like this using HandMorph >> #showEvents:? I think so. Should you be able to receive an event like this using an event listener? Probably? Should you be able to intercept an event like this using an event filter? I don't know, but could it harm? Should every morph be able to subscribe to events like this by overriding #handlesSystemLaunch:? I have no idea ... So I'm looking forward to your opinions on this issue ... Do we need a new event class for this, or does it suffice to tell the PasteUpMorph a "private message" only? My versions browser for #generateDropFilesEvent: contains this old version, too, which would be pretty much our alternative: generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." ... dragType caseOf: { ... [4] -> [ "dragDrop" | oldButtons | externalDropMorph ifNil: [ | filesAndDirectories | "dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)." filesAndDirectories := self collectDropFilesAndDirectories: numFiles. self flag: #todo. "ct: Do we need an extra event class for this?" self world launchDropFiles: filesAndDirectories event: (MorphicUnknownEvent new setType: #launchDrop argument: filesAndDirectories hand: self stamp: stamp). ^ nil]. Your two cents please! :-) Best, Christoph ________________________________ Von: Taeumel, Marcel Gesendet: Montag, 2. November 2020 16:40 Uhr An: Thiede, Christoph; squeak-dev at mail.squeak.org Betreff: Re: Changeset: Enhanced integration of drag'n'drop from host Done and merged into Trunk. Best, Marcel Am 26.10.2020 07:47:02 schrieb Marcel Taeumel : Hi Christoph! This is great news! I will take a look at it and test it for the Windows platform. Best, Marcel Am 23.10.2020 14:11:28 schrieb Thiede, Christoph : Hi all! :-) I'm glad to officially submit my dropFiles changeset today, finally. It enhances the integration of drag'n'drop (DnD) events delivered by the VM from the host operating system to the image, following one of Marcel's ideas: Instead of generating separate DropFilesEvent instances, every DnD event from the VM is translated into a TransferMorph that can be dragged into every morph or tool like every other Morph of TransferMorph, too. [cid:9eca4e4e-37b5-47f0-baa1-8223bba9ae2b] What is the goal of this changeset? This design change entails two key advantages: First, every dragged host element is represented by a first-class object (which is a TransferMorph) instance. Second, as a consequence, applications do no longer need to implement a separate protocol for handling host DnDs (which was #dropFiles:/#wantsDropFiles:) but only need to provide one single proper implementation of #acceptDroppingMorph:event:/#wantsDroppedTransferMorph:. In particular, this also enables developers who use the ToolBuilder(Spec) framework to handle contents dropped from the host system since the old dropFiles protocol was never forwarded to the ToolBuilder framework. How does it work? There have already been complete implementations of the DropPlugin on the VM side for all important platforms (Windows, Linux, and macOS) for a long time (almost 20 years ...) which record four different types of drag events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, until now, only the last of them, #dragDrop, has been handled on the image side (see HandMorph >> #generateDropFilesEvent:). The main work of this changeset can be found in just this method where I added support for the other drag types in order to create, move, and release a TransferMorph accordingly. Other changes include: * Deprecated, but kept working the old DropFilesEvent protocol (these events are still processed, but a DeprecationWarning is signaled if any morph actually handles them). * Migrated the only implementation of the old dropFiles protocol, which is PasteUpMorph, to the unified TransferMorph protocol. * Introduced a new event class + protocol for SystemLaunchEvent (aka #launchDrop) which is generated by a singleton VM when it has been invoked with a new image file (see class comment). That #launchDrop is a curious hack on the VM side to reuse the DnD protocol but has completely different semantics that now are separated on the image side. * Implemented the SystemLaunchEvent protocol on PasteUpMorph. Besides the changeset, I have also fixed a few minor inconsistencies with several VM-specific implementations in the OpenSmalltalk-VM repository (see #508, #514, and #518) that have already been merged (thanks to all reviewers!). What's the current state of the changeset? I have successfully tested the changeset on Windows (Win 2004) and Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. However, I do not have any possibility to test it on the OSVM implementations for macOS and iOS, so your help and feedback especially for these platforms will be greatly appreciated! Please see the attached demo video on how to test the changeset: Simply drag some files into an inspector field or a workspace and you should receive a list of FileStreams and/or FileDirectories. Also, aborting a drag operation should not fail, i.e. drag a file over the image but then drop the file in another window. What's next? There is much more potential for a comfortable host DnD integration! Concretely, I am having two downstream goals in mind: First, dropping other content types besides files and/or directories in your image, such as texts or images (currently, the DropPlugin implementations that I could try out are restricted to the former two types). Second, dragging objects out of the VM to save them as a file, or even better, to drop them in a second image! Vanessa has told me that this was even possible in the past for certain platforms, but unfortunately, the relevant code appears to be dead nowadays. Nevertheless, I have stumbled upon a lot of stubs for both features in the DropPlugin and HandMorph code, and I'm looking forward to reviving them in some interesting follow-up projects! Which related contributions/discussions are there else? * System-ct.1156 (Inbox, fixes double prompt for handling a dropped file when the first dialog was canceled; not included in the changeset) * [squeak-dev] Re: Please try out | Inspector Refactoring =) (the thread contains some interesting brainstorming about MIME type support for dragging inside the image) Please test and review! And many thanks to Marcel for his helpful tips! Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 133740 bytes Desc: pastedImage.png URL: From commits at source.squeak.org Mon Nov 2 18:40:42 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 18:40:42 0000 Subject: [squeak-dev] The Trunk: Kernel-eem.1361.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1361.mcz ==================== Summary ==================== Name: Kernel-eem.1361 Author: eem Time: 2 November 2020, 10:40:38.260046 am UUID: 7c6efb93-d626-4a62-86f4-c258f8cf199d Ancestors: Kernel-eem.1360 I couldn't resist... =============== Diff against Kernel-eem.1360 =============== Item was changed: ----- Method: Context class>>runSimulated: (in category 'simulation') ----- runSimulated: aBlock "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns." ^thisContext runSimulated: aBlock contextAtEachStep: [] + "Context runSimulated: [Pen new ifNotNil: [:pen| pen defaultNib: 5. 4 timesRepeat: [pen go: 100; turn: 90]]]" + + "Here's a fun example, reaching into the computation to squash the Display>>fillWhite that mandala: begins with..." + "thisContext + runSimulated: [Pen new mandala: 45] + contextAtEachStep: [:ctxt| ctxt selector == #fillWhite ifTrue: [ctxt scanFor: [:ign| ctxt willReturn]]]"! - "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! From tim at rowledge.org Mon Nov 2 19:00:06 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 2 Nov 2020 11:00:06 -0800 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: > On 2020-11-02, at 8:17 AM, Marcel Taeumel wrote: > > Hi Tim. > > > Dare I ask why it tries to set a property on a method? > > A cache because package-name lookup for methods is expensive: OK; I'm not brave enough to want to know why that is required. I think I'll just put a preference in for my systems and avoid the entire problem! tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IO: Illogical Or From commits at source.squeak.org Mon Nov 2 19:00:16 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 19:00:16 0000 Subject: [squeak-dev] The Inbox: SUnit-ct.131.mcz Message-ID: A new version of SUnit was added to project The Inbox: http://source.squeak.org/inbox/SUnit-ct.131.mcz ==================== Summary ==================== Name: SUnit-ct.131 Author: ct Time: 2 November 2020, 8:00:15.279122 pm UUID: eb678be0-b6de-f540-bcce-37b84404df99 Ancestors: SUnit-pre.123 Don't save #lastStoredRun results into the source package. See also ReleaseBuilder class >>#discardUserObjects. Thanks to tobe & mt for the advice! :-) =============== Diff against SUnit-pre.123 =============== Item was removed: - ----- Method: ClassFactoryForTestCaseTest class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#passed->((Set new) add: #testDefaultCategoryCleanUp; add: #testPackageCleanUp; add: #testSingleClassCreation; add: #testClassCreationInDifferentCategories; add: #testClassFastCreationInDifferentCategories; add: #testMultipleClassCreation; add: #testSingleClassFastCreation; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! Item was removed: - ----- Method: ResumableTestFailureTestCase class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#passed->((Set new) add: #testResumable; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! Item was removed: - ----- Method: SUnitExtensionsTest class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#passed->((Set new) add: #testNoExceptionWithMatchingString; add: #testNoExceptionWithNoMatchingString; add: #testExceptionWithMatchingString; add: #testExceptionWithoutMatchingString; add: #testValidShouldNotTakeMoreThan; add: #testInvalidShouldNotTakeMoreThanMilliseconds; add: #testDifferentExceptionInShouldRaiseWithExceptionDo; add: #testShouldRaiseWithExceptionDo; add: #testShouldFix; add: #testAssertionFailedInRaiseWithExceptionDo; add: #testAutoDenyFalse; add: #testAutoDenyTrue; add: #testAutoAssertFalse; add: #testAutoAssertTrue; add: #testValidShouldNotTakeMoreThanMilliseconds; add: #testErrorInRaiseWithExceptionDo; add: #testNoExceptionInShouldRaiseWithExceptionDo; add: #testInvalidShouldNotTakeMoreThan; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! Item was removed: - ----- Method: SUnitTest class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#passed->((Set new) add: #testWithExceptionDo; add: #testRan; add: #testAssert; add: #testRanOnlyOnce; add: #testDialectLocalizedException; add: #testFail; add: #testDefects; add: #testIsNotRerunOnDebug; add: #testResult; add: #testRunning; add: #testError; add: #testException; add: #testShould; add: #testSuite; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! Item was removed: - ----- Method: SimpleTestResourceTestCase class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#passed->((Set new) add: #testResourceInitRelease; add: #testResourcesCollection; add: #testRan; yourself)); add: (#timeStamp->'22 November 2008 10:11:35 pm'); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself)! Item was changed: ----- Method: TestCase class>>generateLastStoredRunMethod (in category 'history') ----- generateLastStoredRunMethod self shouldGenerateLastStoredRunMethod ifTrue: [ self class compile: (self lastRunMethodNamed: #lastStoredRun) + classified: '*autogenerated-history' ]! - classified: 'history' ]! Item was changed: ----- Method: TestCase class>>lastRunMethodNamed: (in category 'history') ----- lastRunMethodNamed: aSelector + ^ String streamContents: [:stream | + stream + nextPutAll: aSelector asString; + crtab; nextPutAll: (' "See {1}"' format: {thisContext home}); + crtab; nextPutAll: '^ ', (self lastRun) storeString] - ^ String streamContents: [:str | - str nextPutAll: aSelector asString ;cr. - str tab; nextPutAll: '^ ', (self lastRun) storeString] ! From commits at source.squeak.org Mon Nov 2 19:00:47 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 2 Nov 2020 19:00:47 0000 Subject: [squeak-dev] The Inbox: Tests-ct.444.mcz Message-ID: A new version of Tests was added to project The Inbox: http://source.squeak.org/inbox/Tests-ct.444.mcz ==================== Summary ==================== Name: Tests-ct.444 Author: ct Time: 2 November 2020, 8:00:44.071122 pm UUID: c171d656-c1c7-8644-9267-2fddf331d58c Ancestors: Tests-mt.442 Complements SUnit-ct.131. =============== Diff against Tests-mt.442 =============== Item was removed: - ----- Method: CompilerNotifyingTest class>>lastStoredRun (in category 'history') ----- - lastStoredRun - ^ ((Dictionary new) add: (#failures->((Set new) add: #testTooManyArguments; add: #testifTrueBlockWithArgument; add: #testMissingArgumentAfterAMessageKey; add: #testTooManyLiterals; add: #testAlltogether; add: #testUnmatchedLocalTempDeclarationInABlock; add: #testUnmatchedExpressionParenthesis; add: #testCaseOtherwiseBlockWithArgument; yourself)); add: (#errors->((Set new) add: #testTooManyTemporaries; yourself)); add: (#passed->((Set new) add: #testUnmatchedBraceArray; add: #testTooLargeAnIntegerInALiteralByteArray; add: #testDigitTooLargeForARadix; add: #testInvalidLiteralCharacter; add: #testAssignmentOfSelf; add: #testInvalidPrimitive; add: #testInvalidExternalFunctionDeclaration; add: #testMissingExpressionAfterAReturn; add: #testInvalidRadix; add: #testMissingArgumentAfterABinaryMessage; add: #testMissingPeriodSeparatorBetweenStatements; add: #testCascadeInASuperSend; add: #testATempShadowingAnotherTemp; add: #testExtraneousStatementAfterAReturnInABlock; add: #testLiteralChar acterMissing; add: #testUnmatchedCommentQuote; add: #testInvalidPattern; add: #testUnmatchedByteArrayBracket; add: #testUnmatchedLiteralParenthesis; add: #testUnmatchedLocalTempDeclaration; add: #testExpectedExpressionInBraceArray; add: #testInvalidPragma; add: #testMissingSeparatorBetweenBlockArgumentAndStatements; add: #testMissingBlockArgumentName; add: #testMissingMessageAfterACascade; add: #testUnmatchedStringQuote; add: #testTempDoubledDefined; add: #testMissingExpression; add: #testUnmatchedBlockBracket; add: #testEmptyCaseStatement; yourself)); add: (#timeStamp->'22 February 2012 3:52:10 am' asTimeStamp); yourself)! From marcel.taeumel at hpi.de Tue Nov 3 08:29:23 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 3 Nov 2020 09:29:23 +0100 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: Or just recompile #translated to do nothing in your systems. :-) Best, Marcel Am 02.11.2020 20:00:18 schrieb tim Rowledge : > On 2020-11-02, at 8:17 AM, Marcel Taeumel wrote: > > Hi Tim. > > > Dare I ask why it tries to set a property on a method? > > A cache because package-name lookup for methods is expensive: OK; I'm not brave enough to want to know why that is required. I think I'll just put a preference in for my systems and avoid the entire problem! tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: IO: Illogical Or -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Tue Nov 3 10:23:24 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Tue, 3 Nov 2020 11:23:24 +0100 Subject: [squeak-dev] WindowEvents and new SystemLaunchEvent/#launchDrop from singleton VM (was: Changeset: Enhanced integration of drag'n'drop from host) In-Reply-To: <2842ec379f444e54a3eeaa86238a5c76@student.hpi.uni-potsdam.de> References: <2842ec379f444e54a3eeaa86238a5c76@student.hpi.uni-potsdam.de> Message-ID: I haven't thought this through, but what I first thought of was something like SystemChangeNotifier. A central instance where objects can register for such global events. It sounds odd to me to deliver the event to every single morph in the system. Most of them are probably not interested. So the interested ones should ask for notifications. If the world morph were to dispatch the event, what about non-Morphic applications? Am Mo., 2. Nov. 2020 um 19:28 Uhr schrieb Thiede, Christoph < Christoph.Thiede at student.hpi.uni-potsdam.de>: > Hi Marcel, thanks for the feedback & merge! :-) > > > One part of the patch remains to be reviewed that you did not yet merge > because it requires additional discussion; I'm speaking about the > SystemLaunchEvent feature. I'd like to ask everyone interested in this > proposal to have a look at my original changeset, but because I know its > easier just to read this email without downloading and trying out anything, > I'm citing the relevant diff here again: > > > MorphicEvent subclass: #SystemLaunchEvent > instanceVariableNames: 'arguments wasHandled' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Events'! > > > !SystemLaunchEvent commentStamp: 'ct 1/18/586455 02:22' prior: 0! I am > signaled by the VM that is configured as a singleton application when it > has been invoked with a new image file. This feature is also known as > #launchDrop as well as under several platform-specific names: Unix - > runAsSingleInstance Win32 - RunSingleApp Instance Variables arguments: A > collection of FileStreams. wasHandled: A Boolean.! > > > !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:31'! > handlesSystemLaunch: evt > "Do I want to receive #systemLaunch: when the VM instance is invoked with a second image file? See #handleSystemLaunch:." > > ^ false! ! > > !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:36'! > systemLaunch: evt > "Handle a systemLaunch event, signaled when the VM instance is invoked with a second image file. See #handleSystemLaunch:. Hook for subclasses."! ! > > > !Morph methodsFor: 'events-processing' stamp: 'ct 10/15/2020 19:32'! > handleSystemLaunch: anEvent > "Handle a system launch event from the OS. Signaled if them VM is configured as a singleton application when it has been invoked again with a second image file. See SystemLaunchEvent comment." > > anEvent wasHandled ifTrue: [^ self]. "not interested" > (self handlesSystemLaunch: anEvent) ifFalse: [^ self]. > anEvent wasHandled: true. > self systemLaunch: anEvent.! ! > > > !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:32'! > handlesSystemLaunch: anEvent > > ^ self isWorldMorph! ! > > !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:57'! > systemLaunch: anEvent > "Handle a number of files the singleton VM was called with again. See SystemLaunchEvent comment." > > self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." > ^ self dropFiles: anEvent arguments event: anEvent! ! > > > !HandMorph methodsFor: 'private events' stamp: 'ct 1/18/586455 10:01'! > generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for > the given raw event buffer." | position buttons modifiers stamp numFiles > dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time > eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth > @ evtBuf fifth. buttons := 1. "red" "hacked because necessary for correct > mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons > bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType > caseOf: { ... [4] -> [ "dragDrop" | oldButtons | externalDropMorph ifNil: > [ "dragDrop has been sent without prior dragging. This happens if the VM is > configured as a singleton application and has been called again (aka > #launchDrop)." ^ SystemLaunchEvent new setArguments: (self > collectDropFilesAndDirectories: numFiles) source: self stamp: stamp]. ... > > > So the question is: Do we need an additional event class for this, and if > yes, how do we want to propagate these events? > I have already spent some thoughts on this before submitting the > changeset, and I did not want to make this event exclusive for the world > only but accessible for every morph. However, was this a good idea, or > would this be a rather different approach from how "system events" work (or > should work)? > > A good precedent may be WindowEvent which is indeed dispatched to the > world morph only - at least at the moment. I'm trying to construct an > example where another morph could be interested in these events, too. For > example, a tool might have opened a session to some critical > external system, maybe an SSH shell, and this tool would like to output an > extra warning to the user when a #windowClose event is received. However, > should it get access to WindowEvents for this purpose, or should they > be hidden behind the PasteUpMorph facade and we would prefer to design some > high-level hook on the world instead which the SSH tool then could register > itself against as a "critical operation"? (NB: The shutDown list would not > be the right solution in this fictive example - when #shutDown: is called, > the shutdown operation is already in progress which would be "too late" for > our tool to reject the shutdown.) > > I'm pretty sure we can conduct more or less the same debate for the new > proposed SystemLaunchEvent because a SystemLaunchEvent is basically very > similar to a WindowEvent, just without a position but with one or multiple > file paths (internally: file streams). > Should you be able to watch an event like this using HandMorph > >> #showEvents:? I think so. > Should you be able to receive an event like this using an event listener? > Probably? > Should you be able to intercept an event like this using an event filter? > I don't know, but could it harm? > Should every morph be able to subscribe to events like this by overriding > #handlesSystemLaunch:? I have no idea ... > > So I'm looking forward to your opinions on this issue ... Do we need a new > event class for this, or does it suffice to tell the PasteUpMorph a > "private message" only? My versions browser for #generateDropFilesEvent: > contains this old version, too, which would be pretty much our alternative: > > generateDropFilesEvent: evtBuf > "Generate the appropriate mouse event for the given raw event buffer." > > ... > dragType caseOf: { > ... > [4] -> [ "dragDrop" > | oldButtons | > externalDropMorph ifNil: [ > | filesAndDirectories | > "dragDrop has been sent without prior dragging. This happens if the VM is > configured as a singleton application and has been called again (aka > #launchDrop)." > filesAndDirectories := self collectDropFilesAndDirectories: numFiles. > self flag: #todo. "ct: Do we need an extra event class for this?" > self world launchDropFiles: filesAndDirectories event: > (MorphicUnknownEvent new > setType: #launchDrop argument: filesAndDirectories hand: self stamp: > stamp). > ^ nil]. > > > Your two cents please! :-) > > Best, > Christoph > > ------------------------------ > *Von:* Taeumel, Marcel > *Gesendet:* Montag, 2. November 2020 16:40 Uhr > *An:* Thiede, Christoph; squeak-dev at mail.squeak.org > *Betreff:* Re: Changeset: Enhanced integration of drag'n'drop from host > > Done and merged into Trunk. > > Best, > Marcel > > Am 26.10.2020 07:47:02 schrieb Marcel Taeumel : > Hi Christoph! > > This is great news! I will take a look at it and test it for the Windows > platform. > > Best, > Marcel > > Am 23.10.2020 14:11:28 schrieb Thiede, Christoph < > christoph.thiede at student.hpi.uni-potsdam.de>: > > Hi all! :-) I'm glad to officially submit my dropFiles changeset today, > finally. It enhances the integration of drag'n'drop (DnD) events delivered > by the VM from the host operating system to the image, following one of > Marcel's ideas: Instead of generating separate DropFilesEvent instances, > every DnD event from the VM is translated into a TransferMorph that can be > dragged into every morph or tool like every other Morph of TransferMorph, > too. > > > > > *What is the goal of this changeset?* > > This design change entails two key advantages: First, every dragged host > element is represented by a first-class object (which is a TransferMorph) > instance. > Second, as a consequence, applications do no longer need to implement a separate protocol > for handling host DnDs (which was #dropFiles:/#wantsDropFiles:) > but only need to provide one single proper implementation of # > acceptDroppingMorph:event:/#wantsDroppedTransferMorph:. In particular, > this also enables developers who use the ToolBuilder(Spec) framework to > handle contents dropped from the host system since the > old dropFiles protocol was never forwarded to the ToolBuilder framework. > > > *How does it work?* > > There have already been complete implementations of the DropPlugin on the > VM side for all important platforms (Windows, Linux, and macOS) for a long > time (almost 20 years ...) which record four different types of drag > events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, > until now, only the last of them, #dragDrop, has been handled on the image > side (see HandMorph >> #generateDropFilesEvent:). The main work of this > changeset can be found in just this method where I added support for the > other drag types in order to create, move, and release a TransferMorph > accordingly. Other changes include: > > > - Deprecated, but kept working the old DropFilesEvent protocol (these > events are still processed, but a DeprecationWarning is signaled if any > morph actually handles them). > - Migrated the only implementation of the old dropFiles protocol, > which is PasteUpMorph, to the unified TransferMorph protocol. > - Introduced a new event class + protocol for SystemLaunchEvent (aka > #launchDrop) which is generated by a singleton VM when it has been > invoked with a new image file (see class comment). That #launchDrop is a > curious hack on the VM side to reuse the DnD protocol but has completely > different semantics that now are separated on the image side. > - Implemented the SystemLaunchEvent protocol on PasteUpMorph. > > Besides the changeset, I have also fixed a few minor inconsistencies with > several VM-specific implementations in the OpenSmalltalk-VM repository (see > #508 , #514 > , and #518 > ) that have > already been merged (thanks to all reviewers!). > > *What's the current state of the changeset?* > I have successfully tested the changeset on Windows (Win 2004) and > Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. > However, I do not have any possibility to test it on the OSVM > implementations for macOS and iOS, so your help and feedback especially > for these platforms will be greatly appreciated! > Please see the attached demo video on how to test the changeset: Simply > drag some files into an inspector field or a workspace and you should > receive a list of FileStreams and/or FileDirectories. Also, aborting a drag > operation should not fail, i.e. drag a file over the image but then drop > the file in another window. > > *What's next?* > There is much more potential for a comfortable host DnD integration! > Concretely, I am having two downstream goals in mind: First, dropping other > content types besides files and/or directories in your image, such as texts > or images (currently, the DropPlugin implementations that I could try > out are restricted to the former two types). Second, dragging objects out > of the VM to save them as a file, or even better, to drop them in a second > image! Vanessa has told me > > that this was even possible in the past for certain platforms, but > unfortunately, the relevant code appears to be dead nowadays. Nevertheless, > I have stumbled upon a lot of stubs for both features in the DropPlugin and > HandMorph code, and I'm looking forward to reviving them in some > interesting follow-up projects! > > *Which related contributions/discussions are there else?* > > - System-ct.1156 (Inbox, fixes double prompt for handling a dropped > file when the first dialog was canceled; not included in the changeset) > - [squeak-dev] Re: Please try out | Inspector Refactoring =) > (the > thread contains some interesting brainstorming about MIME type support for > dragging inside the image) > > > Please test and review! And many thanks to Marcel for his helpful tips! > > Best, > Christoph > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 133740 bytes Desc: not available URL: From tim at rowledge.org Tue Nov 3 17:14:29 2020 From: tim at rowledge.org (tim Rowledge) Date: Tue, 3 Nov 2020 09:14:29 -0800 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: > On 2020-11-03, at 12:29 AM, Marcel Taeumel wrote: > > Or just recompile #translated to do nothing in your systems. :-) Nowhere near complicated enough... tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Klingon Code Warrior:- 5) "Specs are for the weak and timid!" From eliot.miranda at gmail.com Tue Nov 3 19:34:26 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 3 Nov 2020 11:34:26 -0800 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: On Tue, Nov 3, 2020 at 12:29 AM Marcel Taeumel wrote: > Or just recompile #translated to do nothing in your systems. :-) > This suggestion fills me with dread. Localization seems to me to be an increasingly important facility for a development environment. And if we support it so badly that the only way to make it acceptable is to turn it off we have failed. Further, it can't be that hard, can it? Is our real problem that we don't have a specification against which we can optimize? > Best, > Marcel > > Am 02.11.2020 20:00:18 schrieb tim Rowledge : > > > > On 2020-11-02, at 8:17 AM, Marcel Taeumel wrote: > > > > Hi Tim. > > > > > Dare I ask why it tries to set a property on a method? > > > > A cache because package-name lookup for methods is expensive: > > OK; I'm not brave enough to want to know why that is required. I think > I'll just put a preference in for my systems and avoid the entire problem! > > > tim > -- > tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: IO: Illogical Or > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Nov 3 21:29:26 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 3 Nov 2020 21:29:26 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1362.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1362.mcz ==================== Summary ==================== Name: Kernel-ct.1362 Author: ct Time: 3 November 2020, 10:29:21.488637 pm UUID: 48a3e4c2-8aa8-414e-8d36-ccfe076c6aab Ancestors: Kernel-eem.1361 Fixes regression in Context >> #runSimulated:contextAtEachStep: when the message is sent to something else than thisContext. =============== Diff against Kernel-eem.1361 =============== Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- runSimulated: aBlock contextAtEachStep: anotherBlock "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." | current resume ensure | resume := false. current := aBlock asContext. + current privSender: self. + ensure := current insertSender: (Context contextEnsure: + [resume := true. + ensure privSender: thisContext home sender]). - ensure := current insertSender: (Context contextEnsure: [resume := true]). - ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead." (anotherBlock numArgs = 0 ifTrue: ["optimized" [resume]] ifFalse: ["stop execution on time, don't expose simulation details to caller" [current == ensure or: ["Context >> #resume:" current size >= 2 and: [(current at: 2) == ensure]]] ]) whileFalse: [anotherBlock cull: current. current := current step]. ^ current jump! From eliot.miranda at gmail.com Tue Nov 3 23:06:58 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 3 Nov 2020 15:06:58 -0800 Subject: [squeak-dev] The Inbox: Kernel-ct.1362.mcz In-Reply-To: References: Message-ID: Hi Christoph, On Tue, Nov 3, 2020 at 1:29 PM wrote: > A new version of Kernel was added to project The Inbox: > http://source.squeak.org/inbox/Kernel-ct.1362.mcz > > ==================== Summary ==================== > > Name: Kernel-ct.1362 > Author: ct > Time: 3 November 2020, 10:29:21.488637 pm > UUID: 48a3e4c2-8aa8-414e-8d36-ccfe076c6aab > Ancestors: Kernel-eem.1361 > > Fixes regression in Context >> #runSimulated:contextAtEachStep: when the > message is sent to something else than thisContext. > > =============== Diff against Kernel-eem.1361 =============== > > Item was changed: > ----- Method: Context>>runSimulated:contextAtEachStep: (in category > 'system simulation') ----- > runSimulated: aBlock contextAtEachStep: anotherBlock > "Simulate the execution of the argument, aBlock, until it ends or > is curtailed. If any exception is signaled during the execution, simulate > it being handled on the present caller stack. Evaluate anotherBlock with > the current context prior to each instruction executed. Answer the > simulated value of aBlock." > > | current resume ensure | > resume := false. > current := aBlock asContext. > + current privSender: self. > + ensure := current insertSender: (Context contextEnsure: > + [resume := true. > + ensure privSender: thisContext home sender]). > - ensure := current insertSender: (Context contextEnsure: [resume := > true]). > - ensure sender ifNil: [ensure privSender: self]. "For backward > compatibility, do not fail if aBlock is dead." > > (anotherBlock numArgs = 0 > ifTrue: ["optimized" [resume]] > ifFalse: ["stop execution on time, don't expose simulation > details to caller" > [current == ensure or: > ["Context >> #resume:" > current size >= 2 and: > [(current at: 2) == ensure]]] ]) > whileFalse: > [anotherBlock cull: current. > current := current step]. > > ^ current jump! > Please add as expansive a comment as you see fit in front of those new lines beginning "current privSender: self". It's important and non-obvious. I think only by peppering this method with comments will we develop the correct version that can both answer results and hide the existence of runSimulated:contextAtEachStep: from the simulation. Once it's working as we see fit we can prune the comments, but right now we need to be discursive and explanatory with each other. Go forth and be prolix :-) -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Wed Nov 4 08:08:51 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 09:08:51 +0100 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: Hi Eliot. > Further, it can't be that hard, can it? Is our real problem that we don't have a specification against which we can optimize? I gave two simple solutions for #translateInAllDomains further up in this discussion. It's doable. Best, Marcel Am 03.11.2020 20:34:53 schrieb Eliot Miranda : On Tue, Nov 3, 2020 at 12:29 AM Marcel Taeumel wrote: Or just recompile #translated to do nothing in your systems. :-) This suggestion fills me with dread.  Localization seems to me to be an increasingly important facility for a development environment.  And if we support it so badly that the only way to make it acceptable is to turn it off we have failed.  Further, it can't be that hard, can it?  Is our real problem that we don't have a specification against which we can optimize? Best, Marcel Am 02.11.2020 20:00:18 schrieb tim Rowledge : > On 2020-11-02, at 8:17 AM, Marcel Taeumel wrote: > > Hi Tim. > > > Dare I ask why it tries to set a property on a method? > > A cache because package-name lookup for methods is expensive: OK; I'm not brave enough to want to know why that is required. I think I'll just put a preference in for my systems and avoid the entire problem! tim -- tim Rowledge; tim at rowledge.org [mailto:tim at rowledge.org]; http://www.rowledge.org/tim [http://www.rowledge.org/tim] Strange OpCodes: IO: Illogical Or -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Wed Nov 4 09:26:13 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:26:13 0000 Subject: [squeak-dev] The Trunk: Collections-kfr.878.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-kfr.878.mcz ==================== Summary ==================== Name: Collections-kfr.878 Author: kfr Time: 29 February 2020, 12:18:54.1853 pm UUID: ce016281-22ee-4948-b534-944fb3913521 Ancestors: Collections-ul.877 Add 'clear' to Transcript window menu. =============== Diff against Collections-ul.877 =============== Item was added: + ----- Method: TranscriptStream>>addModelItemsToWindowMenu: (in category 'menu') ----- + addModelItemsToWindowMenu: aMenu + + aMenu addLine. + aMenu + add: 'clear' + target: self + action: #clear.! From commits at source.squeak.org Wed Nov 4 09:27:58 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:27:58 0000 Subject: [squeak-dev] The Trunk: Collections-ct.855.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ct.855.mcz ==================== Summary ==================== Name: Collections-ct.855 Author: ct Time: 20 September 2019, 6:56:22.518437 pm UUID: 079663b5-47e2-bd47-bfa4-86db03bd98d8 Ancestors: Collections-mt.854 Add convenience method for adding many attributes to a Text. =============== Diff against Collections-mt.854 =============== Item was added: + ----- Method: Text>>addAllAttributes: (in category 'emphasis') ----- + addAllAttributes: attributes + + attributes do: [:attribute | + self addAttribute: attribute].! From commits at source.squeak.org Wed Nov 4 09:28:11 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:28:11 0000 Subject: [squeak-dev] The Trunk: Collections-ct.876.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ct.876.mcz ==================== Summary ==================== Name: Collections-ct.876 Author: ct Time: 16 February 2020, 3:38:21.566 pm UUID: 83e0e8f6-a3b2-f540-a88e-6d833e2146fd Ancestors: Collections-topa.873 Fixes a typo in #withFirstCharacterDownshifted =============== Diff against Collections-topa.873 =============== Item was changed: ----- Method: Symbol>>withFirstCharacterDownshifted (in category 'converting') ----- withFirstCharacterDownshifted + "Answer an object like the receiver but with first character downshifted if necessary" - "Answer an object like the receiver but with first character downshifted if necesary" + ^self asString withFirstCharacterDownshifted asSymbol! - ^self asString withFirstCharacterDownshifted asSymbol.! From commits at source.squeak.org Wed Nov 4 09:45:46 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:45:46 0000 Subject: [squeak-dev] The Trunk: Monticello-mt.731.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.731.mcz ==================== Summary ==================== Name: Monticello-mt.731 Author: mt Time: 4 November 2020, 10:45:45.08162 am UUID: cc112dfa-3c81-8844-b323-1e07d2f73e32 Ancestors: Monticello-mt.730 Show a warning when trying to copy an inbox version to trunk or treated as a compromise until a proper move operation can be implemented in the image. =============== Diff against Monticello-mt.730 =============== Item was changed: ----- Method: MCVersionInspector>>save (in category 'accessing') ----- save self pickRepository ifNotNil: + [:repository | + (self repository = MCRepository inbox and: + [repository = MCRepository trunk or: [repository = MCRepository treated]]) ifTrue: + [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox constributions.\\Do you want to proceed anyway?' translated withCRs]. + repository storeVersion: self version]! - [:ea | - ea storeVersion: self version]! From commits at source.squeak.org Wed Nov 4 09:54:20 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:54:20 0000 Subject: [squeak-dev] The Trunk: System-ct.1133.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-ct.1133.mcz ==================== Summary ==================== Name: System-ct.1133 Author: ct Time: 3 February 2020, 11:55:06.856675 pm UUID: bd5c789a-39d3-574b-aa2a-0f900b3a8009 Ancestors: System-cmm.1131 Fix execution-around pattern to forward return value in some during methods So that Utilities useAuthorName: 'Squeak' during: [Utilities authorName] yields 'Squeak' but not Utilities. =============== Diff against System-cmm.1131 =============== Item was changed: ----- Method: Preferences class>>setFlag:toValue:during: (in category 'get/set - flags') ----- setFlag: prefSymbol toValue: aBoolean during: aBlock "Set the flag to the given value for the duration of aBlock" (self valueOfFlag: prefSymbol) in: [:previous | self setFlag: prefSymbol toValue: aBoolean. + ^ aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! - aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! Item was changed: ----- Method: Preferences class>>setPreference:toValue:during: (in category 'get/set') ----- setPreference: prefSymbol toValue: anObject during: aBlock (self valueOfPreference: prefSymbol) in: [:previous | self setPreference: prefSymbol toValue: anObject. + ^ aBlock ensure: [self setPreference: prefSymbol toValue: previous]]! - aBlock ensure: [self setPreference: prefSymbol toValue: previous]].! Item was changed: ----- Method: Utilities class>>useAuthorInitials:during: (in category 'identification') ----- useAuthorInitials: temporaryAuthorInitials during: aBlock | originalAuthorInitials | originalAuthorInitials := AuthorInitials. + [ AuthorInitials := temporaryAuthorInitials. + ^ aBlock value ] - [ - AuthorInitials := temporaryAuthorInitials. - aBlock value ] ensure: [ AuthorInitials := originalAuthorInitials ] ! Item was changed: ----- Method: Utilities class>>useAuthorName:during: (in category 'identification') ----- useAuthorName: temporaryAuthorName during: aBlock | originalAuthorName | originalAuthorName := AuthorName. + [ AuthorName := temporaryAuthorName. + ^ aBlock value ] - [ - AuthorName := temporaryAuthorName. - aBlock value ] ensure: [ AuthorName := originalAuthorName ] ! From commits at source.squeak.org Wed Nov 4 09:54:37 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 09:54:37 0000 Subject: [squeak-dev] The Trunk: System-nice.1128.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-nice.1128.mcz ==================== Summary ==================== Name: System-nice.1128 Author: nice Time: 9 December 2019, 6:25:31.07858 pm UUID: 8b2bd676-0898-c843-914e-039dde2db037 Ancestors: System-mt.1127 Nuke windows CE OS support. Let Win32 VM default to UTF32InputInterpreter rather than MacRomanInputInterpreter. Note: I think that this method is unused and is just adding confusion to already convoluted code... But it is difficult to analyze the source, so it's better to differ this after 5.3 release if unsure. Unless we have a good set of tests? =============== Diff against System-mt.1127 =============== Item was changed: ----- Method: Locale class>>defaultInputInterpreter (in category 'platform specific') ----- defaultInputInterpreter + | platformName | - | platformName osVersion | platformName := Smalltalk platformName. + platformName = 'Win32' ifTrue: [^UTF32InputInterpreter new]. - osVersion := Smalltalk getSystemAttribute: 1002. - (platformName = 'Win32' and: [osVersion = 'CE']) - ifTrue: [^NoInputInterpreter new]. - platformName = 'Win32' ifTrue: [^MacRomanInputInterpreter new]. ^NoInputInterpreter new! From marcel.taeumel at hpi.de Wed Nov 4 10:10:31 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 11:10:31 +0100 Subject: [squeak-dev] The Inbox: System-kfr.1161.mcz In-Reply-To: References: Message-ID: Hi Karl, hi all! So, this is proposing to virtually turn a FileExistsException into an ignored Notification if the user cancels the request. There are only 5 users in a recent Trunk image. Those don't seem to handle the ifNil-case very well. Other debuggers could appear and obfuscate the actual issue. I will move this to "treated" because it does not work. (Note that there is currently no easy way to cancel the control flow without opening a debugger that would work in Morphic and MVC. Would be a nice addition to ToolSet, though.) Best, Marcel Am 04.06.2020 23:06:11 schrieb commits at source.squeak.org : A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-kfr.1161.mcz ==================== Summary ==================== Name: System-kfr.1161 Author: kfr Time: 4 June 2020, 11:05:51.49313 pm UUID: 38776d4a-508a-7044-ab72-4cb34ceaceea Ancestors: System-mt.1160 Return nil instead of opening pre debugger =============== Diff against System-mt.1160 =============== Item was changed: ----- Method: StandardFileStream class>>fileExistsUserHandling:ifDebug: (in category '*System-Files-error handling') ----- fileExistsUserHandling: fullFileName ifDebug: debugBlock | dir localName choice newName newFullFileName | dir := FileDirectory forFileName: fullFileName. localName := FileDirectory localNameFor: fullFileName. choice := (UIManager default chooseFrom: #('overwrite that file' 'append (risky!!!!)' 'choose another name' 'debug' 'cancel') title: localName, ' already exists.'). choice = 1 ifTrue: [ dir deleteFileNamed: localName ifAbsent: [self error: 'Could not delete the old version of that file']. ^ self new open: fullFileName forWrite: true]. choice = 2 ifTrue: [ ^ (self new open: fullFileName forWrite: true) setToEnd]. choice = 3 ifTrue: [ newName := UIManager default request: 'Enter a new file name' initialAnswer: fullFileName. newFullFileName := self fullName: newName. ^ self newFileNamed: newFullFileName]. choice = 4 ifTrue: [^ debugBlock value]. + choice = 5 ifTrue: [^ nil].! - self error: 'Please close this to abort file opening'! -------------- next part -------------- An HTML attachment was scrubbed... URL: From leves at caesar.elte.hu Wed Nov 4 10:33:04 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed, 4 Nov 2020 11:33:04 +0100 (CET) Subject: [squeak-dev] The Trunk: System-ct.1133.mcz In-Reply-To: References: Message-ID: It would be nice if #in: was not used when a temporary variable does the job. And all those returns from inside the blocks can be avoided by returning what the block would return (see example below if not clear). Levente On Wed, 4 Nov 2020, commits at source.squeak.org wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-ct.1133.mcz > > ==================== Summary ==================== > > Name: System-ct.1133 > Author: ct > Time: 3 February 2020, 11:55:06.856675 pm > UUID: bd5c789a-39d3-574b-aa2a-0f900b3a8009 > Ancestors: System-cmm.1131 > > Fix execution-around pattern to forward return value in some during methods > > So that > Utilities useAuthorName: 'Squeak' during: [Utilities authorName] > yields > 'Squeak' > but not > Utilities. > > =============== Diff against System-cmm.1131 =============== > > Item was changed: > ----- Method: Preferences class>>setFlag:toValue:during: (in category 'get/set - flags') ----- > setFlag: prefSymbol toValue: aBoolean during: aBlock > "Set the flag to the given value for the duration of aBlock" > > (self valueOfFlag: prefSymbol) in: [:previous | > self setFlag: prefSymbol toValue: aBoolean. > + ^ aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! > - aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! > > Item was changed: > ----- Method: Preferences class>>setPreference:toValue:during: (in category 'get/set') ----- > setPreference: prefSymbol toValue: anObject during: aBlock > > (self valueOfPreference: prefSymbol) in: [:previous | > self setPreference: prefSymbol toValue: anObject. > + ^ aBlock ensure: [self setPreference: prefSymbol toValue: previous]]! > - aBlock ensure: [self setPreference: prefSymbol toValue: previous]].! > > Item was changed: > ----- Method: Utilities class>>useAuthorInitials:during: (in category 'identification') ----- > useAuthorInitials: temporaryAuthorInitials during: aBlock > > | originalAuthorInitials | > originalAuthorInitials := AuthorInitials. > + [ AuthorInitials := temporaryAuthorInitials. > + ^ aBlock value ] ^[ AuthorName := temporaryAuthorName. aBlock value ] > - [ > - AuthorInitials := temporaryAuthorInitials. > - aBlock value ] > ensure: [ AuthorInitials := originalAuthorInitials ] > ! > > Item was changed: > ----- Method: Utilities class>>useAuthorName:during: (in category 'identification') ----- > useAuthorName: temporaryAuthorName during: aBlock > > | originalAuthorName | > originalAuthorName := AuthorName. > + [ AuthorName := temporaryAuthorName. > + ^ aBlock value ] > - [ > - AuthorName := temporaryAuthorName. > - aBlock value ] > ensure: [ AuthorName := originalAuthorName ] > ! From commits at source.squeak.org Wed Nov 4 10:39:13 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:39:13 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1359.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1359.mcz ==================== Summary ==================== Name: Kernel-ct.1359 Author: ct Time: 1 November 2020, 7:50:24.183428 pm UUID: 3b12b316-79f3-de41-8765-8296d964b821 Ancestors: Kernel-mt.1353 Revise and extend Context #runSimulated: implementation. Remove restriction to blocks that do not have a method return. Add support for exception signaling during the execution, which caused unterminated simulation of the calling process in the past. Support argless contextAtEachStep blocks. Benchmarks: code: [Context runSimulated: [100 at 100 corner: 200 at 200]] bench before: 16.7 ms/run after: 19.8 ms/run I think this should be okay, given the fact that the primary purpose of simulation is providing explorability but not efficiency ... =============== Diff against Kernel-mt.1353 =============== Item was changed: ----- Method: Context class>>runSimulated: (in category 'simulation') ----- runSimulated: aBlock + "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns." - "Simulate the execution of the argument, current. Answer the result it - returns." ^ thisContext sender runSimulated: aBlock + contextAtEachStep: [] - contextAtEachStep: [:ignored] "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- + runSimulated: aBlock contextAtEachStep: anotherBlock + "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." + + | current resume ensure | + resume := false. - runSimulated: aBlock contextAtEachStep: block2 - "Simulate the execution of the argument, aBlock, until it ends. aBlock - MUST NOT contain an '^'. Evaluate block2 with the current context - prior to each instruction executed. Answer the simulated value of aBlock." - | current | - aBlock hasMethodReturn - ifTrue: [self error: 'simulation of blocks with ^ can run loose']. current := aBlock asContext. + ensure := current insertSender: (Context contextEnsure: [resume := true]). + ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead." + + (anotherBlock numArgs = 0 + ifTrue: ["optimized" [resume]] + ifFalse: ["stop execution on time, don't expose simulation details to caller" + [current == ensure or: + ["Context >> #resume:" + current size >= 2 and: + [(current at: 2) == ensure]]] ]) - current pushArgs: Array new from: self. - [current == self] whileFalse: + [anotherBlock cull: current. - [block2 value: current. current := current step]. + + ^ current jump! - ^self pop! From commits at source.squeak.org Wed Nov 4 10:39:25 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:39:25 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1357.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1357.mcz ==================== Summary ==================== Name: Kernel-ct.1357 Author: ct Time: 28 October 2020, 9:30:35.577652 pm UUID: efd94ae0-26ab-0c4f-b854-52f414ff2d3e Ancestors: Kernel-eem.1354 Implement missing simulation of objects as methods. In the past, it was not possible to debug/simulate code that used objects as methods properly. (Thanks to Marcel for the hint!) This very simple commit adds support of the OaM protocol [1] to the simulation machinery. Now you can debug all tests in TestObjectsAsMethods as you would expect, instead of crashing your image! Update: Uploaded a third time, this time with Kent Beck block formatting preserved. [1] "The [Objects as Methods] contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the original selector, arguments, and receiver.". DOI: 10.1145/2991041.2991062. =============== Diff against Kernel-eem.1354 =============== Item was changed: ----- Method: Context>>send:to:with:lookupIn: (in category 'controlling') ----- send: selector to: rcvr with: arguments lookupIn: lookupClass + "Simulate the action of sending a message with selector and arguments to rcvr. The argument, lookupClass, is the class in which to lookup the message. This is the receiver's class for normal messages, but for super messages it will be some specific class related to the source method." - "Simulate the action of sending a message with selector and arguments - to rcvr. The argument, lookupClass, is the class in which to lookup the - message. This is the receiver's class for normal messages, but for super - messages it will be some specific class related to the source method." | meth primIndex val ctxt | (meth := lookupClass lookupSelector: selector) ifNil: [^self send: #doesNotUnderstand: to: rcvr with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass} lookupIn: lookupClass]. + + meth isCompiledMethod ifFalse: + ["Object as Methods (OaM) protocol: 'The contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the original selector, arguments, and receiver.'. DOI: 10.1145/2991041.2991062." + ^ self send: #run:with:in: + to: meth + with: {selector. arguments. rcvr}]. + + meth numArgs = arguments size ifFalse: + [^ self error: ('Wrong number of arguments in simulated message {1}' translated format: {selector})]. - meth numArgs ~= arguments size ifTrue: - [^self error: 'Wrong number of arguments in simulated message ', selector printString]. (primIndex := meth primitive) > 0 ifTrue: [val := self doPrimitive: primIndex method: meth receiver: rcvr args: arguments. + (self isPrimFailToken: val) ifFalse: - (self isPrimFailToken: val) ifFalse: [^val]]. + (selector == #doesNotUnderstand: and: [lookupClass == ProtoObject]) ifTrue: + [^ self error: ('Simulated message {1} not understood' translated format: {arguments first selector})]. + - [^self error: 'Simulated message ', arguments first selector, ' not understood']. ctxt := Context sender: self receiver: rcvr method: meth arguments: arguments. + (primIndex notNil and: [primIndex > 0]) ifTrue: - primIndex > 0 ifTrue: [ctxt failPrimitiveWith: val]. + ^ctxt! From commits at source.squeak.org Wed Nov 4 10:39:42 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:39:42 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1338.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1338.mcz ==================== Summary ==================== Name: Kernel-ct.1338 Author: ct Time: 22 August 2020, 8:18:22.970378 pm UUID: 2ab1921f-016a-7044-9b35-75f940130863 Ancestors: Kernel-dtl.1336 Break dependents when copying a model For the full discussion, see this thread: http://forum.world.st/Bug-in-copy-td5120761.html =============== Diff against Kernel-dtl.1336 =============== Item was added: + ----- Method: Model>>postCopy (in category 'copying') ----- + postCopy + + super postCopy. + self breakDependents.! From commits at source.squeak.org Wed Nov 4 10:39:54 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:39:54 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1300.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1300.mcz ==================== Summary ==================== Name: Kernel-ct.1300 Author: ct Time: 16 February 2020, 4:53:53.7 pm UUID: f7fb9fc4-63e9-2c41-b97a-6928d5d0d08b Ancestors: Kernel-tonyg.1293 Fix multiple typos in BlockClosure and FullBlockClosure documentation =============== Diff against Kernel-tonyg.1293 =============== Item was changed: ----- Method: BlockClosure>>reentrant (in category 'private') ----- reentrant "Answer a version of the recever that can be reentered. + Closures are reentrant (unlike BlockContext), so simply answer self." - Closures are reentrant (unlike BlockContect) so simply answer self." ^self! Item was changed: BlockClosure variableSubclass: #FullBlockClosure instanceVariableNames: 'receiver' classVariableNames: '' poolDictionaries: '' category: 'Kernel-Methods'! + !FullBlockClosure commentStamp: 'ct 2/14/2020 15:56' prior: 0! + Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ..., valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to build control structures where a sequence of statements are evaluated or not depending on other values in the program. - !FullBlockClosure commentStamp: 'eem 4/10/2017 11:18' prior: 0! - Instances of FullBlockClosure represent blocks, a sequence of statements inside square brackets that can be evaluated at any time via one of the value messages (value, value:, value:value:, ... valueWithArguments:), which answer their last statement. Blocks therefore allow deferred evaluation and so are used to buikld control structures where a sequence of statements are evaluated or not depending on other values in the program. FullBlockClosure is a refinement of BlockClosure that allows the block to use its own method to hold its code instead of embedding that code within its home method. + Implementation notes: - Implementation: A FullBlockClosure is a closure that can be independent of any outerContext if desired. It has its own method (currently reusing the startpc inst var) and its own receiver. outerContext can be either a Context or nil. + This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work, aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks. - This closure design, implemented by Eliot Miranda and Clement Bera along with the sista work aims to simplify the block closure model while enhacing its capabilities. It allows lazy decompilation of closures and fast machine code dispatch in Cog's JIT, while allowing inlining of methods and blocks to be independent from their enclosing blocks. At closure creation time, the bytecode specifies: - the compiledBlock to execute when executing this block's code (in the literal frame) - if the receiver is the current receiver or a receiver passed on stack before the copied values. - if the closure needs an outerContext. outerContexts are used for non local returns and debugging. Blocks with non local returns have to set their outerContext. For other blocks (97% of blocks), it's a trade-off between performance and debuggability. Instance Variables (inherited) numArgs outerContext: compiledBlock(startpc) Instance Variables receiver: numArgs - the number of arguments the block expects. This is superfluous; the number of arguments can be obtained from the receiver's compiledBlock. outerContext - the Context of the method or block activation in which the receiver is created. compiledBlock(startpc) - reused to refer to the CompiledBlock that implements the receiver's code. receiver - the receiver of the message that created the block's home method activation.! From commits at source.squeak.org Wed Nov 4 10:40:02 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:40:02 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1299.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1299.mcz ==================== Summary ==================== Name: Kernel-ct.1299 Author: ct Time: 16 February 2020, 4:26:42.224 pm UUID: b1c9f40a-a7ea-9a4e-a502-268cb22592e7 Ancestors: Kernel-tonyg.1293 Refactor #valueSupplyingAnswers:: - Don't reinvent the wheel of Exception >> #pass - Use #ifError: See also http://forum.world.st/The-Trunk-Kernel-mt-1283-mcz-td5107403.html. =============== Diff against Kernel-tonyg.1293 =============== Item was changed: ----- Method: BlockClosure>>valueSupplyingAnswers: (in category 'evaluating') ----- valueSupplyingAnswers: aListOfPairs + "Evaluate the receiver using a list of questions / answers that might be called upon to automatically respond to Object>>confirm: or FillInTheBlank requests" - "evaluate the block using a list of questions / answers that might be called upon to - automatically respond to Object>>confirm: or FillInTheBlank requests" + ^ self on: ProvideAnswerNotification do: [ :notification | + | caption | + caption := notification messageText withSeparatorsCompacted. "to remove new lines" + aListOfPairs + detect: [ :each | + caption = each first + or: [ (caption includesSubstring: each first caseSensitive: false) + or: [ (each first match: caption) + or: [ (caption respondsTo: #matchesRegex:) + and: [ [caption matchesRegex: each first] ifError: [false] ] ] ] ] ] + ifFound: [ :answer | notification resume: answer second ] + ifNone: [ notification pass ] ]! - ^self - on: ProvideAnswerNotification - do: [ :notification | - | caption | - caption := notification messageText withSeparatorsCompacted. "to remove new lines" - aListOfPairs - detect: [ :each | - caption = each first - or: [ (caption includesSubstring: each first caseSensitive: false) - or: [ (each first match: caption) - or: [ (caption respondsTo: #matchesRegex:) - and: [ [caption matchesRegex: each first] on: Error do: [false] ] ] ] ] ] - ifFound: [ :answer | notification resume: answer second ] - ifNone: [ - (ProvideAnswerNotification signal: notification messageText) - ifNil: [ notification resume ] - ifNotNil: [ :outerAnswer | notification resume: outerAnswer ] ] ]! From commits at source.squeak.org Wed Nov 4 10:40:26 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:40:26 0000 Subject: [squeak-dev] The Trunk: Kernel-ct.1295.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ct.1295.mcz ==================== Summary ==================== Name: Kernel-ct.1295 Author: ct Time: 24 January 2020, 5:20:51.814415 pm UUID: 18ea3b5d-ee42-2944-9d01-aa48e43207a7 Ancestors: Kernel-nice.1292 Extends BlockClosure >> #whileNil: by returning the final non-nil value. Adds #whileNil analogous to #whileTrue and #whileFalse. [Project uiManager chooseFrom: #(foo bar) values: #(Foo Bar)] whileNil. [Project uiManager chooseFrom: #(foo bar) values: #(Foo Bar)] whileNil: [self inform: 'You have to decide!'] =============== Diff against Kernel-nice.1292 =============== Item was added: + ----- Method: BlockClosure>>whileNil (in category 'controlling') ----- + whileNil + "Unlike #whileTrue/False this is not compiled inline." + | result | + [(result := self value) isNil] whileTrue. + ^ result + ! Item was changed: ----- Method: BlockClosure>>whileNil: (in category 'controlling') ----- whileNil: aBlock "Unlike #whileTrue/False: this is not compiled inline." + | result | + [(result := self value) isNil] whileTrue: [aBlock value]. + ^ result - ^ [self value isNil] whileTrue: [aBlock value] ! From commits at source.squeak.org Wed Nov 4 10:41:15 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:41:15 0000 Subject: [squeak-dev] The Trunk: Kernel-spfa.1312.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-spfa.1312.mcz ==================== Summary ==================== Name: Kernel-spfa.1312 Author: spfa Time: 8 March 2020, 2:22:41.860727 pm UUID: 69693489-ed71-fa41-ad62-441618120c9c Ancestors: Kernel-nice.1311 Make comparing two near-zero numbers follow the same logic as comparing a near-zero number and zero. =============== Diff against Kernel-nice.1311 =============== Item was changed: ----- Method: Float>>closeTo: (in category 'comparing') ----- closeTo: num "are these two numbers close?" num isNumber ifFalse: [^[self = num] ifError: [false]]. self = 0.0 ifTrue: [^num abs < 0.0001]. num = 0 ifTrue: [^self abs < 0.0001]. + ^self = num asFloat or: [ + | abs | + (abs := self abs) < 0.0001 ifTrue: [^num abs < 0.0001]. + (self - num) abs / (abs max: num abs) < 0.0001]! - ^self = num asFloat - or: [(self - num) abs / (self abs max: num abs) < 0.0001]! From commits at source.squeak.org Wed Nov 4 10:41:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:41:55 0000 Subject: [squeak-dev] The Trunk: Kernel-dtl.1310.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-dtl.1310.mcz ==================== Summary ==================== Name: Kernel-dtl.1310 Author: dtl Time: 6 March 2020, 7:29:11.316779 pm UUID: 683e4e14-fc18-4d55-a776-eece91f579f5 Ancestors: Kernel-mt.1309 Change the Squeak default bytecode set to Sista in trunk. Add CompiledCode>>multipleBytecodeSetsActive: to optionally inform the VM that Sista is in use, see VMMaker.oscog-dtl.2711 and http://lists.squeakfoundation.org/pipermail/vm-dev/2020-January/032441.html. Add CompiledCode>>useSista: convenience method for switching to and from Sista bytecodes. Package postscript activates the change to Sista bytecodes, which can be reversed by evaluating CompiledCode useSista: false. =============== Diff against Kernel-mt.1309 =============== Item was added: + ----- Method: CompiledCode class>>multipleBytecodeSetsActive: (in category 'method encoding') ----- + multipleBytecodeSetsActive: aBoolean + "Inform the VM when multiple bytecode sets, typically the Sista bytecodes + in addition to the traditional V3 bytecode set, are now in use is this image. + The VM may use this information to update the image format number when + saving the image to the file system." + + + ! Item was added: + ----- Method: CompiledCode class>>useSista: (in category 'method encoding') ----- + useSista: useSistaEncoder + "Switch to or from the Sista bytecode encoder, and recompile the system + using that encoder. Assumes that Compiler recompileAll is working for the + existing system. Assumes that the currently available primary and secondary + bytecode encoders are EncoderForV3PlusClosures and EncoderForSistaV1. + This is a convenience method that must be updated as the available encoders + are changed." + + "CompiledCode useSista: true" + "CompiledCode useSista: false" + + | standardEncoder sistaEncoder activeEncoder | + standardEncoder := Smalltalk classNamed: #EncoderForV3PlusClosures. + sistaEncoder := Smalltalk classNamed: #EncoderForSistaV1. + activeEncoder := self preferredBytecodeSetEncoderClass. + useSistaEncoder + ifTrue: [sistaEncoder ifNil: [self error: 'EncoderForSistaV1 not present in this image']. + self preferredBytecodeSetEncoderClass: sistaEncoder. + activeEncoder ~= sistaEncoder + ifTrue: [(Smalltalk classNamed: #Compiler) recompileAll. + self multipleBytecodeSetsActive: true "VM should support Sista plus V3" ]] + ifFalse: [standardEncoder ifNil: [self error: 'EncoderForV3PlusClosures not present in this image']. + self preferredBytecodeSetEncoderClass: standardEncoder. + activeEncoder ~= standardEncoder + ifTrue: [(Smalltalk classNamed: #Compiler) recompileAll. + self multipleBytecodeSetsActive: false "VM needs to support V3 only" ]]. + + ! Item was changed: + (PackageInfo named: 'Kernel') postscript: '"Activate Sista bytecodes in the image" + + CompiledCode useSista: true. + '! - (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package" - "Since Kernel-eem.1198 redefines LargePositiveInteger hash, - rehash all hashed collections that contain hashed large integers." - HashedCollection allSubclassesDo: - [:c| | f | - f := (c includesBehavior: Set) - ifTrue: [[:i| i]] - ifFalse: [[:i| i keys]]. - c allInstancesDo: - [:h| - ((f value: h) detect: [:e| e isInteger and: [e class ~~ SmallInteger]] ifNone: nil) ifNotNil: - [h rehash]]]'! From commits at source.squeak.org Wed Nov 4 10:42:54 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:42:54 0000 Subject: [squeak-dev] The Trunk: Kernel-nice.1295.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1295.mcz ==================== Summary ==================== Name: Kernel-nice.1295 Author: nice Time: 17 February 2020, 6:59:12.589583 pm UUID: 7b8c61b2-fd1d-473e-9536-57f78a6ec152 Ancestors: Kernel-tonyg.1293 Fast-up isAnExactFloat. Correct a typo in a comment. =============== Diff against Kernel-tonyg.1293 =============== Item was changed: ----- Method: Integer>>isAnExactFloat (in category 'testing') ----- isAnExactFloat "Answer true if this Integer can be converted exactly to a Float" | h | (h := self highBitOfMagnitude) <= Float precision ifTrue: [^ true]. ^ h - 1 <= Float emax + and: [(self anyBitOfMagnitudeFrom: 1 to: h - Float precision) not]! - and: [h - self abs lowBit < Float precision]! Item was changed: ----- Method: NumberParser>>makeFloatFromMantissa:exponent:base: (in category 'parsing-private') ----- makeFloatFromMantissa: m exponent: k base: aRadix + "Convert infinite precision arithmetic into limited precision Floating point. + This algorithm rely on correct IEEE rounding mode - "Convert infinite precision arithmetic into Floating point. - This alogrithm rely on correct IEEE rounding mode being implemented in Integer>>asFloat and Fraction>>asFloat" k = 0 ifTrue: [ ^m asFloat ]. k > 0 ifTrue: [ ^(m * (aRadix raisedToInteger: k)) asFloat ]. ^(Fraction numerator: m denominator: (aRadix raisedToInteger: k negated)) asFloat! From marcel.taeumel at hpi.de Wed Nov 4 10:44:23 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 11:44:23 +0100 Subject: [squeak-dev] Note on recent inbox clean-up Message-ID: Hi all! I just moved over all Kernel Inbox versions that where already in Trunk. Please move, not copy. Thanks! :-) Best, Marcel -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Wed Nov 4 10:50:18 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 10:50:18 0000 Subject: [squeak-dev] The Trunk: System-mt.1188.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1188.mcz ==================== Summary ==================== Name: System-mt.1188 Author: mt Time: 4 November 2020, 11:50:14.56762 am UUID: 57645a78-976f-ed45-b29d-0a3263b10d3d Ancestors: System-mt.1187 Minor clean up and speed up. =============== Diff against System-mt.1187 =============== Item was changed: ----- Method: Preferences class>>setPreference:toValue:during: (in category 'get/set') ----- setPreference: prefSymbol toValue: anObject during: aBlock + | previousValue | + previousValue := self valueOfPreference: prefSymbol. + self setPreference: prefSymbol toValue: anObject. + ^ aBlock ensure: [self setPreference: prefSymbol toValue: previousValue]! - (self valueOfPreference: prefSymbol) in: [:previous | - self setPreference: prefSymbol toValue: anObject. - ^ aBlock ensure: [self setPreference: prefSymbol toValue: previous]]! From marcel.taeumel at hpi.de Wed Nov 4 10:51:12 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 11:51:12 +0100 Subject: [squeak-dev] The Trunk: System-ct.1133.mcz In-Reply-To: References: Message-ID: Hi Levente, thanks for the suggestion. I just tried to follow it in System-mt.1188. Best, Marcel Am 04.11.2020 11:33:21 schrieb Levente Uzonyi : It would be nice if #in: was not used when a temporary variable does the job. And all those returns from inside the blocks can be avoided by returning what the block would return (see example below if not clear). Levente On Wed, 4 Nov 2020, commits at source.squeak.org wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-ct.1133.mcz > > ==================== Summary ==================== > > Name: System-ct.1133 > Author: ct > Time: 3 February 2020, 11:55:06.856675 pm > UUID: bd5c789a-39d3-574b-aa2a-0f900b3a8009 > Ancestors: System-cmm.1131 > > Fix execution-around pattern to forward return value in some during methods > > So that > Utilities useAuthorName: 'Squeak' during: [Utilities authorName] > yields > 'Squeak' > but not > Utilities. > > =============== Diff against System-cmm.1131 =============== > > Item was changed: > ----- Method: Preferences class>>setFlag:toValue:during: (in category 'get/set - flags') ----- > setFlag: prefSymbol toValue: aBoolean during: aBlock > "Set the flag to the given value for the duration of aBlock" > > (self valueOfFlag: prefSymbol) in: [:previous | > self setFlag: prefSymbol toValue: aBoolean. > + ^ aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! > - aBlock ensure: [self setFlag: prefSymbol toValue: previous]].! > > Item was changed: > ----- Method: Preferences class>>setPreference:toValue:during: (in category 'get/set') ----- > setPreference: prefSymbol toValue: anObject during: aBlock > > (self valueOfPreference: prefSymbol) in: [:previous | > self setPreference: prefSymbol toValue: anObject. > + ^ aBlock ensure: [self setPreference: prefSymbol toValue: previous]]! > - aBlock ensure: [self setPreference: prefSymbol toValue: previous]].! > > Item was changed: > ----- Method: Utilities class>>useAuthorInitials:during: (in category 'identification') ----- > useAuthorInitials: temporaryAuthorInitials during: aBlock > > | originalAuthorInitials | > originalAuthorInitials := AuthorInitials. > + [ AuthorInitials := temporaryAuthorInitials. > + ^ aBlock value ] ^[ AuthorName := temporaryAuthorName. aBlock value ] > - [ > - AuthorInitials := temporaryAuthorInitials. > - aBlock value ] > ensure: [ AuthorInitials := originalAuthorInitials ] > ! > > Item was changed: > ----- Method: Utilities class>>useAuthorName:during: (in category 'identification') ----- > useAuthorName: temporaryAuthorName during: aBlock > > | originalAuthorName | > originalAuthorName := AuthorName. > + [ AuthorName := temporaryAuthorName. > + ^ aBlock value ] > - [ > - AuthorName := temporaryAuthorName. > - aBlock value ] > ensure: [ AuthorName := originalAuthorName ] > ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Wed Nov 4 10:52:55 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 4 Nov 2020 11:52:55 +0100 Subject: [squeak-dev] Note on recent inbox clean-up In-Reply-To: References: Message-ID: Hi Marcel, months ago, I'm pretty sure that I did similar clean up, but I had the impression that some files did come back... Such clean-up is very important because any extra file in inbox costs reviewers time which is a very scarce resource. If possible it should be scripted because it's really time consuming to clean up via web interface. Le mer. 4 nov. 2020 à 11:44, Marcel Taeumel a écrit : > Hi all! > > I just moved over all Kernel Inbox versions that where already in Trunk. > Please move, not copy. Thanks! :-) > > Best, > Marcel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Wed Nov 4 11:01:38 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 12:01:38 +0100 Subject: [squeak-dev] Note on recent inbox clean-up In-Reply-To: References: Message-ID: Hi Nicolas. > If possible it should be scripted because it's really time consuming to clean up via web interface. Most of the cases, I suppose, are that copy-vs-move mistake. We do need a "move" button in the MC GUI.  Best, Marcel Am 04.11.2020 11:53:15 schrieb Nicolas Cellier : Hi Marcel, months ago, I'm pretty sure that I did similar clean up, but I had the impression that some files did come back... Such clean-up is very important because any extra file in inbox costs reviewers time which is a very scarce resource. If possible it should be scripted because it's really time consuming to clean up via web interface. Le mer. 4 nov. 2020 à 11:44, Marcel Taeumel a écrit : Hi all! I just moved over all Kernel Inbox versions that where already in Trunk. Please move, not copy. Thanks! :-) Best, Marcel -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Wed Nov 4 14:53:09 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 14:53:09 0000 Subject: [squeak-dev] The Trunk: HelpSystem-Core-mt.121.mcz Message-ID: Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-mt.121.mcz ==================== Summary ==================== Name: HelpSystem-Core-mt.121 Author: mt Time: 4 November 2020, 3:53:08.89062 pm UUID: 7d6ada3e-f323-2142-aae9-dba673c642de Ancestors: HelpSystem-Core-mt.120 Adds a blurb to custom help books. Thanks to Karl (kfr) for the idea! (HelpSystem-Core-kfr.74 will be moved to treated) =============== Diff against HelpSystem-Core-mt.120 =============== Item was changed: ----- Method: ClassBasedHelpTopic>>contents (in category 'accessing') ----- contents - "A book has no contents. Only its pages do." + ^ helpClass bookBlurb! - ^ ''! Item was added: + ----- Method: CustomHelp class>>bookBlurb (in category 'accessing') ----- + bookBlurb + "Returns a short summary of the custom help book" + + ^ self organization classComment! Item was changed: ----- Method: CustomHelp class>>bookName (in category 'accessing') ----- bookName "Returns the name of the custom help book" + ^ self name! - ^'Help'! From commits at source.squeak.org Wed Nov 4 14:57:48 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 14:57:48 0000 Subject: [squeak-dev] The Trunk: Monticello-bf.540.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-bf.540.mcz ==================== Summary ==================== Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539 This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version. =============== Diff against Monticello-fbs.539 =============== Item was added: + ----- Method: MCPatch>>ignoring: (in category 'accessing') ----- + ignoring: ignoredOperations + ^ MCPatch operations: (operations difference: ignoredOperations)! Item was added: + Notification subclass: #MCRepositoryRequest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Monticello-UI'! Item was changed: + MCPatchBrowser subclass: #MCSaveVersionDialog + instanceVariableNames: 'name message ignore' - MCTool subclass: #MCSaveVersionDialog - instanceVariableNames: 'name message' classVariableNames: '' poolDictionaries: '' category: 'Monticello-UI'! Item was changed: ----- Method: MCSaveVersionDialog>>accept (in category 'as yet unclassified') ----- accept self answer: (Array with: (self findTextMorph: #versionName) text asString + with: (self findTextMorph: #logMessage) text asString + with: ignore) + ! - with: (self findTextMorph: #logMessage) text asString) - ! Item was changed: ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') ----- defaultExtent + ^ 600 at 600! - ^ 400 at 300! Item was added: + ----- Method: MCSaveVersionDialog>>ignore (in category 'as yet unclassified') ----- + ignore + ^ ignore ifNil: [ignore := Set new]! Item was added: + ----- Method: MCSaveVersionDialog>>ignoreSelection (in category 'as yet unclassified') ----- + ignoreSelection + selection + ifNil: [ignore size = items size + ifFalse: [ignore addAll: items] + ifTrue: [ignore removeAll]] + ifNotNil: [ + ignore remove: selection ifAbsent: [ + ignore add: selection]. + self selection < items size + ifTrue: [self selection: self selection + 1]]. + self changed: #list + ! Item was added: + ----- Method: MCSaveVersionDialog>>installSelection (in category 'as yet unclassified') ----- + installSelection + super installSelection. + selection ifNotNil: [ + ignore remove: selection ifAbsent: []. + self changed: #list]. + + ! Item was added: + ----- Method: MCSaveVersionDialog>>list (in category 'as yet unclassified') ----- + list + ^ self items collect: [:ea | + (self ignore includes: ea) + ifFalse: [ea summary] + ifTrue: [Text string: '( ', ea summary, ' )' attribute: TextEmphasis struckOut ]]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'as yet unclassified') ----- + methodListKey: aKeystroke from: aListMorph + aKeystroke caseOf: { + [$I] -> [self ignoreSelection]. + } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet unclassified') ----- + methodListMenu: aMenu + aMenu addList:#( + ('ignore (I)' ignoreSelection 'Do not include this change when saving') + -). + super methodListMenu: aMenu. + ^aMenu! Item was added: + ----- Method: MCSaveVersionDialog>>revertSelection (in category 'as yet unclassified') ----- + revertSelection + super revertSelection. + selection ifNotNil: [ + ignore add: selection. + self changed: #list]. + ! Item was changed: ----- Method: MCSaveVersionDialog>>widgetSpecs (in category 'as yet unclassified') ----- widgetSpecs ^ #( ((textMorph: versionName) (0 0 1 0) (0 0 0 30)) + ((textMorph: logMessage) (0 0 1 0.3) (0 30 0 -30)) + ((buttonRow) (0 0.3 1 0.3) (0 -40 0 0)) + ((listMorph:selection:menu:keystroke: list selection methodListMenu: methodListKey:from:) (0 0.3 1 0.6) (0 0 0 0)) + ((textMorph: text) (0 0.6 1 1) (0 0 0 0)) - ((textMorph: logMessage) (0 0 1 1) (0 30 0 -30)) - ((buttonRow) (0 1 1 1) (0 -40 0 0)) )! Item was changed: ----- Method: MCTool>>showModally (in category 'morphic ui') ----- showModally modalProcess := Processor activeProcess. + self window openInWorldExtent: self defaultExtent. - self window openInWorldExtent: (400 at 400). [self window world notNil] whileTrue: [ self window outermostWorldMorph doOneCycle. ]. morph := nil. ^ modalValue! Item was changed: Notification subclass: #MCVersionNameAndMessageRequest + instanceVariableNames: 'suggestion initialMessage patch' - instanceVariableNames: 'suggestion initialMessage' classVariableNames: '' poolDictionaries: '' category: 'Monticello-Versioning'! Item was changed: ----- Method: MCVersionNameAndMessageRequest>>defaultAction (in category 'as yet unclassified') ----- defaultAction ^ MCSaveVersionDialog new versionName: suggestion; logMessage: initialMessage; + patch: patch; showModally! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch (in category 'as yet unclassified') ----- + patch + ^ patch! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch: (in category 'as yet unclassified') ----- + patch: aPatch + patch := aPatch + ! Item was changed: ----- Method: MCWorkingCopy>>newVersion (in category 'operations') ----- newVersion + | packageSnapshot parentSnapshot patch | + parentSnapshot := self parentSnapshot. + packageSnapshot := package snapshot. + patch := packageSnapshot patchRelativeToBase: parentSnapshot. ^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName + initialMessage: self patchMessageDefault + patch: patch) ifNotNil: + [:tuple | + self newVersionWithName: tuple first withBlanksTrimmed + message: (self patchMessageStripped: tuple second) + snapshot: (tuple third + ifEmpty: [packageSnapshot] + ifNotEmpty: [ + MCPatcher apply: (patch ignoring: tuple third) + to: parentSnapshot])] - initialMessage: self patchMessageSuggestion) ifNotNil: - [:pair | - self newVersionWithName: pair first withBlanksTrimmed - message: (self patchMessageStripped: pair last)]. ! Item was changed: ----- Method: MCWorkingCopy>>newVersionWithName:message: (in category 'operations') ----- newVersionWithName: nameString message: messageString + ^self newVersionWithName: nameString message: messageString snapshot: package snapshot! - | info deps | - info := ancestry infoWithName: nameString message: messageString. - ancestry := MCWorkingAncestry new addAncestor: info. - self modified: true; modified: false. - - deps := self requiredPackages collect: - [:ea | - MCVersionDependency - package: ea - info: ea workingCopy currentVersionInfo]. - - ^ MCVersion - package: package - info: info - snapshot: package snapshot - dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>newVersionWithName:message:snapshot: (in category 'operations') ----- + newVersionWithName: nameString message: messageString snapshot: aSnapshot + | info deps clean | + info := ancestry infoWithName: nameString message: messageString. + ancestry := MCWorkingAncestry new addAncestor: info. + clean := (package snapshot patchRelativeToBase: aSnapshot) isEmpty. + self modified: clean; modified: clean not. "hack to ensure label is updated" + + deps := self requiredPackages collect: + [:ea | + MCVersionDependency + package: ea + info: ea workingCopy currentVersionInfo]. + + ^ MCVersion + package: package + info: info + snapshot: aSnapshot + dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- + parentSnapshot + "prefer parent in selected repository" + MCRepositoryRequest signal ifNotNil: [:repo | + self ancestors do: [:ancestor | + (repo versionWithInfo: ancestor) + ifNotNil: [:ver | ^ver snapshot]]]. + "otherwise, look in all repositories" + self ancestors do: [:ancestor | + (self repositoryGroup versionWithInfo: ancestor) + ifNotNil: [:ver | ^ver snapshot]]. + "otherwise" + ^MCSnapshot empty! Item was changed: ----- Method: MCWorkingCopy>>patchMessageChanges (in category 'operations') ----- patchMessageChanges + | changes | + changes := package snapshot patchRelativeToBase: self parentSnapshot. - | changes parentInfo parentSnapshot | - parentInfo := self ancestors - ifEmpty: [nil] - ifNotEmpty: [self ancestors first]. - parentSnapshot := self findSnapshotWithVersionInfo: parentInfo. - changes := package snapshot patchRelativeToBase: parentSnapshot. ^ (MCPatchMessage new patch: changes) message! Item was removed: - ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage: (in category 'private') ----- - requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString - ^ (MCVersionNameAndMessageRequest new - suggestedName: nameString; - initialMessage: msgString - ) signal! Item was added: + ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage:patch: (in category 'private') ----- + requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString patch: aPatch + ^ (MCVersionNameAndMessageRequest new + suggestedName: nameString; + initialMessage: msgString; + patch: aPatch + ) signal! Item was changed: ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') ----- saveVersion | repo | self canSave ifFalse: [^self]. self checkForNewerVersions ifFalse: [^self]. repo := self repository. + (self withRepository: repo do: [workingCopy newVersion]) ifNotNil: - workingCopy newVersion ifNotNil: [:v | (MCVersionInspector new version: v) show. Cursor wait showWhile: [repo storeVersion: v]. MCCacheRepository default cacheAllFileNamesDuring: [repo cacheAllFileNamesDuring: [v allAvailableDependenciesDo: [:dep | (repo includesVersionNamed: dep info name) ifFalse: [repo storeVersion: dep]]]]]! Item was added: + ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') ----- + withRepository: aRepository do: aBlock + ^aBlock + on: MCRepositoryRequest + do: [:req | req resume: aRepository]! From commits at source.squeak.org Wed Nov 4 14:58:01 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 14:58:01 0000 Subject: [squeak-dev] The Trunk: Monticello-bf.532.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-bf.532.mcz ==================== Summary ==================== Name: Monticello-bf.532 Author: bf Time: 24 January 2013, 4:05:51.496 pm UUID: 71bddd0f-d5ac-488b-a8e1-729f2a06474e Ancestors: Monticello-bf.531 Save dialog now shows a list of changes to be submitted. Clicking a list item shows a diff in the lower pane. Advanced users can also make this save ignore individual changes using the item's context menu. =============== Diff against Monticello-bf.531 =============== Item was added: + ----- Method: MCPatch>>ignoring: (in category 'accessing') ----- + ignoring: ignoredOperations + ^ MCPatch operations: (operations difference: ignoredOperations)! Item was changed: + MCPatchBrowser subclass: #MCSaveVersionDialog + instanceVariableNames: 'name message ignore' - MCTool subclass: #MCSaveVersionDialog - instanceVariableNames: 'name message' classVariableNames: '' poolDictionaries: '' category: 'Monticello-UI'! Item was changed: ----- Method: MCSaveVersionDialog>>accept (in category 'as yet unclassified') ----- accept self answer: (Array with: (self findTextMorph: #versionName) text asString + with: (self findTextMorph: #logMessage) text asString + with: ignore) + ! - with: (self findTextMorph: #logMessage) text asString) - ! Item was added: + ----- Method: MCSaveVersionDialog>>ignore (in category 'as yet unclassified') ----- + ignore + ^ ignore ifNil: [ignore := Set new]! Item was added: + ----- Method: MCSaveVersionDialog>>ignoreSelection (in category 'as yet unclassified') ----- + ignoreSelection + selection + ifNil: [ignore size = items size + ifFalse: [ignore addAll: items] + ifTrue: [ignore removeAll]] + ifNotNil: [ + ignore remove: selection ifAbsent: [ + ignore add: selection]]. + self changed: #list + ! Item was added: + ----- Method: MCSaveVersionDialog>>installSelection (in category 'as yet unclassified') ----- + installSelection + super installSelection. + selection ifNotNil: [ + ignore remove: selection ifAbsent: []. + self changed: #list]. + + ! Item was added: + ----- Method: MCSaveVersionDialog>>list (in category 'as yet unclassified') ----- + list + ^ self items collect: [:ea | + (self ignore includes: ea) + ifFalse: [ea summary] + ifTrue: [Text string: '( ', ea summary, ' )' attribute: TextEmphasis struckOut ]]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'as yet unclassified') ----- + methodListKey: aKeystroke from: aListMorph + aKeystroke caseOf: { + [$I] -> [self ignoreSelection]. + } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet unclassified') ----- + methodListMenu: aMenu + aMenu addList:#( + ('ignore (I)' ignoreSelection 'Do not include this change when saving') + -). + super methodListMenu: aMenu. + ^aMenu! Item was added: + ----- Method: MCSaveVersionDialog>>revertSelection (in category 'as yet unclassified') ----- + revertSelection + super revertSelection. + selection ifNotNil: [ + ignore add: selection. + self changed: #list]. + ! Item was changed: ----- Method: MCSaveVersionDialog>>widgetSpecs (in category 'as yet unclassified') ----- widgetSpecs ^ #( ((textMorph: versionName) (0 0 1 0) (0 0 0 30)) + ((textMorph: logMessage) (0 0 1 0.3) (0 30 0 -30)) + ((buttonRow) (0 0.3 1 0.3) (0 -40 0 0)) + ((listMorph:selection:menu:keystroke: list selection methodListMenu: methodListKey:from:) (0 0.3 1 0.6) (0 0 0 0)) + ((textMorph: text) (0 0.6 1 1) (0 0 0 0)) - ((textMorph: logMessage) (0 0 1 1) (0 30 0 -30)) - ((buttonRow) (0 1 1 1) (0 -40 0 0)) )! Item was changed: Notification subclass: #MCVersionNameAndMessageRequest + instanceVariableNames: 'suggestion initialMessage patch' - instanceVariableNames: 'suggestion initialMessage' classVariableNames: '' poolDictionaries: '' category: 'Monticello-Versioning'! Item was changed: ----- Method: MCVersionNameAndMessageRequest>>defaultAction (in category 'as yet unclassified') ----- defaultAction ^ MCSaveVersionDialog new versionName: suggestion; logMessage: initialMessage; + patch: patch; showModally! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch (in category 'as yet unclassified') ----- + patch + ^ patch! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch: (in category 'as yet unclassified') ----- + patch: aPatch + patch := aPatch + ! Item was changed: ----- Method: MCWorkingCopy>>newVersion (in category 'operations') ----- newVersion + | packageSnapshot parentSnapshot patch | + parentSnapshot := self parentSnapshot. + packageSnapshot := package snapshot. + patch := packageSnapshot patchRelativeToBase: parentSnapshot. ^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName + initialMessage: self patchMessageDefault + patch: patch) ifNotNil: + [:tuple | + self newVersionWithName: tuple first withBlanksTrimmed + message: (self patchMessageStripped: tuple second) + snapshot: (tuple third + ifEmpty: [packageSnapshot] + ifNotEmpty: [ + MCPatcher apply: (patch ignoring: tuple third) + to: parentSnapshot])] - initialMessage: self patchMessageSuggestion) ifNotNil: - [:pair | - self newVersionWithName: pair first withBlanksTrimmed - message: (self patchMessageStripped: pair last)]. ! Item was changed: ----- Method: MCWorkingCopy>>newVersionWithName:message: (in category 'operations') ----- newVersionWithName: nameString message: messageString + ^self newVersionWithName: nameString message: messageString snapshot: package snapshot! - | info deps | - info := ancestry infoWithName: nameString message: messageString. - ancestry := MCWorkingAncestry new addAncestor: info. - self modified: true; modified: false. - - deps := self requiredPackages collect: - [:ea | - MCVersionDependency - package: ea - info: ea workingCopy currentVersionInfo]. - - ^ MCVersion - package: package - info: info - snapshot: package snapshot - dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>newVersionWithName:message:snapshot: (in category 'operations') ----- + newVersionWithName: nameString message: messageString snapshot: aSnapshot + | info deps clean | + info := ancestry infoWithName: nameString message: messageString. + ancestry := MCWorkingAncestry new addAncestor: info. + clean := (package snapshot patchRelativeToBase: aSnapshot) isEmpty. + self modified: clean; modified: clean not. "hack to ensure label is updated" + + deps := self requiredPackages collect: + [:ea | + MCVersionDependency + package: ea + info: ea workingCopy currentVersionInfo]. + + ^ MCVersion + package: package + info: info + snapshot: aSnapshot + dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- + parentSnapshot + ^ self findSnapshotWithVersionInfo: (self ancestors + ifEmpty: [nil] + ifNotEmpty: [self ancestors first])! Item was changed: ----- Method: MCWorkingCopy>>patchMessageChanges (in category 'operations') ----- patchMessageChanges + | changes | + changes := package snapshot patchRelativeToBase: self parentSnapshot. - | changes parentInfo parentSnapshot | - parentInfo := self ancestors - ifEmpty: [nil] - ifNotEmpty: [self ancestors first]. - parentSnapshot := self findSnapshotWithVersionInfo: parentInfo. - changes := package snapshot patchRelativeToBase: parentSnapshot. ^ (MCPatchMessage new patch: changes) message! Item was removed: - ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage: (in category 'private') ----- - requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString - ^ (MCVersionNameAndMessageRequest new - suggestedName: nameString; - initialMessage: msgString - ) signal! Item was added: + ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage:patch: (in category 'private') ----- + requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString patch: aPatch + ^ (MCVersionNameAndMessageRequest new + suggestedName: nameString; + initialMessage: msgString; + patch: aPatch + ) signal! From commits at source.squeak.org Wed Nov 4 15:05:56 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:05:56 0000 Subject: [squeak-dev] The Trunk: Monticello-mt.732.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.732.mcz ==================== Summary ==================== Name: Monticello-mt.732 Author: mt Time: 4 November 2020, 4:05:55.79762 pm UUID: 6424345e-36b4-db44-90eb-de9c30a823d4 Ancestors: Monticello-mt.731 Catches a possible isNil error during ancestry stubbing. Thanks to Karl (kfr) for finding it! (Monticello-kfr.617 will be moved to treated) =============== Diff against Monticello-mt.731 =============== Item was changed: ----- Method: MCAncestry>>stubAncestryFor:using: (in category 'initialize-release') ----- stubAncestryFor: aMCWorkingCopy using: aMCRepository "childInfo was retrieved from aMCRepository. Replace my ancestry with a Proxy that can retrieve the full tree from these two elements." ancestors := ancestors collect: [ : each | each isMCInfoProxy ifTrue: [ each ] ifFalse: [ MCInfoProxy info: each copyWithTrimmedAncestry workingCopy: aMCWorkingCopy repository: aMCRepository ] ]. + stepChildren ifNotNil: + [ stepChildren := stepChildren collect: + [ : each | each isMCInfoProxy + ifTrue: [ each ] + ifFalse: + [ MCInfoProxy + info: each copyWithTrimmedAncestry + workingCopy: aMCWorkingCopy + repository: aMCRepository ] ] ]! - stepChildren := stepChildren collect: - [ : each | each isMCInfoProxy - ifTrue: [ each ] - ifFalse: - [ MCInfoProxy - info: each copyWithTrimmedAncestry - workingCopy: aMCWorkingCopy - repository: aMCRepository ] ]! From commits at source.squeak.org Wed Nov 4 15:08:21 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:08:21 0000 Subject: [squeak-dev] The Trunk: Morphic-nice.1625.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1625.mcz ==================== Summary ==================== Name: Morphic-nice.1625 Author: nice Time: 17 February 2020, 5:06:10.606532 pm UUID: 094e2566-ddfe-2340-8fab-2338d255e164 Ancestors: Morphic-mt.1624 Free our mind from un-initialized LayoutFrame. There should not be any such thing. Require Graphics-nice.425 =============== Diff against Morphic-mt.1624 =============== Item was changed: ----- Method: BorderedMorph>>addMorph:fullFrame: (in category 'resize handling') ----- addMorph: aMorph fullFrame: aLayoutFrame "Add aMorph according to aLayoutFrame." self cellGap > 0 ifTrue: [ | left right bottom top spacing | spacing := self cellGap. + left := aLayoutFrame leftOffset. + right := aLayoutFrame rightOffset. - left := aLayoutFrame leftOffset ifNil: [0]. - right := aLayoutFrame rightOffset ifNil: [0]. + bottom := aLayoutFrame bottomOffset. + top := aLayoutFrame topOffset. - bottom := aLayoutFrame bottomOffset ifNil: [0]. - top := aLayoutFrame topOffset ifNil: [0]. "Add a spacing to the frame if it is not top or leftmost." aLayoutFrame leftFraction = 0 ifFalse: [left := left + spacing] ifTrue: [ "Expect another, resizable widget besides me if I have a fixed width." aLayoutFrame hasFixedWidth ifTrue: [right := right - spacing]]. aLayoutFrame topFraction = 0 ifFalse: [top := top + spacing] ifTrue: [ "Expect another, resizable widget besides me if I have a fixed height." aLayoutFrame hasFixedHeight ifTrue: [bottom := bottom - spacing]]. aLayoutFrame topOffset: top; bottomOffset: bottom; leftOffset: left; rightOffset: right]. super addMorph: aMorph fullFrame: aLayoutFrame. self wantsPaneSplitters ifTrue: [self addPaneSplitters].! Item was changed: ----- Method: BorderedMorph>>addPaneHSplitterAtBottomOfRow: (in category 'resize handling') ----- addPaneHSplitterAtBottomOfRow: someMorphs | targetY minX maxX splitter | targetY := someMorphs first layoutFrame bottomFraction. minX := (someMorphs detectMin: [:each | each layoutFrame leftFraction]) layoutFrame leftFraction. maxX := (someMorphs detectMax: [:each | each layoutFrame rightFraction]) layoutFrame rightFraction. splitter := ProportionalSplitterMorph new beSplitsTopAndBottom; yourself. splitter layoutFrame: (LayoutFrame fractions: (minX @ targetY corner: maxX @ targetY) + offsets: (someMorphs first layoutFrame leftOffset @ 0 + corner: someMorphs first layoutFrame rightOffset @ AbstractResizerMorph gripThickness)). - offsets: ((someMorphs first layoutFrame leftOffset ifNil: [0]) @ 0 - corner: (someMorphs first layoutFrame rightOffset ifNil: [0]) @ AbstractResizerMorph gripThickness)). self addMorphBack: (splitter position: self position).! Item was changed: ----- Method: BorderedMorph>>addPaneVSplitterAtRightOfColumn: (in category 'resize handling') ----- addPaneVSplitterAtRightOfColumn: someMorphs | targetX minY maxY splitter | targetX := someMorphs first layoutFrame rightFraction. minY := (someMorphs detectMin: [:each | each layoutFrame topFraction]) layoutFrame topFraction. maxY := (someMorphs detectMax: [:each | each layoutFrame bottomFraction]) layoutFrame bottomFraction. splitter := ProportionalSplitterMorph new beSplitsLeftAndRight; yourself. splitter layoutFrame: (LayoutFrame fractions: (targetX @ minY corner: targetX @ maxY) + offsets: (0 @ (someMorphs first layoutFrame topOffset) + corner: (AbstractResizerMorph gripThickness@ (someMorphs first layoutFrame bottomOffset)))). - offsets: (0 @ (someMorphs first layoutFrame topOffset ifNil: [0]) - corner: (AbstractResizerMorph gripThickness@ (someMorphs first layoutFrame bottomOffset ifNil: [0])))). self addMorphBack: (splitter position: self position).! Item was changed: ----- Method: BorderedMorph>>linkSubmorphsToSplitters (in category 'resize handling') ----- linkSubmorphsToSplitters self splitters do: [:splitter | splitter splitsTopAndBottom ifTrue: [ self submorphsDo: [:morph | ((morph ~= splitter and: [morph layoutFrame bottomFraction = splitter layoutFrame topFraction]) and: [morph layoutFrame hasFixedHeight not + or: [(morph layoutFrame topOffset) < 0]]) - or: [(morph layoutFrame topOffset ifNil: [0]) < 0]]) ifTrue: [splitter addLeftOrTop: morph]. ((morph ~= splitter and: [morph layoutFrame topFraction = splitter layoutFrame bottomFraction]) and: [morph layoutFrame hasFixedHeight not + or: [(morph layoutFrame bottomOffset) > 0]]) - or: [(morph layoutFrame bottomOffset ifNil: [0]) > 0]]) ifTrue: [splitter addRightOrBottom: morph]]]. splitter splitsLeftAndRight ifTrue: [ self submorphsDo: [:morph | ((morph ~= splitter and: [morph layoutFrame rightFraction = splitter layoutFrame leftFraction]) and: [morph layoutFrame hasFixedWidth not + or: [(morph layoutFrame leftOffset) < 0]]) - or: [(morph layoutFrame leftOffset ifNil: [0]) < 0]]) ifTrue: [splitter addLeftOrTop: morph]. ((morph ~= splitter and: [morph layoutFrame leftFraction = splitter layoutFrame rightFraction]) and: [morph layoutFrame hasFixedWidth not + or: [(morph layoutFrame rightOffset) > 0]]) - or: [(morph layoutFrame rightOffset ifNil: [0]) > 0]]) ifTrue: [splitter addRightOrBottom: morph]]]]! Item was changed: ----- Method: ProportionalSplitterMorph>>balanceOffsets (in category 'events') ----- balanceOffsets | fdx fdy | (self hasProperty: #fullDelta) ifFalse: [^ self]. fdx := (self valueOfProperty: #fullDelta) x. fdy := (self valueOfProperty: #fullDelta) y. self layoutFrame hasFixedHeight ifTrue: [ | otop obot ctop cbot topf | otop := (owner submorphs detect: [:m | m layoutFrame topFraction isZero] ifNone: [^ self]) in: [:tm | + tm top - (tm layoutFrame topOffset)]. - tm top - (tm layoutFrame topOffset ifNil: [0])]. obot := (owner submorphs detect: [:m | m layoutFrame bottomFraction = 1] ifNone: [^ self]) in: [:tm | + tm bottom - (tm layoutFrame bottomOffset)]. - tm bottom - (tm layoutFrame bottomOffset ifNil: [0])]. ctop := (self layoutFrame topFraction * (obot - otop)) rounded + + otop + (self layoutFrame topOffset). - + otop + (self layoutFrame topOffset ifNil: [0]). cbot := (self layoutFrame bottomFraction * (obot - otop)) rounded + + otop + (self layoutFrame bottomOffset). - + otop + (self layoutFrame bottomOffset ifNil: [0]). topf := self layoutFrame topFraction. self layoutFrame topFraction: ((ctop + cbot) * 0.5 - otop) / (obot - otop) asFloat. self layoutFrame bottomFraction: self layoutFrame topFraction. self layoutFrame topOffset: self layoutFrame topOffset - fdy. self layoutFrame bottomOffset: self layoutFrame bottomOffset - fdy. (leftOrTop copy union: rightOrBottom) do: [:m | (m layoutFrame topFraction closeTo: topf) ifTrue: [ m layoutFrame topFraction: self layoutFrame topFraction. m layoutFrame topOffset: m layoutFrame topOffset - fdy]. (m layoutFrame bottomFraction closeTo: topf) ifTrue: [ m layoutFrame bottomFraction: self layoutFrame topFraction. m layoutFrame bottomOffset: m layoutFrame bottomOffset - fdy]]] . self layoutFrame hasFixedWidth ifTrue: [ | oleft oright cleft cright leftf | oleft := (owner submorphs detect: [:m | m layoutFrame leftFraction isZero] ifNone: [^ self]) in: [:tm | + tm left - (tm layoutFrame leftOffset)]. - tm left - (tm layoutFrame leftOffset ifNil: [0])]. oright := (owner submorphs detect: [:m | m layoutFrame rightFraction = 1] ifNone: [^ self]) in: [:tm | + tm right - (tm layoutFrame rightOffset)]. - tm right - (tm layoutFrame rightOffset ifNil: [0])]. cleft := (self layoutFrame leftFraction * (oright - oleft)) rounded + + oleft + (self layoutFrame leftOffset). - + oleft + (self layoutFrame leftOffset ifNil: [0]). cright := (self layoutFrame rightFraction * (oright - oleft)) rounded + + oleft + (self layoutFrame rightOffset). - + oleft + (self layoutFrame rightOffset ifNil: [0]). leftf := self layoutFrame leftFraction. self layoutFrame leftFraction: ((cleft + cright) * 0.5 - oleft) / (oright - oleft) asFloat. self layoutFrame rightFraction: self layoutFrame leftFraction. self layoutFrame leftOffset: self layoutFrame leftOffset - fdx. self layoutFrame rightOffset: self layoutFrame rightOffset - fdx. (leftOrTop copy union: rightOrBottom) do: [:m | (m layoutFrame leftFraction closeTo: leftf) ifTrue: [ m layoutFrame leftFraction: self layoutFrame leftFraction. m layoutFrame leftOffset: m layoutFrame leftOffset - fdx]. (m layoutFrame rightFraction closeTo: leftf) ifTrue: [ m layoutFrame rightFraction: self layoutFrame leftFraction. m layoutFrame rightOffset: m layoutFrame rightOffset - fdx.]]] . self removeProperty: #fullDelta. owner layoutChanged ! Item was changed: ----- Method: ProportionalSplitterMorph>>repositionBy: (in category 'events') ----- repositionBy: delta | selfTop selfBottom selfLeft selfRight | self setProperty: #fullDelta toValue: ((self valueOfProperty: #fullDelta) ifNil: [0 at 0]) + delta. leftOrTop do: [ : each | | firstRight firstBottom firstLeft firstTop | + firstRight := each layoutFrame rightOffset. + firstBottom := each layoutFrame bottomOffset. - firstRight := each layoutFrame rightOffset ifNil: [ 0 ]. - firstBottom := each layoutFrame bottomOffset ifNil: [ 0 ]. each layoutFrame rightOffset: firstRight + delta x. each layoutFrame bottomOffset: firstBottom + delta y. each layoutFrame hasFixedHeight ifTrue: [ + firstTop := each layoutFrame topOffset. - firstTop := each layoutFrame topOffset ifNil: [ 0 ]. each layoutFrame topOffset: firstTop + delta y ]. each layoutFrame hasFixedWidth ifTrue: [ + firstLeft := each layoutFrame leftOffset. - firstLeft := each layoutFrame leftOffset ifNil: [ 0 ]. each layoutFrame leftOffset: firstLeft + delta x. ] ]. rightOrBottom do: [ : each | | secondLeft secondTop secondRight secondBottom | + secondLeft := each layoutFrame leftOffset. + secondTop := each layoutFrame topOffset. - secondLeft := each layoutFrame leftOffset ifNil: [ 0 ]. - secondTop := each layoutFrame topOffset ifNil: [ 0 ]. each layoutFrame leftOffset: secondLeft + delta x. each layoutFrame topOffset: secondTop + delta y. each layoutFrame hasFixedHeight ifTrue: [ + secondBottom := each layoutFrame bottomOffset. - secondBottom := each layoutFrame bottomOffset ifNil: [ 0 ]. each layoutFrame bottomOffset: secondBottom + delta y. ]. each layoutFrame hasFixedWidth ifTrue: [ + secondRight := each layoutFrame rightOffset. - secondRight := each layoutFrame rightOffset ifNil: [ 0 ]. each layoutFrame rightOffset: secondRight + delta x. ] ]. + selfTop := self layoutFrame topOffset. + selfBottom := self layoutFrame bottomOffset. + selfLeft := self layoutFrame leftOffset. + selfRight := self layoutFrame rightOffset. - selfTop := self layoutFrame topOffset ifNil: [ 0 ]. - selfBottom := self layoutFrame bottomOffset ifNil: [ 0 ]. - selfLeft := self layoutFrame leftOffset ifNil: [ 0 ]. - selfRight := self layoutFrame rightOffset ifNil: [ 0 ]. self layoutFrame topOffset: selfTop + delta y ; bottomOffset: selfBottom + delta y ; leftOffset: selfLeft + delta x ; rightOffset: selfRight + delta x. self owner layoutChanged. self movements removeFirst; add: (splitsTopAndBottom ifTrue: [ delta y sign ] ifFalse: [ delta x sign ])! Item was changed: ----- Method: SystemWindow>>convertAlignment (in category 'layout') ----- convertAlignment "Primarily Jesse Welton's code to convert old system windows to ones with modern layout scheme" self layoutPolicy: ProportionalLayout new. (paneMorphs isNil or: [paneRects isNil or: [paneMorphs size ~= paneRects size]]) ifFalse: [self addLabelArea. self putLabelItemsInLabelArea. self setFramesForLabelArea. paneMorphs with: paneRects do: [:m :r | | frame | frame := LayoutFrame new. frame leftFraction: r left; rightFraction: r right; topFraction: r top; bottomFraction: r bottom. m layoutFrame: frame. m hResizing: #spaceFill; vResizing: #spaceFill]]. labelArea isNil ifTrue: [self addLabelArea. self putLabelItemsInLabelArea. self setFramesForLabelArea. paneMorphs ifNotNil: [paneMorphs do: [:m | | frame | frame := m layoutFrame ifNil: [LayoutFrame new]. + frame topOffset: (frame topOffset) - self labelHeight. - frame topOffset: (frame topOffset ifNil: [0]) - self labelHeight. frame bottomFraction ~= 1.0 ifTrue: + [frame bottomOffset: (frame bottomOffset) - self labelHeight]]]]. - [frame bottomOffset: (frame bottomOffset ifNil: [0]) - self labelHeight]]]]. label ifNotNil: [| frame | frame := LayoutFrame new. frame leftFraction: 0.5; topFraction: 0; leftOffset: label width negated // 2. label layoutFrame: frame]. collapseBox ifNotNil: [| frame | frame := LayoutFrame new. frame rightFraction: 1; topFraction: 0; rightOffset: -1; topOffset: 1. collapseBox layoutFrame: frame]. stripes ifNotNil: [| frame | frame := LayoutFrame new. frame leftFraction: 0; topFraction: 0; rightFraction: 1; leftOffset: 1; topOffset: 1; rightOffset: -1. stripes first layoutFrame: frame. stripes first height: self labelHeight - 2. stripes first hResizing: #spaceFill. frame := LayoutFrame new. frame leftFraction: 0; topFraction: 0; rightFraction: 1; leftOffset: 3; topOffset: 3; rightOffset: -3. stripes last layoutFrame: frame. stripes last height: self labelHeight - 6. stripes last hResizing: #spaceFill]. menuBox ifNotNil: [| frame | frame := LayoutFrame new. frame leftFraction: 0; leftOffset: 19; topFraction: 0; topOffset: 1. menuBox layoutFrame: frame]. closeBox ifNotNil: [| frame | frame := LayoutFrame new. frame leftFraction: 0; leftOffset: 4; topFraction: 0; topOffset: 1. closeBox layoutFrame: frame]! Item was changed: ----- Method: SystemWindow>>setPaneRectsFromBounds (in category 'geometry') ----- setPaneRectsFromBounds "Reset proportional specs from actual bounds, eg, after reframing panes" | layoutBounds | layoutBounds := self layoutBounds. paneMorphs do:[:m| | box left bottom top frame right | frame := m layoutFrame. box := m bounds. frame ifNotNil:[ + left := box left - layoutBounds left - frame leftOffset. + right := box right - layoutBounds left - frame rightOffset. + top := box top - layoutBounds top - frame topOffset. + bottom := box bottom - layoutBounds top - frame bottomOffset. - left := box left - layoutBounds left - (frame leftOffset ifNil:[0]). - right := box right - layoutBounds left - (frame rightOffset ifNil:[0]). - top := box top - layoutBounds top - (frame topOffset ifNil:[0]). - bottom := box bottom - layoutBounds top - (frame bottomOffset ifNil:[0]). frame leftFraction: (left / layoutBounds width asFloat). frame rightFraction: (right / layoutBounds width asFloat). frame topFraction: (top / layoutBounds height asFloat). frame bottomFraction: (bottom / layoutBounds height asFloat). ]. ].! From commits at source.squeak.org Wed Nov 4 15:10:08 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:10:08 0000 Subject: [squeak-dev] The Trunk: Morphic-ct.1622.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ct.1622.mcz ==================== Summary ==================== Name: Morphic-ct.1622 Author: ct Time: 30 January 2020, 7:05:04.363325 pm UUID: 8641b370-6222-f948-aeda-fbb50f764f72 Ancestors: Morphic-cmm.1618 Proposal: Swap key and item of an Integer's explorer contents. Integer representations are not really keys, but rather values. In an explorer's code pane, this allows you to interact with the selected string representation (for example '101010') which is much more interesting than the base name (for example 'binary'). =============== Diff against Morphic-cmm.1618 =============== Item was changed: ----- Method: Integer>>explorerContents (in category '*Morphic-Explorer') ----- explorerContents ^#( ('hexadecimal' 16) ('octal' 8) ('binary' 2)) collect: [ :each | ObjectExplorerWrapper + with: (self printStringBase: each second) + name: each first translated - with: each first translated - name: (self printStringBase: each second) model: self ]! From commits at source.squeak.org Wed Nov 4 15:10:23 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:10:23 0000 Subject: [squeak-dev] The Trunk: Morphic-ct.1619.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ct.1619.mcz ==================== Summary ==================== Name: Morphic-ct.1619 Author: ct Time: 22 January 2020, 10:18:49.982972 am UUID: 7857d3bc-414b-cf4a-87bd-9d0aae05616f Ancestors: Morphic-cmm.1618 Proposal: Unify all doIt related operations in PluggableTextMorph by delegating them to the editor. This also fixes the fact that certain hooks such as #printIt:result:, #inspectIt:result:, or #exploreIt:result: were ignored when triggering the operation via the textmorph menu instead of shortcut. This is not an expected behavior, is it? =============== Diff against Morphic-cmm.1618 =============== Item was changed: ----- Method: PluggableTextMorph>>doIt (in category 'menu commands') ----- doIt + ^ self handleEdit: [textMorph editor doIt]! - ^self handleEdit: [textMorph editor evaluateSelection]! Item was changed: ----- Method: PluggableTextMorph>>exploreIt (in category 'menu commands') ----- exploreIt + ^ self handleEdit: [textMorph editor exploreIt]! - - - self handleEdit: - [textMorph editor evaluateSelectionAndDo: [:result | result explore]].! Item was changed: ----- Method: PluggableTextMorph>>inspectIt (in category 'menu commands') ----- inspectIt + ^ self handleEdit: [textMorph editor inspectIt]! - - self handleEdit: - [textMorph editor evaluateSelectionAndDo: [:result | result inspect]]! Item was changed: ----- Method: PluggableTextMorph>>printIt (in category 'menu commands') ----- printIt + ^ self handleEdit: [textMorph editor printIt]! - | oldEditor | - textMorph editor selectFrom: selectionInterval first to: selectionInterval last; - model: model. "For, eg, evaluateSelection" - textMorph handleEdit: [(oldEditor := textMorph editor) evaluateSelectionAndDo: - [:result | - self flag: #fixIntervalCache. "mt: We should find a better design for discarding unused text editors in text morphs and restoring them on demand." - selectionInterval := oldEditor markIndex to: oldEditor pointIndex -1. - textMorph installEditorToReplace: oldEditor. - textMorph handleEdit: [oldEditor afterSelectionInsertAndSelect: result printString]. - selectionInterval := oldEditor markIndex to: oldEditor pointIndex -1. - - textMorph editor selectFrom: selectionInterval first to: selectionInterval last. - self scrollSelectionIntoView]]! From commits at source.squeak.org Wed Nov 4 15:10:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:10:52 0000 Subject: [squeak-dev] The Trunk: Morphic-cmm.1618.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1618.mcz ==================== Summary ==================== Name: Morphic-cmm.1618 Author: cmm Time: 16 January 2020, 10:50:39.500247 pm UUID: 9cbbc4fc-7a83-4f6c-94ca-6ac110f34c1f Ancestors: Morphic-cmm.1617 When "Mouse over for keyboard focus" is used, release the prior keyboard focus upon restarting the image, so that the Global Command Keys will be honored until the first focus shift. =============== Diff against Morphic-cmm.1617 =============== Item was changed: ----- Method: MorphicProject>>wakeUpTopWindow (in category 'enter') ----- wakeUpTopWindow "Image has been restarted, and the startUp list has been processed. Perform any additional actions needed to restart the user interface." + SystemWindow wakeUpTopWindowUponStartup. + Preferences mouseOverForKeyboardFocus ifTrue: + [ "Allow global command keys to work upon re-entry without having to cause a focus change first." + ActiveHand releaseKeyboardFocus ]! - SystemWindow wakeUpTopWindowUponStartup! From commits at source.squeak.org Wed Nov 4 15:11:16 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:11:16 0000 Subject: [squeak-dev] The Trunk: Morphic-nice.1616.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1616.mcz ==================== Summary ==================== Name: Morphic-nice.1616 Author: nice Time: 8 January 2020, 10:48:52.680239 am UUID: 88019e05-7d25-6744-97d0-4ebb873b6303 Ancestors: Morphic-mt.1615 Provide smoother scrolling in response to mouse wheel events Instead of delivering the events when wheelDelta reaches 120, make this threshold a Preference (minimumWheelDelta) Reminder: 120 represents a single notch for traditional mouse wheel with notches, but trackpads can deliver much smaller deltas Rather than accumulating the wheelDeltas into MouseWheelState, do it when we #generateMouseWheelEvent: Indeed, small deltas will come in packets of successive events, and it's more efficient to regroup then, exactly like we do with mouse trails... Also MouseWheelState did ignore time outs (long delays between deltas) and other state changes (buttons/modifiers), which was not ideal. Directly get those states from the raw eventBuffer, like any other mouse event. This requires integration of tose 2 PR: https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/461 for Windows https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/462 for OSX and linux Honour larger wheelDeltas too in ScrollPane>>#mouseWheel: event handling Honour horizontal mouse wheels too in ScrollPane Note that the scroll pane still won't deliver sub-scrollDeltaWidth/scrollDeltaHeight with those changes, the number of scroll deltas is still rounded to 1. With patched VM, and following settings, I get a reasonnable scrolling experience on OSX: HandMorph minimumWheelDelta: 20. Smalltalk sendMouseWheelEvents: true. NOTE: it is tricky to add/remove inst. var. to such HandMorph because obsolete CompiledMethod pointing to old inst. var. offset are still active on the stack and can mess things up (unless you do not load the package from UI but rather from command line...). Since accessing 'lastMouseEvent' in such obsolete CompiledMethod is causing grief, preserve its offset by swapping inst. var. order with 'targetOffset' which is less likely used. =============== Diff against Morphic-mt.1615 =============== Item was changed: Morph subclass: #HandMorph + instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler targetOffset lastMouseEvent damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter' + classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats MinimalWheelDelta NewEventRules NormalCursor PasteBuffer SendMouseWheelToKeyboardFocus ShowEvents SynthesizeMouseWheelEvents' - 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' - 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 added: + ----- Method: HandMorph class>>minimumWheelDelta (in category 'preferences') ----- + minimumWheelDelta + + ^MinimalWheelDelta ifNil: [MouseWheelEvent scrollUnitsPerMouseWheelNotch].! Item was added: + ----- Method: HandMorph class>>minimumWheelDelta: (in category 'preferences') ----- + minimumWheelDelta: anInteger + MinimalWheelDelta := anInteger ifNotNil: [anInteger + clampLow: MouseWheelEvent minimalScrollUnitsPerEvent + high: MouseWheelEvent scrollUnitsPerMouseWheelNotch]! Item was changed: ----- 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 nextEvent | - | buttons modifiers deltaX deltaY stamp | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. deltaX := evtBuf third. deltaY := evtBuf fourth. + buttons := evtBuf fifth. + modifiers := evtBuf sixth. + [(deltaX abs + deltaY abs < self class minimumWheelDelta) + and: [(nextEvent := Sensor peekEvent) notNil + and: [nextEvent first = evtBuf first + and: [nextEvent fifth = evtBuf fifth + and: [nextEvent sixth = evtBuf sixth] + and: [nextEvent third isZero = evtBuf third isZero "both horizontal or vertical"]]]]] + whileTrue: + ["nextEvent is similar. Remove it from the queue, and check the next." + nextEvent := Sensor nextEvent. + deltaX := deltaX + nextEvent third. + deltaY := deltaY + nextEvent fourth]. - modifiers := evtBuf fifth. - buttons := (modifiers bitShift: 3) bitOr: (lastMouseEvent buttons bitAnd: 7). ^ MouseWheelEvent new setType: #mouseWheel position: self position delta: deltaX at 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. 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: [MouseWheelEvent scrollUnitsPerMouseWheelNotch] ifFalse: [MouseWheelEvent scrollUnitsPerMouseWheelNotch negated]) - delta: 0 @ ((direction anyMask: 2r1000 "wheel up") ifTrue: [120] ifFalse: [-120]) direction: direction 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: [ + self class sendMouseWheelToKeyboardFocus + ifFalse: [self sendMouseEvent: filteredEvent] + ifTrue: [self sendEvent: filteredEvent focus: self keyboardFocus clear: [self keyboardFocus: nil]]. - 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]. self mouseOverHandler processMouseOver: lastMouseEvent. ^ filteredEvent "not necessary but good style -- see Morph >> #handleEvent:" ! Item was added: + ----- Method: MouseWheelEvent class>>convertScrollUnits:intoScrollDelta: (in category 'utility') ----- + convertScrollUnits: scrollUnits intoScrollDelta: scrollDeltaPerMouseWheelNotch + "Convert the scrolling units provided by the VM into scrolling delta (increment) used by Morph. + The morph knows how many scroll delta it wants per single wheel notch. + I know how many scrolling units is generated by a single wheel notch." + + ^scrollUnits abs * scrollDeltaPerMouseWheelNotch // self scrollUnitsPerMouseWheelNotch max: 1! Item was added: + ----- Method: MouseWheelEvent class>>minimalScrollUnitsPerEvent (in category 'constants') ----- + minimalScrollUnitsPerEvent + "Answer how many scroll units a single mouse wheel event can generate. + This reflects a value hardcoded in the VM. + The VM aggregate wheel events until this threshold is reached." + + ^20! Item was added: + ----- Method: MouseWheelEvent class>>scrollUnitsPerMouseWheelNotch (in category 'constants') ----- + scrollUnitsPerMouseWheelNotch + "Answer how many scroll units a single mouse wheel notch does generate. + This reflects a value hardcoded in the VM. + The value is chosen high enough so as to enable: + - smoother scrolling on notch-less devices. + - while preserving Integer arithmetic + Interpretation (scaling) of scrolling units is left to the client morphs. + Typically, 120 units (1 notch) represents 3 lines of text." + + ^120! Item was added: + ----- Method: MouseWheelEvent>>horizontalScrollDelta: (in category 'accessing') ----- + horizontalScrollDelta: scrollDeltaPerMouseWheelNotch + "Convert scrolling units into unsigned scrolling increment. + The morph knows how many scroll delta it wants per single wheel notch. + Note that returned increment value is always positive, regardless of direction." + ^self class convertScrollUnits: delta x intoScrollDelta: scrollDeltaPerMouseWheelNotch! Item was added: + ----- Method: MouseWheelEvent>>setDirection (in category 'initialization') ----- + setDirection + delta x > 0 ifTrue: [self setWheelRight]. + delta x < 0 ifTrue: [self setWheelLeft]. + + delta y > 0 ifTrue: [self setWheelUp]. + delta y < 0 ifTrue: [self setWheelDown].! Item was added: + ----- Method: MouseWheelEvent>>setType:position:delta:buttons:hand:stamp: (in category 'private') ----- + setType: evtType position: evtPos delta: evtDelta buttons: evtButtons hand: evtHand stamp: stamp + type := evtType. + position := evtPos. + buttons := evtButtons. + source := evtHand. + wasHandled := false. + direction := 2r0000. + delta := evtDelta. + timeStamp := stamp. + self setDirection! Item was added: + ----- Method: MouseWheelEvent>>verticalScrollDelta: (in category 'accessing') ----- + verticalScrollDelta: scrollDeltaPerMouseWheelNotch + "Convert scrolling units into unsigned scrolling increment. + The morph knows how many scroll delta it wants per single wheel notch. + Note that returned increment value is always positive, regardless of direction." + ^self class convertScrollUnits: delta y intoScrollDelta: scrollDeltaPerMouseWheelNotch! Item was removed: - Object subclass: #MouseWheelState - instanceVariableNames: 'currentDelta' - classVariableNames: '' - poolDictionaries: '' - category: 'Morphic-Events'! Item was removed: - ----- 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 removed: - ----- Method: MouseWheelState>>initialize (in category 'initialize-release') ----- - initialize - - super initialize. - currentDelta := 0 at 0.! Item was changed: MorphicModel subclass: #ScrollPane instanceVariableNames: 'scrollBar scroller retractableScrollBar scrollBarOnLeft getMenuSelector getMenuTitleSelector hasFocus hScrollBar hScrollBarPolicy vScrollBarPolicy scrollBarThickness' + classVariableNames: 'HorizontalScrollDeltaPerMouseWheelNotch UseRetractableScrollBars VerticalScrollDeltaPerMouseWheelNotch' - classVariableNames: 'UseRetractableScrollBars' poolDictionaries: '' category: 'Morphic-Windows'! !ScrollPane commentStamp: 'mk 8/9/2005 10:34' prior: 0! The scroller (a transform) of a scrollPane is driven by the scrollBar. The scroll values vary from 0.0, meaning zero offset to 1.0 meaning sufficient offset such that the bottom of the scrollable material appears 3/4 of the way down the pane. The total distance to achieve this range is called the totalScrollRange. Basic clue about utilization of the ScrollPane class is given in: ScrollPane example1. ScrollPane example2.! Item was added: + ----- Method: ScrollPane class>>horizontalScrollDeltaPerMouseWheelNotch (in category 'preferences') ----- + horizontalScrollDeltaPerMouseWheelNotch + + + ^ HorizontalScrollDeltaPerMouseWheelNotch ifNil: [3]! Item was added: + ----- Method: ScrollPane class>>horizontalScrollDeltaPerMouseWheelNotch: (in category 'preferences') ----- + horizontalScrollDeltaPerMouseWheelNotch: anIntegerOrNil + + HorizontalScrollDeltaPerMouseWheelNotch := anIntegerOrNil! Item was added: + ----- Method: ScrollPane class>>verticalScrollDeltaPerMouseWheelNotch (in category 'preferences') ----- + verticalScrollDeltaPerMouseWheelNotch + + + ^ VerticalScrollDeltaPerMouseWheelNotch ifNil: [3]! Item was added: + ----- Method: ScrollPane class>>verticalScrollDeltaPerMouseWheelNotch: (in category 'preferences') ----- + verticalScrollDeltaPerMouseWheelNotch: anIntegerOrNil + + VerticalScrollDeltaPerMouseWheelNotch := anIntegerOrNil! Item was changed: ----- Method: ScrollPane>>mouseWheel: (in category 'event handling') ----- mouseWheel: evt + evt isWheelUp ifTrue: [scrollBar scrollUp: (evt verticalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)]. + evt isWheelDown ifTrue: [scrollBar scrollDown: (evt verticalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)]. + evt isWheelLeft ifTrue: [hScrollBar scrollUp: (evt horizontalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)]. + evt isWheelRight ifTrue: [hScrollBar scrollDown: (evt horizontalScrollDelta: self class verticalScrollDeltaPerMouseWheelNotch)].! - evt isWheelUp ifTrue: [scrollBar scrollUp: 3]. - evt isWheelDown ifTrue: [scrollBar scrollDown: 3].! From commits at source.squeak.org Wed Nov 4 15:11:50 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:11:50 0000 Subject: [squeak-dev] The Trunk: Morphic-cmm.1489.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1489.mcz ==================== Summary ==================== Name: Morphic-cmm.1489 Author: cmm Time: 14 May 2019, 5:52:52.33191 pm UUID: 7ac016ff-055b-4834-b3b3-35a7864215d0 Ancestors: Morphic-pre.1488 Fix TextEditor>>#hasMultipleLinesSelected to consider actual lines, instead of wrapped lines. =============== Diff against Morphic-pre.1488 =============== Item was changed: ----- Method: TextEditor>>hasMultipleLinesSelected (in category 'typing support') ----- hasMultipleLinesSelected + ^ self selection includes: Character cr! - - ^ self hasSelection and: [self startBlock top < self stopBlock top]! From commits at source.squeak.org Wed Nov 4 15:12:28 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:12:28 0000 Subject: [squeak-dev] The Trunk: Morphic-spfa.1641.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-spfa.1641.mcz ==================== Summary ==================== Name: Morphic-spfa.1641 Author: spfa Time: 2 April 2020, 11:31:57.845097 pm UUID: be701ee2-5637-c34d-8765-d2527e1d5785 Ancestors: Morphic-mt.1640 Add inst. var. lastParenLocation to TextEditor #stateArray (used to transfer state to a newly installed editor). This ensures that #clearParens works as expected in all circumstances. =============== Diff against Morphic-mt.1640 =============== Item was changed: ----- Method: TextEditor>>stateArray (in category 'initialize-release') ----- stateArray ^ {ChangeText. FindText. history ifNil: [TextEditorCommandHistory new]. "Convert old instances" self markIndex to: self pointIndex - 1. self startOfTyping. + emphasisHere. + lastParenLocation}! - emphasisHere}! Item was changed: ----- Method: TextEditor>>stateArrayPut: (in category 'initialize-release') ----- stateArrayPut: stateArray | sel | ChangeText := stateArray at: 1. FindText := stateArray at: 2. history := stateArray at: 3. sel := stateArray at: 4. self selectFrom: sel first to: sel last. beginTypeInIndex := stateArray at: 5. + emphasisHere := stateArray at: 6. + lastParenLocation := stateArray at: 7! - emphasisHere := stateArray at: 6! From commits at source.squeak.org Wed Nov 4 15:26:53 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:26:53 0000 Subject: [squeak-dev] The Trunk: Morphic-mt.1711.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1711.mcz ==================== Summary ==================== Name: Morphic-mt.1711 Author: mt Time: 4 November 2020, 4:26:48.73762 pm UUID: bfe511e4-840d-9742-a340-11c2a470d5f7 Ancestors: Morphic-mt.1710, Morphic-kfr.1469 In progress indication for project loading, remove target-owner-visibility magic as suggested by Karl (kfr). When this indicator is used as part of InternalThreadNavigationMorph or ProjectViewMorph, hiding them (and keeping them hidden for quick workBlocks) makes no sense. Those are more than just layout containers. (Note that this is unrelated to system-progress indication.) =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: ComplexProgressIndicator>>withProgressDo: (in category 'as yet unclassified') ----- withProgressDo: aBlock + | safetyFactor totals trialRect delta | - | safetyFactor totals trialRect delta targetOwner | Smalltalk isMorphic ifFalse: [^aBlock value]. formerProject := Project current. formerWorld := formerProject world. formerProcess := Processor activeProcess. targetMorph ifNil: [targetMorph := ProgressTargetRequestNotification signal]. targetMorph ifNil: [ trialRect := Rectangle center: Sensor cursorPoint extent: 80 at 80. delta := trialRect amountToTranslateWithin: formerWorld bounds. trialRect := trialRect translateBy: delta. translucentMorph := TranslucentProgessMorph new opaqueBackgroundColor: Color white; bounds: trialRect; openInWorld: formerWorld. ] ifNotNil: [ - targetOwner := targetMorph owner. translucentMorph := TranslucentProgessMorph new setProperty: #morphicLayerNumber toValue: targetMorph morphicLayerNumber - 0.1; bounds: targetMorph boundsInWorld; openInWorld: targetMorph world. ]. stageCompleted := 0. safetyFactor := 1.1. "better to guess high than low" translucentMorph setProperty: #progressStageNumber toValue: 1. translucentMorph hide. - targetOwner ifNotNil: [targetOwner hide]. totals := self loadingHistoryDataForKey: 'total'. newRatio := 1.0. estimate := totals size < 2 ifTrue: [ 15000 "be a pessimist" ] ifFalse: [ (totals sum - totals max) / (totals size - 1 max: 1) * safetyFactor. ]. start := Time millisecondClockValue. self forkProgressWatcher. [ aBlock on: ProgressInitiationException do: [ :ex | ex sendNotificationsTo: [ :min :max :curr | "ignore this as it is inaccurate" ]. ]. ] on: ProgressNotification do: [ :note | | stageCompletedString | translucentMorph show. - targetOwner ifNotNil: [targetOwner show]. note extraParam ifNotNil:[self addProgressDecoration: note extraParam]. stageCompletedString := (note messageText findTokens: ' ') first. stageCompleted := (stageCompletedString copyUpTo: $:) asNumber. cumulativeStageTime := Time millisecondClockValue - start max: 1. prevData := self loadingHistoryDataForKey: stageCompletedString. prevData isEmpty ifFalse: [ newRatio := (cumulativeStageTime / (prevData average max: 1)) asFloat. ]. self loadingHistoryAt: stageCompletedString add: cumulativeStageTime. translucentMorph setProperty: #progressStageNumber toValue: stageCompleted + 1. note resume. ]. stageCompleted := 999. "we may or may not get here" ! From commits at source.squeak.org Wed Nov 4 15:27:25 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:27:25 0000 Subject: [squeak-dev] The Trunk: Morphic-kfr.1469.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kfr.1469.mcz ==================== Summary ==================== Name: Morphic-kfr.1469 Author: kfr Time: 6 December 2018, 9:13:24.890102 pm UUID: 3388ff60-ace3-4cf7-a1d4-f3fb7b7d9bce Ancestors: Morphic-mt.1468 Don't hide the ProjectViewMorph and it's owner when loading =============== Diff against Morphic-mt.1468 =============== Item was changed: ----- Method: ComplexProgressIndicator>>withProgressDo: (in category 'as yet unclassified') ----- withProgressDo: aBlock | safetyFactor totals trialRect delta targetOwner | Smalltalk isMorphic ifFalse: [^aBlock value]. formerProject := Project current. formerWorld := formerProject world. formerProcess := Processor activeProcess. targetMorph ifNil: [targetMorph := ProgressTargetRequestNotification signal]. targetMorph ifNil: [ trialRect := Rectangle center: Sensor cursorPoint extent: 80 at 80. delta := trialRect amountToTranslateWithin: formerWorld bounds. trialRect := trialRect translateBy: delta. translucentMorph := TranslucentProgessMorph new opaqueBackgroundColor: Color white; bounds: trialRect; openInWorld: formerWorld. ] ifNotNil: [ targetOwner := targetMorph owner. translucentMorph := TranslucentProgessMorph new setProperty: #morphicLayerNumber toValue: targetMorph morphicLayerNumber - 0.1; bounds: targetMorph boundsInWorld; openInWorld: targetMorph world. ]. stageCompleted := 0. safetyFactor := 1.1. "better to guess high than low" translucentMorph setProperty: #progressStageNumber toValue: 1. translucentMorph hide. + "targetOwner ifNotNil: [targetOwner hide]." - targetOwner ifNotNil: [targetOwner hide]. totals := self loadingHistoryDataForKey: 'total'. newRatio := 1.0. estimate := totals size < 2 ifTrue: [ 15000 "be a pessimist" ] ifFalse: [ (totals sum - totals max) / (totals size - 1 max: 1) * safetyFactor. ]. start := Time millisecondClockValue. self forkProgressWatcher. [ aBlock on: ProgressInitiationException do: [ :ex | ex sendNotificationsTo: [ :min :max :curr | "ignore this as it is inaccurate" ]. ]. ] on: ProgressNotification do: [ :note | | stageCompletedString | translucentMorph show. targetOwner ifNotNil: [targetOwner show]. note extraParam ifNotNil:[self addProgressDecoration: note extraParam]. stageCompletedString := (note messageText findTokens: ' ') first. stageCompleted := (stageCompletedString copyUpTo: $:) asNumber. cumulativeStageTime := Time millisecondClockValue - start max: 1. prevData := self loadingHistoryDataForKey: stageCompletedString. prevData isEmpty ifFalse: [ newRatio := (cumulativeStageTime / (prevData average max: 1)) asFloat. ]. self loadingHistoryAt: stageCompletedString add: cumulativeStageTime. translucentMorph setProperty: #progressStageNumber toValue: stageCompleted + 1. note resume. ]. stageCompleted := 999. "we may or may not get here" ! From commits at source.squeak.org Wed Nov 4 15:29:09 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:29:09 0000 Subject: [squeak-dev] The Trunk: System-mt.1189.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1189.mcz ==================== Summary ==================== Name: System-mt.1189 Author: mt Time: 4 November 2020, 4:29:05.65862 pm UUID: d73f04df-f789-f043-8cf0-370cd8332876 Ancestors: System-mt.1188 Updates list of contributors. =============== Diff against System-mt.1188 =============== Item was changed: ----- Method: SystemNavigation class>>privateAuthorsRaw (in category 'class initialization') ----- (excessive size, no diff calculated) Item was changed: + (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors..'! - (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors.'! From hannes.hirzel at gmail.com Wed Nov 4 15:41:36 2020 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Wed, 4 Nov 2020 15:41:36 +0000 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) Message-ID: Hello I was looking for the latest version of the Loke/BabyIDE image at https://data.mendeley.com/datasets/5xxgzv7fsp/1 >> > The image is my program repository. It includes some examples of DCI >> > programming, Ellen's Personal Programming IDE, Squeak Reverse >> > Engineering >> > (SRE), and more.) It is no longer available at this mendeley url as it is not a dataset but a program. Could somebody who has downloaded it please make it available on the squeak web site? Thank you Regards Hannes On 10/4/20, David T. Lewis wrote: > Thank you Trygve, > > I confirm also that the image runs very well on my Ubuntu Linux laptop > with a VM compiled per http://wiki.squeak.org/squeak/6354. > > Dave > > On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: >> Dear Trygve, >> >> I confirmed that I could launch the Loke/BabyIDE image with the included >> SqueakVM for Windows (8.1 and 10) >> and I could also launch it in a web browser by using the SqueakJS VM ( >> https://squeak.js.org/run ). >> >> Thank you very much. >> >> -- >> sumim >> >> 2020-10-03 15:48 Trygve Reenskaug : >> >> > Dear Sumim, >> > Thank you for your kind words. >> > >> > The latest version of Loke/BabyIDE written on Squeak3.10.2 is at >> > https://data.mendeley.com/datasets/5xxgzv7fsp/1 >> > The image is my program repository. It includes some examples of DCI >> > programming, Ellen's Personal Programming IDE, Squeak Reverse >> > Engineering >> > (SRE), and more. >> > >> > Best >> > --Trygve >> > >> > On 2020-10-02 20:14, masato sumi wrote: >> > >> > Dear Trygve, >> > >> > Thank you for your very long term contribution and efforts. >> > >> > I'm very sorry that I couldn't help you at all now. >> > >> > I'm afraid, but could you please make your latest version of >> > Loke/BabyIDE >> > written on Squeak3.10.2 available for future generations of researchers >> > and/or followers? >> > >> > Anyway, I think your ideas and thoughts should be passed on to future >> > generations as faithfully as we can possible, and I myself will try to >> > make >> > sure that. >> > >> > Thank you so much and goodbye. >> > Please take care of yourself. >> > >> > -- >> > sumim >> > >> > 2020-10-03 0:54 Trygve Reenskaug : >> > >> >> Dear all, >> >> I need to use many words to explore why I can't understand current >> >> Squeak >> >> code. I believe the reason is a profound one, and I hope some of you >> >> have >> >> the patience to read about it. >> >> >> >> Thank you for your responses to my 'A Sad Day'-message. One response >> >> said >> >> "*But please don't give up as an inventor of MVC, which has simplified >> >> writing software for all of us.* >> >> >> >> >> >> *We need new ideas to stabilize Smalltalk." *As to MVC, it was received >> >> with acclamation when I first presented it at PARC in 1978, and people >> >> suggested I should make it the theme of my article in the special >> >> Smalltalk >> >> issue of Byte. I couldn't understand it; MVC was so simple and obvious >> >> that >> >> is was not worth writing about it. Nevertheless, people seem to have >> >> problems understanding MVC. It took me a long time before I gleaned >> >> what >> >> was going on. The explanation is a deep one, rooted in our different >> >> mental >> >> paradigms. >> >> >> >> From around 1970, I was working on Prokon, a distributed system for >> >> managers in the shipbuilding industry: >> >> >> >> Every manager has their own computer that they use for augmenting >> >> their >> >> mind. The manager understands their software and ideally writes it >> >> themselves. Managers delegate conversations with other managers to >> >> their >> >> computer's M-to-M network. (Marked with a heavy black line in the >> >> figure). >> >> I chose "distributed planning with central control" as my example >> >> project. >> >> Each manager creates a plan for their department, using apps suited to >> >> their particular needs. A **distributed algorithm** ensures consistency >> >> across departments. >> >> >> >> I came to PARC in 1978 and could immediately relate to the Smalltalk >> >> image with its universe of collaborating objects. Alan's definition of >> >> object-orientation fitted my Prokon model: "Thus its semantics are a >> >> bit >> >> like having thousands and thousands of computers all hooked together by >> >> a >> >> very fast network." >> >> >> >> MVC prescribes a network of communicating objects. Any object can fill >> >> one or more positions in the network as long as it has the required >> >> behavior; their classes are irrelevant. It's so simple that it's not >> >> worth >> >> writing about it. >> >> >> >> >> >> ==================== >> >> >> >> The work on this post was interrupted at this point by an unexpected >> >> week >> >> in hospital. It gave me quiet days of pondering the futility of what I >> >> am >> >> doing and I will be terminating my memberships in the Pharo and Squeak >> >> mailing lists. I have also deleted most of the old draft of this >> >> message >> >> and will quickly conclude with two observations: >> >> >> >> >> >> 1. >> >> The Smalltalk image is a universe of communicating objects. I call >> >> it >> >> an object computer. It can be seen as the model of an entirely new >> >> kind of >> >> computer, a model on a level closer to the human mind than the von >> >> Neumann >> >> model of 1948. The new model is communication-centric and should >> >> supersede >> >> the ubiquitous CPU-centric model as soon as possible. Working out >> >> the >> >> details of this idea could make an exciting and disruptive Ph.D. >> >> thesis. >> >> 2. >> >> Smalltalk is called a programming language. It is a curious one, >> >> very >> >> different from well-known languages like Java with their syntax and >> >> semantics. Smalltalk, as a programming language, does not have the >> >> concept >> >> of a program. Smalltalk, as a class-oriented language, does not have >> >> syntax >> >> for the declaration of a class. Smalltalk, as an object-oriented >> >> language, >> >> can't describe how objects collaborate to achieve a goal. You appear >> >> to be >> >> happy with this state of affairs, at least, I see no sign of anybody >> >> wanting to move on from the unfinished Smalltalk language to a >> >> mature >> >> development environment. I do not find it satisfactory and it is not >> >> acceptable to the intended managers populating the distributed >> >> system shown >> >> in the first picture. Consequently, I have done something about it >> >> as >> >> described in my SoSym article "*Personal Programming and the Object >> >> Computer.*" I am tired of being alone in my endeavors and this ends >> >> my work with Squeak and other Smalltalks. I wish you health and >> >> happiness >> >> wherever you happen to be. >> >> >> >> Trygve >> >> Personal programming and the object computer >> >> https://doi.org/10.1007/s10270-019-00768-3 >> >> >> >> -- >> >> >> >> *The essence of object orientation is that objects collaborate to >> >> achieve a goal. * >> >> Trygve Reenskaug mailto: trygver at ifi.uio.no >> >> <%20trygver at ifi.uio.no> >> >> Morgedalsvn. 5A http://folk.uio.no/trygver/ >> >> N-0378 Oslo http://fullOO.info >> >> Norway Tel: (+47) 468 58 625 >> >> >> >> >> > >> > -- >> > >> > *The essence of object orientation is that objects collaborate to >> > achieve >> > a goal. * >> > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> >> > Morgedalsvn. 5A http://folk.uio.no/trygver/ >> > N-0378 Oslo http://fullOO.info >> > Norway Tel: (+47) 468 58 625 >> > > > > > >> > > > From commits at source.squeak.org Wed Nov 4 15:45:42 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:45:42 0000 Subject: [squeak-dev] The Trunk: Morphic-mt.1712.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1712.mcz ==================== Summary ==================== Name: Morphic-mt.1712 Author: mt Time: 4 November 2020, 4:45:33.94762 pm UUID: 532fbef4-796e-f342-9302-d1c0731146b7 Ancestors: Morphic-mt.1711 Fixes dropping for non-world paste-up morphs. =============== Diff against Morphic-mt.1711 =============== Item was changed: ----- Method: PasteUpMorph>>morphToDropFrom: (in category 'dropping/grabbing') ----- morphToDropFrom: aMorph "Given a morph being carried by the hand which the hand is about to drop, answer the actual morph to be deposited. Normally this would be just the morph itself, but several unusual cases arise, which this method is designed to service." | aNail representee handy posBlock | + handy := self isWorldMorph + ifTrue: [self primaryHand] + ifFalse: [self currentHand]. - handy := self primaryHand. posBlock := [:z | | tempPos | tempPos := handy position - ((handy targetOffset - aMorph formerPosition) * (z extent / aMorph extent)) rounded. self pointFromWorld: tempPos]. self alwaysShowThumbnail ifTrue: [aNail := aMorph representativeNoTallerThan: self maxHeightToAvoidThumbnailing norWiderThan: self maximumThumbnailWidth thumbnailHeight: self heightForThumbnails. aNail == aMorph ifFalse: [aMorph formerPosition: aMorph position. aNail position: (posBlock value: aNail)]. ^aNail]. ((aMorph isKindOf: MorphThumbnail) and: [(representee := aMorph morphRepresented) owner isNil]) ifTrue: [representee position: (posBlock value: representee). ^representee]. self showingListView ifTrue: [^aMorph listViewLineForFieldList: (self valueOfProperty: #fieldListSelectors)]. (aMorph hasProperty: #newPermanentScript) ifTrue: [^aMorph asEmptyPermanentScriptor]. ((aMorph isPhraseTileMorph) or: [aMorph isSyntaxMorph]) ifFalse: [^aMorph morphToDropInPasteUp: self]. aMorph userScriptSelector isEmptyOrNil ifTrue: ["non-user" self automaticPhraseExpansion ifFalse: [^aMorph]]. ^aMorph morphToDropInPasteUp: self! From commits at source.squeak.org Wed Nov 4 15:49:51 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:49:51 0000 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.280.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.280.mcz ==================== Summary ==================== Name: MorphicExtras-mt.280 Author: mt Time: 4 November 2020, 4:49:48.79862 pm UUID: 47ccdbdb-b186-344f-a9e7-9f620b3028a8 Ancestors: MorphicExtras-pre.279, MorphicExtras-kfr.165, MorphicExtras-kfr.269, MorphicExtras-kfr.277 Merges some quality-of-life fixes for FatBitsPaint and storyboard books. Thanks to Karl (kfr)! =============== Diff against MorphicExtras-pre.279 =============== Item was changed: ----- Method: FatBitsPaint>>addCustomMenuItems:hand: (in category 'menu') ----- + addCustomMenuItems: aCustomMenu hand: aHandMorph + super addCustomMenuItems: aCustomMenu hand: aHandMorph. + ^ aCustomMenu add: 'fat bits paint ..' translated action: #openFatBitsPaintMenu! - addCustomMenuItems: aCustomMenu hand: aHandMorph - - super addCustomMenuItems: aCustomMenu hand: aHandMorph. - aCustomMenu - add: 'background color' translated action: #setBackgroundColor:; - add: 'pen color' translated action: #setPenColor:; - add: 'pen size' translated action: #setPenSize:; - add: 'fill' translated action: #fill; - add: 'magnification' translated action: #setMagnification:; - add: 'accept' translated action: #accept; - add: 'revert' translated action: #revert; - add: 'inspect' translated action: #inspectForm; - add: 'file out' translated action: #fileOut; - add: 'selection...' translated action: #selectionMenu:; - add: 'tools...' translated action: #toolMenu:! Item was added: + ----- Method: FatBitsPaint>>openFatBitsPaintMenu (in category 'menu') ----- + openFatBitsPaintMenu + | menu | + (menu := MenuMorph entitled: 'FatBitsPaint' translated) defaultTarget: self; + addStayUpItem; + commandKeyHandler: self. + menu add: 'background color' translated action: #setBackgroundColor:; + add: 'pen color' translated action: #setPenColor:; + add: 'pen size' translated action: #setPenSize:; + add: 'fill' translated action: #fill; + add: 'magnification' translated action: #setMagnification:; + add: 'accept' translated action: #accept; + add: 'revert' translated action: #revert; + add: 'inspect' translated action: #inspectForm; + add: 'file out' translated action: #fileOut; + add: 'selection...' translated action: #selectionMenu:; + add: 'tools...' translated action: #toolMenu:. + ^ menu popUpInWorld! Item was changed: ----- Method: GraphicalDictionaryMenu>>initializeFor:fromDictionary: (in category 'initialization') ----- initializeFor: aTarget fromDictionary: aDictionary "Initialize me for a target and a dictionary." | anIndex aButton | self baseDictionary: aDictionary. target := aTarget. coexistWithOriginal := true. self extent: 210 @ 210. self clipSubmorphs: true. self layoutPolicy: ProportionalLayout new. aButton := (IconicButton new) borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: 'TinyMenu'); color: Color transparent; actWhen: #buttonDown; actionSelector: #showMenu; target: self; setBalloonText: 'menu'. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (-50 @ 6 extent: aButton extent)). aButton := (SimpleButtonMorph new) target: self; borderColor: Color black; label: 'Prev'; actionSelector: #downArrowHit; actWhen: #whilePressed; setBalloonText: 'show previous picture'; yourself. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (-24 @ 4 extent: aButton extent)). aButton := (SimpleButtonMorph new) target: self; borderColor: Color black; label: 'Next'; actionSelector: #upArrowHit; actWhen: #whilePressed; setBalloonText: 'show next pictutre'. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (24 @ 4 extent: aButton extent)). self addMorph: ((UpdatingStringMorph new) contents: ' '; target: self; putSelector: #renameGraphicTo:; getSelector: #truncatedNameOfGraphic; useStringFormat; setBalloonText: 'The name of the current graphic'; yourself) fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0) offsets: (10 @ 40 corner: -10 @ 60)). self addMorph: ((Morph new) extent: 100 @ 4; color: Color black) fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0) offsets: (0 @ 60 corner: 0 @ 64)). formDisplayMorph := (Thumbnail new) extent: 100 @ 100; useInterpolation: true; + maxWidth: 300 minHeight: 100; - maxWidth: 3000 minHeight: 100; yourself. formDisplayMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 extent: 0 at 0) offsets: (8 @ 72 corner: 108 @ 172)). self addMorph: formDisplayMorph. self minimumExtent: 116 at 180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail! Item was changed: BookMorph subclass: #StoryboardBookMorph instanceVariableNames: 'alansSliders panAndTiltFactor zoomFactor zoomController' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-Books'! + !StoryboardBookMorph commentStamp: 'kfr 5/17/2015 23:37' prior: 0! + A BookMorph variant whose pages are instances of ZoomAndScrollMorph. + I have a control area where the user may pan, tilt and zoom over the image shown in the page. - !StoryboardBookMorph commentStamp: '' prior: 0! - A BookMorph variant whose pages are instances of ZoomAndScrollMorph. I have a control area where the user may pan, tilt and zoom over the image shown in the page. + StoryboardBookMorph new openInWorld + + Drop an picture at the book. + + Mouse + - drag up and down to tilt - - drag up and down to zoom in and out - drag left and right to pan + - shift-drag up and down to zoom in and out + + Keyboard + Arrow keys pan and tilts the image + X and Z zoom in and out + + From top left in control panel you pull out stills from diffrent zoom, tilt and pan posititons. + Drop these after eachother to make an animation script. + The numbers between the stills are playback speed, that can be edited. + Save script from the scripts halo menu. + + Playback script from controll panels halo menu. + + ! - - shift-drag up and down to tilt.! Item was changed: ----- Method: StoryboardBookMorph>>initialize (in category 'initialization') ----- initialize + newPagePrototype := ZoomAndScrollMorph new extent: 300 at 300. - newPagePrototype := ZoomAndScrollMorph new extent: Display extent // 3. zoomController := ZoomAndScrollControllerMorph new + setBalloonText: 'Drag in here to zoom, tilt and pan the page above'; + extent: 246 at 147. - setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. super initialize. + zoomController openInWorld. + + "tool := RectangleMorph new extent: 250 at 170; layoutPolicy: TableLayout new. + tool addMorph: zoomController. - self addMorphBack: zoomController. - alansSliders := { {#changeTiltFactor: . #getTiltFactor . 'Pan and tilt sensitivity'}. {#changeZoomFactor: . #getZoomFactor . 'Zoom sensitivity'}. } collect: [ :sData | { SimpleSliderMorph new extent: 150 at 10; color: Color orange; sliderColor: Color gray; target: self; actionSelector: sData first; setBalloonText: sData third; adjustToValue: (self perform: sData second). sData second } ]. + alansSliders do: [ :each | tool addMorphBack: each first]. + tool openInWorld" - alansSliders do: [ :each | self addMorphBack: each first] ! Item was changed: + ----- Method: ZoomAndScrollControllerMorph>>changeKeys (in category 'as yet unclassified') ----- - ----- Method: ZoomAndScrollControllerMorph>>changeKeys (in category 'menus') ----- changeKeys upDownCodes := Dictionary new. + changeKeysState := #(up down left right in out). - changeKeysState := #(up down in out). self changed.! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" | displayer dataMorph | super initialize. "" hasFocus := true. currentKeyDown := Set new. upDownCodes := Dictionary new. + upDownCodes at: 31 put: #up; "arrow keys" + at: 30 put: #down; + at: 29 put: #left; + at: 28 put: #right; + at: 88 put:#in; "x" + at: 90 put:#out. "y" + - upDownCodes at: 126 put: #up; - at: 125 put: #down; - at: 123 put: #out; - at: 124 put: #in. - "arrow keys on the mac" self extent: 40 @ 40; vResizing: #rigid; hResizing: #spaceFill; setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. dataMorph := AlignmentMorph newColumn. dataMorph color: Color yellow; hResizing: #shrinkWrap; vResizing: #shrinkWrap. dataMorph on: #mouseDown send: #grabCameraPositionEvent:morph: to: self. displayer := UpdatingStringMorph new getSelector: #cameraPointRounded; target: self; growable: true; putSelector: nil. dataMorph addMorph: displayer lock. displayer := UpdatingStringMorph new getSelector: #cameraScale; target: self; growable: true; floatPrecision: 0.001; putSelector: nil. dataMorph addMorph: displayer lock. self addMorph: dataMorph! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>step (in category 'stepping and presenter') ----- step + | delta halfDW shift | + shift := false. - | delta halfDW | - (self valueOfProperty: #currentCameraVersion ifAbsent: [0]) = self currentCameraVersion ifFalse: [ self patchOldVersion1. self setProperty: #currentCameraVersion toValue: self currentCameraVersion. ]. super step. self doProgrammedMoves. + (currentKeyDown ifNil: [#()]) do: [ :each | | action | + action := upDownCodes at: each ifAbsent: [shift := true]. - (currentKeyDown ifNil: [#()]) do: [ :each | | action | - action := upDownCodes at: each ifAbsent: [#fugeddaboutit]. action == #in ifTrue: [ target scaleImageBy: -10. ]. action == #out ifTrue: [ target scaleImageBy: 10. ]. action == #up ifTrue: [ + target panImageBy: 0@ -20. - target tiltImageBy: -20. ]. action == #down ifTrue: [ + target panImageBy: 0 at 20. - target tiltImageBy: 20. ]. + action == #left ifTrue: [ + target panImageBy: -20 at 0. + ]. + action == #right ifTrue: [ + target panImageBy: 20 at 0. + ]. ]. mouseMovePoint ifNil: [^self]. mouseDownPoint ifNil: [^self]. target ifNil: [^self]. halfDW := self deadZoneWidth // 2. + halfDW := self deadZoneWidth // 2. delta := mouseMovePoint - mouseDownPoint. delta x abs <= halfDW ifTrue: [delta := 0 at delta y]. delta y abs <= halfDW ifTrue: [delta := delta x at 0]. + shift ifTrue:[^target scaleImageBy: delta x]. + target panImageBy: delta x @ delta y - - target panImageBy: delta x. ! Item was changed: + ----- Method: ZoomAndScrollMorph>>panImageBy: (in category 'as yet unclassified') ----- - ----- Method: ZoomAndScrollMorph>>panImageBy: (in category 'transformations') ----- panImageBy: pixels + self changeOffsetBy: (pixels x* self getTiltFactor * 0.1) @ (pixels y* self getTiltFactor * 0.1) - self changeOffsetBy: (pixels * self getTiltFactor * 0.1) @ 0. "steps := (pixels abs / 6) exp rounded * pixels sign." "==Alan's preferred factors pan = 0.0425531914893617 zoom = 0.099290780141844 ===" ! Item was removed: - ----- Method: ZoomAndScrollMorph>>tiltImageBy: (in category 'transformations') ----- - tiltImageBy: pixels - - self changeOffsetBy: 0 @ (pixels * self getTiltFactor * 0.1) - - " steps := (pixels abs / 6) exp rounded * pixels sign. - " - "==Alan's preferred factors - pan = 0.0425531914893617 - zoom = 0.099290780141844 - ===" - ! From commits at source.squeak.org Wed Nov 4 15:50:49 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:50:49 0000 Subject: [squeak-dev] The Trunk: MorphicExtras-kfr.277.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-kfr.277.mcz ==================== Summary ==================== Name: MorphicExtras-kfr.277 Author: kfr Time: 19 September 2020, 10:24:34.566601 pm UUID: d39cb295-7978-d240-889f-6f5388354762 Ancestors: MorphicExtras-kfr.276 Width 3000 was a little excessive for some images =============== Diff against MorphicExtras-kfr.276 =============== Item was changed: ----- Method: GraphicalDictionaryMenu>>initializeFor:fromDictionary: (in category 'initialization') ----- initializeFor: aTarget fromDictionary: aDictionary "Initialize me for a target and a dictionary." | anIndex aButton | self baseDictionary: aDictionary. target := aTarget. coexistWithOriginal := true. self extent: 210 @ 210. self clipSubmorphs: true. self layoutPolicy: ProportionalLayout new. aButton := (IconicButton new) borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: 'TinyMenu'); color: Color transparent; actWhen: #buttonDown; actionSelector: #showMenu; target: self; setBalloonText: 'menu'. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (-50 @ 6 extent: aButton extent)). aButton := (SimpleButtonMorph new) target: self; borderColor: Color black; label: 'Prev'; actionSelector: #downArrowHit; actWhen: #whilePressed; setBalloonText: 'show previous picture'; yourself. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (-24 @ 4 extent: aButton extent)). aButton := (SimpleButtonMorph new) target: self; borderColor: Color black; label: 'Next'; actionSelector: #upArrowHit; actWhen: #whilePressed; setBalloonText: 'show next pictutre'. self addMorph: aButton fullFrame: (LayoutFrame fractions: (0.5 @ 0 extent: 0 @ 0) offsets: (24 @ 4 extent: aButton extent)). self addMorph: ((UpdatingStringMorph new) contents: ' '; target: self; putSelector: #renameGraphicTo:; getSelector: #truncatedNameOfGraphic; useStringFormat; setBalloonText: 'The name of the current graphic'; yourself) fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0) offsets: (10 @ 40 corner: -10 @ 60)). self addMorph: ((Morph new) extent: 100 @ 4; color: Color black) fullFrame: (LayoutFrame fractions: (0 @ 0 extent: 1 @ 0) offsets: (0 @ 60 corner: 0 @ 64)). formDisplayMorph := (Thumbnail new) extent: 100 @ 100; useInterpolation: true; + maxWidth: 300 minHeight: 100; - maxWidth: 3000 minHeight: 100; yourself. formDisplayMorph layoutFrame: (LayoutFrame fractions: (0 @ 0 extent: 0 at 0) offsets: (8 @ 72 corner: 108 @ 172)). self addMorph: formDisplayMorph. self minimumExtent: 116 at 180. target ifNotNil: [(anIndex := formChoices indexOf: target form ifAbsent: []) ifNotNil: [currentIndex := anIndex]]. self updateThumbnail! From commits at source.squeak.org Wed Nov 4 15:50:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:50:55 0000 Subject: [squeak-dev] The Trunk: MorphicExtras-kfr.269.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-kfr.269.mcz ==================== Summary ==================== Name: MorphicExtras-kfr.269 Author: kfr Time: 30 January 2020, 5:44:33.710753 pm UUID: 4e53f407-fddf-7d4f-8d14-5129ccf23fd4 Ancestors: MorphicExtras-mt.268 Make FatBitsPaint menu a separate stay up menu =============== Diff against MorphicExtras-mt.268 =============== Item was changed: ----- Method: FatBitsPaint>>addCustomMenuItems:hand: (in category 'menu') ----- + addCustomMenuItems: aCustomMenu hand: aHandMorph + super addCustomMenuItems: aCustomMenu hand: aHandMorph. + ^ aCustomMenu add: 'fat bits paint ..' translated action: #openFatBitsPaintMenu! - addCustomMenuItems: aCustomMenu hand: aHandMorph - - super addCustomMenuItems: aCustomMenu hand: aHandMorph. - aCustomMenu - add: 'background color' translated action: #setBackgroundColor:; - add: 'pen color' translated action: #setPenColor:; - add: 'pen size' translated action: #setPenSize:; - add: 'fill' translated action: #fill; - add: 'magnification' translated action: #setMagnification:; - add: 'accept' translated action: #accept; - add: 'revert' translated action: #revert; - add: 'inspect' translated action: #inspectForm; - add: 'file out' translated action: #fileOut; - add: 'selection...' translated action: #selectionMenu:; - add: 'tools...' translated action: #toolMenu:! Item was added: + ----- Method: FatBitsPaint>>openFatBitsPaintMenu (in category 'menu') ----- + openFatBitsPaintMenu + | menu | + (menu := MenuMorph entitled: 'FatBitsPaint' translated) defaultTarget: self; + addStayUpItem; + commandKeyHandler: self. + menu add: 'background color' translated action: #setBackgroundColor:; + add: 'pen color' translated action: #setPenColor:; + add: 'pen size' translated action: #setPenSize:; + add: 'fill' translated action: #fill; + add: 'magnification' translated action: #setMagnification:; + add: 'accept' translated action: #accept; + add: 'revert' translated action: #revert; + add: 'inspect' translated action: #inspectForm; + add: 'file out' translated action: #fileOut; + add: 'selection...' translated action: #selectionMenu:; + add: 'tools...' translated action: #toolMenu:. + ^ menu popUpInWorld! From commits at source.squeak.org Wed Nov 4 15:51:03 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:51:03 0000 Subject: [squeak-dev] The Trunk: MorphicExtras-kfr.165.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-kfr.165.mcz ==================== Summary ==================== Name: MorphicExtras-kfr.165 Author: kfr Time: 17 May 2015, 11:43:15.836 pm UUID: 6ed5bbe8-8b28-7948-a1b0-de35fcfccb0d Ancestors: MorphicExtras-kfr.164 More cleanup to StoyboardBookMorph =============== Diff against MorphicExtras-nice.163 =============== Item was changed: BookMorph subclass: #StoryboardBookMorph instanceVariableNames: 'alansSliders panAndTiltFactor zoomFactor zoomController' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-Books'! + !StoryboardBookMorph commentStamp: 'kfr 5/17/2015 23:37' prior: 0! + A BookMorph variant whose pages are instances of ZoomAndScrollMorph. + I have a control area where the user may pan, tilt and zoom over the image shown in the page. - !StoryboardBookMorph commentStamp: '' prior: 0! - A BookMorph variant whose pages are instances of ZoomAndScrollMorph. I have a control area where the user may pan, tilt and zoom over the image shown in the page. + StoryboardBookMorph new openInWorld + + Drop an picture at the book. + + Mouse + - drag up and down to tilt - - drag up and down to zoom in and out - drag left and right to pan + - shift-drag up and down to zoom in and out + + Keyboard + Arrow keys pan and tilts the image + X and Z zoom in and out + + From top left in control panel you pull out stills from diffrent zoom, tilt and pan posititons. + Drop these after eachother to make an animation script. + The numbers between the stills are playback speed, that can be edited. + Save script from the scripts halo menu. + + Playback script from controll panels halo menu. + + ! - - shift-drag up and down to tilt.! Item was changed: ----- Method: StoryboardBookMorph>>initialize (in category 'initialization') ----- initialize + newPagePrototype := ZoomAndScrollMorph new extent: 300 at 300. - newPagePrototype := ZoomAndScrollMorph new extent: Display extent // 3. zoomController := ZoomAndScrollControllerMorph new + setBalloonText: 'Drag in here to zoom, tilt and pan the page above'; + extent: 246 at 147. - setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. super initialize. + zoomController openInWorld. + + "tool := RectangleMorph new extent: 250 at 170; layoutPolicy: TableLayout new. + tool addMorph: zoomController. - self addMorphBack: zoomController. - alansSliders := { {#changeTiltFactor: . #getTiltFactor . 'Pan and tilt sensitivity'}. {#changeZoomFactor: . #getZoomFactor . 'Zoom sensitivity'}. } collect: [ :sData | { SimpleSliderMorph new extent: 150 at 10; color: Color orange; sliderColor: Color gray; target: self; actionSelector: sData first; setBalloonText: sData third; adjustToValue: (self perform: sData second). sData second } ]. + alansSliders do: [ :each | tool addMorphBack: each first]. + tool openInWorld" - alansSliders do: [ :each | self addMorphBack: each first] ! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>changeKeys (in category 'as yet unclassified') ----- changeKeys upDownCodes := Dictionary new. + changeKeysState := #(up down left right in out). - changeKeysState := #(up down in out). self changed.! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" | displayer dataMorph | super initialize. "" hasFocus := true. currentKeyDown := Set new. upDownCodes := Dictionary new. + upDownCodes at: 31 put: #up; "arrow keys" + at: 30 put: #down; + at: 29 put: #left; + at: 28 put: #right; + at: 88 put:#in; "x" + at: 90 put:#out. "y" + - upDownCodes at: 126 put: #up; - at: 125 put: #down; - at: 123 put: #out; - at: 124 put: #in. - "arrow keys on the mac" self extent: 40 @ 40; vResizing: #rigid; hResizing: #spaceFill; setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. dataMorph := AlignmentMorph newColumn. dataMorph color: Color yellow; hResizing: #shrinkWrap; vResizing: #shrinkWrap. dataMorph on: #mouseDown send: #grabCameraPositionEvent:morph: to: self. displayer := UpdatingStringMorph new getSelector: #cameraPointRounded; target: self; growable: true; putSelector: nil. dataMorph addMorph: displayer lock. displayer := UpdatingStringMorph new getSelector: #cameraScale; target: self; growable: true; floatPrecision: 0.001; putSelector: nil. dataMorph addMorph: displayer lock. self addMorph: dataMorph! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>step (in category 'stepping and presenter') ----- step + | delta halfDW shift | + shift := false. - | delta halfDW | - (self valueOfProperty: #currentCameraVersion ifAbsent: [0]) = self currentCameraVersion ifFalse: [ self patchOldVersion1. self setProperty: #currentCameraVersion toValue: self currentCameraVersion. ]. super step. self doProgrammedMoves. + (currentKeyDown ifNil: [#()]) do: [ :each | | action | + action := upDownCodes at: each ifAbsent: [shift := true]. - (currentKeyDown ifNil: [#()]) do: [ :each | | action | - action := upDownCodes at: each ifAbsent: [#fugeddaboutit]. action == #in ifTrue: [ target scaleImageBy: -10. ]. action == #out ifTrue: [ target scaleImageBy: 10. ]. action == #up ifTrue: [ + target panImageBy: 0@ -20. - target tiltImageBy: -20. ]. action == #down ifTrue: [ + target panImageBy: 0 at 20. - target tiltImageBy: 20. ]. + action == #left ifTrue: [ + target panImageBy: -20 at 0. + ]. + action == #right ifTrue: [ + target panImageBy: 20 at 0. + ]. ]. mouseMovePoint ifNil: [^self]. mouseDownPoint ifNil: [^self]. target ifNil: [^self]. halfDW := self deadZoneWidth // 2. + halfDW := self deadZoneWidth // 2. delta := mouseMovePoint - mouseDownPoint. delta x abs <= halfDW ifTrue: [delta := 0 at delta y]. delta y abs <= halfDW ifTrue: [delta := delta x at 0]. + shift ifTrue:[^target scaleImageBy: delta x]. + target panImageBy: delta x @ delta y - - target panImageBy: delta x. ! Item was changed: ----- Method: ZoomAndScrollMorph>>panImageBy: (in category 'as yet unclassified') ----- panImageBy: pixels + self changeOffsetBy: (pixels x* self getTiltFactor * 0.1) @ (pixels y* self getTiltFactor * 0.1) - self changeOffsetBy: (pixels * self getTiltFactor * 0.1) @ 0. "steps := (pixels abs / 6) exp rounded * pixels sign." "==Alan's preferred factors pan = 0.0425531914893617 zoom = 0.099290780141844 ===" ! Item was removed: - ----- Method: ZoomAndScrollMorph>>tiltImageBy: (in category 'as yet unclassified') ----- - tiltImageBy: pixels - - self changeOffsetBy: 0 @ (pixels * self getTiltFactor * 0.1) - - " steps := (pixels abs / 6) exp rounded * pixels sign. - " - "==Alan's preferred factors - pan = 0.0425531914893617 - zoom = 0.099290780141844 - ===" - ! From commits at source.squeak.org Wed Nov 4 15:51:09 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 15:51:09 0000 Subject: [squeak-dev] The Trunk: MorphicExtras-kfr.164.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-kfr.164.mcz ==================== Summary ==================== Name: MorphicExtras-kfr.164 Author: kfr Time: 17 May 2015, 11:38:22.475 pm UUID: ce706845-ed00-3b46-ab92-8169dc372543 Ancestors: MorphicExtras-nice.163 Revive StoryboardBookMorph =============== Diff against MorphicExtras-nice.163 =============== Item was changed: BookMorph subclass: #StoryboardBookMorph instanceVariableNames: 'alansSliders panAndTiltFactor zoomFactor zoomController' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-Books'! + !StoryboardBookMorph commentStamp: 'kfr 5/17/2015 23:37' prior: 0! + A BookMorph variant whose pages are instances of ZoomAndScrollMorph. + I have a control area where the user may pan, tilt and zoom over the image shown in the page. - !StoryboardBookMorph commentStamp: '' prior: 0! - A BookMorph variant whose pages are instances of ZoomAndScrollMorph. I have a control area where the user may pan, tilt and zoom over the image shown in the page. + StoryboardBookMorph new openInWorld + + Drop an picture at the book. + + Mouse + - drag up and down to tilt - - drag up and down to zoom in and out - drag left and right to pan + - shift-drag up and down to zoom in and out + + Keyboard + Arrow keys pan and tilts the image + X and Z zoom in and out + + From top left in control panel you pull out stills from diffrent zoom, tilt and pan posititons. + Drop these after eachother to make an animation script. + The numbers between the stills are playback speed, that can be edited. + Save script from the scripts halo menu. + + Playback script from controll panels halo menu. + + ! - - shift-drag up and down to tilt.! Item was changed: ----- Method: StoryboardBookMorph>>initialize (in category 'initialization') ----- initialize + newPagePrototype := ZoomAndScrollMorph new extent: 300 at 300. - newPagePrototype := ZoomAndScrollMorph new extent: Display extent // 3. zoomController := ZoomAndScrollControllerMorph new + setBalloonText: 'Drag in here to zoom, tilt and pan the page above'; + extent: 246 at 147. - setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. super initialize. + zoomController openInWorld. + + "tool := RectangleMorph new extent: 250 at 170; layoutPolicy: TableLayout new. + tool addMorph: zoomController. - self addMorphBack: zoomController. - alansSliders := { {#changeTiltFactor: . #getTiltFactor . 'Pan and tilt sensitivity'}. {#changeZoomFactor: . #getZoomFactor . 'Zoom sensitivity'}. } collect: [ :sData | { SimpleSliderMorph new extent: 150 at 10; color: Color orange; sliderColor: Color gray; target: self; actionSelector: sData first; setBalloonText: sData third; adjustToValue: (self perform: sData second). sData second } ]. + alansSliders do: [ :each | tool addMorphBack: each first]. + tool openInWorld" - alansSliders do: [ :each | self addMorphBack: each first] ! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>changeKeys (in category 'as yet unclassified') ----- changeKeys upDownCodes := Dictionary new. + changeKeysState := #(up down left right in out). - changeKeysState := #(up down in out). self changed.! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" | displayer dataMorph | super initialize. "" hasFocus := true. currentKeyDown := Set new. upDownCodes := Dictionary new. + upDownCodes at: 31 put: #up; "arrow keys" + at: 30 put: #down; + at: 29 put: #left; + at: 28 put: #right; + at: 88 put:#in; "x" + at: 90 put:#out. "y" + - upDownCodes at: 126 put: #up; - at: 125 put: #down; - at: 123 put: #out; - at: 124 put: #in. - "arrow keys on the mac" self extent: 40 @ 40; vResizing: #rigid; hResizing: #spaceFill; setBalloonText: 'Drag in here to zoom, tilt and pan the page above'. dataMorph := AlignmentMorph newColumn. dataMorph color: Color yellow; hResizing: #shrinkWrap; vResizing: #shrinkWrap. dataMorph on: #mouseDown send: #grabCameraPositionEvent:morph: to: self. displayer := UpdatingStringMorph new getSelector: #cameraPointRounded; target: self; growable: true; putSelector: nil. dataMorph addMorph: displayer lock. displayer := UpdatingStringMorph new getSelector: #cameraScale; target: self; growable: true; floatPrecision: 0.001; putSelector: nil. dataMorph addMorph: displayer lock. self addMorph: dataMorph! Item was changed: ----- Method: ZoomAndScrollControllerMorph>>step (in category 'stepping and presenter') ----- step + | delta halfDW shift | + shift := false. - | delta halfDW | - (self valueOfProperty: #currentCameraVersion ifAbsent: [0]) = self currentCameraVersion ifFalse: [ self patchOldVersion1. self setProperty: #currentCameraVersion toValue: self currentCameraVersion. ]. super step. self doProgrammedMoves. + (currentKeyDown ifNil: [#()]) do: [ :each | | action | + action := upDownCodes at: each ifAbsent: [shift := true]. - (currentKeyDown ifNil: [#()]) do: [ :each | | action | - action := upDownCodes at: each ifAbsent: [#fugeddaboutit]. action == #in ifTrue: [ target scaleImageBy: -10. ]. action == #out ifTrue: [ target scaleImageBy: 10. ]. action == #up ifTrue: [ + target tiltImageBy: 0@ -20. - target tiltImageBy: -20. ]. action == #down ifTrue: [ + target tiltImageBy: 0 at 20. - target tiltImageBy: 20. ]. + action == #left ifTrue: [ + target tiltImageBy: -20 at 0. + ]. + action == #right ifTrue: [ + target tiltImageBy: 20 at 0. + ]. ]. mouseMovePoint ifNil: [^self]. mouseDownPoint ifNil: [^self]. target ifNil: [^self]. halfDW := self deadZoneWidth // 2. + halfDW := self deadZoneWidth // 2. delta := mouseMovePoint - mouseDownPoint. delta x abs <= halfDW ifTrue: [delta := 0 at delta y]. delta y abs <= halfDW ifTrue: [delta := delta x at 0]. + shift ifTrue:[ target scaleImageBy: delta x]. + target panImageBy: delta x @ delta y - - target panImageBy: delta x. ! Item was changed: ----- Method: ZoomAndScrollMorph>>panImageBy: (in category 'as yet unclassified') ----- panImageBy: pixels + self changeOffsetBy: (pixels x* self getTiltFactor * 0.1) @ (pixels y* self getTiltFactor * 0.1) - self changeOffsetBy: (pixels * self getTiltFactor * 0.1) @ 0. "steps := (pixels abs / 6) exp rounded * pixels sign." "==Alan's preferred factors pan = 0.0425531914893617 zoom = 0.099290780141844 ===" ! Item was changed: ----- Method: ZoomAndScrollMorph>>tiltImageBy: (in category 'as yet unclassified') ----- tiltImageBy: pixels + self changeOffsetBy: (pixels x * self getTiltFactor * 0.1) @ (pixels y * self getTiltFactor * 0.1) - self changeOffsetBy: 0 @ (pixels * self getTiltFactor * 0.1) " steps := (pixels abs / 6) exp rounded * pixels sign. " "==Alan's preferred factors pan = 0.0425531914893617 zoom = 0.099290780141844 ===" ! From nicolas.cellier.aka.nice at gmail.com Wed Nov 4 16:13:19 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed, 4 Nov 2020 17:13:19 +0100 Subject: [squeak-dev] The Trunk: Monticello-bf.540.mcz In-Reply-To: References: Message-ID: Remember this mail from February 2019? Still cleaning the inbox... I see this: *Name: Monticello-bf.540Author: bfTime: 3 May 2013, 12:06:01.01 pmUUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dcAncestors: Monticello-bf.532, Monticello-fbs.539This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version.* It is not signalled as false ancestor, so it means that this ancestor is in history, or another package in history has same UUID (unlikely!). But in trunk there is a different package: *Name: Monticello-bf.540Author: bfTime: 4 May 2013, 8:13:11.165 pmUUID: b8904753-a5e5-4061-a912-49480229e91aAncestors: Monticello-fbs.539Add MCReorganizationPreloader which can resolve moves between arbitrary packages.* Do we really have two different Monticello-bf.540 in ancestors or what? Is there a morphic tool to visualize the ancestry graph? I do not remember the conclusion, but can we browse/download/access the two ancestors? Le mer. 4 nov. 2020 à 15:57, a écrit : > Marcel Taeumel uploaded a new version of Monticello to project The Trunk: > http://source.squeak.org/trunk/Monticello-bf.540.mcz > > ==================== Summary ==================== > > Name: Monticello-bf.540 > Author: bf > Time: 3 May 2013, 12:06:01.01 pm > UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc > Ancestors: Monticello-bf.532, Monticello-fbs.539 > > This is my allow-partial-commits mod, improved to always diff to the > target repository, and merged with the latest fbs.359 trunk version. > > =============== Diff against Monticello-fbs.539 =============== > > Item was added: > + ----- Method: MCPatch>>ignoring: (in category 'accessing') ----- > + ignoring: ignoredOperations > + ^ MCPatch operations: (operations difference: ignoredOperations)! > > Item was added: > + Notification subclass: #MCRepositoryRequest > + instanceVariableNames: '' > + classVariableNames: '' > + poolDictionaries: '' > + category: 'Monticello-UI'! > > Item was changed: > + MCPatchBrowser subclass: #MCSaveVersionDialog > + instanceVariableNames: 'name message ignore' > - MCTool subclass: #MCSaveVersionDialog > - instanceVariableNames: 'name message' > classVariableNames: '' > poolDictionaries: '' > category: 'Monticello-UI'! > > Item was changed: > ----- Method: MCSaveVersionDialog>>accept (in category 'as yet > unclassified') ----- > accept > self answer: > (Array > with: (self findTextMorph: #versionName) text > asString > + with: (self findTextMorph: #logMessage) text > asString > + with: ignore) > + ! > - with: (self findTextMorph: #logMessage) text > asString) > - ! > > Item was changed: > ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet > unclassified') ----- > defaultExtent > + ^ 600 at 600! > - ^ 400 at 300! > > Item was added: > + ----- Method: MCSaveVersionDialog>>ignore (in category 'as yet > unclassified') ----- > + ignore > + ^ ignore ifNil: [ignore := Set new]! > > Item was added: > + ----- Method: MCSaveVersionDialog>>ignoreSelection (in category 'as yet > unclassified') ----- > + ignoreSelection > + selection > + ifNil: [ignore size = items size > + ifFalse: [ignore addAll: items] > + ifTrue: [ignore removeAll]] > + ifNotNil: [ > + ignore remove: selection ifAbsent: [ > + ignore add: selection]. > + self selection < items size > + ifTrue: [self selection: self selection + > 1]]. > + self changed: #list > + ! > > Item was added: > + ----- Method: MCSaveVersionDialog>>installSelection (in category 'as yet > unclassified') ----- > + installSelection > + super installSelection. > + selection ifNotNil: [ > + ignore remove: selection ifAbsent: []. > + self changed: #list]. > + > + ! > > Item was added: > + ----- Method: MCSaveVersionDialog>>list (in category 'as yet > unclassified') ----- > + list > + ^ self items collect: [:ea | > + (self ignore includes: ea) > + ifFalse: [ea summary] > + ifTrue: [Text string: '( ', ea summary, ' )' > attribute: TextEmphasis struckOut ]]! > > Item was added: > + ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'as > yet unclassified') ----- > + methodListKey: aKeystroke from: aListMorph > + aKeystroke caseOf: { > + [$I] -> [self ignoreSelection]. > + } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! > > Item was added: > + ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet > unclassified') ----- > + methodListMenu: aMenu > + aMenu addList:#( > + ('ignore (I)' ignoreSelection 'Do not include this > change when saving') > + -). > + super methodListMenu: aMenu. > + ^aMenu! > > Item was added: > + ----- Method: MCSaveVersionDialog>>revertSelection (in category 'as yet > unclassified') ----- > + revertSelection > + super revertSelection. > + selection ifNotNil: [ > + ignore add: selection. > + self changed: #list]. > + ! > > Item was changed: > ----- Method: MCSaveVersionDialog>>widgetSpecs (in category 'as yet > unclassified') ----- > widgetSpecs > ^ #( > ((textMorph: versionName) (0 0 1 0) (0 0 0 30)) > + ((textMorph: logMessage) (0 0 1 0.3) (0 30 0 -30)) > + ((buttonRow) (0 0.3 1 0.3) (0 -40 0 0)) > + ((listMorph:selection:menu:keystroke: list selection > methodListMenu: methodListKey:from:) (0 0.3 1 0.6) (0 0 0 0)) > + ((textMorph: text) (0 0.6 1 1) (0 0 0 0)) > - ((textMorph: logMessage) (0 0 1 1) (0 30 0 -30)) > - ((buttonRow) (0 1 1 1) (0 -40 0 0)) > )! > > Item was changed: > ----- Method: MCTool>>showModally (in category 'morphic ui') ----- > showModally > modalProcess := Processor activeProcess. > + self window openInWorldExtent: self defaultExtent. > - self window openInWorldExtent: (400 at 400). > [self window world notNil] whileTrue: [ > self window outermostWorldMorph doOneCycle. > ]. > morph := nil. > ^ modalValue! > > Item was changed: > Notification subclass: #MCVersionNameAndMessageRequest > + instanceVariableNames: 'suggestion initialMessage patch' > - instanceVariableNames: 'suggestion initialMessage' > classVariableNames: '' > poolDictionaries: '' > category: 'Monticello-Versioning'! > > Item was changed: > ----- Method: MCVersionNameAndMessageRequest>>defaultAction (in category > 'as yet unclassified') ----- > defaultAction > ^ MCSaveVersionDialog new > versionName: suggestion; > logMessage: initialMessage; > + patch: patch; > showModally! > > Item was added: > + ----- Method: MCVersionNameAndMessageRequest>>patch (in category 'as yet > unclassified') ----- > + patch > + ^ patch! > > Item was added: > + ----- Method: MCVersionNameAndMessageRequest>>patch: (in category 'as > yet unclassified') ----- > + patch: aPatch > + patch := aPatch > + ! > > Item was changed: > ----- Method: MCWorkingCopy>>newVersion (in category 'operations') ----- > newVersion > + | packageSnapshot parentSnapshot patch | > + parentSnapshot := self parentSnapshot. > + packageSnapshot := package snapshot. > + patch := packageSnapshot patchRelativeToBase: parentSnapshot. > ^ (self requestVersionNameAndMessageWithSuggestion: self > uniqueVersionName > + initialMessage: self patchMessageDefault > + patch: patch) ifNotNil: > + [:tuple | > + self newVersionWithName: tuple first > withBlanksTrimmed > + message: (self patchMessageStripped: tuple > second) > + snapshot: (tuple third > + ifEmpty: [packageSnapshot] > + ifNotEmpty: [ > + MCPatcher apply: (patch > ignoring: tuple third) > + to: > parentSnapshot])] > - initialMessage: self patchMessageSuggestion) ifNotNil: > - [:pair | > - self newVersionWithName: pair first > withBlanksTrimmed > - message: (self patchMessageStripped: pair > last)]. > ! > > Item was changed: > ----- Method: MCWorkingCopy>>newVersionWithName:message: (in category > 'operations') ----- > newVersionWithName: nameString message: messageString > + ^self newVersionWithName: nameString message: messageString > snapshot: package snapshot! > - | info deps | > - info := ancestry infoWithName: nameString message: messageString. > - ancestry := MCWorkingAncestry new addAncestor: info. > - self modified: true; modified: false. > - > - deps := self requiredPackages collect: > - [:ea | > - MCVersionDependency > - package: ea > - info: ea workingCopy currentVersionInfo]. > - > - ^ MCVersion > - package: package > - info: info > - snapshot: package snapshot > - dependencies: deps! > > Item was added: > + ----- Method: MCWorkingCopy>>newVersionWithName:message:snapshot: (in > category 'operations') ----- > + newVersionWithName: nameString message: messageString snapshot: aSnapshot > + | info deps clean | > + info := ancestry infoWithName: nameString message: messageString. > + ancestry := MCWorkingAncestry new addAncestor: info. > + clean := (package snapshot patchRelativeToBase: aSnapshot) isEmpty. > + self modified: clean; modified: clean not. "hack to ensure label > is updated" > + > + deps := self requiredPackages collect: > + [:ea | > + MCVersionDependency > + package: ea > + info: ea workingCopy currentVersionInfo]. > + > + ^ MCVersion > + package: package > + info: info > + snapshot: aSnapshot > + dependencies: deps! > > Item was added: > + ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- > + parentSnapshot > + "prefer parent in selected repository" > + MCRepositoryRequest signal ifNotNil: [:repo | > + self ancestors do: [:ancestor | > + (repo versionWithInfo: ancestor) > + ifNotNil: [:ver | ^ver snapshot]]]. > + "otherwise, look in all repositories" > + self ancestors do: [:ancestor | > + (self repositoryGroup versionWithInfo: ancestor) > + ifNotNil: [:ver | ^ver snapshot]]. > + "otherwise" > + ^MCSnapshot empty! > > Item was changed: > ----- Method: MCWorkingCopy>>patchMessageChanges (in category > 'operations') ----- > patchMessageChanges > + | changes | > + changes := package snapshot patchRelativeToBase: self > parentSnapshot. > - | changes parentInfo parentSnapshot | > - parentInfo := self ancestors > - ifEmpty: [nil] > - ifNotEmpty: [self ancestors first]. > - parentSnapshot := self findSnapshotWithVersionInfo: > parentInfo. > - changes := package snapshot patchRelativeToBase: parentSnapshot. > ^ (MCPatchMessage new patch: changes) message! > > Item was removed: > - ----- Method: > MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage: > (in category 'private') ----- > - requestVersionNameAndMessageWithSuggestion: nameString initialMessage: > msgString > - ^ (MCVersionNameAndMessageRequest new > - suggestedName: nameString; > - initialMessage: msgString > - ) signal! > > Item was added: > + ----- Method: > MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage:patch: > (in category 'private') ----- > + requestVersionNameAndMessageWithSuggestion: nameString initialMessage: > msgString patch: aPatch > + ^ (MCVersionNameAndMessageRequest new > + suggestedName: nameString; > + initialMessage: msgString; > + patch: aPatch > + ) signal! > > Item was changed: > ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') > ----- > saveVersion > | repo | > self canSave ifFalse: [^self]. > self checkForNewerVersions ifFalse: [^self]. > repo := self repository. > + (self withRepository: repo do: [workingCopy newVersion]) ifNotNil: > - workingCopy newVersion ifNotNil: > [:v | > (MCVersionInspector new version: v) show. > Cursor wait showWhile: [repo storeVersion: v]. > MCCacheRepository default cacheAllFileNamesDuring: > [repo cacheAllFileNamesDuring: > [v allAvailableDependenciesDo: > [:dep | > (repo includesVersionNamed: dep > info name) > ifFalse: [repo > storeVersion: dep]]]]]! > > Item was added: > + ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category > 'actions') ----- > + withRepository: aRepository do: aBlock > + ^aBlock > + on: MCRepositoryRequest > + do: [:req | req resume: aRepository]! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Wed Nov 4 16:16:50 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 17:16:50 +0100 Subject: [squeak-dev] The Trunk: Monticello-bf.540.mcz In-Reply-To: References: Message-ID: Hmpf. :-( Am 04.11.2020 17:13:47 schrieb Nicolas Cellier : Remember this mail from February 2019? Still cleaning the inbox... I see this: Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539 This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version. It is not signalled as false ancestor, so it means that this ancestor is in history, or another package in history has same UUID (unlikely!). But in trunk there is a different package: Name: Monticello-bf.540 Author: bf Time: 4 May 2013, 8:13:11.165 pm UUID: b8904753-a5e5-4061-a912-49480229e91a Ancestors: Monticello-fbs.539 Add MCReorganizationPreloader which can resolve moves between arbitrary packages. Do we really have two different Monticello-bf.540 in ancestors or what? Is there a morphic tool to visualize the ancestry graph? I do not remember the conclusion, but can we browse/download/access the two ancestors? Le mer. 4 nov. 2020 à 15:57, a écrit : Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-bf.540.mcz [http://source.squeak.org/trunk/Monticello-bf.540.mcz] ==================== Summary ==================== Name: Monticello-bf.540 Author: bf Time: 3 May 2013, 12:06:01.01 pm UUID: 759525eb-5ca8-4ab2-9e4a-bddc7d0680dc Ancestors: Monticello-bf.532, Monticello-fbs.539 This is my allow-partial-commits mod, improved to always diff to the target repository, and merged with the latest fbs.359 trunk version. =============== Diff against Monticello-fbs.539 =============== Item was added: + ----- Method: MCPatch>>ignoring: (in category 'accessing') ----- + ignoring: ignoredOperations +       ^ MCPatch operations: (operations difference: ignoredOperations)! Item was added: + Notification subclass: #MCRepositoryRequest +       instanceVariableNames: '' +       classVariableNames: '' +       poolDictionaries: '' +       category: 'Monticello-UI'! Item was changed: + MCPatchBrowser subclass: #MCSaveVersionDialog +       instanceVariableNames: 'name message ignore' - MCTool subclass: #MCSaveVersionDialog -       instanceVariableNames: 'name message'         classVariableNames: ''         poolDictionaries: ''         category: 'Monticello-UI'! Item was changed:   ----- Method: MCSaveVersionDialog>>accept (in category 'as yet unclassified') -----   accept         self answer:                 (Array                         with: (self findTextMorph: #versionName) text asString +                       with: (self findTextMorph: #logMessage) text asString +                       with: ignore) + ! -                       with: (self findTextMorph: #logMessage) text asString) -       ! Item was changed:   ----- Method: MCSaveVersionDialog>>defaultExtent (in category 'as yet unclassified') -----   defaultExtent +       ^ 600 at 600! -       ^ 400 at 300! Item was added: + ----- Method: MCSaveVersionDialog>>ignore (in category 'as yet unclassified') ----- + ignore +       ^ ignore ifNil: [ignore := Set new]! Item was added: + ----- Method: MCSaveVersionDialog>>ignoreSelection (in category 'as yet unclassified') ----- + ignoreSelection +       selection +               ifNil: [ignore size = items size +                       ifFalse: [ignore addAll: items] +                       ifTrue: [ignore removeAll]] +               ifNotNil: [ +                       ignore remove: selection ifAbsent: [ +                               ignore add: selection]. +                       self selection < items size +                               ifTrue: [self selection: self selection + 1]]. +       self changed: #list + ! Item was added: + ----- Method: MCSaveVersionDialog>>installSelection (in category 'as yet unclassified') ----- + installSelection +       super installSelection. +       selection ifNotNil: [ +               ignore remove: selection ifAbsent: []. +               self changed: #list]. + + ! Item was added: + ----- Method: MCSaveVersionDialog>>list (in category 'as yet unclassified') ----- + list +       ^ self items collect: [:ea | +               (self ignore includes: ea) +                       ifFalse: [ea summary] +                       ifTrue: [Text string: '( ', ea summary, ' )' attribute: TextEmphasis struckOut ]]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListKey:from: (in category 'as yet unclassified') ----- + methodListKey: aKeystroke from: aListMorph +       aKeystroke caseOf: { +               [$I] -> [self ignoreSelection]. +       } otherwise: [super methodListKey: aKeystroke from: aListMorph ]! Item was added: + ----- Method: MCSaveVersionDialog>>methodListMenu: (in category 'as yet unclassified') ----- + methodListMenu: aMenu +       aMenu addList:#( +               ('ignore (I)'   ignoreSelection 'Do not include this change when saving') +               -). +       super methodListMenu: aMenu. +       ^aMenu! Item was added: + ----- Method: MCSaveVersionDialog>>revertSelection (in category 'as yet unclassified') ----- + revertSelection +       super revertSelection. +       selection ifNotNil: [ +               ignore add: selection. +               self changed: #list]. + ! Item was changed:   ----- Method: MCSaveVersionDialog>>widgetSpecs (in category 'as yet unclassified') -----   widgetSpecs         ^ #(                    ((textMorph: versionName) (0 0 1 0) (0 0 0 30)) +               ((textMorph: logMessage) (0 0 1 0.3) (0 30 0 -30)) +               ((buttonRow) (0 0.3 1 0.3) (0 -40 0 0)) +               ((listMorph:selection:menu:keystroke: list selection methodListMenu: methodListKey:from:) (0 0.3 1 0.6) (0 0 0 0)) +               ((textMorph: text) (0 0.6 1 1) (0 0 0 0)) -               ((textMorph: logMessage) (0 0 1 1) (0 30 0 -30)) -               ((buttonRow) (0 1 1 1) (0 -40 0 0))                 )! Item was changed:   ----- Method: MCTool>>showModally (in category 'morphic ui') -----   showModally         modalProcess := Processor activeProcess. +       self window openInWorldExtent: self defaultExtent. -       self window openInWorldExtent: (400 at 400).         [self window world notNil] whileTrue: [                 self window outermostWorldMorph doOneCycle.         ].         morph := nil.         ^ modalValue! Item was changed:   Notification subclass: #MCVersionNameAndMessageRequest +       instanceVariableNames: 'suggestion initialMessage patch' -       instanceVariableNames: 'suggestion initialMessage'         classVariableNames: ''         poolDictionaries: ''         category: 'Monticello-Versioning'! Item was changed:   ----- Method: MCVersionNameAndMessageRequest>>defaultAction (in category 'as yet unclassified') -----   defaultAction         ^ MCSaveVersionDialog new                 versionName: suggestion;                 logMessage: initialMessage; +               patch: patch;                 showModally! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch (in category 'as yet unclassified') ----- + patch +       ^ patch! Item was added: + ----- Method: MCVersionNameAndMessageRequest>>patch: (in category 'as yet unclassified') ----- + patch: aPatch +       patch := aPatch + ! Item was changed:   ----- Method: MCWorkingCopy>>newVersion (in category 'operations') -----   newVersion +       | packageSnapshot parentSnapshot patch | +       parentSnapshot := self parentSnapshot. +       packageSnapshot := package snapshot. +       patch := packageSnapshot patchRelativeToBase: parentSnapshot.         ^ (self requestVersionNameAndMessageWithSuggestion: self uniqueVersionName +               initialMessage: self patchMessageDefault +               patch: patch) ifNotNil: +                       [:tuple | +                       self newVersionWithName: tuple first withBlanksTrimmed +                               message: (self patchMessageStripped: tuple second) +                               snapshot: (tuple third +                                       ifEmpty: [packageSnapshot] +                                       ifNotEmpty: [ +                                               MCPatcher apply: (patch ignoring: tuple third) +                                                       to: parentSnapshot])] -               initialMessage: self patchMessageSuggestion) ifNotNil: -                       [:pair | -                       self newVersionWithName: pair first withBlanksTrimmed -                               message: (self patchMessageStripped: pair last)].   ! Item was changed:   ----- Method: MCWorkingCopy>>newVersionWithName:message: (in category 'operations') -----   newVersionWithName: nameString message: messageString +       ^self newVersionWithName: nameString message: messageString snapshot: package snapshot! -       | info deps | -       info := ancestry infoWithName: nameString message: messageString. -       ancestry := MCWorkingAncestry new addAncestor: info. -       self modified: true; modified: false. -        -       deps := self requiredPackages collect: -               [:ea | -               MCVersionDependency -                       package: ea -                       info: ea workingCopy currentVersionInfo]. - -       ^ MCVersion -               package: package -               info: info -               snapshot: package snapshot -               dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>newVersionWithName:message:snapshot: (in category 'operations') ----- + newVersionWithName: nameString message: messageString snapshot: aSnapshot +       | info deps clean | +       info := ancestry infoWithName: nameString message: messageString. +       ancestry := MCWorkingAncestry new addAncestor: info. +       clean := (package snapshot patchRelativeToBase: aSnapshot) isEmpty. +       self modified: clean; modified: clean not. "hack to ensure label is updated" +        +       deps := self requiredPackages collect: +               [:ea | +               MCVersionDependency +                       package: ea +                       info: ea workingCopy currentVersionInfo]. + +       ^ MCVersion +               package: package +               info: info +               snapshot: aSnapshot +               dependencies: deps! Item was added: + ----- Method: MCWorkingCopy>>parentSnapshot (in category 'private') ----- + parentSnapshot +       "prefer parent in selected repository" +       MCRepositoryRequest signal ifNotNil: [:repo | +               self ancestors do: [:ancestor | +                       (repo versionWithInfo: ancestor) +                               ifNotNil: [:ver | ^ver snapshot]]]. +       "otherwise, look in all repositories" +       self ancestors do: [:ancestor | +               (self repositoryGroup versionWithInfo: ancestor) +                       ifNotNil: [:ver | ^ver snapshot]]. +       "otherwise" +       ^MCSnapshot empty! Item was changed:   ----- Method: MCWorkingCopy>>patchMessageChanges (in category 'operations') -----   patchMessageChanges +       | changes | +       changes := package snapshot patchRelativeToBase: self parentSnapshot. -       | changes parentInfo parentSnapshot | -       parentInfo := self ancestors -               ifEmpty: [nil] -               ifNotEmpty: [self ancestors first]. -       parentSnapshot :=       self findSnapshotWithVersionInfo: parentInfo. -       changes := package snapshot patchRelativeToBase: parentSnapshot.         ^ (MCPatchMessage new patch: changes) message! Item was removed: - ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage: (in category 'private') ----- - requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString -       ^ (MCVersionNameAndMessageRequest new -               suggestedName: nameString; -               initialMessage: msgString -               ) signal! Item was added: + ----- Method: MCWorkingCopy>>requestVersionNameAndMessageWithSuggestion:initialMessage:patch: (in category 'private') ----- + requestVersionNameAndMessageWithSuggestion: nameString initialMessage: msgString patch: aPatch +       ^ (MCVersionNameAndMessageRequest new +               suggestedName: nameString; +               initialMessage: msgString; +               patch: aPatch +               ) signal! Item was changed:   ----- Method: MCWorkingCopyBrowser>>saveVersion (in category 'actions') -----   saveVersion         | repo |         self canSave ifFalse: [^self].         self checkForNewerVersions ifFalse: [^self].         repo := self repository. +       (self withRepository: repo do: [workingCopy newVersion]) ifNotNil: -       workingCopy newVersion ifNotNil:                 [:v |                 (MCVersionInspector new version: v) show.                 Cursor wait showWhile: [repo storeVersion: v].                 MCCacheRepository default cacheAllFileNamesDuring:                         [repo cacheAllFileNamesDuring:                                 [v allAvailableDependenciesDo:                                         [:dep |                                         (repo includesVersionNamed: dep info name)                                                 ifFalse: [repo storeVersion: dep]]]]]! Item was added: + ----- Method: MCWorkingCopyBrowser>>withRepository:do: (in category 'actions') ----- + withRepository: aRepository do: aBlock +       ^aBlock +               on: MCRepositoryRequest +               do: [:req | req resume: aRepository]! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Wed Nov 4 16:44:15 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed, 4 Nov 2020 08:44:15 -0800 Subject: [squeak-dev] Note on recent inbox clean-up In-Reply-To: References: Message-ID: > On Nov 4, 2020, at 3:01 AM, Marcel Taeumel wrote: > >  > Hi Nicolas. > > > If possible it should be scripted because it's really time consuming to clean up via web interface. > > Most of the cases, I suppose, are that copy-vs-move mistake. We do need a "move" button in the MC GUI. Agreed. But I don’t think we should move *any* package from inbox to trunk unless it has already been moved. The right place for inbox submissions that have been reviewed is the treated inbox. Why? A submission to inbox that passes review as is can simply be moved to inbox. That is the natural thing a reviewer will do. But occasionally, as has happened with Kernel over the past few days, an inbox submission will need merging. It is the merge that ends up in trunk. The original inbox submission may be invalid; at worse it could cause the system to lock up or crash if loaded, say as part of an update test starting from the last release and loading all packages in trunk. So I don’t understand why we’re moving things en masse to trunk rather than treated inbox. > > Best, > Marcel >> Am 04.11.2020 11:53:15 schrieb Nicolas Cellier : >> >> Hi Marcel, >> months ago, I'm pretty sure that I did similar clean up, but I had the impression that some files did come back... >> Such clean-up is very important because any extra file in inbox costs reviewers time which is a very scarce resource. >> If possible it should be scripted because it's really time consuming to clean up via web interface. >> >> Le mer. 4 nov. 2020 à 11:44, Marcel Taeumel a écrit : >>> Hi all! >>> >>> I just moved over all Kernel Inbox versions that where already in Trunk. Please move, not copy. Thanks! :-) >>> >>> Best, >>> Marcel >>> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Wed Nov 4 16:47:38 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 4 Nov 2020 17:47:38 +0100 Subject: [squeak-dev] Note on recent inbox clean-up In-Reply-To: References: Message-ID: > So I don’t understand why we’re moving things en masse to trunk rather than treated inbox. Because the entire ancestry should be in the same repository, I suppose. Disconnect the merge of some versions from the original versions and I would be fine to move the originals to treated. Best, Marcel Am 04.11.2020 17:44:28 schrieb Eliot Miranda : On Nov 4, 2020, at 3:01 AM, Marcel Taeumel wrote:  Hi Nicolas. > If possible it should be scripted because it's really time consuming to clean up via web interface. Most of the cases, I suppose, are that copy-vs-move mistake. We do need a "move" button in the MC GUI.  Agreed. But I don’t think we should move *any* package from inbox to trunk unless it has already been moved.  The right place for inbox submissions that have been reviewed is the treated inbox.  Why? A submission to inbox that passes review as is can simply be moved to inbox.  That is the natural thing a reviewer will do.  But occasionally, as has happened with Kernel over the past few days, an inbox submission will need merging.  It is the merge that ends up in trunk.  The original inbox submission may be invalid; at worse it could cause the system to lock up or crash if loaded, say as part of an update test starting from the last release and loading all packages in trunk. So I don’t understand why we’re moving things en masse to trunk rather than treated inbox. Best, Marcel Am 04.11.2020 11:53:15 schrieb Nicolas Cellier : Hi Marcel, months ago, I'm pretty sure that I did similar clean up, but I had the impression that some files did come back... Such clean-up is very important because any extra file in inbox costs reviewers time which is a very scarce resource. If possible it should be scripted because it's really time consuming to clean up via web interface. Le mer. 4 nov. 2020 à 11:44, Marcel Taeumel a écrit : Hi all! I just moved over all Kernel Inbox versions that where already in Trunk. Please move, not copy. Thanks! :-) Best, Marcel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Wed Nov 4 17:43:18 2020 From: tim at rowledge.org (tim Rowledge) Date: Wed, 4 Nov 2020 09:43:18 -0800 Subject: [squeak-dev] The Inbox: Kernel-ct.1362.mcz In-Reply-To: References: Message-ID: <488F69B0-A0C7-4C25-8076-8606BF922B8E@rowledge.org> > On 2020-11-03, at 3:06 PM, Eliot Miranda wrote: > > Go forth and be prolix :-) Wasn't he the wordy argumentative one in the Asterix the Gaul books? Had a (very) long running argument with Otiose the Roman? tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Cap'n! The spellchecker kinna take this abuse! From commits at source.squeak.org Wed Nov 4 18:39:54 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 18:39:54 0000 Subject: [squeak-dev] The Inbox: Tools-ct.1017.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-ct.1017.mcz ==================== Summary ==================== Name: Tools-ct.1017 Author: ct Time: 4 November 2020, 7:39:49.302134 pm UUID: 71fa1576-9511-7743-ab87-a1c4048cda0d Ancestors: Tools-mt.1015 Show number of truncated items in inspectors =============== Diff against Tools-mt.1015 =============== Item was changed: ----- Method: Inspector>>contentsForTruncationOf: (in category 'fields - truncation') ----- contentsForTruncationOf: truncatedKeys + ^ ('<{3} fields named {1} to {2} are not shown. {4} to inspect one of those fields or select "inspect element" from any field''s menu.>' translated asText - ^ ('' translated asText addAttribute: TextEmphasis italic; format: { truncatedKeys first storeString. + truncatedKeys last storeString. + truncatedKeys size. - truncatedKeys last storeString. 'Click here' translated asText addAttribute: (PluggableTextAttribute evalBlock: [self inspectOneOf: truncatedKeys]); + yourself })! - yourself. })! From commits at source.squeak.org Wed Nov 4 19:02:04 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 19:02:04 0000 Subject: [squeak-dev] The Inbox: Collections-ct.920.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-ct.920.mcz ==================== Summary ==================== Name: Collections-ct.920 Author: ct Time: 4 November 2020, 8:01:59.526134 pm UUID: 1a9e498f-42f5-c047-9aa5-baadcfbcb734 Ancestors: Collections-mt.919 Proposal: Honor scaleFactor for default spacings in text constants. With this change, tabs in every text editor are finally displayed hi-dpi-sensitive. Note that I found this method rather by incident than by expertise! I strongly advise against merging this into the Trunk without prior review by someone who has a bit more knowledge of this domain than me. ;-) Is this the right place for such a change, or should we patch the senders of every constant instead? Requires System-ct.1188. =============== Diff against Collections-mt.919 =============== Item was changed: ----- Method: Text class>>initTextConstants (in category 'class initialization') ----- initTextConstants "Initialize constants shared by classes associated with text display, e.g., Space, Tab, Cr, Bs, ESC." "1/24/96 sw: in exasperation and confusion, changed cmd-g mapping from 231 to 232 to see if I could gain any relief?!!" | letter varAndValue tempArray width | "CtrlA..CtrlZ, Ctrla..Ctrlz" letter := $A. #( 212 230 228 196 194 226 241 243 214 229 200 217 246 245 216 202 210 239 211 240 197 198 209 215 242 231 1 166 228 132 130 12 232 179 150 165 136 153 182 14 15 138 17 18 19 11 21 134 145 151 178 167 ) do: [:kbd | TextConstants at: ('Ctrl', letter asSymbol) asSymbol put: kbd asCharacter. letter := letter == $Z ifTrue: [$a] ifFalse: [(letter asciiValue + 1) asCharacter]]. varAndValue := #( Space 32 Tab 9 CR 13 Enter 3 BS 8 BS2 158 ESC 160 Clear 173 ). varAndValue size odd ifTrue: [self error: 'unpaired text constant']. (2 to: varAndValue size by: 2) do: [:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i) asCharacter]. + varAndValue := { + #CtrlDigits. #(159 144 143 128 127 129 131 180 149 135). + #CtrlOpenBrackets. #(201 7 218 249 219 15). - varAndValue := #( - CtrlDigits (159 144 143 128 127 129 131 180 149 135) - CtrlOpenBrackets (201 7 218 249 219 15) "lparen gottn by ctrl-:= = 201; should be 213 but can't type that on Mac" "values for alignment" + #LeftFlush. 0. + #RightFlush. 1. + #Centered. 2. + #Justified. 3. - LeftFlush 0 - RightFlush 1 - Centered 2 - Justified 3 "subscripts for a marginTabsArray tuple" + #LeftMarginTab. 1. + #RightMarginTab. 2. - LeftMarginTab 1 - RightMarginTab 2 "font faces" + #Basal. 0. + #Bold. 1. + #Italic. 2. - Basal 0 - Bold 1 - Italic 2 "in case font doesn't have a width for space character" "some plausible numbers-- are they the right ones?" + #DefaultSpace. (4 * RealEstateAgent scaleFactor) rounded. + #DefaultTab. (24 * RealEstateAgent scaleFactor) rounded. + #DefaultLineGrid. (16 * RealEstateAgent scaleFactor) rounded. + #DefaultBaseline. (12 * RealEstateAgent scaleFactor) rounded. + #DefaultFontFamilySize. 3 "basal, bold, italic" + }. - DefaultSpace 4 - DefaultTab 24 - DefaultLineGrid 16 - DefaultBaseline 12 - DefaultFontFamilySize 3 "basal, bold, italic" - ). varAndValue size odd ifTrue: [self error: 'unpaired text constant']. (2 to: varAndValue size by: 2) do: [:i | TextConstants at: (varAndValue at: i - 1) put: (varAndValue at: i)]. TextConstants at: #DefaultRule put: Form over. TextConstants at: #DefaultMask put: Color black. width := Display width max: 720. tempArray := Array new: width // DefaultTab. 1 to: tempArray size do: [:i | tempArray at: i put: DefaultTab * i]. TextConstants at: #DefaultTabsArray put: tempArray. tempArray := Array new: (width // DefaultTab) // 2. 1 to: tempArray size do: [:i | tempArray at: i put: (Array with: (DefaultTab*i) with: (DefaultTab*i))]. TextConstants at: #DefaultMarginTabsArray put: tempArray. "Text initTextConstants "! From commits at source.squeak.org Wed Nov 4 19:02:12 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 19:02:12 0000 Subject: [squeak-dev] The Inbox: Collections-ct.920.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-ct.920.mcz ==================== Summary ==================== Name: Collections-ct.920 Author: ct Time: 4 November 2020, 8:02:08.093134 pm UUID: f516a6ba-d9ee-0944-be9b-ad4093133c08 Ancestors: Collections-ct.920 Proposal: Honor scaleFactor for default spacings in text constants. With this change, tabs in every text editor are finally displayed hi-dpi-sensitive. Note that I found this method rather by incident than by expertise! I strongly advise against merging this into the Trunk without prior review by someone who has a bit more knowledge of this domain than me. ;-) Is this the right place for such a change, or should we patch the senders of every constant instead? Requires System-ct.1188. =============== Diff against Collections-ct.920 =============== From commits at source.squeak.org Wed Nov 4 19:02:41 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 4 Nov 2020 19:02:41 0000 Subject: [squeak-dev] The Inbox: System-ct.1188.mcz Message-ID: A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-ct.1188.mcz ==================== Summary ==================== Name: System-ct.1188 Author: ct Time: 4 November 2020, 8:02:34.634134 pm UUID: 6bf505c6-8951-fc4d-bde3-63823f801219 Ancestors: System-mt.1187 Complements Collections-ct.920. =============== Diff against System-mt.1187 =============== Item was added: + ----- Method: Text class>>applyUserInterfaceTheme (in category '*System-Preferences') ----- + applyUserInterfaceTheme + + super applyUserInterfaceTheme. + + self initTextConstants.! Item was added: + ----- Method: Text class>>themeProperties (in category '*System-Preferences') ----- + themeProperties + + ^ Model themeProperties! From gettimothy at zoho.com Wed Nov 4 19:12:42 2020 From: gettimothy at zoho.com (gettimothy) Date: Wed, 04 Nov 2020 14:12:42 -0500 Subject: [squeak-dev] sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto mmap: Cannot allocate memory Message-ID: <17594acee79.eff4bf9e12205.11142666769516400@zoho.com> Now you can use "-memory 3g" and have no doubt.  Note that "--" is Pharo, and "-" is Squeak. _,,,^..^,,,_ best, Eliot Thx Eliot. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Wed Nov 4 19:57:14 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Wed, 4 Nov 2020 19:57:14 +0000 Subject: [squeak-dev] WindowEvents and new SystemLaunchEvent/#launchDrop from singleton VM (was: Changeset: Enhanced integration of drag'n'drop from host) In-Reply-To: References: <2842ec379f444e54a3eeaa86238a5c76@student.hpi.uni-potsdam.de>, Message-ID: Hi Jakob, thanks for your reply! :-) So you are proposing to build a separate dispatching mechanism for system launch events, if necessary, which sounds very reasonable with regard to possible performance issues. In this case, there would be no need for an extra event class and I could couple #generateDropFilesEvent: just a little bit stronger to the world. > If the world morph were to dispatch the event, what about non-Morphic applications? Now you're touching a sore spot on event generation in general. No skiving, event generation is very closely coupled to Morphic, just because all the event buffer decoding happens in the HandMorph class! If Morphic is unloaded, the new DnD features cannot be used, just like they were never implemented in MVC, and just like window events which neither ever worked in MVC, too. If we wanted to decouple these aspects, we probably would need to extract most of the event generation methods into another class (maybe EventSensor? maybe an intermediary abstraction level?) and provide some callbacks for things like launchDrops. But I believe this is enough stuff for a follow-up project - which I personally would not give a high priority just because I'm not aware of any concrete use case for a non-Morphic event generation framework at the moment. :-) Any other opinions on this question? Otherwise, I will proceed with eliminating the SystemLaunchEvent soon. Best, Christoph ________________________________ Von: Jakob Reschke Gesendet: Dienstag, 3. November 2020 11:23:24 An: The general-purpose Squeak developers list; Thiede, Christoph Cc: Taeumel, Marcel Betreff: Re: [squeak-dev] WindowEvents and new SystemLaunchEvent/#launchDrop from singleton VM (was: Changeset: Enhanced integration of drag'n'drop from host) I haven't thought this through, but what I first thought of was something like SystemChangeNotifier. A central instance where objects can register for such global events. It sounds odd to me to deliver the event to every single morph in the system. Most of them are probably not interested. So the interested ones should ask for notifications. If the world morph were to dispatch the event, what about non-Morphic applications? Am Mo., 2. Nov. 2020 um 19:28 Uhr schrieb Thiede, Christoph >: Hi Marcel, thanks for the feedback & merge! :-) One part of the patch remains to be reviewed that you did not yet merge because it requires additional discussion; I'm speaking about the SystemLaunchEvent feature. I'd like to ask everyone interested in this proposal to have a look at my original changeset, but because I know its easier just to read this email without downloading and trying out anything, I'm citing the relevant diff here again: MorphicEvent subclass: #SystemLaunchEvent instanceVariableNames: 'arguments wasHandled' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! !SystemLaunchEvent commentStamp: 'ct 1/18/586455 02:22' prior: 0! I am signaled by the VM that is configured as a singleton application when it has been invoked with a new image file. This feature is also known as #launchDrop as well as under several platform-specific names: Unix - runAsSingleInstance Win32 - RunSingleApp Instance Variables arguments: A collection of FileStreams. wasHandled: A Boolean.! !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:31'! handlesSystemLaunch: evt "Do I want to receive #systemLaunch: when the VM instance is invoked with a second image file? See #handleSystemLaunch:." ^ false! ! !Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:36'! systemLaunch: evt "Handle a systemLaunch event, signaled when the VM instance is invoked with a second image file. See #handleSystemLaunch:. Hook for subclasses."! ! !Morph methodsFor: 'events-processing' stamp: 'ct 10/15/2020 19:32'! handleSystemLaunch: anEvent "Handle a system launch event from the OS. Signaled if them VM is configured as a singleton application when it has been invoked again with a second image file. See SystemLaunchEvent comment." anEvent wasHandled ifTrue: [^ self]. "not interested" (self handlesSystemLaunch: anEvent) ifFalse: [^ self]. anEvent wasHandled: true. self systemLaunch: anEvent.! ! !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:32'! handlesSystemLaunch: anEvent ^ self isWorldMorph! ! !PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:57'! systemLaunch: anEvent "Handle a number of files the singleton VM was called with again. See SystemLaunchEvent comment." self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." ^ self dropFiles: anEvent arguments event: anEvent! ! !HandMorph methodsFor: 'private events' stamp: 'ct 1/18/586455 10:01'! generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := 1. "red" "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { ... [4] -> [ "dragDrop" | oldButtons | externalDropMorph ifNil: [ "dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)." ^ SystemLaunchEvent new setArguments: (self collectDropFilesAndDirectories: numFiles) source: self stamp: stamp]. ... So the question is: Do we need an additional event class for this, and if yes, how do we want to propagate these events? I have already spent some thoughts on this before submitting the changeset, and I did not want to make this event exclusive for the world only but accessible for every morph. However, was this a good idea, or would this be a rather different approach from how "system events" work (or should work)? A good precedent may be WindowEvent which is indeed dispatched to the world morph only - at least at the moment. I'm trying to construct an example where another morph could be interested in these events, too. For example, a tool might have opened a session to some critical external system, maybe an SSH shell, and this tool would like to output an extra warning to the user when a #windowClose event is received. However, should it get access to WindowEvents for this purpose, or should they be hidden behind the PasteUpMorph facade and we would prefer to design some high-level hook on the world instead which the SSH tool then could register itself against as a "critical operation"? (NB: The shutDown list would not be the right solution in this fictive example - when #shutDown: is called, the shutdown operation is already in progress which would be "too late" for our tool to reject the shutdown.) I'm pretty sure we can conduct more or less the same debate for the new proposed SystemLaunchEvent because a SystemLaunchEvent is basically very similar to a WindowEvent, just without a position but with one or multiple file paths (internally: file streams). Should you be able to watch an event like this using HandMorph >> #showEvents:? I think so. Should you be able to receive an event like this using an event listener? Probably? Should you be able to intercept an event like this using an event filter? I don't know, but could it harm? Should every morph be able to subscribe to events like this by overriding #handlesSystemLaunch:? I have no idea ... So I'm looking forward to your opinions on this issue ... Do we need a new event class for this, or does it suffice to tell the PasteUpMorph a "private message" only? My versions browser for #generateDropFilesEvent: contains this old version, too, which would be pretty much our alternative: generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." ... dragType caseOf: { ... [4] -> [ "dragDrop" | oldButtons | externalDropMorph ifNil: [ | filesAndDirectories | "dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)." filesAndDirectories := self collectDropFilesAndDirectories: numFiles. self flag: #todo. "ct: Do we need an extra event class for this?" self world launchDropFiles: filesAndDirectories event: (MorphicUnknownEvent new setType: #launchDrop argument: filesAndDirectories hand: self stamp: stamp). ^ nil]. Your two cents please! :-) Best, Christoph ________________________________ Von: Taeumel, Marcel Gesendet: Montag, 2. November 2020 16:40 Uhr An: Thiede, Christoph; squeak-dev at mail.squeak.org Betreff: Re: Changeset: Enhanced integration of drag'n'drop from host Done and merged into Trunk. Best, Marcel Am 26.10.2020 07:47:02 schrieb Marcel Taeumel >: Hi Christoph! This is great news! I will take a look at it and test it for the Windows platform. Best, Marcel Am 23.10.2020 14:11:28 schrieb Thiede, Christoph >: Hi all! :-) I'm glad to officially submit my dropFiles changeset today, finally. It enhances the integration of drag'n'drop (DnD) events delivered by the VM from the host operating system to the image, following one of Marcel's ideas: Instead of generating separate DropFilesEvent instances, every DnD event from the VM is translated into a TransferMorph that can be dragged into every morph or tool like every other Morph of TransferMorph, too. [cid:1758d9b7373f456b1e51] What is the goal of this changeset? This design change entails two key advantages: First, every dragged host element is represented by a first-class object (which is a TransferMorph) instance. Second, as a consequence, applications do no longer need to implement a separate protocol for handling host DnDs (which was #dropFiles:/#wantsDropFiles:) but only need to provide one single proper implementation of #acceptDroppingMorph:event:/#wantsDroppedTransferMorph:. In particular, this also enables developers who use the ToolBuilder(Spec) framework to handle contents dropped from the host system since the old dropFiles protocol was never forwarded to the ToolBuilder framework. How does it work? There have already been complete implementations of the DropPlugin on the VM side for all important platforms (Windows, Linux, and macOS) for a long time (almost 20 years ...) which record four different types of drag events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, until now, only the last of them, #dragDrop, has been handled on the image side (see HandMorph >> #generateDropFilesEvent:). The main work of this changeset can be found in just this method where I added support for the other drag types in order to create, move, and release a TransferMorph accordingly. Other changes include: * Deprecated, but kept working the old DropFilesEvent protocol (these events are still processed, but a DeprecationWarning is signaled if any morph actually handles them). * Migrated the only implementation of the old dropFiles protocol, which is PasteUpMorph, to the unified TransferMorph protocol. * Introduced a new event class + protocol for SystemLaunchEvent (aka #launchDrop) which is generated by a singleton VM when it has been invoked with a new image file (see class comment). That #launchDrop is a curious hack on the VM side to reuse the DnD protocol but has completely different semantics that now are separated on the image side. * Implemented the SystemLaunchEvent protocol on PasteUpMorph. Besides the changeset, I have also fixed a few minor inconsistencies with several VM-specific implementations in the OpenSmalltalk-VM repository (see #508, #514, and #518) that have already been merged (thanks to all reviewers!). What's the current state of the changeset? I have successfully tested the changeset on Windows (Win 2004) and Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. However, I do not have any possibility to test it on the OSVM implementations for macOS and iOS, so your help and feedback especially for these platforms will be greatly appreciated! Please see the attached demo video on how to test the changeset: Simply drag some files into an inspector field or a workspace and you should receive a list of FileStreams and/or FileDirectories. Also, aborting a drag operation should not fail, i.e. drag a file over the image but then drop the file in another window. What's next? There is much more potential for a comfortable host DnD integration! Concretely, I am having two downstream goals in mind: First, dropping other content types besides files and/or directories in your image, such as texts or images (currently, the DropPlugin implementations that I could try out are restricted to the former two types). Second, dragging objects out of the VM to save them as a file, or even better, to drop them in a second image! Vanessa has told me that this was even possible in the past for certain platforms, but unfortunately, the relevant code appears to be dead nowadays. Nevertheless, I have stumbled upon a lot of stubs for both features in the DropPlugin and HandMorph code, and I'm looking forward to reviving them in some interesting follow-up projects! Which related contributions/discussions are there else? * System-ct.1156 (Inbox, fixes double prompt for handling a dropped file when the first dialog was canceled; not included in the changeset) * [squeak-dev] Re: Please try out | Inspector Refactoring =) (the thread contains some interesting brainstorming about MIME type support for dragging inside the image) Please test and review! And many thanks to Marcel for his helpful tips! Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 133740 bytes Desc: pastedImage.png URL: From eliot.miranda at gmail.com Wed Nov 4 20:08:58 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed, 4 Nov 2020 12:08:58 -0800 Subject: [squeak-dev] The Inbox: Kernel-ct.1362.mcz In-Reply-To: <488F69B0-A0C7-4C25-8076-8606BF922B8E@rowledge.org> References: <488F69B0-A0C7-4C25-8076-8606BF922B8E@rowledge.org> Message-ID: On Wed, Nov 4, 2020 at 9:43 AM tim Rowledge wrote: > > > > On 2020-11-03, at 3:06 PM, Eliot Miranda > wrote: > > > > Go forth and be prolix :-) > > Wasn't he the wordy argumentative one in the Asterix the Gaul books? Had a > (very) long running argument with Otiose the Roman? > He was... best comic book series ever... -------------- next part -------------- An HTML attachment was scrubbed... URL: From trygver at ifi.uio.no Wed Nov 4 20:27:57 2020 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Wed, 4 Nov 2020 21:27:57 +0100 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: References: Message-ID: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> Hi, I downloaded it to Mendeley because this should be a safe haven for data. It was accepted, given a DOI and published. Somebody low down in the Mendeley hierarchy has decided it is not a valid data set after all. They have broken my agreement with them and removed it without informing me. This is now an ongoing discussion. Here's is a version of the BabyIDE zip: http://heim.ifi.uio.no/trygver/assets/BabyIDE-2019.07.23.zip It may not be identical to the published version, but should be very close. I have also finished a user guide for the image, I'll probably just make it an attachment to a squeak-Dev message. /How do I make files available on the Squeak web site?// / Trygve On 2020-11-04 16:41, H. Hirzel wrote: > Hello > > I was looking for the latest version of the > > Loke/BabyIDE image > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > >>>> The image is my program repository. It includes some examples of DCI >>>> programming, Ellen's Personal Programming IDE, Squeak Reverse >>>> Engineering >>>> (SRE), and more.) > It is no longer available at this mendeley url as it is not a dataset > but a program. > Could somebody who has downloaded it please make it available on the > squeak web site? > > Thank you > Regards > Hannes > > > > > On 10/4/20, David T. Lewis wrote: >> Thank you Trygve, >> >> I confirm also that the image runs very well on my Ubuntu Linux laptop >> with a VM compiled per http://wiki.squeak.org/squeak/6354. >> >> Dave >> >> On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: >>> Dear Trygve, >>> >>> I confirmed that I could launch the Loke/BabyIDE image with the included >>> SqueakVM for Windows (8.1 and 10) >>> and I could also launch it in a web browser by using the SqueakJS VM ( >>> https://squeak.js.org/run ). >>> >>> Thank you very much. >>> >>> -- >>> sumim >>> >>> 2020-10-03 15:48 Trygve Reenskaug : >>> >>>> Dear Sumim, >>>> Thank you for your kind words. >>>> >>>> The latest version of Loke/BabyIDE written on Squeak3.10.2 is at >>>> https://data.mendeley.com/datasets/5xxgzv7fsp/1 >>>> The image is my program repository. It includes some examples of DCI >>>> programming, Ellen's Personal Programming IDE, Squeak Reverse >>>> Engineering >>>> (SRE), and more. >>>> >>>> Best >>>> --Trygve >>>> >>>> On 2020-10-02 20:14, masato sumi wrote: >>>> >>>> Dear Trygve, >>>> >>>> Thank you for your very long term contribution and efforts. >>>> >>>> I'm very sorry that I couldn't help you at all now. >>>> >>>> I'm afraid, but could you please make your latest version of >>>> Loke/BabyIDE >>>> written on Squeak3.10.2 available for future generations of researchers >>>> and/or followers? >>>> >>>> Anyway, I think your ideas and thoughts should be passed on to future >>>> generations as faithfully as we can possible, and I myself will try to >>>> make >>>> sure that. >>>> >>>> Thank you so much and goodbye. >>>> Please take care of yourself. >>>> >>>> -- >>>> sumim >>>> >>>> 2020-10-03 0:54 Trygve Reenskaug : >>>> >>>>> Dear all, >>>>> I need to use many words to explore why I can't understand current >>>>> Squeak >>>>> code. I believe the reason is a profound one, and I hope some of you >>>>> have >>>>> the patience to read about it. >>>>> >>>>> Thank you for your responses to my 'A Sad Day'-message. One response >>>>> said >>>>> "*But please don't give up as an inventor of MVC, which has simplified >>>>> writing software for all of us.* >>>>> >>>>> >>>>> *We need new ideas to stabilize Smalltalk." *As to MVC, it was received >>>>> with acclamation when I first presented it at PARC in 1978, and people >>>>> suggested I should make it the theme of my article in the special >>>>> Smalltalk >>>>> issue of Byte. I couldn't understand it; MVC was so simple and obvious >>>>> that >>>>> is was not worth writing about it. Nevertheless, people seem to have >>>>> problems understanding MVC. It took me a long time before I gleaned >>>>> what >>>>> was going on. The explanation is a deep one, rooted in our different >>>>> mental >>>>> paradigms. >>>>> >>>>> From around 1970, I was working on Prokon, a distributed system for >>>>> managers in the shipbuilding industry: >>>>> >>>>> Every manager has their own computer that they use for augmenting >>>>> their >>>>> mind. The manager understands their software and ideally writes it >>>>> themselves. Managers delegate conversations with other managers to >>>>> their >>>>> computer's M-to-M network. (Marked with a heavy black line in the >>>>> figure). >>>>> I chose "distributed planning with central control" as my example >>>>> project. >>>>> Each manager creates a plan for their department, using apps suited to >>>>> their particular needs. A **distributed algorithm** ensures consistency >>>>> across departments. >>>>> >>>>> I came to PARC in 1978 and could immediately relate to the Smalltalk >>>>> image with its universe of collaborating objects. Alan's definition of >>>>> object-orientation fitted my Prokon model: "Thus its semantics are a >>>>> bit >>>>> like having thousands and thousands of computers all hooked together by >>>>> a >>>>> very fast network." >>>>> >>>>> MVC prescribes a network of communicating objects. Any object can fill >>>>> one or more positions in the network as long as it has the required >>>>> behavior; their classes are irrelevant. It's so simple that it's not >>>>> worth >>>>> writing about it. >>>>> >>>>> >>>>> ==================== >>>>> >>>>> The work on this post was interrupted at this point by an unexpected >>>>> week >>>>> in hospital. It gave me quiet days of pondering the futility of what I >>>>> am >>>>> doing and I will be terminating my memberships in the Pharo and Squeak >>>>> mailing lists. I have also deleted most of the old draft of this >>>>> message >>>>> and will quickly conclude with two observations: >>>>> >>>>> >>>>> 1. >>>>> The Smalltalk image is a universe of communicating objects. I call >>>>> it >>>>> an object computer. It can be seen as the model of an entirely new >>>>> kind of >>>>> computer, a model on a level closer to the human mind than the von >>>>> Neumann >>>>> model of 1948. The new model is communication-centric and should >>>>> supersede >>>>> the ubiquitous CPU-centric model as soon as possible. Working out >>>>> the >>>>> details of this idea could make an exciting and disruptive Ph.D. >>>>> thesis. >>>>> 2. >>>>> Smalltalk is called a programming language. It is a curious one, >>>>> very >>>>> different from well-known languages like Java with their syntax and >>>>> semantics. Smalltalk, as a programming language, does not have the >>>>> concept >>>>> of a program. Smalltalk, as a class-oriented language, does not have >>>>> syntax >>>>> for the declaration of a class. Smalltalk, as an object-oriented >>>>> language, >>>>> can't describe how objects collaborate to achieve a goal. You appear >>>>> to be >>>>> happy with this state of affairs, at least, I see no sign of anybody >>>>> wanting to move on from the unfinished Smalltalk language to a >>>>> mature >>>>> development environment. I do not find it satisfactory and it is not >>>>> acceptable to the intended managers populating the distributed >>>>> system shown >>>>> in the first picture. Consequently, I have done something about it >>>>> as >>>>> described in my SoSym article "*Personal Programming and the Object >>>>> Computer.*" I am tired of being alone in my endeavors and this ends >>>>> my work with Squeak and other Smalltalks. I wish you health and >>>>> happiness >>>>> wherever you happen to be. >>>>> >>>>> Trygve >>>>> Personal programming and the object computer >>>>> https://doi.org/10.1007/s10270-019-00768-3 >>>>> >>>>> -- >>>>> >>>>> *The essence of object orientation is that objects collaborate to >>>>> achieve a goal. * >>>>> Trygve Reenskaug mailto: trygver at ifi.uio.no >>>>> <%20trygver at ifi.uio.no> >>>>> Morgedalsvn. 5A http://folk.uio.no/trygver/ >>>>> N-0378 Oslo http://fullOO.info >>>>> Norway Tel: (+47) 468 58 625 >>>>> >>>>> >>>> -- >>>> >>>> *The essence of object orientation is that objects collaborate to >>>> achieve >>>> a goal. * >>>> Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> >>>> Morgedalsvn. 5A http://folk.uio.no/trygver/ >>>> N-0378 Oslo http://fullOO.info >>>> Norway Tel: (+47) 468 58 625 >>>> >> >> >> >> >> -- /The essence of object orientation is that objects collaborateto achieve a goal. / Trygve Reenskaug mailto: trygver at ifi.uio.no Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway                     Tel: (+47) 468 58 625 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at fniephaus.com Wed Nov 4 22:18:08 2020 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed, 4 Nov 2020 23:18:08 +0100 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> References: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> Message-ID: On Wed, 4 Nov 2020 at 9:28 pm, Trygve Reenskaug wrote: > Hi, > I downloaded it to Mendeley because this should be a safe haven for data. > It was accepted, given a DOI and published. Somebody low down in the > Mendeley hierarchy has decided it is not a valid data set after all. They > have broken my agreement with them and removed it without informing me. > This is now an ongoing discussion. > > Here's is a version of the BabyIDE zip: > > http://heim.ifi.uio.no/trygver/assets/BabyIDE-2019.07.23.zip > > It may not be identical to the published version, but should be very close. > I have also finished a user guide for the image, I'll probably just make > it an attachment to a squeak-Dev message. > > *How do I make files available on the Squeak web site?* > Hi Trygve, Our website is on GitHub [1] and we accept pull requests. I'm part of the Squeak web team and am happy to assist or upload files to our file server. Fabio [1] https://github.com/squeak-smalltalk/squeak.org > > Trygve > > > On 2020-11-04 16:41, H. Hirzel wrote: > > Hello > > I was looking for the latest version of the > > Loke/BabyIDE image > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > > The image is my program repository. It includes some examples of DCI > programming, Ellen's Personal Programming IDE, Squeak Reverse > Engineering > (SRE), and more.) > > It is no longer available at this mendeley url as it is not a dataset > but a program. > Could somebody who has downloaded it please make it available on the > squeak web site? > > Thank you > Regards > Hannes > > > > > On 10/4/20, David T. Lewis wrote: > > Thank you Trygve, > > I confirm also that the image runs very well on my Ubuntu Linux laptop > with a VM compiled per http://wiki.squeak.org/squeak/6354. > > Dave > > On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: > > Dear Trygve, > > I confirmed that I could launch the Loke/BabyIDE image with the included > SqueakVM for Windows (8.1 and 10) > and I could also launch it in a web browser by using the SqueakJS VM (https://squeak.js.org/run ). > > Thank you very much. > > -- > sumim > > 2020-10-03 15:48 Trygve Reenskaug : > > > Dear Sumim, > Thank you for your kind words. > > The latest version of Loke/BabyIDE written on Squeak3.10.2 is athttps://data.mendeley.com/datasets/5xxgzv7fsp/1 > The image is my program repository. It includes some examples of DCI > programming, Ellen's Personal Programming IDE, Squeak Reverse > Engineering > (SRE), and more. > > Best > --Trygve > > On 2020-10-02 20:14, masato sumi wrote: > > Dear Trygve, > > Thank you for your very long term contribution and efforts. > > I'm very sorry that I couldn't help you at all now. > > I'm afraid, but could you please make your latest version of > Loke/BabyIDE > written on Squeak3.10.2 available for future generations of researchers > and/or followers? > > Anyway, I think your ideas and thoughts should be passed on to future > generations as faithfully as we can possible, and I myself will try to > make > sure that. > > Thank you so much and goodbye. > Please take care of yourself. > > -- > sumim > > 2020-10-03 0:54 Trygve Reenskaug : > > > Dear all, > I need to use many words to explore why I can't understand current > Squeak > code. I believe the reason is a profound one, and I hope some of you > have > the patience to read about it. > > Thank you for your responses to my 'A Sad Day'-message. One response > said > "*But please don't give up as an inventor of MVC, which has simplified > writing software for all of us.* > > > *We need new ideas to stabilize Smalltalk." *As to MVC, it was received > with acclamation when I first presented it at PARC in 1978, and people > suggested I should make it the theme of my article in the special > Smalltalk > issue of Byte. I couldn't understand it; MVC was so simple and obvious > that > is was not worth writing about it. Nevertheless, people seem to have > problems understanding MVC. It took me a long time before I gleaned > what > was going on. The explanation is a deep one, rooted in our different > mental > paradigms. > > From around 1970, I was working on Prokon, a distributed system for > managers in the shipbuilding industry: > > Every manager has their own computer that they use for augmenting > their > mind. The manager understands their software and ideally writes it > themselves. Managers delegate conversations with other managers to > their > computer's M-to-M network. (Marked with a heavy black line in the > figure). > I chose "distributed planning with central control" as my example > project. > Each manager creates a plan for their department, using apps suited to > their particular needs. A **distributed algorithm** ensures consistency > across departments. > > I came to PARC in 1978 and could immediately relate to the Smalltalk > image with its universe of collaborating objects. Alan's definition of > object-orientation fitted my Prokon model: "Thus its semantics are a > bit > like having thousands and thousands of computers all hooked together by > a > very fast network." > > MVC prescribes a network of communicating objects. Any object can fill > one or more positions in the network as long as it has the required > behavior; their classes are irrelevant. It's so simple that it's not > worth > writing about it. > > > ==================== > > The work on this post was interrupted at this point by an unexpected > week > in hospital. It gave me quiet days of pondering the futility of what I > am > doing and I will be terminating my memberships in the Pharo and Squeak > mailing lists. I have also deleted most of the old draft of this > message > and will quickly conclude with two observations: > > > 1. > The Smalltalk image is a universe of communicating objects. I call > it > an object computer. It can be seen as the model of an entirely new > kind of > computer, a model on a level closer to the human mind than the von > Neumann > model of 1948. The new model is communication-centric and should > supersede > the ubiquitous CPU-centric model as soon as possible. Working out > the > details of this idea could make an exciting and disruptive Ph.D. > thesis. > 2. > Smalltalk is called a programming language. It is a curious one, > very > different from well-known languages like Java with their syntax and > semantics. Smalltalk, as a programming language, does not have the > concept > of a program. Smalltalk, as a class-oriented language, does not have > syntax > for the declaration of a class. Smalltalk, as an object-oriented > language, > can't describe how objects collaborate to achieve a goal. You appear > to be > happy with this state of affairs, at least, I see no sign of anybody > wanting to move on from the unfinished Smalltalk language to a > mature > development environment. I do not find it satisfactory and it is not > acceptable to the intended managers populating the distributed > system shown > in the first picture. Consequently, I have done something about it > as > described in my SoSym article "*Personal Programming and the Object > Computer.*" I am tired of being alone in my endeavors and this ends > my work with Squeak and other Smalltalks. I wish you health and > happiness > wherever you happen to be. > > Trygve > Personal programming and the object computerhttps://doi.org/10.1007/s10270-019-00768-3 > > -- > > *The essence of object orientation is that objects collaborate to > achieve a goal. * > Trygve Reenskaug mailto: trygver at ifi.uio.no<%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > N-0378 Oslo http://fullOO.info > Norway Tel: (+47) 468 58 625 > > > > -- > > *The essence of object orientation is that objects collaborate to > achieve > a goal. * > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > N-0378 Oslo http://fullOO.info > Norway Tel: (+47) 468 58 625 > > > > > > > -- > > *The essence of object orientation is that objects collaborate to achieve > a goal. * > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > N-0378 Oslo http://fullOO.info > > > Norway Tel: (+47) 468 58 625 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Thu Nov 5 02:34:28 2020 From: tim at rowledge.org (tim Rowledge) Date: Wed, 4 Nov 2020 18:34:28 -0800 Subject: [squeak-dev] automated checking for new versions of a package in order to trigger a build cycle Message-ID: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> I'd rather like to monitor a number of packages and trigger a build cycle when something new has been spotted; sort of a CI server setup for internal use. There's bits of what look like partial solutions to this scattered around the image but I'm not spotting quite what I want so far. There's methods to query repositories about latest versions, but they seem to be not quite what I need. I could imagine using MCConfigurations somehow but it's still a bit vague. Has anyone already done something of this sort? I'm keen to avoid wasting time if this is a solved thing. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Never do card tricks for the group you play poker with. From marcel.taeumel at hpi.de Thu Nov 5 07:54:45 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 5 Nov 2020 08:54:45 +0100 Subject: [squeak-dev] automated checking for new versions of a package in order to trigger a build cycle In-Reply-To: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> References: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> Message-ID: Hi Tim. We do a cron job for squeak-app to create the updated bundles for files.squeak.org. Daily for Trunk, monthly for releases. In-image changes are not propagated to GitHub or TravisCI. You could avoid a cron setup by -- after any change in your selected packages -- writing stuff to some related repository which can then be tracked through GitHub/TravisCI. Hmm.. you can also set up Squot and track/commit/push the packages you are interested in to some personal repo. Maybe fork github.com/squeak-smalltalk/squeak-app and push changes to there into some folder. From there you can integrate TravisCI, too. From within your working image, you could automatically trigger Squot to do that pushing from time to time. Maybe this helps. :-) Best, Marcel Am 05.11.2020 03:34:41 schrieb tim Rowledge : I'd rather like to monitor a number of packages and trigger a build cycle when something new has been spotted; sort of a CI server setup for internal use. There's bits of what look like partial solutions to this scattered around the image but I'm not spotting quite what I want so far. There's methods to query repositories about latest versions, but they seem to be not quite what I need. I could imagine using MCConfigurations somehow but it's still a bit vague. Has anyone already done something of this sort? I'm keen to avoid wasting time if this is a solved thing. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Never do card tricks for the group you play poker with. -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Nov 5 15:23:36 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 5 Nov 2020 15:23:36 0000 Subject: [squeak-dev] The Trunk: System-mt.1190.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1190.mcz ==================== Summary ==================== Name: System-mt.1190 Author: mt Time: 5 November 2020, 4:23:31.287798 pm UUID: 832d3d0e-dc06-a14f-ac49-d7dc709680ea Ancestors: System-mt.1189 Speeds up String >> #translated and locale switching as follows: - Only call #localeChanged(Gently) on classes that implement it, just like #cleanUp: - For the InternalTranslator, make translation-in-all-domains a no-op; 122�s -> 1.3�s - For the GetTextTranslator, make translation-in-all-domains fetch all available .mo files once, then directly enumerate that cache until a result is found; roughly 50�s -> 8�s - Avoid loading all .mo files on #localeChanged(Gently); only do that for translation-in-all-domains =============== Diff against System-mt.1189 =============== Item was added: + ----- Method: GetTextTranslator class>>addUserDefaultLocaleDir: (in category 'translation data layout') ----- + addUserDefaultLocaleDir: dir + "new dir will be put as first" + self userDefaultLocaleDirs addFirst: dir! Item was changed: ----- Method: GetTextTranslator class>>availableLanguageLocaleIDs (in category 'accessing') ----- availableLanguageLocaleIDs "GetTextTranslator availableLanguageLocaleIDs" | ids dirs localeDirForLang directoryNames | ids := Set new. dirs := Set new. + dirs addAll: self localeDirsForDomain. + dirs addAll: self userDefaultLocaleDirs. + dirs addAll: self systemDefaultLocaleDirs. - dirs addAll: LocaleDirsForDomain values. - dirs addAll: self defaultLocaleDirs. dirs do: [:dir | | localesDir | localesDir := FileDirectory on: dir. directoryNames := [localesDir directoryNames] on: InvalidDirectoryError do: [:e | #()]. directoryNames do: [:langDirName | | localeID | localeID := LocaleID posixName: langDirName. localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID). localeDirForLang ifNotNil: [ (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID]]. localeID hasParent ifTrue: [ localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID parent). localeDirForLang ifNotNil: [ (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID parent]]]. ]. ]. ^ids! Item was added: + ----- Method: GetTextTranslator class>>cleanUp: (in category 'class initialization') ----- + cleanUp: aggressive + + aggressive ifTrue: [ + UserDefaultLocaleDirs := OrderedCollection new. + LocaleDirsForDomain := Dictionary new].! Item was removed: - ----- Method: GetTextTranslator class>>defaultLocaleDirs (in category 'translation data layout') ----- - defaultLocaleDirs - | dirs | - dirs := OrderedCollection new. - UserDefaultLocaleDirs ifNotNil: [dirs addAll: UserDefaultLocaleDirs]. - dirs addAll: self systemDefaultLocaleDirs. - ^dirs - ! Item was added: + ----- Method: GetTextTranslator class>>findAllMOsForLocaleID: (in category 'private') ----- + findAllMOsForLocaleID: id + + | relativePath path allMONames result | + relativePath := String streamContents: [:stream | + stream + nextPutAll: FileDirectory slash; + nextPutAll: (self langDirNameForLocaleID: id); + nextPutAll: FileDirectory slash]. + allMONames := TextDomainManager allKnownDomains + collect: [:each | each -> (self moNameForDomain: each)]. + result := OrderedCollection new. + self localeDirsDo: [:localeDir | + allMONames do: [:moName | + path := String streamContents: [:s | + s nextPutAll: localeDir; nextPutAll: relativePath; nextPutAll: moName value]. + ([FileDirectory default fileExists: path] on: InvalidDirectoryError do: [false]) + ifTrue: [result add: moName key -> path] ]]. + ^ result! Item was changed: ----- Method: GetTextTranslator class>>findMOForLocaleID:domain: (in category 'private') ----- findMOForLocaleID: id domain: aDomainName + + | relativePath path | + relativePath := String streamContents: [:stream | + stream + nextPutAll: FileDirectory slash; + nextPutAll: (self langDirNameForLocaleID: id); + nextPutAll: FileDirectory slash; + nextPutAll: (self moNameForDomain: aDomainName)]. + self + localeDirsForDomain: aDomainName + do: [:localeDir | + path := localeDir, relativePath. + ([FileDirectory default fileExists: path] on: InvalidDirectoryError do: [false]) + ifTrue: [^ path]]. + ^ nil! - | sepa langSubDir path | - sepa := FileDirectory slash. - langSubDir := self langDirNameForLocaleID: id. - (self localeDirsForDomain: aDomainName) - do: [:each | - path := each , sepa , langSubDir, sepa , (self moNameForDomain: aDomainName). - [(FileDirectory default fileExists: path) - ifTrue: [^path]] on: InvalidDirectoryError do: [:e | ^nil]]. - ^nil.! Item was added: + ----- Method: GetTextTranslator class>>getLocaleDirForDomain: (in category 'translation data layout') ----- + getLocaleDirForDomain: aDomainName + "returns registered localeDirectory for the textdomain. returns nil if not registered" + ^LocaleDirsForDomain at: aDomainName ifAbsent: [nil]! Item was removed: - ----- Method: GetTextTranslator class>>localeDirForDomain: (in category 'translation data layout') ----- - localeDirForDomain: aDomainName - "returns registered localeDirectory for the textdomain. returns nil if not registered" - ^LocaleDirsForDomain at: aDomainName ifAbsent: [nil]! Item was added: + ----- Method: GetTextTranslator class>>localeDirsDo: (in category 'translation data layout') ----- + localeDirsDo: workBlock + "Enumerates all locale directories, regardless of a specific text domain. Begin with domain-specific directories, then user-specific directories, finally system-specific directories." + + self localeDirsForDomain do: workBlock. + self userDefaultLocaleDirs do: workBlock. + self systemDefaultLocaleDirs do: workBlock.! Item was changed: + ----- Method: GetTextTranslator class>>localeDirsForDomain (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>localeDirsForDomain (in category 'private') ----- localeDirsForDomain + + ^ LocaleDirsForDomain values! - ^LocaleDirsForDomain ifNil: [LocaleDirsForDomain := Dictionary new]! Item was removed: - ----- Method: GetTextTranslator class>>localeDirsForDomain: (in category 'translation data layout') ----- - localeDirsForDomain: aDomainName - "returns collection of locale directories for text domain. - This includes user defined one for the domain, user defaults and system defaults" - | dirs dir | - dirs := OrderedCollection new. - dir := self localeDirForDomain: aDomainName. - dir ifNotNil: [dirs add: dir]. - dirs addAll: self defaultLocaleDirs. - ^dirs! Item was added: + ----- Method: GetTextTranslator class>>localeDirsForDomain:do: (in category 'translation data layout') ----- + localeDirsForDomain: aDomainName do: workBlock + "Enumerates all locale directories for the text domain. Begin with domain-specific directories, then user-specific directories, finally system-specific directories." + + (self getLocaleDirForDomain: aDomainName) + ifNotNil: [:dir | workBlock value: dir]. + + self userDefaultLocaleDirs do: workBlock. + self systemDefaultLocaleDirs do: workBlock.! Item was changed: ----- Method: GetTextTranslator class>>privateStartUp (in category 'class initialization') ----- privateStartUp + self setSystemDefaultLocaleDirs. - self setupLocaleDirs. self availableLanguageLocaleIDs do: [ :localeID | NaturalLanguageTranslator translators at: localeID put: (self newForLocaleID: localeID). ]! Item was removed: - ----- Method: GetTextTranslator class>>setLocaleDir:forDoamin: (in category 'translation data layout') ----- - setLocaleDir: path forDoamin: aDomainName - self LocaleDirsForDomain - at: aDomainName - put: path.! Item was added: + ----- Method: GetTextTranslator class>>setLocaleDirForDomain:to: (in category 'translation data layout') ----- + setLocaleDirForDomain: aDomainName to: aPath + + LocaleDirsForDomain at: aDomainName put: aPath.! Item was added: + ----- Method: GetTextTranslator class>>setSystemDefaultLocaleDirs (in category 'translation data layout') ----- + setSystemDefaultLocaleDirs + + | dirs sepa localesDirName | + sepa := FileDirectory slash. + SystemDefaultLocaleDirs := nil. + dirs := self systemDefaultLocaleDirs. + localesDirName := 'locale'. + { Smalltalk imagePath. Smalltalk vmPath } do: [:path | + dirs addIfNotPresent: ((path endsWith: sepa) + ifTrue: [path, localesDirName] + ifFalse: [path, sepa, localesDirName])].! Item was removed: - ----- Method: GetTextTranslator class>>setupLocaleDirs (in category 'translation data layout') ----- - setupLocaleDirs - | dirs sepa localesDirName | - sepa := FileDirectory slash. - SystemDefaultLocaleDirs := nil. - dirs := self systemDefaultLocaleDirs. - localesDirName := 'locale'. - dirs add: (Smalltalk imagePath) , sepa , localesDirName. - dirs add: (Smalltalk vmPath) , sepa , localesDirName. - ^dirs! Item was changed: + ----- Method: GetTextTranslator class>>systemDefaultLocaleDirs (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>systemDefaultLocaleDirs (in category 'translation data layout') ----- systemDefaultLocaleDirs ^SystemDefaultLocaleDirs ifNil: [SystemDefaultLocaleDirs := OrderedCollection new] ! Item was changed: + ----- Method: GetTextTranslator class>>userDefaultLocaleDirs (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>userDefaultLocaleDirs (in category 'translation data layout') ----- userDefaultLocaleDirs ^UserDefaultLocaleDirs ifNil: [UserDefaultLocaleDirs := OrderedCollection new] ! Item was changed: ----- Method: GetTextTranslator>>initialize (in category 'initialize-release') ----- initialize + + super initialize. moFiles := Dictionary new.! Item was removed: - ----- Method: GetTextTranslator>>loadMOFiles (in category 'accessing') ----- - loadMOFiles - TextDomainManager allKnownDomains - do: [:domainName | - self moFileForDomain: domainName - ].! Item was added: + ----- Method: GetTextTranslator>>loadMOFilesForAllDomains (in category 'private') ----- + loadMOFilesForAllDomains + + moFiles := Dictionary new. + moFiles at: #* put: OrderedCollection new. + + (self class findAllMOsForLocaleID: self localeID) do: [:moName | + | moFile | + moFile := MOFile new load: moName value localeID: self localeID. + moFiles at: moName key put: moFile. + (moFiles at: #*) add: moFile]. + + ^ moFiles at: #*! Item was added: + ----- Method: GetTextTranslator>>localeChanged (in category 'language switching') ----- + localeChanged + "Reset cached .mo files. They will be loaded again as needed." + + moFiles := Dictionary new.! Item was removed: - ----- Method: GetTextTranslator>>reloadMOFiles (in category 'accessing') ----- - reloadMOFiles - moFiles := Dictionary new. - self loadMOFiles.! Item was removed: - ----- Method: GetTextTranslator>>setCurrent (in category 'language switching') ----- - setCurrent - "ensure actual contents of MOs is loaded on switching language" - self loadMOFiles! Item was added: + ----- Method: GetTextTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + + | translation | + (self moFiles at: #* ifAbsent: [self loadMOFilesForAllDomains]) + do: [:moFile | + translation := moFile translationFor: aString. + translation == aString ifFalse: [^ translation]]. + ^ aString "no translation found"! Item was added: + ----- Method: InternalTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + "Domains do not matter for the internal translator." + + ^ aString! Item was changed: ----- Method: Locale class>>localeChanged (in category 'notification') ----- localeChanged + + NaturalLanguageTranslator localeChanged. SystemNavigation default allBehaviorsDo: [:b | + (b ~~ self and: [b ~~ NaturalLanguageTranslator]) + ifTrue: [(b class includesSelector: #localeChanged) + ifTrue: [b localeChanged]]].! - b == self ifFalse: [b localeChanged]].! Item was changed: ----- Method: Locale class>>localeChangedGently (in category 'notification') ----- localeChangedGently + + NaturalLanguageTranslator localeChangedGently. + SystemNavigation default allBehaviorsDo: [:b | + (b ~~ self and: [b ~~ NaturalLanguageTranslator]) + ifTrue: [(b class includesSelector: #localeChangedGently) + ifTrue: [b localeChangedGently]]].! - SystemNavigation default allBehaviorsDo: [:b | b == self ifFalse: [b localeChangedGently]].! Item was changed: ----- Method: Locale class>>switchTo:gently: (in category 'accessing') ----- switchTo: locale gently: gentlyFlag "Locale switchTo: (Locale isoLanguage: 'de')" | availableID | availableID := (NaturalLanguageTranslator availableForLocaleID: locale localeID) localeID. Current localeID = availableID ifFalse: [Previous := Current. CurrentPlatform := Current := Locale localeID: availableID. - NaturalLanguageTranslator localeChanged. gentlyFlag ifTrue: [self localeChangedGently] ifFalse: [self localeChanged]]! Item was changed: ----- Method: NaturalLanguageTranslator class>>localeChanged (in category 'accessing') ----- localeChanged "notify some project starts to use this locale. this facility may use the event to load translation data dynamically" + self current localeChanged. - self current setCurrent ! Item was added: + ----- Method: NaturalLanguageTranslator>>localeChanged (in category 'language switching') ----- + localeChanged + "The system's current locale (ID) changed. Make sure to update all lookup caches if your translator needs external resources such as files."! Item was removed: - ----- Method: NaturalLanguageTranslator>>setCurrent (in category 'language switching') ----- - setCurrent - "notify locale of the translator become current" - ! Item was added: + ----- Method: NaturalLanguageTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + + | translation | + TextDomainManager allKnownDomains do: [:domain | + translation := self translate: aString inDomain: domain. + aString == translation ifFalse: [^ translation]]. + ^ aString! Item was changed: ----- Method: String>>translated (in category '*System-Localization') ----- translated + "Note that we cannot call #translatedTo: because the sender context encodes the domain name." + + ^ self - "answer the receiver translated to the default language" - | translation | - translation := self translatedTo: LocaleID current + inDomain: (TextDomainManager domainOfMethod: thisContext sender method)! - inDomain: (TextDomainManager domainOfMethod: thisContext sender method). - self == translation ifTrue: [^self translatedInAllDomains]. - ^translation! Item was removed: - ----- Method: String>>translatedInAllDomains (in category '*System-Localization') ----- - translatedInAllDomains - | translation | - "Transcript show: self printString, ' translatedInAllDomains'; cr." - TextDomainManager allKnownDomains do: [:domain | - translation := self translatedTo: LocaleID current inDomain: domain. - self = translation ifFalse: [^translation] - ]. - ^self! Item was removed: - ----- Method: String>>translatedInAnyDomain (in category '*System-Localization') ----- - translatedInAnyDomain - | translation | - Transcript show: self printString, ' translatedInAnyDomain'; cr. - TextDomainManager allKnownDomains do: [:domain | - translation := self translatedInDomain: domain. - self = translation ifFalse: [^translation]]. - ^self! Item was changed: ----- Method: String>>translatedInDomain: (in category '*System-Localization') ----- translatedInDomain: aDomainName + + ^ self + translatedTo: LocaleID current + inDomain: aDomainName! - | translation | - translation := self translatedTo: LocaleID current inDomain: aDomainName. - self == translation ifTrue: [^self translatedInAllDomains]. - ^translation - ! Item was removed: - ----- Method: String>>translatedInDomain:or: (in category '*System-Localization') ----- - translatedInDomain: aDomainName or: anotherDomainName - | translation | - translation := self translatedTo: LocaleID current inDomain: aDomainName. - self == translation ifTrue: [^self translatedInDomain: anotherDomainName]. - ^translation - ! Item was changed: ----- Method: String>>translatedTo: (in category '*System-Localization') ----- translatedTo: localeID "answer the receiver translated to the given locale id" + + ^ self + translatedTo: localeID + inDomain: (TextDomainManager domainOfMethod: thisContext sender method)! - ^ self translatedTo: localeID inDomain: (TextDomainManager domainOfMethod: thisContext sender method).! Item was changed: ----- Method: String>>translatedTo:inDomain: (in category '*System-Localization') ----- translatedTo: localeID inDomain: aDomainName + "Answer the receiver translated to the given locale id in the textdomain. If no translation can be found, try to lookup all domains for a translation." - "answer the receiver translated to the given locale id in the textdomain" + | translator translation | + translator := NaturalLanguageTranslator availableForLocaleID: localeID. + translation := translator translate: self inDomain: aDomainName. + translation == self ifTrue: [^ translator translateInAllDomains: self]. + ^ translation! - ^ NaturalLanguageTranslator translate: self - toLocaleID: localeID - inDomain: aDomainName! From commits at source.squeak.org Thu Nov 5 15:24:08 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 5 Nov 2020 15:24:08 0000 Subject: [squeak-dev] The Trunk: Protocols-mt.77.mcz Message-ID: Marcel Taeumel uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-mt.77.mcz ==================== Summary ==================== Name: Protocols-mt.77 Author: mt Time: 5 November 2020, 4:24:06.587798 pm UUID: 5ed88b5e-03e7-6049-a383-c5a5e619e822 Ancestors: Protocols-mt.76 Complements System-mt.1190 =============== Diff against Protocols-mt.76 =============== Item was changed: ----- Method: ObjectWithDocumentation>>wording (in category 'accessing') ----- wording "Answer the receiver's wording" | wording | (wording := self propertyAt: #wording ifAbsent: [nil]) + ifNotNil: [^wording translatedInDomain: 'Etoys']. - ifNotNil: [^wording translatedInDomain: 'Etoys-Tiles' or: 'Etoys']. self initWordingAndDocumentation. ^self propertyAt: #wording ifAbsent: ['']! From marcel.taeumel at hpi.de Thu Nov 5 15:24:51 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 5 Nov 2020 16:24:51 +0100 Subject: [squeak-dev] The Trunk: System-mt.1190.mcz In-Reply-To: References: Message-ID: Hi all! Here are more detailed benchmarks: Image: 6.0alpha (Update 20067) VM: 202007252116 (32-bit, Windows 10) Translations: 27 .mo files (aka. text domains) -> GetTextTranslator "1) Time to switch locale. Only workspace and docking bar." Locale switchAndInstallFontToID: (LocaleID isoLanguage: 'en'). [Locale switchAndInstallFontToID: (LocaleID isoLanguage: 'de')] timeToRunWithoutGC. "BEFORE: 1577 ms" "AFTER: 1327 ms" "2) Bench fastest lookup path" ['world' translatedInDomain: #Morphic] bench. "BEFORE: '405,000 per second. 2.47 microseconds per run. 4.64 % GC time.'" "AFTER:  '433,000 per second. 2.31 microseconds per run. 6.07878 % GC time.'"" "3) Bench try-any-domain fallback." ['world' translated] bench. "BEFORE: '20,300 per second. 49.2 microseconds per run. 11.33773 % GC time.'" "AFTER:  '133,000 per second. 7.53 microseconds per run. 8.09838 % GC time.'" "4) No translation found." ['Hello, World!' translated] bench. "BEFORE: '16,200 per second. 61.9 microseconds per run. 13.9772 % GC time.'" "AFTER: '98,600 per second. 10.1 microseconds per run. 7.63847 % GC time.'" **** vvvv Translations: 0 .mo files --> InternalTranslator vvvv ['world' translatedInDomain: #Morphic] bench. "BEFORE: '8,180 per second. 122 microseconds per run. 2.87942 % GC time.'" "AFTER: '760,000 per second. 1.32 microseconds per run. 3.95921 % GC time.'" ['world' translated] bench. "BEFORE: '8,210 per second. 122 microseconds per run. 2.98 % GC time.'" "AFTER: '670,000 per second. 1.49 microseconds per run. 4.62 % GC time.'" ['Hello, World!' translated] bench. "BEFORE: '8,100 per second. 124 microseconds per run. 3.76 % GC time.'" "AFTER: '672,000 per second. 1.49 microseconds per run. 5.48 % GC time.'" Best, Marcel Am 05.11.2020 16:23:56 schrieb commits at source.squeak.org : Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1190.mcz ==================== Summary ==================== Name: System-mt.1190 Author: mt Time: 5 November 2020, 4:23:31.287798 pm UUID: 832d3d0e-dc06-a14f-ac49-d7dc709680ea Ancestors: System-mt.1189 Speeds up String >> #translated and locale switching as follows: - Only call #localeChanged(Gently) on classes that implement it, just like #cleanUp: - For the InternalTranslator, make translation-in-all-domains a no-op; 122µs -> 1.3µs - For the GetTextTranslator, make translation-in-all-domains fetch all available .mo files once, then directly enumerate that cache until a result is found; roughly 50µs -> 8µs - Avoid loading all .mo files on #localeChanged(Gently); only do that for translation-in-all-domains =============== Diff against System-mt.1189 =============== Item was added: + ----- Method: GetTextTranslator class>>addUserDefaultLocaleDir: (in category 'translation data layout') ----- + addUserDefaultLocaleDir: dir + "new dir will be put as first" + self userDefaultLocaleDirs addFirst: dir! Item was changed: ----- Method: GetTextTranslator class>>availableLanguageLocaleIDs (in category 'accessing') ----- availableLanguageLocaleIDs "GetTextTranslator availableLanguageLocaleIDs" | ids dirs localeDirForLang directoryNames | ids := Set new. dirs := Set new. + dirs addAll: self localeDirsForDomain. + dirs addAll: self userDefaultLocaleDirs. + dirs addAll: self systemDefaultLocaleDirs. - dirs addAll: LocaleDirsForDomain values. - dirs addAll: self defaultLocaleDirs. dirs do: [:dir | | localesDir | localesDir := FileDirectory on: dir. directoryNames := [localesDir directoryNames] on: InvalidDirectoryError do: [:e | #()]. directoryNames do: [:langDirName | | localeID | localeID := LocaleID posixName: langDirName. localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID). localeDirForLang ifNotNil: [ (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID]]. localeID hasParent ifTrue: [ localeDirForLang := localesDir directoryNamed: (self langDirNameForLocaleID: localeID parent). localeDirForLang ifNotNil: [ (localeDirForLang fileNamesMatching: '*.mo') ifNotEmpty: [ids add: localeID parent]]]. ]. ]. ^ids! Item was added: + ----- Method: GetTextTranslator class>>cleanUp: (in category 'class initialization') ----- + cleanUp: aggressive + + aggressive ifTrue: [ + UserDefaultLocaleDirs := OrderedCollection new. + LocaleDirsForDomain := Dictionary new].! Item was removed: - ----- Method: GetTextTranslator class>>defaultLocaleDirs (in category 'translation data layout') ----- - defaultLocaleDirs - | dirs | - dirs := OrderedCollection new. - UserDefaultLocaleDirs ifNotNil: [dirs addAll: UserDefaultLocaleDirs]. - dirs addAll: self systemDefaultLocaleDirs. - ^dirs - ! Item was added: + ----- Method: GetTextTranslator class>>findAllMOsForLocaleID: (in category 'private') ----- + findAllMOsForLocaleID: id + + | relativePath path allMONames result | + relativePath := String streamContents: [:stream | + stream + nextPutAll: FileDirectory slash; + nextPutAll: (self langDirNameForLocaleID: id); + nextPutAll: FileDirectory slash]. + allMONames := TextDomainManager allKnownDomains + collect: [:each | each -> (self moNameForDomain: each)]. + result := OrderedCollection new. + self localeDirsDo: [:localeDir | + allMONames do: [:moName | + path := String streamContents: [:s | + s nextPutAll: localeDir; nextPutAll: relativePath; nextPutAll: moName value]. + ([FileDirectory default fileExists: path] on: InvalidDirectoryError do: [false]) + ifTrue: [result add: moName key -> path] ]]. + ^ result! Item was changed: ----- Method: GetTextTranslator class>>findMOForLocaleID:domain: (in category 'private') ----- findMOForLocaleID: id domain: aDomainName + + | relativePath path | + relativePath := String streamContents: [:stream | + stream + nextPutAll: FileDirectory slash; + nextPutAll: (self langDirNameForLocaleID: id); + nextPutAll: FileDirectory slash; + nextPutAll: (self moNameForDomain: aDomainName)]. + self + localeDirsForDomain: aDomainName + do: [:localeDir | + path := localeDir, relativePath. + ([FileDirectory default fileExists: path] on: InvalidDirectoryError do: [false]) + ifTrue: [^ path]]. + ^ nil! - | sepa langSubDir path | - sepa := FileDirectory slash. - langSubDir := self langDirNameForLocaleID: id. - (self localeDirsForDomain: aDomainName) - do: [:each | - path := each , sepa , langSubDir, sepa , (self moNameForDomain: aDomainName). - [(FileDirectory default fileExists: path) - ifTrue: [^path]] on: InvalidDirectoryError do: [:e | ^nil]]. - ^nil.! Item was added: + ----- Method: GetTextTranslator class>>getLocaleDirForDomain: (in category 'translation data layout') ----- + getLocaleDirForDomain: aDomainName + "returns registered localeDirectory for the textdomain. returns nil if not registered" + ^LocaleDirsForDomain at: aDomainName ifAbsent: [nil]! Item was removed: - ----- Method: GetTextTranslator class>>localeDirForDomain: (in category 'translation data layout') ----- - localeDirForDomain: aDomainName - "returns registered localeDirectory for the textdomain. returns nil if not registered" - ^LocaleDirsForDomain at: aDomainName ifAbsent: [nil]! Item was added: + ----- Method: GetTextTranslator class>>localeDirsDo: (in category 'translation data layout') ----- + localeDirsDo: workBlock + "Enumerates all locale directories, regardless of a specific text domain. Begin with domain-specific directories, then user-specific directories, finally system-specific directories." + + self localeDirsForDomain do: workBlock. + self userDefaultLocaleDirs do: workBlock. + self systemDefaultLocaleDirs do: workBlock.! Item was changed: + ----- Method: GetTextTranslator class>>localeDirsForDomain (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>localeDirsForDomain (in category 'private') ----- localeDirsForDomain + + ^ LocaleDirsForDomain values! - ^LocaleDirsForDomain ifNil: [LocaleDirsForDomain := Dictionary new]! Item was removed: - ----- Method: GetTextTranslator class>>localeDirsForDomain: (in category 'translation data layout') ----- - localeDirsForDomain: aDomainName - "returns collection of locale directories for text domain. - This includes user defined one for the domain, user defaults and system defaults" - | dirs dir | - dirs := OrderedCollection new. - dir := self localeDirForDomain: aDomainName. - dir ifNotNil: [dirs add: dir]. - dirs addAll: self defaultLocaleDirs. - ^dirs! Item was added: + ----- Method: GetTextTranslator class>>localeDirsForDomain:do: (in category 'translation data layout') ----- + localeDirsForDomain: aDomainName do: workBlock + "Enumerates all locale directories for the text domain. Begin with domain-specific directories, then user-specific directories, finally system-specific directories." + + (self getLocaleDirForDomain: aDomainName) + ifNotNil: [:dir | workBlock value: dir]. + + self userDefaultLocaleDirs do: workBlock. + self systemDefaultLocaleDirs do: workBlock.! Item was changed: ----- Method: GetTextTranslator class>>privateStartUp (in category 'class initialization') ----- privateStartUp + self setSystemDefaultLocaleDirs. - self setupLocaleDirs. self availableLanguageLocaleIDs do: [ :localeID | NaturalLanguageTranslator translators at: localeID put: (self newForLocaleID: localeID). ]! Item was removed: - ----- Method: GetTextTranslator class>>setLocaleDir:forDoamin: (in category 'translation data layout') ----- - setLocaleDir: path forDoamin: aDomainName - self LocaleDirsForDomain - at: aDomainName - put: path.! Item was added: + ----- Method: GetTextTranslator class>>setLocaleDirForDomain:to: (in category 'translation data layout') ----- + setLocaleDirForDomain: aDomainName to: aPath + + LocaleDirsForDomain at: aDomainName put: aPath.! Item was added: + ----- Method: GetTextTranslator class>>setSystemDefaultLocaleDirs (in category 'translation data layout') ----- + setSystemDefaultLocaleDirs + + | dirs sepa localesDirName | + sepa := FileDirectory slash. + SystemDefaultLocaleDirs := nil. + dirs := self systemDefaultLocaleDirs. + localesDirName := 'locale'. + { Smalltalk imagePath. Smalltalk vmPath } do: [:path | + dirs addIfNotPresent: ((path endsWith: sepa) + ifTrue: [path, localesDirName] + ifFalse: [path, sepa, localesDirName])].! Item was removed: - ----- Method: GetTextTranslator class>>setupLocaleDirs (in category 'translation data layout') ----- - setupLocaleDirs - | dirs sepa localesDirName | - sepa := FileDirectory slash. - SystemDefaultLocaleDirs := nil. - dirs := self systemDefaultLocaleDirs. - localesDirName := 'locale'. - dirs add: (Smalltalk imagePath) , sepa , localesDirName. - dirs add: (Smalltalk vmPath) , sepa , localesDirName. - ^dirs! Item was changed: + ----- Method: GetTextTranslator class>>systemDefaultLocaleDirs (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>systemDefaultLocaleDirs (in category 'translation data layout') ----- systemDefaultLocaleDirs ^SystemDefaultLocaleDirs ifNil: [SystemDefaultLocaleDirs := OrderedCollection new] ! Item was changed: + ----- Method: GetTextTranslator class>>userDefaultLocaleDirs (in category 'accessing') ----- - ----- Method: GetTextTranslator class>>userDefaultLocaleDirs (in category 'translation data layout') ----- userDefaultLocaleDirs ^UserDefaultLocaleDirs ifNil: [UserDefaultLocaleDirs := OrderedCollection new] ! Item was changed: ----- Method: GetTextTranslator>>initialize (in category 'initialize-release') ----- initialize + + super initialize. moFiles := Dictionary new.! Item was removed: - ----- Method: GetTextTranslator>>loadMOFiles (in category 'accessing') ----- - loadMOFiles - TextDomainManager allKnownDomains - do: [:domainName | - self moFileForDomain: domainName - ].! Item was added: + ----- Method: GetTextTranslator>>loadMOFilesForAllDomains (in category 'private') ----- + loadMOFilesForAllDomains + + moFiles := Dictionary new. + moFiles at: #* put: OrderedCollection new. + + (self class findAllMOsForLocaleID: self localeID) do: [:moName | + | moFile | + moFile := MOFile new load: moName value localeID: self localeID. + moFiles at: moName key put: moFile. + (moFiles at: #*) add: moFile]. + + ^ moFiles at: #*! Item was added: + ----- Method: GetTextTranslator>>localeChanged (in category 'language switching') ----- + localeChanged + "Reset cached .mo files. They will be loaded again as needed." + + moFiles := Dictionary new.! Item was removed: - ----- Method: GetTextTranslator>>reloadMOFiles (in category 'accessing') ----- - reloadMOFiles - moFiles := Dictionary new. - self loadMOFiles.! Item was removed: - ----- Method: GetTextTranslator>>setCurrent (in category 'language switching') ----- - setCurrent - "ensure actual contents of MOs is loaded on switching language" - self loadMOFiles! Item was added: + ----- Method: GetTextTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + + | translation | + (self moFiles at: #* ifAbsent: [self loadMOFilesForAllDomains]) + do: [:moFile | + translation := moFile translationFor: aString. + translation == aString ifFalse: [^ translation]]. + ^ aString "no translation found"! Item was added: + ----- Method: InternalTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + "Domains do not matter for the internal translator." + + ^ aString! Item was changed: ----- Method: Locale class>>localeChanged (in category 'notification') ----- localeChanged + + NaturalLanguageTranslator localeChanged. SystemNavigation default allBehaviorsDo: [:b | + (b ~~ self and: [b ~~ NaturalLanguageTranslator]) + ifTrue: [(b class includesSelector: #localeChanged) + ifTrue: [b localeChanged]]].! - b == self ifFalse: [b localeChanged]].! Item was changed: ----- Method: Locale class>>localeChangedGently (in category 'notification') ----- localeChangedGently + + NaturalLanguageTranslator localeChangedGently. + SystemNavigation default allBehaviorsDo: [:b | + (b ~~ self and: [b ~~ NaturalLanguageTranslator]) + ifTrue: [(b class includesSelector: #localeChangedGently) + ifTrue: [b localeChangedGently]]].! - SystemNavigation default allBehaviorsDo: [:b | b == self ifFalse: [b localeChangedGently]].! Item was changed: ----- Method: Locale class>>switchTo:gently: (in category 'accessing') ----- switchTo: locale gently: gentlyFlag "Locale switchTo: (Locale isoLanguage: 'de')" | availableID | availableID := (NaturalLanguageTranslator availableForLocaleID: locale localeID) localeID. Current localeID = availableID ifFalse: [Previous := Current. CurrentPlatform := Current := Locale localeID: availableID. - NaturalLanguageTranslator localeChanged. gentlyFlag ifTrue: [self localeChangedGently] ifFalse: [self localeChanged]]! Item was changed: ----- Method: NaturalLanguageTranslator class>>localeChanged (in category 'accessing') ----- localeChanged "notify some project starts to use this locale. this facility may use the event to load translation data dynamically" + self current localeChanged. - self current setCurrent ! Item was added: + ----- Method: NaturalLanguageTranslator>>localeChanged (in category 'language switching') ----- + localeChanged + "The system's current locale (ID) changed. Make sure to update all lookup caches if your translator needs external resources such as files."! Item was removed: - ----- Method: NaturalLanguageTranslator>>setCurrent (in category 'language switching') ----- - setCurrent - "notify locale of the translator become current" - ! Item was added: + ----- Method: NaturalLanguageTranslator>>translateInAllDomains: (in category 'translation') ----- + translateInAllDomains: aString + + | translation | + TextDomainManager allKnownDomains do: [:domain | + translation := self translate: aString inDomain: domain. + aString == translation ifFalse: [^ translation]]. + ^ aString! Item was changed: ----- Method: String>>translated (in category '*System-Localization') ----- translated + "Note that we cannot call #translatedTo: because the sender context encodes the domain name." + + ^ self - "answer the receiver translated to the default language" - | translation | - translation := self translatedTo: LocaleID current + inDomain: (TextDomainManager domainOfMethod: thisContext sender method)! - inDomain: (TextDomainManager domainOfMethod: thisContext sender method). - self == translation ifTrue: [^self translatedInAllDomains]. - ^translation! Item was removed: - ----- Method: String>>translatedInAllDomains (in category '*System-Localization') ----- - translatedInAllDomains - | translation | - "Transcript show: self printString, ' translatedInAllDomains'; cr." - TextDomainManager allKnownDomains do: [:domain | - translation := self translatedTo: LocaleID current inDomain: domain. - self = translation ifFalse: [^translation] - ]. - ^self! Item was removed: - ----- Method: String>>translatedInAnyDomain (in category '*System-Localization') ----- - translatedInAnyDomain - | translation | - Transcript show: self printString, ' translatedInAnyDomain'; cr. - TextDomainManager allKnownDomains do: [:domain | - translation := self translatedInDomain: domain. - self = translation ifFalse: [^translation]]. - ^self! Item was changed: ----- Method: String>>translatedInDomain: (in category '*System-Localization') ----- translatedInDomain: aDomainName + + ^ self + translatedTo: LocaleID current + inDomain: aDomainName! - | translation | - translation := self translatedTo: LocaleID current inDomain: aDomainName. - self == translation ifTrue: [^self translatedInAllDomains]. - ^translation - ! Item was removed: - ----- Method: String>>translatedInDomain:or: (in category '*System-Localization') ----- - translatedInDomain: aDomainName or: anotherDomainName - | translation | - translation := self translatedTo: LocaleID current inDomain: aDomainName. - self == translation ifTrue: [^self translatedInDomain: anotherDomainName]. - ^translation - ! Item was changed: ----- Method: String>>translatedTo: (in category '*System-Localization') ----- translatedTo: localeID "answer the receiver translated to the given locale id" + + ^ self + translatedTo: localeID + inDomain: (TextDomainManager domainOfMethod: thisContext sender method)! - ^ self translatedTo: localeID inDomain: (TextDomainManager domainOfMethod: thisContext sender method).! Item was changed: ----- Method: String>>translatedTo:inDomain: (in category '*System-Localization') ----- translatedTo: localeID inDomain: aDomainName + "Answer the receiver translated to the given locale id in the textdomain. If no translation can be found, try to lookup all domains for a translation." - "answer the receiver translated to the given locale id in the textdomain" + | translator translation | + translator := NaturalLanguageTranslator availableForLocaleID: localeID. + translation := translator translate: self inDomain: aDomainName. + translation == self ifTrue: [^ translator translateInAllDomains: self]. + ^ translation! - ^ NaturalLanguageTranslator translate: self - toLocaleID: localeID - inDomain: aDomainName! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Thu Nov 5 15:27:49 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 5 Nov 2020 16:27:49 +0100 Subject: [squeak-dev] translated considered harmful (in its current implementation) In-Reply-To: References: <5EBF4F78-6BFD-4812-BB70-437A6987F1BD@rowledge.org> Message-ID: Hi all! Should be better now. Update to 20069.  See: http://forum.world.st/The-Trunk-System-mt-1190-mcz-td5124442.html [http://forum.world.st/The-Trunk-System-mt-1190-mcz-td5124442.html]  Best, Marcel Am 04.11.2020 09:08:51 schrieb Marcel Taeumel : Hi Eliot. > Further, it can't be that hard, can it? Is our real problem that we don't have a specification against which we can optimize? I gave two simple solutions for #translateInAllDomains further up in this discussion. It's doable. Best, Marcel Am 03.11.2020 20:34:53 schrieb Eliot Miranda : On Tue, Nov 3, 2020 at 12:29 AM Marcel Taeumel wrote: Or just recompile #translated to do nothing in your systems. :-) This suggestion fills me with dread.  Localization seems to me to be an increasingly important facility for a development environment.  And if we support it so badly that the only way to make it acceptable is to turn it off we have failed.  Further, it can't be that hard, can it?  Is our real problem that we don't have a specification against which we can optimize? Best, Marcel Am 02.11.2020 20:00:18 schrieb tim Rowledge : > On 2020-11-02, at 8:17 AM, Marcel Taeumel wrote: > > Hi Tim. > > > Dare I ask why it tries to set a property on a method? > > A cache because package-name lookup for methods is expensive: OK; I'm not brave enough to want to know why that is required. I think I'll just put a preference in for my systems and avoid the entire problem! tim -- tim Rowledge; tim at rowledge.org [mailto:tim at rowledge.org]; http://www.rowledge.org/tim [http://www.rowledge.org/tim] Strange OpCodes: IO: Illogical Or -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Nov 5 15:34:37 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 5 Nov 2020 15:34:37 0000 Subject: [squeak-dev] The Trunk: System-mt.1191.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1191.mcz ==================== Summary ==================== Name: System-mt.1191 Author: mt Time: 5 November 2020, 4:34:33.039798 pm UUID: 0d08f4e4-d4fb-db49-ad96-1f37768ba637 Ancestors: System-mt.1190 Adds KR as "Korakurider" to the list of contributors. =============== Diff against System-mt.1190 =============== Item was changed: ----- Method: SystemNavigation class>>privateAuthorsRaw (in category 'class initialization') ----- (excessive size, no diff calculated) Item was changed: + (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors...'! - (PackageInfo named: 'System') postscript: 'SystemNavigation initializeAuthors..'! From tim at rowledge.org Thu Nov 5 17:56:06 2020 From: tim at rowledge.org (tim Rowledge) Date: Thu, 5 Nov 2020 09:56:06 -0800 Subject: [squeak-dev] automated checking for new versions of a package in order to trigger a build cycle In-Reply-To: References: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> Message-ID: Hi, > On 2020-11-04, at 11:54 PM, Marcel Taeumel wrote: > > We do a cron job for squeak-app to create the updated bundles for files.squeak.org. Daily for Trunk, monthly for releases. In-image changes are not propagated to GitHub or TravisCI. > > You could avoid a cron setup by -- after any change in your selected packages -- writing stuff to some related repository which can then be tracked through GitHub/TravisCI. Well that all seems rather heavyweight; a sizable external component etc. I'm hoping to avoid that if at all possible. Right now the code does a braindead simple build-everything, wait X minutes, loop. There are two problems (at least) with that - it does a build whether or not any code has changed, wasting cpu etc - if the build happens to start at a time when someone is in the middle of saving several packages you have the potential for 'fun' clashes. But I'd also like to have it work so that as soon as possible after saving a package there is a fresh build, an obvious clash with the second point above. This is what made me think that some use of MCConfiguration might be good. I save some packages, press a Magic Button(™) to update the configuration in the repository, the build machine does its regular (every 10 minutes or so?) check on the configuration, detects that it has changed, and thus spawns a build. So I see three uses of the config a) developer updates it when a chunk of work affecting one or more packages is published b) build machine simply checks it intermittently and needs only to find out if it changed in any manner. Simply comparing a recorded versions number against the latest? c) the image being built loads the latest config Make any sense? tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: PFM: Pray For Miracle From tonyg at leastfixedpoint.com Thu Nov 5 18:31:44 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Thu, 5 Nov 2020 19:31:44 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' Message-ID: Hi all, Currently:     (FSPath / 'foo.bar.zot') extension = 'bar.zot' Should it be? I expected it to equal 'zot'. For reference, in python3:     os.path.splitext('foo.bar.zot') == ('foo.bar', '.zot') and in racket     (equal? (path-get-extension "foo.bar.zot") #".zot") Tony From Christoph.Thiede at student.hpi.uni-potsdam.de Thu Nov 5 18:41:14 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Thu, 5 Nov 2020 18:41:14 +0000 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: References: Message-ID: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:. On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says: "Note that the extension of a complex extension starts from the first period up until the end" So why is Squeak-FileSystem neglecting the common standards in this case? Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Tony Garnock-Jones Gesendet: Donnerstag, 5. November 2020 19:31:44 An: The general-purpose Squeak developers list Betreff: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' Hi all, Currently: (FSPath / 'foo.bar.zot') extension = 'bar.zot' Should it be? I expected it to equal 'zot'. For reference, in python3: os.path.splitext('foo.bar.zot') == ('foo.bar', '.zot') and in racket (equal? (path-get-extension "foo.bar.zot") #".zot") Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Thu Nov 5 18:43:02 2020 From: tim at rowledge.org (tim Rowledge) Date: Thu, 5 Nov 2020 10:43:02 -0800 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: References: Message-ID: <46EDCF34-6A81-4132-A4E1-617CB9EE70E2@rowledge.org> > On 2020-11-05, at 10:31 AM, Tony Garnock-Jones wrote: > > Hi all, > > > Currently: > > (FSPath / 'foo.bar.zot') extension = 'bar.zot' > > Should it be? I expected it to equal 'zot'. For the 'normal' FileDirectory stuff in the image, the extension would work ok here. I'm not familiar with FSPath - that's the package Colin Putney wrote a while back? tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim I came, I saw, I deleted all your files. From tonyg at leastfixedpoint.com Thu Nov 5 18:46:36 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Thu, 5 Nov 2020 19:46:36 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> Message-ID: <320ca208-73ff-002e-f0e8-02247f731810@leastfixedpoint.com> On 11/5/20 7:41 PM, Thiede, Christoph wrote: > Good catch! That's clearly a bug IMO. #extension should use > #copyAfterLast: rather than #copyAfter:. > > On the other, FSReferenceTest >> #testBaseAndExtension explicitly > defines a test where it says: > > "Note that the extension of a complex extension starts from the first > period up until the end" > Worse, it's inconsistent with #withExtension: - ((FSPath / 'foo.bar.zot') withExtension: 'zaz') = (FSPath / 'foo.bar.zaz') !!! On 11/5/20 7:43 PM, tim Rowledge wrote: > For the 'normal' FileDirectory stuff in the image, the extension would > work ok here. I'm not familiar with FSPath - that's the package Colin > Putney wrote a while back? This is part of package FS-Core that the Squeak config wizard loads as part of the Git support. Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Fri Nov 6 01:31:51 2020 From: tim at rowledge.org (tim Rowledge) Date: Thu, 5 Nov 2020 17:31:51 -0800 Subject: [squeak-dev] automated checking for new versions of a package in order to trigger a build cycle In-Reply-To: References: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> Message-ID: Well it looks like one can do this without too much pain; always nice. Once you have a config map saved in the repository it is possible to find the version number with sometihng like | myRepo | myRepo := MCHttpRepository location:'http://squeaksource.sageteasoftware.com:8089/SqueakPort' user: 'freddy' password: 'kreuger'. ^(myRepo highestNumberedVersionNameForPackageNamed: configNameString) versionNumber Keep track of the highest known value and compare to decide on whether to build. This way you get a build if the map is updated, which actually solves the potential problem of several packages needing to be saved in a group. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Oxymorons: Advanced BASIC From lewis at mail.msen.com Fri Nov 6 02:14:14 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 5 Nov 2020 21:14:14 -0500 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> Message-ID: <20201106021414.GA67688@shell.msen.com> On Thu, Nov 05, 2020 at 06:41:14PM +0000, Thiede, Christoph wrote: > Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:. > > On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says: > > "Note that the extension of a complex extension starts from the first period up until the end" > The underlying problem appears to be that someone neglected to write a test for #extension. The testBaseAndExtension test appears to be a later addition, and it may be that the test simply documents an existing bug, so the test itself may be wrong. I am attaching a proposed test based on Tony's example. Dave -------------- next part -------------- 'From Squeak6.0alpha of 23 October 2020 [latest update: #20021] on 5 November 2020 at 8:57:43 pm'!!FSPathTest methodsFor: 'tests' stamp: 'dtl 11/5/2020 20:55'!testExtension | path | path := FSPath / 'foo.bar.zot'. self assert: 'zot' equals: path extension.! ! From lewis at mail.msen.com Fri Nov 6 02:26:00 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 5 Nov 2020 21:26:00 -0500 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <46EDCF34-6A81-4132-A4E1-617CB9EE70E2@rowledge.org> References: <46EDCF34-6A81-4132-A4E1-617CB9EE70E2@rowledge.org> Message-ID: <20201106022600.GB67688@shell.msen.com> On Thu, Nov 05, 2020 at 10:43:02AM -0800, tim Rowledge wrote: > > > > On 2020-11-05, at 10:31 AM, Tony Garnock-Jones wrote: > > > > Hi all, > > > > > > Currently: > > > > (FSPath / 'foo.bar.zot') extension = 'bar.zot' > > > > Should it be? I expected it to equal 'zot'. > > For the 'normal' FileDirectory stuff in the image, the extension would work ok here. I'm not familiar with FSPath - that's the package Colin Putney wrote a while back? > Yes (although the version history seems to show other authors). It gets pulled in along with the git tools. It is on GitHub at https://github.com/squeak-smalltalk/squeak-filesystem which is based on the earlier work at http://www.squeaksource.com/fs Dave From lewis at mail.msen.com Fri Nov 6 02:46:43 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 5 Nov 2020 21:46:43 -0500 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: References: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> Message-ID: <20201106024643.GA72196@shell.msen.com> Hi Fabio, CC Squeak oversight board who I expect will support this enthusiastically. If you could put the BabyIDE-2019.07.23.zip file from Trygve's site on http://files.squeak.org site, that would be great. I would suggest saving it as: http://files.squeak.org/various_images/BabyIDE/BabyIDE-2019.07.23.zip Also, the zip file contains a README.txt so it might be a good idea to save that README.txt file in the same folder with the zip. I don't know that Trygve is a git user, but I'll try to help with a pull request to tie this into our squeak.org site. Thanks very much for your help, Dave On Wed, Nov 04, 2020 at 11:18:08PM +0100, Fabio Niephaus wrote: > On Wed, 4 Nov 2020 at 9:28 pm, Trygve Reenskaug wrote: > > > Hi, > > I downloaded it to Mendeley because this should be a safe haven for data. > > It was accepted, given a DOI and published. Somebody low down in the > > Mendeley hierarchy has decided it is not a valid data set after all. They > > have broken my agreement with them and removed it without informing me. > > This is now an ongoing discussion. > > > > Here's is a version of the BabyIDE zip: > > > > http://heim.ifi.uio.no/trygver/assets/BabyIDE-2019.07.23.zip > > > > It may not be identical to the published version, but should be very close. > > I have also finished a user guide for the image, I'll probably just make > > it an attachment to a squeak-Dev message. > > > > *How do I make files available on the Squeak web site?* > > > > Hi Trygve, > > Our website is on GitHub [1] and we accept pull requests. I'm part of the > Squeak web team and am happy to assist or upload files to our file server. > > Fabio > > > [1] > https://github.com/squeak-smalltalk/squeak.org > > > > > > Trygve > > > > > > On 2020-11-04 16:41, H. Hirzel wrote: > > > > Hello > > > > I was looking for the latest version of the > > > > Loke/BabyIDE image > > > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > > > > The image is my program repository. It includes some examples of DCI > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > Engineering > > (SRE), and more.) > > > > It is no longer available at this mendeley url as it is not a dataset > > but a program. > > Could somebody who has downloaded it please make it available on the > > squeak web site? > > > > Thank you > > Regards > > Hannes > > > > > > > > > > On 10/4/20, David T. Lewis wrote: > > > > Thank you Trygve, > > > > I confirm also that the image runs very well on my Ubuntu Linux laptop > > with a VM compiled per http://wiki.squeak.org/squeak/6354. > > > > Dave > > > > On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: > > > > Dear Trygve, > > > > I confirmed that I could launch the Loke/BabyIDE image with the included > > SqueakVM for Windows (8.1 and 10) > > and I could also launch it in a web browser by using the SqueakJS VM (https://squeak.js.org/run ). > > > > Thank you very much. > > > > -- > > sumim > > > > 2020-10-03 15:48 Trygve Reenskaug : > > > > > > Dear Sumim, > > Thank you for your kind words. > > > > The latest version of Loke/BabyIDE written on Squeak3.10.2 is athttps://data.mendeley.com/datasets/5xxgzv7fsp/1 > > The image is my program repository. It includes some examples of DCI > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > Engineering > > (SRE), and more. > > > > Best > > --Trygve > > > > On 2020-10-02 20:14, masato sumi wrote: > > > > Dear Trygve, > > > > Thank you for your very long term contribution and efforts. > > > > I'm very sorry that I couldn't help you at all now. > > > > I'm afraid, but could you please make your latest version of > > Loke/BabyIDE > > written on Squeak3.10.2 available for future generations of researchers > > and/or followers? > > > > Anyway, I think your ideas and thoughts should be passed on to future > > generations as faithfully as we can possible, and I myself will try to > > make > > sure that. > > > > Thank you so much and goodbye. > > Please take care of yourself. > > > > -- > > sumim > > > > 2020-10-03 0:54 Trygve Reenskaug : > > > > > > Dear all, > > I need to use many words to explore why I can't understand current > > Squeak > > code. I believe the reason is a profound one, and I hope some of you > > have > > the patience to read about it. > > > > Thank you for your responses to my 'A Sad Day'-message. One response > > said > > "*But please don't give up as an inventor of MVC, which has simplified > > writing software for all of us.* > > > > > > *We need new ideas to stabilize Smalltalk." *As to MVC, it was received > > with acclamation when I first presented it at PARC in 1978, and people > > suggested I should make it the theme of my article in the special > > Smalltalk > > issue of Byte. I couldn't understand it; MVC was so simple and obvious > > that > > is was not worth writing about it. Nevertheless, people seem to have > > problems understanding MVC. It took me a long time before I gleaned > > what > > was going on. The explanation is a deep one, rooted in our different > > mental > > paradigms. > > > > From around 1970, I was working on Prokon, a distributed system for > > managers in the shipbuilding industry: > > > > Every manager has their own computer that they use for augmenting > > their > > mind. The manager understands their software and ideally writes it > > themselves. Managers delegate conversations with other managers to > > their > > computer's M-to-M network. (Marked with a heavy black line in the > > figure). > > I chose "distributed planning with central control" as my example > > project. > > Each manager creates a plan for their department, using apps suited to > > their particular needs. A **distributed algorithm** ensures consistency > > across departments. > > > > I came to PARC in 1978 and could immediately relate to the Smalltalk > > image with its universe of collaborating objects. Alan's definition of > > object-orientation fitted my Prokon model: "Thus its semantics are a > > bit > > like having thousands and thousands of computers all hooked together by > > a > > very fast network." > > > > MVC prescribes a network of communicating objects. Any object can fill > > one or more positions in the network as long as it has the required > > behavior; their classes are irrelevant. It's so simple that it's not > > worth > > writing about it. > > > > > > ==================== > > > > The work on this post was interrupted at this point by an unexpected > > week > > in hospital. It gave me quiet days of pondering the futility of what I > > am > > doing and I will be terminating my memberships in the Pharo and Squeak > > mailing lists. I have also deleted most of the old draft of this > > message > > and will quickly conclude with two observations: > > > > > > 1. > > The Smalltalk image is a universe of communicating objects. I call > > it > > an object computer. It can be seen as the model of an entirely new > > kind of > > computer, a model on a level closer to the human mind than the von > > Neumann > > model of 1948. The new model is communication-centric and should > > supersede > > the ubiquitous CPU-centric model as soon as possible. Working out > > the > > details of this idea could make an exciting and disruptive Ph.D. > > thesis. > > 2. > > Smalltalk is called a programming language. It is a curious one, > > very > > different from well-known languages like Java with their syntax and > > semantics. Smalltalk, as a programming language, does not have the > > concept > > of a program. Smalltalk, as a class-oriented language, does not have > > syntax > > for the declaration of a class. Smalltalk, as an object-oriented > > language, > > can't describe how objects collaborate to achieve a goal. You appear > > to be > > happy with this state of affairs, at least, I see no sign of anybody > > wanting to move on from the unfinished Smalltalk language to a > > mature > > development environment. I do not find it satisfactory and it is not > > acceptable to the intended managers populating the distributed > > system shown > > in the first picture. Consequently, I have done something about it > > as > > described in my SoSym article "*Personal Programming and the Object > > Computer.*" I am tired of being alone in my endeavors and this ends > > my work with Squeak and other Smalltalks. I wish you health and > > happiness > > wherever you happen to be. > > > > Trygve > > Personal programming and the object computerhttps://doi.org/10.1007/s10270-019-00768-3 > > > > -- > > > > *The essence of object orientation is that objects collaborate to > > achieve a goal. * > > Trygve Reenskaug mailto: trygver at ifi.uio.no<%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > N-0378 Oslo http://fullOO.info > > Norway Tel: (+47) 468 58 625 > > > > > > > > -- > > > > *The essence of object orientation is that objects collaborate to > > achieve > > a goal. * > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > N-0378 Oslo http://fullOO.info > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > > > -- > > > > *The essence of object orientation is that objects collaborate to achieve > > a goal. * > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> > > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > > N-0378 Oslo http://fullOO.info > > > > > > Norway Tel: (+47) 468 58 625 > > > > > From marcel.taeumel at hpi.de Fri Nov 6 07:41:05 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Fri, 6 Nov 2020 08:41:05 +0100 Subject: [squeak-dev] automated checking for new versions of a package in order to trigger a build cycle In-Reply-To: References: <21D58FBD-9803-4550-8E84-73B95C803E00@rowledge.org> Message-ID: Hi Tim. > a) developer updates it [the update map/config] when a chunk of work affecting one or more packages is published We do this already for bigger changes in Squeak Trunk to add checkpoints for the update process. > c) the image being built loads the latest config Squeak also loads the "bleeding edge" after loading the latest configs in order. Having more checkpoints, this might not be necessary. Maybe "bleeding edge" could be optional even in Trunk. Not sure whether is can be practical at all ... Best, Marcel Am 06.11.2020 02:32:04 schrieb tim Rowledge : Well it looks like one can do this without too much pain; always nice. Once you have a config map saved in the repository it is possible to find the version number with sometihng like | myRepo | myRepo := MCHttpRepository location:'http://squeaksource.sageteasoftware.com:8089/SqueakPort' user: 'freddy' password: 'kreuger'. ^(myRepo highestNumberedVersionNameForPackageNamed: configNameString) versionNumber Keep track of the highest known value and compare to decide on whether to build. This way you get a build if the map is updated, which actually solves the potential problem of several packages needing to be saved in a group. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Oxymorons: Advanced BASIC -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Fri Nov 6 11:31:03 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Fri, 6 Nov 2020 12:31:03 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> Message-ID: Am Do., 5. Nov. 2020 um 19:41 Uhr schrieb Thiede, Christoph : > > Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:. > Pharo has it like this as well, so it is also an unnecessary incompatibility: extension "Return the extension of path basename i.e., /foo/gloops.taz extension is 'taz'" ^ self basename copyAfterLast: self extensionDelimiter > > On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says: > > "Note that the extension of a complex extension starts from the first period up until the end" > The original author might either have just documented that status quo, or thought of something like .tar.gz. Again Pharo has changed this to "Note that the extension of a complex extension starts after the last extension delimiter". From lists at fniephaus.com Fri Nov 6 14:51:54 2020 From: lists at fniephaus.com (Fabio Niephaus) Date: Fri, 6 Nov 2020 15:51:54 +0100 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: <20201106024643.GA72196@shell.msen.com> References: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> <20201106024643.GA72196@shell.msen.com> Message-ID: Hi Dave, On Fri, Nov 6, 2020 at 3:46 AM David T. Lewis wrote: > > Hi Fabio, > > CC Squeak oversight board who I expect will support this enthusiastically. > > If you could put the BabyIDE-2019.07.23.zip file from Trygve's site on > http://files.squeak.org site, that would be great. > > I would suggest saving it as: > > http://files.squeak.org/various_images/BabyIDE/BabyIDE-2019.07.23.zip > > Also, the zip file contains a README.txt so it might be a good idea to > save that README.txt file in the same folder with the zip. Done! I've also added BabyIDE to the project list on squeak.org: https://squeak.org/projects/ Fabio > > I don't know that Trygve is a git user, but I'll try to help with a pull > request to tie this into our squeak.org site. > > Thanks very much for your help, > > Dave > > > > On Wed, Nov 04, 2020 at 11:18:08PM +0100, Fabio Niephaus wrote: > > On Wed, 4 Nov 2020 at 9:28 pm, Trygve Reenskaug wrote: > > > > > Hi, > > > I downloaded it to Mendeley because this should be a safe haven for data. > > > It was accepted, given a DOI and published. Somebody low down in the > > > Mendeley hierarchy has decided it is not a valid data set after all. They > > > have broken my agreement with them and removed it without informing me. > > > This is now an ongoing discussion. > > > > > > Here's is a version of the BabyIDE zip: > > > > > > http://heim.ifi.uio.no/trygver/assets/BabyIDE-2019.07.23.zip > > > > > > It may not be identical to the published version, but should be very close. > > > I have also finished a user guide for the image, I'll probably just make > > > it an attachment to a squeak-Dev message. > > > > > > *How do I make files available on the Squeak web site?* > > > > > > > Hi Trygve, > > > > Our website is on GitHub [1] and we accept pull requests. I'm part of the > > Squeak web team and am happy to assist or upload files to our file server. > > > > Fabio > > > > > > [1] > > https://github.com/squeak-smalltalk/squeak.org > > > > > > > > > > Trygve > > > > > > > > > On 2020-11-04 16:41, H. Hirzel wrote: > > > > > > Hello > > > > > > I was looking for the latest version of the > > > > > > Loke/BabyIDE image > > > > > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > > > > > > The image is my program repository. It includes some examples of DCI > > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > > Engineering > > > (SRE), and more.) > > > > > > It is no longer available at this mendeley url as it is not a dataset > > > but a program. > > > Could somebody who has downloaded it please make it available on the > > > squeak web site? > > > > > > Thank you > > > Regards > > > Hannes > > > > > > > > > > > > > > > On 10/4/20, David T. Lewis wrote: > > > > > > Thank you Trygve, > > > > > > I confirm also that the image runs very well on my Ubuntu Linux laptop > > > with a VM compiled per http://wiki.squeak.org/squeak/6354. > > > > > > Dave > > > > > > On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: > > > > > > Dear Trygve, > > > > > > I confirmed that I could launch the Loke/BabyIDE image with the included > > > SqueakVM for Windows (8.1 and 10) > > > and I could also launch it in a web browser by using the SqueakJS VM (https://squeak.js.org/run ). > > > > > > Thank you very much. > > > > > > -- > > > sumim > > > > > > 2020-10-03 15:48 Trygve Reenskaug : > > > > > > > > > Dear Sumim, > > > Thank you for your kind words. > > > > > > The latest version of Loke/BabyIDE written on Squeak3.10.2 is athttps://data.mendeley.com/datasets/5xxgzv7fsp/1 > > > The image is my program repository. It includes some examples of DCI > > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > > Engineering > > > (SRE), and more. > > > > > > Best > > > --Trygve > > > > > > On 2020-10-02 20:14, masato sumi wrote: > > > > > > Dear Trygve, > > > > > > Thank you for your very long term contribution and efforts. > > > > > > I'm very sorry that I couldn't help you at all now. > > > > > > I'm afraid, but could you please make your latest version of > > > Loke/BabyIDE > > > written on Squeak3.10.2 available for future generations of researchers > > > and/or followers? > > > > > > Anyway, I think your ideas and thoughts should be passed on to future > > > generations as faithfully as we can possible, and I myself will try to > > > make > > > sure that. > > > > > > Thank you so much and goodbye. > > > Please take care of yourself. > > > > > > -- > > > sumim > > > > > > 2020-10-03 0:54 Trygve Reenskaug : > > > > > > > > > Dear all, > > > I need to use many words to explore why I can't understand current > > > Squeak > > > code. I believe the reason is a profound one, and I hope some of you > > > have > > > the patience to read about it. > > > > > > Thank you for your responses to my 'A Sad Day'-message. One response > > > said > > > "*But please don't give up as an inventor of MVC, which has simplified > > > writing software for all of us.* > > > > > > > > > *We need new ideas to stabilize Smalltalk." *As to MVC, it was received > > > with acclamation when I first presented it at PARC in 1978, and people > > > suggested I should make it the theme of my article in the special > > > Smalltalk > > > issue of Byte. I couldn't understand it; MVC was so simple and obvious > > > that > > > is was not worth writing about it. Nevertheless, people seem to have > > > problems understanding MVC. It took me a long time before I gleaned > > > what > > > was going on. The explanation is a deep one, rooted in our different > > > mental > > > paradigms. > > > > > > From around 1970, I was working on Prokon, a distributed system for > > > managers in the shipbuilding industry: > > > > > > Every manager has their own computer that they use for augmenting > > > their > > > mind. The manager understands their software and ideally writes it > > > themselves. Managers delegate conversations with other managers to > > > their > > > computer's M-to-M network. (Marked with a heavy black line in the > > > figure). > > > I chose "distributed planning with central control" as my example > > > project. > > > Each manager creates a plan for their department, using apps suited to > > > their particular needs. A **distributed algorithm** ensures consistency > > > across departments. > > > > > > I came to PARC in 1978 and could immediately relate to the Smalltalk > > > image with its universe of collaborating objects. Alan's definition of > > > object-orientation fitted my Prokon model: "Thus its semantics are a > > > bit > > > like having thousands and thousands of computers all hooked together by > > > a > > > very fast network." > > > > > > MVC prescribes a network of communicating objects. Any object can fill > > > one or more positions in the network as long as it has the required > > > behavior; their classes are irrelevant. It's so simple that it's not > > > worth > > > writing about it. > > > > > > > > > ==================== > > > > > > The work on this post was interrupted at this point by an unexpected > > > week > > > in hospital. It gave me quiet days of pondering the futility of what I > > > am > > > doing and I will be terminating my memberships in the Pharo and Squeak > > > mailing lists. I have also deleted most of the old draft of this > > > message > > > and will quickly conclude with two observations: > > > > > > > > > 1. > > > The Smalltalk image is a universe of communicating objects. I call > > > it > > > an object computer. It can be seen as the model of an entirely new > > > kind of > > > computer, a model on a level closer to the human mind than the von > > > Neumann > > > model of 1948. The new model is communication-centric and should > > > supersede > > > the ubiquitous CPU-centric model as soon as possible. Working out > > > the > > > details of this idea could make an exciting and disruptive Ph.D. > > > thesis. > > > 2. > > > Smalltalk is called a programming language. It is a curious one, > > > very > > > different from well-known languages like Java with their syntax and > > > semantics. Smalltalk, as a programming language, does not have the > > > concept > > > of a program. Smalltalk, as a class-oriented language, does not have > > > syntax > > > for the declaration of a class. Smalltalk, as an object-oriented > > > language, > > > can't describe how objects collaborate to achieve a goal. You appear > > > to be > > > happy with this state of affairs, at least, I see no sign of anybody > > > wanting to move on from the unfinished Smalltalk language to a > > > mature > > > development environment. I do not find it satisfactory and it is not > > > acceptable to the intended managers populating the distributed > > > system shown > > > in the first picture. Consequently, I have done something about it > > > as > > > described in my SoSym article "*Personal Programming and the Object > > > Computer.*" I am tired of being alone in my endeavors and this ends > > > my work with Squeak and other Smalltalks. I wish you health and > > > happiness > > > wherever you happen to be. > > > > > > Trygve > > > Personal programming and the object computerhttps://doi.org/10.1007/s10270-019-00768-3 > > > > > > -- > > > > > > *The essence of object orientation is that objects collaborate to > > > achieve a goal. * > > > Trygve Reenskaug mailto: trygver at ifi.uio.no<%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > > N-0378 Oslo http://fullOO.info > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > -- > > > > > > *The essence of object orientation is that objects collaborate to > > > achieve > > > a goal. * > > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > > N-0378 Oslo http://fullOO.info > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > > > > > > > > > > -- > > > > > > *The essence of object orientation is that objects collaborate to achieve > > > a goal. * > > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> > > > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > > > N-0378 Oslo http://fullOO.info > > > > > > > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > From lewis at mail.msen.com Fri Nov 6 15:50:32 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Fri, 6 Nov 2020 10:50:32 -0500 Subject: [squeak-dev] [Board] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: References: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> <20201106024643.GA72196@shell.msen.com> Message-ID: <20201106155032.GA7043@shell.msen.com> Fabio, Thank you very much for updating https://squeak.org/projects with BabyIDE, and thank you to Trygve Reenskaug for making this work available. Dave On Fri, Nov 06, 2020 at 03:51:54PM +0100, Fabio Niephaus wrote: > Hi Dave, > > On Fri, Nov 6, 2020 at 3:46 AM David T. Lewis wrote: > > > > Hi Fabio, > > > > CC Squeak oversight board who I expect will support this enthusiastically. > > > > If you could put the BabyIDE-2019.07.23.zip file from Trygve's site on > > http://files.squeak.org site, that would be great. > > > > I would suggest saving it as: > > > > http://files.squeak.org/various_images/BabyIDE/BabyIDE-2019.07.23.zip > > > > Also, the zip file contains a README.txt so it might be a good idea to > > save that README.txt file in the same folder with the zip. > > Done! I've also added BabyIDE to the project list on squeak.org: > https://squeak.org/projects/ > > Fabio > > > > > I don't know that Trygve is a git user, but I'll try to help with a pull > > request to tie this into our squeak.org site. > > > > Thanks very much for your help, > > > > Dave > > > > > > > > On Wed, Nov 04, 2020 at 11:18:08PM +0100, Fabio Niephaus wrote: > > > On Wed, 4 Nov 2020 at 9:28 pm, Trygve Reenskaug wrote: > > > > > > > Hi, > > > > I downloaded it to Mendeley because this should be a safe haven for data. > > > > It was accepted, given a DOI and published. Somebody low down in the > > > > Mendeley hierarchy has decided it is not a valid data set after all. They > > > > have broken my agreement with them and removed it without informing me. > > > > This is now an ongoing discussion. > > > > > > > > Here's is a version of the BabyIDE zip: > > > > > > > > http://heim.ifi.uio.no/trygver/assets/BabyIDE-2019.07.23.zip > > > > > > > > It may not be identical to the published version, but should be very close. > > > > I have also finished a user guide for the image, I'll probably just make > > > > it an attachment to a squeak-Dev message. > > > > > > > > *How do I make files available on the Squeak web site?* > > > > > > > > > > Hi Trygve, > > > > > > Our website is on GitHub [1] and we accept pull requests. I'm part of the > > > Squeak web team and am happy to assist or upload files to our file server. > > > > > > Fabio > > > > > > > > > [1] > > > https://github.com/squeak-smalltalk/squeak.org > > > > > > > > > > > > > > Trygve > > > > > > > > > > > > On 2020-11-04 16:41, H. Hirzel wrote: > > > > > > > > Hello > > > > > > > > I was looking for the latest version of the > > > > > > > > Loke/BabyIDE image > > > > > > > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > > > > > > > > The image is my program repository. It includes some examples of DCI > > > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > > > Engineering > > > > (SRE), and more.) > > > > > > > > It is no longer available at this mendeley url as it is not a dataset > > > > but a program. > > > > Could somebody who has downloaded it please make it available on the > > > > squeak web site? > > > > > > > > Thank you > > > > Regards > > > > Hannes > > > > > > > > > > > > > > > > > > > > On 10/4/20, David T. Lewis wrote: > > > > > > > > Thank you Trygve, > > > > > > > > I confirm also that the image runs very well on my Ubuntu Linux laptop > > > > with a VM compiled per http://wiki.squeak.org/squeak/6354. > > > > > > > > Dave > > > > > > > > On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: > > > > > > > > Dear Trygve, > > > > > > > > I confirmed that I could launch the Loke/BabyIDE image with the included > > > > SqueakVM for Windows (8.1 and 10) > > > > and I could also launch it in a web browser by using the SqueakJS VM (https://squeak.js.org/run ). > > > > > > > > Thank you very much. > > > > > > > > -- > > > > sumim > > > > > > > > 2020-10-03 15:48 Trygve Reenskaug : > > > > > > > > > > > > Dear Sumim, > > > > Thank you for your kind words. > > > > > > > > The latest version of Loke/BabyIDE written on Squeak3.10.2 is athttps://data.mendeley.com/datasets/5xxgzv7fsp/1 > > > > The image is my program repository. It includes some examples of DCI > > > > programming, Ellen's Personal Programming IDE, Squeak Reverse > > > > Engineering > > > > (SRE), and more. > > > > > > > > Best > > > > --Trygve > > > > > > > > On 2020-10-02 20:14, masato sumi wrote: > > > > > > > > Dear Trygve, > > > > > > > > Thank you for your very long term contribution and efforts. > > > > > > > > I'm very sorry that I couldn't help you at all now. > > > > > > > > I'm afraid, but could you please make your latest version of > > > > Loke/BabyIDE > > > > written on Squeak3.10.2 available for future generations of researchers > > > > and/or followers? > > > > > > > > Anyway, I think your ideas and thoughts should be passed on to future > > > > generations as faithfully as we can possible, and I myself will try to > > > > make > > > > sure that. > > > > > > > > Thank you so much and goodbye. > > > > Please take care of yourself. > > > > > > > > -- > > > > sumim > > > > > > > > 2020-10-03 0:54 Trygve Reenskaug : > > > > > > > > > > > > Dear all, > > > > I need to use many words to explore why I can't understand current > > > > Squeak > > > > code. I believe the reason is a profound one, and I hope some of you > > > > have > > > > the patience to read about it. > > > > > > > > Thank you for your responses to my 'A Sad Day'-message. One response > > > > said > > > > "*But please don't give up as an inventor of MVC, which has simplified > > > > writing software for all of us.* > > > > > > > > > > > > *We need new ideas to stabilize Smalltalk." *As to MVC, it was received > > > > with acclamation when I first presented it at PARC in 1978, and people > > > > suggested I should make it the theme of my article in the special > > > > Smalltalk > > > > issue of Byte. I couldn't understand it; MVC was so simple and obvious > > > > that > > > > is was not worth writing about it. Nevertheless, people seem to have > > > > problems understanding MVC. It took me a long time before I gleaned > > > > what > > > > was going on. The explanation is a deep one, rooted in our different > > > > mental > > > > paradigms. > > > > > > > > From around 1970, I was working on Prokon, a distributed system for > > > > managers in the shipbuilding industry: > > > > > > > > Every manager has their own computer that they use for augmenting > > > > their > > > > mind. The manager understands their software and ideally writes it > > > > themselves. Managers delegate conversations with other managers to > > > > their > > > > computer's M-to-M network. (Marked with a heavy black line in the > > > > figure). > > > > I chose "distributed planning with central control" as my example > > > > project. > > > > Each manager creates a plan for their department, using apps suited to > > > > their particular needs. A **distributed algorithm** ensures consistency > > > > across departments. > > > > > > > > I came to PARC in 1978 and could immediately relate to the Smalltalk > > > > image with its universe of collaborating objects. Alan's definition of > > > > object-orientation fitted my Prokon model: "Thus its semantics are a > > > > bit > > > > like having thousands and thousands of computers all hooked together by > > > > a > > > > very fast network." > > > > > > > > MVC prescribes a network of communicating objects. Any object can fill > > > > one or more positions in the network as long as it has the required > > > > behavior; their classes are irrelevant. It's so simple that it's not > > > > worth > > > > writing about it. > > > > > > > > > > > > ==================== > > > > > > > > The work on this post was interrupted at this point by an unexpected > > > > week > > > > in hospital. It gave me quiet days of pondering the futility of what I > > > > am > > > > doing and I will be terminating my memberships in the Pharo and Squeak > > > > mailing lists. I have also deleted most of the old draft of this > > > > message > > > > and will quickly conclude with two observations: > > > > > > > > > > > > 1. > > > > The Smalltalk image is a universe of communicating objects. I call > > > > it > > > > an object computer. It can be seen as the model of an entirely new > > > > kind of > > > > computer, a model on a level closer to the human mind than the von > > > > Neumann > > > > model of 1948. The new model is communication-centric and should > > > > supersede > > > > the ubiquitous CPU-centric model as soon as possible. Working out > > > > the > > > > details of this idea could make an exciting and disruptive Ph.D. > > > > thesis. > > > > 2. > > > > Smalltalk is called a programming language. It is a curious one, > > > > very > > > > different from well-known languages like Java with their syntax and > > > > semantics. Smalltalk, as a programming language, does not have the > > > > concept > > > > of a program. Smalltalk, as a class-oriented language, does not have > > > > syntax > > > > for the declaration of a class. Smalltalk, as an object-oriented > > > > language, > > > > can't describe how objects collaborate to achieve a goal. You appear > > > > to be > > > > happy with this state of affairs, at least, I see no sign of anybody > > > > wanting to move on from the unfinished Smalltalk language to a > > > > mature > > > > development environment. I do not find it satisfactory and it is not > > > > acceptable to the intended managers populating the distributed > > > > system shown > > > > in the first picture. Consequently, I have done something about it > > > > as > > > > described in my SoSym article "*Personal Programming and the Object > > > > Computer.*" I am tired of being alone in my endeavors and this ends > > > > my work with Squeak and other Smalltalks. I wish you health and > > > > happiness > > > > wherever you happen to be. > > > > > > > > Trygve > > > > Personal programming and the object computerhttps://doi.org/10.1007/s10270-019-00768-3 > > > > > > > > -- > > > > > > > > *The essence of object orientation is that objects collaborate to > > > > achieve a goal. * > > > > Trygve Reenskaug mailto: trygver at ifi.uio.no<%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > > > N-0378 Oslo http://fullOO.info > > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > > > > > -- > > > > > > > > *The essence of object orientation is that objects collaborate to > > > > achieve > > > > a goal. * > > > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> <%20trygver at ifi.uio.no>Morgedalsvn. 5A http://folk.uio.no/trygver/ > > > > N-0378 Oslo http://fullOO.info > > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > *The essence of object orientation is that objects collaborate to achieve > > > > a goal. * > > > > Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> > > > > Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ > > > > N-0378 Oslo http://fullOO.info > > > > > > > > > > > > Norway Tel: (+47) 468 58 625 > > > > > > > > > > > > > > > > > From tim at rowledge.org Fri Nov 6 18:42:11 2020 From: tim at rowledge.org (tim Rowledge) Date: Fri, 6 Nov 2020 10:42:11 -0800 Subject: [squeak-dev] [Board] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: <20201106024643.GA72196@shell.msen.com> References: <2f887f53-696a-0c07-d22d-a9b33aa81aed@ifi.uio.no> <20201106024643.GA72196@shell.msen.com> Message-ID: > On 2020-11-05, at 6:46 PM, David T. Lewis wrote: > > Hi Fabio, > > CC Squeak oversight board who I expect will support this enthusiastically. Definitely. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: L: Lie! From karlramberg at gmail.com Sat Nov 7 11:43:03 2020 From: karlramberg at gmail.com (karl ramberg) Date: Sat, 7 Nov 2020 12:43:03 +0100 Subject: [squeak-dev] Update URL missing in trunk image? Message-ID: Hi, I downloaded latest win trunk here http://files.squeak.org/trunk/Squeak6.0alpha-20070-64bit/ But I could not update out of the box, because URL ' http://source.squeak.org/trunk' was missing. When I added it to PreferenceBrowser /updates/Update URL it worked fine. Should that not be there by default ? Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 7 12:38:29 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 7 Nov 2020 12:38:29 +0000 Subject: [squeak-dev] The Trunk: HelpSystem-Core-mt.121.mcz In-Reply-To: References: Message-ID: Hm, this is conflicting with my proposal of displaying to contents of the defaultSubtopic, see HelpSystem-Core-ct.125: [cid:bb14a3ae-0514-4472-b401-e39b3c9b4603] If I open the default help browser, bookBlurbs for "Squeak", "Tools", "The Project" etc. are empty anyway. What would the best strategy to merge both approaches? Are there any real users of bookBlurb at all? :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Mittwoch, 4. November 2020 15:53:09 An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org Betreff: [squeak-dev] The Trunk: HelpSystem-Core-mt.121.mcz Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-mt.121.mcz ==================== Summary ==================== Name: HelpSystem-Core-mt.121 Author: mt Time: 4 November 2020, 3:53:08.89062 pm UUID: 7d6ada3e-f323-2142-aae9-dba673c642de Ancestors: HelpSystem-Core-mt.120 Adds a blurb to custom help books. Thanks to Karl (kfr) for the idea! (HelpSystem-Core-kfr.74 will be moved to treated) =============== Diff against HelpSystem-Core-mt.120 =============== Item was changed: ----- Method: ClassBasedHelpTopic>>contents (in category 'accessing') ----- contents - "A book has no contents. Only its pages do." + ^ helpClass bookBlurb! - ^ ''! Item was added: + ----- Method: CustomHelp class>>bookBlurb (in category 'accessing') ----- + bookBlurb + "Returns a short summary of the custom help book" + + ^ self organization classComment! Item was changed: ----- Method: CustomHelp class>>bookName (in category 'accessing') ----- bookName "Returns the name of the custom help book" + ^ self name! - ^'Help'! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 20423 bytes Desc: pastedImage.png URL: From commits at source.squeak.org Sat Nov 7 12:48:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 7 Nov 2020 12:48:55 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1363.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1363.mcz ==================== Summary ==================== Name: Kernel-ct.1363 Author: ct Time: 7 November 2020, 1:48:48.562191 pm UUID: 9c029a9b-8356-ad4f-8a0c-dc984dc4573c Ancestors: Kernel-ct.1362 Refactor and comment Context >> #runSimulated:contextAtEachStep: per request. Branch commit, depends on Kernel-ct.1362 indeed. =============== Diff against Kernel-ct.1362 =============== Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- runSimulated: aBlock contextAtEachStep: anotherBlock "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." | current resume ensure | resume := false. + "Affect the context stack of the receiver during the simulation of aBlock." + current := aBlock asContextWithSender: self. + "Insert outer context denoting the end of the simulation." + ensure := (ensure := current) insertSender: (Context contextEnsure: - current := aBlock asContext. - current privSender: self. - ensure := current insertSender: (Context contextEnsure: [resume := true. ensure privSender: thisContext home sender]). (anotherBlock numArgs = 0 ifTrue: ["optimized" [resume]] ifFalse: ["stop execution on time, don't expose simulation details to caller" [current == ensure or: ["Context >> #resume:" current size >= 2 and: [(current at: 2) == ensure]]] ]) whileFalse: [anotherBlock cull: current. current := current step]. + "Continue with the execution in the previous context." ^ current jump! From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 7 12:50:15 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 7 Nov 2020 12:50:15 +0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1362.mcz In-Reply-To: References: <488F69B0-A0C7-4C25-8076-8606BF922B8E@rowledge.org>, Message-ID: > Go forth and be prolix :-) +1, see Kernel-ct.1363. > best comic book series ever... +1 :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Mittwoch, 4. November 2020 21:08:58 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1362.mcz On Wed, Nov 4, 2020 at 9:43 AM tim Rowledge > wrote: > On 2020-11-03, at 3:06 PM, Eliot Miranda > wrote: > > Go forth and be prolix :-) Wasn't he the wordy argumentative one in the Asterix the Gaul books? Had a (very) long running argument with Otiose the Roman? He was... best comic book series ever... -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.thiede at student.hpi.uni-potsdam.de Sat Nov 7 12:51:38 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Sat, 7 Nov 2020 06:51:38 -0600 (CST) Subject: [squeak-dev] Exception patterns (The Inbox: Kernel-ct.1292.mcz) In-Reply-To: <1602447354711-0.post@n4.nabble.com> References: <2f92c32e769a4e29a2c93f655b87638f@student.hpi.uni-potsdam.de> <0d47e32b25594ae1885da3706447de36@student.hpi.uni-potsdam.de> <1602447354711-0.post@n4.nabble.com> Message-ID: <1604753498013-0.post@n4.nabble.com> Hm ... I just tried to upload Kernel.ct.1362-ct.2 (branch name: "ct.1362"), but it was uploaded as Kernel-ct.1362 ... The next time I will try it without a dot in the branch name. :-) -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 7 12:54:15 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 7 Nov 2020 12:54:15 +0000 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de>, Message-ID: <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> > I am attaching a proposed test based on Tony's example. +1! Are there any objections or shall we integrate this change into Squeak-FileSystem? Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Jakob Reschke Gesendet: Freitag, 6. November 2020 12:31:03 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' Am Do., 5. Nov. 2020 um 19:41 Uhr schrieb Thiede, Christoph : > > Good catch! That's clearly a bug IMO. #extension should use #copyAfterLast: rather than #copyAfter:. > Pharo has it like this as well, so it is also an unnecessary incompatibility: extension "Return the extension of path basename i.e., /foo/gloops.taz extension is 'taz'" ^ self basename copyAfterLast: self extensionDelimiter > > On the other, FSReferenceTest >> #testBaseAndExtension explicitly defines a test where it says: > > "Note that the extension of a complex extension starts from the first period up until the end" > The original author might either have just documented that status quo, or thought of something like .tar.gz. Again Pharo has changed this to "Note that the extension of a complex extension starts after the last extension delimiter". -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 7 12:55:53 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 7 Nov 2020 12:55:53 +0000 Subject: [squeak-dev] Update URL missing in trunk image? In-Reply-To: References: Message-ID: <9ba7d85fdc6640dd8a512d986603f34a@student.hpi.uni-potsdam.de> Woah, good finding! I did not look into it, but I suppose this could be related to Marcel's recent preferences refactoring. Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von karl ramberg Gesendet: Samstag, 7. November 2020 12:43:03 An: The general-purpose Squeak developers list Betreff: [squeak-dev] Update URL missing in trunk image? Hi, I downloaded latest win trunk here http://files.squeak.org/trunk/Squeak6.0alpha-20070-64bit/ But I could not update out of the box, because URL 'http://source.squeak.org/trunk' was missing. When I added it to PreferenceBrowser /updates/Update URL it worked fine. Should that not be there by default ? Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sat Nov 7 13:04:22 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 7 Nov 2020 13:04:22 0000 Subject: [squeak-dev] The Trunk: MonticelloConfigurations-mt.164.mcz Message-ID: Marcel Taeumel uploaded a new version of MonticelloConfigurations to project The Trunk: http://source.squeak.org/trunk/MonticelloConfigurations-mt.164.mcz ==================== Summary ==================== Name: MonticelloConfigurations-mt.164 Author: mt Time: 7 November 2020, 2:04:21.611048 pm UUID: 9b08ff25-120e-c744-ae89-e394b21221fc Ancestors: MonticelloConfigurations-mt.163 Avoid clearing the image's update URL when resetting all pragma preferences -- which happens during release bundling. Note that setting the update URL cannot be part of setting the default preferences in the ReleaseBuilder because (update) repository switching is implemented at a different stage. So just ignoring this request works fine. ... we may want to move this preference to ReleaseBuilder anyway ... maybe #updateMapName, too. =============== Diff against MonticelloConfigurations-mt.163 =============== Item was changed: ----- Method: MCMcmUpdater class>>defaultUpdateURL (in category 'preferences') ----- defaultUpdateURL "The default update repository URL" + ^ DefaultUpdateURL ifNil: [ + self notify: 'There is no update URL configured. Proceed to use Squeak''s Trunk repository.' translated. + 'http://source.squeak.org/trunk']! - ^DefaultUpdateURL ifNil:['']! Item was changed: ----- Method: MCMcmUpdater class>>defaultUpdateURL: (in category 'preferences') ----- + defaultUpdateURL: aStringOrNil + "The default update repository URL. Avoid clearing this preference via 'nil'. See ReleaseBuilder class >> #switchToNewRepository:." - defaultUpdateURL: aString - "The default update repository URL" + aStringOrNil ifNotNil: [DefaultUpdateURL := aStringOrNil].! - DefaultUpdateURL := aString! From marcel.taeumel at hpi.de Sat Nov 7 13:06:33 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Sat, 7 Nov 2020 14:06:33 +0100 Subject: [squeak-dev] Update URL missing in trunk image? In-Reply-To: <9ba7d85fdc6640dd8a512d986603f34a@student.hpi.uni-potsdam.de> References: <9ba7d85fdc6640dd8a512d986603f34a@student.hpi.uni-potsdam.de> Message-ID: Hi Karl. Yeah, that got broken with the recent clearing of all pragma preferences during image bundling. I fixed that via MonticelloConfigurations-mt.164. Next bundles for 6.0alpha should be fine. All preferences who feel special, please raise your hand! ^__^ Best, Marcel Am 07.11.2020 13:56:01 schrieb Thiede, Christoph : Woah, good finding! I did not look into it, but I suppose this could be related to Marcel's recent preferences refactoring. Best, Christoph [http://www.hpi.de/] Von: Squeak-dev im Auftrag von karl ramberg Gesendet: Samstag, 7. November 2020 12:43:03 An: The general-purpose Squeak developers list Betreff: [squeak-dev] Update URL missing in trunk image?   Hi, I downloaded latest win trunk here http://files.squeak.org/trunk/Squeak6.0alpha-20070-64bit/ [http://files.squeak.org/trunk/Squeak6.0alpha-20070-64bit/] But I could not update out of the box, because URL 'http://source.squeak.org/trunk [http://source.squeak.org/trunk]' was missing. When I added it to PreferenceBrowser /updates/Update URL it worked fine. Should that not be there by default ? Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Sat Nov 7 14:54:28 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sat, 7 Nov 2020 15:54:28 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> Message-ID: Am Sa., 7. Nov. 2020 um 13:54 Uhr schrieb Thiede, Christoph : > > Are there any objections or shall we integrate this change into Squeak-FileSystem? > In my opinion, go ahead, but check and at least post the senders that need to be changed, please. From forums.jakob at resfarm.de Sat Nov 7 14:58:58 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sat, 7 Nov 2020 15:58:58 +0100 Subject: [squeak-dev] Exception patterns (The Inbox: Kernel-ct.1292.mcz) In-Reply-To: <1604753498013-0.post@n4.nabble.com> References: <2f92c32e769a4e29a2c93f655b87638f@student.hpi.uni-potsdam.de> <0d47e32b25594ae1885da3706447de36@student.hpi.uni-potsdam.de> <1602447354711-0.post@n4.nabble.com> <1604753498013-0.post@n4.nabble.com> Message-ID: So yes Monticello can produce branches, but it seems all but obvious how to use them (right). Am Sa., 7. Nov. 2020 um 13:51 Uhr schrieb Christoph Thiede : > > Hm ... I just tried to upload Kernel.ct.1362-ct.2 (branch name: "ct.1362"), > but it was uploaded as Kernel-ct.1362 ... The next time I will try it > without a dot in the branch name. :-) > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > From lewis at mail.msen.com Sat Nov 7 17:50:10 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sat, 7 Nov 2020 12:50:10 -0500 Subject: [squeak-dev] MC branching (was: Exception patterns (The Inbox: Kernel-ct.1292.mcz)) In-Reply-To: References: <2f92c32e769a4e29a2c93f655b87638f@student.hpi.uni-potsdam.de> <0d47e32b25594ae1885da3706447de36@student.hpi.uni-potsdam.de> <1602447354711-0.post@n4.nabble.com> <1604753498013-0.post@n4.nabble.com> Message-ID: <20201107175010.GA61841@shell.msen.com> On Sat, Nov 07, 2020 at 03:58:58PM +0100, Jakob Reschke wrote: > > Am Sa., 7. Nov. 2020 um 13:51 Uhr schrieb Christoph Thiede > : > > > > Hm ... I just tried to upload Kernel.ct.1362-ct.2 (branch name: "ct.1362"), > > but it was uploaded as Kernel-ct.1362 ... The next time I will try it > > without a dot in the branch name. :-) > > So yes Monticello can produce branches, but it seems all but obvious > how to use them (right). > For a memory aid, look at the packages 'Compiler' and 'Compiler.spur' in trunk. The entries in Compiler.spur are of the form Compiler.spur-eem.287, so the naming convention when saving a branch version is to add '.spur' the the package name 'Compiler' to get 'Compiler.spur'. The '-eem' and '.287' are author and file version number. The actual branching is seen only in the version history of any of these version entries, and it may not match the history implied by the names. For the example that Christoph provides above, suppose that Christoph was working on the Kernel package, and he wants to save some inbox versions branched from Kernel-eem.1361. In this example, the changes are going to be related to Context>>runSimulated, so he might want to identify these as a feature branch called 'runSimulated'. in that case, he might enter the name 'Kernel.runSimulated-ct.1362' rather than 'Kernel-ct.1362' when saving 1362 to the inbox. Then, when saving the next version 1363, it would be saved as 'Kernel.runSimulated-ct.1363'. This system is far from perfect, but it does work. Do not expect it to be as elegant or efficient as git, it is not. As Jakob says, the above is not obvious and that's why I mention it here. Dave From giovanni at corriga.net Sun Nov 8 13:25:43 2020 From: giovanni at corriga.net (Giovanni Corriga) Date: Sun, 8 Nov 2020 13:25:43 +0000 Subject: [squeak-dev] UK Smalltalk User Group Meeting - Wednesday, November 25th Message-ID: The next meeting of the UK Smalltalk User Group will be on Wednesday, November 25th. Stephen Travis Pope will present Siren9 and CSL6 - Frameworks and Applications for Sound/Music Creation and Processing. The Siren system ( https://github.com/stpope/Siren9 ) is a general-purpose software framework for music and sound composition, processing, performance, and analysis; it is a collection of about 350 classes written in Smalltalk-80 (40 kLOC or so). The current version of Siren (9.0) works on VisualWorks Smalltalk and supports streaming I/O via OpenSoundControl (OSC), MIDI, and multi-channel audio ports. The CREATE Signal Library (CSL)( https://github.com/stpope/CSL6 ) is a cross-platform C++ framework for digital audio signal synthesis, analysis, spatialization and interactive sound/music application development. CSL was developed at the University of California, Santa Barbara (UCSB) starting in the late 1990s. This presentation will introduce both package and demonstrate their use together to construct real-time compositional and music synthesis software. Stephen Travis Pope ( http://heaveneverywhere.com/stp ) is an award-winning composer, film-maker, computer scientist and social activist based in Santa Barbara, California. He is currently active as a software development contractor and intellectual property expert through FASTLab. His music and video compositions are released through HeavenEverywhere Media. Stephen has used the Smalltalk programming system since 1984 and made several significant contributions to it, though he remains frustrated by programming environments in general. Given the current COVID-19 restrictions, this will be an online meeting from home. If you'd like to join us, please sign up in advance on the meeting's Meetup page ( https://www.meetup.com/UKSTUG/events/cbklbrybcpbhc/ ) to receive the meeting details. Don’t forget to bring your laptop and drinks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Sun Nov 8 18:58:13 2020 From: tim at rowledge.org (tim Rowledge) Date: Sun, 8 Nov 2020 10:58:13 -0800 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken Message-ID: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> Something has broken wrt the handling of the DirectoryEntryFile conversion of the file times. If you open a FileList of some format and look at files you will see the date/time info shown correctly. At least, on Mac & linux; no idea about Windows. If you inspect FileDirectory default directoryEntryFor: 'somefileIjustmade.foo' and then in the inspector try self modificationDateAndTime you will notice that the date is borked. Compare and contrast with date fromSeconds: modificationTime and Time fromSeconds: modificationTime \\ 86400 The issue seems to stem from a confusion about the expected value of the modificationTime. The image code is assuming it is a UTC seconds count and includes the image's known TZ offset to cause the (in my case) 8 hour variance. The VM code (modulo what version I currently have loaded etc etc) is making a TZ (plus Squeak epoch) corrected value from the number provided by the OS call used. As best I can tell from the versions record some substantial changes got made to the DateAndTime>>fromSeconds: in 2018 so it may have been problematic ever since then. I'd guess that there ought to be a DateAndTime class>fromLocalSeconds: or similar? Timezones hurt my head so I'm very keen to pass the buck to people with a more direct interest in the chronology stuff. The #creationDateAndTime obviously needs the same solution. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Useful random insult:- The wheel's spinning but the hamster's dead. From christoph.thiede at student.hpi.uni-potsdam.de Sun Nov 8 19:50:41 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Sun, 8 Nov 2020 13:50:41 -0600 (CST) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> Message-ID: <1604865041240-0.post@n4.nabble.com> Hi Levente, would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be great because I depend on this functionality in another project and currently require your JSON fork in my baseline. :-) Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From lewis at mail.msen.com Mon Nov 9 00:57:12 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 8 Nov 2020 19:57:12 -0500 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken In-Reply-To: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> References: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> Message-ID: <20201109005712.GA72424@shell.msen.com> On Sun, Nov 08, 2020 at 10:58:13AM -0800, tim Rowledge wrote: > Something has broken wrt the handling of the DirectoryEntryFile conversion of the file times. > > If you open a FileList of some format and look at files you will see > the date/time info shown correctly. At least, on Mac & linux; no idea > about Windows. > > If you inspect > FileDirectory default directoryEntryFor: 'somefileIjustmade.foo' > and then in the inspector try > self modificationDateAndTime > you will notice that the date is borked. > > Compare and contrast with > date fromSeconds: modificationTime > and > Time fromSeconds: modificationTime \\ 86400 > > The issue seems to stem from a confusion about the expected value of the > modificationTime. The image code is assuming it is a UTC seconds count > and includes the image's known TZ offset to cause the (in my case) 8 hour > variance. The VM code (modulo what version I currently have loaded etc etc) > is making a TZ (plus Squeak epoch) corrected value from the number provided > by the OS call used. > > As best I can tell from the versions record some substantial changes got > made to the DateAndTime>>fromSeconds: in 2018 so it may have been problematic > ever since then. > Your analysis sounds right to me. The FilePlugin support code converts time stamps for file entries into "Squeak time", which means seconds since the Smalltalk epoch. In early days of Squeak, this was understood to mean seconds in whatever local time zone you happen to have been in. Later, we all agreed to let the Smalltalk epoch be measured with respect to GMT ("UTC time"). So the FilePlugin is and always has been broken. It reports file time stamps relative to the Smalltalk epoch, but it offsets those values to your local time zone, which is something that we now recognize as being wrong. It was a convenient shortcut 25 years ago when Squeak ran on very simple operating systems, but it is an annoying problem now that all of our computers and cell phones are fully aware of time zone conventions. Fixing this properly would be a challenge. The FilePlugin fix in the VM is trivial, but making that change without breaking existing images would be quite a trick. > I'd guess that there ought to be a DateAndTime class>fromLocalSeconds: or similar? Timezones hurt my head so I'm very keen to pass the buck to people with a more direct interest in the chronology stuff. The #creationDateAndTime obviously needs the same solution. > I think you're on the right track here, although I don't think we would want to add this directly to DateAndTime. As Chris would probably point out, the API is messy enough already. But somebody has figured out how to make this mess behave reasonably in the FileList, so it must be fixable. Dave From tim at rowledge.org Mon Nov 9 01:27:04 2020 From: tim at rowledge.org (tim Rowledge) Date: Sun, 8 Nov 2020 17:27:04 -0800 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken In-Reply-To: <20201109005712.GA72424@shell.msen.com> References: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> <20201109005712.GA72424@shell.msen.com> Message-ID: <812CEC53-47E3-4997-A963-F7E89D3423CB@rowledge.org> > On 2020-11-08, at 4:57 PM, David T. Lewis wrote: > > On Sun, Nov 08, 2020 at 10:58:13AM -0800, tim Rowledge wrote: >> Something has broken wrt the handling of the DirectoryEntryFile conversion of the file times. > [snip] >> I'd guess that there ought to be a DateAndTime class>fromLocalSeconds: or similar? Timezones hurt my head so I'm very keen to pass the buck to people with a more direct interest in the chronology stuff. The #creationDateAndTime obviously needs the same solution. >> > > I think you're on the right track here, although I don't think > we would want to add this directly to DateAndTime. As Chris would > probably point out, the API is messy enough already. > > But somebody has figured out how to make this mess behave reasonably > in the FileList, so it must be fixable. The FileList simply uses the no-idea-about-TZ code and happened to get it right by accident ;-) There is actually a fairly simple, though tacky solution. !DirectoryEntry methodsFor: 'access' stamp: 'tpr 11/8/2020 17:18'! modificationDateAndTime "The DateAndTime my entry in the file system was last modified." ^ DateAndTime fromSeconds: modificationTime - DateAndTime localOffsetSeconds! ! Obviously required for creationTimeAndDate too. An alternative that would approach from the creation end would be to subtract the localOffsetSeconds in the DirectoryEntry>>#setDirectory:name:creationTime:modificationTime:fileSize: method - but then we'd also have to fix the FileList and all the other senders of #modificationTime & #creationTime to use DateAndTime. Not that we shouldn't fix those - looking at some of them I suspect some interesting bugs might have been caused by the errant TZ factor. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Useful random insult:- He fell out of the ugly tree and hit every branch on the way down. From eliot.miranda at gmail.com Mon Nov 9 01:28:51 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun, 8 Nov 2020 17:28:51 -0800 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken In-Reply-To: <20201109005712.GA72424@shell.msen.com> References: <20201109005712.GA72424@shell.msen.com> Message-ID: <0D660741-8AA4-4B06-86DE-753FF37DBB8E@gmail.com> Hi David, Hi Tim, > On Nov 8, 2020, at 4:57 PM, David T. Lewis wrote: > > On Sun, Nov 08, 2020 at 10:58:13AM -0800, tim Rowledge wrote: >> Something has broken wrt the handling of the DirectoryEntryFile conversion of the file times. >> >> If you open a FileList of some format and look at files you will see >> the date/time info shown correctly. At least, on Mac & linux; no idea >> about Windows. >> >> If you inspect >> FileDirectory default directoryEntryFor: 'somefileIjustmade.foo' >> and then in the inspector try >> self modificationDateAndTime >> you will notice that the date is borked. >> >> Compare and contrast with >> date fromSeconds: modificationTime >> and >> Time fromSeconds: modificationTime \\ 86400 >> >> The issue seems to stem from a confusion about the expected value of the >> modificationTime. The image code is assuming it is a UTC seconds count >> and includes the image's known TZ offset to cause the (in my case) 8 hour >> variance. The VM code (modulo what version I currently have loaded etc etc) >> is making a TZ (plus Squeak epoch) corrected value from the number provided >> by the OS call used. >> >> As best I can tell from the versions record some substantial changes got >> made to the DateAndTime>>fromSeconds: in 2018 so it may have been problematic >> ever since then. >> > > Your analysis sounds right to me. > > The FilePlugin support code converts time stamps for file entries > into "Squeak time", which means seconds since the Smalltalk epoch. > In early days of Squeak, this was understood to mean seconds in > whatever local time zone you happen to have been in. Later, we > all agreed to let the Smalltalk epoch be measured with respect > to GMT ("UTC time"). > > So the FilePlugin is and always has been broken. It reports file > time stamps relative to the Smalltalk epoch, but it offsets those > values to your local time zone, which is something that we now > recognize as being wrong. It was a convenient shortcut 25 years > ago when Squeak ran on very simple operating systems, but it is > an annoying problem now that all of our computers and cell phones > are fully aware of time zone conventions. > > Fixing this properly would be a challenge. The FilePlugin fix > in the VM is trivial, but making that change without breaking > existing images would be quite a trick. Fixing it is as easy as adding a flag bit to the image header flags that if set specifies the new behaviour, and if set specifies the old behaviour. I’ll take a look soon. > >> I'd guess that there ought to be a DateAndTime class>fromLocalSeconds: or similar? Timezones hurt my head so I'm very keen to pass the buck to people with a more direct interest in the chronology stuff. The #creationDateAndTime obviously needs the same solution. >> > > I think you're on the right track here, although I don't think > we would want to add this directly to DateAndTime. As Chris would > probably point out, the API is messy enough already. > > But somebody has figured out how to make this mess behave reasonably > in the FileList, so it must be fixable. > > Dave > > From leves at caesar.elte.hu Mon Nov 9 02:07:38 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon, 9 Nov 2020 03:07:38 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <1604865041240-0.post@n4.nabble.com> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html From eliot.miranda at gmail.com Mon Nov 9 06:42:16 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun, 8 Nov 2020 22:42:16 -0800 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken In-Reply-To: <812CEC53-47E3-4997-A963-F7E89D3423CB@rowledge.org> References: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> <20201109005712.GA72424@shell.msen.com> <812CEC53-47E3-4997-A963-F7E89D3423CB@rowledge.org> Message-ID: Hi Tim, Hi Dave, On Sun, Nov 8, 2020 at 5:27 PM tim Rowledge wrote: > > > > On 2020-11-08, at 4:57 PM, David T. Lewis wrote: > > > > On Sun, Nov 08, 2020 at 10:58:13AM -0800, tim Rowledge wrote: > >> Something has broken wrt the handling of the DirectoryEntryFile > conversion of the file times. > > > [snip] > >> I'd guess that there ought to be a DateAndTime class>fromLocalSeconds: > or similar? Timezones hurt my head so I'm very keen to pass the buck to > people with a more direct interest in the chronology stuff. The > #creationDateAndTime obviously needs the same solution. > >> > > > > I think you're on the right track here, although I don't think > > we would want to add this directly to DateAndTime. As Chris would > > probably point out, the API is messy enough already. > > > > But somebody has figured out how to make this mess behave reasonably > > in the FileList, so it must be fixable. > > The FileList simply uses the no-idea-about-TZ code and happened to get it > right by accident ;-) > > There is actually a fairly simple, though tacky solution. > > > !DirectoryEntry methodsFor: 'access' stamp: 'tpr 11/8/2020 17:18'! > modificationDateAndTime > "The DateAndTime my entry in the file system was last modified." > ^ DateAndTime fromSeconds: modificationTime - DateAndTime > localOffsetSeconds! ! > > Obviously required for creationTimeAndDate too. > > An alternative that would approach from the creation end would be to > subtract the localOffsetSeconds in the > DirectoryEntry>>#setDirectory:name:creationTime:modificationTime:fileSize: > method - but then we'd also have to fix the FileList and all the other > senders of #modificationTime & #creationTime to use DateAndTime. Not that > we shouldn't fix those - looking at some of them I suspect some > interesting bugs might have been caused by the errant TZ factor. > OK, it's done in the latest VM sources. Make a new VM, set the image header flag via e.g. Smalltalk vmParameterAt: 48 put: ((Smalltalk vmParameterAt: 48) bitOr: 128) and now times from both the FilePlugin and the FileAttributesPlugin are in UTC seconds from the epoch. Backwards compatibility is maintained. Images without the bit set will get local times from the File plugins. Rum the image on an older VM and times will always be local, but the flag bit should be preserved, so is can be saved on an older VM, but when run on the newer, if the flag was set, times should be delivered in UTC. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 9 07:04:20 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 9 Nov 2020 08:04:20 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Mon Nov 9 07:13:42 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 9 Nov 2020 07:13:42 0000 Subject: [squeak-dev] The Trunk: SystemReporter-eem.46.mcz Message-ID: Eliot Miranda uploaded a new version of SystemReporter to project The Trunk: http://source.squeak.org/trunk/SystemReporter-eem.46.mcz ==================== Summary ==================== Name: SystemReporter-eem.46 Author: eem Time: 8 November 2020, 11:13:41.091987 pm UUID: e1bb313e-09e5-4e06-8efb-7114773e299f Ancestors: SystemReporter-eem.45 Fix an inadvertet truncation of flag field printing, and add the description of the file-times-in-utc flag bit in the image header flags. =============== Diff against SystemReporter-eem.45 =============== Item was changed: ----- Method: SystemReporter>>reportVMParameters: (in category 'reporting') ----- reportVMParameters: aStream | vmParameters isStack isCog isSpur | self header: 'Virtual Machine Parameters' on: aStream. vmParameters := Smalltalk vm getVMParameters. isStack := (vmParameters at: 42 ifAbsent: [0]) ~= 0. "42 = number of stack pages available" isCog := isStack and: [(vmParameters at: 46) ~= 0]. "46 is machine code zone size" isSpur := isStack and: [(vmParameters at: 41) anyMask: 2r10000]. "41 is imageFormatVersion for the VM; bit 16 is the Spur bit" (isSpur ifFalse: [#( 1 'size of old space' 2 'size of young+old space' 3 'size of memory' 4 'allocationCount' 5 'allocations between GCs' 6 'survivor count tenuring threshold')] ifTrue: [#( 1 'size of old space' 2 'used bytes in new space (used eden + used past space)' 3 'size of heap')]), #( 7 'full GCs since startup' 8 'total milliseconds in full GCs since startup'), (isSpur ifFalse: [#( 9 'incremental GCs since startup' 10 'total milliseconds in incremental GCs since startup' 11 'tenures of surving objects since startup'), {12 to: 19. 'specific to the translating VM'}] ifTrue: [#( 9 'scavenging GCs since startup' 10 'total milliseconds in scavenging GCs since startup' 11 'tenures of surving objects since startup'), {12 to: 15. 'reserved for future use'}, #( 16 'total microseconds in idle since startup' 17 'proportion of code zone available for use (Sista VMs only; read-write)' 18 'total milliseconds in full GC compaction since startup (a portion of parameter 8)' 19 'scavenge threshold; the effective size of eden')]), #( 20 'utc microseconds at startup (if non-zero)' 21 'root/remembered table size (occupancy)' 22 'root/remembered table overflows since startup' 23 'bytes of extra memory to reserve for VM buffers, plugins, etc.' 24 'free memory threshold above which object memory will be shrunk' 25 'memory headroom when growing object memory'), (isStack ifFalse: [#( 26 'interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image is not calling getNextEvent often')] ifTrue: [#( 26 'heartbeat period (ms; see #58)')]), (isSpur ifFalse: [#( 27 'number of times mark loop iterated for current IGC/FGC includes ALL marking' 28 'number of times sweep loop iterated for current IGC/FGC' 29 'number of times make forward loop iterated for current IGC/FGC' 30 'number of times compact move loop iterated for current IGC/FGC')] ifTrue: [#()]), #( 31 'number of grow memory requests' 32 'number of shrink memory requests'), (isSpur ifFalse: [#( 33 'number of root table entries used for current IGC/FGC' 34 'number of allocations done before current IGC/FGC' 35 'number of survivor objects after current IGC/FGC' 36 'millisecond clock when current IGC/FGC completed' 37 'number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC' 38 'milliseconds taken by current IGC' 39 'Number of finalization signals for Weak Objects pending when current IGC/FGC completed')] ifTrue: [#( 33 'number of root table entries at last scavenge' 35 'number of survivor objects at last scavenge (if non-zero)' 36 'millisecond clock when current scavenge completed' 38 'milliseconds taken by current scavenge' 39 'Number of finalization signals for Weak Objects pending when current SGC/FGC completed')]), #( 40 'VM word size - 4 or 8'), (isStack ifTrue: [#( 41 'imageFormatVersion for the VM' 42 'number of stack pages available' 43 'desired number of stack pages (stored in image file header, max 65535)' 44 'size of eden, in bytes' 45 'desired size of eden, in bytes (stored in image file header)' 46 'machine code zone size, in bytes (0 in Stack VM)' 47 'desired machine code zone size (0 => default 1Mb to 2Mb depending on processor)'), + { 48. 'Persistent image header flags\ bit 0: implies Process has threadId as its 4th inst var\ bit 1: if set, methods that are interpreted will have the flag bit set in their header\ bit 2: if set, implies preempting a process does not put it to the back of its run queue\ bit 3: if set, implies the GUI should run on the first thread and event queues should not be accessed from other threads\ bit 4: if set, implies the new finalization scheme where WeakArrays are queued\ bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events\ bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)\ bit 7: if set, causes times delivered from file primitives to be in UTC rather than local time.' withCRs }, - { 48. 'Persistent image header flags\ bit 0: implies Process has threadId as its 4th inst var\ bit 1: if set, methods that are interpreted will have the flag bit set in their header\ bit 2: if set, implies preempting a process does not put it to the back of its run queue\ bit 3: if set, implies the GUI should run on the first thread and event queues should not be accessed from other threads\ bit 4: if set, implies the new finalization scheme where WeakArrays are queued\ bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events\ bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)' withCRs }, #( 49 'max size the image promises to grow the external semaphore table to'), (isSpur ifFalse: [{ 50 to: 51. 'reserved for VM parameters that persist in the image (such as size of eden above)'. 52 to: 56. 'specific to Spur' }] ifTrue: [{ 50 to: 51. 'reserved for VM parameters that persist in the image (such as size of eden above)' }, #( 52 'root/remembered table capacity' 53 'number of old space segments' 54 'total free old space' 55 'ratio of growth and image size at or above which a GC will be performed post scavenge')]), #( 56 'number of process switches since startup' 57 'number of ioProcessEvents calls since startup' 58 'number of forceInterruptCheck calls since startup' 59 'number of check event calls since startup' 60 'number of stack page overflows since startup' 61 'number of stack page divorces since startup' 62 'compiled code compactions since startup'), (isCog ifFalse: [#()] ifTrue: [#( 63 'total milliseconds in compiled code compactions since startup' 64 'the number of methods that currently have jitted machine-code')]), { 65. 'Cog feature flags\ bit 0: set if the VM supports MULTIPLE_BYTECODE_SETS.\ bit 1: set if the VM supports read-only objects (IMMUTABILITY).\ bit 2: set if the VM has an ITIMER_HEARTBEAT\ bit 3: set if the VM supports cross-platform BIT_IDENTICAL_FLOATING_POINT arithmetic' withCRs. 66. 'the byte size of a stack page'.}, (isSpur ifFalse: [{ 67 to: 69. 'reserved for more Cog-related info' }] ifTrue: [#( 67 'the maximum allowed size of old space (if zero there is no limit)' 68 'the average number of live stack pages when scanned by scavenge/gc/become' 69 'the maximum number of live stack pages when scanned by scavenge/gc/become')]), #( 70 'the vmProxyMajorVersion (the interpreterProxy VM_MAJOR_VERSION)' 71 'the vmProxyMinorVersion (the interpreterProxy VM_MINOR_VERSION)')] ifFalse: [#()]) pairsDo: [:idx :desc | | value values | aStream nextPut: $#. idx isInteger ifTrue: [value := vmParameters at: idx. aStream print: idx; tab: (idx < 10 ifTrue: [2] ifFalse: [1]); nextPutAll: ((value isInteger and: [idx ~= 41]) ifTrue: [(desc includesSubstring: 'bit 0:') + ifTrue: [value printStringBase: 2 nDigits: value highBit] - ifTrue: [value printStringBase: 2 nDigits: (desc at: (desc lastIndexOf: $:) - 1) digitValue + 1] ifFalse: [value asStringWithCommas]] ifFalse: [value printString])] ifFalse: [value := vmParameters at: idx first. aStream print: idx first; next: 2 put: $.; print: idx last; tab. values := idx collect: [:i| vmParameters at: i]. values asSet size = 1 ifTrue: [aStream print: value] ifFalse: [values do: [:v| aStream print: v] separatedBy: [aStream nextPutAll: ', ']]]. aStream tab; nextPutAll: desc; cr]! From commits at source.squeak.org Mon Nov 9 07:52:37 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 9 Nov 2020 07:52:37 0000 Subject: [squeak-dev] The Trunk: Morphic-mt.1713.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1713.mcz ==================== Summary ==================== Name: Morphic-mt.1713 Author: mt Time: 9 November 2020, 8:52:30.010357 am UUID: 36a88f5c-ef4c-9943-8658-68c3485a5ed6 Ancestors: Morphic-mt.1712 Adds documentation for active globals. Thanks to Dave (dtl) for taking care! =============== Diff against Morphic-mt.1712 =============== Item was changed: DynamicVariable subclass: #ActiveEventVariable instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Worlds'! + + !ActiveEventVariable commentStamp: 'mt 11/9/2020 08:50' prior: 0! + I refer to the event responsible for the current action. Inbetween event handling cycles my value will be last event from the previous cycle, usually a mouse event. + + Please talk to me only through #currentEvent, which is understood by all objects. + + For more information, see http://wiki.squeak.org/squeak/6647.! Item was changed: DynamicVariable subclass: #ActiveHandVariable instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Worlds'! + + !ActiveHandVariable commentStamp: 'mt 11/9/2020 08:50' prior: 0! + I refer to the hand that issued the event responsible for the current action. In a multi-user setup, this hand identifies which user-incarnation invoked the action. Inbetween event handling cycles, my value is equivalent to the current project's primary hand. + + Please talk to me only through #currentHand, which is understood by all objects. + + For more information, see http://wiki.squeak.org/squeak/6647.! Item was changed: DynamicVariable subclass: #ActiveWorldVariable instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Worlds'! + + !ActiveWorldVariable commentStamp: 'mt 11/9/2020 08:49' prior: 0! + I refer to the world currently in control of handling some event. Usually my value is identical with the current project's world, but for embedded worlds the world will change when event handling reaches the new (inner world) and will be restored when event handling leaves it. + + Please talk to me only through #currentWorld, which is understood by all objects. + + For more information, see http://wiki.squeak.org/squeak/6647.! Item was changed: Object subclass: #WorldState + instanceVariableNames: 'hands viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas interCycleDelay' - instanceVariableNames: 'hands activeHand viewBox canvas damageRecorder stepList lastStepTime lastStepMessage lastCycleTime commandHistory alarms lastAlarmTime remoteServer multiCanvas interCycleDelay' classVariableNames: 'CanSurrenderToOS DeferredUIMessages DisableDeferredUpdates LastCycleTime MinCycleLapse' poolDictionaries: '' category: 'Morphic-Worlds'! !WorldState commentStamp: 'ls 7/10/2003 19:30' prior: 0! The state of a Morphic world. (This needs some serious commenting!!!!) The MinCycleLapse variable holds the minimum amount of time that a morphic cycle is allowed to take. If a cycle takes less than this, then interCyclePause: will wait until the full time has been used up.! From marcel.taeumel at hpi.de Mon Nov 9 07:55:38 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 9 Nov 2020 08:55:38 +0100 Subject: [squeak-dev] ReadWriteStream inspect self contents ctl-p is immediately available for cut-n-paste and that is a great convenience, thanks to however did it. In-Reply-To: <174aaf6baa5.c0e269d554636.7017114569999735143@zoho.com> References: <174aaf6baa5.c0e269d554636.7017114569999735143@zoho.com> Message-ID: Hi Timothy. Can you elaborate on this? What do you mean? Best, Marcel Am 20.09.2020 12:02:22 schrieb gettimothy via Squeak-dev : Its a small thing, but I have about 100 SUnit tests that I have to edit and the workflow is very easy due to that feature. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 9 08:01:58 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 9 Nov 2020 09:01:58 +0100 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> Message-ID: Hi Christoph. > I wonder whether we should turn off drop shadows during grabbing a morph? We already do at some places. See (some) senders of #hasDropShadow:. Still, it feels like a workaround and does not yet apply to the hand's caching procedure. See HandMorph >> #updateCacheCanvas:. Best, Marcel Am 19.09.2020 21:04:28 schrieb Thiede, Christoph : Hi all, I wonder whether we should turn off drop shadows during grabbing a morph? And it looks even more strange when grabbing menu items (citing from Squeak by Example): This is related to the #menuAppearance3d preference, but I never met a physics system were shadows can throw their own shadows 🤔 Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 6693 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 61116 bytes Desc: not available URL: From marcel.taeumel at hpi.de Mon Nov 9 08:06:31 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 9 Nov 2020 09:06:31 +0100 Subject: [squeak-dev] Can we make computing the local variables in the debugger lazy? In-Reply-To: References: <9da5acf36e3b4c77bcf4af677adca40b@student.hpi.uni-potsdam.de> <,CAC20JE0xTSOJabnvOwLoDc6E1H+i_b8Y8G0buLVhDbOWSXZOkA@mail.gmail.com> Message-ID: Hi Eliot, hi Christoph. How is the current state of this issue? We did some recent improvements in the debugger. Yet, the styling of context variables can be still rather slow. Is it still noticeable? Best, Marcel Am 01.10.2020 23:14:48 schrieb Thiede, Christoph : Hi Eliot, you can have an inspector field's title be styled by sending "shouldStyleName: true" to it. The styling itself, then, is performed by the Inspector in #fieldList (or just browse the senders of #shouldStyleName), where the styler is invoked. Before styling the field list, the styler is configured in #aboutToStyle:requestor:/#updateStyler:requestor: where self doItContext is passed to the styler. So tl;dr: Styling is always applied late (after the field list is constructed), you cannot break it by caching the temp names earlier. :-) Best, Christoph [http://www.hpi.de/] Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Donnerstag, 1. Oktober 2020 20:33:08 An: The general-purpose Squeak developers list; Taeumel, Marcel Betreff: Re: [squeak-dev] Can we make computing the local variables in the debugger lazy?   Hi Christoph, On Wed, Sep 30, 2020 at 2:27 AM Thiede, Christoph wrote: Hi Eliot, > Can you point me to where in ContextInspector the emphasis for the temp vars is chosen? By convention, inspector fields are defined in the category "fields - streaming". So you are probably searching for ContextInspector >> #streamTemporaryVariablesOn: or ContextVariablesInspector >> #streamTemporaryVariablesOn:? I found this code; I don't see any text emphasis going on.  Where is the code that turns temp variables red when they're out of scope?  Marcel? Looking forward to your optimization! :-) Best, Christoph [http://www.hpi.de/] Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Mittwoch, 30. September 2020 09:09:27 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Can we make computing the local variables in the debugger lazy?   Hi Marcel, On Tue, Sep 29, 2020 at 1:07 AM Marcel Taeumel wrote: Hi Eliot, hi all! I fixed the issue with Tools-mt.989. The logic was already there in #runUntil. Can you point me to where in ContextInspector the emphasis for the temp vars is chosen?  I want to modify ContextInspector to cache the temp names for a given method because I believe this will speed up stepping a lot.  However I couldn't find where the emphasis is applied so I'm worried that my cache may break something.  If I can see where that is being done I have a better chance at avoiding breaking things. Best, Marcel Am 19.09.2020 23:00:33 schrieb Levente Uzonyi : Hi Christoph, On Sat, 19 Sep 2020, Thiede, Christoph wrote: > > Hi Eliot, > > > very nice finding once again! I #timeProfile'd the menu button action and as I expected, the most expensive operation is the shout styling by the new inspectors, including the decompilation of every method: What was it exactly that you profiled? The screenshot shows that 76.9% was spent in #initializeVariablesFromContext, of which 52.5% of the time was spent in CompiledMethod(CompiledCode) >> #getSource. The rest of the tree is not visible, but these methods have nothing to do with parsing or styling, they initialize the parser and normally should take <1 ms. Also, why is the decompiler producing the source code? > > > [IMAGE] > > > First, when loading ShoutCore-ct.78 (Inbox), the speed doubles (but probably that's rather a problem with my sources file, see the thread about this commit). You may want to try compiling a VM where FilePlugin's CreateFile does not set the FILE_FLAG_SEQUENTIAL_SCAN flag, and see if it helps with file reading performance. Levente > > Second, we do not redraw the world while running to the selection, so we do not need to update the inspectors at all. I think we could split up #doStep into some #basicDoStep (which would perform the actual stepping logic) + > some #updateContextDuring: (which would update the stack list and the inspectors), then we would need to trigger the updates only once from #runToSelection:. > As an alternative, we could make this method a bit more complex but responsive by applying the same updating logic from #runUntil. > > What do you think? :-) > > Best, > Christoph > > _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ > Von: Squeak-dev im Auftrag von Eliot Miranda > Gesendet: Samstag, 19. September 2020 20:17:12 > An: The general-purpose Squeak developers list; Taeumel, Marcel > Betreff: [squeak-dev] Can we make computing the local variables in the debugger lazy?   > Hi Marcel, > >     can we try and reduce the frequency at which we compute the variables in the context inspector in the debugger?  It is a noticeable performance hit.  I really like the user interface, but the performance hit is making > debugging difficult. > > As an example use this: > > | samples sineTable sound | > "1 second of A below middle C (220Hz). 16000 / 220 is 72.72 recurring" > sineTable := SoundPlayer sineTable: 73. > sineTable doWithIndex: "And let's not deafen anyone..." > [:sample :index| sineTable at: index put: sample // 4]. > samples := SoundBuffer new: 16000. > 1 to: samples size by: sineTable size do: > [:i| samples replaceFrom: i to: (i + sineTable size - 1 min: 16000) with: sineTable startingAt: 1]. > 1 to: 146 do: > [:i| > samples at: i put: ((samples at: i) * i / 146) asInteger. > samples at: 16001 - i put: ((samples at: 16001 - i) * i / 146) asInteger]. > sound := SampledSound > samples: samples > samplingRate: 16000. > sound := MixedSound new > add: sound pan: 0.25; > add: sound pan: 0.75; > yourself. > sound computeSamplesForSeconds: sound duration > > > Open a workspace in e.g. a 64-bit image prior to Tools-mt.965 (I used an image containing Tools-mt.942).  Debug the above in the workspace.  Position the cursor at "sound computeSamplesForSeconds: sound duration" and do "run > to here".  It is essentially instantaneous. > > Now do the same in a contemporary trunk image.  It takes almost 6 seconds. > > I used to be able to click step as fast as I could and the system would keep up with me.  Now I find that if I click too fast I can accumulate excess clicks and when I stp clicking the system will continue stepping and go too > far. > > I don't want to lose the feedback the new variables list gives us.  But I do find the performance hit tedious.  I wonder could we cache the list and only update it > - when Morphic updates, and > - when the context changes? > > > _,,,^..^,,,_ > best, Eliot > > -- _,,,^..^,,,_ best, Eliot -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 9 09:32:23 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 9 Nov 2020 09:32:23 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> , Message-ID: <5b14770c900f49cdb0291c474989267a@student.hpi.uni-potsdam.de> +1 for answering true for every simple setter selector as an addition for the implementation I proposed earlier. Sorry I forgot the setters! For the purpose, I like to make much use of JsonObjects instead of first-class object instances in some scenarios, especially at the beginning of a project when it's an easy hack to mock not-yet implemented classes, or when communicating with a RESTful API. Thanks to dynamic forwarding (see JsonObject >> #doesNotUnderstand:), I can use these JsonObjects interchangeably (polymorphically) with first-class object instances. However, it is a common practice to check whether an object responds to a message before actually sending it, i.e. to determine its type or capabilities dynamically, which is done via #respondsTo:. To strengthen the interchangeability of JsonObject with first-class object instances, I'd like to send #respondsTo: to JsonObjects in order to find out whether it "has" a certain property, for instance: newOrder respondsTo: #deadline "Check whether the order is an order limited-in-time or whether not. newOrder might be a subinstance of the (abstract) class Order, or a JsonObject." For more context, see also this thread: http://forum.world.st/Should-you-override-doesNotUnderstand-and-respondsTo-together-td5110969.html So a better implementation of JsonObject >> #respondsTo: might be the following: respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [aSymbol isSimpleGetter and: [self includesKey: aSymbol]] or: [aSymbol isSimpleSetter] Provided that Json does not need to be compatible with older Squeak versions (the simple[GS]etter stuff is quite new). :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Montag, 9. November 2020 08:04:20 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 9 09:35:31 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 9 Nov 2020 09:35:31 +0000 Subject: [squeak-dev] Can we make computing the local variables in the debugger lazy? In-Reply-To: References: <9da5acf36e3b4c77bcf4af677adca40b@student.hpi.uni-potsdam.de> <,CAC20JE0xTSOJabnvOwLoDc6E1H+i_b8Y8G0buLVhDbOWSXZOkA@mail.gmail.com> , Message-ID: <0d6382d7a5e4469b80c243a88c23098e@student.hpi.uni-potsdam.de> Recently I noticed a debugger that was very slow in general because its receiver inspector was showing a text with thousands of characters. Unfortunately, I cannot reproduce it ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Montag, 9. November 2020 09:06:31 An: squeak-dev Betreff: Re: [squeak-dev] Can we make computing the local variables in the debugger lazy? Hi Eliot, hi Christoph. How is the current state of this issue? We did some recent improvements in the debugger. Yet, the styling of context variables can be still rather slow. Is it still noticeable? Best, Marcel Am 01.10.2020 23:14:48 schrieb Thiede, Christoph : Hi Eliot, you can have an inspector field's title be styled by sending "shouldStyleName: true" to it. The styling itself, then, is performed by the Inspector in #fieldList (or just browse the senders of #shouldStyleName), where the styler is invoked. Before styling the field list, the styler is configured in #aboutToStyle:requestor:/#updateStyler:requestor: where self doItContext is passed to the styler. So tl;dr: Styling is always applied late (after the field list is constructed), you cannot break it by caching the temp names earlier. :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Donnerstag, 1. Oktober 2020 20:33:08 An: The general-purpose Squeak developers list; Taeumel, Marcel Betreff: Re: [squeak-dev] Can we make computing the local variables in the debugger lazy? Hi Christoph, On Wed, Sep 30, 2020 at 2:27 AM Thiede, Christoph > wrote: Hi Eliot, > Can you point me to where in ContextInspector the emphasis for the temp vars is chosen? By convention, inspector fields are defined in the category "fields - streaming". So you are probably searching for ContextInspector >> #streamTemporaryVariablesOn: or ContextVariablesInspector >> #streamTemporaryVariablesOn:? I found this code; I don't see any text emphasis going on. Where is the code that turns temp variables red when they're out of scope? Marcel? Looking forward to your optimization! :-) Best, Christoph ________________________________ Von: Squeak-dev > im Auftrag von Eliot Miranda > Gesendet: Mittwoch, 30. September 2020 09:09:27 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Can we make computing the local variables in the debugger lazy? Hi Marcel, On Tue, Sep 29, 2020 at 1:07 AM Marcel Taeumel > wrote: Hi Eliot, hi all! I fixed the issue with Tools-mt.989. The logic was already there in #runUntil. Can you point me to where in ContextInspector the emphasis for the temp vars is chosen? I want to modify ContextInspector to cache the temp names for a given method because I believe this will speed up stepping a lot. However I couldn't find where the emphasis is applied so I'm worried that my cache may break something. If I can see where that is being done I have a better chance at avoiding breaking things. Best, Marcel Am 19.09.2020 23:00:33 schrieb Levente Uzonyi >: Hi Christoph, On Sat, 19 Sep 2020, Thiede, Christoph wrote: > > Hi Eliot, > > > very nice finding once again! I #timeProfile'd the menu button action and as I expected, the most expensive operation is the shout styling by the new inspectors, including the decompilation of every method: What was it exactly that you profiled? The screenshot shows that 76.9% was spent in #initializeVariablesFromContext, of which 52.5% of the time was spent in CompiledMethod(CompiledCode) >> #getSource. The rest of the tree is not visible, but these methods have nothing to do with parsing or styling, they initialize the parser and normally should take <1 ms. Also, why is the decompiler producing the source code? > > > [IMAGE] > > > First, when loading ShoutCore-ct.78 (Inbox), the speed doubles (but probably that's rather a problem with my sources file, see the thread about this commit). You may want to try compiling a VM where FilePlugin's CreateFile does not set the FILE_FLAG_SEQUENTIAL_SCAN flag, and see if it helps with file reading performance. Levente > > Second, we do not redraw the world while running to the selection, so we do not need to update the inspectors at all. I think we could split up #doStep into some #basicDoStep (which would perform the actual stepping logic) + > some #updateContextDuring: (which would update the stack list and the inspectors), then we would need to trigger the updates only once from #runToSelection:. > As an alternative, we could make this method a bit more complex but responsive by applying the same updating logic from #runUntil. > > What do you think? :-) > > Best, > Christoph > > _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ > Von: Squeak-dev im Auftrag von Eliot Miranda > Gesendet: Samstag, 19. September 2020 20:17:12 > An: The general-purpose Squeak developers list; Taeumel, Marcel > Betreff: [squeak-dev] Can we make computing the local variables in the debugger lazy? > Hi Marcel, > > can we try and reduce the frequency at which we compute the variables in the context inspector in the debugger? It is a noticeable performance hit. I really like the user interface, but the performance hit is making > debugging difficult. > > As an example use this: > > | samples sineTable sound | > "1 second of A below middle C (220Hz). 16000 / 220 is 72.72 recurring" > sineTable := SoundPlayer sineTable: 73. > sineTable doWithIndex: "And let's not deafen anyone..." > [:sample :index| sineTable at: index put: sample // 4]. > samples := SoundBuffer new: 16000. > 1 to: samples size by: sineTable size do: > [:i| samples replaceFrom: i to: (i + sineTable size - 1 min: 16000) with: sineTable startingAt: 1]. > 1 to: 146 do: > [:i| > samples at: i put: ((samples at: i) * i / 146) asInteger. > samples at: 16001 - i put: ((samples at: 16001 - i) * i / 146) asInteger]. > sound := SampledSound > samples: samples > samplingRate: 16000. > sound := MixedSound new > add: sound pan: 0.25; > add: sound pan: 0.75; > yourself. > sound computeSamplesForSeconds: sound duration > > > Open a workspace in e.g. a 64-bit image prior to Tools-mt.965 (I used an image containing Tools-mt.942). Debug the above in the workspace. Position the cursor at "sound computeSamplesForSeconds: sound duration" and do "run > to here". It is essentially instantaneous. > > Now do the same in a contemporary trunk image. It takes almost 6 seconds. > > I used to be able to click step as fast as I could and the system would keep up with me. Now I find that if I click too fast I can accumulate excess clicks and when I stp clicking the system will continue stepping and go too > far. > > I don't want to lose the feedback the new variables list gives us. But I do find the performance hit tedious. I wonder could we cache the list and only update it > - when Morphic updates, and > - when the context changes? > > > _,,,^..^,,,_ > best, Eliot > > -- _,,,^..^,,,_ best, Eliot -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonyg at leastfixedpoint.com Mon Nov 9 12:13:16 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Mon, 9 Nov 2020 13:13:16 +0100 Subject: [squeak-dev] Monticello bug: "copy" to other repository from version inspector Message-ID: <940bc949-7bea-4552-bf0e-87bb35e41376@leastfixedpoint.com> Hi all, I've just noticed the following bug, but I'm afraid I'm unsure how to fix it: - save a MC version. - on the MCVersionInspector that appears, select "Copy". - choose and accept another repository. I get the following walkback. When I use "Copy" from a *repository* inspector, all works as expected. Regards, Tony -=-=-=-=- 9 November 2020 1:11:22.590173 pm VM: unix - Smalltalk Image: Squeak6.0alpha [latest update: #20073] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/tonyg/src/squeak-gitweb Trusted Dir /home/tonyg/src/squeak-gitweb/secure Untrusted Dir /home/tonyg/src/squeak-gitweb/My Squeak MCVersionInspector(Object)>>doesNotUnderstand: #repository Receiver: a MCVersionInspector Arguments and temporary variables: aMessage: repository exception: MessageNotUnderstood: MCVersionInspector>>repository resumeValue: nil Receiver's instance variables: dependents: a DependentsArray(a PluggableSystemWindow>save Receiver: a MCVersionInspector Arguments and temporary variables: repository: a MCHttpRepository(https://www.squeaksource.com/Actors) Receiver's instance variables: dependents: a DependentsArray(a PluggableSystemWindow>doesNotUnderstand: #repository MCVersionInspector>>save PluggableButtonMorphPlus(PluggableButtonMorph)>>performAction PluggableButtonMorphPlus>>performAction [] in PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: Array(SequenceableCollection)>>do: PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: PluggableButtonMorphPlus(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: PluggableButtonMorphPlus(Morph)>>handleEvent: PluggableButtonMorphPlus(Morph)>>handleFocusEvent: MorphicEventDispatcher>>doHandlingForFocusEvent:with: MorphicEventDispatcher>>dispatchFocusEvent:with: PluggableButtonMorphPlus(Morph)>>processFocusEvent:using: PluggableButtonMorphPlus(Morph)>>processFocusEvent: [] in [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveEventVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class(DynamicVariable class)>>value:during: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in ActiveEventVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class>>value:during: MouseButtonEvent(MorphicEvent)>>becomeActiveDuring: [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveHandVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class(DynamicVariable class)>>value:during: [] in ActiveHandVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class>>value:during: HandMorph>>becomeActiveDuring: [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveWorldVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class(DynamicVariable class)>>value:during: [] in ActiveWorldVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class>>value:during: PasteUpMorph>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [] in [] in WorldState>>doOneCycleNowFor: [] in ActiveHandVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class(DynamicVariable class)>>value:during: [] in ActiveHandVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class>>value:during: HandMorph>>becomeActiveDuring: [] in WorldState>>doOneCycleNowFor: Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in MorphicProject>>spawnNewProcess [] in FullBlockClosure(BlockClosure)>>newProcess From tonyg at leastfixedpoint.com Mon Nov 9 12:37:59 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Mon, 9 Nov 2020 13:37:59 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> Message-ID: <9d11435d-a65e-5d6b-69b4-ddfaeaccc946@leastfixedpoint.com> On 11/7/20 3:54 PM, Jakob Reschke wrote: > Am Sa., 7. Nov. 2020 um 13:54 Uhr schrieb Thiede, Christoph > : >> Are there any objections or shall we integrate this change into Squeak-FileSystem? > > In my opinion, go ahead, but check and at least post the senders that > need to be changed, please. I don't see any senders (that need changing) at all in my current trunk-ish image. Are there external packages that need to be looked at or is it good enough to have trunk be OK for the change? Tony From tonyg at leastfixedpoint.com Mon Nov 9 13:01:29 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Mon, 9 Nov 2020 14:01:29 +0100 Subject: [squeak-dev] (1) Bug fixes, and (2) potential improvements to FileSystem-Git Message-ID: <3bbd8c67-5402-b1ca-0e80-0fc172457d83@leastfixedpoint.com> Hi Jakob, all, I have a few bug fixes and potential enhancements to FileSystem-Git ready, but I can't figure out how to add a new github:// repository to Monticello. I've made my own fork of Squot at the github end, and now I just need to add it to my image somehow... The fixes I have are: - repair GitReference class >> validateReferenceName: to follow the rules in the git docs - repair GitRepository >> collectTagsFromLooseRefs when the repo has tags including a '/' - remove restriction on GitTag's object field: tags can point at any git object, not just commits The potential enhancements I have are: - a GitTreeDiffBuilder class which digs into a bit more detail than the existing GitDiffCreator; namely, it classifies changes into: GitTreeDiffModeChangedItem GitTreeDiffNewItem GitTreeDiffRenamedItem GitTreeDiffSubmoduleChangedItem GitTreeDiffTypeChangedItem GitTreeDiffChangedItem GitTreeDiffDeletedItem - GitTaglikeObject >> contributor, which answers author for commits and tagger for tags - GitTaglikeObject >> messageSummary, which answers the first line of the commit message on the assumption that this contains a summary of the whole thing (a common convention) - GitTree >> followPath:, for digging into a tree when working in a git context and not a simulated-filesystem context - GitTreeEntry >> entryCode, answering something analogous to GitStorableObject class >> typeCode, but for tree entries I'd prefer to figure out how to contribute the changes using the in-image github workflow, but for reference, I've attached fileouts of the changes. Regards, Tony -------------- next part -------------- Object subclass: #GitTreeDiffBuilder instanceVariableNames: 'old new result path' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 15:49'! addEntry: item (result at: path asArray ifAbsentPut: [OrderedCollection new]) add: item! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 1/29/2020 10:06'! build self visitTreeOld: old new: new.! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 11/9/2020 12:18'! entriesByHash: tree | d | d := Dictionary new. tree entries valuesDo: [:v | d at: v entryHash put: v]. ^ d! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 1/29/2020 10:27'! initializeOld: oldTree new: newTree old := oldTree. new := newTree. result := Dictionary new. path := OrderedCollection new.! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 1/29/2020 12:06'! result ^ result! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 11/9/2020 12:20'! visitOld: oldItem new: newItem | oldType newType | oldType := oldItem object typeCode. newType := newItem object typeCode. oldType = newType ifFalse: [ ^ self addEntry: (GitTreeDiffTypeChangedItem new oldItem: oldItem; newItem: newItem; yourself)]. oldItem mode = newItem mode ifFalse: [ self addEntry: (GitTreeDiffModeChangedItem new oldItem: oldItem; newItem: newItem; yourself)]. oldItem entryHash = newItem entryHash ifFalse: [ oldType = 'tree' ifTrue: [^ self visitTreeOld: oldItem object new: newItem object]. oldType = 'blob' ifTrue: [^ self addEntry: (GitTreeDiffChangedItem new oldItem: oldItem; newItem: newItem; yourself)]. oldType = 'commit' ifTrue: [^ self addEntry: (GitTreeDiffSubmoduleChangedItem new oldItem: oldItem; newItem: newItem; yourself)]. self error: 'Unsupported item type ', oldType]! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 11/9/2020 12:20'! visitTreeOld: o new: n | oldKeys newKeys oldNameMap newNameMap moved | oldKeys := o entries keys asSet. newKeys := n entries keys asSet. moved := Set new. oldNameMap := self entriesByHash: o. newNameMap := self entriesByHash: n. (oldNameMap keys intersection: newNameMap keys) do: [:nm | | oi ni | oi := oldNameMap at: nm. ni := newNameMap at: nm. oi entryName = ni entryName ifFalse: [ moved add: nm. self withPath: oi fileName do: [ self addEntry: (GitTreeDiffRenamedItem new oldItem: oi; newItem: ni; yourself)]]]. (oldKeys difference: newKeys) do: [:k | | e | e := o entries at: k. (moved includes: e objectName) ifFalse: [ self withPath: k do: [ self addEntry: (GitTreeDiffDeletedItem new item: e)]]]. (newKeys difference: oldKeys) do: [:k | | e | e := n entries at: k. (moved includes: e objectName) ifFalse: [ self withPath: k do: [ self addEntry: (GitTreeDiffNewItem new item: e)]]]. (oldKeys intersection: newKeys) do: [:k | | oi ni | oi := o entries at: k. ni := n entries at: k. oi = ni ifFalse: [self withPath: k do: [self visitOld: oi new: ni]]].! ! !GitTreeDiffBuilder methodsFor: 'as yet unclassified' stamp: 'tonyg 1/29/2020 10:28'! withPath: edgeLabel do: aBlock | v | path add: edgeLabel. v := aBlock value. path removeLast. ^ v! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! GitTreeDiffBuilder class instanceVariableNames: ''! !GitTreeDiffBuilder class methodsFor: 'as yet unclassified' stamp: 'tonyg 11/9/2020 12:12'! diffTrees: oldTree and: newTree ^ (self new initializeOld: oldTree new: newTree) build; result! ! Object subclass: #GitTreeDiffEntry instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffEntry methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:23'! accept: aVisitor self subclassResponsibility! ! !GitTreeDiffEntry methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:45'! primaryItem self subclassResponsibility! ! GitTreeDiffEntry subclass: #GitTreeDiffChangedItem instanceVariableNames: 'oldItem newItem diff' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:24'! accept: aVisitor ^ aVisitor visitTreeDiffChangedItem: self! ! !GitTreeDiffChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:45'! primaryItem ^ self newItem! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 11/9/2020 12:22'! computeDiff ^ [TextDiffBuilder from: oldItem object bytes utf8Decoded to: newItem object bytes utf8Decoded] on: InvalidUTF8 do: [:ex | nil] ! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:19'! diff diff ifNil: [diff := self computeDiff]. ^ diff! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:09'! newItem ^ newItem! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:09'! newItem: anObject newItem := anObject.! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:09'! oldItem ^ oldItem! ! !GitTreeDiffChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:09'! oldItem: anObject oldItem := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffDeletedItem instanceVariableNames: 'item' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffDeletedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:24'! accept: aVisitor ^ aVisitor visitTreeDiffDeletedItem: self! ! !GitTreeDiffDeletedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:46'! primaryItem ^ self item! ! !GitTreeDiffDeletedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:08'! item ^ item! ! !GitTreeDiffDeletedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:08'! item: anObject item := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffModeChangedItem instanceVariableNames: 'oldItem newItem' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffModeChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:25'! accept: aVisitor ^ aVisitor visitTreeDiffModeChangedItem: self! ! !GitTreeDiffModeChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:46'! primaryItem ^ self newItem! ! !GitTreeDiffModeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem ^ newItem! ! !GitTreeDiffModeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem: anObject newItem := anObject.! ! !GitTreeDiffModeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem ^ oldItem! ! !GitTreeDiffModeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem: anObject oldItem := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffNewItem instanceVariableNames: 'item' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffNewItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:25'! accept: aVisitor ^ aVisitor visitTreeDiffNewItem: self! ! !GitTreeDiffNewItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:46'! primaryItem ^ self item! ! !GitTreeDiffNewItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:08'! item ^ item! ! !GitTreeDiffNewItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:08'! item: anObject item := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffRenamedItem instanceVariableNames: 'oldItem newItem' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffRenamedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:25'! accept: aVisitor ^ aVisitor visitTreeDiffRenamedItem: self! ! !GitTreeDiffRenamedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:46'! primaryItem ^ self newItem! ! !GitTreeDiffRenamedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem ^ newItem! ! !GitTreeDiffRenamedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem: anObject newItem := anObject.! ! !GitTreeDiffRenamedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem ^ oldItem! ! !GitTreeDiffRenamedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem: anObject oldItem := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffSubmoduleChangedItem instanceVariableNames: 'oldItem newItem' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffSubmoduleChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/12/2020 12:00'! accept: aVisitor ^ aVisitor visitTreeDiffSubmoduleChangedItem: self! ! !GitTreeDiffSubmoduleChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/12/2020 12:00'! primaryItem ^ newItem! ! !GitTreeDiffSubmoduleChangedItem methodsFor: 'accessing' stamp: 'tonyg 2/12/2020 12:00'! newItem ^ newItem! ! !GitTreeDiffSubmoduleChangedItem methodsFor: 'accessing' stamp: 'tonyg 2/12/2020 12:00'! newItem: anObject newItem := anObject.! ! !GitTreeDiffSubmoduleChangedItem methodsFor: 'accessing' stamp: 'tonyg 2/12/2020 12:00'! oldItem ^ oldItem! ! !GitTreeDiffSubmoduleChangedItem methodsFor: 'accessing' stamp: 'tonyg 2/12/2020 12:00'! oldItem: anObject oldItem := anObject.! ! GitTreeDiffEntry subclass: #GitTreeDiffTypeChangedItem instanceVariableNames: 'oldItem newItem' classVariableNames: '' poolDictionaries: '' category: 'GitTreeDiff'! !GitTreeDiffTypeChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:25'! accept: aVisitor ^ aVisitor visitTreeDiffTypeChangedItem: self! ! !GitTreeDiffTypeChangedItem methodsFor: 'as yet unclassified' stamp: 'tonyg 2/11/2020 14:46'! primaryItem ^ self newItem! ! !GitTreeDiffTypeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem ^ newItem! ! !GitTreeDiffTypeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! newItem: anObject newItem := anObject.! ! !GitTreeDiffTypeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem ^ oldItem! ! !GitTreeDiffTypeChangedItem methodsFor: 'accessing' stamp: 'tonyg 1/29/2020 10:46'! oldItem: anObject oldItem := anObject.! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:54:46 pm'! !GitTaglikeObject methodsFor: '*GitWeb-accessing' stamp: 'tonyg 11/9/2020 12:38'! contributor self subclassResponsibility! ! !GitCommit methodsFor: '*GitWeb-accessing' stamp: 'tonyg 11/9/2020 12:38'! contributor ^ self author! ! !GitTag methodsFor: '*GitWeb-accessing' stamp: 'tonyg 11/9/2020 12:38'! contributor ^ self tagger! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:51:37 pm'! !GitTag commentStamp: 'tonyg 11/8/2020 22:20' prior: 0! I have the responsibility of associating a human readable tag (a string) with another object ("usually a commit", according to the git-tag manpage); e.g. 'version 0.5' -> '2341f8c0615bbcc465ac4686025e880786430697'. Since I am a full tag and can hold additional information, the tag ref points to my object name and I in turn point to the tagged object. Full tags have the advantage of knowing the tagger (and the date of tagging) and can hold a message (e.g. a PGP signature). I incorporate both possibilities. Instance Variables: message (inherited) arbitrary message (e.g. comment or PGP signature) tagger Who created the tag. object The object referenced by the tag name. name The human readable tag (or tag name) that describes the referenced object.! !GitTag methodsFor: 'public-accessing' stamp: 'tonyg 11/8/2020 22:21'! asCommit ^ self object asCommit! ! !GitTag methodsFor: 'public-accessing' stamp: 'tonyg 11/8/2020 22:22'! object: aGitStorableObject object := aGitStorableObject! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:54:50 pm'! !GitTree methodsFor: '*GitWeb-accessing' stamp: 'tonyg 11/9/2020 10:06'! followPath: aCollectionOfStrings | object | object := self. [aCollectionOfStrings do: [:n | object typeCode = 'tree' ifTrue: [object := object at: n]]] on: KeyNotFound do: [:ex | ^nil]. ^ object! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:54:49 pm'! !GitTaglikeObject methodsFor: '*GitWeb-accessing' stamp: 'tonyg 11/9/2020 09:33'! messageSummary "On the assumption that the first line of the message is the summary:" message linesDo: [:line | line ifNotEmpty: [^line]]. ^ ''! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:51:42 pm'! !GitTreeEntry methodsFor: 'public-accessing' stamp: 'tonyg 11/9/2020 10:40'! entryCode ^ mode caseOf: { [#dirMode] -> ['tree']. [#fileMode] -> ['blob']. [#executableFileMode] -> ['blob']. [#symlinkMode] -> ['symlink']. [#submoduleMode] -> ['submodule']. } otherwise: [self error: 'Unknown mode: ', mode]! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:51:28 pm'! !GitRepository methodsFor: 'private' stamp: 'tonyg 11/7/2020 22:37'! collectTagsFromLooseRefs | tags tagsDir | self privateDeprecatedUseUnitOfWork. tags := Dictionary new. tagsDir := self tagsDir. tagsDir allFiles do: [ :ref | ref readStreamDo: [ :stream | tags at: (ref relativeTo: tagsDir) asReference asString put: (self objectNamed: (stream next: 40) asString) ] ]. ^ tags! ! -------------- next part -------------- 'From Squeak6.0alpha of 9 November 2020 [latest update: #20073] on 9 November 2020 at 1:50:51 pm'! !GitReference class methodsFor: 'instance creation' stamp: 'tonyg 11/8/2020 21:36'! validateReferenceName: aName "See https://git-scm.com/docs/git-check-ref-format, which includes 10 rules for refnames." | tokens illegalCharacters | "Rules 4, 5 and 10, but does not enforce the subrule about control characters in rule 4" illegalCharacters := '[?~^\*: '. (aName includesAnyOf: illegalCharacters) ifTrue: [ GitInvalidReferenceName signal: 'A reference name can not include whitespace or any of the following characters: ' , illegalCharacters.]. "Not explicitly numbered, but implicit in rule 2" aName isEmpty ifTrue: [GitInvalidReferenceName signal: 'A reference name can not be empty']. "Rule 3" (aName includesSubstring: '..') ifTrue: [GitInvalidReferenceName signal: 'A reference name can not include the string ''..''']. "Rule 8" (aName includesSubstring: '@{') ifTrue: [GitInvalidReferenceName signal: 'A reference name can not include the string ''@{''']. "Rule 6" (aName includesSubstring: '//') ifTrue: [GitInvalidReferenceName signal: 'A reference name can not include two consecutive slashes']. (aName first = $/ or: [aName last = $/]) ifTrue: [GitInvalidReferenceName signal: 'A reference name can not start or end with a slash']. "Rule 9" (aName = '@') ifTrue: [GitInvalidReferenceName signal: '''@'' is not a valid reference name']. "Rule 1" tokens := aName findTokens: '/'. (tokens anySatisfy: [:t | (t first = $.) or: [t endsWith: '.lock']]) ifTrue: [ GitInvalidReferenceName signal: 'A reference component can not start with a dot or end with .lock'].! ! From leves at caesar.elte.hu Mon Nov 9 14:17:03 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon, 9 Nov 2020 15:17:03 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: Hi Marcel, On Mon, 9 Nov 2020, Marcel Taeumel wrote: > Hi Levente. > Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. In that case JsonObject >> #respondsTo: should return true for all unary and one-argument keyword selectors. But I doubt that's what Christoph would like to have. Levente > > I did not know about #dictionaryClass:. That's a powerful hook. > > Best, > Marcel > > Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : > > Hi Christoph, > > On Sun, 8 Nov 2020, Christoph Thiede wrote: > > > Hi Levente, > > > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > > great because I depend on this functionality in another project and > > currently require your JSON fork in my baseline. :-) > > I cannot merge it because that would bring back long removed methods, and > MC wouldn't allow me to reject those. > But I can add the changes manually. > If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. > > What is the purpose of that method? > I'm asking because it has got no comment, so I'm not sure its > implementation is correct. > For example, should > > JsonObject new respondsTo: #foo: > > return false? > What should the following return? > > JsonObject new > foo: 1; > respondsTo: #foo: > > Another question is whether it is generally useful or not? > If it's not, you can still have the desired behavior by creating a > subclass. E.g.: > > JsonObject subclass: #PseudoObject > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'PseudoObject' > > > PseudoObject >> respondsTo: aSymbol > > ^ (super respondsTo: aSymbol) > or: [self includesKey: aSymbol] > > > (Json new > dictionaryClass: PseudoObject; > readFrom: '{"foo": 42}' readStream) > respondsTo: #foo > "==> true" > > > Levente > > > > > Best, > > Christoph > > > > > > > > -- > > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > > > From bruce.oneel at pckswarms.ch Mon Nov 9 14:34:39 2020 From: bruce.oneel at pckswarms.ch (Bruce O'Neel) Date: Mon, 09 Nov 2020 15:34:39 +0100 Subject: [squeak-dev] Current state of the Arm 64 cog vm Message-ID: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> Hi, What's the current state of the ARM 64 cog VM?  Does it build?  If not, what magic is needed... Thanks. bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonyg at leastfixedpoint.com Mon Nov 9 14:46:23 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Mon, 9 Nov 2020 15:46:23 +0100 Subject: [squeak-dev] Diffs "upside-down" Message-ID: Does it bother anyone else that Squeak prints diffs +this line was added -this line was removed while Unix-derived tools (including those influenced by Unix, like Github) print -this line was removed +this line was added ? For a project of mine I added the following to rearrange things more conventionally: diff: diff doIfMatch: matchBlock ifInsert: insertBlock ifRemove: removeBlock "Like TextDiffBuilder >> patchSequenceDoIfMatch:ifInsert:ifRemove:, but with insertions/removals in the other order (matching what lots of Unix-heritage diff-generation tools do)." | pending flush | pending := OrderedCollection new. flush := [ pending do: insertBlock. pending removeAll]. diff patchSequenceDoIfMatch: [:line | flush value. matchBlock value: line] ifInsert: [:line | pending add: line] ifRemove: removeBlock. flush value. ... where `diff` is an instance of TextDiffBuilder. Tony From tonyg at leastfixedpoint.com Mon Nov 9 14:47:28 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Mon, 9 Nov 2020 15:47:28 +0100 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> References: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> Message-ID: <2e8c1c58-d5bc-20a0-5342-1fb59643d938@leastfixedpoint.com> On 11/9/20 3:34 PM, Bruce O'Neel wrote: > What's the current state of the ARM 64 cog VM?  Does it build?  If not, > what magic is needed... I can report successful builds on an Alpine-Linux musl platform as of a couple of weeks back, so if nothing major has thrown a spanner in the works since then, you should be good to go. Tony From Das.Linux at gmx.de Mon Nov 9 14:59:52 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 9 Nov 2020 15:59:52 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: Message-ID: > On 9. Nov 2020, at 15:46, Tony Garnock-Jones wrote: > > Does it bother anyone else that Squeak prints diffs > > +this line was added > -this line was removed > > while Unix-derived tools (including those influenced by Unix, like > Github) print > > -this line was removed > +this line was added > > ? D'oh! That explains my constant confusion! -t From builds at travis-ci.org Mon Nov 9 15:36:31 2020 From: builds at travis-ci.org (Travis CI) Date: Mon, 09 Nov 2020 15:36:31 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1887 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fa961feebd97_13fc3f8f942cc10995d@travis-tasks-7695898ffc-gkrq9.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1887 Status: Errored Duration: 18 mins and 23 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/742466582?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Mon Nov 9 15:48:17 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 9 Nov 2020 10:48:17 -0500 Subject: [squeak-dev] DirectoryEntryFile>>modificationTime (etc) UTC handling broken In-Reply-To: References: <32397690-55D1-4AE0-A3EC-3F8C15B5D803@rowledge.org> <20201109005712.GA72424@shell.msen.com> <812CEC53-47E3-4997-A963-F7E89D3423CB@rowledge.org> Message-ID: <20201109154817.GA29947@shell.msen.com> On Sun, Nov 08, 2020 at 10:42:16PM -0800, Eliot Miranda wrote: > > OK, it's done in the latest VM sources. Make a new VM, set the image > header flag via e.g. > > Smalltalk vmParameterAt: 48 put: ((Smalltalk vmParameterAt: 48) bitOr: > 128) > > and now times from both the FilePlugin and the FileAttributesPlugin are in > UTC seconds from the epoch. > > Backwards compatibility is maintained. Images without the bit set will get > local times from the File plugins. Rum the image on an older VM and times > will always be local, but the flag bit should be preserved, so is can be > saved on an older VM, but when run on the newer, if the flag was set, times > should be delivered in UTC. > > _,,,^..^,,,_ > best, Eliot Cool! Dave From eliot.miranda at gmail.com Mon Nov 9 16:22:04 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 9 Nov 2020 08:22:04 -0800 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> References: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> Message-ID: Hi Bruce, > On Nov 9, 2020, at 6:35 AM, Bruce O'Neel wrote: > >  > Hi, > > What's the current state of the ARM 64 cog VM? Does it build? If not, what magic is needed... The Linux build.linux64ARMv8/squeak.cog.spur VM , using a dual-mapped code zone so far works on all 64-bit Linux distros people have tried. The Apple Silicon port is “in preparation”; I have a developer beta machine, actually a second that I’m trying to setup after an unsuccessful OS upgrade borked the previous one. The build.macos64ARMv8/squeak.cog.spur VM builds, but because lldb doesn’t yet launch the program I haven’t sorted out the mapping for the code zone there-on, which uses a different scheme because of Apple’s non-standard MAP_JIT map scheme for dynamically generated code. But it should only be a few days of engineering effort away, effort they may take many weeks to complete, given pressure of work. And the squeak.stack.spur interpreter works on both Linux and MacOS. > > Thanks. > > bruce > From eric.gade at gmail.com Mon Nov 9 16:24:22 2020 From: eric.gade at gmail.com (Eric Gade) Date: Mon, 9 Nov 2020 11:24:22 -0500 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: References: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> Message-ID: Hello all, What are the "canonical" instructions for building the ARM64 linux VM (regardless of distro)? -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 9 16:29:01 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 9 Nov 2020 16:29:01 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> , Message-ID: > But I doubt that's what Christoph would like to have. That is right, I was assuming some kind of late-binding prototypical object model. For instance, a similar model seems to be used for JavaScript objects: > x = {} {} > x.foo undefined > x.hasOwnProperty('foo') false > x.foo = 42 42 > x.foo 42 > x.hasOwnProperty('foo') true However, I see your concerns, Levente ... My proposal would violate the contract "if and only if #respondsTo: returns true, sending the message will not cause a MNU", if there was any contract like. But do we need logical equivalency for such a contract or would simple causality ("if #respondsTo: returns true, then sending the message will not cause a MNU") suffice? Hm ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Levente Uzonyi Gesendet: Montag, 9. November 2020 15:17 Uhr An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi Marcel, On Mon, 9 Nov 2020, Marcel Taeumel wrote: > Hi Levente. > Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. In that case JsonObject >> #respondsTo: should return true for all unary and one-argument keyword selectors. But I doubt that's what Christoph would like to have. Levente > > I did not know about #dictionaryClass:. That's a powerful hook. > > Best, > Marcel > > Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : > > Hi Christoph, > > On Sun, 8 Nov 2020, Christoph Thiede wrote: > > > Hi Levente, > > > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > > great because I depend on this functionality in another project and > > currently require your JSON fork in my baseline. :-) > > I cannot merge it because that would bring back long removed methods, and > MC wouldn't allow me to reject those. > But I can add the changes manually. > If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. > > What is the purpose of that method? > I'm asking because it has got no comment, so I'm not sure its > implementation is correct. > For example, should > > JsonObject new respondsTo: #foo: > > return false? > What should the following return? > > JsonObject new > foo: 1; > respondsTo: #foo: > > Another question is whether it is generally useful or not? > If it's not, you can still have the desired behavior by creating a > subclass. E.g.: > > JsonObject subclass: #PseudoObject > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'PseudoObject' > > > PseudoObject >> respondsTo: aSymbol > > ^ (super respondsTo: aSymbol) > or: [self includesKey: aSymbol] > > > (Json new > dictionaryClass: PseudoObject; > readFrom: '{"foo": 42}' readStream) > respondsTo: #foo > "==> true" > > > Levente > > > > > Best, > > Christoph > > > > > > > > -- > > Sent from: http://forum.world.st/Squeak-Dev-f45488.html Smalltalk - Squeak - Dev | Mailing List Archive forum.world.st Squeak - Dev forum and mailing list archive. The general-purpose Squeak developers list > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 9 16:32:24 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 9 Nov 2020 16:32:24 +0000 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: , Message-ID: <16f3ef6e964642859ca2061868d8cf85@student.hpi.uni-potsdam.de> Well, personally I have always been used the "+ before -" way, so if you change it, I'll need to adapt. :P One *could* also argue that the new additions are more relevant than the old removals, so they should appear first in an email or anywhere else. But, it might be a very subjective question ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Montag, 9. November 2020 15:59:52 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Diffs "upside-down" > On 9. Nov 2020, at 15:46, Tony Garnock-Jones wrote: > > Does it bother anyone else that Squeak prints diffs > > +this line was added > -this line was removed > > while Unix-derived tools (including those influenced by Unix, like > Github) print > > -this line was removed > +this line was added > > ? D'oh! That explains my constant confusion! -t -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Mon Nov 9 16:35:28 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 9 Nov 2020 08:35:28 -0800 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: References: Message-ID: <790F2961-83C5-4F43-AA5B-390CC2BAACED@gmail.com> > On Nov 9, 2020, at 8:24 AM, Eric Gade wrote: > > Hello all, > > What are the "canonical" instructions for building the ARM64 linux VM (regardless of distro)? build.linux64ARMv8/HowToBuild Eliot _,,,^..^,,,_ (phone) From eliot.miranda at gmail.com Mon Nov 9 16:40:06 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 9 Nov 2020 08:40:06 -0800 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: References: Message-ID: <3B092B8B-C106-4057-A45D-58377F8FAD9F@gmail.com> _,,,^..^,,,_ (phone) > On Nov 9, 2020, at 8:24 AM, Eric Gade wrote: > >  > Hello all, > > What are the "canonical" instructions for building the ARM64 linux VM (regardless of distro)? More completely git clone https://github.com/OpenSmalltalk/opensmalltalk-vm build.linux64ARMv8/HowToBuild There are a handful of convenience shell scripts in build.linux64ARMv8/ and build.linux64ARMv8/{squeak.cog.spur,squeak.stack.spur} that automate things. _,,,^..^,,,_ (phone) > > > -- > Eric > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at rowledge.org Mon Nov 9 17:44:34 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 9 Nov 2020 09:44:34 -0800 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> Message-ID: <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> > On 2020-11-09, at 12:01 AM, Marcel Taeumel wrote: > > Hi Christoph. > > > I wonder whether we should turn off drop shadows during grabbing a morph? Honestly, I'd vote for dumping drop shadows entirely. It's an old, tired, neo-skeuomorphic approach that lingers on from the old days of pretending that some sort of photorealistic model of a messy desk would magically make everyone's lives organised. It's dead Jim. Let's not render the corpse in 4k quality. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim The next generation of computers will have a "Warranty Expired" interrupt. From tim at rowledge.org Mon Nov 9 17:49:48 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 9 Nov 2020 09:49:48 -0800 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: Message-ID: > On 2020-11-09, at 6:46 AM, Tony Garnock-Jones wrote: > > Does it bother anyone else that Squeak prints diffs > > +this line was added > -this line was removed > > while Unix-derived tools (including those influenced by Unix, like > Github) print > > -this line was removed > +this line was added Yup; it horrifies me that the unix tools get it wrong :-| tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MC: Melt down Core From Das.Linux at gmx.de Mon Nov 9 18:25:15 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 9 Nov 2020 19:25:15 +0100 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> Message-ID: > On 9. Nov 2020, at 18:44, tim Rowledge wrote: > > > >> On 2020-11-09, at 12:01 AM, Marcel Taeumel wrote: >> >> Hi Christoph. >> >>> I wonder whether we should turn off drop shadows during grabbing a morph? > > Honestly, I'd vote for dumping drop shadows entirely. It's an old, tired, neo-skeuomorphic approach that lingers on from the old days of pretending that some sort of photorealistic model of a messy desk would magically make everyone's lives organised. > > It's dead Jim. Let's not render the corpse in 4k quality. In macOS, no windows have borders. Without drop shadows there's no way to discern them. The shadow is now the border. -t From tim at rowledge.org Mon Nov 9 18:52:39 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 9 Nov 2020 10:52:39 -0800 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> Message-ID: <91DA7DEF-CA8A-4B5B-9FAB-DA83273FEB20@rowledge.org> > On 2020-11-09, at 10:25 AM, Tobias Pape wrote: > > In macOS, no windows have borders. Without drop shadows there's no way to discern them. > The shadow is now the border. Hmm, not seeing this on my current iMac setup. I don't have the very latest Mac OS installed (I'm still on Mojave), so maybe this is a recent change? Either way, just because Apple does something that doesn't mean I agree with it. But they stopped listening to me a long time ago. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Fac ut vivas. = Get a life. From Das.Linux at gmx.de Mon Nov 9 18:58:21 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 9 Nov 2020 19:58:21 +0100 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <91DA7DEF-CA8A-4B5B-9FAB-DA83273FEB20@rowledge.org> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> <91DA7DEF-CA8A-4B5B-9FAB-DA83273FEB20@rowledge.org> Message-ID: <7299616D-0A9F-4240-86A0-2772907AFEC5@gmx.de> > On 9. Nov 2020, at 19:52, tim Rowledge wrote: > > > >> On 2020-11-09, at 10:25 AM, Tobias Pape wrote: >> >> In macOS, no windows have borders. Without drop shadows there's no way to discern them. >> The shadow is now the border. > > Hmm, not seeing this on my current iMac setup. I don't have the very latest Mac OS installed (I'm still on Mojave), so maybe this is a recent change? > > Either way, just because Apple does something that doesn't mean I agree with it. But they stopped listening to me a long time ago. One used to be able to disable drop shadows on macOS < 10.12 with kCGSDebugOptionNoShadows If this was enabled, one could see that there are, in fact, no borders. The shadows beget the borders. However that does no longer work with SIP enabled. The neat thing is you no longer have to deal with borders if you do it that way and you get aaaall the screen real estate for full-size/full-screen windows without any extra handling (as there are naturally no shadows for windows that touch the border of the screen). The less fun thing is when shadows bleed into other screens in multi-screen setups. there we are. Where we go? -t From tim at rowledge.org Mon Nov 9 19:12:36 2020 From: tim at rowledge.org (tim Rowledge) Date: Mon, 9 Nov 2020 11:12:36 -0800 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <7299616D-0A9F-4240-86A0-2772907AFEC5@gmx.de> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> <91DA7DEF-CA8A-4B5B-9FAB-DA83273FEB20@rowledge.org> <7299616D-0A9F-4240-86A0-2772907AFEC5@gmx.de> Message-ID: <7A248407-4899-487B-BD68-70A9AC2DBA57@rowledge.org> I'm evidently getting confused here. On my Mojave iMac I certainly see the fairly small and faint shadows (plus the slightly heavier one fro man active window) but there are also most definite visual borders on all the windows - thin, probably single pixel, but definitely there, all the way around the window. Are you saying that the handling of the window resizing drag-handle things is tied to the shadow visual? That looks like it might be the case. I suppose that there is an argument for some visual clue for the active window (if indeed you have that concept, which not all GUIs do) but I'd choose something other than a faint shadow. Where do we go? Dunno. I've made my suggestion that the way to simplify drop shadows in Squeak is simply not to have them. Nobody is forced to agree with me, at least, not before my Total Mind Control Satellite is launched. tim -- tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim "E=Mc^5...nahhh...E=Mc^4...nahh...E=Mc^3...ah, the hell with it." From Das.Linux at gmx.de Mon Nov 9 19:20:16 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 9 Nov 2020 20:20:16 +0100 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <7A248407-4899-487B-BD68-70A9AC2DBA57@rowledge.org> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <268380FF-D3C4-45E2-87C0-526484E659E2@rowledge.org> <91DA7DEF-CA8A-4B5B-9FAB-DA83273FEB20@rowledge.org> <7299616D-0A9F-4240-86A0-2772907AFEC5@gmx.de> <7A248407-4899-487B-BD68-70A9AC2DBA57@rowledge.org> Message-ID: > On 9. Nov 2020, at 20:12, tim Rowledge wrote: > > I'm evidently getting confused here. On my Mojave iMac I certainly see the fairly small and faint shadows (plus the slightly heavier one fro man active window) but there are also most definite visual borders on all the windows - thin, probably single pixel, but definitely there, all the way around the window. Hmm, then the debug-shadow-be-gone maybe also kill the single pixle border? maybe… > > Are you saying that the handling of the window resizing drag-handle things is tied to the shadow visual? no, to the cutoff and a a tiny area around it. > That looks like it might be the case. I suppose that there is an argument for some visual clue for the active window (if indeed you have that concept, which not all GUIs do) but I'd choose something other than a faint shadow. > > Where do we go? Dunno. I've made my suggestion that the way to simplify drop shadows in Squeak is simply not to have them. Nobody is forced to agree with me, at least, not before my Total Mind Control Satellite is launched. Lol. yeah, it was merely a statement of undecidedness on my part… Best regards -tobias From eliot.miranda at gmail.com Mon Nov 9 20:07:47 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 9 Nov 2020 12:07:47 -0800 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: > Hi Levente. > > Sounds right. If an object can answer to some extra messages via > #doesNotUnderstand:, one should also override #respondsTo:. It is like #= > and #hash. > And canUnderstand: ? Or is that being too picky? > I did not know about #dictionaryClass:. That's a powerful hook. > > Best, > Marcel > > Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : > Hi Christoph, > > On Sun, 8 Nov 2020, Christoph Thiede wrote: > > > Hi Levente, > > > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > > great because I depend on this functionality in another project and > > currently require your JSON fork in my baseline. :-) > > I cannot merge it because that would bring back long removed methods, and > MC wouldn't allow me to reject those. > But I can add the changes manually. > If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. > > What is the purpose of that method? > I'm asking because it has got no comment, so I'm not sure its > implementation is correct. > For example, should > > JsonObject new respondsTo: #foo: > > return false? > What should the following return? > > JsonObject new > foo: 1; > respondsTo: #foo: > > Another question is whether it is generally useful or not? > If it's not, you can still have the desired behavior by creating a > subclass. E.g.: > > JsonObject subclass: #PseudoObject > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'PseudoObject' > > > PseudoObject >> respondsTo: aSymbol > > ^ (super respondsTo: aSymbol) > or: [self includesKey: aSymbol] > > > (Json new > dictionaryClass: PseudoObject; > readFrom: '{"foo": 42}' readStream) > respondsTo: #foo > "==> true" > > > Levente > > > > > Best, > > Christoph > > > > > > > > -- > > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Mon Nov 9 20:14:25 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon, 9 Nov 2020 12:14:25 -0800 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: On Mon, Nov 9, 2020 at 8:29 AM Thiede, Christoph < Christoph.Thiede at student.hpi.uni-potsdam.de> wrote: > > But I doubt that's what Christoph would like to have. > > > That is right, I was assuming some kind of late-binding prototypical > object model. > > > For instance, a similar model seems to be used for JavaScript objects: > > > > x = {} > {} > > x.foo > undefined > > x.hasOwnProperty('foo') > false > > x.foo = 42 > 42 > > x.foo > 42 > > x.hasOwnProperty('foo') > true > > > However, I see your concerns, Levente ... My proposal would violate the > contract "if and only if #respondsTo: returns true, sending the message > will not cause a MNU", if there was any contract like. But do we need > logical equivalency for such a contract or would simple causality ("if #respondsTo: > returns true, then sending the message will not cause a MNU") suffice? Hm > ... > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? > Best, > > Christoph > > ------------------------------ > *Von:* Squeak-dev im > Auftrag von Levente Uzonyi > *Gesendet:* Montag, 9. November 2020 15:17 Uhr > *An:* The general-purpose Squeak developers list > *Betreff:* Re: [squeak-dev] I'd like to contribute to the JSON project > > Hi Marcel, > > On Mon, 9 Nov 2020, Marcel Taeumel wrote: > > > Hi Levente. > > Sounds right. If an object can answer to some extra messages via > #doesNotUnderstand:, one should also override #respondsTo:. It is like #= > and #hash. > > In that case JsonObject >> #respondsTo: should return true for all unary > and one-argument keyword selectors. But I doubt that's what Christoph > would like to have. > > > Levente > > > > > I did not know about #dictionaryClass:. That's a powerful hook. > > > > Best, > > Marcel > > > > Am 09.11.2020 03:07:54 schrieb Levente Uzonyi < > leves at caesar.elte.hu>: > > > > Hi Christoph, > > > > On Sun, 8 Nov 2020, Christoph Thiede wrote: > > > > > Hi Levente, > > > > > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This > would be > > > great because I depend on this functionality in another project > and > > > currently require your JSON fork in my baseline. :-) > > > > I cannot merge it because that would bring back long removed > methods, and > > MC wouldn't allow me to reject those. > > But I can add the changes manually. > > If I'm not mistaken, it's just a single method JsonObject >> > #respondsTo:. > > > > What is the purpose of that method? > > I'm asking because it has got no comment, so I'm not sure its > > implementation is correct. > > For example, should > > > > JsonObject new respondsTo: #foo: > > > > return false? > > What should the following return? > > > > JsonObject new > > foo: 1; > > respondsTo: #foo: > > > > Another question is whether it is generally useful or not? > > If it's not, you can still have the desired behavior by creating a > > subclass. E.g.: > > > > JsonObject subclass: #PseudoObject > > instanceVariableNames: '' > > classVariableNames: '' > > poolDictionaries: '' > > category: 'PseudoObject' > > > > > > PseudoObject >> respondsTo: aSymbol > > > > ^ (super respondsTo: aSymbol) > > or: [self includesKey: aSymbol] > > > > > > (Json new > > dictionaryClass: PseudoObject; > > readFrom: '{"foo": 42}' readStream) > > respondsTo: #foo > > "==> true" > > > > > > Levente > > > > > > > > Best, > > > Christoph > > > > > > > > > > > > -- > > > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > Smalltalk - Squeak - Dev | Mailing List Archive > > forum.world.st > Squeak - Dev forum and mailing list archive. The general-purpose Squeak > developers list > > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From vanessa at codefrau.net Tue Nov 10 04:58:53 2020 From: vanessa at codefrau.net (Vanessa Freudenberg) Date: Mon, 9 Nov 2020 20:58:53 -0800 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: Message-ID: On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones wrote: > Does it bother anyone else that Squeak prints diffs > > +this line was added > -this line was removed > Yes, bothers me greatly. Please someone fix this :) - Vanessa - -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Nov 10 07:57:42 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 10 Nov 2020 07:57:42 0000 Subject: [squeak-dev] The Trunk: System-mt.1192.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.1192.mcz ==================== Summary ==================== Name: System-mt.1192 Author: mt Time: 10 November 2020, 8:57:39.098594 am UUID: 287a932b-bf27-334a-b0b3-2db1fc95027d Ancestors: System-mt.1191 Makes the order of inserted/removed lines in text diffs configurable. Set the default to the unix-y way, which is remove-before-insert. =============== Diff against System-mt.1191 =============== Item was changed: Object subclass: #TextDiffBuilder instanceVariableNames: 'xLines yLines ignoreLineEndings' + classVariableNames: 'IgnoreLineEndings InsertTextAttributes NormalTextAttributes RemoveTextAttributes ShowInsertBeforeRemove' - classVariableNames: 'IgnoreLineEndings InsertTextAttributes NormalTextAttributes RemoveTextAttributes' poolDictionaries: '' category: 'System-FilePackage'! !TextDiffBuilder commentStamp: 'fbs 9/23/2013 08:58' prior: 0! I implement the diff algorithm. I can show the differences between two texts. See my method comments for further information. Instance Variables xLines: yLines: ignoreLineEndings: xLines - an Array of DiffElements which is created from the first input text yLines - an Array of DiffElements which is created from the second input text ignoreLineEndings - a Boolean describing whether lines only differing in the line endings should be reported as a difference, or not! Item was added: + ----- Method: TextDiffBuilder class>>showInsertBeforeRemove (in category 'preferences') ----- + showInsertBeforeRemove + "Answer a boolean telling if line endings differences should be ignored or emphasized" + + + + ^ ShowInsertBeforeRemove ifNil: [ false ]! Item was added: + ----- Method: TextDiffBuilder class>>showInsertBeforeRemove: (in category 'preferences') ----- + showInsertBeforeRemove: aBoolean + + ShowInsertBeforeRemove := aBoolean.! Item was changed: ----- Method: TextDiffBuilder>>patchSequenceDoIfMatch:ifInsert:ifRemove: (in category 'creating patches') ----- patchSequenceDoIfMatch: matchBlock ifInsert: insertBlock ifRemove: removeBlock "I'm the general purpose method to iterate through the patch sequence. See my senders to learn how to use me." + | aLines bLines aBlock bBlock aLine aLineStream | + self class showInsertBeforeRemove + ifTrue: [ aLines := xLines. bLines := yLines. aBlock := insertBlock. bBlock := removeBlock ] + ifFalse: [ aLines := yLines. bLines := xLines. aBlock := removeBlock. bBlock := insertBlock ]. + aLineStream := aLines readStream. + bLines do: [ :bLine | + bLine hasMatch + ifFalse: [ + aBlock value: bLine string ] - | xLine xLineStream | - xLineStream := xLines readStream. - yLines do: [ :yLine | - yLine hasMatch - ifFalse: [ insertBlock value: yLine string ] ifTrue: [ + [ (aLine := aLineStream next) == nil or: [ aLine == bLine match ] ] + whileFalse: [ bBlock value: aLine string ]. + matchBlock value: bLine string ] ]. + [ (aLine := aLineStream next) == nil ] whileFalse: [ + bBlock value: aLine string ]! - [ (xLine := xLineStream next) == nil or: [ xLine == yLine match ] ] - whileFalse: [ removeBlock value: xLine string ]. - matchBlock value: yLine string ] ]. - [ (xLine := xLineStream next) == nil ] whileFalse: [ - removeBlock value: xLine string ]! From marcel.taeumel at hpi.de Tue Nov 10 07:58:27 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 08:58:27 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: Message-ID: Hi all! It is configurable now via System-mt.1192 in Trunk. The default is (now) remove-before-insert. Best, Marcel Am 10.11.2020 05:59:41 schrieb Vanessa Freudenberg : On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones wrote: Does it bother anyone else that Squeak prints diffs  +this line was added  -this line was removed Yes, bothers me greatly. Please someone fix this :) - Vanessa -  -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Tue Nov 10 08:05:59 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 09:05:59 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda : On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ?  Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html [http://forum.world.st/Squeak-Dev-f45488.html] -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Nov 10 08:21:36 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 10 Nov 2020 08:21:36 0000 Subject: [squeak-dev] The Trunk: Monticello-mt.733.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.733.mcz ==================== Summary ==================== Name: Monticello-mt.733 Author: mt Time: 10 November 2020, 9:21:35.608186 am UUID: 6a90767e-6b8d-dd45-bb68-cb4ea3bd2a24 Ancestors: Monticello-mt.732 Fixes recent regression of the COPY button in the version inspector. =============== Diff against Monticello-mt.732 =============== Item was added: + ----- Method: MCRepositoryInspector>>save (in category 'actions') ----- + save + self pickRepository ifNotNil: + [:repository | + (self repository = MCRepository inbox and: + [repository = MCRepository trunk or: [repository = MCRepository treated]]) ifTrue: + [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox constributions.\\Do you want to proceed anyway?' translated withCRs]. + repository storeVersion: self version]! Item was changed: ----- Method: MCVersionInspector>>save (in category 'accessing') ----- save self pickRepository ifNotNil: + [:ea | + ea storeVersion: self version]! - [:repository | - (self repository = MCRepository inbox and: - [repository = MCRepository trunk or: [repository = MCRepository treated]]) ifTrue: - [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox constributions.\\Do you want to proceed anyway?' translated withCRs]. - repository storeVersion: self version]! From marcel.taeumel at hpi.de Tue Nov 10 08:21:53 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 09:21:53 +0100 Subject: [squeak-dev] Monticello bug: "copy" to other repository from version inspector In-Reply-To: <940bc949-7bea-4552-bf0e-87bb35e41376@leastfixedpoint.com> References: <940bc949-7bea-4552-bf0e-87bb35e41376@leastfixedpoint.com> Message-ID: Hi Tony. I broke that recently. Just fixed it in Monticello-mt.733. Best, Marcel Am 09.11.2020 13:13:26 schrieb Tony Garnock-Jones : Hi all, I've just noticed the following bug, but I'm afraid I'm unsure how to fix it: - save a MC version. - on the MCVersionInspector that appears, select "Copy". - choose and accept another repository. I get the following walkback. When I use "Copy" from a *repository* inspector, all works as expected. Regards, Tony -=-=-=-=- 9 November 2020 1:11:22.590173 pm VM: unix - Smalltalk Image: Squeak6.0alpha [latest update: #20073] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/tonyg/src/squeak-gitweb Trusted Dir /home/tonyg/src/squeak-gitweb/secure Untrusted Dir /home/tonyg/src/squeak-gitweb/My Squeak MCVersionInspector(Object)>>doesNotUnderstand: #repository Receiver: a MCVersionInspector Arguments and temporary variables: aMessage: repository exception: MessageNotUnderstood: MCVersionInspector>>repository resumeValue: nil Receiver's instance variables: dependents: a DependentsArray(a PluggableSystemWindow Actors-tonyg.120...etc... morph: nil label: nil modalProcess: nil modalValue: nil version: a MCVersion(Actors-tonyg.120) MCVersionInspector>>save Receiver: a MCVersionInspector Arguments and temporary variables: repository: a MCHttpRepository(https://www.squeaksource.com/Actors) Receiver's instance variables: dependents: a DependentsArray(a PluggableSystemWindow Actors-tonyg.120...etc... morph: nil label: nil modalProcess: nil modalValue: nil version: a MCVersion(Actors-tonyg.120) [... blah blah ...] --- The full stack --- MCVersionInspector(Object)>>doesNotUnderstand: #repository MCVersionInspector>>save PluggableButtonMorphPlus(PluggableButtonMorph)>>performAction PluggableButtonMorphPlus>>performAction [] in PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: Array(SequenceableCollection)>>do: PluggableButtonMorphPlus(PluggableButtonMorph)>>mouseUp: PluggableButtonMorphPlus(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: PluggableButtonMorphPlus(Morph)>>handleEvent: PluggableButtonMorphPlus(Morph)>>handleFocusEvent: MorphicEventDispatcher>>doHandlingForFocusEvent:with: MorphicEventDispatcher>>dispatchFocusEvent:with: PluggableButtonMorphPlus(Morph)>>processFocusEvent:using: PluggableButtonMorphPlus(Morph)>>processFocusEvent: [] in [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveEventVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class(DynamicVariable class)>>value:during: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in ActiveEventVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveEventVariable class>>value:during: MouseButtonEvent(MorphicEvent)>>becomeActiveDuring: [] in [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveHandVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class(DynamicVariable class)>>value:during: [] in ActiveHandVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class>>value:during: HandMorph>>becomeActiveDuring: [] in HandMorph>>sendFocusEvent:to:clear: [] in ActiveWorldVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class(DynamicVariable class)>>value:during: [] in ActiveWorldVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveWorldVariable class>>value:during: PasteUpMorph>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [] in [] in WorldState>>doOneCycleNowFor: [] in ActiveHandVariable class(DynamicVariable class)>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class(DynamicVariable class)>>value:during: [] in ActiveHandVariable class>>value:during: FullBlockClosure(BlockClosure)>>ensure: ActiveHandVariable class>>value:during: HandMorph>>becomeActiveDuring: [] in WorldState>>doOneCycleNowFor: Array(SequenceableCollection)>>do: WorldState>>handsDo: WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: PasteUpMorph>>doOneCycle [] in MorphicProject>>spawnNewProcess [] in FullBlockClosure(BlockClosure)>>newProcess -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.cellier.aka.nice at gmail.com Tue Nov 10 08:31:42 2020 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue, 10 Nov 2020 09:31:42 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : > > And canUnderstand: ? Or is that being too picky? > > Ah, right. On the class level, it would be like Levente inferred from my > suggestion. I only thought of #respondsTo: to answer "true" only for the > simple setter/getters that have keys present in the actual dictionary > instance. Hmmm..... > > I would like to keep the JSON library as simple as possible. Wer are just > talking about syntactic sugar here, right? > > Best, > Marcel > > Am 09.11.2020 21:08:14 schrieb Eliot Miranda : > > > On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel > wrote: > >> Hi Levente. >> >> Sounds right. If an object can answer to some extra messages via >> #doesNotUnderstand:, one should also override #respondsTo:. It is like #= >> and #hash. >> > > And canUnderstand: ? Or is that being too picky? > > >> I did not know about #dictionaryClass:. That's a powerful hook. >> >> Best, >> Marcel >> >> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >> Hi Christoph, >> >> On Sun, 8 Nov 2020, Christoph Thiede wrote: >> >> > Hi Levente, >> > >> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >> > great because I depend on this functionality in another project and >> > currently require your JSON fork in my baseline. :-) >> >> I cannot merge it because that would bring back long removed methods, and >> MC wouldn't allow me to reject those. >> But I can add the changes manually. >> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >> >> What is the purpose of that method? >> I'm asking because it has got no comment, so I'm not sure its >> implementation is correct. >> For example, should >> >> JsonObject new respondsTo: #foo: >> >> return false? >> What should the following return? >> >> JsonObject new >> foo: 1; >> respondsTo: #foo: >> >> Another question is whether it is generally useful or not? >> If it's not, you can still have the desired behavior by creating a >> subclass. E.g.: >> >> JsonObject subclass: #PseudoObject >> instanceVariableNames: '' >> classVariableNames: '' >> poolDictionaries: '' >> category: 'PseudoObject' >> >> >> PseudoObject >> respondsTo: aSymbol >> >> ^ (super respondsTo: aSymbol) >> or: [self includesKey: aSymbol] >> >> >> (Json new >> dictionaryClass: PseudoObject; >> readFrom: '{"foo": 42}' readStream) >> respondsTo: #foo >> "==> true" >> >> >> Levente >> >> > >> > Best, >> > Christoph >> > >> > >> > >> > -- >> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >> >> >> > > -- > _,,,^..^,,,_ > best, Eliot > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Tue Nov 10 08:34:49 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 09:34:49 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> Message-ID: > and generate the getter setter on demand (via doesNotUnderstand:) That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder [https://github.com/hpi-swa/MessageSendRecorder] 's MessageSendRecordExtension. Best. Marcel Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html [http://www.squeaksource.com/STEM.html] Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda : On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ?  Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html [http://forum.world.st/Squeak-Dev-f45488.html] -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From tonyg at leastfixedpoint.com Tue Nov 10 08:40:22 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Tue, 10 Nov 2020 09:40:22 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: Message-ID: <148dd747-015a-fb1c-3ed2-5540e233b57d@leastfixedpoint.com> Love it! Thank you! I'll tweak it now to allow a per-instance configurability of it, because I need to use it Unix-style programmatically without overriding the user's image preference. On 11/10/20 8:58 AM, Marcel Taeumel wrote: > Hi all! > > It is configurable now via System-mt.1192 in Trunk. The default is (now) > remove-before-insert. > > Best, > Marcel > > >> Am 10.11.2020 05:59:41 schrieb Vanessa Freudenberg : >> >> On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones >> > wrote: >> >> Does it bother anyone else that Squeak prints diffs >> >>  +this line was added >>  -this line was removed >> >> >> Yes, bothers me greatly. Please someone fix this :) >> >> - Vanessa -  > > From marcel.taeumel at hpi.de Tue Nov 10 08:42:40 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 09:42:40 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: <148dd747-015a-fb1c-3ed2-5540e233b57d@leastfixedpoint.com> References: <148dd747-015a-fb1c-3ed2-5540e233b57d@leastfixedpoint.com> Message-ID: Sure. Maybe take a look at: Morph class >> #preferredCornerRadius Morph >> #cornerRadius There are other examples in the image. Best, Marcel Am 10.11.2020 09:40:24 schrieb Tony Garnock-Jones : Love it! Thank you! I'll tweak it now to allow a per-instance configurability of it, because I need to use it Unix-style programmatically without overriding the user's image preference. On 11/10/20 8:58 AM, Marcel Taeumel wrote: > Hi all! > > It is configurable now via System-mt.1192 in Trunk. The default is (now) > remove-before-insert. > > Best, > Marcel > > >> Am 10.11.2020 05:59:41 schrieb Vanessa Freudenberg : >> >> On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones >> > wrote: >> >> Does it bother anyone else that Squeak prints diffs >> >> +this line was added >> -this line was removed >> >> >> Yes, bothers me greatly. Please someone fix this :) >> >> - Vanessa - > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Nov 10 08:57:53 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 10 Nov 2020 08:57:53 0000 Subject: [squeak-dev] The Trunk: System-tonyg.1193.mcz Message-ID: Tony Garnock-Jones uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-tonyg.1193.mcz ==================== Summary ==================== Name: System-tonyg.1193 Author: tonyg Time: 10 November 2020, 9:57:50.481732 am UUID: b7b2cc99-52f1-4be3-8c74-813ab33c6d23 Ancestors: System-mt.1192 Allow per-instance control over TextDiffBuilder showInsertBeforeRemove. =============== Diff against System-mt.1192 =============== Item was changed: Object subclass: #TextDiffBuilder + instanceVariableNames: 'xLines yLines ignoreLineEndings showInsertBeforeRemove' - instanceVariableNames: 'xLines yLines ignoreLineEndings' classVariableNames: 'IgnoreLineEndings InsertTextAttributes NormalTextAttributes RemoveTextAttributes ShowInsertBeforeRemove' poolDictionaries: '' category: 'System-FilePackage'! + !TextDiffBuilder commentStamp: 'tonyg 11/10/2020 09:55' prior: 0! - !TextDiffBuilder commentStamp: 'fbs 9/23/2013 08:58' prior: 0! I implement the diff algorithm. I can show the differences between two texts. See my method comments for further information. Instance Variables xLines: yLines: ignoreLineEndings: + showInsertBeforeRemove: or nil xLines - an Array of DiffElements which is created from the first input text yLines - an Array of DiffElements which is created from the second input text ignoreLineEndings + - a Boolean describing whether lines only differing in the line endings should be reported as a difference, or not + + showInsertBeforeRemove + - a Boolean describing whether inserts should be processed ahead of matching removes for changed blocks, or the other way around. If nil, the system-wide preference is used (see class-side showInsertBeforeRemove).! - - a Boolean describing whether lines only differing in the line endings should be reported as a difference, or not! Item was changed: ----- Method: TextDiffBuilder>>patchSequenceDoIfMatch:ifInsert:ifRemove: (in category 'creating patches') ----- patchSequenceDoIfMatch: matchBlock ifInsert: insertBlock ifRemove: removeBlock "I'm the general purpose method to iterate through the patch sequence. See my senders to learn how to use me." | aLines bLines aBlock bBlock aLine aLineStream | + self showInsertBeforeRemove - self class showInsertBeforeRemove ifTrue: [ aLines := xLines. bLines := yLines. aBlock := insertBlock. bBlock := removeBlock ] ifFalse: [ aLines := yLines. bLines := xLines. aBlock := removeBlock. bBlock := insertBlock ]. aLineStream := aLines readStream. bLines do: [ :bLine | bLine hasMatch ifFalse: [ aBlock value: bLine string ] ifTrue: [ [ (aLine := aLineStream next) == nil or: [ aLine == bLine match ] ] whileFalse: [ bBlock value: aLine string ]. matchBlock value: bLine string ] ]. [ (aLine := aLineStream next) == nil ] whileFalse: [ bBlock value: aLine string ]! Item was added: + ----- Method: TextDiffBuilder>>showInsertBeforeRemove (in category 'creating patches') ----- + showInsertBeforeRemove + ^ showInsertBeforeRemove ifNil: [self class showInsertBeforeRemove]! Item was added: + ----- Method: TextDiffBuilder>>showInsertBeforeRemove: (in category 'creating patches') ----- + showInsertBeforeRemove: aBoolean + showInsertBeforeRemove := aBoolean! From tonyg at leastfixedpoint.com Tue Nov 10 08:59:22 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Tue, 10 Nov 2020 09:59:22 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: <148dd747-015a-fb1c-3ed2-5540e233b57d@leastfixedpoint.com> Message-ID: Aha - hm. I went with an instance variable. Do you think I should change it to use a property instead? On 11/10/20 9:42 AM, Marcel Taeumel wrote: > Sure. Maybe take a look at: > > Morph class >> #preferredCornerRadius > Morph >> #cornerRadius > > There are other examples in the image. > > Best, > Marcel >> >> Am 10.11.2020 09:40:24 schrieb Tony Garnock-Jones >> : >> >> Love it! Thank you! I'll tweak it now to allow a per-instance >> configurability of it, because I need to use it Unix-style >> programmatically without overriding the user's image preference. >> >> On 11/10/20 8:58 AM, Marcel Taeumel wrote: >> > Hi all! >> > >> > It is configurable now via System-mt.1192 in Trunk. The default is >> (now) >> > remove-before-insert. >> > >> > Best, >> > Marcel >> > >> > >> >> Am 10.11.2020 05:59:41 schrieb Vanessa Freudenberg : >> >> >> >> On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones >> >> > wrote: >> >> >> >> Does it bother anyone else that Squeak prints diffs >> >> >> >>  +this line was added >> >>  -this line was removed >> >> >> >> >> >> Yes, bothers me greatly. Please someone fix this :) >> >> >> >> - Vanessa -  >> > >> > From marcel.taeumel at hpi.de Tue Nov 10 09:05:19 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 10 Nov 2020 10:05:19 +0100 Subject: [squeak-dev] Diffs "upside-down" In-Reply-To: References: <148dd747-015a-fb1c-3ed2-5540e233b57d@leastfixedpoint.com> Message-ID: inst var is fine. I just pointed you to a roughly equivalent example. I would avoid reading the preference in #initialize but keep the inst var "nil" until overwritten. Am 10.11.2020 09:59:24 schrieb Tony Garnock-Jones : Aha - hm. I went with an instance variable. Do you think I should change it to use a property instead? On 11/10/20 9:42 AM, Marcel Taeumel wrote: > Sure. Maybe take a look at: > > Morph class >> #preferredCornerRadius > Morph >> #cornerRadius > > There are other examples in the image. > > Best, > Marcel >> >> Am 10.11.2020 09:40:24 schrieb Tony Garnock-Jones >> : >> >> Love it! Thank you! I'll tweak it now to allow a per-instance >> configurability of it, because I need to use it Unix-style >> programmatically without overriding the user's image preference. >> >> On 11/10/20 8:58 AM, Marcel Taeumel wrote: >> > Hi all! >> > >> > It is configurable now via System-mt.1192 in Trunk. The default is >> (now) >> > remove-before-insert. >> > >> > Best, >> > Marcel >> > >> > >> >> Am 10.11.2020 05:59:41 schrieb Vanessa Freudenberg : >> >> >> >> On Mon, Nov 9, 2020 at 6:58 AM Tony Garnock-Jones >> >> > wrote: >> >> >> >> Does it bother anyone else that Squeak prints diffs >> >> >> >> +this line was added >> >> -this line was removed >> >> >> >> >> >> Yes, bothers me greatly. Please someone fix this :) >> >> >> >> - Vanessa - >> > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Tue Nov 10 09:16:40 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Tue, 10 Nov 2020 09:16:40 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> , Message-ID: Hi all, > And canUnderstand: ? Or is that being too picky? > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? Well, my conception of the general contract would be exactly the following: (o class canUnderstand: m) ifTrue: [ self assert: [o respondsTo: m]]. (o respondsTo: m) ifFalse: [ self deny: [o class canUnderstand: m]]. (o respondsTo: m) ifTrue: [ self shouldnt: [o m] raise: MessageNotUnderstood]. [o m] on: MessageNotUnderstood do: [ self deny: [o respondsTo: m]]. But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the current discussion shows that the same argument applies for the second statement, too. > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Dienstag, 10. November 2020 09:34:49 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > and generate the getter setter on demand (via doesNotUnderstand:) That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. Best. Marcel Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel > a écrit : > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda >: On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel > wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ? Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi >: Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.oneel at pckswarms.ch Tue Nov 10 13:03:01 2020 From: bruce.oneel at pckswarms.ch (Bruce O'Neel) Date: Tue, 10 Nov 2020 14:03:01 +0100 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> References: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> Message-ID: <1605013381-e35215725173a707863ed7c800776110@pckswarms.ch> Hi, Thanks to everyone who responded.  It works perfectly after I installed sudo apt install libevdev-dev cheers bruce -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Tue Nov 10 15:34:43 2020 From: builds at travis-ci.org (Travis CI) Date: Tue, 10 Nov 2020 15:34:43 +0000 Subject: [squeak-dev] [CRON] Passed: squeak-smalltalk/squeak-app#1888 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5faab312995d0_13fd3f80aa1fc1805fa@travis-tasks-f946c9599-px75m.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1888 Status: Passed Duration: 14 mins and 25 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/742723357?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Tue Nov 10 17:03:46 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 10 Nov 2020 09:03:46 -0800 Subject: [squeak-dev] [off topic] System Architecture Diagrams Message-ID: <789D5649-CE67-4A4E-8714-6D1085769522@gmail.com> Hi All, thanks to Bruce O’Neel I checked out libevdev, Linux’s “event device” library, which is the “i” in linux’s user-space i/o libraries. I’m used to seeing (& drawing) system architecture diagrams which have the hardware at the bottom, the kernel above it, and so on. In this style of diagram components of the system that use facilities provided by others are above those other components. The metaphor is one of support, a layered wedding cake if you like. But in this lovely diagram from the Wikipedia evdev page, the scheme is turned on its ear. The interface between human and machine is correctly identified as between computer hardware and our sensorimotor organs (is there a separate category name that includes the vocal cords?). Our brain and the application are correctly located at several removes. Nice! -------------- next part -------------- A non-text attachment was scrubbed... Name: 800px-Linux_kernel_and_gaming_input-output_latency.svg.png Type: image/png Size: 111744 bytes Desc: not available URL: -------------- next part -------------- Eliot _,,,^..^,,,_ (phone) From eliot.miranda at gmail.com Tue Nov 10 21:55:49 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue, 10 Nov 2020 13:55:49 -0800 Subject: [squeak-dev] Current state of the Arm 64 cog vm In-Reply-To: <1605013381-e35215725173a707863ed7c800776110@pckswarms.ch> References: <1604932479-16324668f481548c43d3aebb05f294c6@pckswarms.ch> <1605013381-e35215725173a707863ed7c800776110@pckswarms.ch> Message-ID: On Tue, Nov 10, 2020 at 5:03 AM Bruce O'Neel wrote: > Hi, > > Thanks to everyone who responded. It works perfectly after I installed > > sudo apt install libevdev-dev > presumably this is now necessary in all linux builds? cheers > > bruce > > > > > *09 November 2020 15:34 "Bruce O'Neel" > wrote:* > > Hi, > > What's the current state of the ARM 64 cog VM? Does it build? If not, > what magic is needed... > > Thanks. > > bruce > > <> > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Wed Nov 11 10:16:52 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Wed, 11 Nov 2020 11:16:52 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <9d11435d-a65e-5d6b-69b4-ddfaeaccc946@leastfixedpoint.com> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> <9d11435d-a65e-5d6b-69b4-ddfaeaccc946@leastfixedpoint.com> Message-ID: Trunk and FileSystem-Git + Squot. Christoph probably has these loaded anyway. Am Mo., 9. Nov. 2020 um 13:38 Uhr schrieb Tony Garnock-Jones : > > On 11/7/20 3:54 PM, Jakob Reschke wrote: > > Am Sa., 7. Nov. 2020 um 13:54 Uhr schrieb Thiede, Christoph > > : > >> Are there any objections or shall we integrate this change into Squeak-FileSystem? > > > > In my opinion, go ahead, but check and at least post the senders that > > need to be changed, please. > > I don't see any senders (that need changing) at all in my current > trunk-ish image. Are there external packages that need to be looked at > or is it good enough to have trunk be OK for the change? > > Tony From commits at source.squeak.org Wed Nov 11 12:11:56 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 11 Nov 2020 12:11:56 0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1711.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1711.mcz ==================== Summary ==================== Name: Morphic-ct.1711 Author: ct Time: 11 November 2020, 1:11:49.166952 pm UUID: baf41a9d-f92f-f44a-b3d8-a7fd571abb2b Ancestors: Morphic-mt.1710 Proposal/fix: Repair the help handle functionality and show a dialog window instead of a balloon. This also improves the responsiveness of behavior IMHO. =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: HaloMorph>>addHelpHandle: (in category 'handles') ----- addHelpHandle: haloSpec target balloonText ifNotNil: + [(self addHandle: haloSpec on: #mouseDown send: #mouseDownOnHelpHandle: to: innerTarget)] - [(self addHandle: haloSpec on: #mouseDown send: #mouseDownOnHelpHandle: to: innerTarget) - on: #mouseUp send: #deleteBalloon to: innerTarget] ! Item was changed: ----- Method: Morph>>mouseDownOnHelpHandle: (in category 'halos and balloon help') ----- mouseDownOnHelpHandle: anEvent "The mouse went down in the show-balloon handle" - | str | anEvent shiftPressed ifTrue: [^ self editBalloonHelpText]. + self inform: (self balloonText ifNil: [self noHelpString]).! - str := self balloonText. - str ifNil: [str := self noHelpString]. - self showBalloon: str hand: anEvent hand. - ! From commits at source.squeak.org Wed Nov 11 12:30:07 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 11 Nov 2020 12:30:07 0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1712.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1712.mcz ==================== Summary ==================== Name: Morphic-ct.1712 Author: ct Time: 11 November 2020, 1:29:59.832952 pm UUID: 0ced7ff1-dfd2-994e-b05d-5995d5d717ac Ancestors: Morphic-mt.1710 Fix typos in MenuMorph. =============== Diff against Morphic-mt.1710 =============== Item was removed: - ----- Method: MenuMorph>>handlePageDownStorke: (in category 'keystroke helpers') ----- - handlePageDownStorke: evt - - evt keyValue = 12 ifFalse: [ ^false ]. - self moveSelectionDown: 5 event: evt. - ^true! Item was removed: - ----- Method: MenuMorph>>handleUpStorke: (in category 'keystroke helpers') ----- - handleUpStorke: evt - - evt keyValue = 30 ifFalse: [ ^false ]. - self moveSelectionDown: -1 event: evt. - ^true! Item was added: + ----- Method: MenuMorph>>handleUpStroke: (in category 'keystroke helpers') ----- + handleUpStroke: evt + + evt keyValue = 30 ifFalse: [ ^false ]. + self moveSelectionDown: -1 event: evt. + ^true! Item was changed: ----- Method: MenuMorph>>keyStrokeHandlers (in category 'keystroke helpers') ----- keyStrokeHandlers ^#( handleCommandKeyPress: handleCRStroke: handleEscStroke: handleLeftStroke: handleRightStroke: + handleUpStroke: - handleUpStorke: handleDownStroke: handlePageUpStroke: handlePageDownStroke:)! From commits at source.squeak.org Wed Nov 11 12:40:36 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 11 Nov 2020 12:40:36 0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1713.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1713.mcz ==================== Summary ==================== Name: Morphic-ct.1713 Author: ct Time: 11 November 2020, 1:40:28.920952 pm UUID: dbe3197c-d3cf-0f4d-a8e4-75238156e870 Ancestors: Morphic-mt.1710 Make sure that pressing the arrow-up key in a menu without selection selects the last item. Until now, this only worked for menus with a title. =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: DockingBarMorph>>moveSelectionDown:event: (in category 'control') ----- moveSelectionDown: direction event: evt "Move the current selection up or down by one, presumably under keyboard control. direction = +/-1" | index | + index := (submorphs + indexOf: selectedItem + ifAbsent: [direction positive ifTrue: [0] ifFalse: [1]] + ) + direction. - index := (submorphs indexOf: selectedItem ifAbsent: [1-direction]) + direction. submorphs do: "Ensure finite" [:unused | | m | m := submorphs atWrap: index. ((m isKindOf: DockingBarItemMorph) and: [m isEnabled]) ifTrue: [^ self selectItem: m event: evt]. "Keep looking for an enabled item" index := index + direction sign]. ^ self selectItem: nil event: evt! Item was changed: ----- Method: MenuMorph>>moveSelectionDown:event: (in category 'keyboard control') ----- moveSelectionDown: direction event: evt "Move the current selection up or down by one, presumably under keyboard control. direction = +/-1" | index | + index := (submorphs + indexOf: selectedItem + ifAbsent: [direction positive ifTrue: [0] ifFalse: [1]] + ) + direction. - index := (submorphs indexOf: selectedItem ifAbsent: [1-direction]) + direction. submorphs do: "Ensure finite" [:unused | | m | m := submorphs atWrap: index. ((m isKindOf: MenuItemMorph) and: [m isEnabled]) ifTrue: [^ self selectItem: m event: evt]. "Keep looking for an enabled item" index := index + direction sign]. ^ self selectItem: nil event: evt! From forums.jakob at resfarm.de Wed Nov 11 13:34:46 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Wed, 11 Nov 2020 14:34:46 +0100 Subject: [squeak-dev] (1) Bug fixes, and (2) potential improvements to FileSystem-Git In-Reply-To: <3bbd8c67-5402-b1ca-0e80-0fc172457d83@leastfixedpoint.com> References: <3bbd8c67-5402-b1ca-0e80-0fc172457d83@leastfixedpoint.com> Message-ID: Hi Tony, I suggest you use the Git Browser to commit the changes. Clone your fork or add it from a directory to the Git Browser, make sure your changes are present in the image, then commit them (since it's your fork it does not matter on which branch) and push. After that, you can file a pull request on GitHub (there are no in-image buttons to do that). > > - repair GitRepository >> collectTagsFromLooseRefs when the repo has tags including a '/' > That method no longer exists and I remember having fixed this behavior or something similar like it already. I did some larger refactoring this year that routes all reads and writes through a "unit of work" object, so the tag access has moved there as well. The purpose of this change was not to reopen and re-read files repeatedly during coherent operations such as creating a new commit or assembling the log, to make things faster. Please make sure that your FileSystem-Git is up-to-date. You can update it together with Squot and tools via the blue drop down button on the Git Browser window, or via Metacello. Looking forward to inspecting your changes, but it may be a while until I can follow up on them. Note that github:// Monticello repositories are only used by Metacello to download something, they cannot be used for actual work. Kind regards, Jakob Am Mo., 9. Nov. 2020 um 14:01 Uhr schrieb Tony Garnock-Jones : > > Hi Jakob, all, > > I have a few bug fixes and potential enhancements to FileSystem-Git > ready, but I can't figure out how to add a new github:// repository to > Monticello. I've made my own fork of Squot at the github end, and now I > just need to add it to my image somehow... > > The fixes I have are: > > - repair GitReference class >> validateReferenceName: to follow the > rules in the git docs > > - repair GitRepository >> collectTagsFromLooseRefs when the repo has > tags including a '/' > > - remove restriction on GitTag's object field: tags can point at any > git object, not just commits > > The potential enhancements I have are: > > - a GitTreeDiffBuilder class which digs into a bit more detail than > the existing GitDiffCreator; namely, it classifies changes into: > GitTreeDiffModeChangedItem > GitTreeDiffNewItem > GitTreeDiffRenamedItem > GitTreeDiffSubmoduleChangedItem > GitTreeDiffTypeChangedItem > GitTreeDiffChangedItem > GitTreeDiffDeletedItem > > - GitTaglikeObject >> contributor, which answers author for commits > and tagger for tags > > - GitTaglikeObject >> messageSummary, which answers the first line of > the commit message on the assumption that this contains a summary > of the whole thing (a common convention) > > - GitTree >> followPath:, for digging into a tree when working in a > git context and not a simulated-filesystem context > > - GitTreeEntry >> entryCode, answering something analogous to > GitStorableObject class >> typeCode, but for tree entries > > I'd prefer to figure out how to contribute the changes using the > in-image github workflow, but for reference, I've attached fileouts of > the changes. > > Regards, > Tony From commits at source.squeak.org Wed Nov 11 17:33:41 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Wed, 11 Nov 2020 17:33:41 0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1714.mcz Message-ID: A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1714.mcz ==================== Summary ==================== Name: Morphic-ct.1714 Author: ct Time: 11 November 2020, 6:33:33.254952 pm UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309 Ancestors: Morphic-mt.1710 Honor hi-dpi settings for halo, window, and keyboard-focus indication borders. Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review! =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- keyboardFocusWidth + ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded! - ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Draw this morph only if it has no target." (Preferences showBoundsInHalo and: [self target isWorldMorph not]) ifTrue: [ aCanvas frameAndFillRectangle: self bounds fillColor: Color transparent + borderWidth: (2 * RealEstateAgent scaleFactor) rounded - borderWidth: 2 borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifFalse: [self hasDropShadow: false] ifTrue: [ self addDropShadow. self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded. - self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! From Christoph.Thiede at student.hpi.uni-potsdam.de Wed Nov 11 17:51:52 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Wed, 11 Nov 2020 17:51:52 +0000 Subject: [squeak-dev] =?utf-8?q?Worlds_in_Worlds_are_NOT_completely_dead?= =?utf-8?b?PyEg8J+kqQ==?= Message-ID: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> Very cool ... I did not know that this was even possible: [cid:82037629-3324-4632-9c68-5ad1ec8b05ad] How can we improve and stabilize this exciting feature? MVC support seems to be missing at the moment, and also I noticed some other glitches, for example, menus in sub-projects don't pop up directly at the cursor. But this is a fabulous place to start towards perfecting live access to subprojects! Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 413785 bytes Desc: pastedImage.png URL: From tonyg at leastfixedpoint.com Wed Nov 11 18:25:59 2020 From: tonyg at leastfixedpoint.com (Tony Garnock-Jones) Date: Wed, 11 Nov 2020 19:25:59 +0100 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> <9d11435d-a65e-5d6b-69b4-ddfaeaccc946@leastfixedpoint.com> Message-ID: <1a71e07b-9bda-db8c-9379-8bd71ba81061@leastfixedpoint.com> On 11/11/20 11:16 AM, Jakob Reschke wrote: > Trunk and FileSystem-Git + Squot. Christoph probably has these loaded anyway. The versions of those I have loaded are the ones installed by the configuration wizard (ie master of Squot and its support libraries) - and there are no interesting senders of #extension there. So I think we're probably OK to make the change! Tony From christoph.thiede at student.hpi.uni-potsdam.de Wed Nov 11 18:34:24 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Wed, 11 Nov 2020 12:34:24 -0600 (CST) Subject: [squeak-dev] =?utf-8?q?Worlds_in_Worlds_are_NOT_completely_dead?= =?utf-8?b?PyEg8J+kqQ==?= In-Reply-To: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> Message-ID: <1605119664601-0.post@n4.nabble.com> Wow, you can even nest them and drag and drop between them (even though with a few hick-ups): https://user-images.githubusercontent.com/38782922/98850138-96282c00-2454-11eb-892a-671201def342.gif -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Wed Nov 11 20:19:32 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Wed, 11 Nov 2020 15:19:32 -0500 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <1605119664601-0.post@n4.nabble.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <1605119664601-0.post@n4.nabble.com> Message-ID: <20201111201932.GA51020@shell.msen.com> On Wed, Nov 11, 2020 at 12:34:24PM -0600, Christoph Thiede wrote: > Wow, you can even nest them and drag and drop between them (even though with > a few hick-ups): > https://user-images.githubusercontent.com/38782922/98850138-96282c00-2454-11eb-892a-671201def342.gif > > Indeed it is very cool. Bob Arning is certainly a resident expert on this topic (and original author of much of it, judging by the method stamps). It is great that we have managed to keep it semi-functional for all these years, and it will be even greater if can can polish and extend it as you suggest :-) In addition to just being very cool, it is also an excellent way of validating the modularity of Morphic/MVC/SqueakShell/other projects. My hope is that as you and others continue to make progress on reducing dependence on global variables, it will become easier to make embedded worlds work smoothly and reliably. Dave From marcel.taeumel at hpi.de Thu Nov 12 08:36:24 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 12 Nov 2020 09:36:24 +0100 Subject: [squeak-dev] The Inbox: Morphic-ct.1714.mcz In-Reply-To: References: Message-ID: In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet. Best, Marcel Am 11.11.2020 18:33:54 schrieb commits at source.squeak.org : A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1714.mcz ==================== Summary ==================== Name: Morphic-ct.1714 Author: ct Time: 11 November 2020, 6:33:33.254952 pm UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309 Ancestors: Morphic-mt.1710 Honor hi-dpi settings for halo, window, and keyboard-focus indication borders. Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review! =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- keyboardFocusWidth + ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded! - ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Draw this morph only if it has no target." (Preferences showBoundsInHalo and: [self target isWorldMorph not]) ifTrue: [ aCanvas frameAndFillRectangle: self bounds fillColor: Color transparent + borderWidth: (2 * RealEstateAgent scaleFactor) rounded - borderWidth: 2 borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifFalse: [self hasDropShadow: false] ifTrue: [ self addDropShadow. self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded. - self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Thu Nov 12 08:40:47 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 12 Nov 2020 09:40:47 +0100 Subject: [squeak-dev] The Inbox: Morphic-ct.1714.mcz In-Reply-To: References: Message-ID: Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-) Best, Marcel Am 12.11.2020 09:36:24 schrieb Marcel Taeumel : In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet. Best, Marcel Am 11.11.2020 18:33:54 schrieb commits at source.squeak.org : A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1714.mcz ==================== Summary ==================== Name: Morphic-ct.1714 Author: ct Time: 11 November 2020, 6:33:33.254952 pm UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309 Ancestors: Morphic-mt.1710 Honor hi-dpi settings for halo, window, and keyboard-focus indication borders. Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review! =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- keyboardFocusWidth + ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded! - ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Draw this morph only if it has no target." (Preferences showBoundsInHalo and: [self target isWorldMorph not]) ifTrue: [ aCanvas frameAndFillRectangle: self bounds fillColor: Color transparent + borderWidth: (2 * RealEstateAgent scaleFactor) rounded - borderWidth: 2 borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifFalse: [self hasDropShadow: false] ifTrue: [ self addDropShadow. self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded. - self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Thu Nov 12 09:07:28 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 12 Nov 2020 10:07:28 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <,> Message-ID: Hi all. I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. Best, Marcel Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : Hi all, > And canUnderstand: ?  Or is that being too picky? > If the doesNotUnderstand: is not visible externally then who cares?  Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? [http://www.hpi.de/] Well, my conception of the general contract would be exactly the following: (o class canUnderstand: m) ifTrue: [     self assert: [o respondsTo: m]]. (o respondsTo: m) ifFalse: [     self deny: [o class canUnderstand: m]]. (o respondsTo: m) ifTrue: [     self shouldnt: [o m] raise: MessageNotUnderstood]. [o m] on: MessageNotUnderstood do: [     self deny: [o respondsTo: m]]. But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the current discussion shows that the same argument applies for the second statement, too. > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... Best, Christoph Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Dienstag, 10. November 2020 09:34:49 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project   > and generate the getter setter on demand (via doesNotUnderstand:) That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder [https://github.com/hpi-swa/MessageSendRecorder] 's MessageSendRecordExtension. Best. Marcel Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html [http://www.squeaksource.com/STEM.html] Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda : On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ?  Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html [http://forum.world.st/Squeak-Dev-f45488.html] -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.thiede at student.hpi.uni-potsdam.de Thu Nov 12 10:09:43 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Thu, 12 Nov 2020 04:09:43 -0600 (CST) Subject: [squeak-dev] Fixing the infinite debugger chains? (was: Code simulation error (was Re: I broke the debugger?)) In-Reply-To: References: <7f6c15ae3dfe453993e550bfdda4338c@student.hpi.uni-potsdam.de> <393ca31eb79f431dbc7633e3f94ab747@student.hpi.uni-potsdam.de> <1582497902561-0.post@n4.nabble.com> <44c04727494e43a6bb4d547499f908cf@student.hpi.uni-potsdam.de> <1603889444900-0.post@n4.nabble.com> <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> Message-ID: <1605175783149-0.post@n4.nabble.com> Hi Marcel! > Think of simulating "7/0". I don't understand what you mean. :-) [7 / 0] ifError: [#error] returns #error. [[7 / 0] newProcess runUntil: [:c | c isDead]] ifError: [#error] does not. The only exception is signaled *in* the simulation process, it shows up a debugger, but the exception does not arrive at the simulating process. Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From marcel.taeumel at hpi.de Thu Nov 12 14:24:34 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Thu, 12 Nov 2020 15:24:34 +0100 Subject: [squeak-dev] Fixing the infinite debugger chains? (was: Code simulation error (was Re: I broke the debugger?)) In-Reply-To: <1605175783149-0.post@n4.nabble.com> References: <7f6c15ae3dfe453993e550bfdda4338c@student.hpi.uni-potsdam.de> <393ca31eb79f431dbc7633e3f94ab747@student.hpi.uni-potsdam.de> <1582497902561-0.post@n4.nabble.com> <44c04727494e43a6bb4d547499f908cf@student.hpi.uni-potsdam.de> <1603889444900-0.post@n4.nabble.com> <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> <1605175783149-0.post@n4.nabble.com> Message-ID: Hi Christoph. Sounds good then. :-) Best, Marcel Am 12.11.2020 11:09:52 schrieb Christoph Thiede : Hi Marcel! > Think of simulating "7/0". I don't understand what you mean. :-) [7 / 0] ifError: [#error] returns #error. [[7 / 0] newProcess runUntil: [:c | c isDead]] ifError: [#error] does not. The only exception is signaled *in* the simulation process, it shows up a debugger, but the exception does not arrive at the simulating process. Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Thu Nov 12 15:48:32 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Thu, 12 Nov 2020 15:48:32 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1364.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1364.mcz ==================== Summary ==================== Name: Kernel-ct.1364 Author: ct Time: 12 November 2020, 4:48:28.956502 pm UUID: 564764e7-f95f-8a40-b95a-67241eced1f9 Ancestors: Kernel-eem.1361 Fixes primitive comments in BlockClosure >> (cull:){3,4}. See http://forum.world.st/The-Trunk-Kernel-eem-1355-mcz-td5124164.html. =============== Diff against Kernel-eem.1361 =============== Item was changed: ----- Method: BlockClosure>>cull:cull:cull: (in category 'evaluating') ----- cull: firstArg cull: secondArg cull: thirdArg "Activate the receiver, with three or less arguments." + "Handle the three argument case primitively" - "Handle the two argument case primitively" numArgs >= 2 ifTrue: [ numArgs >= 3 ifTrue: [ ^self value: firstArg value: secondArg value: thirdArg ]. ^self value: firstArg value: secondArg ]. numArgs = 1 ifTrue: [ ^self value: firstArg ]. ^self value! Item was changed: ----- Method: BlockClosure>>cull:cull:cull:cull: (in category 'evaluating') ----- cull: firstArg cull: secondArg cull: thirdArg cull: fourthArg "Activate the receiver, with four or less arguments." + "Handle the four argument case primitively" - "Handle the two argument case primitively" numArgs >= 3 ifTrue: [ numArgs >= 4 ifTrue: [ ^self value: firstArg value: secondArg value: thirdArg value: fourthArg ]. ^self value: firstArg value: secondArg value: thirdArg ]. numArgs = 2 ifTrue: [ ^self value: firstArg value: secondArg ]. numArgs = 1 ifTrue: [ ^self value: firstArg ]. ^self value! From Christoph.Thiede at student.hpi.uni-potsdam.de Thu Nov 12 15:56:13 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Thu, 12 Nov 2020 15:56:13 +0000 Subject: [squeak-dev] Bug: McmUpdater loads trunk updates into the wrong changesets Message-ID: <08274dced588479b868e95688c42f7cd@student.hpi.uni-potsdam.de> I just noticed that the changesets generated by McmUpdater (I guess) are not assigned correctly to the new loaded patches: Consider this: [cid:0144bcfc-b7b8-4c85-b0e4-7e7dde7eaa65] versus this: [cid:711fbf34-3384-4621-90f2-0ae5a0ab9b85] [cid:6a6d8863-009b-4cf8-a0f0-5311c5723887] I suppose this is related to the update map mechanism? However, I'm quite sure this is a bug because I'd like to directly see to which trunk version a method version is related. If the changeset does not correspond to the method version, it should be named using the update map name. What do you think? :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 50918 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 17530 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 27164 bytes Desc: pastedImage.png URL: From vanessa at codefrau.net Thu Nov 12 20:25:47 2020 From: vanessa at codefrau.net (Vanessa Freudenberg) Date: Thu, 12 Nov 2020 12:25:47 -0800 Subject: [squeak-dev] Bug: McmUpdater loads trunk updates into the wrong changesets In-Reply-To: <08274dced588479b868e95688c42f7cd@student.hpi.uni-potsdam.de> References: <08274dced588479b868e95688c42f7cd@student.hpi.uni-potsdam.de> Message-ID: That is an interesting observation. MCMUpdater is designed to update the system as quickly as possible. One of its features is to not load every single MC version in sequence, but only the latest, if possible. That means all changes from what was in your image previously to what is being loaded will be lumped into the same exact changeset. There are several ways around this. The most simple one might be naming the changeset something like "Kernel-eem.1350-to-Kernel-eem.1361" if version 1361 is loaded on top of 1350. This would only require changes to MCLoader (IIRC it generates the changeset name). A slower option would be to load each package version separately, which would slow down updating but put every change in a separate changeset. This would fail if intermediate versions are broken though. I would advise against it. I'm not sure using the trunk version would be as useful. If you want to try that, the version would have to be updated before loading each package (trunk version is basically the sum of latest version numbers for all packages present in the latest update map), or you could rename the changesets after. Using the update map name itself would be even less useful, since we only issue update maps to force loading certain versions before the update process can continue. In normal trunk development, the last published update map is re-used over and over to define the order of package updates, but the versions itself are typically newer than what's found in the stored map. A wholly different approach would be to not show the changeset name in the browser, but to somehow get that version info from MC. MC does not directly support that, MC is not based on delta versioning but on full snapshots conceptually. However, IIRC Chris added some kind of version query to the Magma version of the squeaksource server though. Since that holds all method versions in a database it's easy to figure out in which version it changed. Integrating the System Browser with MC might be a good idea going forward. - Vanessa - On Thu, Nov 12, 2020 at 7:56 AM Thiede, Christoph < Christoph.Thiede at student.hpi.uni-potsdam.de> wrote: > I just noticed that the changesets generated by McmUpdater (I guess) are > not assigned correctly to the new loaded patches: > > > Consider this: > > > versus this: > > > > > I suppose this is related to the update map mechanism? However, I'm > quite sure this is a bug because I'd like to directly see to which trunk > version a method version is related. If the changeset does not correspond > to the method version, it should be named using the update map name. > > > What do you think? :-) > > > Best, > > Christoph > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 50918 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 17530 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 27164 bytes Desc: not available URL: From trygver at ifi.uio.no Fri Nov 13 06:59:57 2020 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Fri, 13 Nov 2020 07:59:57 +0100 Subject: [squeak-dev] Download of latest version of Loke/BabyIDE image? (was Re: A Sad Day ??? concluded) In-Reply-To: References: Message-ID: Hi, I have a long and a short story. The short story is *The BabyIDE image in now back on Mendeley** **https://data.mendeley.com/datasets/5xxgzv7fsp/1* I have also written a user guide for all the programs in the image. I'm working on making both files available on the Squeak website (on GitHub). Cheers Trygve On 2020-11-04 16:41, H. Hirzel wrote: > Hello > > I was looking for the latest version of the > > Loke/BabyIDE image > > at https://data.mendeley.com/datasets/5xxgzv7fsp/1 > >>>> The image is my program repository. It includes some examples of DCI >>>> programming, Ellen's Personal Programming IDE, Squeak Reverse >>>> Engineering >>>> (SRE), and more.) > It is no longer available at this mendeley url as it is not a dataset > but a program. > Could somebody who has downloaded it please make it available on the > squeak web site? > > Thank you > Regards > Hannes > > > > > On 10/4/20, David T. Lewis wrote: >> Thank you Trygve, >> >> I confirm also that the image runs very well on my Ubuntu Linux laptop >> with a VM compiled per http://wiki.squeak.org/squeak/6354. >> >> Dave >> >> On Sat, Oct 03, 2020 at 07:56:43PM +0900, masato sumi wrote: >>> Dear Trygve, >>> >>> I confirmed that I could launch the Loke/BabyIDE image with the included >>> SqueakVM for Windows (8.1 and 10) >>> and I could also launch it in a web browser by using the SqueakJS VM ( >>> https://squeak.js.org/run ). >>> >>> Thank you very much. >>> >>> -- >>> sumim >>> >>> 2020-10-03 15:48 Trygve Reenskaug : >>> >>>> Dear Sumim, >>>> Thank you for your kind words. >>>> >>>> The latest version of Loke/BabyIDE written on Squeak3.10.2 is at >>>> https://data.mendeley.com/datasets/5xxgzv7fsp/1 >>>> The image is my program repository. It includes some examples of DCI >>>> programming, Ellen's Personal Programming IDE, Squeak Reverse >>>> Engineering >>>> (SRE), and more. >>>> >>>> Best >>>> --Trygve >>>> >>>> On 2020-10-02 20:14, masato sumi wrote: >>>> >>>> Dear Trygve, >>>> >>>> Thank you for your very long term contribution and efforts. >>>> >>>> I'm very sorry that I couldn't help you at all now. >>>> >>>> I'm afraid, but could you please make your latest version of >>>> Loke/BabyIDE >>>> written on Squeak3.10.2 available for future generations of researchers >>>> and/or followers? >>>> >>>> Anyway, I think your ideas and thoughts should be passed on to future >>>> generations as faithfully as we can possible, and I myself will try to >>>> make >>>> sure that. >>>> >>>> Thank you so much and goodbye. >>>> Please take care of yourself. >>>> >>>> -- >>>> sumim >>>> >>>> 2020-10-03 0:54 Trygve Reenskaug : >>>> >>>>> Dear all, >>>>> I need to use many words to explore why I can't understand current >>>>> Squeak >>>>> code. I believe the reason is a profound one, and I hope some of you >>>>> have >>>>> the patience to read about it. >>>>> >>>>> Thank you for your responses to my 'A Sad Day'-message. One response >>>>> said >>>>> "*But please don't give up as an inventor of MVC, which has simplified >>>>> writing software for all of us.* >>>>> >>>>> >>>>> *We need new ideas to stabilize Smalltalk." *As to MVC, it was received >>>>> with acclamation when I first presented it at PARC in 1978, and people >>>>> suggested I should make it the theme of my article in the special >>>>> Smalltalk >>>>> issue of Byte. I couldn't understand it; MVC was so simple and obvious >>>>> that >>>>> is was not worth writing about it. Nevertheless, people seem to have >>>>> problems understanding MVC. It took me a long time before I gleaned >>>>> what >>>>> was going on. The explanation is a deep one, rooted in our different >>>>> mental >>>>> paradigms. >>>>> >>>>> From around 1970, I was working on Prokon, a distributed system for >>>>> managers in the shipbuilding industry: >>>>> >>>>> Every manager has their own computer that they use for augmenting >>>>> their >>>>> mind. The manager understands their software and ideally writes it >>>>> themselves. Managers delegate conversations with other managers to >>>>> their >>>>> computer's M-to-M network. (Marked with a heavy black line in the >>>>> figure). >>>>> I chose "distributed planning with central control" as my example >>>>> project. >>>>> Each manager creates a plan for their department, using apps suited to >>>>> their particular needs. A **distributed algorithm** ensures consistency >>>>> across departments. >>>>> >>>>> I came to PARC in 1978 and could immediately relate to the Smalltalk >>>>> image with its universe of collaborating objects. Alan's definition of >>>>> object-orientation fitted my Prokon model: "Thus its semantics are a >>>>> bit >>>>> like having thousands and thousands of computers all hooked together by >>>>> a >>>>> very fast network." >>>>> >>>>> MVC prescribes a network of communicating objects. Any object can fill >>>>> one or more positions in the network as long as it has the required >>>>> behavior; their classes are irrelevant. It's so simple that it's not >>>>> worth >>>>> writing about it. >>>>> >>>>> >>>>> ==================== >>>>> >>>>> The work on this post was interrupted at this point by an unexpected >>>>> week >>>>> in hospital. It gave me quiet days of pondering the futility of what I >>>>> am >>>>> doing and I will be terminating my memberships in the Pharo and Squeak >>>>> mailing lists. I have also deleted most of the old draft of this >>>>> message >>>>> and will quickly conclude with two observations: >>>>> >>>>> >>>>> 1. >>>>> The Smalltalk image is a universe of communicating objects. I call >>>>> it >>>>> an object computer. It can be seen as the model of an entirely new >>>>> kind of >>>>> computer, a model on a level closer to the human mind than the von >>>>> Neumann >>>>> model of 1948. The new model is communication-centric and should >>>>> supersede >>>>> the ubiquitous CPU-centric model as soon as possible. Working out >>>>> the >>>>> details of this idea could make an exciting and disruptive Ph.D. >>>>> thesis. >>>>> 2. >>>>> Smalltalk is called a programming language. It is a curious one, >>>>> very >>>>> different from well-known languages like Java with their syntax and >>>>> semantics. Smalltalk, as a programming language, does not have the >>>>> concept >>>>> of a program. Smalltalk, as a class-oriented language, does not have >>>>> syntax >>>>> for the declaration of a class. Smalltalk, as an object-oriented >>>>> language, >>>>> can't describe how objects collaborate to achieve a goal. You appear >>>>> to be >>>>> happy with this state of affairs, at least, I see no sign of anybody >>>>> wanting to move on from the unfinished Smalltalk language to a >>>>> mature >>>>> development environment. I do not find it satisfactory and it is not >>>>> acceptable to the intended managers populating the distributed >>>>> system shown >>>>> in the first picture. Consequently, I have done something about it >>>>> as >>>>> described in my SoSym article "*Personal Programming and the Object >>>>> Computer.*" I am tired of being alone in my endeavors and this ends >>>>> my work with Squeak and other Smalltalks. I wish you health and >>>>> happiness >>>>> wherever you happen to be. >>>>> >>>>> Trygve >>>>> Personal programming and the object computer >>>>> https://doi.org/10.1007/s10270-019-00768-3 >>>>> >>>>> -- >>>>> >>>>> *The essence of object orientation is that objects collaborate to >>>>> achieve a goal. * >>>>> Trygve Reenskaug mailto: trygver at ifi.uio.no >>>>> <%20trygver at ifi.uio.no> >>>>> Morgedalsvn. 5A http://folk.uio.no/trygver/ >>>>> N-0378 Oslo http://fullOO.info >>>>> Norway Tel: (+47) 468 58 625 >>>>> >>>>> >>>> -- >>>> >>>> *The essence of object orientation is that objects collaborate to >>>> achieve >>>> a goal. * >>>> Trygve Reenskaug mailto: trygver at ifi.uio.no <%20trygver at ifi.uio.no> >>>> Morgedalsvn. 5A http://folk.uio.no/trygver/ >>>> N-0378 Oslo http://fullOO.info >>>> Norway Tel: (+47) 468 58 625 >>>> >> >> >> >> >> -- /The essence of object orientation is that objects collaborateto achieve a goal. / Trygve Reenskaug mailto: trygver at ifi.uio.no Morgedalsvn. 5A http://heim.ifi.uio.no/trygver/ N-0378 Oslo http://fullOO.info Norway                     Tel: (+47) 468 58 625 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 13 10:04:59 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 13 Nov 2020 10:04:59 +0000 Subject: [squeak-dev] Bug: McmUpdater loads trunk updates into the wrong changesets In-Reply-To: References: <08274dced588479b868e95688c42f7cd@student.hpi.uni-potsdam.de>, Message-ID: <4cb89a5346d547febbe5848517372e51@student.hpi.uni-potsdam.de> Hi Vanessa, > A wholly different approach would be to not show the changeset name in the browser, but to somehow get that version info from MC. MC does not directly support that, MC is not based on delta versioning but on full snapshots conceptually. However, IIRC Chris added some kind of version query to the Magma version of the squeaksource server though. Since that holds all method versions in a database it's easy to figure out in which version it changed. > > Integrating the System Browser with MC might be a good idea going forward. Yeah, I have already had some similar thoughts in the past, it would be very useful to have an MC [and maybe also a Squot] integration to the Versions Browser. Use Case: For each version of a method, show the original MC version (inbox/trunk) [or the original git commit]. I have spent a lot of time doing this process manually a few times via the mailing list archive when such a feature would be really helpful for me. I have no idea how big such a database that assigns a version pointer to each method version would be, but ideally, we could store and update this DB directly in the Trunk image. In my image, there are ca. 64k CompiledMethod instances, so the DB should be only a few megabytes large? Alternatively, we could fetch this information dynamically, but I doubt this would be very convenient since it would require an active internet connection whenever you are browsing ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Vanessa Freudenberg Gesendet: Donnerstag, 12. November 2020 21:25:47 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Bug: McmUpdater loads trunk updates into the wrong changesets That is an interesting observation. MCMUpdater is designed to update the system as quickly as possible. One of its features is to not load every single MC version in sequence, but only the latest, if possible. That means all changes from what was in your image previously to what is being loaded will be lumped into the same exact changeset. There are several ways around this. The most simple one might be naming the changeset something like "Kernel-eem.1350-to-Kernel-eem.1361" if version 1361 is loaded on top of 1350. This would only require changes to MCLoader (IIRC it generates the changeset name). A slower option would be to load each package version separately, which would slow down updating but put every change in a separate changeset. This would fail if intermediate versions are broken though. I would advise against it. I'm not sure using the trunk version would be as useful. If you want to try that, the version would have to be updated before loading each package (trunk version is basically the sum of latest version numbers for all packages present in the latest update map), or you could rename the changesets after. Using the update map name itself would be even less useful, since we only issue update maps to force loading certain versions before the update process can continue. In normal trunk development, the last published update map is re-used over and over to define the order of package updates, but the versions itself are typically newer than what's found in the stored map. A wholly different approach would be to not show the changeset name in the browser, but to somehow get that version info from MC. MC does not directly support that, MC is not based on delta versioning but on full snapshots conceptually. However, IIRC Chris added some kind of version query to the Magma version of the squeaksource server though. Since that holds all method versions in a database it's easy to figure out in which version it changed. Integrating the System Browser with MC might be a good idea going forward. - Vanessa - On Thu, Nov 12, 2020 at 7:56 AM Thiede, Christoph > wrote: I just noticed that the changesets generated by McmUpdater (I guess) are not assigned correctly to the new loaded patches: Consider this: [cid:175be07a207f456b1e51] versus this: [cid:175be07a207f456b1e52] [cid:175be07a207f456b1e53] I suppose this is related to the update map mechanism? However, I'm quite sure this is a bug because I'd like to directly see to which trunk version a method version is related. If the changeset does not correspond to the method version, it should be named using the update map name. What do you think? :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 50918 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 17530 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 27164 bytes Desc: pastedImage.png URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 13 15:14:28 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 13 Nov 2020 15:14:28 +0000 Subject: [squeak-dev] http://source.squeak.org/*/?action=history broken Message-ID: Hi all, hi Chris, looks as if the features "browse mc history"/"browse mc revisions" in a Browser do not work any longer. I only get timeouts from the source.squeak.org server (can reproduce this in a browser). Anyone willing to have a look into this? And maybe we should write regression tests as soon as this got fixed. :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Fri Nov 13 18:07:33 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 18:07:33 0000 Subject: [squeak-dev] The Inbox: Compiler-ct.452.mcz Message-ID: A new version of Compiler was added to project The Inbox: http://source.squeak.org/inbox/Compiler-ct.452.mcz ==================== Summary ==================== Name: Compiler-ct.452 Author: ct Time: 13 November 2020, 7:07:30.464415 pm UUID: a40e8327-95c2-f448-8edd-0aa087a5c930 Ancestors: Compiler-eem.451 Reworks public Compiler interface and documentation: - Parser: Do not use #fail in the event of an internal error unless compilation is interactive. This was a single precedent case. - Correct description of compilation error handling: failBlock is *not* evaluated any longer if the requestor is nil since I eliminated the above precedent (I validated that twice). Mention SyntaxErrorNotification explicitly instead of referring to the ToolSet-specific SyntaxError tool. - Provide new convenience selectors #compileNoPattern: and #compileNoPattern:in: on Compiler instance side. - Unify method comment format and phrases. - Ban ST80-specific term "controller" from the argument names. =============== Diff against Compiler-eem.451 =============== Item was changed: ----- Method: Compiler class>>evaluate: (in category 'evaluating') ----- evaluate: textOrString + "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor. + Compilation is carried out with respect to nil, i.e., no object, and the invocation is not logged." - "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor. - Compilation is carried out with respect to nil, i.e., no object, and the - invocation is not logged." ^self evaluate: textOrString for: nil! Item was changed: ----- Method: Compiler class>>evaluate:for: (in category 'evaluating') ----- evaluate: textOrString for: anObject + "See Compiler|evaluate:for:notifying:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor." - "See Compiler|evaluate:for:notifying:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor." ^self evaluate: textOrString for: anObject notifying: nil! Item was changed: ----- Method: Compiler class>>evaluate:for:logged: (in category 'evaluating logged') ----- evaluate: textOrString for: anObject logged: logFlag + "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor." - "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor." ^self evaluate: textOrString for: anObject notifying: nil logged: logFlag! Item was changed: ----- Method: Compiler class>>evaluate:for:notifying: (in category 'evaluating') ----- + evaluate: textOrString for: anObject notifying: requestor + "Compile and execute the argument, textOrString with respect to the class of anObject. If a compilation error occurs, use requestor for interactive error correction." - evaluate: textOrString for: anObject notifying: aController - "Compile and execute the argument, textOrString with respect to the class - of anObject. If a compilation error occurs, notify aController." ^ self new evaluate: textOrString in: nil to: anObject + notifying: requestor - notifying: aController ifFail: [^nil]! Item was changed: ----- Method: Compiler class>>evaluate:for:notifying:logged: (in category 'evaluating logged') ----- + evaluate: textOrString for: anObject notifying: requestor logged: logFlag + "Compile and execute the argument, textOrString with respect to the class of anObject. + If a compilation error occurs, use requestor for interactive error correction. + If both compilation and execution are successful then, if logFlag is true, log (write) the text onto a system changes file so that it can be replayed if necessary." - evaluate: textOrString for: anObject notifying: aController logged: logFlag - "Compile and execute the argument, textOrString with respect to the class - of anObject. If a compilation error occurs, notify aController. If both - compilation and execution are successful then, if logFlag is true, log - (write) the text onto a system changes file so that it can be replayed if - necessary." ^ self new evaluate: textOrString in: nil to: anObject + notifying: requestor - notifying: aController ifFail: [^nil] logged: logFlag.! Item was changed: ----- Method: Compiler class>>evaluate:in:notifying:logged: (in category 'evaluating logged') ----- + evaluate: textOrString in: anEnvironment notifying: requestor logged: logFlag - evaluate: textOrString in: anEnvironment notifying: aController logged: logFlag "Compile and execute the argument, textOrString in anEnvironment. + If a compilation error occurs, use requestor for interactive error correction. + If both compilation and execution are successful then, if logFlag is true, log (write) the text onto a system changes file so that it can be replayed if necessary." - If a compilation error occurs, notify aController. If both - compilation and execution are successful then, if logFlag is true, log - (write) the text onto a system changes file so that it can be replayed if - necessary." ^ self new evaluate: textOrString in: anEnvironment + notifying: requestor - notifying: aController logged: logFlag.! Item was changed: ----- Method: Compiler class>>evaluate:logged: (in category 'evaluating logged') ----- evaluate: textOrString logged: logFlag + "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is raised rather than notifying any requestor. - "See Compiler|evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor. Compilation is carried out with respect to nil, i.e., no object." ^self evaluate: textOrString for: nil logged: logFlag! Item was changed: ----- Method: Compiler class>>evaluate:notifying: (in category 'evaluating') ----- + evaluate: textOrString notifying: requestor + "See Compiler|evaluate:for:notifying:logged:. Compilation is carried out with respect to nil, i.e., no object." - evaluate: textOrString notifying: aController - "See Compiler|evaluate:for:notifying:logged:. Compilation is carried out - with respect to nil, i.e., no object." + ^self evaluate: textOrString for: nil notifying: requestor! - ^self evaluate: textOrString for: nil notifying: aController! Item was changed: ----- Method: Compiler class>>evaluate:notifying:logged: (in category 'evaluating logged') ----- + evaluate: textOrString notifying: requestor logged: logFlag + "See Compiler|evaluate:for:notifying:logged:. Compilation is carried out with respect to nil, i.e., no object." - evaluate: textOrString notifying: aController logged: logFlag - "See Compiler|evaluate:for:notifying:logged:. Compilation is carried out - with respect to nil, i.e., no object." + ^self evaluate: textOrString for: nil notifying: requestor logged: logFlag! - ^self evaluate: textOrString for: nil notifying: aController logged: logFlag! Item was changed: ----- Method: Compiler class>>format:in:notifying: (in category 'evaluating') ----- + format: textOrStream in: aClass notifying: requestor + ^self new format: textOrStream in: aClass notifying: requestor! - format: textOrStream in: aClass notifying: aRequestor - ^self new format: textOrStream in: aClass notifying: aRequestor! Item was changed: ----- Method: Compiler class>>format:in:notifying:decorated: (in category 'evaluating') ----- + format: textOrStream in: aClass notifying: requestor decorated: aBoolean + ^self new format: textOrStream in: aClass notifying: requestor decorated: aBoolean! - format: textOrStream in: aClass notifying: aRequestor decorated: aBoolean - ^self new format: textOrStream in: aClass notifying: aRequestor decorated: aBoolean! Item was changed: ----- Method: Compiler>>compile:ifFail: (in category 'public access') ----- compile: aCue ifFail: failBlock + "Answer a MethodNode. + If the cue requestor is not nil, use it for interactive error correction, and evaluate failBlock after the compilation has been aborted. + The MethodNode is the root of a parse tree. It can be told to generate a CompiledMethod to be installed in the method dictionary of the class specified by the context." - "Answer a MethodNode. If the MethodNode can not be created, notify - the requestor in the contxt. If the requestor is nil, evaluate failBlock - instead. The MethodNode is the root of a parse tree. It can be told - to generate a CompiledMethod to be installed in the method dictionary - of the class specified by the context." ^self compileCue: aCue noPattern: false + ifFail: failBlock! - ifFail: failBlock ! Item was changed: ----- Method: Compiler>>compile:in:environment:notifying:ifFail: (in category 'public access') ----- + compile: textOrStream in: aClass environment: anEnvironment notifying: requestor ifFail: failBlock + "Answer a MethodNode for the argument, textOrStream. + If requestor is not nil, use it for interactive error correction, and evaluate failBlock after the compilation has been aborted. + The MethodNode is the root of a parse tree. It can be told to generate a CompiledMethod to be installed in the method dictionary of the argument, aClass." - compile: textOrStream in: aClass environment: anEnvironment notifying: aRequestor ifFail: failBlock - "Answer a MethodNode for the argument, textOrStream. If the - MethodNode can not be created, notify the argument, aRequestor; if - aRequestor is nil, evaluate failBlock instead. The MethodNode is the root - of a parse tree. It can be told to generate a CompiledMethod to be - installed in the method dictionary of the argument, aClass." ^self compileCue: (CompilationCue source: textOrStream class: aClass environment: anEnvironment + requestor: requestor) - requestor: aRequestor) noPattern: false + ifFail: failBlock! - ifFail: failBlock - ! Item was changed: ----- Method: Compiler>>compile:in:notifying:ifFail: (in category 'public access') ----- + compile: textOrStream in: aClass notifying: requestor ifFail: failBlock + "Answer a MethodNode for the argument, textOrStream. + If requestor is not nil, use it for interactive error correction, and evaluate failBlock after the compilation has been aborted. + The MethodNode is the root of a parse tree. It can be told to generate a CompiledMethod to be installed in the method dictionary of the argument, aClass." - compile: textOrStream in: aClass notifying: aRequestor ifFail: failBlock - "Answer a MethodNode for the argument, textOrStream. If the - MethodNode can not be created, notify the argument, aRequestor; if - aRequestor is nil, evaluate failBlock instead. The MethodNode is the root - of a parse tree. It can be told to generate a CompiledMethod to be - installed in the method dictionary of the argument, aClass." ^self compileCue: (CompilationCue source: textOrStream class: aClass + requestor: requestor) - requestor: aRequestor) noPattern: false + ifFail: failBlock! - ifFail: failBlock - ! Item was changed: ----- Method: Compiler>>compileCue:noPattern:ifFail: (in category 'private') ----- compileCue: aCue noPattern: aBoolean ifFail: failBlock "Answer a MethodNode corresponding to cue source. + If the cue requestor is not nil, use it for interactive error correction, and evaluate failBlock after the compilation has been aborted. + The MethodNode is the root of a parse tree. It can be told to generate a CompiledMethod: - If the MethodNode can not be created, notify the cue requestor. - If the cue requestor is nil, evaluate failBlock instead. - The MethodNode is the root of a parse tree. - It can be told to generate a CompiledMethod - either to be evaluated in cue context if aBoolean is true, with cue receiver as method receiver, - or to be installed in the method dictionary of the target class specified by the cue if aBoolean is false." + - self setCue: aCue. ^self translateNoPattern: aBoolean ifFail: failBlock! Item was added: + ----- Method: Compiler>>compileNoPattern: (in category 'public access') ----- + compileNoPattern: textOrStream + + ^ self + compileNoPattern: textOrStream + in: nil class! Item was added: + ----- Method: Compiler>>compileNoPattern:in: (in category 'public access') ----- + compileNoPattern: textOrStream in: aClass + + ^ self + compileNoPattern: textOrStream + in: aClass + notifying: nil + ifFail: [^ nil]! Item was changed: ----- Method: Compiler>>compileNoPattern:in:context:environment:notifying:ifFail: (in category 'public access') ----- + compileNoPattern: textOrStream in: aClass context: aContext environment: anEnvironment notifying: requestor ifFail: failBlock - compileNoPattern: textOrStream in: aClass context: aContext environment: anEnvironment notifying: aRequestor ifFail: failBlock "Similar to #compile:in:notifying:ifFail:, but the compiled code is expected to be a do-it expression, with no message pattern, and it will be in an explicit environment." ^self compileCue: (CompilationCue source: textOrStream context: aContext class: aClass environment: anEnvironment + requestor: requestor) - requestor: aRequestor) noPattern: true + ifFail: failBlock! - ifFail: failBlock - ! Item was changed: ----- Method: Compiler>>compileNoPattern:in:context:notifying:ifFail: (in category 'public access') ----- + compileNoPattern: textOrStream in: aClass context: aContext notifying: requestor ifFail: failBlock - compileNoPattern: textOrStream in: aClass context: aContext notifying: aRequestor ifFail: failBlock "Similar to #compile:in:notifying:ifFail:, but the compiled code is expected to be a do-it expression, with no message pattern." ^self compileCue: (CompilationCue source: textOrStream context: aContext class: aClass + requestor: requestor) - requestor: aRequestor) noPattern: true + ifFail: failBlock! - ifFail: failBlock - ! Item was changed: ----- Method: Compiler>>compileNoPattern:in:notifying:ifFail: (in category 'public access') ----- + compileNoPattern: textOrStream in: aClass notifying: requestor ifFail: failBlock - compileNoPattern: textOrStream in: aClass notifying: aRequestor ifFail: failBlock "Similar to #compile:in:notifying:ifFail:, but the compiled code is expected to be a do-it expression, with no message pattern." ^self compileCue: (CompilationCue source: textOrStream class: aClass + requestor: requestor) - requestor: aRequestor) noPattern: true + ifFail: failBlock! - ifFail: failBlock - ! Item was changed: ----- Method: Compiler>>compiledMethodFor:in:to:notifying:ifFail: (in category 'public access') ----- + compiledMethodFor: textOrStream in: aContext to: receiver notifying: requestor ifFail: failBlock + "Compiles the sourceStream into a parse tree, then generates code into a method, and answers it. + If receiver is not nil, then the text can refer to instance variables of that receiver (the Inspector uses this). + If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). + If requestor is not nil, use it for interactive error correction, and evaluate failBlock after the compilation has been aborted." - compiledMethodFor: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock - "Compiles the sourceStream into a parse tree, then generates code - into a method, and answers it. If receiver is not nil, then the text can - refer to instance variables of that receiver (the Inspector uses this). - If aContext is not nil, the text can refer to temporaries in that context - (the Debugger uses this). If aRequestor is not nil, then it will receive a - notify:at: message before the attempt to evaluate is aborted." | methodNode method | methodNode := self compileNoPattern: textOrStream in: (self classForReceiver: receiver context: aContext) context: aContext + notifying: requestor - notifying: aRequestor ifFail: [^failBlock value]. method := self interactive ifTrue: [ methodNode generateWithTempNames ] ifFalse: [ methodNode generate ]. ^method! Item was changed: ----- Method: Compiler>>compiledMethodFor:in:to:notifying:ifFail:logged: (in category 'public access logging') ----- + compiledMethodFor: textOrStream in: aContext to: receiver notifying: requestor ifFail: failBlock logged: logFlag + "Compiles the sourceStream into a parse tree, then generates code into a method, and answers it. + If receiver is not nil, then the text can refer to instance variables of that receiver (the Inspector uses this). + If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). + If requestor is not nil, use it for interactive compilation, and evaluate failBlock after the compilation has been aborted." - compiledMethodFor: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag - "Compiles the sourceStream into a parse tree, then generates code - into a method, and answers it. If receiver is not nil, then the text can - refer to instance variables of that receiver (the Inspector uses this). - If aContext is not nil, the text can refer to temporaries in that context - (the Debugger uses this). If aRequestor is not nil, then it will receive a - notify:at: message before the attempt to evaluate is aborted." | method | method := self compiledMethodFor: textOrStream in: aContext to: receiver + notifying: requestor - notifying: aRequestor ifFail: [^failBlock value]. logFlag ifTrue: [SystemChangeNotifier uniqueInstance evaluated: cue stringToLog context: aContext]. ^method! Item was changed: ----- Method: Compiler>>evaluate: (in category 'public access') ----- evaluate: textOrString + "See evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor. + Compilation is carried out with respect to nil, i.e., no object, and the invocation is not logged." - "See evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor. - Compilation is carried out with respect to nil, i.e., no object, and the - invocation is not logged." ^self evaluate: textOrString for: nil! Item was changed: ----- Method: Compiler>>evaluate:for: (in category 'public access') ----- evaluate: textOrString for: anObject + "See evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor." - "See evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor." ^self evaluate: textOrString for: anObject notifying: nil! Item was changed: ----- Method: Compiler>>evaluate:for:logged: (in category 'public access logging') ----- evaluate: textOrString for: anObject logged: logFlag + "See evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxError is signaled rather than notifying any requestor." - "See evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor." ^self evaluate: textOrString for: anObject notifying: nil logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:for:notifying: (in category 'public access') ----- + evaluate: textOrString for: anObject notifying: requestor + "Compile and execute the argument, textOrString with respect to the class of anObject. If a compilation error occurs, use requestor for interactive compilation." - evaluate: textOrString for: anObject notifying: aController - "Compile and execute the argument, textOrString with respect to the class - of anObject. If a compilation error occurs, notify aController." ^ self evaluate: textOrString in: nil to: anObject + notifying: requestor - notifying: aController ifFail: [^nil]! Item was changed: ----- Method: Compiler>>evaluate:for:notifying:logged: (in category 'public access logging') ----- + evaluate: textOrString for: anObject notifying: requestor logged: logFlag + "Compile and execute the argument, textOrString with respect to the class of anObject. + If a compilation error occurs, use requestor for interactive compilation. + If both compilation and execution are successful then, if logFlag is true, log (write) the text onto a system changes file so that it can be replayed if necessary." - evaluate: textOrString for: anObject notifying: aController logged: logFlag - "Compile and execute the argument, textOrString with respect to the class - of anObject. If a compilation error occurs, notify aController. If both - compilation and execution are successful then, if logFlag is true, log - (write) the text onto a system changes file so that it can be replayed if - necessary." ^ self evaluate: textOrString in: nil to: anObject + notifying: requestor - notifying: aController ifFail: [^nil] logged: logFlag.! Item was changed: ----- Method: Compiler>>evaluate:in:environment:notifying:ifFail:logged: (in category 'public access logging') ----- + evaluate: textOrStream in: aContext environment: anEnvironment notifying: requestor ifFail: failBlock logged: logFlag + "Compiles the sourceStream into a parse tree, then generates code into a method. + If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). + If requestor is not nil, use it for interactive compilation, and evaluate failBlock after the compilation has been aborted. + Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method litter on errors." - evaluate: textOrStream in: aContext environment: anEnvironment notifying: aRequestor ifFail: failBlock logged: logFlag - "Compiles the sourceStream into a parse tree, then generates code into - a method. If aContext is not nil, the text can refer to temporaries in that - context (the Debugger uses this). If aRequestor is not nil, then it will receive - a notify:at: message before the attempt to evaluate is aborted. Finally, the - compiled method is invoked from here via withArgs:executeMethod:, hence - the system no longer creates Doit method litter on errors." ^self evaluateCue: (CompilationCue source: textOrStream context: aContext receiver: nil class: UndefinedObject environment: anEnvironment + requestor: requestor) - requestor: aRequestor) ifFail: failBlock logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:in:notifying:logged: (in category 'public access logging') ----- + evaluate: textOrString in: anEnvironment notifying: requestor logged: logFlag - evaluate: textOrString in: anEnvironment notifying: aController logged: logFlag "Compile and execute the argument, textOrString in anEnvironment. + If a compilation error occurs, use requestor for interactive compilation. + If both compilation and execution are successful then, if logFlag is true, log (write) the text onto a system changes file so that it can be replayed if necessary." - If a compilation error occurs, notify aController. If both - compilation and execution are successful then, if logFlag is true, log - (write) the text onto a system changes file so that it can be replayed if - necessary." ^self evaluate: textOrString in: nil environment: anEnvironment + notifying: requestor - notifying: aController ifFail: [^nil] logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:in:to:environment:notifying:ifFail:logged: (in category 'public access logging') ----- + evaluate: textOrStream in: aContext to: receiver environment: anEnvironment notifying: requestor ifFail: failBlock logged: logFlag - evaluate: textOrStream in: aContext to: receiver environment: anEnvironment notifying: aRequestor ifFail: failBlock logged: logFlag "Same as #evaluate:in:to:notifying:ifFail:logged: but with an explicit environment" ^self evaluateCue: (CompilationCue source: textOrStream context: aContext receiver: receiver class: (self classForReceiver: receiver context: aContext) environment: anEnvironment + requestor: requestor) - requestor: aRequestor) ifFail: failBlock logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:in:to:notifying:ifFail: (in category 'public access') ----- + evaluate: textOrStream in: aContext to: receiver notifying: requestor ifFail: failBlock + "Compiles the sourceStream into a parse tree, then generates code into a method. + If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). + If requestor is not nil, use it for interactive error correction, and evaluate failBlock if the compilation fails. + Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method litter on errors." + - evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock - "Compiles the sourceStream into a parse tree, then generates code into - a method. If aContext is not nil, the text can refer to temporaries in that - context (the Debugger uses this). If aRequestor is not nil, then it will receive - a notify:at: message before the attempt to evaluate is aborted. Finally, the - compiled method is invoked from here via withArgs:executeMethod:, hence - the system no longer creates Doit method litter on errors." - | theClass | theClass := self classForReceiver: receiver context: aContext. ^self evaluateCue: (CompilationCue source: textOrStream context: aContext receiver: receiver class: theClass environment: theClass environment + requestor: requestor) - requestor: aRequestor) ifFail: failBlock! Item was changed: ----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access logging') ----- + evaluate: textOrStream in: aContext to: receiver notifying: requestor ifFail: failBlock logged: logFlag + "Compiles the sourceStream into a parse tree, then generates code into a method. + If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). + If requestor is not nil, use it for interactive compilation, and evaluate failBlock if the compilation fails. + Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method litter on errors." + - evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag - "Compiles the sourceStream into a parse tree, then generates code into - a method. If aContext is not nil, the text can refer to temporaries in that - context (the Debugger uses this). If aRequestor is not nil, then it will receive - a notify:at: message before the attempt to evaluate is aborted. Finally, the - compiled method is invoked from here via withArgs:executeMethod:, hence - the system no longer creates Doit method litter on errors." | theClass | theClass := self classForReceiver: receiver context: aContext. ^self evaluateCue: (CompilationCue source: textOrStream context: aContext receiver: receiver class: theClass environment: theClass environment + requestor: requestor) - requestor: aRequestor) ifFail: failBlock logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:logged: (in category 'public access logging') ----- evaluate: textOrString logged: logFlag + "See evaluate:for:notifying:logged:. If a compilation error occurs, a SyntaxErrorNotification is signaled rather than notifying any requestor. - "See evaluate:for:notifying:logged:. If a compilation error occurs, - a Syntax Error view is created rather than notifying any requestor. Compilation is carried out with respect to nil, i.e., no object." ^self evaluate: textOrString for: nil logged: logFlag! Item was changed: ----- Method: Compiler>>evaluate:notifying: (in category 'public access') ----- + evaluate: textOrString notifying: requestor + "See evaluate:for:notifying:. Compilation is carried out with respect to nil, i.e., no object." - evaluate: textOrString notifying: aController - "See evaluate:for:notifying:. Compilation is carried out - with respect to nil, i.e., no object." + ^self evaluate: textOrString for: nil notifying: requestor! - ^self evaluate: textOrString for: nil notifying: aController! Item was changed: ----- Method: Compiler>>evaluate:notifying:logged: (in category 'public access logging') ----- + evaluate: textOrString notifying: requestor logged: logFlag + "See evaluate:for:notifying:logged:. Compilation is carried out with respect to nil, i.e., no object." - evaluate: textOrString notifying: aController logged: logFlag - "See evaluate:for:notifying:logged:. Compilation is carried out - with respect to nil, i.e., no object." + ^self evaluate: textOrString for: nil notifying: requestor logged: logFlag! - ^self evaluate: textOrString for: nil notifying: aController logged: logFlag! Item was changed: ----- Method: Compiler>>format:in:notifying: (in category 'public access') ----- + format: textOrStream in: aClass notifying: requestor + "Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely. If aBoolean is true, then decorate the resulting text with color and hypertext actions." - format: textOrStream in: aClass notifying: aRequestor - "Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely. If aBoolean is true, then decorate the resulting text with color and hypertext actions" | aNode | self from: textOrStream class: aClass + notifying: requestor. - notifying: aRequestor. aNode := self formatNoPattern: false ifFail: [^ nil]. - - "aSymbol == #colorPrint ifTrue: - [^aNode asColorizedSmalltalk80Text]." "deprecating #colorPrint in favor of Shout --Ron Spengler" - ^aNode decompileString! Item was changed: ----- Method: Compiler>>format:in:notifying:decorated: (in category 'public access') ----- + format: textOrStream in: aClass notifying: requestor decorated: aBoolean + "Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely. If aBoolean is true, then decorate the resulting text with color and hypertext actions." + - format: textOrStream in: aClass notifying: aRequestor decorated: aBoolean - "Compile a parse tree from the argument, textOrStream. Answer a string containing the original code, formatted nicely. If aBoolean is true, then decorate the resulting text with color and hypertext actions" | aNode | self from: textOrStream class: aClass + notifying: requestor. - notifying: aRequestor. aNode := self formatNoPattern: false ifFail: [^ nil]. ^ aBoolean ifTrue: [aNode decompileText] ifFalse: [aNode decompileString]! Item was changed: ----- Method: Compiler>>parse:in:notifying: (in category 'public access') ----- parse: textOrStream in: aClass notifying: req + "Compile the argument, textOrStream, with respect to the class, aClass, and answer the MethodNode that is the root of the resulting parse tree. If an error occurs, use requestor for interactive error handling." - "Compile the argument, textOrStream, with respect to the class, aClass, and - answer the MethodNode that is the root of the resulting parse tree. Notify the - argument, req, if an error occurs. The failBlock is defaulted to an empty block." self from: textOrStream class: aClass notifying: req. ^self parser parseCue: cue noPattern: false ifFail: []! Item was changed: ----- Method: Parser>>notify:at: (in category 'error handling') ----- notify: string at: location | messageText | messageText := '"' , string , ' ->"'. cue requestor isNil ifTrue: [ | notification | (encoder == self or: [encoder isNil]) + ifTrue: [^ self interactive + ifTrue: [self fail] + ifFalse: [self error: 'failure setting up syntax error']]. - ifTrue: [^ self fail "failure setting up syntax error"]. (notification := SyntaxErrorNotification cue: (cue copy source: (source contents asText copyReplaceFrom: location to: location - 1 with: messageText); yourself) doitFlag: doitFlag errorMessage: string location: location) signal. notification tryNewSourceIfAvailable] ifFalse: [cue requestor notify: messageText at: location in: source]. ^ self fail! From commits at source.squeak.org Fri Nov 13 18:32:12 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 18:32:12 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1365.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1365.mcz ==================== Summary ==================== Name: Kernel-ct.1365 Author: ct Time: 13 November 2020, 7:32:09.051415 pm UUID: 9ff3b9b1-5fda-434e-907b-f6c7f1875070 Ancestors: Kernel-eem.1361 Introduces and revises BlockClosure >> #generateExpressionWithArguments:, formerly available on InspectorField class. For usage examples, see the tests. :-) =============== Diff against Kernel-eem.1361 =============== Item was added: + ----- Method: BlockClosure>>generateExpression (in category 'printing') ----- + generateExpression + + ^ self generateExpressionWithArguments: #()! Item was added: + ----- Method: BlockClosure>>generateExpressionWithArguments: (in category 'printing') ----- + generateExpressionWithArguments: argumentNames + "Answer a valid Smalltalk expression string that is equivalent to the receiver but does not depend on it's context and environment. To do so, all non-global referenced are hard-coded into the expression if they are literals; otherwise, an error is signaled." + + | blockNode arguments variables expression recompiled | + self flag: #experimental. + self assert: argumentNames size >= self numArgs description: + ['This block accepts <1p> arguments but only <2p> names were given' + expandMacrosWith: self numArgs + with: argumentNames size]. + + blockNode := self decompile veryDeepCopy. "some literals are singletons, see #becomeForward: below" + arguments := blockNode arguments collect: #name. + + "Collect local and constant variables for substitution" + variables := Dictionary new. + variables + at: #true put: true; + at: #false put: false; + at: #nil put: nil. + self receiver class allInstVarNames + withIndexDo: [:name :index | + variables at: name put: (self receiver instVarAt: index)]. + self outerContext tempNames + withIndexDo: [:name :index | + variables at: name put: (self outerContext namedTempAt: index)]. + + "Substitute local variables and argument names" + blockNode nodesDo: [:node | + self flag: #ct. "Should we introduce #nodesCollect: instead of using dangerous #becomeForward:?" + { + [node isVariableNode not + or: [self receiver environment includesKey: node name]]. + [| argumentIndex | + argumentIndex := arguments indexOf: node name. + argumentIndex isZero + ifFalse: [node name: (argumentNames at: argumentIndex)]; + not]. + [variables at: node name + ifPresent: [:value | + value isLiteral + ifTrue: [node becomeForward: (LiteralNode new key: value)]; + yourself] + ifAbsent: [false]]. + [node isTemp]. + } detect: #value ifNone: [self error: 'Unknown block node, cannot generate expression']]. + + "Generate modified expression tree" + expression := String streamContents: [:stream | + blockNode + printTemporaries: blockNode temporaries + on: stream + doPrior: []. + (blockNode temporaries notEmpty + and: [blockNode statements size > 1]) + ifTrue: [stream cr]. + blockNode + printStatementsOn: stream + indent: 0]. + + "Recompile it to be sure there are no syntax errors or unavailable variables." + recompiled := Compiler new + compileNoPattern: ('[{1}{2}]' format: { + argumentNames ifEmpty: [''] ifNotEmpty: [ + ((argumentNames collect: [:name | ':' , name]) joinSeparatedBy: ' ') , '|']. + expression}) + in: nil class notifying: nil ifFail: nil. + recompiled nodesDo: [:node | + self assert: (node isKindOf: LiteralVariableNode) ==> [self class environment includesKey: node name asSymbol]]. + + "Et voil�!!" + ^ expression! From commits at source.squeak.org Fri Nov 13 18:32:58 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 18:32:58 0000 Subject: [squeak-dev] The Inbox: KernelTests-ct.390.mcz Message-ID: A new version of KernelTests was added to project The Inbox: http://source.squeak.org/inbox/KernelTests-ct.390.mcz ==================== Summary ==================== Name: KernelTests-ct.390 Author: ct Time: 13 November 2020, 7:32:56.168415 pm UUID: e3e74615-91ed-8942-be3a-3846b53f7b75 Ancestors: KernelTests-ct.389 Complements Kernel-ct.1365 (BlockClosure >> #generateExpressionWithArguments:). =============== Diff against KernelTests-ct.389 =============== Item was added: + ----- Method: BlockClosureTest>>assertSource:equals: (in category 'assertions') ----- + assertSource: expected equals: actual + + ^ self + assert: (Compiler new compileNoPattern: expected in: self class notifying: nil ifFail: nil) printString + equals: (Compiler new compileNoPattern: actual in: self class notifying: nil ifFail: nil) printString! Item was added: + ----- Method: BlockClosureTest>>testGenerateExpression (in category 'tests - printing') ----- + testGenerateExpression + + + "Functional style with literals" + self assertSource: '6 * 7' equals: [6 * 7] generateExpression. + self assertSource: 'true == false ~= nil' equals: [true == false ~= nil] generateExpression. + + "Argument names" + self assertSource: 'foo + 1' equals: + ([:x | x + 1] generateExpressionWithArguments: #('foo')). + self assertSource: '(foo * bar) yourself - bar' equals: + ([:x :y | (x * y) yourself - y] generateExpressionWithArguments: #('foo' 'bar')). + + "Temporaries" + self assertSource: '| y | y := z negated. y == z' equals: + ([:x | | y | y := x negated. y == x] generateExpressionWithArguments: #('z')). + + "Global bindings" + self assertSource: 'Object name size' equals: [Object name size] generateExpression. + + "Receiver access" + self should: [[testSelector] generateExpression] raise: Error. + self should: [[self] generateExpression] raise: Error. + self should: [[super] generateExpression] raise: Error. + Object new in: [:temp | + self should: [[temp] generateExpression] raise: Error]. + 42 in: [:temp | + self assertSource: '42' equals: [temp] generateExpression].! From commits at source.squeak.org Fri Nov 13 18:33:55 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 18:33:55 0000 Subject: [squeak-dev] The Inbox: Tools-ct.1018.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-ct.1018.mcz ==================== Summary ==================== Name: Tools-ct.1018 Author: ct Time: 13 November 2020, 7:33:52.268415 pm UUID: ea70ff0a-7e69-f14c-9c66-96e41960f600 Ancestors: Tools-mt.1015 Complements Kernel-ct.1365 (BlockClosure >> #generateExpressionWithArguments:). Now also handles symbols as valueGetters correctly. =============== Diff against Tools-mt.1015 =============== Item was removed: - ----- Method: InspectorField class>>generateExpressionFrom:argumentNames: (in category 'support') ----- - generateExpressionFrom: aBlock argumentNames: argumentNames - - | blockNode arguments variables context receiver | - self flag: #experimental. - blockNode := aBlock decompile veryDeepCopy. "some literals are singletons, see #becomeForward: below" - arguments := blockNode arguments collect: #name. - variables := Dictionary new. - variables - at: #true put: true; - at: #false put: false; - at: #nil put: nil. - receiver := aBlock receiver. - receiver class allInstVarNames - withIndexDo: [:name :index | - variables at: name put: (receiver instVarAt: index)]. - context := aBlock outerContext. - context tempNames - withIndexDo: [:name :index | - variables at: name put: (context namedTempAt: index)]. - blockNode nodesDo: [:node | - self flag: #ct. "Should we introduce #nodesCollect: instead of using dangerous #becomeForward:?" - { - [node isVariableNode not]. - [| argumentIndex | - argumentIndex := arguments indexOf: node name. - argumentIndex isZero - ifFalse: [node name: (argumentNames at: argumentIndex)]; - not]. - [variables at: node name - ifPresent: [:value | - value isLiteral - ifTrue: [node becomeForward: (LiteralNode new key: value)]; - yourself] - ifAbsent: [^ nil]]. - } detect: #value ifNone: [^ nil]]. - ^ String streamContents: [:stream | - blockNode - printStatementsOn: stream - indent: 0].! Item was changed: ----- Method: InspectorField>>expressionWithReceiverName: (in category 'accessing - code') ----- expressionWithReceiverName: receiverName "The code string to run for getting the receiver's value. The receiver's name, which is usually #self, can be replaced to fit specific debugging scenarios such as ThisContext." ^ valueGetterExpression ifNil: [ + | getter | + getter := self valueGetter. + getter isCompiledCode - self valueGetter isCompiledCode ifTrue: [ "precompiled user code" + getter getSource ] - self valueGetter getSource ] ifFalse: [ "evaluable" + getter isBlock + ifTrue: [ + [getter generateExpressionWithArguments: {receiverName}] + ifError: [nil]] + ifFalse: [ + self assert: getter numArgs isZero. + 'self ' , getter ] ] ]! - self class - generateExpressionFrom: self valueGetter - argumentNames: {receiverName} ] ]! From commits at source.squeak.org Fri Nov 13 22:56:01 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 22:56:01 -0000 Subject: [squeak-dev] The Trunk: System-eem.1168.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.1168.mcz ==================== Summary ==================== Name: System-eem.1168 Author: eem Time: 7 August 2020, 9:35:47.550327 am UUID: cedd1c81-e5bd-4b1a-b6df-845191ceab0b Ancestors: System-mt.1167 Empty commit to remove a bogus timestamp from the version history. System-eem.1154 had aquired a date stamp far in the future. =============== Diff against System-mt.1167 =============== From commits at source.squeak.org Fri Nov 13 22:58:41 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Fri, 13 Nov 2020 22:58:41 -0000 Subject: [squeak-dev] The Inbox: PromisesLocal-rww.21.mcz Message-ID: A new version of PromisesLocal was added to project The Inbox: http://source.squeak.org/inbox/PromisesLocal-rww.21.mcz ==================== Summary ==================== Name: PromisesLocal-rww.21 Author: rww Time: 4 October 2020, 12:43:47.133424 pm UUID: edabe29c-1ae4-472a-9f9b-1262961a2407 Ancestors: PromisesLocal-rww.20 Added ProtocolState as a required package =============== Diff against PromisesLocal-rww.20 =============== From asqueaker at gmail.com Fri Nov 13 23:24:32 2020 From: asqueaker at gmail.com (Chris Muller) Date: Fri, 13 Nov 2020 17:24:32 -0600 Subject: [squeak-dev] http://source.squeak.org/*/?action=history broken In-Reply-To: References: Message-ID: Hi Christoph, It's fixed. Please cc my regular email on future correspondence if it needs my attention. - Chris On Fri, Nov 13, 2020 at 9:14 AM Thiede, Christoph < Christoph.Thiede at student.hpi.uni-potsdam.de> wrote: > Hi all, hi Chris, > > > looks as if the features "browse mc history"/"browse mc revisions" in a > Browser do not work any longer. I only get timeouts from the > source.squeak.org server (can reproduce this in a browser). Anyone > willing to have a look into this? And maybe we should write regression > tests as soon as this got fixed. :-) > > > Best, > > Christoph > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sat Nov 14 05:11:33 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 05:11:33 0000 Subject: [squeak-dev] The Trunk: Tools-eem.1016.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.1016.mcz ==================== Summary ==================== Name: Tools-eem.1016 Author: eem Time: 13 November 2020, 9:11:29.559774 pm UUID: 2bb4d3c0-32cd-49c7-b9c5-f04bed33c416 Ancestors: Tools-mt.1015 Have the ProcessBrowser maintain a stackDepth variable and allow moreStack to grow it by a factor of two (we can add lessStack too). fullStack can be dangerous for very deep stacks. Also allow the ProcessBrowser to suspend the UI propcess, spawning a new one if it does so. being able to suspend the UI process is a very useful facility I need right now in debugging the multi-threaded VM. =============== Diff against Tools-mt.1015 =============== Item was changed: Model subclass: #ProcessBrowser + instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex stackDepth sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher' - instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher' classVariableNames: 'Browsers SuspendedProcesses WellKnownProcesses' poolDictionaries: '' category: 'Tools-Process Browser'! !ProcessBrowser commentStamp: '' prior: 0! Change Set: ProcessBrowser Date: 14 March 2000 Author: Ned Konz email: ned at bike-nomad.com This is distributed under the Squeak License. Added 14 March: CPUWatcher integration automatically start and stop CPUWatcher added CPUWatcher to process list menu Added 29 October: MVC version 2.8, 2.7 compatibility rearranged menus added pointer inspection and chasing added suspend/resume recognized more well-known processes misc. bug fixes Added 26 October: highlight pc in source code Added 27 October: added 'signal semaphore' added 'inspect receiver', 'explore receiver', 'message tally' to stack list menu added 'find context', 'next context' to process list menu added 'change priority' and 'debug' choices to process list menu 27 October mods by Bob Arning: alters process display in Ned's ProcessBrowser to - show process priority - drop 'a Process in' that appears on each line - show in priority order - prettier names for known processes - fix to Utilities to forget update downloading process when it ends (1 less dead process) - correct stack dump for the active process ! Item was changed: ----- Method: ProcessBrowser class>>registerWellKnownProcesses (in category 'class initialization') ----- registerWellKnownProcesses "Associate each well-known process with a nickname and two flags: allow-stop, and allow-debug. Additional processes may be added to this list as required" WellKnownProcesses := OrderedCollection new. self registerWellKnownProcess: [] label: 'no process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Smalltalk lowSpaceWatcherProcess] label: 'the low space watcher' allowStop: false allowDebug: false. self registerWellKnownProcess: [WeakArray runningFinalizationProcess] label: 'the WeakArray finalization process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Processor activeProcess] label: 'the UI process' + allowStop: true - allowStop: false allowDebug: true. self registerWellKnownProcess: [Processor backgroundProcess] label: 'the idle process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Sensor interruptWatcherProcess] label: 'the user interrupt watcher' allowStop: false allowDebug: false. self registerWellKnownProcess: [Sensor eventTicklerProcess] label: 'the event tickler' allowStop: false allowDebug: false. self registerWellKnownProcess: [Project uiProcess] label: 'the inactive Morphic UI process' + allowStop: true - allowStop: false allowDebug: false. " self registerWellKnownProcess: [Smalltalk at: #SoundPlayer ifPresent: [:sp | sp playerProcess]] label: 'the Sound Player' allowStop: false allowDebug: false." self registerWellKnownProcess: [ScheduledControllers ifNotNil: [ScheduledControllers activeControllerProcess]] label: 'the inactive MVC controller process' allowStop: false allowDebug: true. self registerWellKnownProcess: [Smalltalk at: #CPUWatcher ifPresent: [:cw | cw currentWatcherProcess]] label: 'the CPUWatcher' allowStop: false allowDebug: false ! Item was added: + ----- Method: ProcessBrowser>>fullStack (in category 'stack list') ----- + fullStack + stackDepth := SmallInteger maxVal. + self updateStackList! Item was changed: ----- Method: ProcessBrowser>>initialize (in category 'initialize-release') ----- initialize + methodText := ''.. + stackDepth := 20. - methodText := ''. stackListIndex := 0. searchString := ''. lastUpdate := 0. startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ]. self updateProcessList; processListIndex: 1. Browsers add: self! Item was changed: ----- Method: ProcessBrowser>>moreStack (in category 'stack list') ----- moreStack + stackDepth := stackDepth + stackDepth. + self updateStackList! - self updateStackList: 2000! Item was changed: ----- Method: ProcessBrowser>>processListKey:from: (in category 'process list') ----- processListKey: aKey from: aView aKey caseOf: { [$f] -> [^ self findContext]. [$g] -> [^ self nextContext]. [$a] -> [^ self toggleAutoUpdate]. [$u] -> [^ self updateProcessList] } otherwise: []. selectedProcess ifNil: [^ self changed: #flash]. ^ aKey caseOf: { [$i] -> [self inspectProcess]. [$I] -> [self exploreProcess]. [$c] -> [self chasePointers]. [$P] -> [self inspectPointers]. [$t] -> [self terminateProcess]. [$r] -> [self resumeProcess]. [$s] -> [self suspendProcess]. [$d] -> [self debugProcess]. [$p] -> [self changePriority]. [$m] -> [self messageTally]. [$S] -> [self signalSemaphore]. + [$k] -> [self fullStack]} - [$k] -> [self moreStack]} otherwise: [self arrowKey: aKey from: aView]! Item was changed: ----- Method: ProcessBrowser>>processListMenu: (in category 'process list') ----- processListMenu: menu selectedProcess ifNotNil: [:process| [:name :allowStop :allowDebug| menu addList: #(('inspect (i)' inspectProcess) ('explore (I)' exploreProcess) ('inspect Pointers (P)' inspectPointers)). (Smalltalk includesKey: #PointerFinder) ifTrue: [menu add: 'chase pointers (c)' action: #chasePointers]. allowStop ifTrue: [menu add: 'terminate (t)' action: #terminateProcess. process isSuspended ifTrue: [menu add: 'resume (r)' action: #resumeProcess] ifFalse: [menu add: 'suspend (s)' action: #suspendProcess]]. allowDebug ifTrue: [menu addList: #(('change priority (p)' changePriority) ('debug (d)' debugProcess))]. menu add: 'profile messages (m)' action: #messageTally. (process suspendingList isKindOf: Semaphore) ifTrue: [menu add: 'signal Semaphore (S)' action: #signalSemaphore]. + menu addList: #(('full stack (k)' fullStack) ('copy stack to clipboard' copyProcessStackToClipboard)). - menu addList: #(('full stack (k)' moreStack) ('copy stack to clipboard' copyProcessStackToClipboard)). menu addLine] valueWithArguments: (self nameAndRulesFor: process)]. menu addList: #(#('find context... (f)' findContext) #('find again (g)' nextContext)); addLine; add: (self isAutoUpdating ifTrue: ['turn off auto-update (a)'] ifFalse: ['turn on auto-update (a)']) action: #toggleAutoUpdate; add: 'update list (u)' action: #updateProcessList. (Smalltalk at: #CPUWatcher ifAbsent: []) ifNotNil: [:pw| menu addLine. pw isMonitoring ifTrue: [menu add: 'stop CPUWatcher' action: #stopCPUWatcher] ifFalse: [menu add: 'start CPUWatcher' action: #startCPUWatcher]]. ^menu! Item was changed: ----- Method: ProcessBrowser>>stackListMenu: (in category 'stack list') ----- stackListMenu: aMenu + selectedContext ifNil: [^aMenu]. + ^aMenu - | menu | - selectedContext - ifNil: [^ aMenu]. - menu := aMenu labels: 'inspect context (c) explore context (C) inspect receiver (i) explore receiver (I) + browse (b) + more stack' + lines: #(2 4 5) + selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext moreStack)! - browse (b)' - lines: #(2 4 ) - selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext ). - ^ menu! Item was changed: ----- Method: ProcessBrowser>>suspendProcess (in category 'process actions') ----- suspendProcess | nameAndRules | + selectedProcess isSuspended ifTrue: + [^self]. - selectedProcess isSuspended - ifTrue: [^ self]. nameAndRules := self nameAndRulesForSelectedProcess. + nameAndRules second ifFalse: + [self inform: 'Nope, won''t suspend ' , nameAndRules first. + ^self]. + selectedProcess == Project current uiProcess ifTrue: + [Project current spawnNewProcessIfThisIsUI: selectedProcess. + WorldState addDeferredUIMessage: [self updateProcessList]]. - nameAndRules second - ifFalse: [self inform: 'Nope, won''t suspend ' , nameAndRules first. - ^ self]. self class suspendProcess: selectedProcess. self updateProcessList! Item was changed: ----- Method: ProcessBrowser>>updateStackList (in category 'stack list') ----- updateStackList + self updateStackList: stackDepth! - self updateStackList: 20! From marcel.taeumel at hpi.de Sat Nov 14 10:51:46 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Sat, 14 Nov 2020 11:51:46 +0100 Subject: [squeak-dev] The Trunk: Tools-eem.1016.mcz In-Reply-To: References: Message-ID: > Also allow the ProcessBrowser to suspend the UI propcess, spawning a new one if it does so. Yes! Thanks :-) Best, Marcel Am 14.11.2020 06:11:49 schrieb commits at source.squeak.org : Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.1016.mcz ==================== Summary ==================== Name: Tools-eem.1016 Author: eem Time: 13 November 2020, 9:11:29.559774 pm UUID: 2bb4d3c0-32cd-49c7-b9c5-f04bed33c416 Ancestors: Tools-mt.1015 Have the ProcessBrowser maintain a stackDepth variable and allow moreStack to grow it by a factor of two (we can add lessStack too). fullStack can be dangerous for very deep stacks. Also allow the ProcessBrowser to suspend the UI propcess, spawning a new one if it does so. being able to suspend the UI process is a very useful facility I need right now in debugging the multi-threaded VM. =============== Diff against Tools-mt.1015 =============== Item was changed: Model subclass: #ProcessBrowser + instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex stackDepth sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher' - instanceVariableNames: 'selectedProcess selectedContext methodText processList processListIndex stackList stackListIndex sourceMap selectedClass selectedSelector searchString autoUpdateProcess lastUpdate startedCPUWatcher' classVariableNames: 'Browsers SuspendedProcesses WellKnownProcesses' poolDictionaries: '' category: 'Tools-Process Browser'! !ProcessBrowser commentStamp: '' prior: 0! Change Set: ProcessBrowser Date: 14 March 2000 Author: Ned Konz email: ned at bike-nomad.com This is distributed under the Squeak License. Added 14 March: CPUWatcher integration automatically start and stop CPUWatcher added CPUWatcher to process list menu Added 29 October: MVC version 2.8, 2.7 compatibility rearranged menus added pointer inspection and chasing added suspend/resume recognized more well-known processes misc. bug fixes Added 26 October: highlight pc in source code Added 27 October: added 'signal semaphore' added 'inspect receiver', 'explore receiver', 'message tally' to stack list menu added 'find context', 'next context' to process list menu added 'change priority' and 'debug' choices to process list menu 27 October mods by Bob Arning: alters process display in Ned's ProcessBrowser to - show process priority - drop 'a Process in' that appears on each line - show in priority order - prettier names for known processes - fix to Utilities to forget update downloading process when it ends (1 less dead process) - correct stack dump for the active process ! Item was changed: ----- Method: ProcessBrowser class>>registerWellKnownProcesses (in category 'class initialization') ----- registerWellKnownProcesses "Associate each well-known process with a nickname and two flags: allow-stop, and allow-debug. Additional processes may be added to this list as required" WellKnownProcesses := OrderedCollection new. self registerWellKnownProcess: [] label: 'no process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Smalltalk lowSpaceWatcherProcess] label: 'the low space watcher' allowStop: false allowDebug: false. self registerWellKnownProcess: [WeakArray runningFinalizationProcess] label: 'the WeakArray finalization process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Processor activeProcess] label: 'the UI process' + allowStop: true - allowStop: false allowDebug: true. self registerWellKnownProcess: [Processor backgroundProcess] label: 'the idle process' allowStop: false allowDebug: false. self registerWellKnownProcess: [Sensor interruptWatcherProcess] label: 'the user interrupt watcher' allowStop: false allowDebug: false. self registerWellKnownProcess: [Sensor eventTicklerProcess] label: 'the event tickler' allowStop: false allowDebug: false. self registerWellKnownProcess: [Project uiProcess] label: 'the inactive Morphic UI process' + allowStop: true - allowStop: false allowDebug: false. " self registerWellKnownProcess: [Smalltalk at: #SoundPlayer ifPresent: [:sp | sp playerProcess]] label: 'the Sound Player' allowStop: false allowDebug: false." self registerWellKnownProcess: [ScheduledControllers ifNotNil: [ScheduledControllers activeControllerProcess]] label: 'the inactive MVC controller process' allowStop: false allowDebug: true. self registerWellKnownProcess: [Smalltalk at: #CPUWatcher ifPresent: [:cw | cw currentWatcherProcess]] label: 'the CPUWatcher' allowStop: false allowDebug: false ! Item was added: + ----- Method: ProcessBrowser>>fullStack (in category 'stack list') ----- + fullStack + stackDepth := SmallInteger maxVal. + self updateStackList! Item was changed: ----- Method: ProcessBrowser>>initialize (in category 'initialize-release') ----- initialize + methodText := ''.. + stackDepth := 20. - methodText := ''. stackListIndex := 0. searchString := ''. lastUpdate := 0. startedCPUWatcher := CPUWatcher cpuWatcherEnabled and: [ self startCPUWatcher ]. self updateProcessList; processListIndex: 1. Browsers add: self! Item was changed: ----- Method: ProcessBrowser>>moreStack (in category 'stack list') ----- moreStack + stackDepth := stackDepth + stackDepth. + self updateStackList! - self updateStackList: 2000! Item was changed: ----- Method: ProcessBrowser>>processListKey:from: (in category 'process list') ----- processListKey: aKey from: aView aKey caseOf: { [$f] -> [^ self findContext]. [$g] -> [^ self nextContext]. [$a] -> [^ self toggleAutoUpdate]. [$u] -> [^ self updateProcessList] } otherwise: []. selectedProcess ifNil: [^ self changed: #flash]. ^ aKey caseOf: { [$i] -> [self inspectProcess]. [$I] -> [self exploreProcess]. [$c] -> [self chasePointers]. [$P] -> [self inspectPointers]. [$t] -> [self terminateProcess]. [$r] -> [self resumeProcess]. [$s] -> [self suspendProcess]. [$d] -> [self debugProcess]. [$p] -> [self changePriority]. [$m] -> [self messageTally]. [$S] -> [self signalSemaphore]. + [$k] -> [self fullStack]} - [$k] -> [self moreStack]} otherwise: [self arrowKey: aKey from: aView]! Item was changed: ----- Method: ProcessBrowser>>processListMenu: (in category 'process list') ----- processListMenu: menu selectedProcess ifNotNil: [:process| [:name :allowStop :allowDebug| menu addList: #(('inspect (i)' inspectProcess) ('explore (I)' exploreProcess) ('inspect Pointers (P)' inspectPointers)). (Smalltalk includesKey: #PointerFinder) ifTrue: [menu add: 'chase pointers (c)' action: #chasePointers]. allowStop ifTrue: [menu add: 'terminate (t)' action: #terminateProcess. process isSuspended ifTrue: [menu add: 'resume (r)' action: #resumeProcess] ifFalse: [menu add: 'suspend (s)' action: #suspendProcess]]. allowDebug ifTrue: [menu addList: #(('change priority (p)' changePriority) ('debug (d)' debugProcess))]. menu add: 'profile messages (m)' action: #messageTally. (process suspendingList isKindOf: Semaphore) ifTrue: [menu add: 'signal Semaphore (S)' action: #signalSemaphore]. + menu addList: #(('full stack (k)' fullStack) ('copy stack to clipboard' copyProcessStackToClipboard)). - menu addList: #(('full stack (k)' moreStack) ('copy stack to clipboard' copyProcessStackToClipboard)). menu addLine] valueWithArguments: (self nameAndRulesFor: process)]. menu addList: #(#('find context... (f)' findContext) #('find again (g)' nextContext)); addLine; add: (self isAutoUpdating ifTrue: ['turn off auto-update (a)'] ifFalse: ['turn on auto-update (a)']) action: #toggleAutoUpdate; add: 'update list (u)' action: #updateProcessList. (Smalltalk at: #CPUWatcher ifAbsent: []) ifNotNil: [:pw| menu addLine. pw isMonitoring ifTrue: [menu add: 'stop CPUWatcher' action: #stopCPUWatcher] ifFalse: [menu add: 'start CPUWatcher' action: #startCPUWatcher]]. ^menu! Item was changed: ----- Method: ProcessBrowser>>stackListMenu: (in category 'stack list') ----- stackListMenu: aMenu + selectedContext ifNil: [^aMenu]. + ^aMenu - | menu | - selectedContext - ifNil: [^ aMenu]. - menu := aMenu labels: 'inspect context (c) explore context (C) inspect receiver (i) explore receiver (I) + browse (b) + more stack' + lines: #(2 4 5) + selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext moreStack)! - browse (b)' - lines: #(2 4 ) - selections: #(#inspectContext #exploreContext #inspectReceiver #exploreReceiver #browseContext ). - ^ menu! Item was changed: ----- Method: ProcessBrowser>>suspendProcess (in category 'process actions') ----- suspendProcess | nameAndRules | + selectedProcess isSuspended ifTrue: + [^self]. - selectedProcess isSuspended - ifTrue: [^ self]. nameAndRules := self nameAndRulesForSelectedProcess. + nameAndRules second ifFalse: + [self inform: 'Nope, won''t suspend ' , nameAndRules first. + ^self]. + selectedProcess == Project current uiProcess ifTrue: + [Project current spawnNewProcessIfThisIsUI: selectedProcess. + WorldState addDeferredUIMessage: [self updateProcessList]]. - nameAndRules second - ifFalse: [self inform: 'Nope, won''t suspend ' , nameAndRules first. - ^ self]. self class suspendProcess: selectedProcess. self updateProcessList! Item was changed: ----- Method: ProcessBrowser>>updateStackList (in category 'stack list') ----- updateStackList + self updateStackList: stackDepth! - self updateStackList: 20! -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Sat Nov 14 15:40:07 2020 From: builds at travis-ci.org (Travis CI) Date: Sat, 14 Nov 2020 15:40:07 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1892 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5faffa574d51d_13fed96fd47ec167883@travis-tasks-fdb9fb9cf-pgdk5.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1892 Status: Errored Duration: 18 mins and 17 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/743604162?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Sat Nov 14 15:58:59 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sat, 14 Nov 2020 16:58:59 +0100 Subject: [squeak-dev] The Inbox: Compiler-ct.452.mcz In-Reply-To: References: Message-ID: > Reworks public Compiler interface and documentation: > > - Parser: Do not use #fail in the event of an internal error unless compilation is interactive. This was a single precedent case. > ... > - Provide new convenience selectors #compileNoPattern: and #compileNoPattern:in: on Compiler instance side. Independent of whether these changes are good or bad: what is their reason or purpose? What was that single precedent case? I like to read such things in the commit message. :-) From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 14 18:28:51 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 14 Nov 2020 18:28:51 +0000 Subject: [squeak-dev] The Inbox: Compiler-ct.452.mcz In-Reply-To: References: , Message-ID: <9c80c25305b84c18bf27616a570bc61e@student.hpi.uni-potsdam.de> Thank you for the feedback, Jakob! I always try to be as specific as possible in the version message, but this one was apparently not precise enough ... > what is their reason or purpose? I have been wondering a couple of times when exactly the failBlock passed to a compilation process is evaluated, or rather whether it might be evaluated at all. After analyzing the parser code, I found out that failBlock is evaluated *almost never* provided that the compilation is not interactive, i.e. whenever the specified requestor is nil. I have documented this insight in all relevant public method comments. > What was that single precedent case? There was one exception to this (until now) undocumented rule: Parser >> #notify:at: sent an unconditional #fail "for failure setting up syntax error" which appears to be an internal and thus very rare error only. I have added an interactive check at the relevant place to make sure that the following invariant now is always valid: If the requestor is nil, failBlock will not be evaluated under any circumstances. This invariant should help us to simplify several users of the compiler API (in the Trunk as well as in external packages) to reduce the number of code branches that need to be honored. For one example of many, in ClosureCompilerTest >> #testDecompiledDoitMethodTempNames, we now know that we don't have to care about the failBlock so the [self error: 'compilation error'] there is officially redundant. And yes, in the future we also might want to introduce a simple #compile:in: convenience method for this purpose. :-) I hope I could answer your questions ... :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Jakob Reschke Gesendet: Samstag, 14. November 2020 16:58:59 An: squeak-dev at lists.squeakfoundation.org Betreff: Re: [squeak-dev] The Inbox: Compiler-ct.452.mcz > Reworks public Compiler interface and documentation: > > - Parser: Do not use #fail in the event of an internal error unless compilation is interactive. This was a single precedent case. > ... > - Provide new convenience selectors #compileNoPattern: and #compileNoPattern:in: on Compiler instance side. Independent of whether these changes are good or bad: what is their reason or purpose? What was that single precedent case? I like to read such things in the commit message. :-) -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sat Nov 14 18:38:49 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 18:38:49 0000 Subject: [squeak-dev] The Inbox: Compiler-ct.453.mcz Message-ID: A new version of Compiler was added to project The Inbox: http://source.squeak.org/inbox/Compiler-ct.453.mcz ==================== Summary ==================== Name: Compiler-ct.453 Author: ct Time: 14 November 2020, 7:38:45.898394 pm UUID: 03299c17-0fde-3e45-b71c-4fff380bd6ab Ancestors: Compiler-eem.451 Adds Compiler shorthands for non-interactive compilation of a textOrStream, as mentioned in http://forum.world.st/The-Inbox-Compiler-ct-452-mcz-tp5124691p5124714.html. =============== Diff against Compiler-eem.451 =============== Item was added: + ----- Method: Compiler>>compile:in: (in category 'public access') ----- + compile: textOrStream in: aClass + "Answer a MethodNode for the argument, textOrStream. The MethodNode is the root of a parse tree. It can be told to generate a CompiledMethod to be installed in the method dictionary of the argument, aClass." + + ^ self + compile: textOrStream + in: aClass + notifying: nil + ifFail: nil! Item was added: + ----- Method: Compiler>>compileNoPattern:in: (in category 'public access') ----- + compileNoPattern: textOrStream in: aClass + "Similar to #compile:in::, but the compiled code is + expected to be a do-it expression, with no message pattern." + + ^ self + compileNoPattern: textOrStream + in: aClass + notifying: nil + ifFail: nil! From commits at source.squeak.org Sat Nov 14 18:44:24 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 18:44:24 0000 Subject: [squeak-dev] The Inbox: NetworkTests-ct.61.mcz Message-ID: A new version of NetworkTests was added to project The Inbox: http://source.squeak.org/inbox/NetworkTests-ct.61.mcz ==================== Summary ==================== Name: NetworkTests-ct.61 Author: ct Time: 14 November 2020, 7:44:22.440394 pm UUID: d2c5f22e-ee31-3a4b-aaf9-eec14d08a7b8 Ancestors: NetworkTests-eem.60 Document bug in FileUrl >> #retrieveContents. A fix is arriving soon at the inbox! =============== Diff against NetworkTests-eem.60 =============== Item was added: + ----- Method: FileUrlTest>>testRetrieveContents (in category 'tests') ----- + testRetrieveContents + + | content name | + name := '{1}-{2}.txt' format: {self className. self selector}. + content := self identityHash asString. + + FileStream newFileNamed: name do: [:stream | + stream nextPutAll: content]. + [self assert: content equals: + (FileUrl absoluteFromFileNameOrUrlString: name) retrieveContents content] + ensure: [FileDirectory default deleteFileNamed: name].! From commits at source.squeak.org Sat Nov 14 18:46:25 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 18:46:25 0000 Subject: [squeak-dev] The Inbox: Network-ct.244.mcz Message-ID: A new version of Network was added to project The Inbox: http://source.squeak.org/inbox/Network-ct.244.mcz ==================== Summary ==================== Name: Network-ct.244 Author: ct Time: 14 November 2020, 7:46:21.777394 pm UUID: a88f27af-c0a0-c340-9d0d-60c432537f47 Ancestors: Network-mt.243 Fixes FileUrl >> #retrieveContents which did not work for certain contentTypes because of an intermediary invalid content specification. See NetworkTests-ct.61 (inbox). =============== Diff against Network-mt.243 =============== Item was added: + ----- Method: MIMEDocument class>>contentType: (in category 'private') ----- + contentType: aString + + ^ self new + contentTypeHeaderValue: (MIMEHeaderValue fromMIMEHeader: aString); + yourself! Item was changed: ----- Method: MIMEDocument class>>contentType:content: (in category 'instance creation') ----- contentType: aString content: content "create a MIMEObject with the given content-type and content" "MIMEDocument contentType: 'text/plain' content: 'This is a test'" | ans | + ans := self contentType: aString. - ans := self new. - - ans contentTypeHeaderValue: (MIMEHeaderValue fromMIMEHeader: aString). - (ans isPlaintext or: [ans isHTML]) ifTrue: [ans content: (self tryToDecodeBody: content as: ans charset)] ifFalse: [ans isMultipart ifTrue: [| separator | separator := ans attachmentSeparator asLowercase. separator ifNil: [self error: 'Bad attachment separater']. separator := '--', separator withoutTrailingBlanks. ans addAllParts: (self parseParts: content withSeparator:separator).] ifFalse: [ans content: content]]. + + ^ ans! - - ^ ans - ! Item was changed: ----- Method: MIMELocalFileDocument class>>contentType:contentStream: (in category 'instance creation') ----- contentType: aString contentStream: aStream + + ^ (self contentType: aString) + contentStream: aStream; + yourself! - ^(self contentType: aString content: nil) contentStream: aStream! From commits at source.squeak.org Sat Nov 14 18:52:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 18:52:52 0000 Subject: [squeak-dev] The Inbox: Network-ct.245.mcz Message-ID: A new version of Network was added to project The Inbox: http://source.squeak.org/inbox/Network-ct.245.mcz ==================== Summary ==================== Name: Network-ct.245 Author: ct Time: 14 November 2020, 7:52:49.139394 pm UUID: c84e2aa6-50a0-af4f-b039-e56ab9199838 Ancestors: Network-mt.243 Support absolute file paths in Url absoluteFromFileNameOrUrlString: as well. This functionality is required for ProjectLauncher, which might be explained in the best way by the next few commits that I am going to upload to the inbox ... =============== Diff against Network-mt.243 =============== Item was changed: ----- Method: FileUrl>>privateInitializeFromText:relativeTo: (in category 'private-initialization') ----- privateInitializeFromText: pathString relativeTo: aUrl " should be a filesystem path. This url is adjusted to be aUrl + the path." + | newPath | - | bare newPath | self host: aUrl host. self initializeFromPathString: pathString. + self isAbsolute ifTrue: [^ self]. self isAbsolute: aUrl isAbsolute. + - newPath := aUrl path copy. newPath removeLast. "empty string that says its a directory" path do: [ :token | ((token ~= '..') and: [token ~= '.']) ifTrue: [ newPath addLast: token unescapePercents ]. token = '..' ifTrue: [ newPath isEmpty ifFalse: [ newPath last = '..' ifFalse: [ newPath removeLast ] ] ]. "token = '.' do nothing" ]. + path := newPath.! - path := newPath - - ! From commits at source.squeak.org Sat Nov 14 18:59:18 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 18:59:18 0000 Subject: [squeak-dev] The Inbox: System-ct.1189.mcz Message-ID: A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-ct.1189.mcz ==================== Summary ==================== Name: System-ct.1189 Author: ct Time: 14 November 2020, 7:59:11.730394 pm UUID: 5f2ed1b3-61eb-b746-bcd3-3d97f3b9e893 Ancestors: System-mt.1187 Fixes handling of Smalltalk first command line argument which can be a script or a project path. At least on Windows, absolute paths were not interpreted correctly at this point before and a nil MNU error was raised. Still, I am not absolutely sure what was the original intent for HTTP encoding. Why should one pass a decoded URL to the smalltalk executable? Please review. Requires Network-ct.245 for absolute file path support in Url class >> #absoluteFromFileNameOrUrlString:. =============== Diff against System-mt.1187 =============== Item was added: + ----- Method: ProjectLauncher>>parseScriptUrl (in category 'private') ----- + parseScriptUrl + + ^ self parseScriptUrl: (Smalltalk documentPath ifNil: [^ nil]) + convertFromSystemString! Item was added: + ----- Method: ProjectLauncher>>parseScriptUrl: (in category 'private') ----- + parseScriptUrl: scriptName + + scriptName ifEmpty: [^ nil]. + + "pathTokens := scriptName splitBy: FileDirectory slash. + pathTokens := pathTokens collect: [:s | s encodeForHTTP]. + encodedPath := pathTokens joinSeparatedBy: FileDirectory slash." + + "Try to parse absolute Windows path" + (Smalltalk platformName = 'Win32' + and: [scriptName size >= 3]) + ifTrue: [ + ((scriptName first isLetter + and: [scriptName second = $:] + and: [scriptName third = $\]) "Absolute path starting with a drive letter" + or: [(scriptName first: 2) = '\\' "UNC path"]) + ifTrue: [ + ^ FileUrl absoluteFromText: scriptName]]. + + ^ Url absoluteFromFileNameOrUrlString: scriptName! Item was changed: ----- Method: ProjectLauncher>>startUpAfterLogin (in category 'running') ----- startUpAfterLogin + + | scriptName loader | - | scriptName loader isUrl | self setupFlaps. + + scriptName := Preferences readDocumentAtStartup + ifTrue: [self parseScriptUrl asString]. + + scriptName + ifNil: [^ Preferences eToyFriendly + ifTrue: [self currentWorld addGlobalFlaps]]. + - Preferences readDocumentAtStartup - ifTrue: [scriptName := Smalltalk documentPath - ifNil: ['']. - scriptName := scriptName convertFromSystemString. - scriptName isEmpty - ifFalse: ["figure out if script name is a URL by itself" - isUrl := (scriptName asLowercase beginsWith: 'http://') - or: [(scriptName asLowercase beginsWith: 'file://') - or: [scriptName asLowercase beginsWith: 'ftp://']]. - isUrl - ifFalse: [| encodedPath pathTokens | - "Allow for ../dir/scriptName arguments" - pathTokens := scriptName splitBy: FileDirectory slash. - pathTokens := pathTokens - collect: [:s | s encodeForHTTP]. - encodedPath := pathTokens - reduce: [:acc :each | acc , FileDirectory slash , each]. - scriptName := (FileDirectory default uri resolveRelativeURI: encodedPath) asString]]] - ifFalse: [scriptName := '']. - scriptName isEmptyOrNil - ifTrue: [^ Preferences eToyFriendly - ifTrue: [self currentWorld addGlobalFlaps]]. loader := CodeLoader new. loader loadSourceFiles: (Array with: scriptName). (scriptName asLowercase endsWith: '.pr') ifTrue: [self installProjectFrom: loader] ifFalse: [loader installSourceFiles]! Item was changed: ----- Method: SmalltalkImage>>documentPath (in category 'command line') ----- documentPath "Answer the absolute path of the document passed to the VM or nil if none." + "Smalltalk documentPath" - "Smalltalk commandLine documentPath" ^ (self getSystemAttribute: 2) ifNotNil: [ :arg | arg = self imageArgumentsMarker ifTrue: [nil] ifFalse: [arg]]. ! From commits at source.squeak.org Sat Nov 14 19:00:26 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:00:26 0000 Subject: [squeak-dev] The Inbox: Tests-ct.445.mcz Message-ID: A new version of Tests was added to project The Inbox: http://source.squeak.org/inbox/Tests-ct.445.mcz ==================== Summary ==================== Name: Tests-ct.445 Author: ct Time: 14 November 2020, 8:00:23.050394 pm UUID: 65c04765-917a-5a49-8692-3ef5a54c7668 Ancestors: Tests-mt.442 Adds regression test for System-ct.1189 (smalltalk command line argument handling). =============== Diff against Tests-mt.442 =============== Item was changed: SystemOrganization addCategory: #'Tests-Bugs'! SystemOrganization addCategory: #'Tests-Compiler'! SystemOrganization addCategory: #'Tests-Dependencies'! SystemOrganization addCategory: #'Tests-Digital Signatures'! SystemOrganization addCategory: #'Tests-Environments'! SystemOrganization addCategory: #'Tests-Exceptions'! SystemOrganization addCategory: #'Tests-FilePackage'! SystemOrganization addCategory: #'Tests-Files'! SystemOrganization addCategory: #'Tests-Finalization'! SystemOrganization addCategory: #'Tests-Hex'! SystemOrganization addCategory: #'Tests-Installer-Core'! SystemOrganization addCategory: #'Tests-Localization'! SystemOrganization addCategory: #'Tests-Monticello'! SystemOrganization addCategory: #'Tests-Monticello-Mocks'! SystemOrganization addCategory: #'Tests-Monticello-Utils'! SystemOrganization addCategory: #'Tests-Object Events'! SystemOrganization addCategory: #'Tests-ObjectsAsMethods'! SystemOrganization addCategory: #'Tests-PrimCallController'! SystemOrganization addCategory: #'Tests-Release'! SystemOrganization addCategory: #'Tests-System-Applications'! SystemOrganization addCategory: #'Tests-System-Digital Signatures'! SystemOrganization addCategory: #'Tests-System-Object Storage'! SystemOrganization addCategory: #'Tests-System-Preferences'! SystemOrganization addCategory: #'Tests-System-Support'! SystemOrganization addCategory: #'Tests-Utilities'! SystemOrganization addCategory: #'Tests-VM'! - SystemOrganization addCategory: #'Tests-MonticelloMocks'! SystemOrganization addCategory: #'Tests-Sound'! + SystemOrganization addCategory: #'Tests-System-Download'! Item was added: + TestCase subclass: #ProjectLauncherTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-System-Download'! Item was added: + ----- Method: ProjectLauncherTest>>testParseScriptUrl (in category 'tests') ----- + testParseScriptUrl + + "Absolute file path" + self + assert: Smalltalk imageName + equals: (ProjectLauncher new parseScriptUrl: Smalltalk imageName) pathForFile. + + "Relative file path" + self + assert: FileDirectory default fullName + equals: (ProjectLauncher new parseScriptUrl: FileDirectory default fullName) pathForFile. + + "File scheme URL" + self + assert: (FileUrl absoluteFromText: Smalltalk imageName) printString + equals: (ProjectLauncher new parseScriptUrl: Smalltalk imageName) printString. + + "Remote URL" + self + assert: 'https://google.de/robots.txt' + equals: (ProjectLauncher new parseScriptUrl: 'https://google.de/robots.txt') printString.! From commits at source.squeak.org Sat Nov 14 19:01:56 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:01:56 0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1366.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1366.mcz ==================== Summary ==================== Name: Kernel-ct.1366 Author: ct Time: 14 November 2020, 8:01:50.976394 pm UUID: a199c41b-1cc3-3d46-bb2b-82bba86f684a Ancestors: Kernel-eem.1361 Complements Compiler-ct.453 and Compiler-ct.452 (both in inbox at this moment). =============== Diff against Kernel-eem.1361 =============== Item was changed: ----- Method: Behavior>>recompile:from: (in category 'compiling') ----- recompile: selector from: oldClass "Compile the method associated with selector in the receiver's method dictionary." "ar 7/10/1999: Use oldClass compiledMethodAt: not self compiledMethodAt:" | method trailer methodNode | method := oldClass compiledMethodAt: selector. trailer := method trailer. methodNode := self newCompiler + compile: (oldClass sourceCodeAt: selector) + in: self. - compile: (oldClass sourceCodeAt: selector) - in: self - notifying: nil - ifFail: [^ self]. "Assume OK after proceed from SyntaxError" selector == methodNode selector ifFalse: [self error: 'selector changed!!']. + self basicAddSelector: selector withMethod: (methodNode generate: trailer).! - self basicAddSelector: selector withMethod: (methodNode generate: trailer). - ! Item was changed: ----- Method: Behavior>>recompileNonResidentMethod:atSelector:from: (in category 'compiling') ----- recompileNonResidentMethod: method atSelector: selector from: oldClass "Recompile the method supplied in the context of this class." | trailer methodNode | trailer := method trailer. methodNode := self newCompiler + compile: (method getSourceFor: selector in: oldClass) + in: self. - compile: (method getSourceFor: selector in: oldClass) - in: self - notifying: nil - ifFail: ["We're in deep doo-doo if this fails (syntax error). - Presumably the user will correct something and proceed, - thus installing the result in this methodDict. We must - retrieve that new method, and restore the original (or remove) - and then return the method we retrieved." - ^ self error: 'see comment']. selector == methodNode selector ifFalse: [self error: 'selector changed!!']. + ^ methodNode generate: trailer! - ^ methodNode generate: trailer - ! Item was changed: ----- Method: Behavior>>sourceMatchesBytecodeAt: (in category 'testing') ----- sourceMatchesBytecodeAt: selector "Answers true if the source code at the selector compiles to the bytecode at the selector, and false otherwise. Implemented to detect an error where Monticello did not recompile sources when the class shape changed" "This code was copied from #recompile:from:, with few changes. Several methods would benefit from a method which turned a selector and class into a CompiledMethod, without installing it into the methodDictionary" | method trailer methodNode | method := self compiledMethodAt: selector. trailer := method trailer. methodNode := self newCompiler + compile: (self sourceCodeAt: selector) + in: self. - compile: (self sourceCodeAt: selector) - in: self - notifying: nil - ifFail: [^ false]. "Assume OK after proceed from SyntaxError" selector == methodNode selector ifFalse: [self error: 'selector changed!!']. ^ (methodNode generate: trailer) = method! From commits at source.squeak.org Sat Nov 14 19:14:56 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:14:56 0000 Subject: [squeak-dev] The Inbox: SUnitTools-ct.6.mcz Message-ID: A new version of SUnitTools was added to project The Inbox: http://source.squeak.org/inbox/SUnitTools-ct.6.mcz ==================== Summary ==================== Name: SUnitTools-ct.6 Author: ct Time: 14 November 2020, 8:14:53.273394 pm UUID: 2fe96258-4e5a-cc48-86e0-d0ca57eedbf7 Ancestors: SUnitTools-tcj.4 Proposal: Show modal notification if "find test case" or "find tested item" in a class or message menu failed to find an appropriate code object. =============== Diff against SUnitTools-tcj.4 =============== Item was changed: ----- Method: CodeHolder>>testBrowseClassNamed:possibleMessageNamed: (in category '*SUnitTools-running') ----- testBrowseClassNamed: aClassName possibleMessageNamed: aMessageName | cls selector | + (self class environment hasClassNamed: aClassName) + ifFalse: [^ false]. - (self class environment hasClassNamed: aClassName) ifFalse: ["no dice" ^ self]. cls := self class environment classNamed: aClassName. (aMessageName notNil and: [cls includesLocalSelector: (selector := aMessageName asSymbol)]) ifTrue: [ToolSet browse: cls selector: selector] + ifFalse: [ToolSet browseClass: cls]. + + ^ true! - ifFalse: [ToolSet browseClass: cls].! Item was changed: ----- Method: CodeHolder>>testFindTest (in category '*SUnitTools-running') ----- testFindTest | cls destClassName destMessage | cls := self selectedClass ifNil: [^ self]. - cls isTestClass ifTrue: [" already there " ^ self]. destClassName := cls name asString, 'Test'. destMessage := self selectedMessageName ifNotNil: [:name | self testSelectorFrom: name]. + + (self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage) + ifFalse: [self inform: ('There is no test for {1}' translated + format: {self selectedMessageName ifNil: [cls]})].! - self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage - ! Item was changed: ----- Method: CodeHolder>>testFindTested (in category '*SUnitTools-running') ----- testFindTested | cls classNameParts destClassName destMessage | cls := self selectedClass ifNil: [^ self]. cls isTestClass ifFalse: [" already there " ^ self]. classNameParts := cls name asString piecesCutWhere: [:a :b | b isUppercase]. destClassName := (classNameParts last beginsWith: 'Test') ifTrue: [classNameParts allButLast join] + ifFalse: [^ self inform: ('Did not find tested item for {1}' translated + format: {cls})]. - ifFalse: [^ self]. destMessage := self selectedMessageName ifNotNil: [:selector | | messageName | messageName := selector asString. (messageName beginsWith: 'test') "operate on test methods only" ifTrue: [ (self class environment classNamed: destClassName) ifNotNil: [:destClass | destClass selectors detect: [:destSelector | (self testSelectorFrom: destSelector) = messageName] ifNone: [nil]]] ifFalse: [nil]]. + + (self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage) + ifFalse: [self inform: ('Did not find tested item for {1}' translated + format: {self selectedMessageName ifNil: [cls]})].! - self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage - ! From commits at source.squeak.org Sat Nov 14 19:16:10 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:16:10 0000 Subject: [squeak-dev] The Inbox: System-ct.1190.mcz Message-ID: A new version of System was added to project The Inbox: http://source.squeak.org/inbox/System-ct.1190.mcz ==================== Summary ==================== Name: System-ct.1190 Author: ct Time: 14 November 2020, 8:16:03.813394 pm UUID: 84a690ba-c71c-9b42-ba47-bdd1f179bb2b Ancestors: System-mt.1187 Complements Compiler-ct.453 and Compiler-ct.452 (both in inbox at this moment). =============== Diff against System-mt.1187 =============== Item was changed: ----- Method: BreakpointManager class>>compilePrototype:in: (in category 'private') ----- compilePrototype: aSymbol in: aClass "Compile and answer a new method containing a break statement" | oldSource parser methodNode breakOnlyMethodNode sendBreakMessageNode hasTemps newSource mark positionParser markBeforePragmas pragmasFollowTemps | oldSource := aClass sourceCodeAt: aSymbol. parser := aClass newParser. + methodNode := parser parse: oldSource class: aClass. - methodNode := parser - parse: oldSource - class: aClass - noPattern: false - notifying: nil - ifFail: [self error: '[breakpoint] unable to install breakpoint']. breakOnlyMethodNode := aClass newCompiler + compile: 'temporaryMethodSelectorForBreakpoint self break. ^self' + in: aClass. - compile: 'temporaryMethodSelectorForBreakpoint self break. ^self' - in: aClass - notifying: nil - ifFail: [self error: '[breakpoint] unable to install breakpoint']. sendBreakMessageNode := breakOnlyMethodNode block statements first. methodNode block statements addFirst: sendBreakMessageNode. "Use anothe rparser to discover positions because if pragmas follow temporaries then we want to insert the break after the last pragma, not after the temporaries." (positionParser := aClass newParser) initPattern: oldSource return: [:pattern| positionParser pragmaSequence; temporaries. markBeforePragmas := positionParser startOfNextToken. positionParser pragmaSequence]. mark := (pragmasFollowTemps := positionParser startOfNextToken > markBeforePragmas) ifTrue: [positionParser startOfNextToken - 1] ifFalse: [(hasTemps := positionParser tempsMark <= oldSource size and: [(oldSource at: positionParser tempsMark) = $|]) ifTrue: [positionParser tempsMark + 2] ifFalse: "If no temps, tempsMark points at start of first token in body iff there is a body" [positionParser tempsMark >= oldSource size ifTrue: "empty body" [positionParser startOfNextToken] ifFalse: [positionParser tempsMark - 1]]]. newSource := oldSource copyReplaceFrom: mark to: mark - 1 with: ' self break.\' withCRs. ^methodNode generate copyWithSourceCode: newSource! From commits at source.squeak.org Sat Nov 14 19:17:27 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:17:27 0000 Subject: [squeak-dev] The Inbox: Tests-ct.446.mcz Message-ID: A new version of Tests was added to project The Inbox: http://source.squeak.org/inbox/Tests-ct.446.mcz ==================== Summary ==================== Name: Tests-ct.446 Author: ct Time: 14 November 2020, 8:17:24.348394 pm UUID: 18604631-54e6-7f43-ba21-7d943f3f1465 Ancestors: Tests-mt.442 Complements Compiler-ct.453 and Compiler-ct.452 (both in inbox at this moment). =============== Diff against Tests-mt.442 =============== Item was changed: ----- Method: ClosureCompilerTest>>testDecompiledDoitMethodTempNames (in category 'tests') ----- testDecompiledDoitMethodTempNames "self new testDecompiledDoitMethodTempNames" "Test that a decompiled doit that has been copied with temps decompiles to the input" | removeComments | removeComments := [:n| n comment: nil]. self closureCases do: [:source| | mns m mps mnps | "Need to compare an ungenerated tree with the generated method's methodNode because generating code alters the tree when it introduces remote temp vectors." mns := #(first last) collect: [:ignored| source first isLetter + ifTrue: [self class newCompiler compile: source in: self class] + ifFalse: [self class newCompiler compileNoPattern: source in: self class]]. - ifTrue: - [self class newCompiler - compile: source - in: self class - notifying: nil - ifFail: [self error: 'compilation error']] - ifFalse: - [self class newCompiler - compileNoPattern: source - in: self class - notifying: nil - ifFail: [self error: 'compilation error']]]. m := (mns last generateWithTempNames). removeComments value: mns first. mns first nodesDo: removeComments. self assert: (mnps := mns first printString) = (mps := m methodNode printString)]! Item was changed: ----- Method: ClosureCompilerTest>>testMethodAndNodeTempNames (in category 'tests') ----- testMethodAndNodeTempNames "self new testMethodAndNodeTempNames" "Test that BytecodeAgnosticMethodNode>>blockExtentsToTempRefs answers the same structure as CompiledMethod>>blockExtentsToTempRefs when the method has been copied with the appropriate temps. This tests whether doit methods are debuggable since they carry their own temps." self closureCases do: [:source| | mn om m mbe obe | mn := source first isLetter + ifTrue: [self class newCompiler compile: source in: self class] + ifFalse: [self class newCompiler compileNoPattern: source in: self class]. - ifTrue: - [self class newCompiler - compile: source - in: self class - notifying: nil - ifFail: [self error: 'compilation error']] - ifFalse: - [self class newCompiler - compileNoPattern: source - in: self class - notifying: nil - ifFail: [self error: 'compilation error']]. m := (om := mn generate) copyWithTempsFromMethodNode: mn. self assert: m holdsTempNames. self assert: m endPC = om endPC. mbe := m blockExtentsToTempsMap. obe := mn blockExtentsToTempsMap. self assert: mbe keys asSet = obe keys asSet. (mbe keys intersection: obe keys) do: [:interval| self assert: (mbe at: interval) = (obe at: interval)]]! Item was changed: ----- Method: Decompiler class>>recompileAllTest (in category '*Tests') ----- recompileAllTest "[Decompiler recompileAllTest]" "decompile every method and compile it back; if the decompiler is correct then the system should keep running. :)" SystemNavigation default allBehaviorsDo: [ :behavior | UIManager default informUser: (behavior printString) during: [ behavior selectors do: [ :sel | | decompiled ast compiled | decompiled := Decompiler new decompile: sel in: behavior. + ast := Compiler new compile: decompiled in: behavior. - ast := Compiler new compile: decompiled in: behavior notifying: nil ifFail: [ self error: 'failed' ]. compiled := ast generate: (behavior compiledMethodAt: sel) trailer. behavior addSelector: sel withMethod: compiled. ] ] ]! Item was changed: ----- Method: DecompilerTests>>checkDecompileMethod: (in category 'utilities') ----- checkDecompileMethod: oldMethod | cls selector oldMethodNode methodNode newMethod oldCodeString newCodeString | cls := oldMethod methodClass. selector := oldMethod selector. oldMethodNode := (cls decompilerClass new withTempNames: oldMethod methodNode schematicTempNamesString) decompile: selector in: cls method: oldMethod methodForDecompile. [oldMethodNode properties includesKey: #warning] whileTrue: [oldMethodNode properties removeKey: #warning]. oldCodeString := oldMethodNode decompileString. methodNode := [[| compiler | compiler := cls newCompiler. compiler parser encoderClass: oldMethod encoderClass. + compiler compile: oldCodeString in: cls] - compiler - compile: oldCodeString - in: cls - notifying: nil - ifFail: []] on: SyntaxErrorNotification do: [:ex| ex errorMessage = 'Cannot store into' ifTrue: [ex return: #badStore]. ex pass]] on: OutOfScopeNotification do: [:ex| ex return: #badStore]. "Ignore cannot store into block arg errors; they're not our issue." methodNode ~~ #badStore ifTrue: [newMethod := methodNode generate. newCodeString := ((cls decompilerClass new withTempNames: methodNode schematicTempNamesString) decompile: selector in: cls method: newMethod methodForDecompile) decompileString. "(StringHolder new textContents: (TextDiffBuilder buildDisplayPatchFrom: oldCodeString to: newCodeString)) openLabel: 'Decompilation Differences for ', cls name,'>>',selector" "(StringHolder new textContents: (TextDiffBuilder buildDisplayPatchFrom: oldMethod abstractSymbolic to: newMethod abstractSymbolic)) openLabel: 'Bytecode Differences for ', cls name,'>>',selector" self assert: (oldCodeString = newCodeString or: [(Scanner new scanTokens: oldCodeString) = (Scanner new scanTokens: newCodeString)]) description: cls name asString, ' ', selector asString resumable: true]! From commits at source.squeak.org Sat Nov 14 19:17:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 14 Nov 2020 19:17:52 0000 Subject: [squeak-dev] The Inbox: Traits-ct.313.mcz Message-ID: A new version of Traits was added to project The Inbox: http://source.squeak.org/inbox/Traits-ct.313.mcz ==================== Summary ==================== Name: Traits-ct.313 Author: ct Time: 14 November 2020, 8:17:49.385394 pm UUID: dc5db75d-4841-4848-9a68-297964a9f045 Ancestors: Traits-pre.312 Complements Compiler-ct.453 and Compiler-ct.452 (both in inbox at this moment). =============== Diff against Traits-pre.312 =============== Item was changed: ----- Method: ClassDescription>>traitAddSelector:withMethod: (in category '*Traits-NanoKernel') ----- traitAddSelector: selector withMethod: traitMethod "Add a method inherited from a trait. Recompiles to avoid sharing and implement aliasing." | oldMethod source methodNode newMethod originalSelector | oldMethod := self compiledMethodAt: selector ifAbsent:[nil]. oldMethod ifNotNil:[ "The following is an important optimization as it prevents exponential growth in recompilation. If T1 is used by T2 and T2 by T3 then (without this optimization) any change in T1 would cause all methods in T2 to be recompiled and each recompilation of a method in T2 would cause T3 to be fully recompiled. The test eliminates all such situations." (oldMethod sameTraitCodeAs: traitMethod) ifTrue:[^oldMethod]. ]. originalSelector := traitMethod selector. source := traitMethod methodClass sourceCodeAt: originalSelector. originalSelector == selector ifFalse:[ "Replace source selectors for aliases" source := self replaceSelector: originalSelector withAlias: selector in: source. ]. + methodNode := self newCompiler compile: source in: self. - methodNode := self newCompiler - compile: source in: self notifying: nil ifFail:[^nil]. newMethod := methodNode generate: (self defaultMethodTrailerIfLogSource: true). newMethod putSource: source fromParseNode: methodNode inFile: 2 withPreamble: [:f | f cr; nextPut: $!!; nextChunkPut: 'Trait method'; cr]. newMethod originalTraitMethod: traitMethod. ^super addSelectorSilently: selector withMethod: newMethod.! From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 14 19:47:18 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 14 Nov 2020 19:47:18 +0000 Subject: [squeak-dev] [Windows] Drop a changeset onto an image file to start the image and install the changeset Message-ID: <4eb7a6082a4141349fff6e44faf1e43b@student.hpi.uni-potsdam.de> Hi all Windows users of Squeak, I wrote a simple registry file configures the .image file extension under Windows to be associated with Squeak.exe. In particular, this adds the following enhancements to the image file experience within the Windows shell: - .image files are displayed with a Squeak icon and a correct description in the explorer & related places - double-click an .image file to run it with Squeak.exe - drag a .cs/.st file onto an image file to run it with Squeak.exe and immediately install the changeset/Smalltalk file into the image. The .reg file is available here: https://gist.github.com/LinqLover/7e917a103763facb8a6fe20ba154b43f To install it, download the file, double-click it, and confirm the prompt. It assumes your Squeak.exe is located in C:\Program Files\Squeak\; if you have installed it to a different path, all references to the executable need to be updated respectively. This might also become more interesting in connection with an OpenSmalltalk Launcher, provided that it will exist at some near time in the future (see http://forum.world.st/Re-Unity-Happens-One-Step-at-a-Time-was-Re-Porting-my-programs-from-Squeak-3-10-2-to-3-5-td5122478.html). :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Sat Nov 14 21:15:16 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sat, 14 Nov 2020 22:15:16 +0100 Subject: [squeak-dev] [Windows] Drop a changeset onto an image file to start the image and install the changeset In-Reply-To: <4eb7a6082a4141349fff6e44faf1e43b@student.hpi.uni-potsdam.de> References: <4eb7a6082a4141349fff6e44faf1e43b@student.hpi.uni-potsdam.de> Message-ID: Hi Christoph, Glad you are tapping into another favorite subject of mine (Windows file types)! HKEY_CLASSES_ROOT is a merged view that is supposed to be read from only. Instead put the keys under HKEY_CURRENT_USER\Software\Classes\ and it should work equally well and only apply to the current user. Writing the keys will therefore also not require elevated privileges. Kind regards, Jakob Thiede, Christoph schrieb am Sa., 14. Nov. 2020, 20:47: > Hi all Windows users of Squeak, > > > I wrote a simple registry file configures the .image file extension under > Windows to be associated with Squeak.exe. In particular, this adds the > following enhancements to the image file experience within the Windows > shell: > > - .image files are displayed with a Squeak icon and a correct description > in the explorer & related places > > - double-click an .image file to run it with Squeak.exe > > - drag a .cs/.st file onto an image file to run it with Squeak.exe and > immediately install the changeset/Smalltalk file into the image. > > > The .reg file is available here: > https://gist.github.com/LinqLover/7e917a103763facb8a6fe20ba154b43f > > To install it, download the file, double-click it, and confirm the prompt. > > It assumes your Squeak.exe is located in C:\Program Files\Squeak\; if you > have installed it to a different path, all references to the executable > need to be updated respectively. > > > This might also become more interesting in connection with an > OpenSmalltalk Launcher, provided that it will exist at some near time in > the future (see > http://forum.world.st/Re-Unity-Happens-One-Step-at-a-Time-was-Re-Porting-my-programs-from-Squeak-3-10-2-to-3-5-td5122478.html). > :-) > > Best, > Christoph > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Sun Nov 15 15:35:17 2020 From: builds at travis-ci.org (Travis CI) Date: Sun, 15 Nov 2020 15:35:17 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1893 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fb14ab467988_13facfc9d441c247126@travis-tasks-84bf9c5865-9kzck.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1893 Status: Errored Duration: 14 mins and 38 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/743752656?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Sun Nov 15 15:37:48 2020 From: builds at travis-ci.org (Travis CI) Date: Sun, 15 Nov 2020 15:37:48 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1893 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fb14b4b9b016_13facff3d38582517fa@travis-tasks-84bf9c5865-9kzck.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1893 Status: Errored Duration: 0 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/743752656?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gettimothy at zoho.com Sun Nov 15 18:52:15 2020 From: gettimothy at zoho.com (gettimothy) Date: Sun, 15 Nov 2020 13:52:15 -0500 Subject: [squeak-dev] existing methods to unescape XML escaped characters. Message-ID: <175cd40272c.bf92279f67025.6327709424497651568@zoho.com> Hi Folks, I am storing parsed content from XTreams parsing in the XMLElement that Xtreams parsing uses....(could be different from stock Squeak XML package per recent discussion here.) The XMLElements escape certain characters:  https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_xml_escape.html To get my content to display properly on Chrome, I have to unescape the escaped XML escaped characters. I wrote a quick and dirty method to git-r-done.... unEscapeXMLEscapeCharaters: aString |xmls| xmls := aString copyReplaceAll:'>' with:'>' asTokens:false. xmls := xmls copyReplaceAll:'<' with:'<' asTokens:false. xmls := xmls copyReplaceAll:'"e;' with:'"' asTokens:false. xmls := xmls copyReplaceAll:''' with:'''' asTokens:false. xmls := xmls copyReplaceAll:'&' with:'&' asTokens:false. ^xmls However, I have a nagging suspicion I have re-invented the wheel; although I did spend significant time hunting for one. If anything obvious jumps out, please respond. thx. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.thiede at student.hpi.uni-potsdam.de Sun Nov 15 20:31:44 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Sun, 15 Nov 2020 14:31:44 -0600 (CST) Subject: [squeak-dev] Fixing the infinite debugger chains? (was: Code simulation error (was Re: I broke the debugger?)) In-Reply-To: References: <393ca31eb79f431dbc7633e3f94ab747@student.hpi.uni-potsdam.de> <1582497902561-0.post@n4.nabble.com> <44c04727494e43a6bb4d547499f908cf@student.hpi.uni-potsdam.de> <1603889444900-0.post@n4.nabble.com> <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> <1605175783149-0.post@n4.nabble.com> Message-ID: <1605472304812-0.post@n4.nabble.com> Hi all, hi Eliot, I have to revise my previous recommendation of the #basicEvaluate:onBehalfOf: solution. After taking another look at Jakob's example from above ([^ self halt] ensure: [1 asString]), I recognized that this approach would not fix the infinite debuggers in this situation. Here's the reason behind it: When stepping over the '^ self halt' statement in the example, a #cannotReturn: message is invoked by the VM at some point where the stack looks somehow like this: Context>>return:through: Context>>aboutToReturn:through: ... Context>>runUntilErrorOrReturnFrom: ... Process>>evaluate:onBehalfOf: ... Process>>complete: ... Debugger>>doStep However, the fact that a #cannotReturn: has been invoked means that the stack has got corrupted during the execution, so no exception can be passed back to any exception handler that we might install in #evaluate:onBehalfOf:. For this reason, when the BlockCannotReturn handling reaches StandardToolSet >> #handleError:, the effectiveProcess is suspended instead of the original activeProcess, and the debuggers are bouncing again ... Now you might argue that this situation is only the consequence of another error that occurs during the simulated execution of Context>>aboutToReturn:through: (because of the #runUntilErrorOrReturnFrom: hack, see http://forum.world.st/BUG-REGRESSION-while-debugging-Generator-gt-gt-nextPut-td5108125.html#a5109109), but I constructed another example that is immune to the basicEvaluate:onBehalfOf: approach, too, but in this example the fault in this example is clearly located in the user code so a powerful debugger framework should not struggle about it: [] ensure: [thisContext privSender: nil] "step over #ensure:" And there is even a second problem with the basicEvaluate:onBehalfOf: process because I found two calls on Process >> #debug:title:full: from the simulator (Context) that do not even signal any exception before invoking the debugger on the activeProcess, so again, an exception handler in #basicEvaluate:onBehalfOf: would not be activated at all. tl;dr: The basicEvaluate:onBehalfOf: approach, in spite of its simplicity, would not cover all situations that can lead to an infinite debugger situation. For this reason, I recommend to use my first approach instead, which was to define #basicActiveProcess and #isBasicActiveProcess on Process that ignore the effectiveProcess mock-up for the single purpose of suspending the correct process when a debugger is spawned in whatever way inside of an #evaluate:onBehalfOf: block. Does this argument sound reasonable to you? :-) I have prepared some tests and an updated changeset and am looking forward to uploading it with your agreement. Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From christoph.thiede at student.hpi.uni-potsdam.de Sun Nov 15 21:10:13 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Sun, 15 Nov 2020 15:10:13 -0600 (CST) Subject: [squeak-dev] Fixing the infinite debugger chains? (was: Code simulation error (was Re: I broke the debugger?)) In-Reply-To: <1605472304812-0.post@n4.nabble.com> References: <1582497902561-0.post@n4.nabble.com> <44c04727494e43a6bb4d547499f908cf@student.hpi.uni-potsdam.de> <1603889444900-0.post@n4.nabble.com> <2CF36042-BD9A-426E-B12C-3C30D6AEF439@gmail.com> <1605175783149-0.post@n4.nabble.com> <1605472304812-0.post@n4.nabble.com> Message-ID: <1605474613269-0.post@n4.nabble.com> Hi all, hi Eliot, sorry for double-posting on purpose, but this issue and my thoughts on it have become so complicated that I needed to separate two different subtopics from each other: I just identified another limitation in the process-faithful debugging model, it cannot be applied nestable: Consider the following expression: Processor activeProcess environmentAt: #foo put: 42. Processor halt activeProcess environmentAt: #foo. This snippet returns 42 independently of whether you click Proceed in the Halt Debugger or instead click Debug and then step over the second #activeProcess send. However, you cannot select the Over or Through button in the debugger and debug its action on a third process - if you try to do so, an environmentKeyNotFound error will be raised eventually from the DoIt. The reason for this is that the effectiveProcess approach is not nestable. I find this quite a pity in a self-supporting system ... Here is a very small patch that would eliminate this restriction: Processor >> effectiveProcess "effectiveProcess is a mechanism to allow process-faithful debugging. The debugger executes code on behalf of processes, so unless some effort is made the identity of Processor activeProcess is not correctly maintained when debugging code. The debugger uses evaluate:onBehalfOf: to assign the debugged process as the effectiveProcess of the process executing the code, preserving process identity." + ^effectiveProcess ifNil: [self] ifNotNil: [:process | process effectiveProcess] - ^effectiveProcess ifNil: [self] Would it be possible to apply this change or are there any good arguments against it? :-) If it would be possible, I would be glad to upload the patch to the inbox, and I also have prepared some tests for it. I'm proposing this change in the same thread as the #basicActiveProcess discussion because if we decide to make process-faithful debugging nestable (please! :D), #basicActiveProcess (probably #executingProcess would be a better name for it ...) as some kind of reciprocal operation for #effectiveProcess should be nestable in this case, too. Also, here are two more related questions for you (sorry for the walls of text! ;-)): 1.) Could you maybe explain the motivation for Kernel-eem.894/Kernel-eem.895 to me? Why is it necessary to modify the non-effective process? In a current Trunk image, ProcessorScheduler does never expose activeProcess itself (without wrapping it with an #effectiveProcess send). Are there any other references that need to be taken into account? I reverted to eem 9/7/2009 11:10 of #evaluate:onBehalfOf: and the environments example from above is still working. I have read [this thread](http://forum.world.st/Process-specific-state-difficult-to-debug-td4802422.html#a4802507) but I cannot reproduce your error and also System-eem.699 seems to be the wrong reference, at least I don't see how MessageTally is related to process-faithful debugging. 2.) This might be or might not be a question of coding styles, but when I browse the senders of #evaluate:onBehalfOf:, there are some methods that eventually make nested calls to #evaluate:onBehalfOf:, for instance, #popTo:/#return:value:/#activateReturn:value:. I assume this was not an intentional decision but kept for simplicity? Should we maybe eliminate these redundant nestings (and maybe speed up some things) by introducing a few basic selectors, or would this not be worth the time? I am looking forward to your help! :-) Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From davide.grandi at email.it Sun Nov 15 22:15:24 2020 From: davide.grandi at email.it (Davide Grandi) Date: Sun, 15 Nov 2020 23:15:24 +0100 Subject: [squeak-dev] existing methods to unescape XML escaped characters. In-Reply-To: <175cd40272c.bf92279f67025.6327709424497651568@zoho.com> References: <175cd40272c.bf92279f67025.6327709424497651568@zoho.com> Message-ID: ... I'd look for apos - quotes - amp - gt - lt in sources and changes. ... or directly in String instances and then in their references ... looking for compiled methods, blocks and so on. (a dirty reinvented wheels to run on a muddy road)     davide On 15/11/2020 19:52, gettimothy via Squeak-dev wrote: > Hi Folks, > > I am storing parsed content from XTreams parsing in the XMLElement > that Xtreams parsing uses....(could be different from stock Squeak XML > package per recent discussion here.) > > The XMLElements escape certain characters: > https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_xml_escape.html > > > To get my content to display properly on Chrome, I have to unescape > the escaped XML escaped characters. > > I wrote a quick and dirty method to git-r-done.... > > > unEscapeXMLEscapeCharaters: aString |xmls| xmls := aString > copyReplaceAll:'>' with:'>' asTokens:false. xmls := xmls > copyReplaceAll:'<' with:'<' asTokens:false. xmls := xmls > copyReplaceAll:'"e;' with:'"' asTokens:false. xmls := xmls > copyReplaceAll:''' with:'''' asTokens:false. xmls := xmls > copyReplaceAll:'&' with:'&' asTokens:false. ^xmls > > However, I have a nagging suspicion I have re-invented the wheel; > although I did spend significant time hunting for one. > > If anything obvious jumps out, please respond. > > thx. > > > > -- Ing. Davide Grandi email : davide.grandi at email.it linkedin : http://linkedin.com/in/davidegrandi -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at fniephaus.com Mon Nov 16 10:06:57 2020 From: lists at fniephaus.com (Fabio Niephaus) Date: Mon, 16 Nov 2020 11:06:57 +0100 Subject: [squeak-dev] Call for Events for 2021 Message-ID: 2021 : The Art, Science, and Engineering of Programming March 22-26, 2021, Online, United Kingdom http://2021.programming-conference.org ******************************************************** CALL FOR EVENTS ******************************************************** https://2021.programming-conference.org/track/programming-2021-workshops To build a community and to foster an environment where participants can exchange ideas and experiences related to practical software development, ‹Programming› will host a number of workshops. As is online this year, the main goal of workshops is to promote social gathering and lively discussions amongst participants. This edition’s workshops will replace the social experience of a physical event and as such, their topics and organization may deviate from their physical counterparts. So they should be the main events in the conference week. A workshop can be intended as a collaborative forum to exchange recent and/or preliminary results, to conduct intensive discussions on a particular topic, or to coordinate efforts between representatives of a technical community. They can also be regarded as a forum for lively discussion of innovative ideas, progress, or practical experience on programming and applied software development in general for specific aspects, specific problems, or domain-specific needs. This year, we would like to encourage organizers to be creative and experiment with all kinds of events including hallways discussions, academic parties besides the more traditional workshops. Possible types of workshops include a meeting like a Dagstuhl Seminar or Shonan meeting, a gathering for an international research project, a tool demo/tutorial, hands-on workshops in which participants experience one or several aspects of practical software development, social gathering around a particular topic and so on. Open meetings are preferable but closed ones could be accepted. We are flexible and welcome innovative social gatherings; if you have any ideas or questions, please contact the workshops co-chairs. The duration of workshops is in general one day, but we encourage the submission of half-day workshop proposals on focused topics as well. If desired, the workshop proceedings can be published in the post-conference Companion Proceedings, in the ACM Digital Library. ### Submission Deadlines Deadline: December 3rd, 2020 Notifications will go out as soon as possible, within a week after the deadline. ### Workshop Selection Committee Shigeru Chiba (University of Tokyo, Japan) Elisa Gonzalez Boix (Vrije Universiteit Brussel, Belgium) ### Submission and Workshop Process Please submit your workshop proposal electronically via the submission system: https://2021.programming-conference.org/createProposal/ccc82a7e-eabb-40db-ad98-7c7b761adc1d Please adhere to the workshop proposal guidelines given below and provide all requested information about the proposed workshop. Please keep it brief and use the provided form. The intention is not to spend time on proposal writing, but on preparing the organization of the workshop. To coordinate with the deadlines of the main conference, the following deadlines have to be respected by workshops: **Workshop web page/site and CFP:** December 11th 2020 **Deadline for submissions to the workshops:** - possibly after January 7th 2021 (final notification issue 3) - no later than February 1th 2021 **Notification of authors:** March 1st, 2021, the latest, to be before the early registration deadline. **Deadline for Camera-Ready Papers (Companion Proceedings at ACM DL):** May 1st 2021 **Workshop dates:** March 22nd to 26th 2021 ### Workshop Proposal Guidelines Please include the following information either directly in the proposal, or CFP. The submission system has a form that includes an abstract (for the website), the CFP, and the remaining proposal. CFPs often cover the same information, duplication is not necessary for such cases. Organizers of a workshop previously co-located at are allowed to submit a minimal proposal including information for the questions marked with (*). 1. What is the motivation for the workshop? - Objectives - Intended audience - Relevance (with respect to the topics of the conference) 2(*). Who organizes the workshop? - Organizers and primary contact (name / affiliation / email) - Brief details on the organizers (previous workshop organizing experience, etc.) - Data on potential previous iterations of the workshop - How many participants do you expect (please make at least an educated guess) - What kind of software do you expect to use to run the workshop (e.g. slack, Zoom, Teams, etc.) - Advertisement: Planed advertisement strategy to ensure participation 3. Is there going to be a workshop program committee? - if so, please list the members (indicated as finalized or expected) 4. What is the planned workshop format? - Planned deadlines - Intended submission format (e.g. intended format for articles, posters, abstracts, or any other kind of submission requested to participate in the workshop) - Evaluation process for submissions - Intended workshop format (including duration, number of presentations/talks, planned invited talks/keynotes, etc.) 5(*). What is the intended publication of accepted submissions? - ACM DL post companion proceedings and/or website pre/post-proceedings ### Notes on Companion Proceedings Workshops that wish to have their proceedings published in the ACM DL will have the opportunity to have post proceedings. However, chairs will be responsible for making sure that camera ready deadlines are respected so that final copies and metadata are collected on time. The deadlines mentioned above are **strict**. Please consider them carefully when determining your deadlines for the workshop. From commits at source.squeak.org Mon Nov 16 15:00:09 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 16 Nov 2020 15:00:09 0000 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz Message-ID: A new version of Monticello was added to project The Inbox: http://source.squeak.org/inbox/Monticello-ct.732.mcz ==================== Summary ==================== Name: Monticello-ct.732 Author: ct Time: 16 November 2020, 3:59:45.315045 pm UUID: 49586c09-c5d0-3444-a45c-3ccaf04fcc21 Ancestors: Monticello-mt.730 Fixes a defect in MCPackageLoader when installing a snapshot that contains both an addition and a removal of a code object (e.g. a method). In this case, the addition should be installed but the removal be withdrawn (until today, the definition was first added but then removed again). While this situation does not occur in everyday Monticello use, it can indeed occur when using a MCVersionLoader to load multiple versions each representing a different packages at once and any method or class definition has a different package affiliation in this set of versions relative to the working copies of the packages. Concretely, this constellation arises when the effect of loading this set of versions should be expected to move the relevant definition from one package into another one. For the actuating failure, see https://github.com/Metacello/metacello/issues/524#issuecomment-723644601. Thanks to Tom Beckmann (TB) for the implementation proposal! I have extended it to match class and trait definitions as well. Please review. :-) =============== Diff against Monticello-mt.730 =============== Item was added: + ----- Method: MCClassDefinition>>isOrganizationMember (in category 'testing') ----- + isOrganizationMember + + ^ true! Item was added: + ----- Method: MCClassTraitDefinition>>isOrganizationMember (in category 'testing') ----- + isOrganizationMember + + ^ true! Item was added: + ----- Method: MCDefinition>>isOrganizationMember (in category 'testing') ----- + isOrganizationMember + + ^ false! Item was added: + ----- Method: MCMethodDefinition>>isOrganizationMember (in category 'testing') ----- + isOrganizationMember + + ^ true! Item was changed: ----- Method: MCPackageLoader>>forgetSuperfluousMethodRemovals (in category 'private') ----- forgetSuperfluousMethodRemovals | removedClasses | + removedClasses := removals select: #isClassDefinition thenCollect: #actualClass. - removedClasses := (removals select: #isClassDefinition) collect: #actualClass. removedClasses addAll: (removedClasses collect: #class). + removals := removals reject: [:removal | + removal isMethodDefinition and: [removedClasses includes: removal actualClass]]. + removals := removals reject: [:removal | + removal isOrganizationMember and: [ + additions anySatisfy: [:addition | + addition isOrganizationMember and: [addition description = removal description]]]].! - removals := removals reject: [:e | e isMethodDefinition and: [removedClasses includes: e actualClass]]! From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:12:39 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:12:39 +0000 Subject: [squeak-dev] [Windows] Drop a changeset onto an image file to start the image and install the changeset In-Reply-To: References: <4eb7a6082a4141349fff6e44faf1e43b@student.hpi.uni-potsdam.de>, Message-ID: <9f11dfaa2e874a9ebcc625e29b784006@student.hpi.uni-potsdam.de> Hi Jakob, thanks for the tip, never heard of this before! I have updated the gist accordingly. :-) Best, Christoph PS: I forgot to mention that this change requires System-ct.1189 (inbox) to work correctly. ________________________________ Von: Squeak-dev im Auftrag von Jakob Reschke Gesendet: Samstag, 14. November 2020 22:15:16 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] [Windows] Drop a changeset onto an image file to start the image and install the changeset Hi Christoph, Glad you are tapping into another favorite subject of mine (Windows file types)! HKEY_CLASSES_ROOT is a merged view that is supposed to be read from only. Instead put the keys under HKEY_CURRENT_USER\Software\Classes\ and it should work equally well and only apply to the current user. Writing the keys will therefore also not require elevated privileges. Kind regards, Jakob Thiede, Christoph > schrieb am Sa., 14. Nov. 2020, 20:47: Hi all Windows users of Squeak, I wrote a simple registry file configures the .image file extension under Windows to be associated with Squeak.exe. In particular, this adds the following enhancements to the image file experience within the Windows shell: - .image files are displayed with a Squeak icon and a correct description in the explorer & related places - double-click an .image file to run it with Squeak.exe - drag a .cs/.st file onto an image file to run it with Squeak.exe and immediately install the changeset/Smalltalk file into the image. The .reg file is available here: https://gist.github.com/LinqLover/7e917a103763facb8a6fe20ba154b43f To install it, download the file, double-click it, and confirm the prompt. It assumes your Squeak.exe is located in C:\Program Files\Squeak\; if you have installed it to a different path, all references to the executable need to be updated respectively. This might also become more interesting in connection with an OpenSmalltalk Launcher, provided that it will exist at some near time in the future (see http://forum.world.st/Re-Unity-Happens-One-Step-at-a-Time-was-Re-Porting-my-programs-from-Squeak-3-10-2-to-3-5-td5122478.html). :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:16:45 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:16:45 +0000 Subject: [squeak-dev] http://source.squeak.org/*/?action=history broken In-Reply-To: References: , Message-ID: Hi Chris, thanks for fixing! :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Chris Muller Gesendet: Samstag, 14. November 2020 00:24:32 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] http://source.squeak.org/*/?action=history broken Hi Christoph, It's fixed. Please cc my regular email on future correspondence if it needs my attention. - Chris On Fri, Nov 13, 2020 at 9:14 AM Thiede, Christoph > wrote: Hi all, hi Chris, looks as if the features "browse mc history"/"browse mc revisions" in a Browser do not work any longer. I only get timeouts from the source.squeak.org server (can reproduce this in a browser). Anyone willing to have a look into this? And maybe we should write regression tests as soon as this got fixed. :-) Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:22:01 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:22:01 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <,> , Message-ID: <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> Hi Marcel, so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 12. November 2020 10:07:28 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi all. I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. Best, Marcel Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : Hi all, > And canUnderstand: ? Or is that being too picky? > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? Well, my conception of the general contract would be exactly the following: (o class canUnderstand: m) ifTrue: [ self assert: [o respondsTo: m]]. (o respondsTo: m) ifFalse: [ self deny: [o class canUnderstand: m]]. (o respondsTo: m) ifTrue: [ self shouldnt: [o m] raise: MessageNotUnderstood]. [o m] on: MessageNotUnderstood do: [ self deny: [o respondsTo: m]]. But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the current discussion shows that the same argument applies for the second statement, too. > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Dienstag, 10. November 2020 09:34:49 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > and generate the getter setter on demand (via doesNotUnderstand:) That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. Best. Marcel Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel > a écrit : > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda >: On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel > wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ? Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi >: Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:26:08 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:26:08 +0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1714.mcz In-Reply-To: References: , Message-ID: <0f29086c2e694843ba9358b783730db0@student.hpi.uni-potsdam.de> Hm, #screenScaled etc. could improve the readability a bit, but they do not answer the question of which layers one should touch to configure dpi-sensitivity. Conceptionally, I would expect this to happen in the Canvas/drawing and the event-handling parts only, but unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 12. November 2020 09:40:47 An: squeak-dev Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1714.mcz Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-) Best, Marcel Am 12.11.2020 09:36:24 schrieb Marcel Taeumel : In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet. Best, Marcel Am 11.11.2020 18:33:54 schrieb commits at source.squeak.org : A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1714.mcz ==================== Summary ==================== Name: Morphic-ct.1714 Author: ct Time: 11 November 2020, 6:33:33.254952 pm UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309 Ancestors: Morphic-mt.1710 Honor hi-dpi settings for halo, window, and keyboard-focus indication borders. Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review! =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- keyboardFocusWidth + ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded! - ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Draw this morph only if it has no target." (Preferences showBoundsInHalo and: [self target isWorldMorph not]) ifTrue: [ aCanvas frameAndFillRectangle: self bounds fillColor: Color transparent + borderWidth: (2 * RealEstateAgent scaleFactor) rounded - borderWidth: 2 borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifFalse: [self hasDropShadow: false] ifTrue: [ self addDropShadow. self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded. - self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:31:47 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:31:47 +0000 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <20201111201932.GA51020@shell.msen.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <1605119664601-0.post@n4.nabble.com>,<20201111201932.GA51020@shell.msen.com> Message-ID: <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> Hi Dave, eliminating further globals is definitively always a desirable goal, but are you referring to any certain domain? It looks as if the most problematic portions of global state resist in the Project/Process logic themselves. For example, should we have one user interrupt watcher per project, and how should be decided which of them is activated if there is an MVC embedded into a Morphic project? Questions over questions :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von David T. Lewis Gesendet: Mittwoch, 11. November 2020 21:19:32 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? On Wed, Nov 11, 2020 at 12:34:24PM -0600, Christoph Thiede wrote: > Wow, you can even nest them and drag and drop between them (even though with > a few hick-ups): > https://user-images.githubusercontent.com/38782922/98850138-96282c00-2454-11eb-892a-671201def342.gif > > Indeed it is very cool. Bob Arning is certainly a resident expert on this topic (and original author of much of it, judging by the method stamps). It is great that we have managed to keep it semi-functional for all these years, and it will be even greater if can can polish and extend it as you suggest :-) In addition to just being very cool, it is also an excellent way of validating the modularity of Morphic/MVC/SqueakShell/other projects. My hope is that as you and others continue to make progress on reducing dependence on global variables, it will become easier to make embedded worlds work smoothly and reliably. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:33:38 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:33:38 +0000 Subject: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' In-Reply-To: <1a71e07b-9bda-db8c-9379-8bd71ba81061@leastfixedpoint.com> References: <1fca45b4ee67492781bfb62df8286859@student.hpi.uni-potsdam.de> <862d0006f8694db3965763d6f978f0dc@student.hpi.uni-potsdam.de> <9d11435d-a65e-5d6b-69b4-ddfaeaccc946@leastfixedpoint.com> , <1a71e07b-9bda-db8c-9379-8bd71ba81061@leastfixedpoint.com> Message-ID: <022046a1aec94e5d8816ec0a53b13e68@student.hpi.uni-potsdam.de> Alright, Tony, will you submit a PR, or shall I do that? :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Tony Garnock-Jones Gesendet: Mittwoch, 11. November 2020 19:25:59 An: Jakob Reschke Cc: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] (FSPath / 'foo.bar.zot') extension = 'bar.zot' On 11/11/20 11:16 AM, Jakob Reschke wrote: > Trunk and FileSystem-Git + Squot. Christoph probably has these loaded anyway. The versions of those I have loaded are the ones installed by the configuration wizard (ie master of Squot and its support libraries) - and there are no interesting senders of #extension there. So I think we're probably OK to make the change! Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Mon Nov 16 15:35:22 2020 From: builds at travis-ci.org (Travis CI) Date: Mon, 16 Nov 2020 15:35:22 +0000 Subject: [squeak-dev] [CRON] Passed: squeak-smalltalk/squeak-app#1894 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fb29c3a3faa5_13ff72e6aae2c178294@travis-tasks-d685b764d-m7whk.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1894 Status: Passed Duration: 14 mins and 27 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/743965076?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 15:41:06 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 15:41:06 +0000 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de>, Message-ID: <7dae3c9848744daab2341717f4fc629d@student.hpi.uni-potsdam.de> Hi Marcel! Would this be a too simple fix for the issue? In Morph >> #fullDrawOn: ... "Pass 1: Draw eventual drop-shadow" - self hasDropShadow + (self hasDropShadow and: [(self ownerSatisfying: #isHandMorph) isNil]) + ifTrue: [self drawDropShadowOn: aCanvas]. .... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Montag, 9. November 2020 09:01:58 An: squeak-dev Betreff: Re: [squeak-dev] Drop shadows during grabbing Hi Christoph. > I wonder whether we should turn off drop shadows during grabbing a morph? We already do at some places. See (some) senders of #hasDropShadow:. Still, it feels like a workaround and does not yet apply to the hand's caching procedure. See HandMorph >> #updateCacheCanvas:. Best, Marcel Am 19.09.2020 21:04:28 schrieb Thiede, Christoph : Hi all, I wonder whether we should turn off drop shadows during grabbing a morph? [cid:2b0e9a8e-fc25-455b-9db5-3187ed1fe59f] And it looks even more strange when grabbing menu items (citing from Squeak by Example): [cid:258a12de-bd97-46fe-ac1d-7471c6e04160] This is related to the #menuAppearance3d preference, but I never met a physics system were shadows can throw their own shadows 🤔 Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 6693 bytes Desc: pastedImage.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 61116 bytes Desc: pastedImage.png URL: From commits at source.squeak.org Mon Nov 16 16:23:20 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Mon, 16 Nov 2020 16:23:20 0000 Subject: [squeak-dev] The Inbox: Collections-ct.921.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-ct.921.mcz ==================== Summary ==================== Name: Collections-ct.921 Author: ct Time: 16 November 2020, 5:22:33.980446 pm UUID: 848dcc2a-ede6-534c-8244-80f5dd700148 Ancestors: Collections-mt.919 Adds convenience constructor for Dictionary. Usage: Dictionary newFromKeys: 'wasd' values: {0@ -1. -1 at 0. 0 at 1. 1 at 0} Reuploaded to replace Collections-ct.860, which can be moved into treated inbox. Thanks to everyone for the feedback! (Ha, it took me less than a year to react on this feedback! Fortunately 2020 was a leap year ... ;-)) =============== Diff against Collections-mt.919 =============== Item was added: + ----- Method: Dictionary class>>newFromKeys:values: (in category 'instance creation') ----- + newFromKeys: keys values: values + + | dictionary | + self assert: [keys size = values size]. + dictionary := self new: keys size. + keys with: values do: [:key :value | + dictionary + at: key + ifPresent: [:ignored | self error: ('Duplicate key "{1}"' format: {key})] + ifAbsentPut: [value]]. + ^ dictionary! From forums.jakob at resfarm.de Mon Nov 16 16:28:19 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Mon, 16 Nov 2020 17:28:19 +0100 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz In-Reply-To: References: Message-ID: Hi, Am Mo., 16. Nov. 2020 um 16:00 Uhr schrieb : > > + removals := removals reject: [:removal | > + removal isOrganizationMember and: [ > + additions anySatisfy: [:addition | > + addition isOrganizationMember and: [addition description = removal description]]]].! How about using MCDefinition>>#isRevisionOf: instead of a description = b description? Saves people like me from wondering why description is used here (and what it contains anyway). In domain terms, why is it significant here that the definitions are members of an organization? Why does this procedure not apply to organization changes or script changes, for example? Instead of allocating another Collection instance, you could also use an OrderedCollection for the removals and use removeAllSuchThat:, or put all the conditions in just one reject block. > Thanks to Tom Beckmann (TB) Finally, doesn't Tom use tobe as his author initials? Kind regards, Jakob From christoph.thiede at student.hpi.uni-potsdam.de Mon Nov 16 16:43:34 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Mon, 16 Nov 2020 10:43:34 -0600 (CST) Subject: [squeak-dev] The Inbox: Collections-ct.860.mcz In-Reply-To: References: <753be4cbfb3e4bf289cd4e3b16829231@student.hpi.uni-potsdam.de> <639dce959bb4491396bcb3b725608d2e@student.hpi.uni-potsdam.de> Message-ID: <1605545014248-0.post@n4.nabble.com> See Collections-ct.921 :-) Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 17:22:15 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 17:22:15 +0000 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz In-Reply-To: References: , Message-ID: <2583bba45b6746d6915f9da5070fdf74@student.hpi.uni-potsdam.de> Hi Jakob, thanks for the detailed review! :-) > How about using MCDefinition>>#isRevisionOf: instead of a description = b description? Saves people like me from wondering why description is used here (and what it contains anyway). Because I did not know this small but useful method. :P Will be fixed in the next version ... > In domain terms, why is it significant here that the definitions are members of an organization? Why does this procedure not apply to organization changes or script changes, for example? Fair question. #description is only unique for a definition that is part of an organization. Given a set of two MCVersions one of which would add and the second one would delete an MCOrganizationDefinition for separate packages, by the current implementation these organization definitions would be revisions of each other and thus would be wiped up in #forgetSuperfluousMethodRemovals. However, since you're commenting this, I'm asking myself two questions: 1. Is it a valid operation to remove an entire organization definition under any circumstances? 2. Couldn't we instead modify the #definition implementation of MCOrganizationDefinition and insert the containing system category name at this place? Semantically, this would look better for me, but unfortunately, MCOrganizationDefinition does not have a relevant instance variable ... > Instead of allocating another Collection instance, you could also use an OrderedCollection for the removals and use removeAllSuchThat:, or put all the conditions in just one reject block. Good idea. > > Thanks to Tom Beckmann (TB) > > Finally, doesn't Tom use tobe as his author initials? Does he? In Pheno (2018), he uses TB. However, the following returns to 'tobe': SystemNavigation authors at: 'Tom Beckmann' Hm ... ;-) Best, Christoph ________________________________ Von: Jakob Reschke Gesendet: Montag, 16. November 2020 17:28:19 An: squeak-dev at lists.squeakfoundation.org; Thiede, Christoph; Tom Beckmann Betreff: Re: [squeak-dev] The Inbox: Monticello-ct.732.mcz Hi, Am Mo., 16. Nov. 2020 um 16:00 Uhr schrieb : > > + removals := removals reject: [:removal | > + removal isOrganizationMember and: [ > + additions anySatisfy: [:addition | > + addition isOrganizationMember and: [addition description = removal description]]]].! How about using MCDefinition>>#isRevisionOf: instead of a description = b description? Saves people like me from wondering why description is used here (and what it contains anyway). In domain terms, why is it significant here that the definitions are members of an organization? Why does this procedure not apply to organization changes or script changes, for example? Instead of allocating another Collection instance, you could also use an OrderedCollection for the removals and use removeAllSuchThat:, or put all the conditions in just one reject block. > Thanks to Tom Beckmann (TB) Finally, doesn't Tom use tobe as his author initials? Kind regards, Jakob -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.thiede at student.hpi.uni-potsdam.de Mon Nov 16 18:21:06 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Mon, 16 Nov 2020 12:21:06 -0600 (CST) Subject: [squeak-dev] Mac Users please test this :-) | Re: The Inbox: Morphic-ct.1588.mcz In-Reply-To: References: Message-ID: <1605550866354-0.post@n4.nabble.com> Hi all, while revising this proposal for the Nine Key Bug, which I'd really like to fix in the Trunk soon, I realized that a good part of the complexity of this commit, #mapSpecialKeyToShift: and the keyboardLayout logic, is added suspiciously and only "probably necessary for certain VM implementations". I turned it off on my machine and could not identify any need to do implement shift key mappings manually on the image-side. Are there any edge cases I could be missing? Tested for both QWERTZ and QWERTY on: - Windows 10, - WSL Ubuntu with VcXsrv, and - Squeak.js. But I can't test it on Apple system. Could some Mac User maybe please merge this version, comment out the following paragraph, and find out if the editor enclosing functionality is still working well? (aKeyboardEvent shiftPressed or: ["Allow Control key in lieu of Alt+Shift for certain special keys." Preferences cmdKeysInText and: [aKeyboardEvent controlKeyPressed]]) ifTrue: [character := self mapSpecialKeyToShift: character]. Thanks in advance! :-) If I don't get any feedback within a week, I'll assume this code branch is no longer required and remove it in my next revision of this version. Best, Christoph -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From Christoph.Thiede at student.hpi.uni-potsdam.de Mon Nov 16 18:36:32 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Mon, 16 Nov 2020 18:36:32 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1893 (squeak-trunk - 25ebaf1) In-Reply-To: <5fb14ab467988_13facfc9d441c247126@travis-tasks-84bf9c5865-9kzck.mail> References: , <5fb14ab467988_13facfc9d441c247126@travis-tasks-84bf9c5865-9kzck.mail> Message-ID: <4ab417345c664ac583bae4af71613d3a@student.hpi.uni-potsdam.de> The 64-bit job log is really interesting: Raw log 1An error occurred while generating the build script. Top Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Travis CI Gesendet: Sonntag, 15. November 2020 16:35:17 An: squeak-dev at lists.squeakfoundation.org Betreff: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1893 (squeak-trunk - 25ebaf1) squeak-smalltalk / squeak-app [branch icon]squeak-trunk [build has errored] Build #1893 has errored [arrow to build time] [clock icon]14 mins and 38 secs [Marcel Taeumel avatar]Marcel Taeumel 25ebaf1 CHANGESET → Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] Want to know about upcoming build environment updates? Would you like to stay up-to-date with the upcoming Travis CI build environment updates? We set up a mailing list for you! SIGN UP HERE [book icon] Documentation about Travis CI Have any questions? We're here to help. Unsubscribe from build emails from the squeak-smalltalk/squeak-app repository. To unsubscribe from all build emails, please update your settings. [black and white travis ci logo] Travis CI GmbH, Rigaer Str. 8, 10427 Berlin, Germany | GF/CEO: Randy Jacops | Contact: contact at travis-ci.com | Amtsgericht Charlottenburg, Berlin, HRB 140133 B | Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz: DE282002648 -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Mon Nov 16 18:44:20 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Mon, 16 Nov 2020 19:44:20 +0100 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz In-Reply-To: <2583bba45b6746d6915f9da5070fdf74@student.hpi.uni-potsdam.de> References: <2583bba45b6746d6915f9da5070fdf74@student.hpi.uni-potsdam.de> Message-ID: Am Mo., 16. Nov. 2020 um 18:22 Uhr schrieb Thiede, Christoph : > > However, since you're commenting this, I'm asking myself two questions: > > Is it a valid operation to remove an entire organization definition under any circumstances? taH pagh taHbe (To be, or not to be)... [1] There is always an organization as long as there is a package. Removing the package organization is only valid when you unload (remove) the whole package. According to MCOrganizationDefinition>>#unload it would only remove empty categories anyway. [1] https://en.wikipedia.org/wiki/The_Klingon_Hamlet > Couldn't we instead modify the #definition implementation of MCOrganizationDefinition and insert the containing system category name at this place? Semantically, this would look better for me, but unfortunately, MCOrganizationDefinition does not have a relevant instance variable ... > Did you mean #description instead? In absence of a packageName variable, it would have to find the common prefix of the elements in its categories variable. Though for cross-package loads, it must be made sure that it still behaves correctly (GoferLoad>>#updateCategories). I suggest to check or resolve that later and keep the current behavior, to not block your current contribution. > > In domain terms, why is it significant here that the definitions are members of an organization? Why does this procedure not apply to organization changes or script changes, for example? > > Fair question. #description is only unique for a definition that is part of an organization. Given a set of two MCVersions one of which would add and the second one would delete an MCOrganizationDefinition for separate packages, by the current implementation these organization definitions would be revisions of each other and thus would be wiped up in #forgetSuperfluousMethodRemovals. > Instead for now, is there a more meaningful selector than isOrganizationMember given that this property just corresponds to another one that you are really looking for? canDistinguish[SomethingLikeInstancesOrTheOppositeOfRevisionsOfAnother], canDistinguishRevisionsFromOtherObjects, canDistinguishRevisionsAcrossPackages? Or override isRevisionOf:, but then it would be inconsistent with behavior that relies on description directly for the time being (e. g. hash --> Dictionary overwriting). From lewis at mail.msen.com Tue Nov 17 01:11:22 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 16 Nov 2020 20:11:22 -0500 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> Message-ID: <20201117011122.GA58604@shell.msen.com> Hi Christoph, On Mon, Nov 16, 2020 at 03:31:47PM +0000, Thiede, Christoph wrote: > Hi Dave, > > eliminating further globals is definitively always a desirable goal, but > are you referring to any certain domain? It looks as if the most problematic > portions of global state resist in the Project/Process logic themselves. The four globals of interest are: - World. This has already been cleaned up, and the global World remains only for support of external packages or projects that have references to it. For a trunk image, the global can be removed without issue. - ActiveWorld. This is meaningful only to a Morphic project and presumably can be refactored to eliminate the global. - ActiveHand. This is meaningful only to a Morphic project and presumably can be refactored to eliminate the global. - ActiveEvent. This is probably global to the system, and it may be appropriate to leave it as a global variable. My opinion - ActiveWorld looks like the next thing to eliminate if possible. It is clearly related to World, and figuring out why ActiveWorld needs to exist would be the next problem to solve. After that, ActiveHand would be then next thing to look at. It is specific to Morphic, and it is not clear what it should mean in the context of World in World, or in mixed Morphic and MVC projects. Finally, ActiveEvent might need attention. I would rate this as low priority, and there may not be anything wrong with the current use of global state for ActiveEvent. > For example, should we have one user interrupt watcher per project, and > how should be decided which of them is activated if there is an MVC embedded > into a Morphic project? Questions over questions :-) > The user interrupt watcher exists at a lower level. I think (but am not certain) that it needs to be this way. The event that triggers the user interrupt watcher is processed through the VM, and by the time the VM finds out about the user interrupt request, it does not have any easy way to know about the Process the user request was intended to interrupt. So no, I don't think that this should be handled on a per-Project basis. The key thing is to know (or deduce) what Process needs to be interrupted, and it probably does not much matter what Project context the interrupt is handled in. Dave From marcel.taeumel at hpi.de Tue Nov 17 08:44:05 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Tue, 17 Nov 2020 09:44:05 +0100 Subject: [squeak-dev] Drop shadows during grabbing In-Reply-To: <7dae3c9848744daab2341717f4fc629d@student.hpi.uni-potsdam.de> References: <840b04d3e6334b40a967906bd5513b05@student.hpi.uni-potsdam.de> <,> <7dae3c9848744daab2341717f4fc629d@student.hpi.uni-potsdam.de> Message-ID: Hi Christoph. > Would this be a too simple fix for the issue? I would not want to do that for every morph. That's the wrong place to fix it. Just take a look at HandMorph and fix the creation of that cached picture. Best, Marcel Am 16.11.2020 16:41:16 schrieb Thiede, Christoph : Hi Marcel! Would this be a too simple fix for the issue? In Morph >> #fullDrawOn:       ...   "Pass 1: Draw eventual drop-shadow" -     self hasDropShadow + (self hasDropShadow and: [(self ownerSatisfying: #isHandMorph) isNil]) + ifTrue: [self drawDropShadowOn: aCanvas].       .... Best, Christoph Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Montag, 9. November 2020 09:01:58 An: squeak-dev Betreff: Re: [squeak-dev] Drop shadows during grabbing   Hi Christoph. > I wonder whether we should turn off drop shadows during grabbing a morph? We already do at some places. See (some) senders of #hasDropShadow:. Still, it feels like a workaround and does not yet apply to the hand's caching procedure. See HandMorph >> #updateCacheCanvas:. Best, Marcel Am 19.09.2020 21:04:28 schrieb Thiede, Christoph : Hi all, I wonder whether we should turn off drop shadows during grabbing a morph? And it looks even more strange when grabbing menu items (citing from Squeak by Example): This is related to the #menuAppearance3d preference, but I never met a physics system were shadows can throw their own shadows 🤔 Best, Christoph -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 6693 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pastedImage.png Type: image/png Size: 61116 bytes Desc: not available URL: From kirtai+st at gmail.com Tue Nov 17 13:41:37 2020 From: kirtai+st at gmail.com (Douglas Brebner) Date: Tue, 17 Nov 2020 13:41:37 +0000 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <20201117011122.GA58604@shell.msen.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> <20201117011122.GA58604@shell.msen.com> Message-ID: <58281eba-0579-cfa2-d625-b75b07132e3d@gmail.com> On 17/11/2020 01:11, David T. Lewis wrote: > - ActiveHand. This is meaningful only to a Morphic project and > presumably can be refactored to eliminate the global. How does this interact with multiple hands? From lewis at mail.msen.com Tue Nov 17 16:26:45 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 17 Nov 2020 11:26:45 -0500 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <58281eba-0579-cfa2-d625-b75b07132e3d@gmail.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> <20201117011122.GA58604@shell.msen.com> <58281eba-0579-cfa2-d625-b75b07132e3d@gmail.com> Message-ID: <20201117162645.GA36986@shell.msen.com> On Tue, Nov 17, 2020 at 01:41:37PM +0000, Douglas Brebner wrote: > > On 17/11/2020 01:11, David T. Lewis wrote: > >- ActiveHand. This is meaningful only to a Morphic project and > >presumably can be refactored to eliminate the global. > > How does this interact with multiple hands? > That question, and others like it, are exactly what needs to be understood (and hopefully documented) before attempting any surgery on the system :-) There are a few pages on the swiki that provide some context. This one is a good starting point: http://wiki.squeak.org/squeak/118 Dave From forums.jakob at resfarm.de Tue Nov 17 18:53:24 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Tue, 17 Nov 2020 19:53:24 +0100 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <20201117162645.GA36986@shell.msen.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> <20201117011122.GA58604@shell.msen.com> <58281eba-0579-cfa2-d625-b75b07132e3d@gmail.com> <20201117162645.GA36986@shell.msen.com> Message-ID: Don't forget your own email from September: ---------- Forwarded message --------- Von: *David T. Lewis* Date: So., 20. Sep. 2020, 17:50 Subject: [squeak-dev] ActiveGlobals explained by Andreas Raab To: In the course of trying to better understand the role of the ActiveHand global, I found an excellent explanation by Andreas Raab in his original change set. I put this on the swiki and linked it to several related pages: http://wiki.squeak.org/squeak/6647 It is amusing to note how I found this. I was trying to figure out what object should properly own the active hand, and I had conviced myself that it should probably be the WolrdState for a Morphic world. So as an experiment, it tried adding the instance variable to WorldState, and I discovered to my surprise that it was already there. It was completely unreferenced, but one of my Morphic worlds still had it set to point to a HandMorph, which seemed odd. Looking back at old images, I found that the activeHand instance var in WorldState was last used in Squeak 3.0, and that the global variable that replaced it was in use as of Squeak 3.10.2. A bit of digging though the files.squeak.org archives led me to the original change set in which the change was made. Andreas provided a preamble with explanation of the rationale for the change, this this is what I copied to the swiki. Despite the fact that a WorldState instance still point to an activeHand, that reference has apparently been hanging around for the last 20 years without actually being used for anything. Dave David T. Lewis schrieb am Di., 17. Nov. 2020, 17:26: > On Tue, Nov 17, 2020 at 01:41:37PM +0000, Douglas Brebner wrote: > > > > On 17/11/2020 01:11, David T. Lewis wrote: > > >- ActiveHand. This is meaningful only to a Morphic project and > > >presumably can be refactored to eliminate the global. > > > > How does this interact with multiple hands? > > > > That question, and others like it, are exactly what needs to be understood > (and hopefully documented) before attempting any surgery on the system :-) > > There are a few pages on the swiki that provide some context. This one > is a good starting point: > > http://wiki.squeak.org/squeak/118 > > Dave > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Tue Nov 17 19:26:03 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Tue, 17 Nov 2020 19:26:03 0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1715.mcz Message-ID: Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1715.mcz ==================== Summary ==================== Name: Morphic-ct.1715 Author: ct Time: 17 November 2020, 8:25:42.546431 pm UUID: 4a1a9a9f-9ae1-0640-9f18-17e3c956fa0c Ancestors: Morphic-mt.1713 Re-enables handling of #launchDrop events when the VM is configured as a singleton and has been invoked again, though currently only handled with a rudimentary fallback implementation. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html. Thanks to Jakob (jr) for the feedback! =============== Diff against Morphic-mt.1713 =============== Item was changed: ----- Method: HandMorph>>generateDropFilesEvent: (in category 'private events') ----- generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := MouseEvent redButton. "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { [1] -> [ "dragEnter" externalDropMorph := TransferMorph new dragTransferType: #filesAndDirectories; source: self; passenger: (numFiles = 0 "Usually, numFiles and drop paths are delivered on dragDrop only. Still reserving this possibility for able host implementations." ifTrue: [self flag: #vmCapabilityMissing. 'Unknown host content' translated] ifFalse: [self collectDropFilesAndDirectories: numFiles]); yourself. "During the drag operation, the host system is responsible for displaying the cursor." self grabMorph: externalDropMorph. self showTemporaryCursor: Cursor blank. externalDropMorph bottomRight: self topLeft. "Southeast area of the cursor is blocked by drawings from the source application. Display our drop morph at the opposite corner of the cursor." ]. [2] -> [ "dragMove" ^ MouseMoveEvent new setType: #mouseMove startPoint: self position endPoint: position trail: "{self position. position}"(self mouseDragTrailFrom: evtBuf) buttons: buttons hand: self stamp: stamp ]. [3] -> [ "dragLeave" externalDropMorph ifNotNil: #abandon. externalDropMorph := nil. self showTemporaryCursor: nil ]. [4] -> [ "dragDrop" + | oldButtons event | + oldButtons := lastEventBuffer fifth + bitOr: (lastEventBuffer sixth bitShift: 3). + event := MouseButtonEvent new + setType: #mouseUp + position: position + which: (oldButtons bitXor: buttons) + buttons: buttons + nClicks: 0 + hand: self + stamp: stamp. + - | oldButtons | externalDropMorph ifNil: [ + "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been invoked again with a new image file (aka #launchDrop, runAsSingleInstance on Unix, or RunSingleApp on Windows)." + self flag: #forLater. "ct: When we decouple event generation from Morphic, we will probably need to introduce a separate SystemLaunchEvent class for this event. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html." + self world + launchSystemFiles: (self collectDropFilesAndDirectories: numFiles) + event: event. + ^ nil]. - "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been called again (aka #launchDrop)." - ^ self error: 'Launch drop for singleton Squeak not yet implemented.']. self showTemporaryCursor: nil. externalDropMorph passenger isString ifTrue: [ self flag: #vmCapabilityMissing. "See above." externalDropMorph passenger: (self collectDropFilesAndDirectories: numFiles)]. externalDropMorph := nil. (Smalltalk classNamed: #DropFilesEvent) ifNotNil: [:eventClass | | classicEvent | "Generate classic DropFilesEvent, providing backward compatibility." classicEvent := eventClass new setPosition: position contents: numFiles hand: self. self processEvent: classicEvent. classicEvent wasHandled ifTrue: [^ nil]]. + ^ event ]. - oldButtons := lastEventBuffer fifth - bitOr: (lastEventBuffer sixth bitShift: 3). - ^ MouseButtonEvent new - setType: #mouseUp - position: position - which: (oldButtons bitXor: buttons) - buttons: buttons - nClicks: 0 - hand: self - stamp: stamp ]. [5] -> [ "drag request" "For dnd out. Not properly implemented at the moment." self shouldBeImplemented] }. ^ nil! Item was added: + ----- Method: PasteUpMorph>>launchSystemFiles:event: (in category 'event handling') ----- + launchSystemFiles: fileStreams event: anEvent + "Handle a number of files the singleton VM was invoked with again." + + self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." + ^ self dropFiles: fileStreams event: anEvent! From lewis at mail.msen.com Wed Nov 18 01:01:12 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Tue, 17 Nov 2020 20:01:12 -0500 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de> <20201117011122.GA58604@shell.msen.com> <58281eba-0579-cfa2-d625-b75b07132e3d@gmail.com> <20201117162645.GA36986@shell.msen.com> Message-ID: <20201118010112.GA22268@shell.msen.com> Oh my, how did I overlook that ;-) Indeed, the summary by Andreas is clear and very helpful: http://wiki.squeak.org/squeak/6647 Dave On Tue, Nov 17, 2020 at 07:53:24PM +0100, Jakob Reschke wrote: > Don't forget your own email from September: > > > ---------- Forwarded message --------- > Von: *David T. Lewis* > Date: So., 20. Sep. 2020, 17:50 > Subject: [squeak-dev] ActiveGlobals explained by Andreas Raab > To: > > > In the course of trying to better understand the role of the ActiveHand > global, I found an excellent explanation by Andreas Raab in his original > change set. I put this on the swiki and linked it to several related pages: > > http://wiki.squeak.org/squeak/6647 > > It is amusing to note how I found this. I was trying to figure out what > object should properly own the active hand, and I had conviced myself > that it should probably be the WolrdState for a Morphic world. > > So as an experiment, it tried adding the instance variable to WorldState, > and I discovered to my surprise that it was already there. It was completely > unreferenced, but one of my Morphic worlds still had it set to point to > a HandMorph, which seemed odd. > > Looking back at old images, I found that the activeHand instance var in > WorldState was last used in Squeak 3.0, and that the global variable that > replaced it was in use as of Squeak 3.10.2. > > A bit of digging though the files.squeak.org archives led me to the > original change set in which the change was made. Andreas provided a > preamble with explanation of the rationale for the change, this this > is what I copied to the swiki. > > Despite the fact that a WorldState instance still point to an activeHand, > that reference has apparently been hanging around for the last 20 years > without actually being used for anything. > > Dave > > > David T. Lewis schrieb am Di., 17. Nov. 2020, 17:26: > > > On Tue, Nov 17, 2020 at 01:41:37PM +0000, Douglas Brebner wrote: > > > > > > On 17/11/2020 01:11, David T. Lewis wrote: > > > >- ActiveHand. This is meaningful only to a Morphic project and > > > >presumably can be refactored to eliminate the global. > > > > > > How does this interact with multiple hands? > > > > > > > That question, and others like it, are exactly what needs to be understood > > (and hopefully documented) before attempting any surgery on the system :-) > > > > There are a few pages on the swiki that provide some context. This one > > is a good starting point: > > > > http://wiki.squeak.org/squeak/118 > > > > Dave > > > > > > > From marcel.taeumel at hpi.de Wed Nov 18 08:45:05 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 18 Nov 2020 09:45:05 +0100 Subject: [squeak-dev] The Inbox: Morphic-ct.1714.mcz In-Reply-To: <0f29086c2e694843ba9358b783730db0@student.hpi.uni-potsdam.de> References: <,> <0f29086c2e694843ba9358b783730db0@student.hpi.uni-potsdam.de> Message-ID: Note that I did not touch #borderWidth because it would bump to "2" far too quickly. We would need 1.5 but our rendering system does not allow that. :-) > unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ... Because the current rendering system does not support it. Best, Marcel Am 16.11.2020 16:26:17 schrieb Thiede, Christoph : Hm, #screenScaled etc. could improve the readability a bit, but they do not answer the question of which layers one should touch to configure dpi-sensitivity. Conceptionally, I would expect this to happen in the Canvas/drawing and the event-handling parts only, but unfortunately, Morphic and Point/Rectangle do not support sub-pixels for whatever reason ... Best, Christoph Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 12. November 2020 09:40:47 An: squeak-dev Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1714.mcz   Well, I think that #screenUnscaled is a more elegant solution for the things happening in UserInterfaceTheme >> #fixFontsAndScaleAound: :-) Best, Marcel Am 12.11.2020 09:36:24 schrieb Marcel Taeumel : In Vivide, I added #scaleValueToDisplay on Integer and Point besides the already existing #scaleIconToDisplay on Form. Tobias (topa) suggested a different approach for DPI-awareness, that is, #screenScaled and #screenUnscaled -- which I did not fully understand yet. Best, Marcel Am 11.11.2020 18:33:54 schrieb commits at source.squeak.org : A new version of Morphic was added to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1714.mcz ==================== Summary ==================== Name: Morphic-ct.1714 Author: ct Time: 11 November 2020, 6:33:33.254952 pm UUID: ffa0dcf6-075e-f04b-876f-fdee1186c309 Ancestors: Morphic-mt.1710 Honor hi-dpi settings for halo, window, and keyboard-focus indication borders. Argh, this makes all these methods harder to read ... Did I patch the methods at the right abstraction level? Please review! =============== Diff against Morphic-mt.1710 =============== Item was changed: ----- Method: Morph>>keyboardFocusWidth (in category 'drawing') ----- keyboardFocusWidth + ^ ((self userInterfaceTheme keyboardFocusWidth ifNil: [3]) * RealEstateAgent scaleFactor) rounded! - ^ self userInterfaceTheme keyboardFocusWidth ifNil: [3]! Item was changed: ----- Method: SimpleHaloMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas "Draw this morph only if it has no target." (Preferences showBoundsInHalo and: [self target isWorldMorph not]) ifTrue: [ aCanvas frameAndFillRectangle: self bounds fillColor: Color transparent + borderWidth: (2 * RealEstateAgent scaleFactor) rounded - borderWidth: 2 borderColor: (self userInterfaceTheme borderColor ifNil: [Color blue alpha: 0.8])]! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifFalse: [self hasDropShadow: false] ifTrue: [ self addDropShadow. self hasDropShadow: self isKeyWindow. "maybe turn off again"]. + self borderWidth: ((self userInterfaceTheme borderWidth ifNil: [1]) * RealEstateAgent scaleFactor) rounded. - self borderWidth: (self userInterfaceTheme borderWidth ifNil: [1]). label font: (self userInterfaceTheme titleFont ifNil: [TextStyle defaultFont]).! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Wed Nov 18 08:48:41 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Wed, 18 Nov 2020 09:48:41 +0100 Subject: [squeak-dev] The Inbox: Morphic-ct.1715.mcz In-Reply-To: References: Message-ID: Hi Christoph. > Re-enables handling of #launchDrop events ... It still looks like a proposal of having PasteUpMorph >> #launchSystemEventFiles:event: to me. :-) I would rather like to see such a send happen to the current project, not the world. Best, Marcel Am 17.11.2020 20:26:13 schrieb commits at source.squeak.org : Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1715.mcz ==================== Summary ==================== Name: Morphic-ct.1715 Author: ct Time: 17 November 2020, 8:25:42.546431 pm UUID: 4a1a9a9f-9ae1-0640-9f18-17e3c956fa0c Ancestors: Morphic-mt.1713 Re-enables handling of #launchDrop events when the VM is configured as a singleton and has been invoked again, though currently only handled with a rudimentary fallback implementation. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html. Thanks to Jakob (jr) for the feedback! =============== Diff against Morphic-mt.1713 =============== Item was changed: ----- Method: HandMorph>>generateDropFilesEvent: (in category 'private events') ----- generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := MouseEvent redButton. "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { [1] -> [ "dragEnter" externalDropMorph := TransferMorph new dragTransferType: #filesAndDirectories; source: self; passenger: (numFiles = 0 "Usually, numFiles and drop paths are delivered on dragDrop only. Still reserving this possibility for able host implementations." ifTrue: [self flag: #vmCapabilityMissing. 'Unknown host content' translated] ifFalse: [self collectDropFilesAndDirectories: numFiles]); yourself. "During the drag operation, the host system is responsible for displaying the cursor." self grabMorph: externalDropMorph. self showTemporaryCursor: Cursor blank. externalDropMorph bottomRight: self topLeft. "Southeast area of the cursor is blocked by drawings from the source application. Display our drop morph at the opposite corner of the cursor." ]. [2] -> [ "dragMove" ^ MouseMoveEvent new setType: #mouseMove startPoint: self position endPoint: position trail: "{self position. position}"(self mouseDragTrailFrom: evtBuf) buttons: buttons hand: self stamp: stamp ]. [3] -> [ "dragLeave" externalDropMorph ifNotNil: #abandon. externalDropMorph := nil. self showTemporaryCursor: nil ]. [4] -> [ "dragDrop" + | oldButtons event | + oldButtons := lastEventBuffer fifth + bitOr: (lastEventBuffer sixth bitShift: 3). + event := MouseButtonEvent new + setType: #mouseUp + position: position + which: (oldButtons bitXor: buttons) + buttons: buttons + nClicks: 0 + hand: self + stamp: stamp. + - | oldButtons | externalDropMorph ifNil: [ + "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been invoked again with a new image file (aka #launchDrop, runAsSingleInstance on Unix, or RunSingleApp on Windows)." + self flag: #forLater. "ct: When we decouple event generation from Morphic, we will probably need to introduce a separate SystemLaunchEvent class for this event. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html." + self world + launchSystemFiles: (self collectDropFilesAndDirectories: numFiles) + event: event. + ^ nil]. - "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been called again (aka #launchDrop)." - ^ self error: 'Launch drop for singleton Squeak not yet implemented.']. self showTemporaryCursor: nil. externalDropMorph passenger isString ifTrue: [ self flag: #vmCapabilityMissing. "See above." externalDropMorph passenger: (self collectDropFilesAndDirectories: numFiles)]. externalDropMorph := nil. (Smalltalk classNamed: #DropFilesEvent) ifNotNil: [:eventClass | | classicEvent | "Generate classic DropFilesEvent, providing backward compatibility." classicEvent := eventClass new setPosition: position contents: numFiles hand: self. self processEvent: classicEvent. classicEvent wasHandled ifTrue: [^ nil]]. + ^ event ]. - oldButtons := lastEventBuffer fifth - bitOr: (lastEventBuffer sixth bitShift: 3). - ^ MouseButtonEvent new - setType: #mouseUp - position: position - which: (oldButtons bitXor: buttons) - buttons: buttons - nClicks: 0 - hand: self - stamp: stamp ]. [5] -> [ "drag request" "For dnd out. Not properly implemented at the moment." self shouldBeImplemented] }. ^ nil! Item was added: + ----- Method: PasteUpMorph>>launchSystemFiles:event: (in category 'event handling') ----- + launchSystemFiles: fileStreams event: anEvent + "Handle a number of files the singleton VM was invoked with again." + + self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." + ^ self dropFiles: fileStreams event: anEvent! -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Wed Nov 18 15:40:59 2020 From: builds at travis-ci.org (Travis CI) Date: Wed, 18 Nov 2020 15:40:59 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1896 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fb5408b7ce91_13ff2bf0d41881186bd@travis-tasks-6f5cbfd644-67r7b.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1896 Status: Errored Duration: 18 mins and 54 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/744443492?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Thu Nov 19 15:38:38 2020 From: builds at travis-ci.org (Travis CI) Date: Thu, 19 Nov 2020 15:38:38 +0000 Subject: [squeak-dev] [CRON] Passed: squeak-smalltalk/squeak-app#1897 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fb6917e71927_13ff170f34fd4122178@travis-tasks-68847bbb59-h4ls6.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1897 Status: Passed Duration: 16 mins and 40 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/744675711?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stes at telenet.be Fri Nov 20 06:43:38 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Fri, 20 Nov 2020 07:43:38 +0100 (CET) Subject: [squeak-dev] squeak-4 release 4.19.2 Message-ID: <2069650556.7685588.1605854618404.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Squeak V4 is updated in OpenIndiana to version 4.19.2: Name: runtime/squeak-4 Summary: The Squeak V4 Smalltalk Virtual Machine Publisher: openindiana.org Version: 4.19.2 Build Release: 5.11 Branch: 2020.0.1.0 Packaging Date: 19 November 2020 at 19:08:49 Size: 2.10 MB FMRI: pkg://openindiana.org/runtime/squeak-4 at 4.19.2,5.11-2020.0.1.0:20201119T190849Z This release (4.19.2) has the SSL plugin from Tobias Pape. There are also some "blog style" notes on running Squeak on OpenIndiana at: http://docs.openindiana.org/handbook/community/squeak/index.html For example to test whether the operating system has the required dependencies: # pkg contents -r -t depend squeak-4 That can be used to see for example what version of the openssl libs the binary requires. This version of squeak was tested to run Squeak4.6-15012.zip from: http://files.squeak.org/4.6/ And when using "Update Squeak" it can update the image over the network from 15102 to 15117 .. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJft2VHAAoJEAwpOKXMq1MaCrcH+wfb3Zq08NSqCuBB1SdF7SwM mj957dgepnk0908Ev1hwzmJekayd2Lqx323Y5jG0FVNhI4HsDR9VSd2LubNxle6i /r9YBZKVOA8Kcn0MnJ2xOgTGaQgng1QURjgQOMynDZdnedCrJI5Md1gqUB+6APxI 3wP26/l5O68S4qXabRbiDl6poPRY4XfHqr8HEI7OQjm9vW2JM17w7mo4lATT4OtU xprKLzzGuFwm/hrfN4ii48gxCYxcTQ6s4gJgtG1NKUwdKAQx7oRxYfT/4FuWnzyG cg3bDOFD34Dt3+/v/IWZjah+inFOwykJt2r730ou3+98Rp4hqmOS7dSO//LGKUM= =WF1z -----END PGP SIGNATURE----- From tomjonabc at gmail.com Fri Nov 20 10:15:01 2020 From: tomjonabc at gmail.com (Tom Beckmann) Date: Fri, 20 Nov 2020 11:15:01 +0100 Subject: [squeak-dev] Today: ECOOP Squeak Tutorial Message-ID: Hi everyone, you might want to take a look at the ECOOP Squeak Tutorial happening today: https://2020.ecoop.org/details/ecoop-2020-tutorials/2/SqueakLive Best, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:15:21 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:15:21 +0000 Subject: [squeak-dev] The Inbox: Morphic-ct.1715.mcz In-Reply-To: References: , Message-ID: <40bdb5bc95184f8780de23e8172ef8a3@student.hpi.uni-potsdam.de> Hi Marcel, do you really think that it would be a good idea to couple HandMorph directly to MorphicProject? I always thought the world should be the only object to communicate with the world - except for accessing a small set of global interfaces such as #world, #addDeferredUIMessage: and #uiManager. :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Mittwoch, 18. November 2020 09:48:41 An: squeak-dev Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1715.mcz Hi Christoph. > Re-enables handling of #launchDrop events ... It still looks like a proposal of having PasteUpMorph >> #launchSystemEventFiles:event: to me. :-) I would rather like to see such a send happen to the current project, not the world. Best, Marcel Am 17.11.2020 20:26:13 schrieb commits at source.squeak.org : Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1715.mcz ==================== Summary ==================== Name: Morphic-ct.1715 Author: ct Time: 17 November 2020, 8:25:42.546431 pm UUID: 4a1a9a9f-9ae1-0640-9f18-17e3c956fa0c Ancestors: Morphic-mt.1713 Re-enables handling of #launchDrop events when the VM is configured as a singleton and has been invoked again, though currently only handled with a rudimentary fallback implementation. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html. Thanks to Jakob (jr) for the feedback! =============== Diff against Morphic-mt.1713 =============== Item was changed: ----- Method: HandMorph>>generateDropFilesEvent: (in category 'private events') ----- generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := MouseEvent redButton. "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { [1] -> [ "dragEnter" externalDropMorph := TransferMorph new dragTransferType: #filesAndDirectories; source: self; passenger: (numFiles = 0 "Usually, numFiles and drop paths are delivered on dragDrop only. Still reserving this possibility for able host implementations." ifTrue: [self flag: #vmCapabilityMissing. 'Unknown host content' translated] ifFalse: [self collectDropFilesAndDirectories: numFiles]); yourself. "During the drag operation, the host system is responsible for displaying the cursor." self grabMorph: externalDropMorph. self showTemporaryCursor: Cursor blank. externalDropMorph bottomRight: self topLeft. "Southeast area of the cursor is blocked by drawings from the source application. Display our drop morph at the opposite corner of the cursor." ]. [2] -> [ "dragMove" ^ MouseMoveEvent new setType: #mouseMove startPoint: self position endPoint: position trail: "{self position. position}"(self mouseDragTrailFrom: evtBuf) buttons: buttons hand: self stamp: stamp ]. [3] -> [ "dragLeave" externalDropMorph ifNotNil: #abandon. externalDropMorph := nil. self showTemporaryCursor: nil ]. [4] -> [ "dragDrop" + | oldButtons event | + oldButtons := lastEventBuffer fifth + bitOr: (lastEventBuffer sixth bitShift: 3). + event := MouseButtonEvent new + setType: #mouseUp + position: position + which: (oldButtons bitXor: buttons) + buttons: buttons + nClicks: 0 + hand: self + stamp: stamp. + - | oldButtons | externalDropMorph ifNil: [ + "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been invoked again with a new image file (aka #launchDrop, runAsSingleInstance on Unix, or RunSingleApp on Windows)." + self flag: #forLater. "ct: When we decouple event generation from Morphic, we will probably need to introduce a separate SystemLaunchEvent class for this event. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html." + self world + launchSystemFiles: (self collectDropFilesAndDirectories: numFiles) + event: event. + ^ nil]. - "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been called again (aka #launchDrop)." - ^ self error: 'Launch drop for singleton Squeak not yet implemented.']. self showTemporaryCursor: nil. externalDropMorph passenger isString ifTrue: [ self flag: #vmCapabilityMissing. "See above." externalDropMorph passenger: (self collectDropFilesAndDirectories: numFiles)]. externalDropMorph := nil. (Smalltalk classNamed: #DropFilesEvent) ifNotNil: [:eventClass | | classicEvent | "Generate classic DropFilesEvent, providing backward compatibility." classicEvent := eventClass new setPosition: position contents: numFiles hand: self. self processEvent: classicEvent. classicEvent wasHandled ifTrue: [^ nil]]. + ^ event ]. - oldButtons := lastEventBuffer fifth - bitOr: (lastEventBuffer sixth bitShift: 3). - ^ MouseButtonEvent new - setType: #mouseUp - position: position - which: (oldButtons bitXor: buttons) - buttons: buttons - nClicks: 0 - hand: self - stamp: stamp ]. [5] -> [ "drag request" "For dnd out. Not properly implemented at the moment." self shouldBeImplemented] }. ^ nil! Item was added: + ----- Method: PasteUpMorph>>launchSystemFiles:event: (in category 'event handling') ----- + launchSystemFiles: fileStreams event: anEvent + "Handle a number of files the singleton VM was invoked with again." + + self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." + ^ self dropFiles: fileStreams event: anEvent! -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:19:53 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:19:53 +0000 Subject: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? In-Reply-To: <20201117011122.GA58604@shell.msen.com> References: <1e91b9ed0d454ff79c6665153ebe73be@student.hpi.uni-potsdam.de> <73300338ceb547439198f9117d114a28@student.hpi.uni-potsdam.de>, <20201117011122.GA58604@shell.msen.com> Message-ID: <003c578e0a5d48f3b7b77a868519deb0@student.hpi.uni-potsdam.de> Hi Dave, I don't see your point. I already have eliminated ActiveWorld, ActiveHand, and ActiveEvent *are* in the Trunk, are you talking about the #currentWorld, #currentHand, and #currentEvent senders? :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von David T. Lewis Gesendet: Dienstag, 17. November 2020 02:11:22 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Worlds in Worlds are NOT completely dead?! ???? Hi Christoph, On Mon, Nov 16, 2020 at 03:31:47PM +0000, Thiede, Christoph wrote: > Hi Dave, > > eliminating further globals is definitively always a desirable goal, but > are you referring to any certain domain? It looks as if the most problematic > portions of global state resist in the Project/Process logic themselves. The four globals of interest are: - World. This has already been cleaned up, and the global World remains only for support of external packages or projects that have references to it. For a trunk image, the global can be removed without issue. - ActiveWorld. This is meaningful only to a Morphic project and presumably can be refactored to eliminate the global. - ActiveHand. This is meaningful only to a Morphic project and presumably can be refactored to eliminate the global. - ActiveEvent. This is probably global to the system, and it may be appropriate to leave it as a global variable. My opinion - ActiveWorld looks like the next thing to eliminate if possible. It is clearly related to World, and figuring out why ActiveWorld needs to exist would be the next problem to solve. After that, ActiveHand would be then next thing to look at. It is specific to Morphic, and it is not clear what it should mean in the context of World in World, or in mixed Morphic and MVC projects. Finally, ActiveEvent might need attention. I would rate this as low priority, and there may not be anything wrong with the current use of global state for ActiveEvent. > For example, should we have one user interrupt watcher per project, and > how should be decided which of them is activated if there is an MVC embedded > into a Morphic project? Questions over questions :-) > The user interrupt watcher exists at a lower level. I think (but am not certain) that it needs to be this way. The event that triggers the user interrupt watcher is processed through the VM, and by the time the VM finds out about the user interrupt request, it does not have any easy way to know about the Process the user request was intended to interrupt. So no, I don't think that this should be handled on a per-Project basis. The key thing is to know (or deduce) what Process needs to be interrupted, and it probably does not much matter what Project context the interrupt is handled in. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:23:46 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:23:46 +0000 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz In-Reply-To: References: <2583bba45b6746d6915f9da5070fdf74@student.hpi.uni-potsdam.de>, Message-ID: <0626202ff7ac433d95f95cb560508f69@student.hpi.uni-potsdam.de> > Instead for now, is there a more meaningful selector than isOrganizationMember given that this property just corresponds to another one that you are really looking for? canDistinguish[SomethingLikeInstancesOrTheOppositeOfRevisionsOfAnother], canDistinguishRevisionsFromOtherObjects, canDistinguishRevisionsAcrossPackages? Hm, quite long names. :-) How about #hasUniqueDescription? #isDescription[Globally]Unique? Something like that? :-) > Or override isRevisionOf:, but then it would be inconsistent with behavior that relies on description directly for the time being (e. g. hash --> Dictionary overwriting). No, we shouldn't override #isRevisionOf: for exactly the reason you gave. Best, Christoph ________________________________ Von: Jakob Reschke Gesendet: Montag, 16. November 2020 19:44:20 An: Thiede, Christoph Cc: squeak-dev at lists.squeakfoundation.org; Tom Beckmann Betreff: Re: [squeak-dev] The Inbox: Monticello-ct.732.mcz Am Mo., 16. Nov. 2020 um 18:22 Uhr schrieb Thiede, Christoph : > > However, since you're commenting this, I'm asking myself two questions: > > Is it a valid operation to remove an entire organization definition under any circumstances? taH pagh taHbe (To be, or not to be)... [1] There is always an organization as long as there is a package. Removing the package organization is only valid when you unload (remove) the whole package. According to MCOrganizationDefinition>>#unload it would only remove empty categories anyway. [1] https://en.wikipedia.org/wiki/The_Klingon_Hamlet > Couldn't we instead modify the #definition implementation of MCOrganizationDefinition and insert the containing system category name at this place? Semantically, this would look better for me, but unfortunately, MCOrganizationDefinition does not have a relevant instance variable ... > Did you mean #description instead? In absence of a packageName variable, it would have to find the common prefix of the elements in its categories variable. Though for cross-package loads, it must be made sure that it still behaves correctly (GoferLoad>>#updateCategories). I suggest to check or resolve that later and keep the current behavior, to not block your current contribution. > > In domain terms, why is it significant here that the definitions are members of an organization? Why does this procedure not apply to organization changes or script changes, for example? > > Fair question. #description is only unique for a definition that is part of an organization. Given a set of two MCVersions one of which would add and the second one would delete an MCOrganizationDefinition for separate packages, by the current implementation these organization definitions would be revisions of each other and thus would be wiped up in #forgetSuperfluousMethodRemovals. > Instead for now, is there a more meaningful selector than isOrganizationMember given that this property just corresponds to another one that you are really looking for? canDistinguish[SomethingLikeInstancesOrTheOppositeOfRevisionsOfAnother], canDistinguishRevisionsFromOtherObjects, canDistinguishRevisionsAcrossPackages? Or override isRevisionOf:, but then it would be inconsistent with behavior that relies on description directly for the time being (e. g. hash --> Dictionary overwriting). -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:30:12 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:30:12 +0000 Subject: [squeak-dev] The Inbox: Kernel-ct.1359.mcz In-Reply-To: References: , Message-ID: <65b5fb02d5ee4f4fb456524b12798f5d@student.hpi.uni-potsdam.de> Hi Eliot, I just noticed your request right now only, apparently Marcel has already done the work. I am never sure about reparenting my proposals' diffs to the original ancestor versus forming my own implicit branch of deltas. The former can be compared more easier to the Trunk, the latter is more helpful to watch how a proposal evolves over time ... This has been discussed a lot of times, ending up with identifying an insufficient tool infrastructure for this domain (at least IMHO). If it's easier for the merger, I will try to use the Reparent button more often, but still, it's an imperfect solution for me. :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Sonntag, 1. November 2020 20:02:19 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1359.mcz Hi Christoph, can you please submit a merge of your changes here with Kernel-eem.1359 and then we can move your contribution to trunk. Always submitting deltas to other inbox versions means one of us has to merge and that could be perceived as a little passive aggressive ;-). On Sun, Nov 1, 2020 at 10:51 AM > wrote: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-ct.1359.mcz ==================== Summary ==================== Name: Kernel-ct.1359 Author: ct Time: 1 November 2020, 7:50:24.183428 pm UUID: 3b12b316-79f3-de41-8765-8296d964b821 Ancestors: Kernel-mt.1353 Revise and extend Context #runSimulated: implementation. Remove restriction to blocks that do not have a method return. Add support for exception signaling during the execution, which caused unterminated simulation of the calling process in the past. Support argless contextAtEachStep blocks. Benchmarks: code: [Context runSimulated: [100 at 100 corner: 200 at 200]] bench before: 16.7 ms/run after: 19.8 ms/run I think this should be okay, given the fact that the primary purpose of simulation is providing explorability but not efficiency ... =============== Diff against Kernel-mt.1353 =============== Item was changed: ----- Method: Context class>>runSimulated: (in category 'simulation') ----- runSimulated: aBlock + "Simulate the execution of aBlock, until it ends or is curtailed. Answer the result it returns." - "Simulate the execution of the argument, current. Answer the result it - returns." ^ thisContext sender runSimulated: aBlock + contextAtEachStep: [] - contextAtEachStep: [:ignored] "Context runSimulated: [Pen new defaultNib: 5; go: 100]"! Item was changed: ----- Method: Context>>runSimulated:contextAtEachStep: (in category 'system simulation') ----- + runSimulated: aBlock contextAtEachStep: anotherBlock + "Simulate the execution of the argument, aBlock, until it ends or is curtailed. If any exception is signaled during the execution, simulate it being handled on the present caller stack. Evaluate anotherBlock with the current context prior to each instruction executed. Answer the simulated value of aBlock." + + | current resume ensure | + resume := false. - runSimulated: aBlock contextAtEachStep: block2 - "Simulate the execution of the argument, aBlock, until it ends. aBlock - MUST NOT contain an '^'. Evaluate block2 with the current context - prior to each instruction executed. Answer the simulated value of aBlock." - | current | - aBlock hasMethodReturn - ifTrue: [self error: 'simulation of blocks with ^ can run loose']. current := aBlock asContext. + ensure := current insertSender: (Context contextEnsure: [resume := true]). + ensure sender ifNil: [ensure privSender: self]. "For backward compatibility, do not fail if aBlock is dead." + + (anotherBlock numArgs = 0 + ifTrue: ["optimized" [resume]] + ifFalse: ["stop execution on time, don't expose simulation details to caller" + [current == ensure or: + ["Context >> #resume:" + current size >= 2 and: + [(current at: 2) == ensure]]] ]) - current pushArgs: Array new from: self. - [current == self] whileFalse: + [anotherBlock cull: current. - [block2 value: current. current := current step]. + + ^ current jump! - ^self pop! -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:32:57 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:32:57 +0000 Subject: [squeak-dev] The Trunk: Kernel-eem.1359.mcz In-Reply-To: References: <43ceaee2ed23407bb6af146378e1621a@student.hpi.uni-potsdam.de>, Message-ID: <2fe81455bd654724a3b66208806914bf@student.hpi.uni-potsdam.de> Not sure about this, but Marcel recently wrote that versions should be moved not copied from the inbox to the trunk, didn't he? > If to treated do you have permissions or do I need to do it? I think I don't have the permissions? I don't even know how I could do this ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Freitag, 30. Oktober 2020 23:24:34 An: The general-purpose Squeak developers list Cc: packages at lists.squeakfoundation.org Betreff: Re: [squeak-dev] The Trunk: Kernel-eem.1359.mcz On Fri, Oct 30, 2020 at 2:17 PM Thiede, Christoph > wrote: Thanks for merging! :-) But I believe you copied the versions only, they are still in the inbox ... You want these moving to treated inbox? Or...? If to treated do you have permissions or do I need to do it? I don't think they should go to trunk because the history is wrong. But that's just what I think. Best, Christoph ________________________________ Von: Squeak-dev > im Auftrag von commits at source.squeak.org > Gesendet: Freitag, 30. Oktober 2020 20:10:10 An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org Betreff: [squeak-dev] The Trunk: Kernel-eem.1359.mcz Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1359.mcz ==================== Summary ==================== Name: Kernel-eem.1359 Author: eem Time: 30 October 2020, 12:10:07.699375 pm UUID: 1ec9a445-37fa-4256-84d8-9bdf8b52eb7d Ancestors: Kernel-eem.1358 Merge Kernel-ct.1358 Author: ct Time: 28 October 2020, 11:37:24.817544 pm UUID: c9af6acb-61cf-af42-b5fa-3afa8451bb24 Ancestors: Kernel-mt.1353 Fixes a simulation bug that occurs when executing ProtoObject >> #doesNotUnderstand:. See KernelTests-ct.388. =============== Diff against Kernel-eem.1358 =============== Item was changed: ----- Method: Context>>send:to:with:lookupIn: (in category 'controlling') ----- send: selector to: rcvr with: arguments lookupIn: lookupClass "Simulate the action of sending a message with selector and arguments to rcvr. The argument, lookupClass, is the class in which to lookup the message. This is the receiver's class for normal messages, but for super messages it will be some specific class related to the source method." | meth primIndex val ctxt | (meth := lookupClass lookupSelector: selector) ifNil: + [selector == #doesNotUnderstand: ifTrue: + [self error: 'Recursive message not understood!!' translated]. + ^self send: #doesNotUnderstand: - [^self send: #doesNotUnderstand: to: rcvr with: {(Message selector: selector arguments: arguments) lookupClass: lookupClass} lookupIn: lookupClass]. meth isCompiledMethod ifFalse: ["Object as Methods (OaM) protocol: 'The contract is that, when the VM encounters an ordinary object (rather than a compiled method) in the method dictionary during lookup, it sends it the special selector #run:with:in: providing the original selector, arguments, and receiver.'. DOI: 10.1145/2991041.2991062." + ^self send: #run:with:in: - ^ self send: #run:with:in: to: meth with: {selector. arguments. rcvr}]. meth numArgs = arguments size ifFalse: [^ self error: ('Wrong number of arguments in simulated message {1}' translated format: {selector})]. (primIndex := meth primitive) > 0 ifTrue: [val := self doPrimitive: primIndex method: meth receiver: rcvr args: arguments. (self isPrimFailToken: val) ifFalse: [^val]]. (selector == #doesNotUnderstand: and: [lookupClass == ProtoObject]) ifTrue: + [^self error: ('Simulated message {1} not understood' translated format: {arguments first selector})]. - [^ self error: ('Simulated message {1} not understood' translated format: {arguments first selector})]. ctxt := Context sender: self receiver: rcvr method: meth arguments: arguments. + (primIndex isInteger and: [primIndex > 0]) ifTrue: - (primIndex notNil and: [primIndex > 0]) ifTrue: [ctxt failPrimitiveWith: val]. ^ctxt! -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christoph.Thiede at student.hpi.uni-potsdam.de Fri Nov 20 12:41:57 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Fri, 20 Nov 2020 12:41:57 +0000 Subject: [squeak-dev] MethodNodes on Monticello (was: The Inbox: Kernel-ct.1339.mcz) In-Reply-To: References: <1603917195775-0.post@n4.nabble.com>, Message-ID: Hi Eliot, > You're not alone in this thought. Until comments are part of the grammar it is likely a vain hope however. Well, I suppose that this would be a quite architectonical change both in Compiler/Parser and on the Monticello/SqueakSource end ... But this could be a bit easier by installing a pretty-printer before committing and using pretty diffs in Monticello only (for certain repositories). > But another approach is to read Kent Beck's Smalltalk Best Practice Patterns and see if his arguments on formatting are persuasive. This is as good a style guide as it gets. I read them, and they are not bad at all. > IMO, Smalltalk is not a curly-brace language. Yep, and I hate to read this: foo ifTrue: [ "do something" ] ifFalse: [ "do something else" ]. Still ... > [ & ] delimit an object, not some statements. The problem is that when writing the opening bracket on the same line as the first block statement, the block statements will look inconsistently intended: someBoolean ifTrue: [self doOneThing. self doAnotherThing. "Do you notice the visual glitch above?"]. Also, Marcel has argued that it's harder to select the whole block content at once if you have to strip of the brackets before. However, the latter might also be a question of tools. Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Eliot Miranda Gesendet: Freitag, 30. Oktober 2020 19:56 Uhr An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] The Inbox: Kernel-ct.1339.mcz On Wed, Oct 28, 2020 at 1:33 PM Christoph Thiede > wrote: Done, see Kernel-ct.1357. Thanks! Sometimes I believe we should store MethodNodes on Monticello only, or have the code automatically formatted by the source.squeak.org servers right during uploading using a pretty printer ... :-) You're not alone in this thought. Until comments are part of the grammar it is likely a vain hope however. But another approach is to read Kent Beck's Smalltalk Best Practice Patterns and see if his arguments on formatting are persuasive. This is as good a style guide as it gets. IMO, Smalltalk is not a curly-brace language. [ & ] delimit an object, not some statements. But many of the original Smalltalkers formatted code as you do so I'm not right. It's just that I've rewritten lots of the Kernel code and so I'm overly possessive. I hope you're not offended. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Fri Nov 20 14:15:45 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Fri, 20 Nov 2020 15:15:45 +0100 Subject: [squeak-dev] The Inbox: Monticello-ct.732.mcz In-Reply-To: <0626202ff7ac433d95f95cb560508f69@student.hpi.uni-potsdam.de> References: <2583bba45b6746d6915f9da5070fdf74@student.hpi.uni-potsdam.de> <0626202ff7ac433d95f95cb560508f69@student.hpi.uni-potsdam.de> Message-ID: Am Fr., 20. Nov. 2020 um 13:23 Uhr schrieb Thiede, Christoph : > > > Instead for now, is there a more meaningful selector than isOrganizationMember given that this property just corresponds to another one that you are really looking for? canDistinguish[SomethingLikeInstancesOrTheOppositeOfRevisionsOfAnother], canDistinguishRevisionsFromOtherObjects, canDistinguishRevisionsAcrossPackages? > > > Hm, quite long names. :-) How about #hasUniqueDescription? #isDescription[Globally]Unique? Something like that? :-) > I was also tinkering with "unique", but the problem is that the descriptions are not unique. Different definitions of the same method have equal descriptions, that's the point. Description itself is a rather abstract term here. It is more like the key for an index (and it is used as such in dictionaries). Thinking out loud to inspire others to find a better name: As of now, the objects defined by these MCDefinitions exist at most once (= are unique) in an Environment at any point in time. To say the same for MCOrganizationDefinition and MCScriptDefinition, as of now, you would in addition have to give the package name. For those kinds of definitions that you want to skip here, you say the definitions cannot be distinguished by their description if you combine the patches of multiple packages. Well, actually that's not entirely true: MCScriptDefinition has the packageName in its description, so you can manage scripts of multiple packages in the same patch and they are immune to your consolidation procedure -- but unlike classes, traits, and methods, you cannot say that this script is still the same if you move it to another package. For the identity of classes, traits, and methods, the package is irrelevant (unlike in other languages) and therefore the removals and additions across packages can be consolidated. The package is just a filter superimposed on these objects, whereas each script is associated with a package directly. MCOrganizationDefinition is not officially associated with a package, but its instances usually contain only the categories of just a single package. And conversely, packages are delimited/defined/identified by categories. canMoveBetweenPackages? Later you might change some of the premises, such as: either add the packageName to MCOrganizationDefinition's description, or consolidate MCOrganizationDefinitions if you do a cross-package load so it does contain categories from multiple packages. Then you could also consolidate the operations like for methods (although with a different algorithm in the second approach). Or you stick with your isOrganizationMember, but promise to refactor very soon, so it does not stick around. ;-) From forums.jakob at resfarm.de Fri Nov 20 14:44:01 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Fri, 20 Nov 2020 15:44:01 +0100 Subject: [squeak-dev] MethodNodes on Monticello (was: The Inbox: Kernel-ct.1339.mcz) In-Reply-To: References: <1603917195775-0.post@n4.nabble.com> Message-ID: Am Fr., 20. Nov. 2020 um 13:42 Uhr schrieb Thiede, Christoph : > > foo ifTrue: [ > "do something" > ] ifFalse: [ > "do something else" > ]. > > [...] > > Also, Marcel has argued that it's harder to select the whole block content at once if you have to strip of the brackets before. However, the latter might also be a question of tools. > If you double-click or press Cmd-space on the inside next to either bracket, it will select the whole block. I believe this will get more comfortable only with a projectional editor or something like a larger hotspot to single-click on where you can currently double-click. Funnily the need for this feature also goes the other way around: I had to deal with the C-like style above in a legacy code base (plus sometimes wrong indentation!) and being able to select the whole block content at once was the only sane way to find the correct matching bracket... The problem with this style is that you cannot easily identify the headline of the block because there are no keywords like if or else to look out for at the *beginning* of the line. And the cascades of closing brackets take up too much screen space. From forums.jakob at resfarm.de Fri Nov 20 14:51:31 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Fri, 20 Nov 2020 15:51:31 +0100 Subject: [squeak-dev] MethodNodes on Monticello (was: The Inbox: Kernel-ct.1339.mcz) In-Reply-To: References: <1603917195775-0.post@n4.nabble.com> Message-ID: Am Fr., 20. Nov. 2020 um 13:42 Uhr schrieb Thiede, Christoph : > > The problem is that when writing the opening bracket on the same line as the first block statement, the block statements will look inconsistently intended: > > someBoolean > ifTrue: > [self doOneThing. > self doAnotherThing. > "Do you notice the visual glitch above?"]. > This used to bug me, too. But eventually I realized that it does not really matter for my reading comprehension. It's like all those parentheses bugging the Lisp apprentice in the beginning. Rectangular block does still have an issue when a complex block is the receiver of a message, such as with on:do: and ensure: [anything ifTrue: [...]] ensure: ["do something else" that ifTrue: [...]]. Because the lower part of the receiver block is indented, the ensure could be seen as being inside of it, just at a glance. But the style that puts the opening bracket on the previous like does not solve this issue at all. From christoph.thiede at student.hpi.uni-potsdam.de Fri Nov 20 16:32:59 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Fri, 20 Nov 2020 10:32:59 -0600 (CST) Subject: [squeak-dev] The Inbox: Tools-ct.959.mcz In-Reply-To: References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> Message-ID: <1605889979781-0.post@n4.nabble.com> Hi Subbu, > Yes. A list of buttons along the top (New Find Dual/Single ...) just below > the Window title. I must have missed your message in March, so sorry! Your proposal sounds interesting, but I am not sure whether we actually need such a button bar. It would be helpful for me to do method-related stuff such as Browse, Implementors, Inheritance, etc. We could basically use the common CodeHolder bar for this purpose, and we would also get rid of the "Toggle diffing" menu item in a change sorter's method's more menu. But what buttons would you exactly provide for all changesets? Creation, deletion, and search are commonly available via menu only in Squeak. Or am I just too conversation at this point? :-) Best, Christoph ----- Carpe Squeak! -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From frank-lesser at lesser-software.com Fri Nov 20 21:15:56 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Fri, 20 Nov 2020 22:15:56 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: <1605889979781-0.post@n4.nabble.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> Message-ID: <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> Hi all. I announced last week that I resumed DNG ( Dolphin Smalltalk Next Generation ) on my Twitter @LesserFrank. Since then I had a lot of fun working on it. Also started a DNG integration into Godot game engine which I am working since 2016 ( 2.x ) DolphinScript will be a Smalltalk script language deeply integrated into upcoming Godot 4.0. Happy Smalltalking, Frank From eliot.miranda at gmail.com Fri Nov 20 21:19:27 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri, 20 Nov 2020 13:19:27 -0800 Subject: [squeak-dev] MethodNodes on Monticello (was: The Inbox: Kernel-ct.1339.mcz) In-Reply-To: References: <1603917195775-0.post@n4.nabble.com> Message-ID: On Fri, Nov 20, 2020 at 6:51 AM Jakob Reschke wrote: > Am Fr., 20. Nov. 2020 um 13:42 Uhr schrieb Thiede, Christoph > : > > > > The problem is that when writing the opening bracket on the same line as > the first block statement, the block statements will look inconsistently > intended: > > > > someBoolean > > ifTrue: > > [self doOneThing. > > self doAnotherThing. > > "Do you notice the visual glitch above?"]. > > > > This used to bug me, too. But eventually I realized that it does not > really matter for my reading comprehension. It's like all those > parentheses bugging the Lisp apprentice in the beginning. > and I would never indent the ifTrue: unless it has a matching ifFalse:, so the above would be someBoolean ifTrue: [self doOneThing. self doAnotherThing. "Do you notice the visual glitch above?"]. and otherwise it would be someBoolean ifTrue: [self doOneThing] ifFalse: [self doTheOther] etc. > > Rectangular block does still have an issue when a complex block is the > receiver of a message, such as with on:do: and ensure: > > [anything > ifTrue: > [...]] > ensure: > ["do something else" > that ifTrue: [...]]. > > Because the lower part of the receiver block is indented, the ensure > could be seen as being inside of it, just at a glance. > But the style that puts the opening bracket on the previous like does > not solve this issue at all. > It does indeed. I tend to indent the body of the block with two tabs so that it is to the right of the ensure: or on:do:, in those cases. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliot.miranda at gmail.com Fri Nov 20 21:27:53 2020 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri, 20 Nov 2020 13:27:53 -0800 Subject: [squeak-dev] Ephemerons and Dictionaries In-Reply-To: <1489615602.26941.1605879926124.JavaMail.administrator@n4.nabble.com> References: <1489615602.26941.1605879926124.JavaMail.administrator@n4.nabble.com> Message-ID: Hi Christoph, On Fri, Nov 20, 2020 at 5:45 AM wrote: > Hi Eliot, > > Marcel recently mentioned to me that he'd like to see a real > implementation and use cases of the ephemeron mechanism in the Trunk before > the next Squeak release is shipped. It sounds pretty much as if you are > developing just such an implementation at the moment, is my assumption > correct? Would you mind to share a short summary of the scope of your > efforts (I assume you're developing an Ephemeron class and an > EphemeronDictionary class plus, at the best, some tests for both) and your > progress on them? What's about clients of these classes, are you having any > concrete plans at the moment where the new classes should be used in the > Trunk? > I haven't got round to committing yet. Here's a change set (attached). If there should be any part of your project you would like to delegate > (e.g. integration into DependentsFields or implementation of finalization > logic for file streams), you can let me know. If you would like to > implement it yourself - which I can absolutely relate to as a developer > enthusiast myself -, no problem either, there are enough different open > sites for all of us in Squeak that are at least as exciting! This message > should only be read as a small status request for this project of yours > because it appears to mark an important milestone in the Kernel development > that might be nice to reach prior to the Squeak 6.0 Anniversary Release. > Well, the main thing we need now is test cases. So try it with some real world examples and see what breaks. > > Please feel free to send your update to the mailing list! :-) > Thanks!! > > Best, > Christoph > > > Hi Levente, > > On Thu, Oct 1, 2020 at 12:55 PM Levente Uzonyi > wrote: > > > Hi Eliot, > > > > On Thu, 1 Oct 2020, Eliot Miranda wrote: > > > > > > > > > > > On Thu, Oct 1, 2020 at 11:41 AM Levente Uzonyi > > wrote: > > > Hi Eliot, > > > > > > On Thu, 1 Oct 2020, Eliot Miranda wrote: > > > > > > > Hi All, > > > > > > > > to be able to ease EphemeronDicitonary into the system > > easily I'd like to clean up adding associations to Dictionary. It seems > > to > > me there's a partial implementation of choosing an association class > > > appropriate for a > > > > dictionary in the implementors of > > associationClass: Dictionary>>#associationClass, > > WeakKeyDictionary>>#associationClass, > > WeakValueDictionary>>#associationClass, > > (& in my image STON class>>#associationClass). > > > This seems > > > > workable; an EphemeronDictionary would simply > > add associationClass ^ Ephemeron and we're done, except not quite... > > > > > > What's the definition of Ephemeron? > > > > Sorry for being dense. It needed a good class comment anyway, so the below > was a reasonable draft. > > Association ephemeronSubclass: #Ephemeron > instanceVariableNames: 'container' > classVariableNames: '' > poolDictionaries: '' > category: 'System-Finalization' > > is my working definition. Subject to change, of course. It looks as if > atNewIndex:put: will serve perfectly well. > > > > > > > > > > An Ephemeron is an association known to the garbage collection system., > > allowing it to function as a pre-mortem finalizer. > > > > > > A Ephemeron is intended for uses such as associating an object's > > dependents with an object without preventing garbage collection. > > > > > > Consider a traditional implementation of dependents in non-Model > > classes. There is a Dictionary in Object, DependentsFields. Objects > > wishing to have dependents are entered as keys in DependentsFields and > the > > value is a > > > sequence of their dependents. Since their dependents (if they are like > > views/morphs, etc in MVC) will refer directly to the key object (in their > > model inst var etc), there is no way to use weak collections in > > > DependentsFields to allow the cycle of an object and its dependents to > > be collected. If DependentsFields uses a WeakArray to hold the > > associations from objects to their dependents then those associations, > and > > the > > > dependencies with it will simply be lost since the only reference to > the > > associations is in DependentsFields. > > > > > > Ephemeron differs from a normal association in that it is known to the > > garbage collector and it is involved in tracing. First, note that an > > Ephemeron is a *strong* referrer. The objects it refers to cannot be > > garbage > > > collected. It is not weak. But it is able to discover when it is the > > *only* reference to an object. To be accurate, an Ephemeron is notified > > by > > the collector when its key is only references from the transitive closure > > of > > > references from ephemerons. i.e. when an ephemeron is notified we know > > that there are no reference paths to the ephemeron's key other than > > through > > ephemerons. > > > > > > Ephemerons are notified by the garage collector placing them in a queue > > and signalling a semaphore for each element in the queue. An image level > > process (the extended finalization process) extracts them from the queue > > and > > > sends mourn to each ephemeron (since its key is effectively dead). > What > > an Ephemeron does in response to the notification is programmable (one > can > > add subclasses of Ephemeron). But the default behaviour is to send > > finalize > > > to the key, and then to remove itself from the dictionary it is in, > > allowing it and the transitive closure of objects reachable form it, to > be > > collected in a subsequent garbage collection. > > > > > > Implementation: both in scavenging, and in scan-mark, if an ephemeron > is > > encountered its key is examined. If the key is reachable from the roots > > (has already been scavenged, or is already marked), then the ephemeron > > marked > > > and treated as an ordinary object. If the key is not yet known to be > > reachable the ephemeron is held in an internal queue of maybe triggerable > > ephemerons, and its objects are not traced. > > > > > > At the end of the initial scavenge or scan-mark phase, this queue of > > triggerable ephemerons is examined. All ephemerons in the list whose key > > is reachable are traced, and removed from the list. This then leaves the > > list > > > populated only with ephemerons whose keys are as yet untraced, and > hence > > only referenced from the ephemerons in the triggerable ephemeron queue, > > which now becomes the triggered ephemeron queue. All these ephemerons > are > > > placed in the finalization queue for processing in the image above, and > > all objects reachable from the ephemerons are traced (scavenged, marked). > > This phase may encounter new triggerable ephemerons which will be added > to > > the > > > triggerable ephemeron queue (not likely in practice, but essential for > > sound semantics). So the triggering phase continues until the system nds > > at a fixed point with an empty triggerable ephemeron queue. > > > > > > Implications and advantages: > > > Because ephemerons do not allow their object to be collected, they can > > be, and are, used to implement pre-mortem finalization. So e.g. a file > > can > > flush its buffers and then close its file descriptor before being > > collected > > > (which may also imply that the system runs the garbage collector > > *before* snapshotting, not as part of the snapshot primitive). > Ephemerons > > are conceptually more simple than WeakKeyDictionary et al, since they are > > about > > > reference path, not merely the existence of strong references. The > back > > reference from a dependent to an object renders a weak key > > dictionary useless in enabling an isolated cycle to be collected since > the > > back reference is > > > string, and keeps the reference from the weak key alive. > > > > > > History: Ephemerons are like guardians. They were invented by George > > Bosworth in the early '90's, to provide pre-mortem finalization and to > > solve the problem of DependentsFields retaining garbage. > > > > Sorry for not being clear. I was asking about the class definition to see > > what fields it would have. I presume the first line is something like: > > > > Object ephemeronSubclass: #Ephemeron > > ... > > > > > > > > > > > > > > > > First, HashedCollection does not use associationClass, but it > > implements atNewIndex:put: and it strikes me that atNewIndex:put: for > > Dictionary really should check for the thing being added at least > > > includingBehavior: self > > > > > > HashedCollection does not use associationClass because > > HashedCollections > > > in general (e.g. Sets) may store any object in their internal > > array not > > > just Associations. > > > Dictionary introduces #associationClass because it only stores > > > associations (except for MethodDictionary of course). > > > > > > #atNewIndex:put: is a private method. Its senders must ensure > that > > the > > > arguments will not corrupt the receiver's internal state > > > > > > > associationClass. So that means Dictionary should override > > atNewIndex:put:. > > > > > > Can you give a bit more information about how EphemeronDictionary > > should > > > work? > > > > > > > > > If one wants an object to be sent finalize before it is collected one > > simply stores it in an EphemeronDictionary, which uses instances of > > Ephemeron as its associations. So e.g. > > > > > > StandardFileStream>>initialize > > > ... > > > self registerForFinalization. > > > ... > > > > > > Object>>registerForFinalization > > > FinalizationDictionary at: self put: nil. > > > > > > and DependentsFields becomes a variant that uses a subclass of > Ephemeron > > that does not send finalize (or vice verce). > > > > > > Or we could keep it simple and use DependentsFields, have finalize sent > > to objects in DependentsFields when no longer reachable, but have a null > > finalize method in Object. > > > > Again, sorry for not being clear. I would like to know how the current > > implementation of #atNewIndex:put: could prevent EphemeronDictionary to > > work as intended. > > Does EphemeronDictionary do something special other dictionaries don't > > that is not compatible with how #atNewIndex:put: currently works? > > > > > > Levente > > > > > > > > Levente > > > > > > > > > > > But what should happen in atNewIndex:put: if the object being > > added isn't appropriate? Do we > > > > - raise an error? (that's my preference, but I've got limited > > use cases in my head) > > > > - replace the association with one of assocationClass? (seems > > dangerous to me but maybe someone needs this or the existing system does > > this anyway) > > > > - ignore it and hope the user knows what they're doing? > > > > > > > > > _,,,^..^,,,_ > > > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ephemerons.2.cs Type: application/octet-stream Size: 10452 bytes Desc: not available URL: From kksubbu.ml at gmail.com Sat Nov 21 08:59:04 2020 From: kksubbu.ml at gmail.com (K K Subbu) Date: Sat, 21 Nov 2020 14:29:04 +0530 Subject: [squeak-dev] The Inbox: Tools-ct.959.mcz In-Reply-To: <1605889979781-0.post@n4.nabble.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> Message-ID: <5101007b-7b32-f7f2-7963-da776b982719@gmail.com> On 20/11/20 10:02 pm, Christoph Thiede wrote: >> Yes. A list of buttons along the top (New Find Dual/Single ...) just below >> the Window title. > I must have missed your message in March, so sorry! Your proposal sounds > interesting, but I am not sure whether we actually need such a button bar. > It would be helpful for me to do method-related stuff such as Browse, > Implementors, Inheritance, etc. We could basically use the common CodeHolder > bar for this purpose, and we would also get rid of the "Toggle diffing" menu > item in a change sorter's method's more menu. Chris, Thank you for digging out my suggestion from such a long time back. I almost forgot the context ;-). ChangeSorter is a tool to browse changesets. Therefore, I thought a button bar would be in order (along the lines of System Browser): * single/dual toggle * view selector (preamble, diff, postscript) * help If this sounds like an overkill, you could place a thin grip at the right edge of the changeset list to toggle/drag single/dual view (like the vertical split view grip in spreadsheets). It is intuitive and won't steal space from the method/code panes. Regards .. Subbu From commits at source.squeak.org Sat Nov 21 13:29:24 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 21 Nov 2020 13:29:24 0000 Subject: [squeak-dev] The Inbox: SMLoader-ct.94.mcz Message-ID: A new version of SMLoader was added to project The Inbox: http://source.squeak.org/inbox/SMLoader-ct.94.mcz ==================== Summary ==================== Name: SMLoader-ct.94 Author: ct Time: 21 November 2020, 2:29:23.320822 pm UUID: 020d7eb7-5f0c-4645-a705-a9c82cb67f7d Ancestors: SMLoader-cmm.93 Removes deprecated and unused toolbuilder methods for SMLoaderCategoricalPlus. =============== Diff against SMLoader-cmm.93 =============== Item was removed: - ----- Method: SMLoaderCategoricalPlus>>buildFancyWith: (in category 'DEPRECATED') ----- - buildFancyWith: aBuilder - "Creates a variant of the window where the package pane is split between installed and uninstalled packages." - | buttonBarHeight searchHeight vertDivide horizDivide | - buttonBarHeight := 0.07. - searchHeight := 0.07. - vertDivide := 0.5. - horizDivide := 0.6. - builder := aBuilder. - window := builder build: (builder pluggableWindowSpec new model: self; - label: #label; - children: (OrderedCollection new add: - ((self buildButtonBarWith: builder) - frame: (0 @ 0 corner: 1 @ buttonBarHeight); yourself); - add: ((self buildCategoriesListWith: builder) - frame: (0 @ buttonBarHeight corner: vertDivide @ horizDivide); yourself); - add: ((self buildSearchPaneWith: builder) - frame: (vertDivide @ buttonBarHeight corner: 1 @ (buttonBarHeight + searchHeight)); yourself); - add: ((self buildNotInstalledPackagesListWith: builder) - frame: (vertDivide @ (buttonBarHeight + searchHeight) corner: 1 @ (horizDivide / 2)); yourself); - add: ((self buildInstalledPackagesListWith: builder) - frame: (vertDivide @ (horizDivide / 2) corner: 1 @ horizDivide); yourself); - add: ((self buildPackagePaneWith: builder) - frame: (0 @ horizDivide corner: 1 @ 1); yourself); yourself)). - window on: #mouseEnter send: #paneTransition: to: window. - window on: #mouseLeave send: #paneTransition: to: window. - self setUpdatablePanesFrom: #(#installedPackageList #notInstalledPackageList ). - currentPackageList := #notInstalled. - window extent: self initialExtent. - ^ window! Item was removed: - ----- Method: SMLoaderCategoricalPlus>>buildInstalledPackagesListWith: (in category 'DEPRECATED') ----- - buildInstalledPackagesListWith: aBuilder - ^ aBuilder pluggableTreeSpec new model: self; - roots: #installedPackageList; - getSelectedPath: #selectedItemPath; - getSelected: #selectedItem; - setSelected: #selectedItem:; - menu: #packagesMenu:; - label: #itemLabel:; - getChildren: #itemChildren:; - hasChildren: #itemHasChildren:; - autoDeselect: true; - yourself! Item was removed: - ----- Method: SMLoaderCategoricalPlus>>buildNotInstalledPackagesListWith: (in category 'DEPRECATED') ----- - buildNotInstalledPackagesListWith: aBuilder - ^ aBuilder pluggableTreeSpec new model: self; - roots: #notInstalledPackageList; - getSelectedPath: #selectedItemPath; - getSelected: #selectedItem; - setSelected: #selectedItem:; - menu: #packagesMenu:; - label: #itemLabel:; - getChildren: #itemChildren:; - hasChildren: #itemHasChildren:; - autoDeselect: true; - yourself! From commits at source.squeak.org Sat Nov 21 13:33:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 21 Nov 2020 13:33:52 0000 Subject: [squeak-dev] The Inbox: ST80-ct.263.mcz Message-ID: A new version of ST80 was added to project The Inbox: http://source.squeak.org/inbox/ST80-ct.263.mcz ==================== Summary ==================== Name: ST80-ct.263 Author: ct Time: 21 November 2020, 2:33:51.363822 pm UUID: f3315492-4d28-f24c-971e-260fb9e743dd Ancestors: ST80-mt.262 Fixes confirmation dialog before closing an MVCProject, which should also show up when closing the current MVCProject. Kind of complements ST80-ct.250, but no strong dependency. =============== Diff against ST80-mt.262 =============== Item was changed: ----- Method: MVCProject>>okToChange (in category 'release') ----- okToChange "If there is no open window, we are fine to close." + ^ (self world scheduledControllers size <= 1) - ^ (self parent ~~ Project current - or: [self world scheduledControllers size <= 1]) or: [super okToChange]! From Christoph.Thiede at student.hpi.uni-potsdam.de Sat Nov 21 13:34:47 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sat, 21 Nov 2020 13:34:47 +0000 Subject: [squeak-dev] The Inbox: ST80-ct.263.mcz In-Reply-To: References: Message-ID: <04eeabb92a184780b65a813054a35911@student.hpi.uni-potsdam.de> By the way, why are these checks defined in #okToChange and not #okToClose? :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von commits at source.squeak.org Gesendet: Samstag, 21. November 2020 14:33:52 An: squeak-dev at lists.squeakfoundation.org Betreff: [squeak-dev] The Inbox: ST80-ct.263.mcz A new version of ST80 was added to project The Inbox: http://source.squeak.org/inbox/ST80-ct.263.mcz ==================== Summary ==================== Name: ST80-ct.263 Author: ct Time: 21 November 2020, 2:33:51.363822 pm UUID: f3315492-4d28-f24c-971e-260fb9e743dd Ancestors: ST80-mt.262 Fixes confirmation dialog before closing an MVCProject, which should also show up when closing the current MVCProject. Kind of complements ST80-ct.250, but no strong dependency. =============== Diff against ST80-mt.262 =============== Item was changed: ----- Method: MVCProject>>okToChange (in category 'release') ----- okToChange "If there is no open window, we are fine to close." + ^ (self world scheduledControllers size <= 1) - ^ (self parent ~~ Project current - or: [self world scheduledControllers size <= 1]) or: [super okToChange]! -------------- next part -------------- An HTML attachment was scrubbed... URL: From commits at source.squeak.org Sat Nov 21 19:33:14 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sat, 21 Nov 2020 19:33:14 0000 Subject: [squeak-dev] The Inbox: CommandLine-ct.18.mcz Message-ID: A new version of CommandLine was added to project The Inbox: http://source.squeak.org/inbox/CommandLine-ct.18.mcz ==================== Summary ==================== Name: CommandLine-ct.18 Author: ct Time: 21 November 2020, 8:33:12.860056 pm UUID: 35f67ed2-f5ea-5741-b2fe-2bcfb5f60107 Ancestors: CommandLine-TheresaHMartenK.17 Fixes a nil bug in CommandLineToolSet when debugging a process without extra contents. nil is a valid argument for contents. See Process >> #debug:title:full: and senders. =============== Diff against CommandLine-TheresaHMartenK.17 =============== Item was changed: ----- Method: CommandLineToolSet class>>debugProcess:context:label:contents:fullView: (in category 'debugging') ----- debugProcess: aProcess context: aContext label: aString contents: contents fullView: aBool "We can't open a command line debugger, so just log the error and carry on." | s | s := FileStream stderr. s nextPutAll: self className; nextPutAll: ': '; nextPutAll: aString; - cr; - nextPutAll: contents; cr. + contents ifNotNil: [ + s + nextPutAll: contents; + cr]. (aContext stackOfSize: 20) do: [:ctx | ctx printOn: s. s cr]. s flush.! From eric.gade at gmail.com Sun Nov 22 15:11:43 2020 From: eric.gade at gmail.com (Eric Gade) Date: Sun, 22 Nov 2020 10:11:43 -0500 Subject: [squeak-dev] Binary Read Streams from base64 decoded (ReadStream >> #binary ??) Message-ID: Hi all, I have some code I'm trying to make cross platform. In one of my classes, I store bits describing a Form as a base64 encoded string. Pharo has dramatically changed their streams in recent years, so on that end this simply works: `PNGReadWriter formFromStream: (self formSource base64Decoded readStream)` In Squeak the readStream produced will be a textual stream, which is somewhat understandable. But when I look at ReadStream >> #binary , I see that the method is empty. Is this on purpose? The only other recourse I can find is to send the message #asBinaryOrTextStream, but this breaks compatibility with Pharo, so I was hoping for a more straightforward solution. Any ideas? -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From builds at travis-ci.org Sun Nov 22 15:44:45 2020 From: builds at travis-ci.org (Travis CI) Date: Sun, 22 Nov 2020 15:44:45 +0000 Subject: [squeak-dev] [CRON] Errored: squeak-smalltalk/squeak-app#1900 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fba876d86ad_13fdc94ab2024137325@travis-tasks-5895455754-xxwmz.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1900 Status: Errored Duration: 19 mins and 51 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/745225821?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From forums.jakob at resfarm.de Sun Nov 22 15:47:28 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sun, 22 Nov 2020 16:47:28 +0100 Subject: [squeak-dev] Binary Read Streams from base64 decoded (ReadStream >> #binary ??) In-Reply-To: References: Message-ID: Hi Eric, If you don't want to use RWBinaryOrTextStream or asBinaryOrTextStream, you could try: aString base64Decoded asByteArray readStream. Traditionally, Smalltalk file streams are either in text (ascii) or binary mode, returning either bytes or characters when you read from the stream. #binary is the selector to put a file stream in binary mode. It has no effect on ReadStream, which is just a stream adapter on a Collection, not a file stream. The ReadStream will always return the elements of the collection, no conversion going on. ReadStream implements binary just so you can put one into a method that expects a file stream. Kind regards, Jakob Am So., 22. Nov. 2020 um 16:12 Uhr schrieb Eric Gade : > > Hi all, > > I have some code I'm trying to make cross platform. In one of my classes, I store bits describing a Form as a base64 encoded string. Pharo has dramatically changed their streams in recent years, so on that end this simply works: > > `PNGReadWriter formFromStream: (self formSource base64Decoded readStream)` > > In Squeak the readStream produced will be a textual stream, which is somewhat understandable. But when I look at ReadStream >> #binary , I see that the method is empty. Is this on purpose? The only other recourse I can find is to send the message #asBinaryOrTextStream, but this breaks compatibility with Pharo, so I was hoping for a more straightforward solution. > > Any ideas? > > -- > Eric > From Christoph.Thiede at student.hpi.uni-potsdam.de Sun Nov 22 15:53:22 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sun, 22 Nov 2020 15:53:22 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <,> , , <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> Message-ID: (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) ________________________________ Von: Thiede, Christoph Gesendet: Montag, 16. November 2020 16:22:01 An: squeak-dev Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project Hi Marcel, so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Donnerstag, 12. November 2020 10:07:28 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi all. I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. Best, Marcel Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : Hi all, > And canUnderstand: ? Or is that being too picky? > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? Well, my conception of the general contract would be exactly the following: (o class canUnderstand: m) ifTrue: [ self assert: [o respondsTo: m]]. (o respondsTo: m) ifFalse: [ self deny: [o class canUnderstand: m]]. (o respondsTo: m) ifTrue: [ self shouldnt: [o m] raise: MessageNotUnderstood]. [o m] on: MessageNotUnderstood do: [ self deny: [o respondsTo: m]]. But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the current discussion shows that the same argument applies for the second statement, too. > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Dienstag, 10. November 2020 09:34:49 An: squeak-dev Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > and generate the getter setter on demand (via doesNotUnderstand:) That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. Best. Marcel Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : Hi all, for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) See MatFileReader package in http://www.squeaksource.com/STEM.html Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel > a écrit : > And canUnderstand: ? Or is that being too picky? Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual dictionary instance. Hmmm..... I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? Best, Marcel Am 09.11.2020 21:08:14 schrieb Eliot Miranda >: On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel > wrote: Hi Levente. Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. And canUnderstand: ? Or is that being too picky? I did not know about #dictionaryClass:. That's a powerful hook. Best, Marcel Am 09.11.2020 03:07:54 schrieb Levente Uzonyi >: Hi Christoph, On Sun, 8 Nov 2020, Christoph Thiede wrote: > Hi Levente, > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > great because I depend on this functionality in another project and > currently require your JSON fork in my baseline. :-) I cannot merge it because that would bring back long removed methods, and MC wouldn't allow me to reject those. But I can add the changes manually. If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. What is the purpose of that method? I'm asking because it has got no comment, so I'm not sure its implementation is correct. For example, should JsonObject new respondsTo: #foo: return false? What should the following return? JsonObject new foo: 1; respondsTo: #foo: Another question is whether it is generally useful or not? If it's not, you can still have the desired behavior by creating a subclass. E.g.: JsonObject subclass: #PseudoObject instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'PseudoObject' PseudoObject >> respondsTo: aSymbol ^ (super respondsTo: aSymbol) or: [self includesKey: aSymbol] (Json new dictionaryClass: PseudoObject; readFrom: '{"foo": 42}' readStream) respondsTo: #foo "==> true" Levente > > Best, > Christoph > > > > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: JSON-ct.56.mcz Type: application/octet-stream Size: 26653 bytes Desc: JSON-ct.56.mcz URL: From eric.gade at gmail.com Sun Nov 22 16:06:31 2020 From: eric.gade at gmail.com (Eric Gade) Date: Sun, 22 Nov 2020 11:06:31 -0500 Subject: [squeak-dev] Binary Read Streams from base64 decoded (ReadStream >> #binary ??) In-Reply-To: References: Message-ID: On Sun, Nov 22, 2020 at 10:47 AM Jakob Reschke wrote: > Hi Eric, > > If you don't want to use RWBinaryOrTextStream or asBinaryOrTextStream, > you could try: aString base64Decoded asByteArray readStream. > Oh my, so obvious! Thanks -- Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.thiede at student.hpi.uni-potsdam.de Sun Nov 22 16:45:25 2020 From: christoph.thiede at student.hpi.uni-potsdam.de (Christoph Thiede) Date: Sun, 22 Nov 2020 10:45:25 -0600 (CST) Subject: [squeak-dev] Inspector Custom Value Panes & Related In-Reply-To: <43037785-C47E-4FC9-A599-501B483CA417@gmx.de> References: <1e5509177e4a4c8e9f831dbdf6c15e21@student.hpi.uni-potsdam.de> <8A5F154E-0BA8-4D64-8D1C-E844CCB85690@gmx.de> <4cad345e0ba544d7816544ff864fb74d@student.hpi.uni-potsdam.de> <5662556D-AA81-46B1-850B-CD6E89BCAF42@gmx.de> <43037785-C47E-4FC9-A599-501B483CA417@gmx.de> Message-ID: <1606063525812-0.post@n4.nabble.com> Hi all, can we merge the text emphasis changeset? I did not receive any other review than Tobias'. :-) Best, Christoph ----- Carpe Squeak! -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html From leves at caesar.elte.hu Sun Nov 22 16:46:21 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun, 22 Nov 2020 17:46:21 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > , , <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> Message-ID: Hi All, Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: JsonObject >> #respondsTo: aSymbol | precedence | (super respondsTo: aSymbol) ifTrue: [ ^true ]. (precedence := aSymbol precedence) = 1 ifTrue: [ ^self includesKey: aSymbol ]. (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ ^self includesKey: aSymbol allButLast ]. ^false Levente On Sun, 22 Nov 2020, Thiede, Christoph wrote: > (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) > > _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ > Von: Thiede, Christoph > Gesendet: Montag, 16. November 2020 16:22:01 > An: squeak-dev > Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project   > > Hi Marcel, > > > so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not > quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) > > > Best, > > Christoph > > _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ > Von: Squeak-dev im Auftrag von Taeumel, Marcel > Gesendet: Donnerstag, 12. November 2020 10:07:28 > An: squeak-dev > Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project   > Hi all. > I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. > > Best, > Marcel > > Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : > > Hi all, > > > > And canUnderstand: ?  Or is that being too picky? > > > > If the doesNotUnderstand: is not visible externally then who cares?  Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? > > > Well, my conception of the general contract would be exactly the following: > > (o class canUnderstand: m) ifTrue: [ >     self assert: [o respondsTo: m]]. > (o respondsTo: m) ifFalse: [ >     self deny: [o class canUnderstand: m]]. > (o respondsTo: m) ifTrue: [ >     self shouldnt: [o m] raise: MessageNotUnderstood]. > [o m] on: MessageNotUnderstood do: [ >     self deny: [o respondsTo: m]]. > > But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the > current discussion shows that the same argument applies for the second statement, too. > > > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? > IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object > instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... > > Best, > Christoph > > _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ > Von: Squeak-dev im Auftrag von Taeumel, Marcel > Gesendet: Dienstag, 10. November 2020 09:34:49 > An: squeak-dev > Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project   > > and generate the getter setter on demand (via doesNotUnderstand:) > That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. > > Best. > Marcel > > Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : > > Hi all, > for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) > See MatFileReader package in http://www.squeaksource.com/STEM.html > > Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : > > And canUnderstand: ? Or is that being too picky? > Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual > dictionary instance. Hmmm..... > > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? > > Best, > Marcel > > Am 09.11.2020 21:08:14 schrieb Eliot Miranda : > > > > On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: > Hi Levente. > Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. > > > And canUnderstand: ?  Or is that being too picky? > > > I did not know about #dictionaryClass:. That's a powerful hook. > > Best, > Marcel > > Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : > > Hi Christoph, > > On Sun, 8 Nov 2020, Christoph Thiede wrote: > > > Hi Levente, > > > > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be > > great because I depend on this functionality in another project and > > currently require your JSON fork in my baseline. :-) > > I cannot merge it because that would bring back long removed methods, and > MC wouldn't allow me to reject those. > But I can add the changes manually. > If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. > > What is the purpose of that method? > I'm asking because it has got no comment, so I'm not sure its > implementation is correct. > For example, should > > JsonObject new respondsTo: #foo: > > return false? > What should the following return? > > JsonObject new > foo: 1; > respondsTo: #foo: > > Another question is whether it is generally useful or not? > If it's not, you can still have the desired behavior by creating a > subclass. E.g.: > > JsonObject subclass: #PseudoObject > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'PseudoObject' > > > PseudoObject >> respondsTo: aSymbol > > ^ (super respondsTo: aSymbol) > or: [self includesKey: aSymbol] > > > (Json new > dictionaryClass: PseudoObject; > readFrom: '{"foo": 42}' readStream) > respondsTo: #foo > "==> true" > > > Levente > > > > > Best, > > Christoph > > > > > > > > -- > > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > > > > > -- > _,,,^..^,,,_ > best, Eliot > > > > From commits at source.squeak.org Sun Nov 22 16:55:14 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 22 Nov 2020 16:55:14 0000 Subject: [squeak-dev] The Inbox: MorphicExtras-ct.284.mcz Message-ID: Christoph Thiede uploaded a new version of MorphicExtras to project The Inbox: http://source.squeak.org/inbox/MorphicExtras-ct.284.mcz ==================== Summary ==================== Name: MorphicExtras-ct.284 Author: ct Time: 22 November 2020, 5:55:08.221031 pm UUID: 530db7a0-100b-f443-8e3b-a5c742708f77 Ancestors: MorphicExtras-mt.280 Makes AnimatedImageMorph delays publicly accessible. In contrary to e.g. nextTime, delays are an essential part of an animated image, for instance when converting it into a different representation from an external client. =============== Diff against MorphicExtras-mt.280 =============== Item was added: + ----- Method: AnimatedImageMorph>>delays (in category 'accessing') ----- + delays + + ^ delays! Item was changed: + ----- Method: AnimatedImageMorph>>images (in category 'accessing') ----- - ----- Method: AnimatedImageMorph>>images (in category 'private') ----- images ^images! From Das.Linux at gmx.de Sun Nov 22 17:03:35 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun, 22 Nov 2020 18:03:35 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> Message-ID: <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> > On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: > > Hi All, > > Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. > So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: > > JsonObject >> #respondsTo: aSymbol > > | precedence | > (super respondsTo: aSymbol) ifTrue: [ ^true ]. > (precedence := aSymbol precedence) = 1 ifTrue: [ > ^self includesKey: aSymbol ]. > (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ > ^self includesKey: aSymbol allButLast ]. > ^false That's nice! but why not make it simpler? JsonObject >> #respondsTo: aSymbol | precedence | (super respondsTo: aSymbol) ifTrue: [ ^true ]. aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. ^false -Tobias > > > Levente > > On Sun, 22 Nov 2020, Thiede, Christoph wrote: > >> (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Thiede, Christoph >> Gesendet: Montag, 16. November 2020 16:22:01 >> An: squeak-dev >> Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project >> Hi Marcel, >> so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not >> quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) >> Best, >> Christoph >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Squeak-dev im Auftrag von Taeumel, Marcel >> Gesendet: Donnerstag, 12. November 2020 10:07:28 >> An: squeak-dev >> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >> Hi all. >> I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. >> Best, >> Marcel >> >> Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : >> >> Hi all, >> >> > And canUnderstand: ? Or is that being too picky? >> >> > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? >> Well, my conception of the general contract would be exactly the following: >> (o class canUnderstand: m) ifTrue: [ >> self assert: [o respondsTo: m]]. >> (o respondsTo: m) ifFalse: [ >> self deny: [o class canUnderstand: m]]. >> (o respondsTo: m) ifTrue: [ >> self shouldnt: [o m] raise: MessageNotUnderstood]. >> [o m] on: MessageNotUnderstood do: [ >> self deny: [o respondsTo: m]]. >> But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the >> current discussion shows that the same argument applies for the second statement, too. >> > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >> IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object >> instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... >> Best, >> Christoph >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Squeak-dev im Auftrag von Taeumel, Marcel >> Gesendet: Dienstag, 10. November 2020 09:34:49 >> An: squeak-dev >> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >> > and generate the getter setter on demand (via doesNotUnderstand:) >> That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. >> Best. >> Marcel >> >> Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : >> >> Hi all, >> for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) >> See MatFileReader package in http://www.squeaksource.com/STEM.html >> Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : >> > And canUnderstand: ? Or is that being too picky? >> Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual >> dictionary instance. Hmmm..... >> I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >> Best, >> Marcel >> >> Am 09.11.2020 21:08:14 schrieb Eliot Miranda : >> On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: >> Hi Levente. >> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. >> And canUnderstand: ? Or is that being too picky? >> I did not know about #dictionaryClass:. That's a powerful hook. >> Best, >> Marcel >> >> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >> >> Hi Christoph, >> >> On Sun, 8 Nov 2020, Christoph Thiede wrote: >> >> > Hi Levente, >> > >> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >> > great because I depend on this functionality in another project and >> > currently require your JSON fork in my baseline. :-) >> >> I cannot merge it because that would bring back long removed methods, and >> MC wouldn't allow me to reject those. >> But I can add the changes manually. >> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >> >> What is the purpose of that method? >> I'm asking because it has got no comment, so I'm not sure its >> implementation is correct. >> For example, should >> >> JsonObject new respondsTo: #foo: >> >> return false? >> What should the following return? >> >> JsonObject new >> foo: 1; >> respondsTo: #foo: >> >> Another question is whether it is generally useful or not? >> If it's not, you can still have the desired behavior by creating a >> subclass. E.g.: >> >> JsonObject subclass: #PseudoObject >> instanceVariableNames: '' >> classVariableNames: '' >> poolDictionaries: '' >> category: 'PseudoObject' >> >> PseudoObject >> respondsTo: aSymbol >> >> ^ (super respondsTo: aSymbol) >> or: [self includesKey: aSymbol] >> >> (Json new >> dictionaryClass: PseudoObject; >> readFrom: '{"foo": 42}' readStream) >> respondsTo: #foo >> "==> true" >> >> Levente >> >> > >> > Best, >> > Christoph >> > >> > >> > >> > -- >> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >> -- >> _,,,^..^,,,_ >> best, Eliot > From Christoph.Thiede at student.hpi.uni-potsdam.de Sun Nov 22 17:08:43 2020 From: Christoph.Thiede at student.hpi.uni-potsdam.de (Thiede, Christoph) Date: Sun, 22 Nov 2020 17:08:43 +0000 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> , <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> Message-ID: <386e9465df0a484eb02192f8182dbfc5@student.hpi.uni-potsdam.de> +1 for Levente's implementation proposal, and +1 for Tobias's refactoring proposal (it might be a few byte steps longer, but readability first ;-)). Best, Christoph ________________________________ Von: Squeak-dev im Auftrag von Tobias Pape Gesendet: Sonntag, 22. November 2020 18:03:35 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: > > Hi All, > > Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. > So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: > > JsonObject >> #respondsTo: aSymbol > > | precedence | > (super respondsTo: aSymbol) ifTrue: [ ^true ]. > (precedence := aSymbol precedence) = 1 ifTrue: [ > ^self includesKey: aSymbol ]. > (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ > ^self includesKey: aSymbol allButLast ]. > ^false That's nice! but why not make it simpler? JsonObject >> #respondsTo: aSymbol | precedence | (super respondsTo: aSymbol) ifTrue: [ ^true ]. aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. ^false -Tobias > > > Levente > > On Sun, 22 Nov 2020, Thiede, Christoph wrote: > >> (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Thiede, Christoph >> Gesendet: Montag, 16. November 2020 16:22:01 >> An: squeak-dev >> Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project >> Hi Marcel, >> so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not >> quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) >> Best, >> Christoph >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Squeak-dev im Auftrag von Taeumel, Marcel >> Gesendet: Donnerstag, 12. November 2020 10:07:28 >> An: squeak-dev >> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >> Hi all. >> I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. >> Best, >> Marcel >> >> Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : >> >> Hi all, >> >> > And canUnderstand: ? Or is that being too picky? >> >> > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? >> Well, my conception of the general contract would be exactly the following: >> (o class canUnderstand: m) ifTrue: [ >> self assert: [o respondsTo: m]]. >> (o respondsTo: m) ifFalse: [ >> self deny: [o class canUnderstand: m]]. >> (o respondsTo: m) ifTrue: [ >> self shouldnt: [o m] raise: MessageNotUnderstood]. >> [o m] on: MessageNotUnderstood do: [ >> self deny: [o respondsTo: m]]. >> But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the >> current discussion shows that the same argument applies for the second statement, too. >> > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >> IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object >> instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... >> Best, >> Christoph >> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >> Von: Squeak-dev im Auftrag von Taeumel, Marcel >> Gesendet: Dienstag, 10. November 2020 09:34:49 >> An: squeak-dev >> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >> > and generate the getter setter on demand (via doesNotUnderstand:) >> That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. >> Best. >> Marcel >> >> Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : >> >> Hi all, >> for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) >> See MatFileReader package in http://www.squeaksource.com/STEM.html >> Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : >> > And canUnderstand: ? Or is that being too picky? >> Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual >> dictionary instance. Hmmm..... >> I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >> Best, >> Marcel >> >> Am 09.11.2020 21:08:14 schrieb Eliot Miranda : >> On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: >> Hi Levente. >> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. >> And canUnderstand: ? Or is that being too picky? >> I did not know about #dictionaryClass:. That's a powerful hook. >> Best, >> Marcel >> >> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >> >> Hi Christoph, >> >> On Sun, 8 Nov 2020, Christoph Thiede wrote: >> >> > Hi Levente, >> > >> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >> > great because I depend on this functionality in another project and >> > currently require your JSON fork in my baseline. :-) >> >> I cannot merge it because that would bring back long removed methods, and >> MC wouldn't allow me to reject those. >> But I can add the changes manually. >> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >> >> What is the purpose of that method? >> I'm asking because it has got no comment, so I'm not sure its >> implementation is correct. >> For example, should >> >> JsonObject new respondsTo: #foo: >> >> return false? >> What should the following return? >> >> JsonObject new >> foo: 1; >> respondsTo: #foo: >> >> Another question is whether it is generally useful or not? >> If it's not, you can still have the desired behavior by creating a >> subclass. E.g.: >> >> JsonObject subclass: #PseudoObject >> instanceVariableNames: '' >> classVariableNames: '' >> poolDictionaries: '' >> category: 'PseudoObject' >> >> PseudoObject >> respondsTo: aSymbol >> >> ^ (super respondsTo: aSymbol) >> or: [self includesKey: aSymbol] >> >> (Json new >> dictionaryClass: PseudoObject; >> readFrom: '{"foo": 42}' readStream) >> respondsTo: #foo >> "==> true" >> >> Levente >> >> > >> > Best, >> > Christoph >> > >> > >> > >> > -- >> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >> -- >> _,,,^..^,,,_ >> best, Eliot > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leves at caesar.elte.hu Sun Nov 22 17:51:01 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun, 22 Nov 2020 18:51:01 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> Message-ID: Hi Tobias, On Sun, 22 Nov 2020, Tobias Pape wrote: > > >> On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: >> >> Hi All, >> >> Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. >> So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: >> >> JsonObject >> #respondsTo: aSymbol >> >> | precedence | >> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >> (precedence := aSymbol precedence) = 1 ifTrue: [ >> ^self includesKey: aSymbol ]. >> (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ >> ^self includesKey: aSymbol allButLast ]. >> ^false > > That's nice! but why not make it simpler? > > JsonObject >> #respondsTo: aSymbol > > | precedence | > (super respondsTo: aSymbol) ifTrue: [ ^true ]. > aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. > aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. > ^false Three reasons: 1. performance | j s | Smalltalk garbageCollect. j := JsonObject new foo: 1; bar: 2; baz: 3; yourself. s := Symbol allSymbols. { [ s do: [ :each | ] ] bench. [ s do: [ :each | j respondsTo: each ] ] bench. [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" } #( '1,630 per second. 613 microseconds per run. 0 % GC time.' '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' ) Okay, that may not be too a realistic workload. The reason of the extreme slowdown and high GC time is rapid interning and GCing of Symbols created by #asSimpleGetter. If you change s to a handcrafted array that avoids Symbol creation, like s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) the numbers get better but still not as good as my suggestion: #( '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') 2. backwards compatibility #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. 3. to use the same mechanism as #doesNotUnderstand: Have a look at that method. Levente > > -Tobias > >> >> >> Levente >> >> On Sun, 22 Nov 2020, Thiede, Christoph wrote: >> >>> (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) >>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>> Von: Thiede, Christoph >>> Gesendet: Montag, 16. November 2020 16:22:01 >>> An: squeak-dev >>> Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project >>> Hi Marcel, >>> so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not >>> quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) >>> Best, >>> Christoph >>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>> Gesendet: Donnerstag, 12. November 2020 10:07:28 >>> An: squeak-dev >>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >>> Hi all. >>> I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. >>> Best, >>> Marcel >>> >>> Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : >>> >>> Hi all, >>> >>> > And canUnderstand: ? Or is that being too picky? >>> >>> > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? >>> Well, my conception of the general contract would be exactly the following: >>> (o class canUnderstand: m) ifTrue: [ >>> self assert: [o respondsTo: m]]. >>> (o respondsTo: m) ifFalse: [ >>> self deny: [o class canUnderstand: m]]. >>> (o respondsTo: m) ifTrue: [ >>> self shouldnt: [o m] raise: MessageNotUnderstood]. >>> [o m] on: MessageNotUnderstood do: [ >>> self deny: [o respondsTo: m]]. >>> But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the >>> current discussion shows that the same argument applies for the second statement, too. >>> > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>> IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object >>> instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... >>> Best, >>> Christoph >>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>> Gesendet: Dienstag, 10. November 2020 09:34:49 >>> An: squeak-dev >>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project >>> > and generate the getter setter on demand (via doesNotUnderstand:) >>> That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. >>> Best. >>> Marcel >>> >>> Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : >>> >>> Hi all, >>> for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) >>> See MatFileReader package in http://www.squeaksource.com/STEM.html >>> Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : >>> > And canUnderstand: ? Or is that being too picky? >>> Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual >>> dictionary instance. Hmmm..... >>> I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>> Best, >>> Marcel >>> >>> Am 09.11.2020 21:08:14 schrieb Eliot Miranda : >>> On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: >>> Hi Levente. >>> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. >>> And canUnderstand: ? Or is that being too picky? >>> I did not know about #dictionaryClass:. That's a powerful hook. >>> Best, >>> Marcel >>> >>> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >>> >>> Hi Christoph, >>> >>> On Sun, 8 Nov 2020, Christoph Thiede wrote: >>> >>> > Hi Levente, >>> > >>> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >>> > great because I depend on this functionality in another project and >>> > currently require your JSON fork in my baseline. :-) >>> >>> I cannot merge it because that would bring back long removed methods, and >>> MC wouldn't allow me to reject those. >>> But I can add the changes manually. >>> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >>> >>> What is the purpose of that method? >>> I'm asking because it has got no comment, so I'm not sure its >>> implementation is correct. >>> For example, should >>> >>> JsonObject new respondsTo: #foo: >>> >>> return false? >>> What should the following return? >>> >>> JsonObject new >>> foo: 1; >>> respondsTo: #foo: >>> >>> Another question is whether it is generally useful or not? >>> If it's not, you can still have the desired behavior by creating a >>> subclass. E.g.: >>> >>> JsonObject subclass: #PseudoObject >>> instanceVariableNames: '' >>> classVariableNames: '' >>> poolDictionaries: '' >>> category: 'PseudoObject' >>> >>> PseudoObject >> respondsTo: aSymbol >>> >>> ^ (super respondsTo: aSymbol) >>> or: [self includesKey: aSymbol] >>> >>> (Json new >>> dictionaryClass: PseudoObject; >>> readFrom: '{"foo": 42}' readStream) >>> respondsTo: #foo >>> "==> true" >>> >>> Levente >>> >>> > >>> > Best, >>> > Christoph >>> > >>> > >>> > >>> > -- >>> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >>> -- >>> _,,,^..^,,,_ >>> best, Eliot >> From Das.Linux at gmx.de Sun Nov 22 18:10:55 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun, 22 Nov 2020 19:10:55 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> Message-ID: <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> > On 22. Nov 2020, at 18:51, Levente Uzonyi wrote: > > Hi Tobias, > > On Sun, 22 Nov 2020, Tobias Pape wrote: > >> >> >>> On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: >>> Hi All, >>> Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. >>> So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: >>> JsonObject >> #respondsTo: aSymbol >>> >>> | precedence | >>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>> (precedence := aSymbol precedence) = 1 ifTrue: [ >>> ^self includesKey: aSymbol ]. >>> (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ >>> ^self includesKey: aSymbol allButLast ]. >>> ^false >> >> That's nice! but why not make it simpler? >> >> JsonObject >> #respondsTo: aSymbol >> >> | precedence | >> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >> aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. >> aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. >> ^false > > Three reasons: > > 1. performance > > | j s | > Smalltalk garbageCollect. > j := JsonObject new > foo: 1; > bar: 2; > baz: 3; > yourself. > s := Symbol allSymbols. > { > [ s do: [ :each | ] ] bench. > [ s do: [ :each | j respondsTo: each ] ] bench. > [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" > } > #( > '1,630 per second. 613 microseconds per run. 0 % GC time.' > '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' > '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' > ) > > Okay, that may not be too a realistic workload. The reason of the extreme > slowdown and high GC time is rapid interning and GCing of Symbols > created by #asSimpleGetter. > > If you change s to a handcrafted array that avoids Symbol creation, like > > s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) > > the numbers get better but still not as good as my suggestion: > > #( > '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' > '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' > '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') > > I thought you'd say that. But "precedence" is one of the most obscure things around that part in the image. > 2. backwards compatibility > #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. Yea, Pre 5.3 I'd have said #asMutator. > > > 3. to use the same mechanism as #doesNotUnderstand: > Have a look at that method. Then I'd rather say change DNU too. If you're down that hole (dnu/respondsTo) anyways, I don't buy the performance argument anymore. Not everything has to be as fast as possible. Best regards -Tobias > > > Levente > >> >> -Tobias >> >>> Levente >>> On Sun, 22 Nov 2020, Thiede, Christoph wrote: >>>> (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) >>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>> Von: Thiede, Christoph >>>> Gesendet: Montag, 16. November 2020 16:22:01 >>>> An: squeak-dev >>>> Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project Hi Marcel, >>>> so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not >>>> quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) >>>> Best, >>>> Christoph >>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>>> Gesendet: Donnerstag, 12. November 2020 10:07:28 >>>> An: squeak-dev >>>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi all. >>>> I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. >>>> Best, >>>> Marcel >>>> >>>> Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : >>>> >>>> Hi all, >>>> >>>> > And canUnderstand: ? Or is that being too picky? >>>> >>>> > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? >>>> Well, my conception of the general contract would be exactly the following: >>>> (o class canUnderstand: m) ifTrue: [ >>>> self assert: [o respondsTo: m]]. >>>> (o respondsTo: m) ifFalse: [ >>>> self deny: [o class canUnderstand: m]]. >>>> (o respondsTo: m) ifTrue: [ >>>> self shouldnt: [o m] raise: MessageNotUnderstood]. >>>> [o m] on: MessageNotUnderstood do: [ >>>> self deny: [o respondsTo: m]]. >>>> But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the >>>> current discussion shows that the same argument applies for the second statement, too. >>>> > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>>> IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object >>>> instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... >>>> Best, >>>> Christoph >>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>>> Gesendet: Dienstag, 10. November 2020 09:34:49 >>>> An: squeak-dev >>>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > and generate the getter setter on demand (via doesNotUnderstand:) >>>> That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. >>>> Best. >>>> Marcel >>>> >>>> Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : >>>> >>>> Hi all, >>>> for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) >>>> See MatFileReader package in http://www.squeaksource.com/STEM.html >>>> Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : >>>> > And canUnderstand: ? Or is that being too picky? >>>> Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual >>>> dictionary instance. Hmmm..... >>>> I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>>> Best, >>>> Marcel >>>> >>>> Am 09.11.2020 21:08:14 schrieb Eliot Miranda : >>>> On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: >>>> Hi Levente. >>>> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. >>>> And canUnderstand: ? Or is that being too picky? >>>> I did not know about #dictionaryClass:. That's a powerful hook. >>>> Best, >>>> Marcel >>>> >>>> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >>>> >>>> Hi Christoph, >>>> >>>> On Sun, 8 Nov 2020, Christoph Thiede wrote: >>>> >>>> > Hi Levente, >>>> > >>>> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >>>> > great because I depend on this functionality in another project and >>>> > currently require your JSON fork in my baseline. :-) >>>> >>>> I cannot merge it because that would bring back long removed methods, and >>>> MC wouldn't allow me to reject those. >>>> But I can add the changes manually. >>>> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >>>> >>>> What is the purpose of that method? >>>> I'm asking because it has got no comment, so I'm not sure its >>>> implementation is correct. >>>> For example, should >>>> >>>> JsonObject new respondsTo: #foo: >>>> >>>> return false? >>>> What should the following return? >>>> >>>> JsonObject new >>>> foo: 1; >>>> respondsTo: #foo: >>>> >>>> Another question is whether it is generally useful or not? >>>> If it's not, you can still have the desired behavior by creating a >>>> subclass. E.g.: >>>> >>>> JsonObject subclass: #PseudoObject >>>> instanceVariableNames: '' >>>> classVariableNames: '' >>>> poolDictionaries: '' >>>> category: 'PseudoObject' >>>> >>>> PseudoObject >> respondsTo: aSymbol >>>> >>>> ^ (super respondsTo: aSymbol) >>>> or: [self includesKey: aSymbol] >>>> >>>> (Json new >>>> dictionaryClass: PseudoObject; >>>> readFrom: '{"foo": 42}' readStream) >>>> respondsTo: #foo >>>> "==> true" >>>> >>>> Levente >>>> >>>> > >>>> > Best, >>>> > Christoph >>>> > >>>> > >>>> > >>>> > -- >>>> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >>>> -- >>>> _,,,^..^,,,_ >>>> best, Eliot From leves at caesar.elte.hu Sun Nov 22 18:37:18 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun, 22 Nov 2020 19:37:18 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> Message-ID: Hi Tobias, On Sun, 22 Nov 2020, Tobias Pape wrote: > > >> On 22. Nov 2020, at 18:51, Levente Uzonyi wrote: >> >> Hi Tobias, >> >> On Sun, 22 Nov 2020, Tobias Pape wrote: >> >>> >>> >>>> On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: >>>> Hi All, >>>> Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. >>>> So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: >>>> JsonObject >> #respondsTo: aSymbol >>>> >>>> | precedence | >>>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>>> (precedence := aSymbol precedence) = 1 ifTrue: [ >>>> ^self includesKey: aSymbol ]. >>>> (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ >>>> ^self includesKey: aSymbol allButLast ]. >>>> ^false >>> >>> That's nice! but why not make it simpler? >>> >>> JsonObject >> #respondsTo: aSymbol >>> >>> | precedence | >>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>> aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. >>> aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. >>> ^false >> >> Three reasons: >> >> 1. performance >> >> | j s | >> Smalltalk garbageCollect. >> j := JsonObject new >> foo: 1; >> bar: 2; >> baz: 3; >> yourself. >> s := Symbol allSymbols. >> { >> [ s do: [ :each | ] ] bench. >> [ s do: [ :each | j respondsTo: each ] ] bench. >> [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" >> } >> #( >> '1,630 per second. 613 microseconds per run. 0 % GC time.' >> '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' >> '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' >> ) >> >> Okay, that may not be too a realistic workload. The reason of the extreme >> slowdown and high GC time is rapid interning and GCing of Symbols >> created by #asSimpleGetter. >> >> If you change s to a handcrafted array that avoids Symbol creation, like >> >> s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) >> >> the numbers get better but still not as good as my suggestion: >> >> #( >> '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' >> '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' >> '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') >> >> > > I thought you'd say that. > But "precedence" is one of the most obscure things around that part in the image. > > >> 2. backwards compatibility >> #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. > > Yea, Pre 5.3 I'd have said #asMutator. > >> >> >> 3. to use the same mechanism as #doesNotUnderstand: >> Have a look at that method. > > > Then I'd rather say change DNU too. > If you're down that hole (dnu/respondsTo) anyways, I don't buy the performance argument anymore. > > Not everything has to be as fast as possible. You seem to ignore that #doesNotUnderstand: is the most often used method of JsonObject. I assume you don't use the JSON package in production images, hence you don't care about performance. I do, so I'm not willing to change the implementation of #doesNotUnderstand: in my fork of the JSON package unless performance is at least as good as it is now. Levente > > Best regards > -Tobias > >> >> >> Levente >> >>> >>> -Tobias >>> >>>> Levente >>>> On Sun, 22 Nov 2020, Thiede, Christoph wrote: >>>>> (Depending on how this discussion will end, this reparented mcz file might be relevant to prevent further merging issues.) >>>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>>> Von: Thiede, Christoph >>>>> Gesendet: Montag, 16. November 2020 16:22:01 >>>>> An: squeak-dev >>>>> Betreff: AW: [squeak-dev] I'd like to contribute to the JSON project Hi Marcel, >>>>> so do you propose to remove the existing implementation of dynamic forwarding from JsonObject, too (or more precisely, pull it down into DynamicJsonObject)? If yes, I would worry about compatibility problems. If no, I do not >>>>> quite understand why one should override #doesNotUnderstand: but not #respondsTo: in a class. It seems a reasonable pattern for me to override them only together. :-) >>>>> Best, >>>>> Christoph >>>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>>>> Gesendet: Donnerstag, 12. November 2020 10:07:28 >>>>> An: squeak-dev >>>>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project Hi all. >>>>> I am in favor of adding JsonDynamicObject (or similar) which has those extra features. I would avoid putting that stuff into JsonObject. When parsing a JSON file, the dictionary class can be configured anyway. >>>>> Best, >>>>> Marcel >>>>> >>>>> Am 10.11.2020 10:16:50 schrieb Thiede, Christoph : >>>>> >>>>> Hi all, >>>>> >>>>> > And canUnderstand: ? Or is that being too picky? >>>>> >>>>> > If the doesNotUnderstand: is not visible externally then who cares? Isn't the contract (o respondsTo: m) ifFalse: [self should: [o m] raise: MessageNotUnderstood]], or respondsTo: not implies MNU ? >>>>> Well, my conception of the general contract would be exactly the following: >>>>> (o class canUnderstand: m) ifTrue: [ >>>>> self assert: [o respondsTo: m]]. >>>>> (o respondsTo: m) ifFalse: [ >>>>> self deny: [o class canUnderstand: m]]. >>>>> (o respondsTo: m) ifTrue: [ >>>>> self shouldnt: [o m] raise: MessageNotUnderstood]. >>>>> [o m] on: MessageNotUnderstood do: [ >>>>> self deny: [o respondsTo: m]]. >>>>> But I would *not* require the other direction of the implication - for #canUnderstand:, this is simply not possible for dynamic forwarding (unless we make false promises on the class side), and in my opinion, the >>>>> current discussion shows that the same argument applies for the second statement, too. >>>>> > I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>>>> IMHO, this goes beyond syntactic sugar. :-) As I tried to explain below, a proper implementation of #respondsTo: could be an essential prerequisite for using JsonObjects polymorphically with first-class object >>>>> instances. In my use case, this is a crucial feature and if my proposal is discarded, I will have to subclass JsonObject ... >>>>> Best, >>>>> Christoph >>>>> _________________________________________________________________________________________________________________________________________________________________________________________________________________________________ >>>>> Von: Squeak-dev im Auftrag von Taeumel, Marcel >>>>> Gesendet: Dienstag, 10. November 2020 09:34:49 >>>>> An: squeak-dev >>>>> Betreff: Re: [squeak-dev] I'd like to contribute to the JSON project > and generate the getter setter on demand (via doesNotUnderstand:) >>>>> That's what I opted for, too, in: https://github.com/hpi-swa/MessageSendRecorder 's MessageSendRecordExtension. >>>>> Best. >>>>> Marcel >>>>> >>>>> Am 10.11.2020 09:32:07 schrieb Nicolas Cellier : >>>>> >>>>> Hi all, >>>>> for importing Matlab struct, I create classes on the fly and generate the getter setter on demand (via doesNotUnderstand:) >>>>> See MatFileReader package in http://www.squeaksource.com/STEM.html >>>>> Le mar. 10 nov. 2020 à 09:06, Marcel Taeumel a écrit : >>>>> > And canUnderstand: ? Or is that being too picky? >>>>> Ah, right. On the class level, it would be like Levente inferred from my suggestion. I only thought of #respondsTo: to answer "true" only for the simple setter/getters that have keys present in the actual >>>>> dictionary instance. Hmmm..... >>>>> I would like to keep the JSON library as simple as possible. Wer are just talking about syntactic sugar here, right? >>>>> Best, >>>>> Marcel >>>>> >>>>> Am 09.11.2020 21:08:14 schrieb Eliot Miranda : >>>>> On Sun, Nov 8, 2020 at 11:04 PM Marcel Taeumel wrote: >>>>> Hi Levente. >>>>> Sounds right. If an object can answer to some extra messages via #doesNotUnderstand:, one should also override #respondsTo:. It is like #= and #hash. >>>>> And canUnderstand: ? Or is that being too picky? >>>>> I did not know about #dictionaryClass:. That's a powerful hook. >>>>> Best, >>>>> Marcel >>>>> >>>>> Am 09.11.2020 03:07:54 schrieb Levente Uzonyi : >>>>> >>>>> Hi Christoph, >>>>> >>>>> On Sun, 8 Nov 2020, Christoph Thiede wrote: >>>>> >>>>> > Hi Levente, >>>>> > >>>>> > would you mind to merge JSON-ct.41 (#respondsTo:) as well? This would be >>>>> > great because I depend on this functionality in another project and >>>>> > currently require your JSON fork in my baseline. :-) >>>>> >>>>> I cannot merge it because that would bring back long removed methods, and >>>>> MC wouldn't allow me to reject those. >>>>> But I can add the changes manually. >>>>> If I'm not mistaken, it's just a single method JsonObject >> #respondsTo:. >>>>> >>>>> What is the purpose of that method? >>>>> I'm asking because it has got no comment, so I'm not sure its >>>>> implementation is correct. >>>>> For example, should >>>>> >>>>> JsonObject new respondsTo: #foo: >>>>> >>>>> return false? >>>>> What should the following return? >>>>> >>>>> JsonObject new >>>>> foo: 1; >>>>> respondsTo: #foo: >>>>> >>>>> Another question is whether it is generally useful or not? >>>>> If it's not, you can still have the desired behavior by creating a >>>>> subclass. E.g.: >>>>> >>>>> JsonObject subclass: #PseudoObject >>>>> instanceVariableNames: '' >>>>> classVariableNames: '' >>>>> poolDictionaries: '' >>>>> category: 'PseudoObject' >>>>> >>>>> PseudoObject >> respondsTo: aSymbol >>>>> >>>>> ^ (super respondsTo: aSymbol) >>>>> or: [self includesKey: aSymbol] >>>>> >>>>> (Json new >>>>> dictionaryClass: PseudoObject; >>>>> readFrom: '{"foo": 42}' readStream) >>>>> respondsTo: #foo >>>>> "==> true" >>>>> >>>>> Levente >>>>> >>>>> > >>>>> > Best, >>>>> > Christoph >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Sent from: http://forum.world.st/Squeak-Dev-f45488.html >>>>> -- >>>>> _,,,^..^,,,_ >>>>> best, Eliot From forums.jakob at resfarm.de Sun Nov 22 18:50:02 2020 From: forums.jakob at resfarm.de (Jakob Reschke) Date: Sun, 22 Nov 2020 19:50:02 +0100 Subject: [squeak-dev] Inspector Custom Value Panes & Related In-Reply-To: <1606063525812-0.post@n4.nabble.com> References: <1e5509177e4a4c8e9f831dbdf6c15e21@student.hpi.uni-potsdam.de> <8A5F154E-0BA8-4D64-8D1C-E844CCB85690@gmx.de> <4cad345e0ba544d7816544ff864fb74d@student.hpi.uni-potsdam.de> <5662556D-AA81-46B1-850B-CD6E89BCAF42@gmx.de> <43037785-C47E-4FC9-A599-501B483CA417@gmx.de> <1606063525812-0.post@n4.nabble.com> Message-ID: Just had a brief look. Why are the whole-affecting selectors with "be" and the part-affecting selectors with "make"? Should this be made uniform? And there is beAllFont: although the text is not a font. Is beAllInFont: correct English? Am So., 22. Nov. 2020 um 17:45 Uhr schrieb Christoph Thiede : > > Hi all, > > can we merge the text emphasis changeset? I did not receive any other review > than Tobias'. :-) > > Best, > Christoph > > > > ----- > Carpe Squeak! > -- > Sent from: http://forum.world.st/Squeak-Dev-f45488.html > From Das.Linux at gmx.de Sun Nov 22 19:08:02 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun, 22 Nov 2020 20:08:02 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <1604865041240-0.post@n4.nabble.com> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> Message-ID: <1DAB3E81-1123-4F0D-BD24-269F1EE6B540@gmx.de> > On 22. Nov 2020, at 19:37, Levente Uzonyi wrote: > > Hi Tobias, > > On Sun, 22 Nov 2020, Tobias Pape wrote: > >> >> >>> On 22. Nov 2020, at 18:51, Levente Uzonyi wrote: >>> Hi Tobias, >>> On Sun, 22 Nov 2020, Tobias Pape wrote: >>>>> On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: >>>>> Hi All, >>>>> Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. >>>>> So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: >>>>> JsonObject >> #respondsTo: aSymbol >>>>> >>>>> | precedence | >>>>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>>>> (precedence := aSymbol precedence) = 1 ifTrue: [ >>>>> ^self includesKey: aSymbol ]. >>>>> (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ >>>>> ^self includesKey: aSymbol allButLast ]. >>>>> ^false >>>> That's nice! but why not make it simpler? >>>> JsonObject >> #respondsTo: aSymbol >>>> >>>> | precedence | >>>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>>> aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. >>>> aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. >>>> ^false >>> Three reasons: >>> 1. performance >>> | j s | >>> Smalltalk garbageCollect. >>> j := JsonObject new >>> foo: 1; >>> bar: 2; >>> baz: 3; >>> yourself. >>> s := Symbol allSymbols. >>> { >>> [ s do: [ :each | ] ] bench. >>> [ s do: [ :each | j respondsTo: each ] ] bench. >>> [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" >>> } >>> #( >>> '1,630 per second. 613 microseconds per run. 0 % GC time.' >>> '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' >>> '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' >>> ) >>> Okay, that may not be too a realistic workload. The reason of the extreme >>> slowdown and high GC time is rapid interning and GCing of Symbols >>> created by #asSimpleGetter. >>> If you change s to a handcrafted array that avoids Symbol creation, like >>> s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) >>> the numbers get better but still not as good as my suggestion: >>> #( >>> '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' >>> '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' >>> '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') >> >> I thought you'd say that. >> But "precedence" is one of the most obscure things around that part in the image. >> >> >>> 2. backwards compatibility >>> #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. >> >> Yea, Pre 5.3 I'd have said #asMutator. >> >>> 3. to use the same mechanism as #doesNotUnderstand: >>> Have a look at that method. >> >> >> Then I'd rather say change DNU too. >> If you're down that hole (dnu/respondsTo) anyways, I don't buy the performance argument anymore. >> >> Not everything has to be as fast as possible. > > You seem to ignore that #doesNotUnderstand: is the most often used method of JsonObject. > I assume you don't use the JSON package in production images, hence you don't care about performance. I do. It never has been the bottleneck. > I do, so I'm not willing to change the implementation of #doesNotUnderstand: in my fork of the JSON package unless performance is at least as good as it is now. I just want the image to remain tractable. Performance is nice. But if you rely on performance with the JSOn stuff, subclass the JsonObject and implement your keys as messages? That ought to be the fastest way, no? I though it was meant to be that way. That said, I rarely remain in the JSON space for longer than necessary; I'd rather have proper objects and only convert on "the edges" I'm not against fast things. I'm merely a bit startled by fast things that are harder to understand than necessary… Best regards -Tobias PS: Levente, your code is almost always the fastest variant of anything we discuss on here. That's amazing in itself. Don't get the impression I'm not amazed by that ;) > > > Levente > >> >> Best regards >> -Tobias >> >>> Levente >>>> -Tobias >>>>> Levente >>>>> On Sun, 22 Nov 2020, Thiede, Christoph wrote: From marcel.taeumel at hpi.de Mon Nov 23 08:07:24 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 23 Nov 2020 09:07:24 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> Message-ID: Hi Frank! This is great news! Thanks for working on this. :-) Please, do keep us posted. Best, Marcel Am 20.11.2020 22:16:10 schrieb Frank Lesser : Hi all. I announced last week that I resumed DNG ( Dolphin Smalltalk Next Generation ) on my Twitter @LesserFrank. Since then I had a lot of fun working on it. Also started a DNG integration into Godot game engine which I am working since 2016 ( 2.x ) DolphinScript will be a Smalltalk script language deeply integrated into upcoming Godot 4.0. Happy Smalltalking, Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 23 08:11:49 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 23 Nov 2020 09:11:49 +0100 Subject: [squeak-dev] The Inbox: Morphic-ct.1715.mcz In-Reply-To: <40bdb5bc95184f8780de23e8172ef8a3@student.hpi.uni-potsdam.de> References: <,> <40bdb5bc95184f8780de23e8172ef8a3@student.hpi.uni-potsdam.de> Message-ID: > ... do you really think that it would be a good idea to couple HandMorph directly to MorphicProject? Yes, because it couples with the OO event handling stuff, which should be extracted from Morphic anyway. Best, Marcel Am 20.11.2020 13:15:33 schrieb Thiede, Christoph : Hi Marcel, do you really think that it would be a good idea to couple HandMorph directly to MorphicProject? I always thought the world should be the only object to communicate with the world - except for accessing a small set of global interfaces such as #world, #addDeferredUIMessage: and #uiManager. :-) [http://www.hpi.de/] Best, Christoph Von: Squeak-dev im Auftrag von Taeumel, Marcel Gesendet: Mittwoch, 18. November 2020 09:48:41 An: squeak-dev Betreff: Re: [squeak-dev] The Inbox: Morphic-ct.1715.mcz   Hi Christoph. > Re-enables handling of #launchDrop events ... It still looks like a proposal of having PasteUpMorph >> #launchSystemEventFiles:event: to me. :-) I would rather like to see such a send happen to the current project, not the world. Best, Marcel Am 17.11.2020 20:26:13 schrieb commits at source.squeak.org : Christoph Thiede uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-ct.1715.mcz ==================== Summary ==================== Name: Morphic-ct.1715 Author: ct Time: 17 November 2020, 8:25:42.546431 pm UUID: 4a1a9a9f-9ae1-0640-9f18-17e3c956fa0c Ancestors: Morphic-mt.1713 Re-enables handling of #launchDrop events when the VM is configured as a singleton and has been invoked again, though currently only handled with a rudimentary fallback implementation. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html. Thanks to Jakob (jr) for the feedback! =============== Diff against Morphic-mt.1713 =============== Item was changed: ----- Method: HandMorph>>generateDropFilesEvent: (in category 'private events') ----- generateDropFilesEvent: evtBuf "Generate the appropriate mouse event for the given raw event buffer." | position buttons modifiers stamp numFiles dragType | stamp := evtBuf second. stamp = 0 ifTrue: [stamp := Time eventMillisecondClock]. dragType := evtBuf third. position := evtBuf fourth @ evtBuf fifth. buttons := MouseEvent redButton. "hacked because necessary for correct mouseMoveDragging handling" modifiers := evtBuf sixth. buttons := buttons bitOr: (modifiers bitShift: 3). numFiles := evtBuf seventh. dragType caseOf: { [1] -> [ "dragEnter" externalDropMorph := TransferMorph new dragTransferType: #filesAndDirectories; source: self; passenger: (numFiles = 0 "Usually, numFiles and drop paths are delivered on dragDrop only. Still reserving this possibility for able host implementations." ifTrue: [self flag: #vmCapabilityMissing. 'Unknown host content' translated] ifFalse: [self collectDropFilesAndDirectories: numFiles]); yourself. "During the drag operation, the host system is responsible for displaying the cursor." self grabMorph: externalDropMorph. self showTemporaryCursor: Cursor blank. externalDropMorph bottomRight: self topLeft. "Southeast area of the cursor is blocked by drawings from the source application. Display our drop morph at the opposite corner of the cursor." ]. [2] -> [ "dragMove" ^ MouseMoveEvent new setType: #mouseMove startPoint: self position endPoint: position trail: "{self position. position}"(self mouseDragTrailFrom: evtBuf) buttons: buttons hand: self stamp: stamp ]. [3] -> [ "dragLeave" externalDropMorph ifNotNil: #abandon. externalDropMorph := nil. self showTemporaryCursor: nil ]. [4] -> [ "dragDrop" + | oldButtons event | + oldButtons := lastEventBuffer fifth + bitOr: (lastEventBuffer sixth bitShift: 3). + event := MouseButtonEvent new + setType: #mouseUp + position: position + which: (oldButtons bitXor: buttons) + buttons: buttons + nClicks: 0 + hand: self + stamp: stamp. + - | oldButtons | externalDropMorph ifNil: [ + "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been invoked again with a new image file (aka #launchDrop, runAsSingleInstance on Unix, or RunSingleApp on Windows)." + self flag: #forLater. "ct: When we decouple event generation from Morphic, we will probably need to introduce a separate SystemLaunchEvent class for this event. See http://forum.world.st/Changeset-Enhanced-integration-of-drag-n-drop-from-host-tp5123857p5124332.html." + self world + launchSystemFiles: (self collectDropFilesAndDirectories: numFiles) + event: event. + ^ nil]. - "dragDrop has been sent without prior dragging. This happens when the VM is configured as singleton application and has been called again (aka #launchDrop)." - ^ self error: 'Launch drop for singleton Squeak not yet implemented.']. self showTemporaryCursor: nil. externalDropMorph passenger isString ifTrue: [ self flag: #vmCapabilityMissing. "See above." externalDropMorph passenger: (self collectDropFilesAndDirectories: numFiles)]. externalDropMorph := nil. (Smalltalk classNamed: #DropFilesEvent) ifNotNil: [:eventClass | | classicEvent | "Generate classic DropFilesEvent, providing backward compatibility." classicEvent := eventClass new setPosition: position contents: numFiles hand: self. self processEvent: classicEvent. classicEvent wasHandled ifTrue: [^ nil]]. + ^ event ]. - oldButtons := lastEventBuffer fifth - bitOr: (lastEventBuffer sixth bitShift: 3). - ^ MouseButtonEvent new - setType: #mouseUp - position: position - which: (oldButtons bitXor: buttons) - buttons: buttons - nClicks: 0 - hand: self - stamp: stamp ]. [5] -> [ "drag request" "For dnd out. Not properly implemented at the moment." self shouldBeImplemented] }. ^ nil! Item was added: + ----- Method: PasteUpMorph>>launchSystemFiles:event: (in category 'event handling') ----- + launchSystemFiles: fileStreams event: anEvent + "Handle a number of files the singleton VM was invoked with again." + + self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it." + ^ self dropFiles: fileStreams event: anEvent! -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcel.taeumel at hpi.de Mon Nov 23 08:12:59 2020 From: marcel.taeumel at hpi.de (Marcel Taeumel) Date: Mon, 23 Nov 2020 09:12:59 +0100 Subject: [squeak-dev] Today: ECOOP Squeak Tutorial In-Reply-To: References: Message-ID: Hi all! We will make the image that we used during the tutorial available for everyone through files.squeak.org soon. It is filled with interesting projects. Best, Marcel Am 20.11.2020 11:15:23 schrieb Tom Beckmann : Hi everyone, you might want to take a look at the ECOOP Squeak Tutorial happening today: https://2020.ecoop.org/details/ecoop-2020-tutorials/2/SqueakLive [https://2020.ecoop.org/details/ecoop-2020-tutorials/2/SqueakLive] Best, Tom -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Mon Nov 23 14:20:17 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 23 Nov 2020 09:20:17 -0500 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> Message-ID: <20201123142017.GA64854@shell.msen.com> Good news indeed. I'm looking forward to more updates on the DNG project :-) Dave On Mon, Nov 23, 2020 at 09:07:24AM +0100, Marcel Taeumel wrote: > Hi Frank! > > This is great news! Thanks for working on this. :-) Please, do keep us posted. > > Best, > Marcel > Am 20.11.2020 22:16:10 schrieb Frank Lesser : > Hi all. > > I announced last week that I resumed DNG ( Dolphin Smalltalk Next > Generation ) on my Twitter @LesserFrank. > > Since then I had a lot of fun working on it. > > Also started a DNG integration into Godot game engine which I am working > since 2016 ( 2.x ) > > DolphinScript will be a Smalltalk script language deeply integrated into > upcoming Godot 4.0. > > Happy Smalltalking, Frank > > > From lewis at mail.msen.com Mon Nov 23 14:32:13 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Mon, 23 Nov 2020 09:32:13 -0500 Subject: [squeak-dev] Today: ECOOP Squeak Tutorial In-Reply-To: References: Message-ID: <20201123143213.GA66908@shell.msen.com> Thank you very much! Dave On Mon, Nov 23, 2020 at 09:12:59AM +0100, Marcel Taeumel wrote: > Hi all! > > We will make the image that we used during the tutorial available for everyone through files.squeak.org soon. It is filled with interesting projects. > > Best, > Marcel > Am 20.11.2020 11:15:23 schrieb Tom Beckmann : > Hi everyone, > > you might want to take a look at the ECOOP Squeak Tutorial happening today: https://2020.ecoop.org/details/ecoop-2020-tutorials/2/SqueakLive [https://2020.ecoop.org/details/ecoop-2020-tutorials/2/SqueakLive] > > > Best, > Tom > From builds at travis-ci.org Mon Nov 23 15:40:45 2020 From: builds at travis-ci.org (Travis CI) Date: Mon, 23 Nov 2020 15:40:45 +0000 Subject: [squeak-dev] [CRON] Passed: squeak-smalltalk/squeak-app#1901 (squeak-trunk - 25ebaf1) In-Reply-To: Message-ID: <5fbbd7fd2cd40_13fa5655d4388164149@travis-tasks-6d976466c8-9zn4z.mail> Build Update for squeak-smalltalk/squeak-app ------------------------------------- Build: #1901 Status: Passed Duration: 15 mins and 11 secs Commit: 25ebaf1 (squeak-trunk) Author: Marcel Taeumel Message: Hi all! The project "squeak-app" is part of the continuous build infrastructure (short: CI) for Squeak's bundles, which you can download at https://files.squeak.org/, followed by the version tag you are looking for. All bundles are updated on a regular basis, which is daily for Trunk (i.e. the current alpha version) and monthly for release versions. Note that there won't be new bundles if Squeak's build number, which reflects in-image code updates, did not change between CI jobs. -- The Squeak Oversight Board [ci skip] View the changeset: https://github.com/squeak-smalltalk/squeak-app/compare/fb55517f583fe544f9225413a23fe82a680200c2...25ebaf18249322227da1f7c767384cb35082fab7 View the full build log and details: https://travis-ci.org/github/squeak-smalltalk/squeak-app/builds/745434939?utm_medium=notification&utm_source=email -- You can unsubscribe from build emails from the squeak-smalltalk/squeak-app repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8901856&utm_medium=notification&utm_source=email. Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notification&utm_source=email. Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications. -------------- next part -------------- An HTML attachment was scrubbed... URL: From frank-lesser at lesser-software.com Mon Nov 23 15:40:46 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Mon, 23 Nov 2020 16:40:46 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: <20201123142017.GA64854@shell.msen.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> <20201123142017.GA64854@shell.msen.com> Message-ID: <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> Hi Dave, thanks, the ClassBrowserShell is up ( still empty no classes ) but most of the Dolphin infrastructure is working - and is it a pleasure - to work with the well designed Dolphin again. Frank On 11/23/2020 15:20, David T. Lewis wrote: > Good news indeed. I'm looking forward to more updates on the DNG project :-) > > Dave > > On Mon, Nov 23, 2020 at 09:07:24AM +0100, Marcel Taeumel wrote: >> Hi Frank! >> >> This is great news! Thanks for working on this. :-) Please, do keep us posted. >> >> Best, >> Marcel >> Am 20.11.2020 22:16:10 schrieb Frank Lesser : >> Hi all. >> >> I announced last week that I resumed DNG ( Dolphin Smalltalk Next >> Generation ) on my Twitter @LesserFrank. >> >> Since then I had a lot of fun working on it. >> >> Also started a DNG integration into Godot game engine which I am working >> since 2016 ( 2.x ) >> >> DolphinScript will be a Smalltalk script language deeply integrated into >> upcoming Godot 4.0. >> >> Happy Smalltalking, Frank >> >> > > From frank-lesser at lesser-software.com Mon Nov 23 16:22:08 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Mon, 23 Nov 2020 17:22:08 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> Message-ID: Hi Marcel, yep will do - I have not updated my ancient website ( no time ) - but will post int on my twitter not to pollute the Squeak ML too much. Frank On 11/23/2020 09:07, Marcel Taeumel wrote: > Hi Frank! > > This is great news! Thanks for working on this. :-) Please, do keep us > posted. > > Best, > Marcel >> >> Am 20.11.2020 22:16:10 schrieb Frank Lesser >> : >> >> Hi all. >> >> I announced last week that I resumed DNG ( Dolphin Smalltalk Next >> Generation ) on my Twitter @LesserFrank. >> >> Since then I had a lot of fun working on it. >> >> Also started a DNG integration into Godot game engine which I am working >> since 2016 ( 2.x ) >> >> DolphinScript will be a Smalltalk script language deeply integrated into >> upcoming Godot 4.0. >> >> Happy Smalltalking, Frank >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From giorgioferraris at elevensoft.it Mon Nov 23 16:46:38 2020 From: giorgioferraris at elevensoft.it (giorgio ferraris) Date: Mon, 23 Nov 2020 17:46:38 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> <20201123142017.GA64854@shell.msen.com> <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> Message-ID: Hi, Frank Dolphin was a very nice piece of software, still remember when the first version was announced! I think I was one of the first customers :) . Having it revitalized will be really nice. Please keep us up top date ciao giorgio On Mon, Nov 23, 2020 at 4:40 PM Frank Lesser < frank-lesser at lesser-software.com> wrote: > Hi Dave, > > thanks, the ClassBrowserShell is up ( still empty no classes ) but most > of the Dolphin infrastructure is working - and is it a pleasure - to > work with the well designed Dolphin again. > > Frank > > On 11/23/2020 15:20, David T. Lewis wrote: > > Good news indeed. I'm looking forward to more updates on the DNG project > :-) > > > > Dave > > > > On Mon, Nov 23, 2020 at 09:07:24AM +0100, Marcel Taeumel wrote: > >> Hi Frank! > >> > >> This is great news! Thanks for working on this. :-) Please, do keep us > posted. > >> > >> Best, > >> Marcel > >> Am 20.11.2020 22:16:10 schrieb Frank Lesser < > frank-lesser at lesser-software.com>: > >> Hi all. > >> > >> I announced last week that I resumed DNG ( Dolphin Smalltalk Next > >> Generation ) on my Twitter @LesserFrank. > >> > >> Since then I had a lot of fun working on it. > >> > >> Also started a DNG integration into Godot game engine which I am working > >> since 2016 ( 2.x ) > >> > >> DolphinScript will be a Smalltalk script language deeply integrated into > >> upcoming Godot 4.0. > >> > >> Happy Smalltalking, Frank > >> > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From leves at caesar.elte.hu Mon Nov 23 17:08:12 2020 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon, 23 Nov 2020 18:08:12 +0100 (CET) Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: <1DAB3E81-1123-4F0D-BD24-269F1EE6B540@gmx.de> References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> <1DAB3E81-1123-4F0D-BD24-269F1EE6B540@gmx.de> Message-ID: On Sun, 22 Nov 2020, Tobias Pape wrote: > > >> On 22. Nov 2020, at 19:37, Levente Uzonyi wrote: >> >> Hi Tobias, >> >> On Sun, 22 Nov 2020, Tobias Pape wrote: >> >>> >>> >>>> On 22. Nov 2020, at 18:51, Levente Uzonyi wrote: >>>> Hi Tobias, >>>> On Sun, 22 Nov 2020, Tobias Pape wrote: >>>>>> On 22. Nov 2020, at 17:46, Levente Uzonyi wrote: >>>>>> Hi All, >>>>>> Since most (every?) practical use of #respondsTo: is to check whether it's safe to send the message or not, I think, contrary to what was mentioned in this thread, that #respondsTo: does not have to return true when sending the message would not result in an MNU. >>>>>> So, I suggest adding the following implementation to expose the dynamic nature of JsonObject: >>>>>> JsonObject >> #respondsTo: aSymbol >>>>>> >>>>>> | precedence | >>>>>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>>>>> (precedence := aSymbol precedence) = 1 ifTrue: [ >>>>>> ^self includesKey: aSymbol ]. >>>>>> (precedence = 3 and: [ (aSymbol indexOf: $:) = aSymbol size ]) ifTrue: [ >>>>>> ^self includesKey: aSymbol allButLast ]. >>>>>> ^false >>>>> That's nice! but why not make it simpler? >>>>> JsonObject >> #respondsTo: aSymbol >>>>> >>>>> | precedence | >>>>> (super respondsTo: aSymbol) ifTrue: [ ^true ]. >>>>> aSymbol isSimpleGetter ifTrue: [^self includesKey: aSymbol]. >>>>> aSymbol isSimpleSetter ifTrue: [^self includesKey: aSymbol asSimpleGetter]. >>>>> ^false >>>> Three reasons: >>>> 1. performance >>>> | j s | >>>> Smalltalk garbageCollect. >>>> j := JsonObject new >>>> foo: 1; >>>> bar: 2; >>>> baz: 3; >>>> yourself. >>>> s := Symbol allSymbols. >>>> { >>>> [ s do: [ :each | ] ] bench. >>>> [ s do: [ :each | j respondsTo: each ] ] bench. >>>> [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" >>>> } >>>> #( >>>> '1,630 per second. 613 microseconds per run. 0 % GC time.' >>>> '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' >>>> '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' >>>> ) >>>> Okay, that may not be too a realistic workload. The reason of the extreme >>>> slowdown and high GC time is rapid interning and GCing of Symbols >>>> created by #asSimpleGetter. >>>> If you change s to a handcrafted array that avoids Symbol creation, like >>>> s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) >>>> the numbers get better but still not as good as my suggestion: >>>> #( >>>> '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' >>>> '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' >>>> '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') >>> >>> I thought you'd say that. >>> But "precedence" is one of the most obscure things around that part in the image. >>> >>> >>>> 2. backwards compatibility >>>> #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. >>> >>> Yea, Pre 5.3 I'd have said #asMutator. >>> >>>> 3. to use the same mechanism as #doesNotUnderstand: >>>> Have a look at that method. >>> >>> >>> Then I'd rather say change DNU too. >>> If you're down that hole (dnu/respondsTo) anyways, I don't buy the performance argument anymore. >>> >>> Not everything has to be as fast as possible. >> >> You seem to ignore that #doesNotUnderstand: is the most often used method of JsonObject. >> I assume you don't use the JSON package in production images, hence you don't care about performance. > > I do. > It never has been the bottleneck. > >> I do, so I'm not willing to change the implementation of #doesNotUnderstand: in my fork of the JSON package unless performance is at least as good as it is now. > > I just want the image to remain tractable. Does having a method or two implemented in an external package affect that? Also, have you ever had a look at how other stuff is implemented in that package? > Performance is nice. But if you rely on performance with the JSOn stuff, > subclass the JsonObject and implement your keys as messages? That ought to be the fastest way, no? It depends on how your JsonObjects are created. If you parse a json from an external source, you can't do that unless you hardcode the structure of the json into your application. > I though it was meant to be that way. > > That said, I rarely remain in the JSON space for longer than necessary; I'd rather have proper objects and only convert on "the edges" See above. Levente > > I'm not against fast things. > I'm merely a bit startled by fast things that are harder to understand than necessary… > > Best regards > -Tobias > > PS: Levente, your code is almost always the fastest variant of anything we discuss on here. That's amazing in itself. Don't get the impression I'm not amazed by that ;) > >> >> >> Levente >> >>> >>> Best regards >>> -Tobias >>> >>>> Levente >>>>> -Tobias >>>>>> Levente >>>>>> On Sun, 22 Nov 2020, Thiede, Christoph wrote: From frank-lesser at lesser-software.com Mon Nov 23 17:27:43 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Mon, 23 Nov 2020 18:27:43 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> <20201123142017.GA64854@shell.msen.com> <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> Message-ID: <5ed3ed98-3260-16de-8962-90e6d092ba54@lesser-software.com> Hi Georgio, thanks - please al of Dolphin enthusiasts do me a favor & confirm that the current Dolphin procedure ( Github ) - compiling it & get it running under Win10 works out of the box - I had a bad discussion which states that Dolphin was open sourced but dead source because it never run since 1998. I am working hard to get DNG to work - and it is a perfect fit in the winter months her in Berlin - ( I got far but my personal experience tells me that it is still a lot of work ) Frank On 11/23/2020 17:46, giorgio ferraris wrote: > Hi, Frank > Dolphin was a very nice piece of software, still remember when the > first version was announced! I think I was one of the first customers > :)  . Having it revitalized will be really nice. > Please keep us up top date > > ciao > giorgio > > > On Mon, Nov 23, 2020 at 4:40 PM Frank Lesser > > wrote: > > Hi Dave, > > thanks, the ClassBrowserShell is up ( still empty no classes ) but > most > of the Dolphin infrastructure is working - and is it a pleasure - to > work with the well designed Dolphin again. > > Frank > > On 11/23/2020 15:20, David T. Lewis wrote: > > Good news indeed. I'm looking forward to more updates on the DNG > project :-) > > > > Dave > > > > On Mon, Nov 23, 2020 at 09:07:24AM +0100, Marcel Taeumel wrote: > >> Hi Frank! > >> > >> This is great news! Thanks for working on this. :-) Please, do > keep us posted. > >> > >> Best, > >> Marcel > >> Am 20.11.2020 22:16:10 schrieb Frank Lesser > >: > >> Hi all. > >> > >> I announced last week that I resumed DNG ( Dolphin Smalltalk Next > >> Generation ) on my Twitter @LesserFrank. > >> > >> Since then I had a lot of fun working on it. > >> > >> Also started a DNG integration into Godot game engine which I > am working > >> since 2016 ( 2.x ) > >> > >> DolphinScript will be a Smalltalk script language deeply > integrated into > >> upcoming Godot 4.0. > >> > >> Happy Smalltalking, Frank > >> > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Das.Linux at gmx.de Mon Nov 23 18:09:47 2020 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon, 23 Nov 2020 19:09:47 +0100 Subject: [squeak-dev] I'd like to contribute to the JSON project In-Reply-To: References: <52fee8937482410fa26d890e1b6344ac@student.hpi.uni-potsdam.de> <, > <67019199170640929e1adf98fa686a81@student.hpi.uni-potsdam.de> <4E007782-20D5-4F3E-981C-F24DD5D504A0@gmx.de> <859019C9-3B71-4E7B-8C14-385F6A8E5FC8@gmx.de> <1DAB3E81-1123-4F0D-BD24-269F1EE6B540@gmx.de> Message-ID: <40CB8FCE-9528-43C7-8552-E2A839A74B77@gmx.de> > On 23. Nov 2020, at 18:08, Levente Uzonyi wrote: > > On Sun, 22 Nov 2020, Tobias Pape wrote: > >> >> >>> On 22. Nov 2020, at 19:37, Levente Uzonyi wrote: >>> Hi Tobias, >>> On Sun, 22 Nov 2020, Tobias Pape wrote: >>>>> On 22. Nov 2020, at 18:51, Levente Uzonyi wrote: >>>>> Hi Tobias, >>>>> On Sun, 22 Nov 2020, Tobias Pape wrote: >>>>> Three reasons: >>>>> 1. performance >>>>> | j s | >>>>> Smalltalk garbageCollect. >>>>> j := JsonObject new >>>>> foo: 1; >>>>> bar: 2; >>>>> baz: 3; >>>>> yourself. >>>>> s := Symbol allSymbols. >>>>> { >>>>> [ s do: [ :each | ] ] bench. >>>>> [ s do: [ :each | j respondsTo: each ] ] bench. >>>>> [ s do: [ :each | j respondsTo2: each ] ] bench. "Your suggested implementation" >>>>> } >>>>> #( >>>>> '1,630 per second. 613 microseconds per run. 0 % GC time.' >>>>> '19 per second. 52.7 milliseconds per run. 0.09992 % GC time.' >>>>> '1.18 per second. 850 milliseconds per run. 32.81709 % GC time.' >>>>> ) >>>>> Okay, that may not be too a realistic workload. The reason of the extreme >>>>> slowdown and high GC time is rapid interning and GCing of Symbols >>>>> created by #asSimpleGetter. >>>>> If you change s to a handcrafted array that avoids Symbol creation, like >>>>> s := #(yourself foo foo: bar bar: baz baz: foobar foobar: name name:) >>>>> the numbers get better but still not as good as my suggestion: >>>>> #( >>>>> '4,970,000 per second. 201 nanoseconds per run. 38.02 % GC time.' >>>>> '147,000 per second. 6.82 microseconds per run. 1.74 % GC time.' >>>>> '92,300 per second. 10.8 microseconds per run. 1.09978 % GC time.') >>>> I thought you'd say that. >>>> But "precedence" is one of the most obscure things around that part in the image. >>>>> 2. backwards compatibility >>>>> #isSimpleSetter and #isSimpleGetter are available since Squeak 5.3. I use this code in 5.1 and 5.2 images as well. >>>> Yea, Pre 5.3 I'd have said #asMutator. >>>>> 3. to use the same mechanism as #doesNotUnderstand: >>>>> Have a look at that method. >>>> Then I'd rather say change DNU too. >>>> If you're down that hole (dnu/respondsTo) anyways, I don't buy the performance argument anymore. >>>> Not everything has to be as fast as possible. >>> You seem to ignore that #doesNotUnderstand: is the most often used method of JsonObject. >>> I assume you don't use the JSON package in production images, hence you don't care about performance. >> >> I do. >> It never has been the bottleneck. >> >>> I do, so I'm not willing to change the implementation of #doesNotUnderstand: in my fork of the JSON package unless performance is at least as good as it is now. >> >> I just want the image to remain tractable. > > Does having a method or two implemented in an external package affect that? Also, have you ever had a look at how other stuff is implemented in that package? Been a while. I've used it for some years now but lately, I've not looked into the implementation anymore, no. > >> Performance is nice. But if you rely on performance with the JSOn stuff, >> subclass the JsonObject and implement your keys as messages? That ought to be the fastest way, no? > > It depends on how your JsonObjects are created. If you parse a json from an external source, you can't do that unless you hardcode the structure of the json into your application. Yes, exactly. > >> I though it was meant to be that way. >> >> That said, I rarely remain in the JSON space for longer than necessary; I'd rather have proper objects and only convert on "the edges" > > See above. Best regards -Tobias > > Levente > >> >> I'm not against fast things. >> I'm merely a bit startled by fast things that are harder to understand than necessary… >> >> Best regards >> -Tobias >> >> PS: Levente, your code is almost always the fastest variant of anything we discuss on here. That's amazing in itself. Don't get the impression I'm not amazed by that ;) >> >>> Levente >>>> Best regards >>>> -Tobias >>>>> Levente From frank-lesser at lesser-software.com Mon Nov 23 19:48:51 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Mon, 23 Nov 2020 20:48:51 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> <20201123142017.GA64854@shell.msen.com> <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> Message-ID: <7e328b44-0a94-cc0d-88ed-d97464b57ff0@lesser-software.com> Hi Giorgio rereading your answer missing a thing. I am not revitalizing Dolphin ! Dolphin was and is continuously maintained at https://github.com/dolphinsmalltalk/Dolphin - since its MIT release - I am attempting to get it up on my VM after a decade again. Dolphin itself has evolved since its MIT release - no doubt - it may look still like it was a decade ago - but under its hood - it had been constantly improved - so Dolphin of its own is worth looking at - It still would be nice to have a confirmation that it can be compiled as described and works out of the box. My work here is to port it to my VM - with help of Blair- and when this works - do the next steps - planned is to have Dolphin working as a "Scripting" language for Godot Game engine 4.0. DNG "failed" a decade before - also due to also technical reasons - to very different concepts of the underlying VM's and the fact that only a very limited man power was available. - but as you can see on my twitter ( screenshot ) we got it working  in 2010  & it still works here on Win10. So everyone who is interested - do me a favor & just try Dolphin from Github thanks Giorgio, Frank On 11/23/2020 17:46, giorgio ferraris wrote: > Hi, Frank > Dolphin was a very nice piece of software, still remember when the > first version was announced! I think I was one of the first customers > :)  . Having it revitalized will be really nice. > Please keep us up top date > > ciao > giorgio > > > On Mon, Nov 23, 2020 at 4:40 PM Frank Lesser > > wrote: > > Hi Dave, > > thanks, the ClassBrowserShell is up ( still empty no classes ) but > most > of the Dolphin infrastructure is working - and is it a pleasure - to > work with the well designed Dolphin again. > > Frank > > On 11/23/2020 15:20, David T. Lewis wrote: > > Good news indeed. I'm looking forward to more updates on the DNG > project :-) > > > > Dave > > > > On Mon, Nov 23, 2020 at 09:07:24AM +0100, Marcel Taeumel wrote: > >> Hi Frank! > >> > >> This is great news! Thanks for working on this. :-) Please, do > keep us posted. > >> > >> Best, > >> Marcel > >> Am 20.11.2020 22:16:10 schrieb Frank Lesser > >: > >> Hi all. > >> > >> I announced last week that I resumed DNG ( Dolphin Smalltalk Next > >> Generation ) on my Twitter @LesserFrank. > >> > >> Since then I had a lot of fun working on it. > >> > >> Also started a DNG integration into Godot game engine which I > am working > >> since 2016 ( 2.x ) > >> > >> DolphinScript will be a Smalltalk script language deeply > integrated into > >> upcoming Godot 4.0. > >> > >> Happy Smalltalking, Frank > >> > >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stes at telenet.be Wed Nov 25 15:27:45 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Wed, 25 Nov 2020 16:27:45 +0100 (CET) Subject: [squeak-dev] is http://seaside.gemstone.com/ss down ? Message-ID: <1903529676.27663421.1606318065655.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, As an experiment I'm trying to load Metacello/Seaside in Squeak 4.6. (using the VM squeak 4.19.2) The first problem is that when following the instructions from https://github.com/Metacello/metacello#squeak-older-than-squeak52 I get a connection timeout, perhaps the URL has changed ? In Squeak 4.6 update: #15117 the following message Installer-Core:Installer -> class methods -> repositories is implemented as: gemsource ^ self monticello http: 'http://seaside.gemstone.com/ss' When I try it with Squeak 6.0alpha latest update: #20077 it uses the URL http://seaside.gemtalksystems.com/ss/metacello So when I change in 4.6 the gemsource method to: Installer-Core:Installer -> class methods -> repositories gemsource ^ self monticello http: 'http://seaside.gemtalksystems.com/ss' it seems to give better results. In fact with that URL (I have no idea whether it is correct) I get lots of messages ending with: Loaded -> Metacello-FileTree-dkh.29 --- http://seaside.gemtalksystems.com/ss/metacello --- cache Loaded -> Metacello-GitHub-dkh.29 --- http://smalltalkhub.com/mc/dkh/metacello/main --- cache Evaluated -> 1.0-beta.32.3 [ConfigurationOfMetacello] >> metacelloPrimeRegistry ...finished 1.0-beta.32.3 If I try it in a web browser (not in Squeak), then the URL http://seaside.gemstone.com/ss also seems to hang, so this is perhaps just the wrong URL or some redirection not working anymore. David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfvneKAAoJEAwpOKXMq1Ma8BAH/0AhBa96kv38W5nN6Scs7UwH ltHr++D2Mr70c/BpsjMjzx0QfUSDotHwFMZLZOF2D9gv3xKsjcV62aWUHDlhWq0z yItN5otEbqvNCAvznxwu6RBFYyGEHLev1WuK1wqXXNJX9VCBq+dnh+TGp9nIeBQY W71G7qIlCUaY4lZ2C/FZUaBWCKhQxH4vK+UK3WvxPdDCZv33nJL87ull/GSc+CKm DFGxlT8D3nrLGHt3FyR79lOML7uW9SSmrFxD5KnapYI2c3bERGlHNB3+I7nRBx1P Jff0KgmiL7YiBud0G/cgiaD/PP06cskPJtFRc3397Vv2uG7+X/R9uVGrfwbSPro= =ahUy -----END PGP SIGNATURE----- From stes at telenet.be Wed Nov 25 16:07:53 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Wed, 25 Nov 2020 17:07:53 +0100 (CET) Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position Message-ID: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, As an experiment I'm trying to load Metacello/Seaside in Squeak 4.6. (using the VM squeak 4.19.2) (image is 4.6 update #15117) I'm following the instructions from https://github.com/Metacello/metacello#squeak-older-than-squeak52 After Loaded -> Metacello-FileTree-dkh.29 --- http://seaside.gemtalksystems.com/ss/metacello --- cache Loaded -> Metacello-GitHub-dkh.29 --- http://smalltalkhub.com/mc/dkh/metacello/main --- cache Evaluated -> 1.0-beta.32.3 [ConfigurationOfMetacello] >> metacelloPrimeRegistry ...finished 1.0-beta.32.3 I'm trying to evaluate the piece of code: "Load the Preview version of Metacello from GitHub" (Smalltalk at: #Metacello) new configuration: 'MetacelloPreview'; version: #stable; repository: 'github://Metacello/metacello:configuration'; load. Unfortunately I get the following error: Could not resolve: ConfigurationOfMetacelloPreview [ConfigurationOfMetacelloPreview] in ../squeak/package-cache github://Metacello/metacello:configuration ERROR: 'GoferRepositoryError: can''t find EOCD position' Any idea please what this "can't find EOCD position' is about ? Perhaps this is Squeak 4.6 specific, as in Squeak 6.0alpha it seems to work, with the image I get stuff like Fetched -> Metacello-Core-EstebanLorenzano.833 --- github://Metacello/metacello:master/repository --- github://Metacello/metacello:master/repository and I'm under the impression that the Squeak 6 step of Installer ensureRecentMetacello. is succesful for me in Squeak 6.0 alpha latest update: #20077 However from the docs at https://github.com/Metacello/metacello#squeak-older-than-squeak52 I'm under the impression that it is supposed to work with Squeak < 5.2 (such as Squeak 4.6) Thanks! David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfvoDrAAoJEAwpOKXMq1Ma3YYIAK2Pq83iMkVZGd1koVNEs8zm 2BXq11qpdameSQHCzchwcv6+9LNctIXPRFcwD0VY/K4aYE/+Or+5RsCM8KKpcbgp C7gQ3b16qxhqaGKSBO9BkD86NDsF8tp3xLDdr1Zjziz2mHcNQSPMSTZei76cEKn0 /M/vZKwhFlOQ2g3nlKEPLkVOBwFkchh6Z0JWJrz3n9Lt6g3wnjpVX4s/3MwFZ0xH 6opsWqSmVT3lZBpc/o7tb0v4Frk5wcULNzBH4Tc3irwFcyWl0HEo6ITQM6YoGfJD tlm4it5rlQAsDKCG3PklrM1ZqCuo4MztSEJrPWMQuNpHhhbGMgLqH7ZH/P9QOzU= =ZGyt -----END PGP SIGNATURE----- From giovanni at corriga.net Wed Nov 25 19:06:08 2020 From: giovanni at corriga.net (Giovanni Corriga) Date: Wed, 25 Nov 2020 19:06:08 +0000 Subject: [squeak-dev] UK Smalltalk User Group Meeting - Wednesday, November 25th In-Reply-To: References: Message-ID: Hi, it appears that Meetup is down - here is the zoom link: https://zoom.us/j/94624791973?pwd=L2NXc0pWOGIxMm5pbC9DOWdxTzlXUT09 On Sun, 8 Nov 2020 at 13:25, Giovanni Corriga wrote: > The next meeting of the UK Smalltalk User Group will be on Wednesday, > November 25th. > > Stephen Travis Pope will present Siren9 and CSL6 - Frameworks and > Applications for Sound/Music Creation and Processing. > > The Siren system ( https://github.com/stpope/Siren9 ) is a > general-purpose software framework for music and sound composition, > processing, performance, and analysis; it is a collection of about 350 > classes written in Smalltalk-80 (40 kLOC or so). The current version of > Siren (9.0) works on VisualWorks Smalltalk and supports streaming I/O via > OpenSoundControl (OSC), MIDI, and multi-channel audio ports. The CREATE > Signal Library (CSL)( https://github.com/stpope/CSL6 ) is a > cross-platform C++ framework for digital audio signal synthesis, analysis, > spatialization and interactive sound/music application development. CSL was > developed at the University of California, Santa Barbara (UCSB) starting in > the late 1990s. This presentation will introduce both package and > demonstrate their use together to construct real-time compositional and > music synthesis software. > > Stephen Travis Pope ( http://heaveneverywhere.com/stp ) is an > award-winning composer, film-maker, computer scientist and social activist > based in Santa Barbara, California. He is currently active as a software > development contractor and intellectual property expert through FASTLab. > His music and video compositions are released through HeavenEverywhere > Media. Stephen has used the Smalltalk programming system since 1984 and > made several significant contributions to it, though he remains frustrated > by programming environments in general. > > Given the current COVID-19 restrictions, this will be an online meeting > from home. > > If you'd like to join us, please sign up in advance on the meeting's > Meetup page ( https://www.meetup.com/UKSTUG/events/cbklbrybcpbhc/ ) to > receive the meeting details. Don’t forget to bring your laptop and drinks! > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at mail.msen.com Thu Nov 26 03:26:19 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Wed, 25 Nov 2020 22:26:19 -0500 Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> Message-ID: <20201126032619.GA53113@shell.msen.com> On Wed, Nov 25, 2020 at 05:07:53PM +0100, stes at PANDORA.BE wrote: > > Unfortunately I get the following error: > > Could not resolve: ConfigurationOfMetacelloPreview [ConfigurationOfMetacelloPreview] in ../squeak/package-cache github://Metacello/metacello:configuration ERROR: 'GoferRepositoryError: can''t find EOCD position' > > Any idea please what this "can't find EOCD position' is about ? > > Perhaps this is Squeak 4.6 specific, as in Squeak 6.0alpha it seems to work, > with the image > It means that something went wrong trying to unpack a ZIP archive (such as an MCZ file, which is in ZIP format). The error message is slightly less horrible in images after 4.6. Occasionally you may have an empty or corrupt file in your ./package-cache/ directory that leads to this error message. If so, you can just delete the contents of your ./package-cache/ and things will return to normal. If you happen to be running your 4.6 image in a different directory than other images, then it may appear as if the error condition is associated with that version of the image. Dave From stes at telenet.be Thu Nov 26 09:19:16 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 26 Nov 2020 10:19:16 +0100 (CET) Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> Message-ID: <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Thanks for your help. I should mention that I'm doing this on a totally unsupported OS/Squeak version. Obviously https://github.com/Metacello/metacello/blob/master/.travis.yml mentions Linux and Squeak 5+ but I'm using Solaris 11 and Squeak 4. I wasn't aware of the package-cache directory, I moved it and tried again. But the same error ... Despite the error I seem to be able to continue. The encouraging thing is that the step "Now load latest version of Metacello" (Smalltalk at: #Metacello) new baseline: 'Metacello'; repository: 'github://Metacello/metacello:master/repository'; get. (Smalltalk at: #Metacello) new baseline: 'Metacello'; repository: 'github://Metacello/metacello:master/repository'; load. seems to work. So I'll give it a try with Seaside and see how far I get. Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfv3K0AAoJEAwpOKXMq1MaH1MH/RcvZHDuWrJqiI0VHVL/kWwu uoCxf5J0ioKwpv1KZPzFmKZEf3krwjPP77Jm3HoBIRcTzHWpzFNbymhSSKRUTt1N ip6dqgNG7vxJvmtcFZ2xfkD1bG0Y2dxrw6CgD1F9AJNOTTh7YfRJAj3dJnA3CKdN h1np1xwltZdTE/9Lkml/+IV80fjErJwt3ZDQjAzpn7TbXKKvK3UokGo0Y6EjlyDB R3CiWYtiiKSgJG28Oii0/JCVrIQhQKbU3cFEFCOfo8wSZ32yc3yFiqhhMzN61AIf 172l8nTCokh28uJaVkfFabt4dvy0Pz/f45kgU32liIUOM1u/l0rzLHm1FmsBzmI= =paQE -----END PGP SIGNATURE----- From lewis at mail.msen.com Thu Nov 26 14:12:03 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 26 Nov 2020 09:12:03 -0500 Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> Message-ID: <20201126141203.GA73467@shell.msen.com> On Thu, Nov 26, 2020 at 10:19:16AM +0100, stes at PANDORA.BE wrote: > > I should mention that I'm doing this on a totally unsupported OS/Squeak version. > > Obviously https://github.com/Metacello/metacello/blob/master/.travis.yml > mentions Linux and Squeak 5+ but I'm using Solaris 11 and Squeak 4. > > I wasn't aware of the package-cache directory, I moved it and tried again. > > But the same error ... > It may help if you use the newer version of ZipArchive>>readFrom: from newer Squeak images, and put that in your Squeak 4 image. This will show (if possible) the name of the file or stream that had the "cannot find EOCD position" problem. Note, you can find this method by highlighting "EOCD position" in a workspace, then search "method strings with it" which is hidden toward the end of the menu options (so you may not have noticed it). Dave From stes at telenet.be Thu Nov 26 17:32:18 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Thu, 26 Nov 2020 18:32:18 +0100 (CET) Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> Message-ID: <2038538025.32018921.1606411938700.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Thanks for the suggestion. I will try a newer version of ZipArchive>>readFrom: By the way, sorry to spam this list with Seaside questions, but it's also a little bit of a Squeak question, given the fact that I'm trying to load Seaside on Squeak 4.19.2 Note that I think that Metacello loaded (despite the error). I can go ahead and do for example: Metacello new configuration:'Seaside3'; repository: 'http://www.smalltalkhub.com/mc/Seaside/MetacelloConfigurations/main'; version: #'release3.1'; load I think the above succesfully loaded Seaside version 3.1.4.3 (after lots and lots loading messages). The reason why I'm trying release3.1 is because with the default Metacello new baseline:'Seaside3'; repository: 'github://SeasideSt/Seaside:master/repository'; load I'm having some other errors: Warning: This package depends on the following classes: GRDynamicVariable You must resolve these dependencies before you will be able to load these definitions: WACurrentExceptionHandler WACurrentRequestContext WACurrentRequestContext class>>defaultValue WADynamicVariable click on Proceed MessageNotUnderstood: Character>>greaseInteger I've done some research on "greaseInteger" (funny name if you ask me) http://forum.world.st/MNU-Character-gt-gt-greaseInteger-when-loading-Seaside-in-Squeak-Trunk-td4922096.html So others have seen the greaseInteger error as well. However when I load #'release 3.1' it seems to load nicely without errors .. After loading I can find a method greaseInteger (which is something of Seaside I think) under Browser -> Character -> instance methods -> *grease-pharo-core greaseInteger "Answer an unicode code point of the receiver." ^ self charCode I'm a newbie in this but I think *grease-pharo-core looks like some sort of category of messages that a package has been adding to the Character class. So I suspect greaseInteger is some sort of message that loading Seaside, added to the Character class. What is the correct term in Smalltalk / Squeak to call the string *grease-pharo-core ?? it's a set of messages . For example under "accessing" you can find asciiValue, charCode, codePoint, digitValue, encodedCharSet, leadingChar. What is the correct term for "accessing" or "*grease-pharo-core" ? (set of messages that you can see in the Browser for that class) Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfv+ZhAAoJEAwpOKXMq1MaJ6EIAIXJlyqpWmi1nz/Q/snpYzQZ l/G7SLqugzBR29xXj7GoMlHa674E7+BOPHtGONj+JxI8TtCbS7G27SZUV1gFlobC AwliazW7qXChGrhfnMYTBkDRCXxxxRIhsaZUsNaI87rwpv6WkbR0EM1RBgOVNTva 7AT0mh3Yb8yTLF6aGquPzqWQ5bQCndGTBlgw+98HEJVf2dktOOfiRnbGVvj5QxrT UFKB6KZlkr2iYGx/REk5WX0rQ8uFfdQCL2d0fWd5dCGzWhv6hM7KuDDmndx56+4h RPbJfaDgq09q1SVX+a+5rvCu+SsRm1ao0qCiCBEkakVjVQ/kWzIF+rv+gmYrq00= =KB/L -----END PGP SIGNATURE----- From lewis at mail.msen.com Thu Nov 26 20:00:56 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Thu, 26 Nov 2020 15:00:56 -0500 Subject: [squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource In-Reply-To: <20200614171501.GA25790@shell.msen.com> References: <20200614171501.GA25790@shell.msen.com> Message-ID: <20201126200056.GA23775@shell.msen.com> On Sun, Jun 14, 2020 at 01:15:01PM -0400, David T. Lewis wrote: > A few cups of coffee this morning led to some enhancements to my DoItFirst > utility, so I decided to put in on SqueakSource. > > http://www.squeaksource.com/DoItFirst > I have been updating this since the original post, and I think it is in pretty good shape at this point. Latest version on SqueakSource is DoItFirst-System-Support-dtl.14.mcz. In order to make this work properly I also add a couple of references to DoItFirst from other class startUp methods. That is messy to add to a MCZ, so I'm attaching a change set containing the latest package plus the two additional startUp calls. I think this is clean enough to consider adding to trunk now, so if folks think it is a good idea, let me know and I'll add it. To summarize (from the -help command line option): DoItFirst image arguments: -doit argumentlist "evaluate each argument as a doIt expression" -evaluate arg "evaluate arg, print result then exit" -filein filelist "file in each file named in fileList" -cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options" -debug "enter a debugger as soon as possible in the startUp processing" -help "print this message" Dave -------------- next part -------------- 'From Squeak6.0alpha of 13 November 2020 [latest update: #20077] on 26 November 2020 at 1:57:39 pm'! "Change Set: DoItFirst-dtl Date: 26 November 2020 Author: David T. Lewis Be the first thing in the system startup list, and do things that should be done prior to any additional image initialization. If the first image argument is a recognized option, evaluate it. Image arguments are typically preceded by a '--' token on the command line. DoItFirst image arguments: -doit argumentlist ""evaluate each argument as a doIt expression"" -evaluate arg ""evaluate arg, print result then exit"" -filein filelist ""file in each file named in fileList"" -cwd path ""set FileDirectory defaultDirectory to path prior to evaluating other options"" -debug ""enter a debugger as soon as possible in the startUp processing"" -help ""print this message"" "! Object subclass: #DoItFirst instanceVariableNames: 'actions' classVariableNames: 'Current' poolDictionaries: '' category: 'DoItFirst-System-Support'! !DoItFirst commentStamp: 'dtl 11/16/2020 21:28' prior: 0! Be the first thing in the system startup list, and do things that should be done prior to any additional image initialization. If the first image argument is a recognized option, evaluate it. Image arguments are typically preceded by a '--' token on the command line. DoItFirst image arguments: -doit argumentlist "evaluate each argument as a doIt expression" -evaluate arg "evaluate arg, print result then exit" -filein filelist "file in each file named in fileList" -cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options" -debug "enter a debugger as soon as possible in the startUp processing" -help "print this message" ! !Delay class methodsFor: 'snapshotting' stamp: 'dtl 11/14/2020 22:18'! startUp: resuming "Restart active delay, if any, when resuming a snapshot." DelaySuspended ifFalse:[^self error: 'Trying to activate Delay twice']. DelaySuspended := false. self restoreResumptionTimes. AccessProtect signal. resuming ifTrue: [ DoItFirst reevaluateDebug ]. ! ! !DoItFirst methodsFor: 'private' stamp: 'dtl 6/15/2020 17:59'! add: valuable to: actionList at: key "Add valuable to the end of action list, and register it at key so that it may be reevaluated at a later time if necessary." actionList addLast: valuable. actions at: key put: valuable.! ! !DoItFirst methodsFor: 'private' stamp: 'dtl 6/15/2020 17:59'! addFirst: valuable to: actionList at: key "Add valuable to the beginning of action list, and register it at key so that it may be reevaluated at a later time if necessary." actionList addFirst: valuable. actions at: key put: valuable.! ! !DoItFirst methodsFor: 'private' stamp: 'dtl 8/6/2020 20:17'! addWithoutEvaluation: valuable at: key "Register action at key so that it may be reevaluated at a later time. Do not evaluate in the startUp of DoItNow. Used when the action cannot yet be evaluated because it requires startUp processing later in the startup list." actions at: key put: valuable.! ! !DoItFirst methodsFor: 'private' stamp: 'dtl 6/14/2020 12:03'! isArg: token ^ token isEmpty not and: [ token beginsWith: '-' ].! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 6/14/2020 12:36'! cwd: path "Evaluate arg and print the result on stdout, or error message on stderr. Exit immediately without saving the image." (FileDirectory on: path) exists ifTrue: [ FileDirectory setDefaultDirectory: path ] ifFalse: [ FileStream stderr nextPutAll: path, ': directory does not exist'; lf; flush. Smalltalk quitPrimitive ] ! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 11/16/2020 21:34'! debug "halt and enter a debugger" Halt new signal: self class name, ' inserted break in StartUpList processing'.! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 6/14/2020 12:36'! doIt: arguments "Evaluate arguments and print the result on stdout, or error message on stderr. Exit the image after any error." arguments do: [ :arg | [FileStream stdout nextPutAll: (Compiler evaluate: arg) asString; lf; flush] on: Error do: [ :ex | FileStream stderr nextPutAll: ex asString; lf; flush. Smalltalk quitPrimitive ]]! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 11/16/2020 20:54'! evaluateOption: arg "Evaluate option and print the result on stdout, or error message on stderr. Exit immediately without saving the image." [FileStream stdout nextPutAll: (Compiler evaluate: arg) asString; lf; flush] on: Error do: [ :ex | FileStream stderr nextPutAll: ex asString; lf; flush ]. Smalltalk quitPrimitive! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 11/16/2020 21:20'! fileIn: fileNames "File in each named file. On error, print a message to stderr and exit the image." fileNames do: [ :arg | [ | fs | fs := FileStream oldFileNamed: arg. FileStream stdout nextPutAll: 'file in ', fs name; lf; flush. fs fileIn ] on: Error do: [ :ex | FileStream stderr nextPutAll: ex asString; lf; flush. Smalltalk quitPrimitive ]]! ! !DoItFirst methodsFor: 'actions' stamp: 'dtl 11/15/2020 15:51'! help FileStream stdout nextPutAll: self class name, ' image arguments:'; lf. { '-doit argumentlist "evaluate each argument as a doIt expression"' . '-evaluate arg "evaluate arg, print result then exit"' . '-filein filelist "file in each file named in fileList"' . '-cwd path "set FileDirectory defaultDirectory to path prior to evaluating other options"' . '-debug "enter a debugger as soon as possible in the startUp processing"'. '-help "print this message"' } do: [ :e | FileStream stdout tab; nextPutAll: e; lf ]. FileStream stdout flush. Smalltalk quitPrimitive. ! ! !DoItFirst methodsFor: 'evaluating' stamp: 'dtl 11/15/2020 16:08'! evaluateArg: actionKey "If actionKey is registered, then evaluate its action. This is intended to allow a previously evaluated option to be reevaluated at a later point in the system startup list if necessary." (actions at: actionKey ifAbsent: []) ifNotNil: [:action | action value]! ! !DoItFirst methodsFor: 'evaluating' stamp: 'dtl 11/15/2020 16:08'! evaluateArgs | actionQueue | actionQueue := self parse readStream. [ actionQueue atEnd ] whileFalse: [ actionQueue next value ]. ! ! !DoItFirst methodsFor: 'evaluating' stamp: 'dtl 6/14/2020 12:11'! nextTokensFrom: argumentStream "Next available tokens up to the next parseable argument, for commands that expect an argument list of names or doIt expressions." | list | list := OrderedCollection new. [ argumentStream atEnd or: [ self isArg: argumentStream peek ]] whileFalse: [ list add: argumentStream next ]. ^ list! ! !DoItFirst methodsFor: 'evaluating' stamp: 'dtl 11/16/2020 21:48'! parse "Iterate over the argument list, adding action blocks to the actions dictionary. If any action blocks require files or directory initialization send the appropriate startUp message to do it now. Answer a list of option selectors that should be evaluated." | args actions needsFiles needsDirectory | needsFiles := needsDirectory := false. args := Smalltalk arguments readStream. actions := OrderedCollection new. [ args atEnd ] whileFalse: [ args next ifNotNil: [ :next | | nextOption | nextOption := (next beginsWith: '--') ifTrue: [ next allButFirst ] ifFalse: [ next ]. (nextOption caseOf: { [ '-help' ] -> [ self addFirst: [ self help ] to: actions at: #help. needsFiles := true] . [ '-debug' ] -> [ self addWithoutEvaluation: [ self debug ] at: #debug] . [ '-doit' ] -> [ | list | list := self nextTokensFrom: args. self add:[ self doIt: list ] to: actions at: #doit. needsFiles := true] . [ '-evaluate' ] -> [ | arg | arg := args next. self add:[ self evaluateOption: arg ] to: actions at: #evaluate. needsFiles := true] . [ '-filein' ] -> [ | list | list := self nextTokensFrom: args. self add:[ self fileIn: list ] to: actions at: #filein. needsFiles := true] . [ '-cwd' ] -> [ | arg | arg := args next. self addFirst:[ self cwd: arg ] to: actions at: #cwd. needsFiles := needsDirectory := true] . } otherwise: [] ) ] ]. needsFiles ifTrue: [ FileStream startUp: true. "initialize stdout and stderr" ]. needsDirectory ifTrue: [ FileDirectory startUp "set default directory" ]. ^ actions. ! ! !DoItFirst methodsFor: 'initialize-release' stamp: 'dtl 11/14/2020 22:44'! initialize actions := Dictionary new. ! ! !DoItFirst class methodsFor: 'reevaluate options' stamp: 'dtl 11/26/2020 13:29'! reevaluateCwd "If a -cwd option was specified on the command line, reevaluate it now. May be called from FileDirectory class>>startUp: to reevaluate the command line option to ensure that the default directory is ultimately set as specified by the -cwd image command line option." ^ self current evaluateArg: #cwd.! ! !DoItFirst class methodsFor: 'reevaluate options' stamp: 'dtl 11/26/2020 13:30'! reevaluateDebug "The -debug option cannot be evaluated at DoInNow startUp time, but may be called later in the startUp processing. If -debug was not specified as a command option this method does nothing. May be called from Delay>>startup to invoke a debugger at the earliest possible time." ^ self current evaluateArg: #debug.! ! !DoItFirst class methodsFor: 'class initialization' stamp: 'dtl 11/26/2020 13:31'! current "Protect against nil in case package was reloaded and existing startUp methods refer to the current instance." ^Current ifNil: [ Current := self new ]! ! !DoItFirst class methodsFor: 'class initialization' stamp: 'dtl 11/16/2020 21:02'! initialize Smalltalk addToStartUpList: self before: SmallInteger.! ! !DoItFirst class methodsFor: 'system startup' stamp: 'dtl 11/15/2020 16:08'! startUp: resuming resuming ifTrue: [ Current := self new. Current evaluateArgs ] ! ! !FileDirectory class methodsFor: 'name utilities' stamp: 'dtl 11/19/2020 21:42'! startUp "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup." self setDefaultDirectoryClass. self setDefaultDirectory: (self dirPathFor: Smalltalk imageName). Preferences startInUntrustedDirectory ifTrue:[ "The SecurityManager may override the default directory to prevent unwanted write access etc." self setDefaultDirectory: SecurityManager default untrustedUserDirectory. "Make sure we have a place to go to" DefaultDirectory assureExistence]. Smalltalk openSourceFiles. (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :cls | cls reevaluateCwd ]. ! ! DoItFirst initialize! From stes at telenet.be Fri Nov 27 16:18:44 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Fri, 27 Nov 2020 17:18:44 +0100 (CET) Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <2038538025.32018921.1606411938700.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> <2038538025.32018921.1606411938700.JavaMail.zimbra@telenet.be> Message-ID: <1814705286.36263491.1606493924682.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 In the Squeak 4.5 #15117 image, under Browser->ZipArchive->readFrom: eocdPosition <= 0 ifTrue: [self error: 'can''t find EOCD position']. Under "Versions" it is indicated: nk 12/06/2002 17:09 ZipArchive readFrom: {reading} In the Squeak6.0alpha #20077 image, ZipArchive readFrom: has under "Versions": dtl 9/28/2017 20:31 ZipArchive readFrom: {reading} So I just copy paste that implementation into the 4.6 image and accept it. If there is a better way to do it, I would be interested to learn about it. Perhaps there is a clever way to file in methods from a different image. The 2017 version issues: eocdPosition <= 0 ifTrue: [self error: self class name, ' cannot find EOCD position in ', aStreamOrFileName name]. So after my change the "prettyDiffs" shows a difference for the error: line, in the implementation of the readFrom: message. Now -- using the new readFrom: implementation for ZipArchive -- to come back to the original problem when loading Metacello. "Load the Preview version of Metacello from GitHub" (Smalltalk at: #Metacello) new configuration: 'MetacelloPreview'; version: #stable; repository: 'github://Metacello/metacello:configuration'; load. results in: Could not resolve: ConfigurationOfMetacelloPreview [ConfigurationOfMetacelloPreview] in (..)/package-cache github://Metacello/metacello:configuration ERROR: 'GoferRepositoryError: ZipArchive cannot find EOCD position in /tmp/github-Metacellometacelloconfiguration.zip' There is a file in /tmp that is probably corrupt: bash-4.4$ ls -l /tmp/github-Metacellometacelloconfiguration.zip - -rw-r--r-- 1 stes users 845 Nov 27 10:58 /tmp/github-Metacellometacelloconfiguration.zip When trying to unzip that file from the UNIX command line: bash-4.4$ unzip github-Metacellometacelloconfiguration.zip Archive: github-Metacellometacelloconfiguration.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. I'll have to give this issue a try under a different SqueakVM. Perhaps it's just not working, I suspect issues as the gemsource method, are crossplatform bugs. Anyway - despite the above - I can continue, and I can load Metacello, and even Seaside #release 3.1. Loading Seaside #release 3.1 by Metacello works. Remember that I had to fix the URL in the Installer gemsource method. I changed the gemsource message to use the URL: gemsource.com changed to gemtalksystems.com I suspect such a change clearly must be indicating a cross-platform bug. So perhaps it has not been tested for a long time with Squeak 4. Or Squeak 4.6 is simply not supported by the Seaside folks. They have an old Seaside 2.6, 2.7, 2.8 on their github site, but I don't immediately see instructions for the 2.x, everything is about Seaside3. Perhaps Seaside 2.x had better support for Squeak 4. Regards, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfwSY7AAoJEAwpOKXMq1MaoVwH/R8W0wNz0HE0hiJNW70/QzvG KzliKzWWhneDbnoNpQwm4aNPbW8Vqv/DpEwGIIYGuhVceuspwzpXTqcyA0bJY55J uVe5tAtVvM/FwDnZOQaPXlv4GhdjuLAVrGQ6PPNRL1auMR30gWTO/dq/ctoEycum Iz62am1p9Gfe0kgsHUwzuO/r8ceg95EOfGEmdrkBxUJG6J6+2aZKqh8/zqUjYnVf RvGHSSxmUk8MzYhFrPg4O9CADMDGG8569nY06IYFVwMv81uM7grlnrslGa5h8iDp S7P8SQccUp37okG0Kc4tfrM9TwoQminBp0oocDIT9emCxCXVWxJ/K6SJ54V/49o= =prFY -----END PGP SIGNATURE----- From stes at telenet.be Fri Nov 27 18:33:19 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Fri, 27 Nov 2020 19:33:19 +0100 (CET) Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1814705286.36263491.1606493924682.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> <2038538025.32018921.1606411938700.JavaMail.zimbra@telenet.be> <1814705286.36263491.1606493924682.JavaMail.zimbra@telenet.be> Message-ID: <264866281.36990645.1606501999342.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 In the "Squeak-4.6-All-in-One.app" I can see the same problem on Microsoft Windows: First it is necessary to change/update: gemsource ^ self monticello http: 'http://seaside.gemtalksystems.com/ss' This by itself is already extremely suspicious, as it shows that the Squeak4.6 image has an incorrect URL for gemstone (gemsource). Next: "Load the Preview version of Metacello from GitHub" (Smalltalk at: #Metacello) new configuration: 'MetacelloPreview'; version: #stable; repository: 'github://Metacello/metacello:configuration'; load. results also on Microsoft Windows in : Could not resolve: ConfigurationOfMetacelloPreview [ConfigurationOfMetacelloPreview] in C:\Users\stes\squeak\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One.app\Contents\Resources\package-cache github://Metacello/metacello:configuration ERROR: 'GoferRepositoryError: can''t find EOCD position' This is with the following VM: Image - ----- C:\Users\stes\squeak\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One.app\Contents\Resources\Squeak4.6-15102.image Squeak4.6 latest update: #15117 Current Change Set: Unnamed1 Image format 6505 (32 bit) Virtual Machine - --------------- C:\Users\stes\squeak\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One\Squeak-4.6-All-in-One.app\Contents\LinuxAndWindows\Squeak.exe Croquet Closure Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1405] Win32 built on Jul 6 2015 15:45:27 PDT Compiler: 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) platform sources revision VM: r3397 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2015-07-06 11:56:39 -0700 Plugins: r3347 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins CoInterpreter VMMaker.oscog-eem.1405 uuid: 7aff388a-73ba-4202-bb5a-72b0759ff46b Jul 6 2015 StackToRegisterMappingCogit VMMaker.oscog-eem.1401 uuid: 036f0933-639a-49dd-8a1d-a03bcdcb0a0a Jul 6 2015 So basically it seems the current Metacello *CAN* be used with Squeak4.6, but there are some issues with it. Perhaps an older Metacello should be used with Squeak 4.6 ... However the instructions at https://github.com/Metacello/metacello#squeak-older-than-squeak52 seem to imply that it should work on "older than Squeak 5.2", unless the Metacello authors mean by that on Squeak 5.0 and 5.1 (excluding older than 5.0 for example). David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfwUYmAAoJEAwpOKXMq1MaJ68H/34grmdlZLGWdOkL4J35sOH7 xxbfpE5bU7X8uxYuzjh8AWgolrh+RzrrIHVy2IsiBvS0qIvxmB9sMGIzk7+3eyMU ircVVA40LUWjTJHQY6iw2lDQUoxifxaUPG66zV+JjxcWA9G3hN+TP9dF0JygxJWA xM5dbO/SRS8Ay43UBQQ4tTLasdekD55+I5+qcaX5WsV13gd7UGNYiB/WJiCt/9qn RODu5eWYSHcEKzjyPBYbhd6phDtr/U1Vrv9TgJpda6kHumLSInIJEt++Gi4yPYz7 CFp9wfFYsgoXy3IMo+T0Pg3KEHbizdvdfQHsChi6yzo/v8Jfv4AxnrfOn7pzyug= =Zfcd -----END PGP SIGNATURE----- From frank-lesser at lesser-software.com Sat Nov 28 11:39:14 2020 From: frank-lesser at lesser-software.com (Frank Lesser) Date: Sat, 28 Nov 2020 12:39:14 +0100 Subject: [squeak-dev] [OffTopic] resume of DNG after a decade In-Reply-To: <7e328b44-0a94-cc0d-88ed-d97464b57ff0@lesser-software.com> References: <1584971006315-0.post@n4.nabble.com> <4e8e180c-48e5-d703-2797-5310e35c090f@gmail.com> <66aadeabcca04da9b98e008f92d4f315@student.hpi.uni-potsdam.de> <1605889979781-0.post@n4.nabble.com> <369888da-e220-6f0e-a96d-ecc9d0b4c21b@lesser-software.com> <20201123142017.GA64854@shell.msen.com> <99dd56ce-8098-c382-1574-d708a91a8c93@lesser-software.com> <7e328b44-0a94-cc0d-88ed-d97464b57ff0@lesser-software.com> Message-ID: <6add8c19-9b38-c8b0-056c-9181d3ddeda2@lesser-software.com> I have posted a screenshot of current DNG progress on my twitter @LesserFrank From stes at telenet.be Sun Nov 29 15:43:10 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 29 Nov 2020 16:43:10 +0100 (CET) Subject: [squeak-dev] [ANN] DoItFirst command line goodie on SqueakSource Message-ID: <2082661127.42527248.1606664590924.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Nice utility. It provides a workaround or solution to Transcript redirectToStdOut not working (or not working robustly). $ cat headless-hello.sq TranscriptStream redirectToStdOut. Transcript show:'hello world'. Smalltalk quitPrimitive $ squeak -headless squeak.image headless-hello.sq For some reason the above prints no output in squeak-4. I believe that I tested it on older Squeak versions (version 3?) and there, redirectToStdout worked. Or perhaps in some versions I notice that it sometimes seems to print on stdout and sometimes not. But anyway the DoItFirst package and its -evaluate on the other hand, uses "Filestream stdout" and seems to work better; it depends on the asString message (it sends asString to the argument that is being evaluated). $ squeak -headless squeak.image -- -evaluate "#'hello world'" hello world $ squeak -headless squeak.image -- -evaluate "Smalltalk imageFormatVersion" 6504 In any case this provides a mechanism for batch oriented processing. Thanks, David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfw8EKAAoJEAwpOKXMq1MaPPMH/Av2+4xVDKutBXZBlfvUbx1c o6Z9OuVhvtnMdIPU19fIy0o4347V0AqKNrxFJz1MQaF05ZBu7a9hXf3+qsF6pkTY xfNRRd8sIYajGrad9bjPjPotMFJKn+pYFdg7Tp/IKc4yXv9x+kzPJRCRqtlM94qH m91zcW1vK6yqNWxeS0FBvpSXpNgxTP0aOw4myzb0VzXB/Tge9BS2QOfQi4NIx/0O p8Nqumvo0YJA30Fvvrz163Dng8LeH97yfeh1q1DXp987Ys5Sa5pfboy2CWjiWqsS T9thHiZa0wt2KZoB8m2WUdT2wXKv+uYRmYvx6Wh4d5vfST1Ql774pE+0uRGXBdE= =quQK -----END PGP SIGNATURE----- From stes at telenet.be Sun Nov 29 15:46:40 2020 From: stes at telenet.be (stes@PANDORA.BE) Date: Sun, 29 Nov 2020 16:46:40 +0100 (CET) Subject: [squeak-dev] is http://seaside.gemstone.com/ss down ? In-Reply-To: <1903529676.27663421.1606318065655.JavaMail.zimbra@telenet.be> References: <1903529676.27663421.1606318065655.JavaMail.zimbra@telenet.be> Message-ID: <1048051202.42533317.1606664800285.JavaMail.zimbra@telenet.be> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 The answer to this question is in the Git changelogs of "metacello"; it can be found with git log in the Metacello git sources: date '29 July 2014' time '2:06: 12.123 pm' author 'tfel' ancestors ((name 'ConfigurationOfMetacello-dkh.796' mes sage 'Convert repository urls from seaside.gemstone.com to seaside.gemtalksystem s.com' So the Squeak4.6 image could also convert the URL in the gemsource method from seaside.gemstone.com to seaside.gemtalksystems.com ... In the Squeak4.6 image the old URL is still being used. On the other hand perhaps it's better to keep it as it was, as this is the consequence of an incompatible change at the gemstome side. David Stes -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJfw8I+AAoJEAwpOKXMq1MaO/UIAJeiTmsZGk/XwzX6mlfxNN9I aNSblMYw8tK2ncUNPTZ6/AcG5aPIt+BSe5vc0cATDwKPevNOJ9OIesHo59rFv5Vg vfPq/hLCXAZpBWc8TjeyWUHRO4ctrI5dllP5JUc+1R+93w6dI+NL+98JBWmVP4An afTWlD8Wh9t9uQfokduNd4jAUbW39nrnGgt6R1xy9xg3EgRUdrpUApu/wzpjLQOv 1igeIrOD/hzVhn+JFHnLQPWjI6wHmAalCzIS0UUPS6FDooEttSwY9dDHbCPMud1X ZxDkX8D8PKXtJqsvo32uRAGc7ZfJcmErTSMkSihk0JzUQ99c3SfPTcdzXQX1rWU= =Mpsm -----END PGP SIGNATURE----- From commits at source.squeak.org Sun Nov 29 18:24:52 2020 From: commits at source.squeak.org (commits at source.squeak.org) Date: Sun, 29 Nov 2020 18:24:52 0000 Subject: [squeak-dev] The Trunk: Files-eem.184.mcz Message-ID: Eliot Miranda uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-eem.184.mcz ==================== Summary ==================== Name: Files-eem.184 Author: eem Time: 29 November 2020, 10:24:50.876717 am UUID: 453a229c-9b4d-4acb-b8ba-c0688fc17020 Ancestors: Files-pre.183 Add a guard to FileDirectory class>>requestDropDirectory:. Every time I connect my headphone buds I get an MNU because primDropRequestFileName: answers nil. This squashes the MNU. =============== Diff against Files-pre.183 =============== Item was changed: ----- Method: FileDirectory class>>requestDropDirectory: (in category 'dnd requests') ----- requestDropDirectory: dropIndex + ^(FileStream primDropRequestFileName: dropIndex) ifNotNil: + [:dropFileDirdectoryName| | potentialDirectory | + potentialDirectory := self on: dropFileDirdectoryName. + potentialDirectory exists ifTrue: [potentialDirectory]]! - | potentialDirectory | - potentialDirectory := self on: (FileStream primDropRequestFileName: dropIndex). - ^ potentialDirectory exists ifTrue: [potentialDirectory] - ! From lewis at mail.msen.com Sun Nov 29 18:52:23 2020 From: lewis at mail.msen.com (David T. Lewis) Date: Sun, 29 Nov 2020 13:52:23 -0500 Subject: [squeak-dev] GoferRepositoryError: can''t find EOCD position In-Reply-To: <1814705286.36263491.1606493924682.JavaMail.zimbra@telenet.be> References: <1842565895.27803179.1606320473512.JavaMail.zimbra@telenet.be> <1915405316.30151438.1606382356541.JavaMail.zimbra@telenet.be> <2038538025.32018921.1606411938700.JavaMail.zimbra@telenet.be> <1814705286.36263491.1606493924682.JavaMail.zimbra@telenet.be> Message-ID: <20201129185223.GA15275@shell.msen.com> On Fri, Nov 27, 2020 at 05:18:44PM +0100, stes at PANDORA.BE wrote: > > In the Squeak 4.5 #15117 image, under Browser->ZipArchive->readFrom: > > eocdPosition <= 0 ifTrue: [self error: 'can''t find EOCD position']. > > Under "Versions" it is indicated: > > nk 12/06/2002 17:09 ZipArchive readFrom: {reading} > > In the Squeak6.0alpha #20077 image, ZipArchive readFrom: has under "Versions": > > dtl 9/28/2017 20:31 ZipArchive readFrom: {reading} > > So I just copy paste that implementation into the 4.6 image and accept it. > > If there is a better way to do it, I would be interested to learn about it. > Perhaps there is a clever way to file in methods from a different image. > There are a few ways to move a method from one image to another. One way is to file method out to disk, then file it back in to the other image. If you highlight the method in a browser and right click it, the menu will give you a fileOut option. Then, from the other image, you can locate the file in a file list browser, highlight the file (look for files ending in '.st'), and use the 'fileIn entire file" menu option to load it. If you are using Monticello, you can file in individual methods from a package, which is often helpful if you are looking for a specific version from some MC package. But for a simple approach that always works for practically any image, it's hard to beat the old-fashioned fileOut / fileIn approach. HTH, Dave From calmosoft at gmail.com Mon Nov 30 14:26:28 2020 From: calmosoft at gmail.com (CalmoSoft) Date: Mon, 30 Nov 2020 08:26:28 -0600 (CST) Subject: [squeak-dev] New Squeak version Message-ID: <1606746388409-0.post@n4.nabble.com> Hello All, When will be the next Squeak version? There is no one for two weeks. Have a nice time and work. Greetings, Gal zsolt (~ CAlmoSoft ~) ----- calmosoft at gmail.com -- Sent from: http://forum.world.st/Squeak-Dev-f45488.html