From asqueaker at gmail.com Thu Sep 1 03:37:10 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Sep 1 03:37:53 2016 Subject: [squeak-dev] The Trunk: System-cmm.913.mcz In-Reply-To: References: Message-ID: Hi Tobias, > Where's the problem with calling the image with 'patch.st' in the first place? Per our other conversation in box-admins, I want to control the RFB configuration from the Linux side. Once the server image builds itself and saved once, it is never saved again. If we can't save the image, how to do a quick-patch? In today's SqueakSource, we RFB into the image, make the method changes, save the image. (Shudder). After a week nobody remembers what the heck we're running in production, and its not easy to see even when one gets RFB'd into the image. In this new SqueakSource server setup, the built image is never resaved, so its validity could actually be easily confirmed with a hashsum. The image is never resaved, but could still suffer a daemontools restart, in which case the patch must be reapplied automatically. This is done by the administrator exporting the method changes as patch.st, instead of saving the image. > It looks a little bit out of place for me here. It should be private. I'll do that. > Also, Why Kill MNU and Halt from the list? MNU is covered by Error. Halt because its sometimes necessary to use it to diagnose and fix a production problem. Best, Chris From Das.Linux at gmx.de Thu Sep 1 06:05:39 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Sep 1 06:05:44 2016 Subject: [squeak-dev] The Trunk: System-cmm.913.mcz In-Reply-To: References: Message-ID: <92B214AA-5DA7-45D5-89D9-A9D17566F3B1@gmx.de> On 01.09.2016, at 05:37, Chris Muller wrote: > Hi Tobias, > >> Where's the problem with calling the image with 'patch.st' in the first place? > > Per our other conversation in box-admins, I want to control the RFB > configuration from the Linux side. Once the server image builds > itself and saved once, it is never saved again. I still do not get this. > > If we can't save the image, how to do a quick-patch? In today's > SqueakSource, we RFB into the image, make the method changes, save the > image. (Shudder). After a week nobody remembers what the heck we're > running in production, and its not easy to see even when one gets > RFB'd into the image. > > In this new SqueakSource server setup, the built image is never > resaved, so its validity could actually be easily confirmed with a > hashsum. > > The image is never resaved, but could still suffer a daemontools > restart, in which case the patch must be reapplied automatically. > This is done by the administrator exporting the method changes as > patch.st, instead of saving the image. Well, then we should write the startup script in a manner that it always is started with a script, which _then_ gets amended outside[1]. IMHO, The hook is providing a script in the first place, not relying a magic constant file name. > >> It looks a little bit out of place for me here. > > It should be private. I'll do that. > >> Also, Why Kill MNU and Halt from the list? > > MNU is covered by Error. Halt because its sometimes necessary to use > it to diagnose and fix a production problem. Yeah, but to my knowledge, run: has up to now be intended for non-interacive use. _Not_ catching Halt defeats this purpose. Best regards -Tobias > > Best, > Chris > [1]: I am still not comfortable with dropping on the image concept just like that :( From Marcel.Taeumel at hpi.de Thu Sep 1 07:59:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Sep 1 08:02:09 2016 Subject: [squeak-dev] Re: The Trunk: System-cmm.913.mcz In-Reply-To: References: Message-ID: <1472716782746-4913539.post@n4.nabble.com> Hi Chris, here are some thoughts on this commit: - Please refrain from committing unrelated changes that are easily to separate. If you have troubles uploading the 1000K MCZ for the System package twice, consider upgrading your ISP. :-) *scnr* - That "patch.st" hack seems like an indication that there are several situations where you cannot cope with the .image characteristics of the Smalltalk system. Please think about a better solution because the .image file should usually not be read-only. It impedes Smalltalk-style maintenance of such an image. While there have been good reasons in the past for treating the .image in the Etoys bundles as read-only and relying on project import/explort, I do not agree that we should make such a specific case common practice. This "patch.st" feels like a first step towards yet another CI/build system, which we already have with smalltalkCI and TravisCI. - This commit message would benefit from a little more explanation. There is plenty "what you did" but too little "why you did it". For example, the words "... to be re-patched in the event of a restart" really need an explanation of why you cannot just supply a start-up script to do that patching like "./vm some.image patch.st". Please invest more time in more elaborate commit messages. :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-cmm-913-mcz-tp4913525p4913539.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu Sep 1 08:03:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu Sep 1 08:06:17 2016 Subject: [squeak-dev] Re: EToys in the Trunk In-Reply-To: References: Message-ID: <1472717032663-4913540.post@n4.nabble.com> Levente Uzonyi wrote > Hi All, > > With the recent updates, we have the full EToys package in the Trunk, > which has more than 78k LoC. That's almost 1.5x what Morphic has, and > it's more than Kernel, System and Collections together. > > Do we want to keep it in the Trunk? > > Levente Hi Levente, the Etoys package has been in the Trunk for quite some time. We should keep around until we factored out the last bit of Etoys code from the base system into the Etoys package. Having it in the Trunk, simplifies this refactoring process a lot. In general, I am not a fan of "argument-by-LoC". :-) Those 78k LoC have their own package, so that's fine. Best, Marcel -- View this message in context: http://forum.world.st/EToys-in-the-Trunk-tp4913502p4913540.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Sep 1 08:15:14 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 1 08:15:18 2016 Subject: [squeak-dev] Re: Does anyone recognize this glitch in our trunk update processing? (was: [Vm-dev] buildspurtrunkvmmakerimage.sh fails on Mac) In-Reply-To: References: <20160823020351.GA13829@shell.msen.com> <1471944106453-4912305.post@n4.nabble.com> <1472014917638-4912402.post@n4.nabble.com> <1472015217513-4912403.post@n4.nabble.com> Message-ID: On Thu, Sep 1, 2016 at 12:33 AM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > The copy is not completely clean because this assertion then fails: > > (SystemProgressMorph superclass subclasses detect: [:e | e name = > #SystemProgressMorph]) == SystemProgressMorph > > IOW, the superclass is still pointing to the old class, so any change to > superclass layout won't propagate to the new subclass... Bad. > > But there's also this possibility: > > | oldClass | > oldClass := SystemProgressMorph copy become: SystemProgressMorph. > SystemProgressMorph allInstancesDo: [:e | oldClass adoptInstance: e]. > > We mutate all the instances to a class detached from Smalltalk and immune > to some changes... > Beware: don't you modify the layout of one superclass... > +1 > > 2016-09-01 1:17 GMT+02:00 Nicolas Cellier gmail.com>: > >> Due to read only ClassBinding it would be just a little bit more hackish: >> >> (Smalltalk globals associationAt: #SystemProgressMorph) instVarAt: 2 put: >> SystemProgressMorph copy. >> >> 2016-09-01 1:12 GMT+02:00 Nicolas Cellier > l.com>: >> >>> Or would this even more simple hack work? Put in the preamble something >>> like: >>> >>> Smalltalk at: SystemProgressMorph put: SystemProgressMorph copy. >>> >>> This way, the old instances should not be mutated... >>> >>> 2016-08-24 7:06 GMT+02:00 marcel.taeumel : >>> >>>> marcel.taeumel wrote >>>> > >>>> > Bert Freudenberg wrote >>>> >> On Tue, Aug 23, 2016 at 11:21 AM, marcel.taeumel < >>>> >>>> >> Marcel.Taeumel@ >>>> >>>> >> > >>>> >> wrote: >>>> >> >>>> >>> >>>> >>> Hi, there. >>>> >>> >>>> >>> It is, unfortunately, not possible to turn back time and rewrite >>>> >>> history. >>>> >>> ;-) >>>> >>> >>>> >> >>>> >> ... unless we're dealing with software. Oh wait, we are ;) >>>> >> >>>> >> There is several important code that makes excessive use of instVar >>>> >>> accesses such as in SystemProgressMorph or HandMorph. Making any >>>> change >>>> >>> in >>>> >>> their class layout while using some of their methods will provoke a >>>> >>> strange >>>> >>> error. This could only be changed by a VM that keeps old class >>>> >>> layouts/schemata around for some longer time until there is no old >>>> >>> compiled >>>> >>> method on any stack anymore. >>>> >> >>>> >> >>>> >> Class layout changes and instance migration is handled fully in the >>>> image >>>> >> by class ClassBuilder. The VM is not at fault here. >>>> >> >>>> >> >>>> >>> Usually, restarting the update process helps here. There is no way >>>> to >>>> >>> fix >>>> >>> that in order to interactively update from 5.0 to 5.1 without any >>>> >>> errors. >>>> >>> >>>> >> >>>> >> We can retroactively change the config map that introduced the >>>> problem. >>>> >> I'm >>>> >> certain it would be possible to fix, but I am not entirely sure it's >>>> >> worth >>>> >> the trouble. >>>> >> >>>> >> - Bert - >>>> > Hi Bert, >>>> > >>>> > the config map will not help, we would have to change numerous MCZs >>>> since >>>> > point X in time to rewrite history. :) "Oh, would we have always been >>>> > using accessors here instead of instVar accessess..." >>>> > >>>> > Best, >>>> > Marcel >>>> >>>> ...even then, how do you update the code in image Y, which is going to >>>> be >>>> updated before it is updated? This is not even possible for every user's >>>> images out there... :-/ >>>> >>>> The Java Hotspot VM has a mapping table for changed instVar accesses. >>>> Maybe >>>> we could use this trick, too? Still, would only applies to future >>>> versions. >>>> We cannot rewrite history because it is not only one piece of software >>>> in a >>>> single version control system with a single version checked out. :) >>>> >>> Putting more brittle stuff into he VM is not the solution. We have all that we need above the VM that can be dynamically tailored to suit our needs. Can we not put the progress morph in its own process, making it easier to tear down and restart? > >>>> Best, >>>> Marcel >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://forum.world.st/Re-Does- >>>> anyone-recognize-this-glitch-in-our-trunk-update-processing- >>>> was-Vm-dev-buildspurtrunkvmmaker-tp4912130p4912403.html >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>>> >>> _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160901/d29daefc/attachment.htm From hannes.hirzel at gmail.com Thu Sep 1 08:41:18 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 1 08:41:21 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: <2F5AF09F-ABD5-47BC-927E-6C529D202105@rowledge.org> References: <2F5AF09F-ABD5-47BC-927E-6C529D202105@rowledge.org> Message-ID: On 9/1/16, tim Rowledge wrote: > I suspect that like a lot of us I?m conflicted about having something large > like EToys included. > > In one sense it?s an important project that needs to be constantly kept up > to date and that is best done by having it always there so that anyone > refactoring code can?t help but find the EToys code that needs to be > updated. Of course, that?s the same argument one might make for Scratch, Maybe Scratch could be included as well temporarily to benefit from the same refactoring treatment ....... > Magma, all the games, VMMaker and so on. > > On the other hand, it ?s obviously ridiculous to have all this stuff in a > basic development image and anyone would mad to include so much waste of > space nonsense. > > So obviously what we really need is a better system for dealing with this. I > don?t know what that might be. The 'least unlikely to screw us? approach > would seem to be having a lot of this in the general development image and > make sure it is kept properly unload-able (autocorrect tried to make that > ?unlovable? which seems oddly appropriate) for any deployment usage (like > for example Scratch and indeed EToys). > > A more complicated idea (and we all love complex cool tools, right?) might > be an extension of Chris? history database that includes all the code of all > the packages (hey, slurp in all of squeaksource and so on! Stress Magma!) > and when changing code in your image it checks also in the Great Database Of > All Things. Must be a PhD or two in that , surely? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Maybe Computer Science should be in the College of Theology > > > > From commits at source.squeak.org Thu Sep 1 09:00:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 1 09:00:48 2016 Subject: [squeak-dev] The Inbox: EToys-jl.230.mcz Message-ID: A new version of EToys was added to project The Inbox: http://source.squeak.org/inbox/EToys-jl.230.mcz ==================== Summary ==================== Name: EToys-jl.230 Author: jl Time: 1 September 2016, 10:59:46.740946 am UUID: 06b0aa06-1a5f-f64b-a0fa-d9b063894041 Ancestors: EToys-jl.226, EToys-nice.229 merged again =============== Diff against EToys-jl.226 =============== Item was changed: ----- Method: ChessBoard class>>initializeHashKeys (in category 'class initialization') ----- initializeHashKeys "ChessGame initialize" | random | HashKeys := Array new: 12. 1 to: HashKeys size do:[:i| HashKeys at: i put: (WordArray new: 64)]. HashLocks := Array new: 12. 1 to: HashLocks size do:[:i| HashLocks at: i put: (WordArray new: 64)]. random := Random seed: 23648646. 1 to: 12 do:[:i| 1 to: 64 do:[:j| + (HashKeys at: i) at: j put: (random nextInt: 16r3FFFFFFF "SmallInteger maxVal on 32bits VM")- 1. + (HashLocks at: i) at: j put: (random nextInt: 16r3FFFFFFF "SmallInteger maxVal on 32bits VM") - 1. - (HashKeys at: i) at: j put: (random nextInt: SmallInteger maxVal) - 1. - (HashLocks at: i) at: j put: (random nextInt: SmallInteger maxVal) - 1. ]. ]. ! Item was changed: ----- Method: KedamaExamplerPlayer>>containsSequentialSelector: (in category '*Etoys-Squeakland-private') ----- containsSequentialSelector: aSymbol + ^ (#(random random: atRandom) includes: aSymbol)! - ^ (#(random random:) includes: aSymbol)! Item was changed: ----- Method: KedamaMorph>>dimensions: (in category 'accessing') ----- dimensions: anExtent dimensions := anExtent. wrapX := dimensions x asFloat. wrapY := dimensions y asFloat. patchVarDisplayForm := Form extent: dimensions depth: 32. patchesToDisplay ifNotNil: [ patchesToDisplay do: [ :ea | ea newExtent: anExtent. ]. ]. self pixelsPerPatch: self pixelsPerPatch.! Item was changed: ----- Method: KedamaMorph>>drawTurtlesOnForm: (in category 'drawing') ----- drawTurtlesOnForm: aForm turtlesToDisplay do: [:exampler | (self isVisible: exampler) ifTrue: [ turtlesDictSemaphore critical: [ exampler turtles drawOn: aForm. + ] ifLocked: [] - ]. ]. ]. ! Item was changed: ----- Method: KedamaTurtleMethodAttributionDefinition2 class>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category 'rules') ----- determineStatementType: parentStmtType fromDict: dict primaryBreedPair: myPrimaryBreedPair messageType: myMessageType isStatement: myIsStatement receiverObject: myReceiverObject | vectorTurtle turtleSelectors participants reads writes unknownReceiverSelectors | "Do the calculation only at the statement level." myIsStatement ifFalse: [^ parentStmtType]. "If there is a doSequentially: block, the block is sequential." participants := dict at: self. (participants select: [:e | (e first notNil and: [e first isPrototypeTurtlePlayer])]) size = 0 ifTrue: [^ #none]. myMessageType = #sequential ifTrue: [^ #sequential]. parentStmtType = #sequential ifTrue: [^ #sequential]. "If there is not turtle involved in the statement, it is not transformed." myPrimaryBreedPair ifNil: [^ #none]. vectorTurtle := myPrimaryBreedPair first. myMessageType = #condition ifTrue: [ reads := IdentitySet new. writes := IdentitySet new. participants do: [:list | (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) ~= #read]) ifTrue: [list first ifNotNil: [writes add: list first]]. (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) = #read]) ifTrue: [list first ifNotNil: [reads add: list first]]. ]. ((writes intersection: reads) copyWithout: vectorTurtle) ifNotEmpty: [ ^ #sequential ]. ^ #parallel. ]. reads := IdentitySet new. writes := IdentitySet new. turtleSelectors := OrderedCollection new. unknownReceiverSelectors := OrderedCollection new. participants do: [:list | list first = vectorTurtle ifTrue: [ ((vectorTurtle isBreedSelector: list second) or: [ (vectorTurtle isUserDefinedSelector: list second)]) ifFalse: [ turtleSelectors add: list second ]. ]. list first ifNil: [unknownReceiverSelectors add: list second] ifNotNil: [ ((list at: 4) == #read) ifTrue: [reads add: list first]. ((list at: 4) == #read) ifFalse: [writes add: list first]. ]. (vectorTurtle containsSequentialSelector: list second) ifTrue: [^ #sequential]. ]. (turtleSelectors includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [myReceiverObject = vectorTurtle]) and: [vectorTurtle isBreedSelector: self property property]) ifTrue: [^ #none]. (vectorTurtle areOkaySelectors: unknownReceiverSelectors) ifFalse: [ ^ #sequential. ]. (vectorTurtle vectorizableTheseSelectors: turtleSelectors) ifFalse: [^ #sequential]. ((reads intersection: writes) copyWithout: vectorTurtle) ifNotEmpty: [^ #sequential]. + + "Check the hard way. If any leaf nodes" + self nodesDo: [:node | + (node isMessageNode and: [vectorTurtle containsSequentialSelector: node selector]) + ifTrue: [^ #sequential]]. + ^ #parallel. ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>test:ifTrue:ifFalse: (in category 'command execution') ----- test: cond ifTrue: trueBlock ifFalse: falseBlock + | origPredicate c actualCond | - | origPredicate c | (cond == true or: [cond == false]) ifTrue: [ ^ cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. ]. + actualCond := cond. + cond isBlock ifTrue: [ + actualCond := ByteArray new: predicate size. + 1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])] + ]. origPredicate := predicate clone. + predicate bytesAnd: actualCond. - predicate bytesAnd: cond. trueBlock value: self. + c := actualCond clone. - c := cond clone. c not. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1. predicate bytesAnd: c. falseBlock value: self. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1.! Item was changed: ----- Method: KedamaVectorParseTreeRewriter>>visit:andParent: (in category 'entry point') ----- visit: node andParent: parent | newNode possibleSelector selIndex parentRewriterBlock newNodeBlock | node isLeaf not ifTrue: [ node getAllChildren do: [:child | self visit: child andParent: node. ]. ]. (node rewriteInfoOut notNil) ifTrue: [ ((node isMemberOf: VariableNode) or: [node isMemberOf: LiteralVariableNode]) ifTrue: [ newNode := TempVariableNode new name: node rewriteInfoOut second index: 0 type: 2. parent replaceNode: node with: newNode. ]. ]. (node isMemberOf: MessageNode) ifTrue: [ (node statementType = #sequential) ifTrue: [ node selector key = #doSequentialCommand: ifTrue: [ (node isStatement) ifTrue: [ node receiver: node primaryBreedPair second. ]. ] ]. ]. (node isMemberOf: MessageNode) ifTrue: [ newNodeBlock := [:selector :args | self createMessageNode: node inParentNode: parent receiverNode: (TempVariableNode new name: node rewriteInfoOut second index: 0 type: 2) selector: selector arguments: args]. ((selIndex := #(parallel sequential die) indexOf: node statementType) > 0) ifTrue: [ possibleSelector := #(doCommand: doSequentialCommand: doDieCommand:) at: selIndex. parentRewriterBlock := [:newNod | self rewriteMessageNode: node inParentNode: parent receiverNode: node rewriteInfoIn second selector: possibleSelector arguments: {self makeBlockNodeArguments: {node rewriteInfoOut second} statements: {newNod} returns: false}]. (node messageType = #condition) ifTrue: [ newNode := newNodeBlock value: #test:ifTrue:ifFalse: + value: {BlockNode withJust: node receiver. node arguments first. node arguments second}. - value: {node receiver. node arguments first. node arguments second}. (node isStatement) ifFalse: [ parent replaceNode: node with: newNode. ] ifTrue: [ parentRewriterBlock value: newNode. ]. ] ifFalse: [ node selector key = #timesRepeat: ifTrue: [ newNode := newNodeBlock value: #times:repeat: value: {node receiver. node arguments first}. (node isStatement) ifFalse: [ parent replaceNode: node with: newNode. ] ifTrue: [ parentRewriterBlock value: newNode. ]. ] ifFalse: [(node isStatement) ifTrue: [ parentRewriterBlock value: node ]. ]. ] ]. ]. (node isMemberOf: BlockNode) ifTrue: [ (node rewriteInfoOut notNil) ifTrue: [ self rewriteBlockNode: node inParentNode: parent arguments: (Array with: (TempVariableNode new name: node rewriteInfoOut second index: 0 type: 2)) statements: node statements returns: false. ]. ]. ! Item was changed: ----- Method: MessageAsTempNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 | t7 t8 t9 t10 t11 t13 | t5 ifFalse: [^ t1]. t9 := t2 at: self. (t9 select: [:t14 | t14 first notNil and: [t14 first isPrototypeTurtlePlayer]]) size = 0 ifTrue: [^ #none]. t4 = #sequential ifTrue: [^ #sequential]. t1 = #sequential ifTrue: [^ #sequential]. t3 ifNil: [^ #none]. t7 := t3 first. t4 = #condition ifTrue: [t11 := IdentitySet new. t13 := IdentitySet new. t9 do: [:t14 | (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) ~= #read]) ifTrue: [t14 first ifNotNil: [t13 add: t14 first]]. (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) = #read]) ifTrue: [t14 first ifNotNil: [t11 add: t14 first]]]. ((t13 intersection: t11) copyWithout: t7) ifNotEmpty: [^ #sequential]. ^ #parallel]. t11 := IdentitySet new. t13 := IdentitySet new. t8 := OrderedCollection new. t10 := OrderedCollection new. t9 do: [:t14 | t14 first = t7 ifTrue: [((t7 isBreedSelector: t14 second) or: [t7 isUserDefinedSelector: t14 second]) ifFalse: [t8 add: t14 second]]. t14 first ifNil: [t10 add: t14 second] ifNotNil: [(t14 at: 4) == #read ifTrue: [t11 add: t14 first]. (t14 at: 4) == #read ifFalse: [t13 add: t14 first]]. (t7 containsSequentialSelector: t14 second) ifTrue: [^ #sequential]]. (t8 includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [t6 = t7]) and: [t7 isBreedSelector: self property property]) ifTrue: [^ #none]. (t7 areOkaySelectors: t10) ifFalse: [^ #sequential]. (t7 vectorizableTheseSelectors: t8) ifFalse: [^ #sequential]. ((t11 intersection: t13) copyWithout: t7) ifNotEmpty: [^ #sequential]. + self + nodesDo: [:t14 | (t14 isLeaf + and: [t7 containsSequentialSelector: t14 key]) + ifTrue: [^ #sequential]]. ^ #parallel! Item was changed: ----- Method: MessageNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 | t7 t8 t9 t10 t11 t13 | t5 ifFalse: [^ t1]. t9 := t2 at: self. (t9 select: [:t14 | t14 first notNil and: [t14 first isPrototypeTurtlePlayer]]) size = 0 ifTrue: [^ #none]. t4 = #sequential ifTrue: [^ #sequential]. t1 = #sequential ifTrue: [^ #sequential]. t3 ifNil: [^ #none]. t7 := t3 first. t4 = #condition ifTrue: [t11 := IdentitySet new. t13 := IdentitySet new. t9 do: [:t14 | (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) ~= #read]) ifTrue: [t14 first ifNotNil: [t13 add: t14 first]]. (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) = #read]) ifTrue: [t14 first ifNotNil: [t11 add: t14 first]]]. ((t13 intersection: t11) copyWithout: t7) ifNotEmpty: [^ #sequential]. ^ #parallel]. t11 := IdentitySet new. t13 := IdentitySet new. t8 := OrderedCollection new. t10 := OrderedCollection new. t9 do: [:t14 | t14 first = t7 ifTrue: [((t7 isBreedSelector: t14 second) or: [t7 isUserDefinedSelector: t14 second]) ifFalse: [t8 add: t14 second]]. t14 first ifNil: [t10 add: t14 second] ifNotNil: [(t14 at: 4) == #read ifTrue: [t11 add: t14 first]. (t14 at: 4) == #read ifFalse: [t13 add: t14 first]]. (t7 containsSequentialSelector: t14 second) ifTrue: [^ #sequential]]. (t8 includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [t6 = t7]) and: [t7 isBreedSelector: self property property]) ifTrue: [^ #none]. (t7 areOkaySelectors: t10) ifFalse: [^ #sequential]. (t7 vectorizableTheseSelectors: t8) ifFalse: [^ #sequential]. ((t11 intersection: t13) copyWithout: t7) ifNotEmpty: [^ #sequential]. + self + nodesDo: [:t14 | (t14 isLeaf + and: [t7 containsSequentialSelector: t14 key]) + ifTrue: [^ #sequential]]. ^ #parallel! Item was added: + ----- Method: Morph>>boundsSignatureHash (in category '*Etoys') ----- + boundsSignatureHash + "Answer a hash value that can be used to see if I've moved or been changed significantly" + ^self boundsInWorld hash + ! Item was changed: ----- Method: SpeechBubbleMorph>>balloon (in category 'accessing') ----- balloon ^balloon ifNil: [ | balloonForm | + balloonForm := Form extent: (self extent - (0 @ self tailHeight) max: 1@1) depth: 16. - balloonForm := Form extent: self extent - (0 @ self tailHeight) depth: 16. self drawBalloonOn: balloonForm getCanvas in: balloonForm boundingBox. balloonForm floodFill: self color at: balloonForm center. balloon := (SketchMorph withForm: balloonForm). ]! From eliot.miranda at gmail.com Thu Sep 1 09:40:19 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 1 09:40:23 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: References: <2F5AF09F-ABD5-47BC-927E-6C529D202105@rowledge.org> Message-ID: On Thu, Sep 1, 2016 at 9:41 AM, H. Hirzel wrote: > On 9/1/16, tim Rowledge wrote: > > I suspect that like a lot of us I?m conflicted about having something > large > > like EToys included. > > > > In one sense it?s an important project that needs to be constantly kept > up > > to date and that is best done by having it always there so that anyone > > refactoring code can?t help but find the EToys code that needs to be > > updated. Of course, that?s the same argument one might make for Scratch, > > Maybe Scratch could be included as well temporarily to benefit from > the same refactoring treatment ....... > Agreed. Pharo experience shows how many packages get pout of date by not being included in everyday development. I think it would be nice if we can have a build process where we have a fat trunk (seems appropriate) but unload inessentials when prod ing the all-in-one. I'd happily carry some overhead doing trunk development provided unloading is easy and the all-in-one development artefact is readily available. > Magma, all the games, VMMaker and so on. > > > > On the other hand, it ?s obviously ridiculous to have all this stuff in a > > basic development image and anyone would mad to include so much waste of > > space nonsense. > > > > So obviously what we really need is a better system for dealing with > this. I > > don?t know what that might be. The 'least unlikely to screw us? approach > > would seem to be having a lot of this in the general development image > and > > make sure it is kept properly unload-able (autocorrect tried to make that > > ?unlovable? which seems oddly appropriate) for any deployment usage (like > > for example Scratch and indeed EToys). > > > > A more complicated idea (and we all love complex cool tools, right?) > might > > be an extension of Chris? history database that includes all the code of > all > > the packages (hey, slurp in all of squeaksource and so on! Stress Magma!) > > and when changing code in your image it checks also in the Great > Database Of > > All Things. Must be a PhD or two in that , surely? > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > Maybe Computer Science should be in the College of Theology > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160901/876d284a/attachment.htm From bert at freudenbergs.de Thu Sep 1 09:41:30 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Sep 1 09:41:34 2016 Subject: [squeak-dev] Re: Does anyone recognize this glitch in our trunk update processing? (was: [Vm-dev] buildspurtrunkvmmakerimage.sh fails on Mac) In-Reply-To: References: <20160823020351.GA13829@shell.msen.com> <1471944106453-4912305.post@n4.nabble.com> <1472014917638-4912402.post@n4.nabble.com> <1472015217513-4912403.post@n4.nabble.com> Message-ID: On Thursday, 1 September 2016, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > The copy is not completely clean because this assertion then fails: > > (SystemProgressMorph superclass subclasses detect: [:e | e name = > #SystemProgressMorph]) == SystemProgressMorph > > IOW, the superclass is still pointing to the old class, so any change to > superclass layout won't propagate to the new subclass... Bad. > > But there's also this possibility: > > | oldClass | > oldClass := SystemProgressMorph copy become: SystemProgressMorph. > SystemProgressMorph allInstancesDo: [:e | oldClass adoptInstance: e]. > > We mutate all the instances to a class detached from Smalltalk and immune > to some changes... > This is an interesting idea. Basically we want to prevent the existing instances to be migrated to the new class layout when we change the instance variables. One way is what Nicolas suggests, but another would be to just keep the migration from happening in the first place, in ClassBuilder. Could this be a general approach? To never migrate instances that are receivers of a context? They would still be instances of the old (now obsolete) class version. They could even be kept in a weak array to be migrated later, once the contexts are no longer active. The processes could even be restarted to get rid of these contexts. There are other Smalltalks (e.g. GemStone) that even allow different class versions to exist side-by-side. We do have class versions too, but they have only been used for migrating serialized instances when the instance variables did *not* change (which is how the need for migration is normally detected). Hmm, maybe that is actually irrelevant, just ran through my mind ;) So what do you think about delayed migration of instances on the stack? - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160901/6cfda2d3/attachment.htm From leves at caesar.elte.hu Thu Sep 1 10:24:12 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu Sep 1 10:24:17 2016 Subject: [squeak-dev] Re: EToys in the Trunk In-Reply-To: <1472717032663-4913540.post@n4.nabble.com> References: <1472717032663-4913540.post@n4.nabble.com> Message-ID: On Thu, 1 Sep 2016, marcel.taeumel wrote: > Levente Uzonyi wrote >> Hi All, >> >> With the recent updates, we have the full EToys package in the Trunk, >> which has more than 78k LoC. That's almost 1.5x what Morphic has, and >> it's more than Kernel, System and Collections together. >> >> Do we want to keep it in the Trunk? >> >> Levente > > Hi Levente, > > the Etoys package has been in the Trunk for quite some time. We should keep > around until we factored out the last bit of Etoys code from the base system > into the Etoys package. Having it in the Trunk, simplifies this refactoring > process a lot. > > In general, I am not a fan of "argument-by-LoC". :-) Those 78k LoC have > their own package, so that's fine. You seem to ignore the fact that the difference between what was in the Trunk and what is in there now is 50k LoC (comparable to Morphic). If I update my images, they'll grow significantly. If I were to do such a significant change, I'd at least let the community know about it beforehand. Levente > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/EToys-in-the-Trunk-tp4913502p4913540.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From commits at source.squeak.org Thu Sep 1 12:24:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 1 12:24:44 2016 Subject: [squeak-dev] The Inbox: EToys-jl.231.mcz Message-ID: A new version of EToys was added to project The Inbox: http://source.squeak.org/inbox/EToys-jl.231.mcz ==================== Summary ==================== Name: EToys-jl.231 Author: jl Time: 1 September 2016, 2:23:37.830565 pm UUID: 9217d357-f7a9-e04f-bab3-a98d904576ac Ancestors: EToys-jl.230 fixed test tiles in kedama for new block generation =============== Diff against EToys-jl.230 =============== Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>test:ifTrue:ifFalse: (in category 'command execution') ----- test: cond ifTrue: trueBlock ifFalse: falseBlock + | origPredicate c actualCond condValue | + - | origPredicate c actualCond | (cond == true or: [cond == false]) ifTrue: [ ^ cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. ]. actualCond := cond. cond isBlock ifTrue: [ actualCond := ByteArray new: predicate size. + condValue := cond value. + condValue isCollection + ifTrue: [ + actualCond := condValue. + ] ifFalse: [ + 1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])] + ] - 1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])] ]. origPredicate := predicate clone. predicate bytesAnd: actualCond. trueBlock value: self. c := actualCond clone. c not. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1. predicate bytesAnd: c. falseBlock value: self. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1.! Item was changed: ----- Method: Object>>test:ifTrue:ifFalse: (in category '*Etoys-Squeakland-Tweak-Kedama') ----- test: cond ifTrue: trueBlock ifFalse: falseBlock + cond value ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. - cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. ! From commits at source.squeak.org Thu Sep 1 13:38:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 1 13:38:27 2016 Subject: [squeak-dev] The Inbox: Tools-jl.725.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-jl.725.mcz ==================== Summary ==================== Name: Tools-jl.725 Author: jl Time: 1 September 2016, 3:38:08.183565 pm UUID: c1f63020-54e3-3d46-bef0-958eef4c73ae Ancestors: Tools-tfel.724 fixed project load dialog in etoys =============== Diff against Tools-tfel.724 =============== Item was changed: ----- Method: FileList2 class>>morphicViewProjectLoader2InWorld:reallyLoad:dirFilterType: (in category 'blue ui') ----- morphicViewProjectLoader2InWorld: aWorld reallyLoad: aBoolean dirFilterType: aSymbol | window aFileList buttons treePane textColor1 fileListPane pane2a pane2b treeExtent filesExtent | window := AlignmentMorphBob1 newColumn. window hResizing: #shrinkWrap; vResizing: #shrinkWrap. textColor1 := Color r: 0.742 g: 0.839 b: 1.0. + aFileList := self new. - aFileList := self new directory: FileDirectory default. aFileList optionalButtonSpecs: aFileList servicesForProjectLoader; fileSelectionBlock: ( aSymbol == #limitedSuperSwikiDirectoryList ifTrue: [ MessageSend receiver: self selector: #projectOnlySelectionMethod: ] ifFalse: [ self projectOnlySelectionBlock ] ); "dirSelectionBlock: self hideSqueakletDirectoryBlock;" modalView: window. + aFileList directory: FileDirectory default. window setProperty: #FileList toValue: aFileList; wrapCentering: #center; cellPositioning: #topCenter; borderWidth: 1; borderColor: (Color r: 0.9 g: 0.801 b: 0.2); useRoundedCorners. buttons := {{'OK'. Color lightGreen}. {'Cancel'. Color lightRed}} collect: [ :each | self blueButtonText: each first textColor: textColor1 color: each second inWindow: window ]. aWorld width < 800 ifTrue: [ treeExtent := 150@300. filesExtent := 350@300. ] ifFalse: [ + treeExtent := 350@500. + filesExtent := 550@500. - treeExtent := 250@300. - filesExtent := 350@300. ]. (treePane := aFileList morphicDirectoryTreePaneFiltered: aSymbol) extent: treeExtent; retractable: false; borderWidth: 0. fileListPane := aFileList morphicFileListPane extent: filesExtent; retractable: false; borderWidth: 0. window addARow: { window fancyText: 'Load A Project' translated font: Preferences standardEToysTitleFont color: textColor1 }; addARowCentered: { buttons first. (Morph new extent: 30@5) color: Color transparent. buttons second }; addARow: { window fancyText: 'Please select a project' translated font: Preferences standardEToysFont color: textColor1 }; addARow: { (window inAColumn: {(pane2a := window inARow: {window inAColumn: {treePane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. (window inAColumn: {(pane2b := window inARow: {window inAColumn: {fileListPane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. }. window fullBounds. window fillWithRamp: (Color r: 1 g: 0.85 b: 0.975) oriented: 0.65. pane2a fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). pane2b fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). " buttons do: [ :each | each fillWithRamp: ColorTheme current dialogButtonsRampOrColor oriented: (0.75 @ 0). ]. " buttons first on: #mouseUp send: (aBoolean ifTrue: [#okHitForProjectLoader] ifFalse: [#okHit]) to: aFileList. buttons second on: #mouseUp send: #cancelHit to: aFileList. aFileList postOpen. window position: aWorld topLeft + (aWorld extent - window extent // 2). window adoptPaneColor: (Color r: 0.548 g: 0.677 b: 1.0). window becomeModal. ^ window openInWorld: aWorld.! From commits at source.squeak.org Thu Sep 1 14:00:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 1 14:00:22 2016 Subject: [squeak-dev] The Inbox: MorphicExtras-jl.196.mcz Message-ID: A new version of MorphicExtras was added to project The Inbox: http://source.squeak.org/inbox/MorphicExtras-jl.196.mcz ==================== Summary ==================== Name: MorphicExtras-jl.196 Author: jl Time: 1 September 2016, 3:59:47.545565 pm UUID: f54f2528-43a4-cf49-beb9-42b4ab57aebf Ancestors: MorphicExtras-tfel.195 added Kedama (Particles) to default flap =============== Diff against MorphicExtras-tfel.195 =============== Item was changed: ----- Method: Flaps class>>defaultsQuadsDefiningPlugInSuppliesFlap (in category 'predefined flaps') ----- defaultsQuadsDefiningPlugInSuppliesFlap "Answer a list of quads which define the objects to appear in the default Supplies flap used in the Plug-in image" + "PartsBin reconstructAllPartsIcons" + ^ #( (ObjectsTool newStandAlone 'Object Catalog' 'A tool that lets you browse the catalog of available objects') "(AllScriptsTool allScriptsToolForActiveWorld 'All Scripts' 'Stop, Step, and Go buttons for controlling all your scripts at once. The tool can also be "opened up" to control each script in your project individually.')" (TrashCanMorph new 'Trash' 'A tool for discarding objects') (GrabPatchMorph new 'Grab Patch' 'Allows you to create a new Sketch by grabbing a rectangular patch from the screen') (LassoPatchMorph new 'Lasso' 'Allows you to create a new Sketch by lassoing an area from the screen') (StickyPadMorph newStandAlone 'Sticky Pad' 'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.') "(PaintInvokingMorph new 'Paint' 'Drop this into an area to start making a fresh painting there')" (TextMorph boldAuthoringPrototype 'Text' 'Text that you can edit into anything you desire.') (RecordingControlsMorph authoringPrototype 'Sound' 'A device for making sound recordings.') (RectangleMorph authoringPrototype 'Rectangle' 'A rectangle') (RectangleMorph roundRectPrototype 'RoundRect' 'A rectangle with rounded corners') (EllipseMorph authoringPrototype 'Ellipse' 'An ellipse or circle') (StarMorph authoringPrototype 'Star' 'A star') (CurveMorph authoringPrototype 'Curve' 'A curve') (PolygonMorph authoringPrototype 'Polygon' 'A straight-sided figure with any number of sides') (ScriptableButton authoringPrototype 'Button' 'A Scriptable button') (BookMorph nextPageButton 'NextPage' 'A button that takes you to the next page') (BookMorph previousPageButton 'PreviousPage' 'A button that takes you to the previous page') "(ScriptingSystem prototypicalHolder 'Holder' 'A place for storing alternative pictures in an animation, etc.')" (PasteUpMorph authoringPrototype 'Playfield' 'A place for assembling parts or for staging animations') (SimpleSliderMorph authoringPrototype 'Slider' 'A slider for showing and setting numeric values.') (JoystickMorph authoringPrototype 'Joystick' 'A joystick-like control') (BookMorph authoringPrototype 'Book' 'A multi-paged structure') "(ClockMorph authoringPrototype 'Clock' 'A simple digital clock')" + (KedamaMorph authoringPrototype 'Particles' 'A Kedama World with pre-made components') (RandomNumberTile new 'Random' 'A random-number tile for use with tile scripting')) asOrderedCollection! From asqueaker at gmail.com Thu Sep 1 19:42:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Sep 1 19:43:13 2016 Subject: [squeak-dev] Re: The Trunk: System-cmm.913.mcz In-Reply-To: <1472716782746-4913539.post@n4.nabble.com> References: <1472716782746-4913539.post@n4.nabble.com> Message-ID: Hi Marcel, > - Please refrain from committing unrelated changes that are easily to > separate. If you have troubles uploading the 1000K MCZ for the System I do keep significant changes, which are unrelated to each other, to separate commits, however, I prefer to piggy-back my meaningless changes like color tweaks or comment typo's. The reason is, when I arrow through the MC history of a package, I only want to see *meaningful* changes, not dozens of meaningless tiny little fixes and roll-backs that don't need to be consumed later, therefore, don't need to be in their own commit. This isn't even about the heavyweightness and unscalability of MC, which is an issue in itself, but purely about having a dense and tidy MC history domain. MC is able to handle all the diffing, merging, backporting, etc. in spite of this. You didn't explain why you prefer to have thousands of micro versions... > - That "patch.st" hack seems like an indication that there are several > situations where you cannot cope with the .image characteristics of the > Smalltalk system. Please think about a better solution because the .image > file should usually not be read-only. It impedes Smalltalk-style maintenance > of such an image. While there have been good reasons in the past for > treating the .image in the Etoys bundles as read-only and relying on project > import/explort, I do not agree that we should make such a specific case > common practice. This "patch.st" feels like a first step towards yet another > CI/build system, which we already have with smalltalkCI and TravisCI. I don't know how to respond to these comments other than -- yesterday when you spoke of avoiding the image from growing into a "beast" -- I totally agree and that's why, IMO, all Squeak-based servers should use this design, because that's what it does. > - This commit message would benefit from a little more explanation. There is > plenty "what you did" but too little "why you did it". For example, the > words "... to be re-patched in the event of a restart" really need an > explanation of why you cannot just supply a start-up script to do that > patching like "./vm some.image patch.st". Please invest more time in more > elaborate commit messages. I think the issue is that I should write some documentation about making a Squeak server using this design. That's where the answer to such question would be found.. MC commits only should have enough information to understand the context of the *change*, i.e., "what's different", not any broader explanations of how the system works. BTW, the answer(s) to that question are: 1) because nearly every single script requires its own ".st" counterpart already, 2) daemontools runs the #run script, not #patch, and 3) I require to be able to ascertain exactly what I'm running in production from the command-line, without having RFB' into the image and start diffing the dirty MC packages in the production server... Best, Chris From asqueaker at gmail.com Thu Sep 1 19:55:34 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Sep 1 19:56:18 2016 Subject: [squeak-dev] Re: EToys in the Trunk In-Reply-To: References: <1472717032663-4913540.post@n4.nabble.com> Message-ID: > You seem to ignore the fact that the difference between what was in the > Trunk and what is in there now is 50k LoC (comparable to Morphic). > > If I update my images, they'll grow significantly. > > If I were to do such a significant change, I'd at least let the community > know about it beforehand. +1. From nicolas.cellier.aka.nice at gmail.com Thu Sep 1 20:44:32 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Sep 1 20:44:37 2016 Subject: [squeak-dev] Re: The Trunk: System-cmm.913.mcz In-Reply-To: References: <1472716782746-4913539.post@n4.nabble.com> Message-ID: 2016-09-01 21:42 GMT+02:00 Chris Muller : > Hi Marcel, > > > - Please refrain from committing unrelated changes that are easily to > > separate. If you have troubles uploading the 1000K MCZ for the System > > I do keep significant changes, which are unrelated to each other, to > separate commits, however, I prefer to piggy-back my meaningless > changes like color tweaks or comment typo's. The reason is, when I > arrow through the MC history of a package, I only want to see > *meaningful* changes, not dozens of meaningless tiny little fixes and > roll-backs that don't need to be consumed later, therefore, don't need > to be in their own commit. > > This isn't even about the heavyweightness and unscalability of MC, > which is an issue in itself, but purely about having a dense and tidy > MC history domain. > > MC is able to handle all the diffing, merging, backporting, etc. in > spite of this. You didn't explain why you prefer to have thousands of > micro versions... > > Hi Chris, the main reasons for using atomic commits: The ability to review things - large blob of unrelated things are difficult to review The ability to know which changes go together if we want to backport/revert a patch/feature and eventually to cherry pick changes from one branch to another branch (more a git feature than mc, but could be done in mc too). Separation of concerns: putting different features into different commits is just like housekeeping, like classifying classes in right categories and methods in right protocols... This is not strictly necessary but help following the stream of changes. At extreme level where branching is easy like git, one well accepted policy is to put each feature into a different branch. In mc, where each parallel commit is in its own branch (no matter the naming conventions), this is somehow what we do (or at least should do) when committing in inbox. This does ease the work of integrating those changes. Why should the policy be different in trunk? > > - That "patch.st" hack seems like an indication that there are several > > situations where you cannot cope with the .image characteristics of the > > Smalltalk system. Please think about a better solution because the .image > > file should usually not be read-only. It impedes Smalltalk-style > maintenance > > of such an image. While there have been good reasons in the past for > > treating the .image in the Etoys bundles as read-only and relying on > project > > import/explort, I do not agree that we should make such a specific case > > common practice. This "patch.st" feels like a first step towards yet > another > > CI/build system, which we already have with smalltalkCI and TravisCI. > > I don't know how to respond to these comments other than -- yesterday > when you spoke of avoiding the image from growing into a "beast" -- I > totally agree and that's why, IMO, all Squeak-based servers should use > this design, because that's what it does. > > > - This commit message would benefit from a little more explanation. > There is > > plenty "what you did" but too little "why you did it". For example, the > > words "... to be re-patched in the event of a restart" really need an > > explanation of why you cannot just supply a start-up script to do that > > patching like "./vm some.image patch.st". Please invest more time in > more > > elaborate commit messages. > > I think the issue is that I should write some documentation about > making a Squeak server using this design. That's where the answer to > such question would be found.. MC commits only should have enough > information to understand the context of the *change*, i.e., "what's > different", not any broader explanations of how the system works. > > BTW, the answer(s) to that question are: 1) because nearly every > single script requires its own ".st" counterpart already, 2) > daemontools runs the #run script, not #patch, and 3) I require to be > able to ascertain exactly what I'm running in production from the > command-line, without having RFB' into the image and start diffing the > dirty MC packages in the production server... > > Best, > Chris > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160901/a89b6c61/attachment.htm From commits at source.squeak.org Thu Sep 1 21:55:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 1 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160901215509.32202.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-August/068914.html Name: EToys-nice.214 Ancestors: EToys-tfel.213 Avoid using SmallInteger maxVal for 64bits compatibility. Indeed, the maxVal would not fit in a WordArray in 64bits VM ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-August/068915.html Name: EToys-nice.229 Ancestors: EToys-tfel.228, EToys-nice.214 Merge EToys-nice.214 for 64bits image compatibility ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-August/068916.html Name: System-cmm.913 Ancestors: System-tfel.912 - Don't use colored parentheses and brackets in the Community dark theme, and intensify #dbRed a bit, it was too washed out. - A new hook in Smalltalk run: to allow temporarily patched production systems running to be re-patched in the event of a restart. ============================================= From Marcel.Taeumel at hpi.de Fri Sep 2 07:55:03 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri Sep 2 07:57:37 2016 Subject: [squeak-dev] [Please Review] Map CTRL+red to CTRL+yellow and CMD+red to CMD+blue Message-ID: <1472802903370-4913716.post@n4.nabble.com> Hi, there. Here is a change set that adds an (optional) event filter to the hand morph to convert CTRL+red click to CTRL+yellow click and CMD+red click to CMD+blue click. If there are no objections, we can then prepare the image to remove that conversion from the VM sources into the image level. mouse-button-filter.cs Note that current VMs will never provide CTRL+red events or CMD+red click events. Best, Marcel -- View this message in context: http://forum.world.st/Please-Review-Map-CTRL-red-to-CTRL-yellow-and-CMD-red-to-CMD-blue-tp4913716.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Fri Sep 2 15:41:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Sep 2 15:42:22 2016 Subject: [squeak-dev] [Please Review] Map CTRL+red to CTRL+yellow and CMD+red to CMD+blue In-Reply-To: <1472802903370-4913716.post@n4.nabble.com> References: <1472802903370-4913716.post@n4.nabble.com> Message-ID: Hi Marcel, the swapMouseButtons preference is about the swappage of the yellow and blue buttons. Did you really mean to say swapping the red and yellow, and the red and blue? If so, could you elaborate what this is for? Thanks. On Fri, Sep 2, 2016 at 2:55 AM, marcel.taeumel wrote: > Hi, there. > > Here is a change set that adds an (optional) event filter to the hand morph > to convert CTRL+red click to CTRL+yellow click and CMD+red click to CMD+blue > click. If there are no objections, we can then prepare the image to remove > that conversion from the VM sources into the image level. > > mouse-button-filter.cs > > > Note that current VMs will never provide CTRL+red events or CMD+red click > events. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Please-Review-Map-CTRL-red-to-CTRL-yellow-and-CMD-red-to-CMD-blue-tp4913716.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From tim at rowledge.org Fri Sep 2 16:52:57 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Sep 2 16:52:59 2016 Subject: [squeak-dev] [Please Review] Map CTRL+red to CTRL+yellow and CMD+red to CMD+blue In-Reply-To: References: <1472802903370-4913716.post@n4.nabble.com> Message-ID: > On 02-09-2016, at 8:41 AM, Chris Muller wrote: > > Hi Marcel, the swapMouseButtons preference is about the swappage of > the yellow and blue buttons. Did you really mean to say swapping the > red and yellow, and the red and blue? If so, could you elaborate what > this is for? Single button input devices like styluses and fingers. Some of them do the equivalent at the hardware/OS level - think cmd-click on a macbook touchpad. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Settled some during shipping and handling. From ma.chris.m at gmail.com Fri Sep 2 17:16:01 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Sep 2 17:16:45 2016 Subject: [squeak-dev] [Please Review] Map CTRL+red to CTRL+yellow and CMD+red to CMD+blue In-Reply-To: References: <1472802903370-4913716.post@n4.nabble.com> Message-ID: Ah, excellent. On Fri, Sep 2, 2016 at 11:52 AM, tim Rowledge wrote: > >> On 02-09-2016, at 8:41 AM, Chris Muller wrote: >> >> Hi Marcel, the swapMouseButtons preference is about the swappage of >> the yellow and blue buttons. Did you really mean to say swapping the >> red and yellow, and the red and blue? If so, could you elaborate what >> this is for? > > Single button input devices like styluses and fingers. Some of them do the equivalent at the hardware/OS level - think cmd-click on a macbook touchpad. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Settled some during shipping and handling. > > From tim at rowledge.org Fri Sep 2 17:32:01 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Sep 2 17:32:06 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: References: Message-ID: <1BC2A229-304C-49A9-BF1B-6727B4BC08E8@rowledge.org> > On 31-08-2016, at 3:33 PM, Tim Felgentreff wrote: > > ScratchConnect What? Why on earth didn?t anyone ever mention this to me? I mean, this has to be a good way to get Scratchers interested in eToys, right? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Totum dependeat. = Let it all hang out. From Yoshiki.Ohshima at acm.org Fri Sep 2 22:25:05 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Sep 2 22:25:09 2016 Subject: [squeak-dev] RFB Message-ID: Hi, I'm trying to use the RFB server RFB-ikp.8.mcz from http://www.squeaksource.com/RFB/ with the Mac OS ScreenShare client. The Mac OS client can connect to the server but after 10 seconds or so, the server raises an error. Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. Is the newer version better at running RFB? (The client has some other issues. I'll track them down later.) -- -- Yoshiki From leves at caesar.elte.hu Fri Sep 2 22:59:45 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Fri Sep 2 22:59:48 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: Hi Yoshiki, Your symptom doesn't ring a bell. I don't know what settings your client program has, but with other clients it usually helps to set the color space to 24-bits and the encoding to ZRLE. You can try to enable logging on RFBServer to see what happens when your client gets disconnected. We have improved the RFB package over the years[1], but I don't think any of our changes would be related to your problem. (If your image is 5.0, then RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) Levente [1] http://leves.web.elte.hu/squeak/ On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: > Hi, > > I'm trying to use the RFB server RFB-ikp.8.mcz from > > http://www.squeaksource.com/RFB/ > > with the Mac OS ScreenShare client. > > The Mac OS client can connect to the server but after 10 seconds or > so, the server raises an error. > > Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. > Is the newer version better at running RFB? > > (The client has some other issues. I'll track them down later.) > > -- > -- Yoshiki > > From Yoshiki.Ohshima at acm.org Fri Sep 2 23:27:20 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Sep 2 23:27:24 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: Thanks. I was not aware of those newer versions. I'll give it a try. On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi wrote: > Hi Yoshiki, > > Your symptom doesn't ring a bell. I don't know what settings your client > program has, but with other clients it usually helps to set the color space > to 24-bits and the encoding to ZRLE. > > You can try to enable logging on RFBServer to see what happens when your > client gets disconnected. > > We have improved the RFB package over the years[1], but I don't think any of > our changes would be related to your problem. (If your image is 5.0, then > RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) > > Levente > > [1] http://leves.web.elte.hu/squeak/ > > > On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: > >> Hi, >> >> I'm trying to use the RFB server RFB-ikp.8.mcz from >> >> http://www.squeaksource.com/RFB/ >> >> with the Mac OS ScreenShare client. >> >> The Mac OS client can connect to the server but after 10 seconds or >> so, the server raises an error. >> >> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >> Is the newer version better at running RFB? >> >> (The client has some other issues. I'll track them down later.) >> >> -- >> -- Yoshiki >> >> > -- -- Yoshiki From lewis at mail.msen.com Sun Sep 4 13:34:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Sep 4 13:35:01 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: References: Message-ID: <20160904133455.GA70573@shell.msen.com> On Wed, Aug 31, 2016 at 11:28:06PM +0200, H. Hirzel wrote: > > On 8/31/16, Levente Uzonyi wrote: > > Hi All, > > > > With the recent updates, we have the full EToys package in the Trunk, > > which has more than 78k LoC. That's almost 1.5x what Morphic has, and > > it's more than Kernel, System and Collections together. > > > > Do we want to keep it in the Trunk? > > > > Levente > > > > Hello Levente > > I suggest yes, for the time being. Later on it should be made unload-able. > > --Hannes I missed most of this discussion, but I would like to say that I think that Hannes has it exactly right. The work can and should be done in trunk, and it is important that the result should ultimately be unloadable and reloadable. The timing also seems right to me. The work is being done in trunk early in the release cycle. This should provide the opportunity to achieve a reloadable Etoys in time for a next Squeak release. As long as the package is fully reloadable, the decision as to whether to include Etoys in our next release can be made later, as part of the release planning process. Near term, the trunk image will be larger, but if we elect to unload Etoys for a next release then the resulting image should be smaller than before. I think it would be great if both Etoys and Scratch were easily loadable and unloadable in trunk. Scratch is already being successfully developed as an external package compatible with trunk, which suggests that we should ultimately be able to do the same with Etoys. Others have mentioned that we need better tools to support this, and I agree. Dave From commits at source.squeak.org Sun Sep 4 16:51:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 4 16:51:30 2016 Subject: [squeak-dev] The Trunk: EToys-dtl.230.mcz Message-ID: David T. Lewis uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-dtl.230.mcz ==================== Summary ==================== Name: EToys-dtl.230 Author: dtl Time: 4 September 2016, 12:50:29.050862 pm UUID: 9298ab92-7fcb-46f8-b39d-2b242fda0f2f Ancestors: EToys-nice.229 Remove the Character>>setValue: EToys extension because it is unreferenced in Spur and it breaks Character in a V3 image. =============== Diff against EToys-nice.229 =============== Item was removed: - ----- Method: Character>>setValue: (in category '*Etoys-Squeakland-private') ----- - setValue: newValue - ^self error:'Characters are immutable' - ! From lecteur at zogotounga.net Sun Sep 4 17:05:56 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sun Sep 4 17:05:59 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: <20160904133455.GA70573@shell.msen.com> References: <20160904133455.GA70573@shell.msen.com> Message-ID: <92a744a3-d113-e64d-dc3b-34b6ff86d936@zogotounga.net> > I missed most of this discussion, but I would like to say that I think > that Hannes has it exactly right. The work can and should be done in trunk, > and it is important that the result should ultimately be unloadable and > reloadable. > > The timing also seems right to me. The work is being done in trunk early > in the release cycle. This should provide the opportunity to achieve a > reloadable Etoys in time for a next Squeak release. > > As long as the package is fully reloadable, the decision as to whether to > include Etoys in our next release can be made later, as part of the release > planning process. Near term, the trunk image will be larger, but if we > elect to unload Etoys for a next release then the resulting image should > be smaller than before. > > I think it would be great if both Etoys and Scratch were easily loadable > and unloadable in trunk. Scratch is already being successfully developed > as an external package compatible with trunk, which suggests that we should > ultimately be able to do the same with Etoys. Others have mentioned that > we need better tools to support this, and I agree. > > Dave > +1 to all of the above Stef --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus From commits at source.squeak.org Sun Sep 4 18:28:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 4 18:28:57 2016 Subject: [squeak-dev] The Trunk: EToys-dtl.231.mcz Message-ID: David T. Lewis uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-dtl.231.mcz ==================== Summary ==================== Name: EToys-dtl.231 Author: dtl Time: 4 September 2016, 2:27:44.612203 pm UUID: f2322433-6226-4dbd-8a88-0ca15e6b917b Ancestors: EToys-dtl.230 Remove Etoys extension for ImageSegment>>cc:new:current:fake:refStrm: because there are no senders in a Spur image and extension is not required in a V3 image. =============== Diff against EToys-dtl.230 =============== Item was removed: - ----- Method: ImageSegment>>cc:new:current:fake:refStrm: (in category '*Etoys-Squeakland-compact classes') ----- - cc: ind new: inTheSeg current: inTheImage fake: fakeCls refStrm: smartRefStream - "Sort out all the cases and decide what to do. Every Fake class is uncompacted before having insts converted. As the segment is installed, instances of reshaped compact classes will have the wrong class. Trouble cases: - 1) Existing class is compact in the segment and not compact here. Make that compact, (error if that slot is used), load the segment. If an class was just filed in, it is an existing class as far as we are concerned. - 2) A compact class has a different shape. We created a Fake class. Load the segment, with instances in the seg having the Wrong Class!!!! Find the bad instancees, and copy them over to being the real class. - 3) An existing class is not compact in the segment, but is in the image. Just let the new instance be uncompact. That is OK, and never reaches this code. - A class that is a root in this segment cannot be compact. That is not allowed." - - (inTheImage == nil) & (fakeCls == nil) ifTrue: ["case 1 and empty slot" - inTheSeg becomeCompactSimplyAt: ind. ^ true]. - - (inTheImage == inTheSeg) & (fakeCls == nil) ifTrue: ["everything matches" - ^ true]. - - inTheImage ifNil: ["reshaped and is an empty slot" - fakeCls becomeCompactSimplyAt: ind. ^ true]. - "comeFullyUpOnReload: will clean up" - - (inTheSeg == String and:[inTheImage == ByteString]) ifTrue:[ - "ar 4/10/2005: Workaround after renaming String to ByteString" - ^true - ]. - - "Is the image class really the class we are expecting? inTheSeg came in as a DiskProxy, and was mapped if it was renamed!!" - inTheImage == inTheSeg ifFalse: [ - self inform: 'The incoming class ', inTheSeg name, ' wants compact class \location ', ind printString, ', but that is occupied by ', inTheImage name, '. \This file cannot be read into this system. The author of the file \should make the class uncompact and create the file again.' withCRs. - ^ false]. - - "Instances of fakeCls think they are compact, and thus will say they are instances of the class inTheImage, which is a different shape. Just allow this to happen. Collect them and remap them as soon as the segment is installed." - ^ true! From commits at source.squeak.org Sun Sep 4 19:09:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 4 19:09:36 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz Message-ID: David T. Lewis uploaded a new version of Files to project The Inbox: http://source.squeak.org/inbox/Files-dtl.166.mcz ==================== Summary ==================== Name: Files-dtl.166 Author: dtl Time: 4 September 2016, 3:09:29.495898 pm UUID: 85945e53-39b3-4300-a08c-d189a4b9960d Ancestors: Files-tfel.165 Let the Files package be identical for Spur and V3 images by adding error handling in StandardFileStream>>binary and StandardFileStream>>ascii =============== Diff against Files-tfel.165 =============== Item was changed: ----- Method: StandardFileStream>>ascii (in category 'properties-setting') ----- ascii "Read and/or write in ASCII mode." buffer1 ifNil: [ buffer1 := ByteString new: 1 ] + ifNotNil: [ [ ByteString adoptInstance: buffer1 ] + on: Error "V3 image" + do: [ buffer1 := ByteString new: 1 ] ]. + collection ifNotNil: [ [ ByteString adoptInstance: collection ] + on: Error + do: [ collection := collection asString ] ]. - ifNotNil: [ ByteString adoptInstance: buffer1 ]. - collection ifNotNil: [ ByteString adoptInstance: collection ]. lastWritten ifNotNil: [ lastWritten isInteger ifTrue: [ lastWritten := lastWritten asCharacter ] ]! Item was changed: ----- Method: StandardFileStream>>binary (in category 'properties-setting') ----- binary "Read and/or write in binary mode." buffer1 ifNil: [ buffer1 := ByteArray new: 1 ] + ifNotNil: [ [ ByteArray adoptInstance: buffer1 ] + on: Error "V3 image" + do: [ buffer1 := ByteArray new: 1 ] ]. + collection ifNotNil: [ [ ByteArray adoptInstance: collection ] + on: Error + do: [ collection := collection asByteArray ] ]. - ifNotNil: [ ByteArray adoptInstance: buffer1 ]. - collection ifNotNil: [ ByteArray adoptInstance: collection ]. lastWritten ifNotNil: [ lastWritten isCharacter ifTrue: [ lastWritten := lastWritten asInteger ] ]! From lewis at mail.msen.com Sun Sep 4 19:24:09 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Sep 4 19:24:13 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <201609041909.u84J9bUO029456@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> Message-ID: <20160904192409.GA31502@shell.msen.com> I don't know if this is a good idea, so it goes in the inbox. Dave On Sun, Sep 04, 2016 at 07:09:28PM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of Files to project The Inbox: > http://source.squeak.org/inbox/Files-dtl.166.mcz > > ==================== Summary ==================== > > Name: Files-dtl.166 > Author: dtl > Time: 4 September 2016, 3:09:29.495898 pm > UUID: 85945e53-39b3-4300-a08c-d189a4b9960d > Ancestors: Files-tfel.165 > > Let the Files package be identical for Spur and V3 images by adding error handling in StandardFileStream>>binary and StandardFileStream>>ascii > > =============== Diff against Files-tfel.165 =============== > > Item was changed: > ----- Method: StandardFileStream>>ascii (in category 'properties-setting') ----- > ascii > "Read and/or write in ASCII mode." > buffer1 > ifNil: [ buffer1 := ByteString new: 1 ] > + ifNotNil: [ [ ByteString adoptInstance: buffer1 ] > + on: Error "V3 image" > + do: [ buffer1 := ByteString new: 1 ] ]. > + collection ifNotNil: [ [ ByteString adoptInstance: collection ] > + on: Error > + do: [ collection := collection asString ] ]. > - ifNotNil: [ ByteString adoptInstance: buffer1 ]. > - collection ifNotNil: [ ByteString adoptInstance: collection ]. > lastWritten ifNotNil: > [ lastWritten isInteger ifTrue: [ lastWritten := lastWritten asCharacter ] ]! > > Item was changed: > ----- Method: StandardFileStream>>binary (in category 'properties-setting') ----- > binary > "Read and/or write in binary mode." > buffer1 > ifNil: [ buffer1 := ByteArray new: 1 ] > + ifNotNil: [ [ ByteArray adoptInstance: buffer1 ] > + on: Error "V3 image" > + do: [ buffer1 := ByteArray new: 1 ] ]. > + collection ifNotNil: [ [ ByteArray adoptInstance: collection ] > + on: Error > + do: [ collection := collection asByteArray ] ]. > - ifNotNil: [ ByteArray adoptInstance: buffer1 ]. > - collection ifNotNil: [ ByteArray adoptInstance: collection ]. > lastWritten ifNotNil: > [ lastWritten isCharacter ifTrue: [ lastWritten := lastWritten asInteger ] ]! > From commits at source.squeak.org Sun Sep 4 19:31:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 4 19:31:51 2016 Subject: [squeak-dev] The Inbox: Tools-nice.725.mcz Message-ID: Nicolas Cellier uploaded a new version of Tools to project The Inbox: http://source.squeak.org/inbox/Tools-nice.725.mcz ==================== Summary ==================== Name: Tools-nice.725 Author: nice Time: 4 September 2016, 9:31:23.175175 pm UUID: 7009e733-b45e-403a-9469-6106ad6f747a Ancestors: Tools-tfel.724 Recognize Cuis #classDefinition: when scanning a cuis change file. =============== Diff against Tools-tfel.724 =============== Item was changed: ----- Method: ChangeList>>scanCategory (in category 'scanning') ----- scanCategory "Scan anything that involves more than one chunk; method name is historical only" + | itemPosition item tokens stamp anIndex class meta | - | itemPosition item tokens stamp anIndex | itemPosition := file position. item := file nextChunk. ((item includesSubstring: 'commentStamp:') or: [(item includesSubstring: 'methodsFor:') + or: [(item includesSubstring: 'classDefinition:') + or: [item endsWith: 'reorganize']]]) ifFalse: - or: [item endsWith: 'reorganize']]) ifFalse: ["Maybe a preamble, but not one we recognize; bail out with the preamble trick" ^ self addItem: (ChangeRecord new file: file position: itemPosition type: #preamble) text: ('preamble: ' , item contractTo: 50)]. tokens := Scanner new scanTokens: item. tokens size >= 3 ifTrue: [stamp := ''. anIndex := tokens indexOf: #stamp: ifAbsent: [nil]. anIndex ifNotNil: [stamp := tokens at: (anIndex + 1)]. tokens second == #methodsFor: ifTrue: [^ self scanCategory: tokens third class: tokens first meta: false stamp: stamp]. tokens third == #methodsFor: ifTrue: [^ self scanCategory: tokens fourth class: tokens first meta: true stamp: stamp]]. tokens second == #commentStamp: ifTrue: [stamp := tokens third. self addItem: (ChangeRecord new file: file position: file position type: #classComment class: tokens first category: nil meta: false stamp: stamp) text: 'class comment for ' , tokens first, (stamp isEmpty ifTrue: [''] ifFalse: ['; ' , stamp]). file nextChunk. ^ file skipStyleChunk]. + + tokens first == #classDefinition: + ifTrue: + [class := tokens second. + meta := tokens size >= 3 and: [tokens third = 'class']. + stamp := ''. + self addItem: + (ChangeRecord new file: file position: file position type: #classDefinition + class: class category: nil meta: meta stamp: stamp) + text: 'class definition for ' , class, + (stamp isEmpty ifTrue: [''] ifFalse: ['; ' , stamp]). + file nextChunk. + ^ file skipStyleChunk]. self assert: tokens last == #reorganize. self addItem: (ChangeRecord new file: file position: file position type: #reorganize class: tokens first category: nil meta: false stamp: stamp) text: 'organization for ' , tokens first, (tokens second == #class ifTrue: [' class'] ifFalse: ['']). file nextChunk! From leves at caesar.elte.hu Sun Sep 4 19:56:52 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun Sep 4 19:56:56 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <20160904192409.GA31502@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> Message-ID: Error handling is slow. It creates many additional objects (blocks, contexts, exceptions). What #adoptInstance: actually saves here is the reallocation of a 2k buffer. So I suppose the error handler is slower than creating a new collection, but this time it's slower for both Spur and V3. The real problem is that it seems #adoptInstance: doesn't work in V3. Why is that? Levente P.S.: I wrote a small script to see the performance difference and ran it on Spur. It shows that my assumption above was incorrect. Still, the overhead is rather high, so there's an alternative workaround at the bottom, which should be quicker on both V3 and Spur than using exceptions. But I still think that #adoptInstance: should work on V3, too. | s | s := ByteString new: 2048. { "Old behavior" [ s := s asByteArray. s := s asString ]. "Simulate failing adoptInstance: with #error. The actual overhead is higher, because the stack is deeper." [ [ self error ] on: Error do: [ s := s asByteArray ]. [ self error ] on: Error do: [ s := s asString ] ]. "New behavior." [ ByteArray adoptInstance: s. ByteString adoptInstance: s ]. "Proposed workaround." [ [ ByteArray adoptInstance: s ] on: Error do: [ s := s asByteArray ]. [ ByteString adoptInstance: s ] on: Error do: [ s := s asString ] ]. "Alternative workaround." [ Smalltalk isRunningSpur ifTrue: [ ByteArray adoptInstance: s ] ifFalse: [ s := s asByteArray ]. Smalltalk isRunningSpur ifTrue: [ ByteString adoptInstance: s ] ifFalse: [ s := s asByteString ] ] } collect: [ :block | Smalltalk garbageCollect. block bench ]. #( '182,000 per second. 5.5 microseconds per run.' '106,000 per second. 9.43 microseconds per run.' '10,400,000 per second. 96.6 nanoseconds per run.' '3,940,000 per second. 254 nanoseconds per run.' '9,050,000 per second. 110 nanoseconds per run.') P.P.S.: By using (Character format bitAnd: 16rFFFF) = 0 instead of Smalltalk isRunningSpur, the overhead of the alternative solution will disappear on Spur. On Sun, 4 Sep 2016, David T. Lewis wrote: > I don't know if this is a good idea, so it goes in the inbox. > > Dave > > > On Sun, Sep 04, 2016 at 07:09:28PM +0000, commits@source.squeak.org wrote: >> David T. Lewis uploaded a new version of Files to project The Inbox: >> http://source.squeak.org/inbox/Files-dtl.166.mcz >> >> ==================== Summary ==================== >> >> Name: Files-dtl.166 >> Author: dtl >> Time: 4 September 2016, 3:09:29.495898 pm >> UUID: 85945e53-39b3-4300-a08c-d189a4b9960d >> Ancestors: Files-tfel.165 >> >> Let the Files package be identical for Spur and V3 images by adding error handling in StandardFileStream>>binary and StandardFileStream>>ascii >> >> =============== Diff against Files-tfel.165 =============== >> >> Item was changed: >> ----- Method: StandardFileStream>>ascii (in category 'properties-setting') ----- >> ascii >> "Read and/or write in ASCII mode." >> buffer1 >> ifNil: [ buffer1 := ByteString new: 1 ] >> + ifNotNil: [ [ ByteString adoptInstance: buffer1 ] >> + on: Error "V3 image" >> + do: [ buffer1 := ByteString new: 1 ] ]. >> + collection ifNotNil: [ [ ByteString adoptInstance: collection ] >> + on: Error >> + do: [ collection := collection asString ] ]. >> - ifNotNil: [ ByteString adoptInstance: buffer1 ]. >> - collection ifNotNil: [ ByteString adoptInstance: collection ]. >> lastWritten ifNotNil: >> [ lastWritten isInteger ifTrue: [ lastWritten := lastWritten asCharacter ] ]! >> >> Item was changed: >> ----- Method: StandardFileStream>>binary (in category 'properties-setting') ----- >> binary >> "Read and/or write in binary mode." >> buffer1 >> ifNil: [ buffer1 := ByteArray new: 1 ] >> + ifNotNil: [ [ ByteArray adoptInstance: buffer1 ] >> + on: Error "V3 image" >> + do: [ buffer1 := ByteArray new: 1 ] ]. >> + collection ifNotNil: [ [ ByteArray adoptInstance: collection ] >> + on: Error >> + do: [ collection := collection asByteArray ] ]. >> - ifNotNil: [ ByteArray adoptInstance: buffer1 ]. >> - collection ifNotNil: [ ByteArray adoptInstance: collection ]. >> lastWritten ifNotNil: >> [ lastWritten isCharacter ifTrue: [ lastWritten := lastWritten asInteger ] ]! >> > > From commits at source.squeak.org Sun Sep 4 21:55:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 4 21:55:09 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160904215507.17651.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068917.html Name: EToys-dtl.230 Ancestors: EToys-nice.229 Remove the Character>>setValue: EToys extension because it is unreferenced in Spur and it breaks Character in a V3 image. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068918.html Name: EToys-dtl.231 Ancestors: EToys-dtl.230 Remove Etoys extension for ImageSegment>>cc:new:current:fake:refStrm: because there are no senders in a Spur image and extension is not required in a V3 image. ============================================= From lewis at mail.msen.com Mon Sep 5 00:12:01 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Sep 5 00:12:08 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> Message-ID: <20160905001201.GA74866@shell.msen.com> Hi Levente, Thanks for looking at this. On Sun, Sep 04, 2016 at 09:56:52PM +0200, Levente Uzonyi wrote: > Error handling is slow. It creates many additional objects (blocks, > contexts, exceptions). What #adoptInstance: actually saves here is the > reallocation of a 2k buffer. So I suppose the error handler is slower > than creating a new collection, but this time it's slower for both Spur > and V3. > > The real problem is that it seems #adoptInstance: doesn't work in V3. Why > is that? > > Levente On V3 with either Cog or Interpreter VM this works: ba := ByteArray new: 100. ByteString adoptInstance: ba. ba class ==> ByteString But the reverse does not work: bs := ByteString new: 100. ByteArray adoptInstance: bs. ==> Error > P.S.: I wrote a small script to see the performance difference and ran it > on Spur. It shows that my assumption above was incorrect. Still, the > overhead is rather high, so there's an alternative workaround at the > bottom, which should be quicker on both V3 and Spur than using exceptions. > But I still think that #adoptInstance: should work on V3, too. I tried some more tests, using file streams to hopefully make the results more realistic. I was completely surprised by the results, and I cannot say that there is any best approach. I guess I would summarize: - The adoptInstance: optimization provides a significant improvement for Spur. - For Spur, the #isRunningSpur test works much better than exception handling. But Spur is so fast that it really does not matter what you do as long as you use the adoptInstance: optimization. - For V3 images with Cog, the exception handler approach works better than the #isRunningSpur test. - For V3 images on interpreter VM, performance is slower and it it does not matter what approach is used. Conclusion: Either the exception handler approach or the #isRunningSpur test will work reasonably well. Personally I do not like using exception handlers to control program flow, so I would prefer your (Levente's) approach of explicitly testing for #isRunningSpur (or testing for the roughly equivalent (Character format bitAnd: 16rFFFF) = 0). Here is what I measured: "Spur 32bit, using the old unoptimized methods (no adoptInstance:)" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 23393 "Spur 32bit trunk, no special handling" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1513 "Spur 32bit, #ascii and #binary with exception handlers for #adoptInstance:" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 2491 "Spur 32bit, with test for #isRunningSpur rather than exception handler" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1729 "V3 on Cog, old version of #ascii and #binary, no special handling" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 47293 "V3 on Cog, #ascii and #binary with exception handlers for #adoptInstance:" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 5081 "V3 on Cog, with test for #isRunningSpur rather than exception handler:" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 51091 "V3 on interpreter, old version of #ascii and #binary, no special handling" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 49139 "V3 on interpreter, #ascii and #binary with exception handlers for #adoptInstance:" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 55952 "V3 on interpreter, with test for #isRunningSpur rather than exception handler:" Time millisecondsToRun: [ (1 to: 10000000) inject: (FileStream fileNamed: 'delete.me') close into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 53898 > > | s | > s := ByteString new: 2048. > { > "Old behavior" > [ > s := s asByteArray. > s := s asString ]. > "Simulate failing adoptInstance: with #error. The actual overhead is > higher, because the stack is deeper." > [ > [ self error ] > on: Error > do: [ s := s asByteArray ]. > [ self error ] > on: Error > do: [ s := s asString ] ]. > "New behavior." > [ > ByteArray adoptInstance: s. > ByteString adoptInstance: s ]. > "Proposed workaround." > [ > [ ByteArray adoptInstance: s ] > on: Error > do: [ s := s asByteArray ]. > [ ByteString adoptInstance: s ] > on: Error > do: [ s := s asString ] ]. > "Alternative workaround." > [ > Smalltalk isRunningSpur > ifTrue: [ ByteArray adoptInstance: s ] > ifFalse: [ s := s asByteArray ]. > Smalltalk isRunningSpur > ifTrue: [ ByteString adoptInstance: s ] > ifFalse: [ s := s asByteString ] ] } This needs to be #asString rather than #asByteString. > collect: [ :block | > Smalltalk garbageCollect. > block bench ]. > #( > '182,000 per second. 5.5 microseconds per run.' > '106,000 per second. 9.43 microseconds per run.' > '10,400,000 per second. 96.6 nanoseconds per run.' > '3,940,000 per second. 254 nanoseconds per run.' > '9,050,000 per second. 110 nanoseconds per run.') > > P.P.S.: By using (Character format bitAnd: 16rFFFF) = 0 instead of > Smalltalk isRunningSpur, the overhead of the alternative > solution will disappear on Spur. This will work too, although I did not test it. The definition of format numbers varies in the different image formats, so #isRunningSpur seems good enough, and maybe easier to understand (?). Dave > > On Sun, 4 Sep 2016, David T. Lewis wrote: > > >I don't know if this is a good idea, so it goes in the inbox. > > > >Dave > > > > > >On Sun, Sep 04, 2016 at 07:09:28PM +0000, commits@source.squeak.org wrote: > >>David T. Lewis uploaded a new version of Files to project The Inbox: > >>http://source.squeak.org/inbox/Files-dtl.166.mcz > >> > >>==================== Summary ==================== > >> > >>Name: Files-dtl.166 > >>Author: dtl > >>Time: 4 September 2016, 3:09:29.495898 pm > >>UUID: 85945e53-39b3-4300-a08c-d189a4b9960d > >>Ancestors: Files-tfel.165 > >> > >>Let the Files package be identical for Spur and V3 images by adding > >>error handling in StandardFileStream>>binary and StandardFileStream>>ascii > >> > >>=============== Diff against Files-tfel.165 =============== > >> From leves at caesar.elte.hu Mon Sep 5 00:29:44 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Sep 5 00:29:47 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <20160905001201.GA74866@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> Message-ID: Hi Dave, Now I remember what the problem was with #adoptInstance: on V3. (Based on your benchmark results on V3 Cog, it has already been fixed in your image.) The thing is that ByteString has always been compact, but ByteArray has never been, so their format is different in V3. In Spur there are no compact classes, so this issue doesn't exist. The solution was to evaluate [ ByteArray becomeCompact ] in the V3 image. But you reported that the interpreter VM's primitive for #adoptInstance: is broken[1]. So, I think the best would be if that primitive were fixed in the interpreter VM. Levente [1] http://forum.world.st/Files-ul-154-seems-dangerous-is-it-needed-td4898213.html On Sun, 4 Sep 2016, David T. Lewis wrote: > Hi Levente, > > Thanks for looking at this. > > On Sun, Sep 04, 2016 at 09:56:52PM +0200, Levente Uzonyi wrote: >> Error handling is slow. It creates many additional objects (blocks, >> contexts, exceptions). What #adoptInstance: actually saves here is the >> reallocation of a 2k buffer. So I suppose the error handler is slower >> than creating a new collection, but this time it's slower for both Spur >> and V3. >> >> The real problem is that it seems #adoptInstance: doesn't work in V3. Why >> is that? >> >> Levente > > On V3 with either Cog or Interpreter VM this works: > > ba := ByteArray new: 100. > ByteString adoptInstance: ba. > ba class ==> ByteString > > But the reverse does not work: > > bs := ByteString new: 100. > ByteArray adoptInstance: bs. ==> Error > > > >> P.S.: I wrote a small script to see the performance difference and ran it >> on Spur. It shows that my assumption above was incorrect. Still, the >> overhead is rather high, so there's an alternative workaround at the >> bottom, which should be quicker on both V3 and Spur than using exceptions. >> But I still think that #adoptInstance: should work on V3, too. > > > I tried some more tests, using file streams to hopefully make the results > more realistic. I was completely surprised by the results, and I cannot say > that there is any best approach. I guess I would summarize: > > - The adoptInstance: optimization provides a significant improvement > for Spur. > - For Spur, the #isRunningSpur test works much better than exception > handling. But Spur is so fast that it really does not matter what > you do as long as you use the adoptInstance: optimization. > - For V3 images with Cog, the exception handler approach works better > than the #isRunningSpur test. > - For V3 images on interpreter VM, performance is slower and it it does > not matter what approach is used. > > Conclusion: Either the exception handler approach or the #isRunningSpur > test will work reasonably well. Personally I do not like using exception > handlers to control program flow, so I would prefer your (Levente's) > approach of explicitly testing for #isRunningSpur (or testing for the > roughly equivalent (Character format bitAnd: 16rFFFF) = 0). > > Here is what I measured: > > "Spur 32bit, using the old unoptimized methods (no adoptInstance:)" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 23393 > > "Spur 32bit trunk, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1513 > > "Spur 32bit, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 2491 > > "Spur 32bit, with test for #isRunningSpur rather than exception handler" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1729 > > "V3 on Cog, old version of #ascii and #binary, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 47293 > > "V3 on Cog, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 5081 > > "V3 on Cog, with test for #isRunningSpur rather than exception handler:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 51091 > > "V3 on interpreter, old version of #ascii and #binary, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 49139 > > "V3 on interpreter, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 55952 > > "V3 on interpreter, with test for #isRunningSpur rather than exception handler:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 53898 > > >> >> | s | >> s := ByteString new: 2048. >> { >> "Old behavior" >> [ >> s := s asByteArray. >> s := s asString ]. >> "Simulate failing adoptInstance: with #error. The actual overhead is >> higher, because the stack is deeper." >> [ >> [ self error ] >> on: Error >> do: [ s := s asByteArray ]. >> [ self error ] >> on: Error >> do: [ s := s asString ] ]. >> "New behavior." >> [ >> ByteArray adoptInstance: s. >> ByteString adoptInstance: s ]. >> "Proposed workaround." >> [ >> [ ByteArray adoptInstance: s ] >> on: Error >> do: [ s := s asByteArray ]. >> [ ByteString adoptInstance: s ] >> on: Error >> do: [ s := s asString ] ]. >> "Alternative workaround." >> [ >> Smalltalk isRunningSpur >> ifTrue: [ ByteArray adoptInstance: s ] >> ifFalse: [ s := s asByteArray ]. >> Smalltalk isRunningSpur >> ifTrue: [ ByteString adoptInstance: s ] >> ifFalse: [ s := s asByteString ] ] } > > > This needs to be #asString rather than #asByteString. > > >> collect: [ :block | >> Smalltalk garbageCollect. >> block bench ]. >> #( >> '182,000 per second. 5.5 microseconds per run.' >> '106,000 per second. 9.43 microseconds per run.' >> '10,400,000 per second. 96.6 nanoseconds per run.' >> '3,940,000 per second. 254 nanoseconds per run.' >> '9,050,000 per second. 110 nanoseconds per run.') >> >> P.P.S.: By using (Character format bitAnd: 16rFFFF) = 0 instead of >> Smalltalk isRunningSpur, the overhead of the alternative >> solution will disappear on Spur. > > This will work too, although I did not test it. The definition of format > numbers varies in the different image formats, so #isRunningSpur seems > good enough, and maybe easier to understand (?). > > Dave > >> >> On Sun, 4 Sep 2016, David T. Lewis wrote: >> >>> I don't know if this is a good idea, so it goes in the inbox. >>> >>> Dave >>> >>> >>> On Sun, Sep 04, 2016 at 07:09:28PM +0000, commits@source.squeak.org wrote: >>>> David T. Lewis uploaded a new version of Files to project The Inbox: >>>> http://source.squeak.org/inbox/Files-dtl.166.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Files-dtl.166 >>>> Author: dtl >>>> Time: 4 September 2016, 3:09:29.495898 pm >>>> UUID: 85945e53-39b3-4300-a08c-d189a4b9960d >>>> Ancestors: Files-tfel.165 >>>> >>>> Let the Files package be identical for Spur and V3 images by adding >>>> error handling in StandardFileStream>>binary and StandardFileStream>>ascii >>>> >>>> =============== Diff against Files-tfel.165 =============== >>>> > > From eliot.miranda at gmail.com Mon Sep 5 00:33:43 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Sep 5 00:33:48 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <20160905001201.GA74866@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> Message-ID: Hi Both, the adoptInstance: code fails on V3 because of compact classes. One cannot change a 1-word header instance if a compact class into a 1-word header of a non-compact class; there is no room in a 1-word header for the 32-bit non/compact class reference. David, fur give me for broaching what may be an emotionally painful topic. I have no desire to cause you pain, but IMO this is important. We should /NOT/ hamstring code for either Spur or V3 with needless and expensive compatibility. David, you're going to have to accept that the two will diverge. Instead, try and think of a mechanism that supports tracking the differences instead of trying to keep the code bases the same. IMO effort put into keeping the two the same is effort wasted. Instead one could put effort into a Spur interpreter VM, or tools for automatic patching of Monticello packages with Spur<->V3 differences. Bert and Yom and others just put significant effort into etoys on Squeak 5.1 (which is Spur). Bert wrote a V3 format ImageSegment loader entirely in Smalltalk, allowing Spur to load old etoys projects saved on V3. This is effort well spent. It rescues old code and allows it to live again and solves an important compatibility problem (and indeed a Spur format loader could be written to allow V3 to load ImageSegments saved on Spur). In a community with extremely limited resources it is incumbent upon those of us who can to find constructive directions for our efforts if we, as a community, are to make progress. Eliot _,,,^..^,,,_ (phone) > On Sep 5, 2016, at 2:12 AM, David T. Lewis wrote: > > Hi Levente, > > Thanks for looking at this. > >> On Sun, Sep 04, 2016 at 09:56:52PM +0200, Levente Uzonyi wrote: >> Error handling is slow. It creates many additional objects (blocks, >> contexts, exceptions). What #adoptInstance: actually saves here is the >> reallocation of a 2k buffer. So I suppose the error handler is slower >> than creating a new collection, but this time it's slower for both Spur >> and V3. >> >> The real problem is that it seems #adoptInstance: doesn't work in V3. Why >> is that? >> >> Levente > > On V3 with either Cog or Interpreter VM this works: > > ba := ByteArray new: 100. > ByteString adoptInstance: ba. > ba class ==> ByteString > > But the reverse does not work: > > bs := ByteString new: 100. > ByteArray adoptInstance: bs. ==> Error > > > >> P.S.: I wrote a small script to see the performance difference and ran it >> on Spur. It shows that my assumption above was incorrect. Still, the >> overhead is rather high, so there's an alternative workaround at the >> bottom, which should be quicker on both V3 and Spur than using exceptions. >> But I still think that #adoptInstance: should work on V3, too. > > > I tried some more tests, using file streams to hopefully make the results > more realistic. I was completely surprised by the results, and I cannot say > that there is any best approach. I guess I would summarize: > > - The adoptInstance: optimization provides a significant improvement > for Spur. > - For Spur, the #isRunningSpur test works much better than exception > handling. But Spur is so fast that it really does not matter what > you do as long as you use the adoptInstance: optimization. > - For V3 images with Cog, the exception handler approach works better > than the #isRunningSpur test. > - For V3 images on interpreter VM, performance is slower and it it does > not matter what approach is used. > > Conclusion: Either the exception handler approach or the #isRunningSpur > test will work reasonably well. Personally I do not like using exception > handlers to control program flow, so I would prefer your (Levente's) > approach of explicitly testing for #isRunningSpur (or testing for the > roughly equivalent (Character format bitAnd: 16rFFFF) = 0). > > Here is what I measured: > > "Spur 32bit, using the old unoptimized methods (no adoptInstance:)" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 23393 > > "Spur 32bit trunk, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1513 > > "Spur 32bit, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 2491 > > "Spur 32bit, with test for #isRunningSpur rather than exception handler" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 1729 > > "V3 on Cog, old version of #ascii and #binary, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 47293 > > "V3 on Cog, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 5081 > > "V3 on Cog, with test for #isRunningSpur rather than exception handler:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 51091 > > "V3 on interpreter, old version of #ascii and #binary, no special handling" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 49139 > > "V3 on interpreter, #ascii and #binary with exception handlers for #adoptInstance:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 55952 > > "V3 on interpreter, with test for #isRunningSpur rather than exception handler:" > Time millisecondsToRun: > [ (1 to: 10000000) > inject: (FileStream fileNamed: 'delete.me') close > into: [ :fs :idx | fs ascii; binary. fs ] ] ==> 53898 > > >> >> | s | >> s := ByteString new: 2048. >> { >> "Old behavior" >> [ >> s := s asByteArray. >> s := s asString ]. >> "Simulate failing adoptInstance: with #error. The actual overhead is >> higher, because the stack is deeper." >> [ >> [ self error ] >> on: Error >> do: [ s := s asByteArray ]. >> [ self error ] >> on: Error >> do: [ s := s asString ] ]. >> "New behavior." >> [ >> ByteArray adoptInstance: s. >> ByteString adoptInstance: s ]. >> "Proposed workaround." >> [ >> [ ByteArray adoptInstance: s ] >> on: Error >> do: [ s := s asByteArray ]. >> [ ByteString adoptInstance: s ] >> on: Error >> do: [ s := s asString ] ]. >> "Alternative workaround." >> [ >> Smalltalk isRunningSpur >> ifTrue: [ ByteArray adoptInstance: s ] >> ifFalse: [ s := s asByteArray ]. >> Smalltalk isRunningSpur >> ifTrue: [ ByteString adoptInstance: s ] >> ifFalse: [ s := s asByteString ] ] } > > > This needs to be #asString rather than #asByteString. > > >> collect: [ :block | >> Smalltalk garbageCollect. >> block bench ]. >> #( >> '182,000 per second. 5.5 microseconds per run.' >> '106,000 per second. 9.43 microseconds per run.' >> '10,400,000 per second. 96.6 nanoseconds per run.' >> '3,940,000 per second. 254 nanoseconds per run.' >> '9,050,000 per second. 110 nanoseconds per run.') >> >> P.P.S.: By using (Character format bitAnd: 16rFFFF) = 0 instead of >> Smalltalk isRunningSpur, the overhead of the alternative >> solution will disappear on Spur. > > This will work too, although I did not test it. The definition of format > numbers varies in the different image formats, so #isRunningSpur seems > good enough, and maybe easier to understand (?). > > Dave > >> >>> On Sun, 4 Sep 2016, David T. Lewis wrote: >>> >>> I don't know if this is a good idea, so it goes in the inbox. >>> >>> Dave >>> >>> >>>> On Sun, Sep 04, 2016 at 07:09:28PM +0000, commits@source.squeak.org wrote: >>>> David T. Lewis uploaded a new version of Files to project The Inbox: >>>> http://source.squeak.org/inbox/Files-dtl.166.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Files-dtl.166 >>>> Author: dtl >>>> Time: 4 September 2016, 3:09:29.495898 pm >>>> UUID: 85945e53-39b3-4300-a08c-d189a4b9960d >>>> Ancestors: Files-tfel.165 >>>> >>>> Let the Files package be identical for Spur and V3 images by adding >>>> error handling in StandardFileStream>>binary and StandardFileStream>>ascii >>>> >>>> =============== Diff against Files-tfel.165 =============== > From lewis at mail.msen.com Mon Sep 5 03:38:35 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Sep 5 03:38:40 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> Message-ID: <20160905033835.GA9214@shell.msen.com> On Mon, Sep 05, 2016 at 02:33:43AM +0200, Eliot Miranda wrote: > Hi Both, > > the adoptInstance: code fails on V3 because of compact classes. One cannot change a 1-word header instance if a compact class into a 1-word header of a non-compact class; there is no room in a 1-word header for the 32-bit non/compact class reference. > Hi Eliot, Right. You have documented this clearly in VMMaker. It is a reasonable and expected limitation. > David, fur give me for broaching what may be an emotionally painful topic. I have no desire to cause you pain, but IMO this is important. > > We should /NOT/ hamstring code for either Spur or V3 with needless and expensive compatibility. David, you're going to have to accept that the two will diverge. Instead, try and think of a mechanism that supports tracking the differences instead of trying to keep the code bases the same. IMO effort put into keeping the two the same is effort wasted. My initial attempt to do this is http://www.squeaksource.com/TrunkUpdateStreamV3. For example, to see differences in the Collections package, use Monticello from trunk Squeak to look at differences in the Collections.V3 package in the TrunkUpdateStreamV3 repository. The other differences are in Compiler.V3, Kernel.V3, and System.V3 (along with the trivial difference in Files.V3 that was the subject of this thread). My question concerning the Files package arises directly from this. Aside from a single optimization in Files, all other significant differences have been contained within the Compiler, Collections, System, and Kernel packages. > Instead one could put effort into a Spur interpreter VM, I do not want to volunteer to start a new VM project until I finish the last one that I committed to do. I have said this before. And it's really just not someething that I can take on right now. > , or tools for automatic patching of Monticello packages with Spur<->V3 differences. I do not yet have any real insight as to how to automate the patching of Monticello packages with Spur<->V3 differences. So far I have done it manually with some success, and I have been able to maintain a functioning update.V3 config map for the V3 trunk update stream (the update.V3 maps in http://www.squeaksource.com/TrunkUpdateStreamV3). This has been updated through the 5.1 release cycle, and I may keep it going for a while longer. But the automated update stream test (http://build.squeak.org/job/FollowTrunkOnOldV3Image) fails due to various issues in the trunk stream itself (discussed elsewhere), and my experience is that the changes in System/Kernel/Collections/Compiler require close inspection by a human agent. I don't know how to automate this. I can't help but think this is a topic that might usefully be addressed with Environments. That is pure hand waving on my part, but it seems like it might be a natural fit, and potentially better in the long term than any Monticello patching strategies that we may be able to invent. I am also intrigued by Juan Vuletich's idea of maintaining a single image code base for both V3 and Spur, so if Juan can do it it must be possible :-) http://cuis-smalltalk.org/pipermail/cuis-dev_cuis-smalltalk.org/2016-August/000854.html > Bert and Yom and others just put significant effort into etoys on Squeak 5.1 (which is Spur). Bert wrote a V3 format ImageSegment loader entirely in Smalltalk, allowing Spur to load old etoys projects saved on V3. This is effort well spent. It rescues old code and allows it to live again and solves an important compatibility problem (and indeed a Spur format loader could be written to allow V3 to load ImageSegments saved on Spur). > I agree completely. > In a community with extremely limited resources it is incumbent upon those of us who can to find constructive directions for our efforts if we, as a community, are to make progress. > > Eliot > _,,,^..^,,,_ (phone) > I have heard this before. It would be "too much work" to keep squeaksource.com alive, so instead we direct all available resources to migrate everything to smalltalkhub. It would be "too hard" to keep MVC working, so we should just abandon it while we work on something else instead. Sorry, but I just don't buy it. For various reasons, I cannot put much effort into new projects right now. But I do want to try to keep existing efforts moving forward, and I hope this will not be seen as unconstructive. Dave From btc at openinworld.com Mon Sep 5 05:08:38 2016 From: btc at openinworld.com (Ben Coman) Date: Mon Sep 5 05:09:02 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <20160905033835.GA9214@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> <20160905033835.GA9214@shell.msen.com> Message-ID: On Mon, Sep 5, 2016 at 11:38 AM, David T. Lewis wrote: > On Mon, Sep 05, 2016 at 02:33:43AM +0200, Eliot Miranda wrote: >> Hi Both, >> >> the adoptInstance: code fails on V3 because of compact classes. One cannot change a 1-word header instance if a compact class into a 1-word header of a non-compact class; there is no room in a 1-word header for the 32-bit non/compact class reference. >> > > Hi Eliot, > > Right. You have documented this clearly in VMMaker. It is a reasonable and > expected limitation. > >> David, fur give me for broaching what may be an emotionally painful topic. I have no desire to cause you pain, but IMO this is important. >> >> We should /NOT/ hamstring code for either Spur or V3 with needless and expensive compatibility. David, you're going to have to accept that the two will diverge. Instead, try and think of a mechanism that supports tracking the differences instead of trying to keep the code bases the same. IMO effort put into keeping the two the same is effort wasted. > > My initial attempt to do this is http://www.squeaksource.com/TrunkUpdateStreamV3. > For example, to see differences in the Collections package, use Monticello from > trunk Squeak to look at differences in the Collections.V3 package in the > TrunkUpdateStreamV3 repository. The other differences are in Compiler.V3, > Kernel.V3, and System.V3 (along with the trivial difference in Files.V3 that > was the subject of this thread). > > My question concerning the Files package arises directly from this. Aside > from a single optimization in Files, all other significant differences > have been contained within the Compiler, Collections, System, and Kernel > packages. > >> Instead one could put effort into a Spur interpreter VM, > > I do not want to volunteer to start a new VM project until I finish the > last one that I committed to do. I have said this before. And it's really > just not someething that I can take on right now. Dave, Just to clarify... If there happen to be a Context Interpreter Spur VM, you would not be concerned about V3 compatibility? cheers -ben From eliot.miranda at gmail.com Mon Sep 5 07:37:59 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Sep 5 07:38:04 2016 Subject: [squeak-dev] EToys in the Trunk In-Reply-To: <92a744a3-d113-e64d-dc3b-34b6ff86d936@zogotounga.net> References: <20160904133455.GA70573@shell.msen.com> <92a744a3-d113-e64d-dc3b-34b6ff86d936@zogotounga.net> Message-ID: On Sun, Sep 4, 2016 at 7:05 PM, St?phane Rollandin wrote: > I missed most of this discussion, but I would like to say that I think >> that Hannes has it exactly right. The work can and should be done in >> trunk, >> and it is important that the result should ultimately be unloadable and >> reloadable. >> >> The timing also seems right to me. The work is being done in trunk early >> in the release cycle. This should provide the opportunity to achieve a >> reloadable Etoys in time for a next Squeak release. >> >> As long as the package is fully reloadable, the decision as to whether to >> include Etoys in our next release can be made later, as part of the >> release >> planning process. Near term, the trunk image will be larger, but if we >> elect to unload Etoys for a next release then the resulting image should >> be smaller than before. >> >> I think it would be great if both Etoys and Scratch were easily loadable >> and unloadable in trunk. Scratch is already being successfully developed >> as an external package compatible with trunk, which suggests that we >> should >> ultimately be able to do the same with Etoys. Others have mentioned that >> we need better tools to support this, and I agree. >> >> Dave >> >> > +1 to all of the above > +1 _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160905/4ecc0381/attachment.htm From lewis at mail.msen.com Mon Sep 5 14:14:10 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Sep 5 14:14:14 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> <20160905033835.GA9214@shell.msen.com> Message-ID: <20160905141410.GA36889@shell.msen.com> On Mon, Sep 05, 2016 at 01:08:38PM +0800, Ben Coman wrote: > On Mon, Sep 5, 2016 at 11:38 AM, David T. Lewis wrote: > > On Mon, Sep 05, 2016 at 02:33:43AM +0200, Eliot Miranda wrote: > >> Hi Both, > >> > >> the adoptInstance: code fails on V3 because of compact classes. One cannot change a 1-word header instance if a compact class into a 1-word header of a non-compact class; there is no room in a 1-word header for the 32-bit non/compact class reference. > >> > > > > Hi Eliot, > > > > Right. You have documented this clearly in VMMaker. It is a reasonable and > > expected limitation. > > > >> David, fur give me for broaching what may be an emotionally painful topic. I have no desire to cause you pain, but IMO this is important. > >> > >> We should /NOT/ hamstring code for either Spur or V3 with needless and expensive compatibility. David, you're going to have to accept that the two will diverge. Instead, try and think of a mechanism that supports tracking the differences instead of trying to keep the code bases the same. IMO effort put into keeping the two the same is effort wasted. > > > > My initial attempt to do this is http://www.squeaksource.com/TrunkUpdateStreamV3. > > For example, to see differences in the Collections package, use Monticello from > > trunk Squeak to look at differences in the Collections.V3 package in the > > TrunkUpdateStreamV3 repository. The other differences are in Compiler.V3, > > Kernel.V3, and System.V3 (along with the trivial difference in Files.V3 that > > was the subject of this thread). > > > > My question concerning the Files package arises directly from this. Aside > > from a single optimization in Files, all other significant differences > > have been contained within the Compiler, Collections, System, and Kernel > > packages. > > > >> Instead one could put effort into a Spur interpreter VM, > > > > I do not want to volunteer to start a new VM project until I finish the > > last one that I committed to do. I have said this before. And it's really > > just not someething that I can take on right now. > > Dave, Just to clarify... If there happen to be a Context Interpreter > Spur VM, you would not be concerned about V3 compatibility? > Hi Ben, Ideally we would like to be able to have the context and stack interpreters built from the same code base, and in that scenario the context interpreter would be of little interest for a Spur object memory. The stack interpreter already exists for both V3 and Spur, and it is an improvement on the traditional context interpreter. That said, there are things in the VMMaker code base for the interpreter VM that could usefully be moved to the VMMaker.oscog code base, and Eliot is quite rightly trying to encourage someone to step forward and make that happen. If anyone is interested, I'll be happy to help where I can (but it's not a project that I want to try to undertake myself right now). Off the top of my head, here are some things that might be of interest from the VMMaker code base: - Refactor interpreter and object memory hierarchies, methods specific to context versus stack interpreters in their own hierarchies, no method overrides, use #subclassResponsibility in common superclasses - For methods specific to the context interpreter, update them from the more recent code in VMMaker - 32 versus 64 bit object word size as a compile time option (not as part of source code generation), single generated C code base - Ensure that context and stack interpreters (not necessarily Cog) compile and run on 64-bit platforms (no 32-bit libraries) - Add support for loading older 6504 images (should work with stack interpreter) - Memory access C macros reimplemented in slang, allow similator to execute the lowest level functions in Smalltalk - Browse generated C code for methods in Squeak browsers Dave From herbertkoenig at gmx.net Mon Sep 5 18:24:16 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Mon Sep 5 18:24:25 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top Message-ID: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> Hi, other than on RasPi the Windows version 5.1 does not show the image name in the title bar of the application window. Right now I have 6 images busy and on my Windows machine it's hard to know which is which. Oh and I noticed we changed from the Squeak mouse to the Smalltalk balloon Icon. Well I'd prefer the special Squek symbol over the general Smalltalk symbol. Cheers, Herbert From herbertkoenig at gmx.net Mon Sep 5 18:46:27 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Mon Sep 5 18:46:37 2016 Subject: [squeak-dev] Filtering Browser panes Message-ID: <1bf73ea9-c9c6-c3ae-cdbd-1710abee718d@gmx.net> Hi, in 5.1 when hitting a letter while having selected something in a browser pane this list gets filtered. How do i get it unfiltered again? Thanks, Herbert From ma.chris.m at gmail.com Mon Sep 5 19:30:23 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Sep 5 19:31:07 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling Message-ID: Hi all, I have some in this code in which I try to read a file and, if it fails, try to read it in a different way. But the order of processing ensure: blocks vs. error-handler blocks is not what I expected. I expected the ensure: block of the inner handler to run before the outer handler. Here's a simple workspace to demonstrate. The temp var "open" represents the status of a FileStream. |open| open:=nil. World findATranscript: nil Transcript clear. [ [ [ "try method1" open:=true. Error signal] ensure: [ open:=false] ] on: Error do: [ : innerErr | "try method2, but file still open!" Transcript cr; show: 'innerErr handler, open is ', open asString. innerErr return: ([ open:=true. Error signal ] ensure: [ open:=false ]) ] ] on: Error do: [ : outerErr | Transcript cr; show: 'outerErr handler, open is ', open asString ]. Transcript cr; show: 'Done. open is ', open asString. It seems none of the ensure blocks are processed until after ALL the error-handler blocks. So if a #fileNamed:do: deep deep in the stack encounters an Error, the file is still open in the upper-level handlers, with no good way to close it.. From asqueaker at gmail.com Mon Sep 5 19:37:22 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Sep 5 19:38:06 2016 Subject: [squeak-dev] Filtering Browser panes In-Reply-To: <1bf73ea9-c9c6-c3ae-cdbd-1710abee718d@gmx.net> References: <1bf73ea9-c9c6-c3ae-cdbd-1710abee718d@gmx.net> Message-ID: Hi Herbert, this feature was around long before 5.1. If preference "Filterable Lists Clear Automatically" is selected, it will clear automatically when the widget loses focus. Alternatively, you may press [Enter] / [Return] on the keyboard to clear the filter and keep the selection, or [Backspace] to clear the filter and return to the prior selection from which the filter was launched. The above is documented in the Prefence Browser under "Filterable Lists" and "Filterable Lists Clear Automatically". I also made a video about it: https://www.youtube.com/watch?v=11CLNKl5334 On Mon, Sep 5, 2016 at 1:46 PM, Herbert K?nig wrote: > Hi, > > in 5.1 when hitting a letter while having selected something in a browser > pane this list gets filtered. > > How do i get it unfiltered again? > > Thanks, > > Herbert > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160905/83c64ba5/attachment.htm From avalloud at smalltalk.comcastbiz.net Mon Sep 5 20:27:08 2016 From: avalloud at smalltalk.comcastbiz.net (Andres Valloud) Date: Mon Sep 5 20:27:12 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling In-Reply-To: References: Message-ID: I'd think the ensure blocks haven't run yet because the return: messages sent to the exceptions haven't finished, so exception handling hasn't had a chance to unwind the stack yet. If I understand things right, what you are seeing is the expected behavior --- because e.g. nobody knows whether an exception handler might fix something (or retry, or...) and resume past the exception instead of aborting the block. On 9/5/16 12:30 , Chris Muller wrote: > Hi all, I have some in this code in which I try to read a file and, if > it fails, try to read it in a different way. > > But the order of processing ensure: blocks vs. error-handler blocks is > not what I expected. I expected the ensure: block of the inner > handler to run before the outer handler. > > Here's a simple workspace to demonstrate. The temp var "open" > represents the status of a FileStream. > > |open| open:=nil. > World findATranscript: nil Transcript clear. > [ [ [ "try method1" open:=true. Error signal] ensure: [ open:=false] ] > on: Error > do: > [ : innerErr | "try method2, but file still open!" > Transcript cr; show: 'innerErr handler, open is ', open asString. > innerErr return: > ([ open:=true. > Error signal ] ensure: [ open:=false ]) ] ] > > on: Error > do: [ : outerErr | Transcript cr; show: 'outerErr handler, open is > ', open asString ]. > Transcript cr; show: 'Done. open is ', open asString. > > It seems none of the ensure blocks are processed until after ALL the > error-handler blocks. So if a #fileNamed:do: deep deep in the stack > encounters an Error, the file is still open in the upper-level > handlers, with no good way to close it.. > > From leves at caesar.elte.hu Mon Sep 5 20:49:59 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Sep 5 20:50:04 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling In-Reply-To: References: Message-ID: Exactly. The error handler will add a new frame on top of the stack to handle the error, but #ensure: will only evaluate its argument block when its receiver block has been executed. When the error occurs, #ensure:'s receiver block's frame will be on the stack, somewhere below the error handler block's frame, hence #ensure:'s argument block's evaluation will not have been started at that time. @Chris: If I were you, I wouldn't bother with such magic. Instead, I'd use a linear approach: | isTheFileOpen | isTheFileOpen := false. [ try the first method. isTheFileOpen := true ] ifError: []. isTheFileOpen ifFalse: [ [ try the second method. isTheFileOpen := true ] ifError: []. isTheFileOpen ifFalse: [ [ try the third method. isTheFileOpen := true ] ifError: []. ... ] ]. Levente On Mon, 5 Sep 2016, Andres Valloud wrote: > I'd think the ensure blocks haven't run yet because the return: messages sent > to the exceptions haven't finished, so exception handling hasn't had a chance > to unwind the stack yet. If I understand things right, what you are seeing > is the expected behavior --- because e.g. nobody knows whether an exception > handler might fix something (or retry, or...) and resume past the exception > instead of aborting the block. > > On 9/5/16 12:30 , Chris Muller wrote: >> Hi all, I have some in this code in which I try to read a file and, if >> it fails, try to read it in a different way. >> >> But the order of processing ensure: blocks vs. error-handler blocks is >> not what I expected. I expected the ensure: block of the inner >> handler to run before the outer handler. >> >> Here's a simple workspace to demonstrate. The temp var "open" >> represents the status of a FileStream. >> >> |open| open:=nil. >> World findATranscript: nil Transcript clear. >> [ [ [ "try method1" open:=true. Error signal] ensure: [ open:=false] ] >> on: Error >> do: >> [ : innerErr | "try method2, but file still open!" >> Transcript cr; show: 'innerErr handler, open is ', open asString. >> innerErr return: >> ([ open:=true. >> Error signal ] ensure: [ open:=false ]) ] ] >> >> on: Error >> do: [ : outerErr | Transcript cr; show: 'outerErr handler, open is >> ', open asString ]. >> Transcript cr; show: 'Done. open is ', open asString. >> >> It seems none of the ensure blocks are processed until after ALL the >> error-handler blocks. So if a #fileNamed:do: deep deep in the stack >> encounters an Error, the file is still open in the upper-level >> handlers, with no good way to close it.. >> >> > > From asqueaker at gmail.com Mon Sep 5 22:02:03 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon Sep 5 22:02:47 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling In-Reply-To: References: Message-ID: Thank you. That makes perfect sense, when the Error is signaled, it must enter into the handler *deeper* in the stack (not unwound), and so of course its still IN the first part of the #ensure: method (valuing itself). Got it. @Chris: If I were you, I wouldn't bother with such magic. Instead, I'd use > a linear approach: > > | isTheFileOpen | > isTheFileOpen := false. > [ try the first method. isTheFileOpen := true ] ifError: []. > isTheFileOpen ifFalse: [ > [ try the second method. isTheFileOpen := true ] ifError: []. > isTheFileOpen ifFalse: [ > [ try the third method. isTheFileOpen := true ] ifError: > []. > ... ] ]. Yes, I'll have to go sequential. PS -- I don't care to use ifError: because it doesn't give me access to the Exception object, only its description and receiver. I think it should more closely mirror on: Error do: [ :err | ... ]. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160905/b4673799/attachment.htm From herbertkoenig at gmx.net Mon Sep 5 22:24:51 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Mon Sep 5 22:24:59 2016 Subject: [squeak-dev] Filtering Browser panes In-Reply-To: References: <1bf73ea9-c9c6-c3ae-cdbd-1710abee718d@gmx.net> Message-ID: Thanks Chris, due to not working project save I used 4.4 for development and only now give a recent Squeak a try :-) So I missed a lot of innovations but will stick with 4.4 for serious work. Cheers, Herbert Am 05.09.2016 um 21:37 schrieb Chris Muller: > Hi Herbert, this feature was around long before 5.1. If preference > "Filterable Lists Clear Automatically" is selected, it will clear > automatically when the widget loses focus. Alternatively, you may > press [Enter] / [Return] on the keyboard to clear the filter and keep > the selection, or [Backspace] to clear the filter and return to the > prior selection from which the filter was launched. > > The above is documented in the Prefence Browser under "Filterable > Lists" and "Filterable Lists Clear Automatically". I also made a > video about it: > > https://www.youtube.com/watch?v=11CLNKl5334 > > On Mon, Sep 5, 2016 at 1:46 PM, Herbert K?nig > wrote: > > Hi, > > in 5.1 when hitting a letter while having selected something in a > browser pane this list gets filtered. > > How do i get it unfiltered again? > > Thanks, > > Herbert > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/4f717ba9/attachment.htm From leves at caesar.elte.hu Mon Sep 5 23:02:20 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Sep 5 23:02:25 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling In-Reply-To: References: Message-ID: On Mon, 5 Sep 2016, Chris Muller wrote: > Thank you.? That makes perfect sense, when the Error is signaled, it must enter into the handler *deeper* in the stack (not unwound), and so of course its still IN the first part of the #ensure: method > (valuing itself).? Got it. > @Chris: If I were you, I wouldn't bother with such magic. Instead, I'd use a linear approach: > > | isTheFileOpen | > isTheFileOpen := false. > [ try the first method. isTheFileOpen := true ] ifError: []. > isTheFileOpen ifFalse: [ > ? ? ? ? [ try the second method. isTheFileOpen := true ] ifError: []. > ? ? ? ? isTheFileOpen ifFalse: [ > ? ? ? ? ? ? ? ? [ try the third method. isTheFileOpen := true ] ifError: []. > ? ? ? ? ? ? ? ? ... ] ]. > > > Yes, I'll have to go sequential. > > PS -- I don't care to use ifError: because it doesn't give me access to the Exception object, only its description and receiver.? I think it should more closely mirror on: Error do: [ :err | ... ]. It's too late to change it. It's still useful when you don't care about the error nor the performance of the code. Levente > > > From yakovdk at gmail.com Tue Sep 6 04:22:18 2016 From: yakovdk at gmail.com (yakovdk) Date: Tue Sep 6 04:25:17 2016 Subject: [squeak-dev] Error creating textual references to dropped morphs Message-ID: <1473135738444-4914257.post@n4.nabble.com> I am a Smalltalk newb, so please forgive me if this isn't the right place to go with this. I was following a guide that had me open a workspace, set "Create textual references to dropped morphs", and then drag in a morph from the Workspace. It worked great for me on one machine, which had an older version of Squeak. But on my Mac, I just installed Squeak 5.1 and when I tried this, I got an error about 'nil' not responding to the "isOctetString" message. As I said, I'm a baby smalltalker, but I looked at the older versions of the "acceptDroppingMorph" method on the Workspace class. I found that if I changed the section that reads as follows: (dropee isKindOf: TransferMorph) ifTrue: [reference := dropee passenger. externalName := dropee passenger className] ifFalse: [reference := dropee. dropee externalName]. It looked to me like the "ifFalse" branch fails to set the externalName variable, which makes it nil later on. I changed it to read as follows, and it seems to work fine for me now: (dropee isKindOf: TransferMorph) ifTrue: [reference := dropee passenger. externalName := dropee passenger className] ifFalse: [reference := dropee. externalName := dropee externalName]. As I said, I'm new to the Squeak world, so I'm not sure where or how to send this in to the right place, so please correct me if I should be sending this somewhere else. Thanks! Yakov -- View this message in context: http://forum.world.st/Error-creating-textual-references-to-dropped-morphs-tp4914257.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From herbertkoenig at gmx.net Tue Sep 6 10:19:34 2016 From: herbertkoenig at gmx.net (Herbert =?UTF-8?B?S8O2bmln?=) Date: Tue Sep 6 10:20:08 2016 Subject: [squeak-dev] Error creating textual references to dropped morphs In-Reply-To: <1473135738444-4914257.post@n4.nabble.com> References: <1473135738444-4914257.post@n4.nabble.com> Message-ID: <20160906121934.32775855@herpi5> Hi Yakov, welcome to Squeak! This is the right place for a start. Seems you found a bug and a fix. If noone with commit rights reacts within the next few days post again, prepending the subject with [bug][fix]. The formal Squeak development process is described here: https://squeakboard.wordpress.com/2009/07/02/a-new-community-development-model/ Cheers, Herbert Am Mon, 5 Sep 2016 21:22:18 -0700 (PDT) schrieb yakovdk : > I am a Smalltalk newb, so please forgive me if this isn't the right > place to go with this. I was following a guide that had me open a > workspace, set "Create textual references to dropped morphs", and > then drag in a morph from the Workspace. It worked great for me on > one machine, which had an older version of Squeak. > > But on my Mac, I just installed Squeak 5.1 and when I tried this, I > got an error about 'nil' not responding to the "isOctetString" > message. As I said, I'm a baby smalltalker, but I looked at the > older versions of the "acceptDroppingMorph" method on the Workspace > class. I found that if I changed the section that reads as follows: > > (dropee isKindOf: TransferMorph) > ifTrue: [reference := dropee passenger. > externalName := dropee passenger className] > ifFalse: [reference := dropee. > dropee externalName]. > > It looked to me like the "ifFalse" branch fails to set the > externalName variable, which makes it nil later on. I changed it to > read as follows, and it seems to work fine for me now: > > (dropee isKindOf: TransferMorph) > ifTrue: [reference := dropee passenger. > externalName := dropee passenger className] > ifFalse: [reference := dropee. > externalName := dropee externalName]. > > As I said, I'm new to the Squeak world, so I'm not sure where or how > to send this in to the right place, so please correct me if I should > be sending this somewhere else. > > Thanks! > > Yakov > > > > -- > View this message in context: > http://forum.world.st/Error-creating-textual-references-to-dropped-morphs-tp4914257.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From hannes.hirzel at gmail.com Tue Sep 6 13:55:23 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Tue Sep 6 13:55:28 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> Message-ID: Hello Herbert On Windows you may use DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' to set the host window title. This does not work on Linux though. Regards Hannes On 9/5/16, Herbert K?nig wrote: > Hi, > > other than on RasPi the Windows version 5.1 does not show the image name > in the title bar of the application window. > > Right now I have 6 images busy and on my Windows machine it's hard to > know which is which. > > Oh and I noticed we changed from the Squeak mouse to the Smalltalk > balloon Icon. > > Well I'd prefer the special Squek symbol over the general Smalltalk symbol. > > Cheers, > > Herbert > > > From bert at freudenbergs.de Tue Sep 6 15:33:32 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Sep 6 15:33:36 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> Message-ID: On Tue, Sep 6, 2016 at 3:55 PM, H. Hirzel wrote: > Hello Herbert > > On Windows you may use > > DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' > > to set the host window title. This does not work on Linux though. It used to work on Linux ? we added that for the OLPC project to show the currently loaded Etoys Project. > On 9/5/16, Herbert K?nig wrote: > > Hi, > > > > other than on RasPi the Windows version 5.1 does not show the image name > > in the title bar of the application window. > Sounds like a bug. The Windows VM used to show the image name as default window title. > > Oh and I noticed we changed from the Squeak mouse to the Smalltalk > > balloon Icon. > > > > Well I'd prefer the special Squeak symbol over the general Smalltalk > symbol. > +1 - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/1932a380/attachment.htm From bert at freudenbergs.de Tue Sep 6 15:47:12 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Sep 6 15:47:16 2016 Subject: [squeak-dev] order of ensure: processing vs. error handling In-Reply-To: References: Message-ID: On Tue, Sep 6, 2016 at 1:02 AM, Levente Uzonyi wrote: > On Mon, 5 Sep 2016, Chris Muller wrote: > >> >> PS -- I don't care to use ifError: because it doesn't give me access to >> the Exception object, only its description and receiver. I think it should >> more closely mirror on: Error do: [ :err | ... ]. >> > > It's too late to change it. It's still useful when you don't care about > the error nor the performance of the code. > That's because ifError: is from Smalltalk 80 and predates Exceptions. The old implementation is actually quite amazing in its simplicity. See implementors of #error: and #ifError: in an old Squeak image, e.g. http://try.squeak.org/#zip=http://files.squeak.org/1.1/Squeak1.1.zip - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/77c3f6d1/attachment.htm From commits at source.squeak.org Tue Sep 6 15:53:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 6 15:53:11 2016 Subject: [squeak-dev] The Trunk: Tools-bf.725.mcz Message-ID: Bert Freudenberg uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-bf.725.mcz ==================== Summary ==================== Name: Tools-bf.725 Author: bf Time: 6 September 2016, 5:52:33.688676 pm UUID: 56a8eacc-9562-41ae-88b9-93faf2ab23c5 Ancestors: Tools-tfel.724 Fix 'textual references to dropped morphs' as suggested by Yakov. =============== Diff against Tools-tfel.724 =============== Item was changed: ----- Method: Workspace>>acceptDroppingMorph:event:inMorph: (in category 'drag and drop') ----- acceptDroppingMorph: dropee event: evt inMorph: targetMorph "Return the dropee to its old position, and add a reference to it at the cursor point." | bindingName externalName reference | (dropee isKindOf: TransferMorph) ifTrue: [reference := dropee passenger. externalName := dropee passenger className] ifFalse: [reference := dropee. + externalName := dropee externalName]. - dropee externalName]. externalName := externalName isOctetString ifTrue: [externalName] ifFalse: ['a' , externalName]. bindingName := externalName withFirstCharacterDownshifted , reference identityHash printString. targetMorph correctSelectionWithString: bindingName , ' '. (self bindingOf: bindingName) value: reference. (dropee isKindOf: TransferMorph) ifFalse: [dropee rejectDropMorphEvent: evt]. ^ true"success"! From bert at freudenbergs.de Tue Sep 6 15:55:25 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Sep 6 15:55:28 2016 Subject: [squeak-dev] Error creating textual references to dropped morphs In-Reply-To: <1473135738444-4914257.post@n4.nabble.com> References: <1473135738444-4914257.post@n4.nabble.com> Message-ID: On Tue, Sep 6, 2016 at 6:22 AM, yakovdk wrote: > I am a Smalltalk newb Welcome! > It looked to me like the "ifFalse" branch fails to set the externalName > variable, which makes it nil later on. I changed it to read as follows, > and > it seems to work fine for me now: > > (dropee isKindOf: TransferMorph) > ifTrue: [reference := dropee passenger. > externalName := dropee passenger className] > ifFalse: [reference := dropee. > externalName := dropee externalName]. > That's exactly the right fix. I published it in "Tools-bf.725". If you are using a trunk image you can load updates, otherwise it will be in the next release. Thank you! - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/da6111c3/attachment.htm From tim at rowledge.org Tue Sep 6 16:18:56 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Sep 6 16:19:00 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> Message-ID: > On 06-09-2016, at 8:33 AM, Bert Freudenberg wrote: > > > On Tue, Sep 6, 2016 at 3:55 PM, H. Hirzel wrote: > Hello Herbert > > On Windows you may use > > DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' > > to set the host window title. This does not work on Linux though. > > It used to work on Linux ? we added that for the OLPC project to show the currently loaded Etoys Project. Works on my Pi. > > On 9/5/16, Herbert K?nig wrote: > > Hi, > > > > other than on RasPi the Windows version 5.1 does not show the image name > > in the title bar of the application window. > > Sounds like a bug. The Windows VM used to show the image name as default window title. > > > Oh and I noticed we changed from the Squeak mouse to the Smalltalk > > balloon Icon. > > > > Well I'd prefer the special Squeak symbol over the general Smalltalk symbol. Me too; especially for the 20th anniversary release. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Blurglar: cat burglar that relies on speed From herbertkoenig at gmx.net Tue Sep 6 16:45:47 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Tue Sep 6 16:45:57 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> Message-ID: <2179e3a1-e364-91bc-6032-d412a64ce12c@gmx.net> Thank you Hannes, helps a lot to know who's who when the images are minimized. Herbert Am 06.09.2016 um 15:55 schrieb H. Hirzel: > Hello Herbert > > On Windows you may use > > DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' > > to set the host window title. This does not work on Linux though. > > Regards > Hannes > > On 9/5/16, Herbert K?nig wrote: >> Hi, >> >> other than on RasPi the Windows version 5.1 does not show the image name >> in the title bar of the application window. >> >> Right now I have 6 images busy and on my Windows machine it's hard to >> know which is which. >> >> Oh and I noticed we changed from the Squeak mouse to the Smalltalk >> balloon Icon. >> >> Well I'd prefer the special Squek symbol over the general Smalltalk symbol. >> >> Cheers, >> >> Herbert >> >> >> From cunningham.cb at gmail.com Tue Sep 6 17:08:24 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue Sep 6 17:08:29 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: <2179e3a1-e364-91bc-6032-d412a64ce12c@gmx.net> References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> <2179e3a1-e364-91bc-6032-d412a64ce12c@gmx.net> Message-ID: The problem is that the all-in-one has this line in the squeak.ini file: WindowTitle="Squeak 5.1 (32 bit)" This overrides the default image name, and instead shows "Squeak 5.1 (32 bit)" in the window bar. If you delete this line out of the squeak.ini file, it will once again show the image name. Alternatively, of course, you could give a nice descriptive name for each image that shows in the windows bar instead. -cbc On Tue, Sep 6, 2016 at 9:45 AM, Herbert K?nig wrote: > Thank you Hannes, > > helps a lot to know who's who when the images are minimized. > > > Herbert > > > > Am 06.09.2016 um 15:55 schrieb H. Hirzel: > >> Hello Herbert >> >> On Windows you may use >> >> DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' >> >> to set the host window title. This does not work on Linux though. >> >> Regards >> Hannes >> >> On 9/5/16, Herbert K?nig wrote: >> >>> Hi, >>> >>> other than on RasPi the Windows version 5.1 does not show the image name >>> in the title bar of the application window. >>> >>> Right now I have 6 images busy and on my Windows machine it's hard to >>> know which is which. >>> >>> Oh and I noticed we changed from the Squeak mouse to the Smalltalk >>> balloon Icon. >>> >>> Well I'd prefer the special Squek symbol over the general Smalltalk >>> symbol. >>> >>> Cheers, >>> >>> Herbert >>> >>> >>> >>> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/37ec5a30/attachment.htm From hannes.hirzel at gmail.com Tue Sep 6 17:14:37 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Tue Sep 6 17:14:42 2016 Subject: [squeak-dev] The Trunk: Tools-bf.725.mcz In-Reply-To: <57cee668.868d370a.3bbc3.0b2bSMTPIN_ADDED_MISSING@mx.google.com> References: <57cee668.868d370a.3bbc3.0b2bSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Very useful fix when dealing with Morphc, thank you Yakov and Bert. On Tue, 6 Sep 2016 15:52:39.672 0000, commits@source.squeak.org wrote: > Bert Freudenberg uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-bf.725.mcz > > ==================== Summary ==================== > > Name: Tools-bf.725 > Author: bf > Time: 6 September 2016, 5:52:33.688676 pm > UUID: 56a8eacc-9562-41ae-88b9-93faf2ab23c5 > Ancestors: Tools-tfel.724 > > Fix 'textual references to dropped morphs' as suggested by Yakov. > > =============== Diff against Tools-tfel.724 =============== > > Item was changed: > ----- Method: Workspace>>acceptDroppingMorph:event:inMorph: (in category > 'drag and drop') ----- > acceptDroppingMorph: dropee event: evt inMorph: targetMorph > "Return the dropee to its old position, and add a reference to it at the > cursor point." > | bindingName externalName reference | > (dropee isKindOf: TransferMorph) > ifTrue: [reference := dropee passenger. > externalName := dropee passenger className] > ifFalse: [reference := dropee. > + externalName := dropee externalName]. > - dropee externalName]. > externalName := externalName isOctetString > ifTrue: [externalName] > ifFalse: ['a' , externalName]. > bindingName := externalName withFirstCharacterDownshifted , reference > identityHash printString. > targetMorph correctSelectionWithString: bindingName , ' '. > (self bindingOf: bindingName) > value: reference. > (dropee isKindOf: TransferMorph) > ifFalse: [dropee rejectDropMorphEvent: evt]. > ^ true"success"! > > > From tim at rowledge.org Tue Sep 6 17:19:23 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Sep 6 17:19:28 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> Message-ID: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> So - what about a nice list of all the cool things that have come out of Squeak over the last 20 years? I?ll start with the ones I can remember: Scratch eToys Spoon Cuis Pharo Croquet/OpenCobalt/3DICC-Terf/ Sophie exobox MediaView (remember Interval Research? Of course not, it was so secret nobody knew when it died!) WeatherDimensions MathMorphs Kedama Frank Nile Balloon3D If we can come up with a moderate length list of the top ones I can design a Tshirt graphic to suit. The full list ought to be part of a swiki page, if indeed it isn?t already. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never write software that anthropomorphizes the machine. They hate that. From Lou at Keystone-Software.com Tue Sep 6 17:32:15 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Tue Sep 6 17:32:42 2016 Subject: [squeak-dev] 20 Years of Squeak References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: Hi Tim, Don't forget Seaside (even though I think it started in Pharo, still that counts) and the fact that it has spread to many other Smalltalks like VA Smalltalk, etc. Lou On Tue, 6 Sep 2016 10:19:23 -0700, tim Rowledge wrote: >So - what about a nice list of all the cool things that have come out of Squeak over the last 20 years? > >I?ll start with the ones I can remember: > >Scratch >eToys >Spoon >Cuis >Pharo >Croquet/OpenCobalt/3DICC-Terf/ >Sophie >exobox >MediaView (remember Interval Research? Of course not, it was so secret nobody knew when it died!) >WeatherDimensions >MathMorphs >Kedama >Frank >Nile >Balloon3D > >If we can come up with a moderate length list of the top ones I can design a Tshirt graphic to suit. The full list ought to be part of a swiki page, if indeed it isn?t already. > >tim -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From tim at rowledge.org Tue Sep 6 17:40:21 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Sep 6 17:40:38 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: <1A182A82-FBE1-4A46-B034-717FC4F7B7F6@rowledge.org> > On 06-09-2016, at 10:32 AM, Louis LaBrunda wrote: > > Hi Tim, > > Don't forget Seaside Of course! > (even though I think it started in Pharo, still that counts) It would indeed count even if that were true but in fact Seaside predates Pharo by many years. Which of course raises the question of which Pharo related projects should go on the list? I have no idea but I bet others do... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Calm down -- it's only ones and zeros. From Lou at Keystone-Software.com Tue Sep 6 17:50:53 2016 From: Lou at Keystone-Software.com (Louis LaBrunda) Date: Tue Sep 6 17:51:18 2016 Subject: [squeak-dev] 20 Years of Squeak References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <1A182A82-FBE1-4A46-B034-717FC4F7B7F6@rowledge.org> Message-ID: On Tue, 6 Sep 2016 10:40:21 -0700, tim Rowledge wrote: >> (even though I think it started in Pharo, still that counts) > >It would indeed count even if that were true but in fact Seaside predates Pharo by many years. >Which of course raises the question of which Pharo related projects should go on the list? I have no idea but I bet others do... >tim My mistake, I didn't realize, I thought I first heard about it being released on Pharo. All the better:)) Lou -- Louis LaBrunda Keystone Software Corp. SkypeMe callto://PhotonDemon From cunningham.cb at gmail.com Tue Sep 6 17:57:58 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue Sep 6 17:58:03 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1A182A82-FBE1-4A46-B034-717FC4F7B7F6@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <1A182A82-FBE1-4A46-B034-717FC4F7B7F6@rowledge.org> Message-ID: I think Dr. Geo was originally on Squeak (at least, it was on the squeak list back in 2007). -cbc On Tue, Sep 6, 2016 at 10:40 AM, tim Rowledge wrote: > > > On 06-09-2016, at 10:32 AM, Louis LaBrunda > wrote: > > > > Hi Tim, > > > > Don't forget Seaside > > Of course! > > > (even though I think it started in Pharo, still that counts) > > It would indeed count even if that were true but in fact Seaside predates > Pharo by many years. > Which of course raises the question of which Pharo related projects should > go on the list? I have no idea but I bet others do... > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Calm down -- it's only ones and zeros. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/720c0ee1/attachment.htm From herbertkoenig at gmx.net Tue Sep 6 18:08:20 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Tue Sep 6 18:08:30 2016 Subject: [squeak-dev] Squeak 5.1 Windows doesn't show image name at the Top In-Reply-To: References: <3fb88139-22ff-d679-4702-496f41e9bdd4@gmx.net> <2179e3a1-e364-91bc-6032-d412a64ce12c@gmx.net> Message-ID: <5452be74-8f6f-9a8d-d870-d0970736c34e@gmx.net> Am 06.09.2016 um 19:08 schrieb Chris Cunningham: > The problem is that the all-in-one has this line in the squeak.ini file: > WindowTitle="Squeak 5.1 (32 bit)" > This overrides the default image name, and instead shows "Squeak 5.1 > (32 bit)" in the window bar. > If you delete this line out of the squeak.ini file, it will once again > show the image name. Even better! Thanks. > > Alternatively, of course, you could give a nice descriptive name for > each image that shows in the windows bar instead. > This is what I have done anyway -Herbert > -cbc > > > On Tue, Sep 6, 2016 at 9:45 AM, Herbert K?nig > wrote: > > Thank you Hannes, > > helps a lot to know who's who when the images are minimized. > > > Herbert > > > > Am 06.09.2016 um 15:55 schrieb H. Hirzel: > > Hello Herbert > > On Windows you may use > > DisplayScreen hostWindowTitle: 'Squeak 5.1 Prod-32bit' > > to set the host window title. This does not work on Linux though. > > Regards > Hannes > > On 9/5/16, Herbert K?nig > wrote: > > Hi, > > other than on RasPi the Windows version 5.1 does not show > the image name > in the title bar of the application window. > > Right now I have 6 images busy and on my Windows machine > it's hard to > know which is which. > > Oh and I noticed we changed from the Squeak mouse to the > Smalltalk > balloon Icon. > > Well I'd prefer the special Squek symbol over the general > Smalltalk symbol. > > Cheers, > > Herbert > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/d4719c2d/attachment.htm From hannes.hirzel at gmail.com Tue Sep 6 20:30:55 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Tue Sep 6 20:31:01 2016 Subject: [squeak-dev] Fwd: [aida] 20 Years of Aida/Web In-Reply-To: References: Message-ID: FYI, another piece of software for Squeak -- ported 2007 to Squeak. I don't know about the current support in Squeak 5.1 --Hannes ---------- Forwarded message ---------- From: Janko Miv?ek Date: Tue, 6 Sep 2016 20:40:22 +0200 Subject: [aida] 20 Years of Aida/Web To: Aida/Web general discussion list Hi everybody, It happens that Squeak and Aida were actually born on the same year. Namely, at summer 1996 the Aida development started and late in this year a first Aida project was already online: a bookstore for a major Slovenian publisher. The next most important milestones: - 1998: a Gas Billing System was developed as a pure web application with Aida, heading Aida primarily into business web app domain; - 2000 Aida becomes Open Sourced and introduced more broadly at first Camp Smalltalk in San Diego; - 2006: Ajax support, just few months after Ajax was coined, Aida already had a fully integrated and seamless Ajax; - 2007: Squeak port, a website, mailing list, community building - 2009: Aida logo and new website design - 2011: Realtime with WebSockets, HTML5, mobile Even that it is currently quiet in the community, Aida is evolving and consolidating all HTML5 and realtime achievements in 'HTML5 rush years', running daily internal web portals in companies, like for ISO9000 Quality Management doc systems, Gas Pipeline Measure Management etc. It certainly proved that its architecture is sound enough to stand the test of a time for past 20 years, so it certainly will for many more years to come. Best regards Janko _______________________________________________ Aida mailing list Aida@aidaweb.si http://lists.aidaweb.si/mailman/listinfo/aida From commits at source.squeak.org Tue Sep 6 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 6 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160906215508.14814.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068919.html Name: Tools-bf.725 Ancestors: Tools-tfel.724 Fix 'textual references to dropped morphs' as suggested by Yakov. ============================================= From ma.chris.m at gmail.com Tue Sep 6 22:21:16 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Sep 6 22:22:01 2016 Subject: [squeak-dev] What is the Squeak VM binaries location and configuration? Message-ID: Hi all, one of my workmates (who is a Smalltalk veteran) just asked me how to run a Spur image I had given him. That this question needs to be asked by someone like him should tell us something about our current VM accessibility, but the fact I was unable to give him a straight answer, even moreso. Shouldn't it be obvious enough even for newbies, but there are so many plausible answers to this question which are simply incorrect: - squeakvm.org is only for old interpreter VM; totally misleading to a newbie. - It *does* have a reference to the "Unofficial and experimental "Cog" virtual machines" which leads new users to: http://www.mirandabanda.org/files/Cog/VM/ whereupon we have "lattest" and "stable". Great! - Not great, because those are actually old too. So squeakvm.org is just a wild-goose chase, ha ha sorry newbie.. :( - Sigh, okay, so what about squeak.org --> Downloads? Surely there's a recent VM there? Well, selecting the Linux (x86) link lets me download Squeak5.1-16548-32bit-201608171728-Linux.zip. However, this file organizes the VM in a totally non-standard way (everything under /bin, no /lib directory), so I didn't want to point him to that one, because we have existing scripts which assume the legacy organization and I don't want to wrestle with installation / configuration issues. - SO, I was about to let him him in on the github whipper-snapper secret that only a few, In-The-Know Squeak Elites know about, myself, learned only a couple of days ago! https://bintray.com/opensmalltalk/vm/cog/#files but its this massive jumbled list of a hundred or more tar files. I can sort them by name, and *I* can find the right VM tarball for myself, but how to tell someone else? Searching that web page for "linux32x86_squeak.cog.spur" will find just 12, from which I can select one of the many generated all in the same day? So is there still a "stable" version? Whew! So, 1) what is the best answer for my workmate, and 2) how can we make this easier? Thanks. From ma.chris.m at gmail.com Tue Sep 6 22:23:48 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Sep 6 22:24:33 2016 Subject: [squeak-dev] Re: What is the Squeak VM binaries location and configuration? In-Reply-To: References: Message-ID: > 1) what is the best answer for my workmate, and > 2) how can we make this easier? 3) which files at https://bintray.com/opensmalltalk/vm/cog/#files are the "HT" versions of the VM, and which are the non-HT? From leves at caesar.elte.hu Tue Sep 6 22:46:41 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 6 22:46:45 2016 Subject: [squeak-dev] What is the Squeak VM binaries location and configuration? In-Reply-To: References: Message-ID: On Tue, 6 Sep 2016, Chris Muller wrote: > Hi all, one of my workmates (who is a Smalltalk veteran) just asked me > how to run a Spur image I had given him. That this question needs to > be asked by someone like him should tell us something about our > current VM accessibility, but the fact I was unable to give him a > straight answer, even moreso. > > Shouldn't it be obvious enough even for newbies, but there are so many > plausible answers to this question which are simply incorrect: > > - squeakvm.org is only for old interpreter VM; totally misleading > to a newbie. > > - It *does* have a reference to the "Unofficial and experimental > "Cog" virtual machines" which leads new users to: > > http://www.mirandabanda.org/files/Cog/VM/ > > whereupon we have "lattest" and "stable". Great! > > - Not great, because those are actually old too. So squeakvm.org > is just a wild-goose chase, ha ha sorry newbie.. :( > > - Sigh, okay, so what about squeak.org --> Downloads? Surely > there's a recent VM there? > > Well, selecting the Linux (x86) link lets me download > Squeak5.1-16548-32bit-201608171728-Linux.zip. However, this file > organizes the VM in a totally non-standard way (everything under /bin, > no /lib directory), so I didn't want to point him to that one, because > we have existing scripts which assume the legacy organization and I > don't want to wrestle with installation / configuration issues. > > - SO, I was about to let him him in on the github whipper-snapper > secret that only a few, In-The-Know Squeak Elites know about, myself, > learned only a couple of days ago! > > https://bintray.com/opensmalltalk/vm/cog/#files > > but its this massive jumbled list of a hundred or more tar files. I > can sort them by name, and *I* can find the right VM tarball for > myself, but how to tell someone else? Searching that web page for > "linux32x86_squeak.cog.spur" will find just 12, from which I can > select one of the many generated all in the same day? So is there > still a "stable" version? > > Whew! So, > > 1) what is the best answer for my workmate, and http://squeak.org/downloads/ > 2) how can we make this easier? Perhaps a wizard-like thing on the website could help. Levente > > Thanks. > > From leves at caesar.elte.hu Tue Sep 6 22:47:10 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 6 22:47:13 2016 Subject: [squeak-dev] Re: What is the Squeak VM binaries location and configuration? In-Reply-To: References: Message-ID: On Tue, 6 Sep 2016, Chris Muller wrote: >> 1) what is the best answer for my workmate, and >> 2) how can we make this easier? > > 3) which files at https://bintray.com/opensmalltalk/vm/cog/#files are > the "HT" versions of the VM, and which are the non-HT? I don't think such versions are being built. Levente > > From leves at caesar.elte.hu Tue Sep 6 22:48:46 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 6 22:48:53 2016 Subject: [squeak-dev] Re: What is the Squeak VM binaries location and configuration? In-Reply-To: References: Message-ID: On Wed, 7 Sep 2016, Levente Uzonyi wrote: > On Tue, 6 Sep 2016, Chris Muller wrote: > >>> 1) what is the best answer for my workmate, and >>> 2) how can we make this easier? >> >> 3) which files at https://bintray.com/opensmalltalk/vm/cog/#files are >> the "HT" versions of the VM, and which are the non-HT? > > I don't think such versions are being built. I mean all those VMs are HT. It's a bit easier to browse the latest files only instead of all: https://bintray.com/opensmalltalk/vm/cog/201609061454#files Levente > > Levente > >> >> > > From frank.shearar at gmail.com Wed Sep 7 05:21:27 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed Sep 7 05:21:31 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: DabbleDB! frank On 6 September 2016 at 10:19, tim Rowledge wrote: > So - what about a nice list of all the cool things that have come out of > Squeak over the last 20 years? > > I?ll start with the ones I can remember: > > Scratch > eToys > Spoon > Cuis > Pharo > Croquet/OpenCobalt/3DICC-Terf/ > Sophie > exobox > MediaView (remember Interval Research? Of course not, it was so secret > nobody knew when it died!) > WeatherDimensions > MathMorphs > Kedama > Frank > Nile > Balloon3D > > If we can come up with a moderate length list of the top ones I can design > a Tshirt graphic to suit. The full list ought to be part of a swiki page, > if indeed it isn?t already. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Never write software that anthropomorphizes the machine. They hate that. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/18fca8a7/attachment-0001.htm From frank.shearar at gmail.com Wed Sep 7 05:22:16 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed Sep 7 05:22:19 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: The Refactoring Browser! frank On 6 September 2016 at 22:21, Frank Shearar wrote: > DabbleDB! > > frank > > On 6 September 2016 at 10:19, tim Rowledge wrote: > >> So - what about a nice list of all the cool things that have come out of >> Squeak over the last 20 years? >> >> I?ll start with the ones I can remember: >> >> Scratch >> eToys >> Spoon >> Cuis >> Pharo >> Croquet/OpenCobalt/3DICC-Terf/ >> Sophie >> exobox >> MediaView (remember Interval Research? Of course not, it was so secret >> nobody knew when it died!) >> WeatherDimensions >> MathMorphs >> Kedama >> Frank >> Nile >> Balloon3D >> >> If we can come up with a moderate length list of the top ones I can >> design a Tshirt graphic to suit. The full list ought to be part of a swiki >> page, if indeed it isn?t already. >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Never write software that anthropomorphizes the machine. They hate that. >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160906/a96d050e/attachment.htm From Yoshiki.Ohshima at acm.org Wed Sep 7 06:52:24 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Sep 7 06:52:27 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: With a 5.0 based image and a VM with VM version: " 'Croquet Closure Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1044] Squeak Cog Spur 5.0.3248'", and RFB-ul.13, I still get the error. (I wanted to mail the SqueakDebug.log but I have been encountering another problem. The VM somehow loses an ability to read and write files and the debugger only shows decompiled code and calling Debugger>>storeLog manually does not produce a file.) There is no reason to stick with a 5.0 image so I'll move on to 5.1 and see what happens. On Fri, Sep 2, 2016 at 4:27 PM, Yoshiki Ohshima wrote: > Thanks. I was not aware of those newer versions. I'll give it a try. > > > On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi wrote: >> Hi Yoshiki, >> >> Your symptom doesn't ring a bell. I don't know what settings your client >> program has, but with other clients it usually helps to set the color space >> to 24-bits and the encoding to ZRLE. >> >> You can try to enable logging on RFBServer to see what happens when your >> client gets disconnected. >> >> We have improved the RFB package over the years[1], but I don't think any of >> our changes would be related to your problem. (If your image is 5.0, then >> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >> >> Levente >> >> [1] http://leves.web.elte.hu/squeak/ >> >> >> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >> >>> Hi, >>> >>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>> >>> http://www.squeaksource.com/RFB/ >>> >>> with the Mac OS ScreenShare client. >>> >>> The Mac OS client can connect to the server but after 10 seconds or >>> so, the server raises an error. >>> >>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>> Is the newer version better at running RFB? >>> >>> (The client has some other issues. I'll track them down later.) >>> >>> -- >>> -- Yoshiki >>> >>> >> > > > > -- > -- Yoshiki -- -- Yoshiki From bert at freudenbergs.de Wed Sep 7 08:19:09 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 7 08:19:13 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: On Wednesday, 7 September 2016, Frank Shearar wrote: > The Refactoring Browser! > Do you mean OmniBrowser? I think RB is older. We should only list projects that genuinely started with Squeak (even if some of our children disclaim their heritage). And we should acknowledge Smalltalk-80 if possible. I'll leave that to the designer ;) - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160907/22746672/attachment.htm From bert at freudenbergs.de Wed Sep 7 10:42:05 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 7 10:42:09 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: How about Pyonkee? Most prominent Squeak app in the iOS App Store I'd say. Also, impara's Plopp. Invented the "all-in-one" VM+image bundle, and actually was on store shelves in a shiny box on CD-ROM. Also maybe VMs? Cog, RSqueak, SqueakJS? - Bert - On Tuesday, 6 September 2016, tim Rowledge wrote: > So - what about a nice list of all the cool things that have come out of > Squeak over the last 20 years? > > I?ll start with the ones I can remember: > > Scratch > eToys > Spoon > Cuis > Pharo > Croquet/OpenCobalt/3DICC-Terf/ > Sophie > exobox > MediaView (remember Interval Research? Of course not, it was so secret > nobody knew when it died!) > WeatherDimensions > MathMorphs > Kedama > Frank > Nile > Balloon3D > > If we can come up with a moderate length list of the top ones I can design > a Tshirt graphic to suit. The full list ought to be part of a swiki page, > if indeed it isn?t already. > > tim > -- > tim Rowledge; tim@rowledge.org ; http://www.rowledge.org/tim > Never write software that anthropomorphizes the machine. They hate that. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160907/45a79eb8/attachment.htm From btc at openinworld.com Wed Sep 7 13:12:52 2016 From: btc at openinworld.com (Ben Coman) Date: Wed Sep 7 13:13:17 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: Did JUnit derive from SUnit? Some directed arrows showing Smalltalk ideas moving into other domains might be interesting. cheers -ben On Wed, Sep 7, 2016 at 6:42 PM, Bert Freudenberg wrote: > How about Pyonkee? Most prominent Squeak app in the iOS App Store I'd say. > > Also, impara's Plopp. Invented the "all-in-one" VM+image bundle, and > actually was on store shelves in a shiny box on CD-ROM. > > Also maybe VMs? Cog, RSqueak, SqueakJS? > > - Bert - > > > On Tuesday, 6 September 2016, tim Rowledge wrote: >> >> So - what about a nice list of all the cool things that have come out of >> Squeak over the last 20 years? >> >> I?ll start with the ones I can remember: >> >> Scratch >> eToys >> Spoon >> Cuis >> Pharo >> Croquet/OpenCobalt/3DICC-Terf/ >> Sophie >> exobox >> MediaView (remember Interval Research? Of course not, it was so secret >> nobody knew when it died!) >> WeatherDimensions >> MathMorphs >> Kedama >> Frank >> Nile >> Balloon3D >> >> If we can come up with a moderate length list of the top ones I can design >> a Tshirt graphic to suit. The full list ought to be part of a swiki page, if >> indeed it isn?t already. >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Never write software that anthropomorphizes the machine. They hate that. >> >> >> > > > From lewis at mail.msen.com Wed Sep 7 13:26:12 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Sep 7 13:26:16 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: <20160907132612.GA62317@shell.msen.com> On Wed, Sep 07, 2016 at 09:12:52PM +0800, Ben Coman wrote: > Did JUnit derive from SUnit? Some directed arrows showing Smalltalk > ideas moving into other domains might be interesting. > > cheers -ben Yes it originated in Smalltalk, but it predates Squeak. Kent Beck gets the credit https://en.wikipedia.org/wiki/SUnit As a separate exercise, it might be fun to compile a list of good ideas that started in Smalltalk, but were later advertised as amazing new technology in e.g. Java ;-) Dave > > On Wed, Sep 7, 2016 at 6:42 PM, Bert Freudenberg wrote: > > How about Pyonkee? Most prominent Squeak app in the iOS App Store I'd say. > > > > Also, impara's Plopp. Invented the "all-in-one" VM+image bundle, and > > actually was on store shelves in a shiny box on CD-ROM. > > > > Also maybe VMs? Cog, RSqueak, SqueakJS? > > > > - Bert - > > > > > > On Tuesday, 6 September 2016, tim Rowledge wrote: > >> > >> So - what about a nice list of all the cool things that have come out of > >> Squeak over the last 20 years? > >> > >> I???ll start with the ones I can remember: > >> > >> Scratch > >> eToys > >> Spoon > >> Cuis > >> Pharo > >> Croquet/OpenCobalt/3DICC-Terf/ > >> Sophie > >> exobox > >> MediaView (remember Interval Research? Of course not, it was so secret > >> nobody knew when it died!) > >> WeatherDimensions > >> MathMorphs > >> Kedama > >> Frank > >> Nile > >> Balloon3D > >> > >> If we can come up with a moderate length list of the top ones I can design > >> a Tshirt graphic to suit. The full list ought to be part of a swiki page, if > >> indeed it isn???t already. > >> > >> tim > >> -- > >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > >> Never write software that anthropomorphizes the machine. They hate that. > >> > >> > >> > > > > > > From stephan at stack.nl Wed Sep 7 16:45:26 2016 From: stephan at stack.nl (Stephan Eggermont) Date: Wed Sep 7 16:45:42 2016 Subject: [squeak-dev] Re: 20 Years of Squeak In-Reply-To: <20160907132612.GA62317@shell.msen.com> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160907132612.GA62317@shell.msen.com> Message-ID: On 07/09/16 15:26, David T. Lewis wrote: > As a separate exercise, it might be fun to compile a list of good > ideas that started in Smalltalk, but were later advertised as amazing > new technology in e.g. Java ;-) Sorry Dave, can't print those on a T-shirt in a readable size. Stephan From lewis at mail.msen.com Wed Sep 7 16:49:03 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Sep 7 16:49:07 2016 Subject: [squeak-dev] Re: 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160907132612.GA62317@shell.msen.com> Message-ID: <27204.136.1.1.169.1473266943.squirrel@webmail.msen.com> > On 07/09/16 15:26, David T. Lewis wrote: >> As a separate exercise, it might be fun to compile a list of good >> ideas that started in Smalltalk, but were later advertised as amazing >> new technology in e.g. Java ;-) > > Sorry Dave, can't print those on a T-shirt in a readable size. > > Stephan > > Maybe we could sell them only in extra-long shirt sizes. From tim at rowledge.org Wed Sep 7 17:40:22 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed Sep 7 17:40:25 2016 Subject: [squeak-dev] Re: 20 Years of Squeak In-Reply-To: <27204.136.1.1.169.1473266943.squirrel@webmail.msen.com> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160907132612.GA62317@shell.msen.com> <27204.136.1.1.169.1473266943.squirrel@webmail.msen.com> Message-ID: > On 07-09-2016, at 9:49 AM, David T. Lewis wrote: > >> On 07/09/16 15:26, David T. Lewis wrote: >>> As a separate exercise, it might be fun to compile a list of good >>> ideas that started in Smalltalk, but were later advertised as amazing >>> new technology in e.g. Java ;-) >> >> Sorry Dave, can't print those on a T-shirt in a readable size. >> >> Stephan >> >> > > Maybe we could sell them only in extra-long shirt sizes. I understand there are applications that can take large datasets and create directed graphs to illustrate the connections. I think we might need a very large poster printer to produce a hard-copy version. Like https://charge.wisc.edu/botany/images/Tree_of_life_1000w.png But I really don?t think anything like every interesting idea is going to fit on a Tshirt. I think probably more like 20 (seems a propitious number) items would be good. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Beware of programmers who carry screwdrivers. From Yoshiki.Ohshima at acm.org Wed Sep 7 17:45:26 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Sep 7 17:45:30 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: In the console, there are bunch of messages like this: RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionTimedOut: send data timeout; data not sent RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: caught ConnectionTimedOut: send data timeout; data not sent RFB: caught ConnectionClosed: Connection close while waiting for data. It basically reset the connection every some milliseconds and reconnect. I browsed code and RFBSocket>>waitForSendDoneFor: looks suspicious; but some number fudging in that method on my end did not help. (This excessive OS resource use may explain my other issue of getting to the state of the VM cannot write or read a file...) On Tue, Sep 6, 2016 at 11:52 PM, Yoshiki Ohshima wrote: > With a 5.0 based image and a VM with VM version: " 'Croquet Closure > Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1044] Squeak Cog > Spur 5.0.3248'", and RFB-ul.13, I still get the error. > > (I wanted to mail the SqueakDebug.log but I have been encountering > another problem. The VM somehow loses an ability to read and write > files and the debugger only shows decompiled code and calling > Debugger>>storeLog manually does not produce a file.) > > There is no reason to stick with a 5.0 image so I'll move on to 5.1 > and see what happens. > > On Fri, Sep 2, 2016 at 4:27 PM, Yoshiki Ohshima wrote: >> Thanks. I was not aware of those newer versions. I'll give it a try. >> >> >> On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi wrote: >>> Hi Yoshiki, >>> >>> Your symptom doesn't ring a bell. I don't know what settings your client >>> program has, but with other clients it usually helps to set the color space >>> to 24-bits and the encoding to ZRLE. >>> >>> You can try to enable logging on RFBServer to see what happens when your >>> client gets disconnected. >>> >>> We have improved the RFB package over the years[1], but I don't think any of >>> our changes would be related to your problem. (If your image is 5.0, then >>> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >>> >>> Levente >>> >>> [1] http://leves.web.elte.hu/squeak/ >>> >>> >>> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >>> >>>> Hi, >>>> >>>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>>> >>>> http://www.squeaksource.com/RFB/ >>>> >>>> with the Mac OS ScreenShare client. >>>> >>>> The Mac OS client can connect to the server but after 10 seconds or >>>> so, the server raises an error. >>>> >>>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>>> Is the newer version better at running RFB? >>>> >>>> (The client has some other issues. I'll track them down later.) >>>> >>>> -- >>>> -- Yoshiki >>>> >>>> >>> >> >> >> >> -- >> -- Yoshiki > > > > -- > -- Yoshiki -- -- Yoshiki From leves at caesar.elte.hu Wed Sep 7 18:07:31 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Wed Sep 7 18:07:37 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: Have you tried enabling logging or debugging? You can do by opening the server widget from the Wolrd menu, open..., RFB/VNCServer. The best is to pin it. The widget has a debugging submenu where you can enable logging and debugging, and you can open the server log too. Seeing those messages, it seems your client is trying to detect the encoding and/or color depth. Setting them before connecting should help in this case. Levente On Wed, 7 Sep 2016, Yoshiki Ohshima wrote: > In the console, there are bunch of messages like this: > > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionTimedOut: send data timeout; data not sent > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionClosed: Connection close while waiting for data. > RFB: caught ConnectionTimedOut: send data timeout; data not sent > RFB: caught ConnectionClosed: Connection close while waiting for data. > > It basically reset the connection every some milliseconds and > reconnect. I browsed code and RFBSocket>>waitForSendDoneFor: looks > suspicious; but some number fudging in that method on my end did not > help. > > (This excessive OS resource use may explain my other issue of getting > to the state of the VM cannot write or read a file...) > > On Tue, Sep 6, 2016 at 11:52 PM, Yoshiki Ohshima > wrote: >> With a 5.0 based image and a VM with VM version: " 'Croquet Closure >> Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1044] Squeak Cog >> Spur 5.0.3248'", and RFB-ul.13, I still get the error. >> >> (I wanted to mail the SqueakDebug.log but I have been encountering >> another problem. The VM somehow loses an ability to read and write >> files and the debugger only shows decompiled code and calling >> Debugger>>storeLog manually does not produce a file.) >> >> There is no reason to stick with a 5.0 image so I'll move on to 5.1 >> and see what happens. >> >> On Fri, Sep 2, 2016 at 4:27 PM, Yoshiki Ohshima wrote: >>> Thanks. I was not aware of those newer versions. I'll give it a try. >>> >>> >>> On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi wrote: >>>> Hi Yoshiki, >>>> >>>> Your symptom doesn't ring a bell. I don't know what settings your client >>>> program has, but with other clients it usually helps to set the color space >>>> to 24-bits and the encoding to ZRLE. >>>> >>>> You can try to enable logging on RFBServer to see what happens when your >>>> client gets disconnected. >>>> >>>> We have improved the RFB package over the years[1], but I don't think any of >>>> our changes would be related to your problem. (If your image is 5.0, then >>>> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >>>> >>>> Levente >>>> >>>> [1] http://leves.web.elte.hu/squeak/ >>>> >>>> >>>> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >>>> >>>>> Hi, >>>>> >>>>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>>>> >>>>> http://www.squeaksource.com/RFB/ >>>>> >>>>> with the Mac OS ScreenShare client. >>>>> >>>>> The Mac OS client can connect to the server but after 10 seconds or >>>>> so, the server raises an error. >>>>> >>>>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>>>> Is the newer version better at running RFB? >>>>> >>>>> (The client has some other issues. I'll track them down later.) >>>>> >>>>> -- >>>>> -- Yoshiki >>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> -- Yoshiki >> >> >> >> -- >> -- Yoshiki > > > > -- > -- Yoshiki > > From Yoshiki.Ohshima at acm.org Wed Sep 7 18:58:32 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed Sep 7 18:58:37 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: I'll try that. BTW, on my Mac the VM Squeak5.1-16548-32bit-All-in-One crashes as soon as I type a tab key and more or less consistently. Is this a known issue? On Wed, Sep 7, 2016 at 11:07 AM, Levente Uzonyi wrote: > Have you tried enabling logging or debugging? > You can do by opening the server widget from the Wolrd menu, open..., > RFB/VNCServer. The best is to pin it. > The widget has a debugging submenu where you can enable logging and > debugging, and you can open the server log too. > > Seeing those messages, it seems your client is trying to detect the encoding > and/or color depth. Setting them before connecting should help in this case. > > Levente > > > On Wed, 7 Sep 2016, Yoshiki Ohshima wrote: > >> In the console, there are bunch of messages like this: >> >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionTimedOut: send data timeout; data not sent >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> RFB: caught ConnectionTimedOut: send data timeout; data not sent >> RFB: caught ConnectionClosed: Connection close while waiting for data. >> >> It basically reset the connection every some milliseconds and >> reconnect. I browsed code and RFBSocket>>waitForSendDoneFor: looks >> suspicious; but some number fudging in that method on my end did not >> help. >> >> (This excessive OS resource use may explain my other issue of getting >> to the state of the VM cannot write or read a file...) >> >> On Tue, Sep 6, 2016 at 11:52 PM, Yoshiki Ohshima >> wrote: >>> >>> With a 5.0 based image and a VM with VM version: " 'Croquet Closure >>> Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1044] Squeak Cog >>> Spur 5.0.3248'", and RFB-ul.13, I still get the error. >>> >>> (I wanted to mail the SqueakDebug.log but I have been encountering >>> another problem. The VM somehow loses an ability to read and write >>> files and the debugger only shows decompiled code and calling >>> Debugger>>storeLog manually does not produce a file.) >>> >>> There is no reason to stick with a 5.0 image so I'll move on to 5.1 >>> and see what happens. >>> >>> On Fri, Sep 2, 2016 at 4:27 PM, Yoshiki Ohshima >>> wrote: >>>> >>>> Thanks. I was not aware of those newer versions. I'll give it a try. >>>> >>>> >>>> On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi >>>> wrote: >>>>> >>>>> Hi Yoshiki, >>>>> >>>>> Your symptom doesn't ring a bell. I don't know what settings your >>>>> client >>>>> program has, but with other clients it usually helps to set the color >>>>> space >>>>> to 24-bits and the encoding to ZRLE. >>>>> >>>>> You can try to enable logging on RFBServer to see what happens when >>>>> your >>>>> client gets disconnected. >>>>> >>>>> We have improved the RFB package over the years[1], but I don't think >>>>> any of >>>>> our changes would be related to your problem. (If your image is 5.0, >>>>> then >>>>> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >>>>> >>>>> Levente >>>>> >>>>> [1] http://leves.web.elte.hu/squeak/ >>>>> >>>>> >>>>> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>>>>> >>>>>> http://www.squeaksource.com/RFB/ >>>>>> >>>>>> with the Mac OS ScreenShare client. >>>>>> >>>>>> The Mac OS client can connect to the server but after 10 seconds or >>>>>> so, the server raises an error. >>>>>> >>>>>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>>>>> Is the newer version better at running RFB? >>>>>> >>>>>> (The client has some other issues. I'll track them down later.) >>>>>> >>>>>> -- >>>>>> -- Yoshiki >>>>>> >>>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> -- Yoshiki >>> >>> >>> >>> >>> -- >>> -- Yoshiki >> >> >> >> >> -- >> -- Yoshiki >> >> > -- -- Yoshiki From asqueaker at gmail.com Wed Sep 7 21:00:47 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Sep 7 21:01:31 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: An even newer version based on Levente's RFB with some usability improvements is at: http://source.squeak.org/ss On Fri, Sep 2, 2016 at 6:27 PM, Yoshiki Ohshima wrote: > Thanks. I was not aware of those newer versions. I'll give it a try. > > > On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi wrote: >> Hi Yoshiki, >> >> Your symptom doesn't ring a bell. I don't know what settings your client >> program has, but with other clients it usually helps to set the color space >> to 24-bits and the encoding to ZRLE. >> >> You can try to enable logging on RFBServer to see what happens when your >> client gets disconnected. >> >> We have improved the RFB package over the years[1], but I don't think any of >> our changes would be related to your problem. (If your image is 5.0, then >> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >> >> Levente >> >> [1] http://leves.web.elte.hu/squeak/ >> >> >> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >> >>> Hi, >>> >>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>> >>> http://www.squeaksource.com/RFB/ >>> >>> with the Mac OS ScreenShare client. >>> >>> The Mac OS client can connect to the server but after 10 seconds or >>> so, the server raises an error. >>> >>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>> Is the newer version better at running RFB? >>> >>> (The client has some other issues. I'll track them down later.) >>> >>> -- >>> -- Yoshiki >>> >>> >> > > > > -- > -- Yoshiki > From jecel at merlintec.com Wed Sep 7 23:47:26 2016 From: jecel at merlintec.com (Jecel Assumpcao Jr.) Date: Wed Sep 7 23:47:36 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: <20160907234731.72D83A221293@bart0101.email.locaweb.com.br> If you want to add SilliconSqueak to the list of Squeak based projects, you might find the slides for my PhD defense interesting (sadly in Prezi instead of Squeak, unlike many of my other presentations): > https://prezi.com/yhw-a3i0rnri/adaptive-compilation-for-an-object-oriented-and-reconfigurab/ -- Jecel From frank.shearar at gmail.com Thu Sep 8 02:08:19 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Sep 8 02:08:23 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: On 7 September 2016 at 01:19, Bert Freudenberg wrote: > On Wednesday, 7 September 2016, Frank Shearar > wrote: > >> The Refactoring Browser! >> > > Do you mean OmniBrowser? I think RB is older. > > We should only list projects that genuinely started with Squeak (even if > some of our children disclaim their heritage). And we should acknowledge > Smalltalk-80 if possible. I'll leave that to the designer ;) > I meant John Brant's and Don Roberts' Refactoring Browser (which came from/was for VisualWorks). And you're right. I got carried away by the "get off my lawn, copycats" excitement. frank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160907/1f49ba51/attachment.htm From Yoshiki.Ohshima at acm.org Thu Sep 8 02:56:59 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Sep 8 02:57:03 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: On Tue, Sep 6, 2016 at 10:19 AM, tim Rowledge wrote: > So - what about a nice list of all the cool things that have come out of Squeak over the last 20 years? > > I?ll start with the ones I can remember: > > Scratch > eToys > Spoon > Cuis > Pharo > Croquet/OpenCobalt/3DICC-Terf/ > Sophie > exobox > MediaView (remember Interval Research? Of course not, it was so secret nobody knew when it died!) > WeatherDimensions > MathMorphs > Kedama > Frank > Nile > Balloon3D Great! Along this line, I think Tweak deserves a special spot. -- -- Yoshiki From smalltalker2 at mac.com Thu Sep 8 03:03:09 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Thu Sep 8 03:03:18 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: <8E6C6F2D-F12C-45B4-BD8C-6173437581A7@mac.com> All the xUnit frameworks were derived from SUnit. Sent from my iPhone > On Sep 7, 2016, at 06:12, Ben Coman wrote: > > Did JUnit derive from SUnit? Some directed arrows showing Smalltalk > ideas moving into other domains might be interesting. > > cheers -ben > >> On Wed, Sep 7, 2016 at 6:42 PM, Bert Freudenberg wrote: >> How about Pyonkee? Most prominent Squeak app in the iOS App Store I'd say. >> >> Also, impara's Plopp. Invented the "all-in-one" VM+image bundle, and >> actually was on store shelves in a shiny box on CD-ROM. >> >> Also maybe VMs? Cog, RSqueak, SqueakJS? >> >> - Bert - >> >> >>> On Tuesday, 6 September 2016, tim Rowledge wrote: >>> >>> So - what about a nice list of all the cool things that have come out of >>> Squeak over the last 20 years? >>> >>> I?ll start with the ones I can remember: >>> >>> Scratch >>> eToys >>> Spoon >>> Cuis >>> Pharo >>> Croquet/OpenCobalt/3DICC-Terf/ >>> Sophie >>> exobox >>> MediaView (remember Interval Research? Of course not, it was so secret >>> nobody knew when it died!) >>> WeatherDimensions >>> MathMorphs >>> Kedama >>> Frank >>> Nile >>> Balloon3D >>> >>> If we can come up with a moderate length list of the top ones I can design >>> a Tshirt graphic to suit. The full list ought to be part of a swiki page, if >>> indeed it isn?t already. >>> >>> tim >>> -- >>> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >>> Never write software that anthropomorphizes the machine. They hate that. > From ma.chris.m at gmail.com Thu Sep 8 03:02:43 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu Sep 8 03:03:27 2016 Subject: [squeak-dev] Method strings containing it Message-ID: Pressing Shift+Cmd+E is "Method strings containing it". It opens a Method browser, used to be only on the methods with String literals which contained the selected string. Now, however, it is returning methods whose source code text contains that string anywhere, which is almost never what I want, plus there was already a capability to search method source code for a string. Did something get broke here? From asqueaker at gmail.com Thu Sep 8 03:07:38 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Sep 8 03:08:22 2016 Subject: [squeak-dev] Method strings containing it In-Reply-To: References: Message-ID: I also noticed, pressing Shift+Cmd+E is not producing the same results as Control+e. Control keys are supposed to be the same as the uppercase Cmd of that same letter.. On Wed, Sep 7, 2016 at 10:02 PM, Chris Muller wrote: > Pressing Shift+Cmd+E is "Method strings containing it". It opens a > Method browser, used to be only on the methods with String literals > which contained the selected string. > > Now, however, it is returning methods whose source code text contains > that string anywhere, which is almost never what I want, plus there > was already a capability to search method source code for a string. > > Did something get broke here? > From yakovdk at gmail.com Thu Sep 8 03:55:47 2016 From: yakovdk at gmail.com (yakovdk) Date: Thu Sep 8 03:59:00 2016 Subject: [squeak-dev] Re: Error creating textual references to dropped morphs In-Reply-To: References: <1473135738444-4914257.post@n4.nabble.com> Message-ID: <1473306947920-4914704.post@n4.nabble.com> Awesome, thanks Bert! I've tried to dip my feet into Squeak a few times over the years, but I think it has finally "clicked" for me. Thanks for all your efforts! -- View this message in context: http://forum.world.st/Error-creating-textual-references-to-dropped-morphs-tp4914257p4914704.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From goran at krampe.se Thu Sep 8 08:21:38 2016 From: goran at krampe.se (=?UTF-8?Q?G=c3=b6ran_Krampe?=) Date: Thu Sep 8 08:21:44 2016 Subject: [squeak-dev] Spry update: Spry goes visual! Message-ID: Hi folks! Just wanted to give a quick update on where I am (only me still) on the Spry project. I am taking the liberty to post on squeak-dev since I hope Squeakers find it interesting, especially the small movie below :) I also have some ideas on Squeak<->Spry interop, if anyone is interested - catch me on chat. I am right now trying to nail down a few language level things, and finish the manual. The manual is up on the site and is fairly complete now (although needs a few rounds of polish): http://www.sprylang.org/manual/index.html ...along with other things, like an article about "Smalltalk vs Spry" which I have only just started: http://www.sprylang.org/spry-vs-smalltalk/index.html But... the most interesting part to tell about is probably the fact that Spry is taking its first steps with a user interface! Unless you count the command line REPL Spry has had for a long time. Or the "spry REPL in a browser page" that you can also find on the website (that is actually the real Spry VM compiled to js). A short 2 min movie I made is here: http://krampe.se/spry-ide.mp4 I hope you found that movie intriguing! Because it shows a truly *live* experience, just like traditional Smalltalks offer. The code we type in is parsed and evaluated live and the IDE itself *is written in Spry* (not Nim). This makes it just as malleable as a Smalltalk environment. To make this I have selected the excellent C library called libui: https://github.com/andlabs/libui There is already a wrapper in Nim (auto generated) for libui which made it easy for me to create a Spry VM module with primitives using it, the primitives and node types so far are here: https://github.com/gokr/spry/blob/master/src/modules/spryui.nim The OO mechanism including polymorphism in Spry is still being worked on - so naming for some of those things are needlessly messy (to make each unique), but apart from that it's very straight forward. NOTE: There is also a Nim wxWidgets wrapper, a gtk2 wrapper and a gtk3 wrapper. But... I wanted native on all 3 desktops and libui looks MUCH easier and lightweight than wx. With that VM module included, we can finally look at the code for the IDE shown in the movie: https://github.com/gokr/spry/blob/master/src/ide.sy That's 57 lines of Spry code! ...and a big part is constructing the menu which the movie doesn't even show. Also note how I attach Spry code blocks as handlers for the click events, menu items etc, for example: https://github.com/gokr/spry/blob/master/src/ide.sy#L43 So what we have are Spry code blocks (they are closures) that gets run as callbacks called from the C library. Those of you with a bit of history knows this has been a truly sore part of Squeak through the years. And yes, this means we run in libui's event loop which we enter at the end: https://github.com/gokr/spry/blob/master/src/ide.sy#L91 And finally... this runs *natively* in Windows, OSX and Linux (Gtk3). The movie was recorded on my Ubuntu so its gtk3 that you see. I have tried it on OSX too, looks great! regards, G?ran PS. I am on #squeak and #sprylang on freenode, but also on gitter which I kinda prefer: http://gitter.im/gokr/spry From lewis at mail.msen.com Thu Sep 8 13:01:09 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Sep 8 13:01:13 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> Message-ID: <20160908130109.GA32066@shell.msen.com> On Tue, Sep 06, 2016 at 10:19:23AM -0700, tim Rowledge wrote: > So - what about a nice list of all the cool things that have come out of Squeak over the last 20 years? > > I???ll start with the ones I can remember: > > Scratch > eToys > Spoon > Cuis > Pharo > Croquet/OpenCobalt/3DICC-Terf/ > Sophie > exobox > MediaView (remember Interval Research? Of course not, it was so secret nobody knew when it died!) > WeatherDimensions > MathMorphs > Kedama > Frank > Nile > Balloon3D > > If we can come up with a moderate length list of the top ones I can design a Tshirt graphic to suit. The full list ought to be part of a swiki page, if indeed it isn???t already. > Remember Squeak News? A fully multimedia interactive publication distributed on and running in Squeak. Way ahead of its time, with no advertising, and no spam blockers required :-) I think I may have some of the original disks stashed away somewhere. They used to arrive in my actual mailbox with real stamps on the envelope. Dave From cunningham.cb at gmail.com Thu Sep 8 14:49:33 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Sep 8 14:49:37 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <20160908130109.GA32066@shell.msen.com> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160908130109.GA32066@shell.msen.com> Message-ID: On Thu, Sep 8, 2016 at 6:01 AM, David T. Lewis wrote: > On Tue, Sep 06, 2016 at 10:19:23AM -0700, tim Rowledge wrote: > > So - what about a nice list of all the cool things that have come out of > Squeak over the last 20 years? > > > > I???ll start with the ones I can remember: > > > > Scratch > > eToys > > Spoon > > Cuis > > Pharo > > Croquet/OpenCobalt/3DICC-Terf/ > > Sophie > > exobox > > MediaView (remember Interval Research? Of course not, it was so secret > nobody knew when it died!) > > WeatherDimensions > > MathMorphs > > Kedama > > Frank > > Nile > > Balloon3D > > > > If we can come up with a moderate length list of the top ones I can > design a Tshirt graphic to suit. The full list ought to be part of a swiki > page, if indeed it isn???t already. > > > > Remember Squeak News? A fully multimedia interactive publication > distributed on and running in Squeak. Way ahead of its time, with > no advertising, and no spam blockers required :-) I think I may > have some of the original disks stashed away somewhere. They used > to arrive in my actual mailbox with real stamps on the envelope. > > Dave > > Oh yeah, those were neat. Although I missed the physical disc part. -cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160908/eb027e35/attachment.htm From jecel at merlintec.com Thu Sep 8 15:11:44 2016 From: jecel at merlintec.com (Jecel Assumpcao Jr.) Date: Thu Sep 8 15:11:52 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <20160908130109.GA32066@shell.msen.com> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160908130109.GA32066@shell.msen.com> Message-ID: <20160908151147.C29D1B206415@bart0130.email.locaweb.com.br> My father was watching the Apple presentation and the part about iWork showed collaborative editing of a presentation. I said "I know this! It's Nebraska!" ;-) David T. Lewis wrote: > Remember Squeak News? A fully multimedia interactive publication > distributed on and running in Squeak. Way ahead of its time, with > no advertising, and no spam blockers required :-) I think I may > have some of the original disks stashed away somewhere. They used > to arrive in my actual mailbox with real stamps on the envelope. I thought that the disk images had been made available somewhere, but haven't been able to find them. I still have the actual CDs here. -- Jecel From juanlists at jvuletich.org Thu Sep 8 15:08:12 2016 From: juanlists at jvuletich.org (juanlists@jvuletich.org) Date: Thu Sep 8 15:12:21 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <20160908130109.GA32066@shell.msen.com> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160908130109.GA32066@shell.msen.com> Message-ID: <20160908100812.Horde._54CtmgyDQvJhKfVuBK-w_-@www.jvuletich.org> Quoting "David T. Lewis" : > On Tue, Sep 06, 2016 at 10:19:23AM -0700, tim Rowledge wrote: >> So - what about a nice list of all the cool things that have come >> out of Squeak over the last 20 years? >> >> I???ll start with the ones I can remember: >> >> Scratch >> eToys >> Spoon >> Cuis >> Pharo >> Croquet/OpenCobalt/3DICC-Terf/ >> Sophie >> exobox >> MediaView (remember Interval Research? Of course not, it was so >> secret nobody knew when it died!) >> WeatherDimensions >> MathMorphs >> Kedama >> Frank >> Nile >> Balloon3D >> >> If we can come up with a moderate length list of the top ones I can >> design a Tshirt graphic to suit. The full list ought to be part of >> a swiki page, if indeed it isn???t already. >> > > Remember Squeak News? A fully multimedia interactive publication > distributed on and running in Squeak. Way ahead of its time, with > no advertising, and no spam blockers required :-) I think I may > have some of the original disks stashed away somewhere. They used > to arrive in my actual mailbox with real stamps on the envelope. > > Dave Yes! SqueakNews is wonderful. The interviews with John Maloney were what made me want to fix the issues he pointed out in Morphic. That was the seed for Morphic 3 and therefore Cuis too. Cheers, Juan Vuletich From commits at source.squeak.org Thu Sep 8 19:51:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 8 19:51:36 2016 Subject: [squeak-dev] The Trunk: System-bf.914.mcz Message-ID: Bert Freudenberg uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-bf.914.mcz ==================== Summary ==================== Name: System-bf.914 Author: bf Time: 8 September 2016, 9:49:26.777611 pm UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5 Ancestors: System-cmm.913 Fix DataStream reading of Characters on Spur. =============== Diff against System-cmm.913 =============== Item was changed: ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') ----- readCharacterOfSize: instSize + "Character changed to an immediate class in Spur" | refPosn val | self assert: instSize = 1. refPosn := self getCurrentReference. + self setCurrentReference: refPosn. "before recursion - not really needed for integer" - self setCurrentReference: refPosn. val := self next. + self assert: val isInteger. + self setCurrentReference: refPosn. "before returning to next" ^ Character value: val. ! Item was changed: ----- Method: DataStream>>readInstance (in category 'write and read') ----- readInstance "PRIVATE -- Read the contents of an arbitrary instance. ASSUMES: readDataFrom:size: sends me beginReference: after it instantiates the new object but before reading nested objects. NOTE: We must restore the current reference position after recursive calls to next. Let the instance, not the class read the data. " | instSize aSymbol refPosn anObject newClass | instSize := (byteStream nextNumber: 4) - 1. refPosn := self getCurrentReference. aSymbol := self next. + (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"]) - aSymbol == #Character ifTrue: [^ self readCharacterOfSize: instSize]. newClass := Smalltalk at: aSymbol asSymbol. anObject := newClass isVariable "Create object here" ifFalse: [newClass basicNew] ifTrue: [newClass basicNew: instSize - (newClass instSize)]. self setCurrentReference: refPosn. "before readDataFrom:size:" anObject := anObject readDataFrom: self size: instSize. self setCurrentReference: refPosn. "before returning to next" ^ anObject! Item was changed: ----- Method: DataStream>>vacantRef (in category 'other') ----- vacantRef "Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference position' to identify a reference that's not yet filled in. This must be a value that won't be used as an ordinary reference. Cf. outputReference: and readReference. -- NOTE: We could use a different type ID for vacant-refs rather than writing object-references with a magic value. (The type ID and value are overwritten by ordinary object-references when weak refs are fullfilled.)" + ^1073741823 "Hardcode former SmallInteger maxVal"! - ^ SmallInteger maxVal! From tonyg at ccs.neu.edu Thu Sep 8 19:54:51 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Thu Sep 8 19:54:57 2016 Subject: [squeak-dev] 20 Years of Squeak In-Reply-To: <20160907234731.72D83A221293@bart0101.email.locaweb.com.br> References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160907234731.72D83A221293@bart0101.email.locaweb.com.br> Message-ID: Hi Jecel, That was indeed very interesting! Is your PhD dissertation available anywhere? I tried googling for it, but couldn't find anything. Regards, Tony On 09/07/2016 07:47 PM, Jecel Assumpcao Jr. wrote: > If you want to add SilliconSqueak to the list of Squeak based projects, > you might find the slides for my PhD defense interesting (sadly in Prezi > instead of Squeak, unlike many of my other presentations): > >> https://prezi.com/yhw-a3i0rnri/adaptive-compilation-for-an-object-oriented-and-reconfigurab/ > > -- Jecel > From asqueaker at gmail.com Thu Sep 8 20:39:50 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu Sep 8 20:40:35 2016 Subject: [squeak-dev] The Trunk: System-bf.914.mcz In-Reply-To: <57d1c14b.9f18370a.16179.9ecbSMTPIN_ADDED_MISSING@mx.google.com> References: <57d1c14b.9f18370a.16179.9ecbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Excellent! Now I have to wonder if this also fixes the problem with saving/restoring Projects... Worth a try, Herbert? On Thu, Sep 8, 2016 at 2:50 PM, wrote: > Bert Freudenberg uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-bf.914.mcz > > ==================== Summary ==================== > > Name: System-bf.914 > Author: bf > Time: 8 September 2016, 9:49:26.777611 pm > UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5 > Ancestors: System-cmm.913 > > Fix DataStream reading of Characters on Spur. > > =============== Diff against System-cmm.913 =============== > > Item was changed: > ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') ----- > readCharacterOfSize: instSize > + "Character changed to an immediate class in Spur" > | refPosn val | > self assert: instSize = 1. > refPosn := self getCurrentReference. > + self setCurrentReference: refPosn. "before recursion - not really needed for integer" > - self setCurrentReference: refPosn. > val := self next. > + self assert: val isInteger. > + self setCurrentReference: refPosn. "before returning to next" > ^ Character value: val. > ! > > Item was changed: > ----- Method: DataStream>>readInstance (in category 'write and read') ----- > readInstance > "PRIVATE -- Read the contents of an arbitrary instance. > ASSUMES: readDataFrom:size: sends me beginReference: after it > instantiates the new object but before reading nested objects. > NOTE: We must restore the current reference position after > recursive calls to next. > Let the instance, not the class read the data. " > | instSize aSymbol refPosn anObject newClass | > > instSize := (byteStream nextNumber: 4) - 1. > refPosn := self getCurrentReference. > aSymbol := self next. > + (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"]) > - aSymbol == #Character > ifTrue: [^ self readCharacterOfSize: instSize]. > newClass := Smalltalk at: aSymbol asSymbol. > anObject := newClass isVariable "Create object here" > ifFalse: [newClass basicNew] > ifTrue: [newClass basicNew: instSize - (newClass instSize)]. > self setCurrentReference: refPosn. "before readDataFrom:size:" > anObject := anObject readDataFrom: self size: instSize. > self setCurrentReference: refPosn. "before returning to next" > ^ anObject! > > Item was changed: > ----- Method: DataStream>>vacantRef (in category 'other') ----- > vacantRef > "Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference > position' to identify a reference that's not yet filled in. This must be a > value that won't be used as an ordinary reference. Cf. outputReference: and > readReference. -- > NOTE: We could use a different type ID for vacant-refs rather than writing > object-references with a magic value. (The type ID and value are > overwritten by ordinary object-references when weak refs are fullfilled.)" > > + ^1073741823 "Hardcode former SmallInteger maxVal"! > - ^ SmallInteger maxVal! > > From herbertkoenig at gmx.net Thu Sep 8 20:49:55 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Thu Sep 8 20:50:02 2016 Subject: [squeak-dev] The Trunk: System-bf.914.mcz In-Reply-To: References: <57d1c14b.9f18370a.16179.9ecbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <99511098-80d7-7534-4155-bacae7f969db@gmx.net> On the Weekend :-) Am 08.09.2016 um 22:39 schrieb Chris Muller: > Excellent! > > Now I have to wonder if this also fixes the problem with > saving/restoring Projects... > > Worth a try, Herbert? > > > On Thu, Sep 8, 2016 at 2:50 PM, wrote: >> Bert Freudenberg uploaded a new version of System to project The Trunk: >> http://source.squeak.org/trunk/System-bf.914.mcz >> >> ==================== Summary ==================== >> >> Name: System-bf.914 >> Author: bf >> Time: 8 September 2016, 9:49:26.777611 pm >> UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5 >> Ancestors: System-cmm.913 >> >> Fix DataStream reading of Characters on Spur. >> >> =============== Diff against System-cmm.913 =============== >> >> Item was changed: >> ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') ----- >> readCharacterOfSize: instSize >> + "Character changed to an immediate class in Spur" >> | refPosn val | >> self assert: instSize = 1. >> refPosn := self getCurrentReference. >> + self setCurrentReference: refPosn. "before recursion - not really needed for integer" >> - self setCurrentReference: refPosn. >> val := self next. >> + self assert: val isInteger. >> + self setCurrentReference: refPosn. "before returning to next" >> ^ Character value: val. >> ! >> >> Item was changed: >> ----- Method: DataStream>>readInstance (in category 'write and read') ----- >> readInstance >> "PRIVATE -- Read the contents of an arbitrary instance. >> ASSUMES: readDataFrom:size: sends me beginReference: after it >> instantiates the new object but before reading nested objects. >> NOTE: We must restore the current reference position after >> recursive calls to next. >> Let the instance, not the class read the data. " >> | instSize aSymbol refPosn anObject newClass | >> >> instSize := (byteStream nextNumber: 4) - 1. >> refPosn := self getCurrentReference. >> aSymbol := self next. >> + (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"]) >> - aSymbol == #Character >> ifTrue: [^ self readCharacterOfSize: instSize]. >> newClass := Smalltalk at: aSymbol asSymbol. >> anObject := newClass isVariable "Create object here" >> ifFalse: [newClass basicNew] >> ifTrue: [newClass basicNew: instSize - (newClass instSize)]. >> self setCurrentReference: refPosn. "before readDataFrom:size:" >> anObject := anObject readDataFrom: self size: instSize. >> self setCurrentReference: refPosn. "before returning to next" >> ^ anObject! >> >> Item was changed: >> ----- Method: DataStream>>vacantRef (in category 'other') ----- >> vacantRef >> "Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference >> position' to identify a reference that's not yet filled in. This must be a >> value that won't be used as an ordinary reference. Cf. outputReference: and >> readReference. -- >> NOTE: We could use a different type ID for vacant-refs rather than writing >> object-references with a magic value. (The type ID and value are >> overwritten by ordinary object-references when weak refs are fullfilled.)" >> >> + ^1073741823 "Hardcode former SmallInteger maxVal"! >> - ^ SmallInteger maxVal! >> >> From commits at source.squeak.org Thu Sep 8 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 8 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160908215508.10614.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068920.html Name: System-bf.914 Ancestors: System-cmm.913 Fix DataStream reading of Characters on Spur. ============================================= From Yoshiki.Ohshima at acm.org Thu Sep 8 23:20:33 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu Sep 8 23:20:38 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: So, about crash... Does this really happen to me? I start from a vanilla Squeak5.1-16548-32bit-All-in-One on my Mac OS X 10.10, double click the hot air balloon. Into the window, I press the up arrow key, and the VM consistently crashes. The dump shows some IMKInputSessionProcess... so it may not be happening on majority of users here... (I'll look into it, but might be easy to fix for somebody who knows about it more.) Process: Squeak [10551] Path: /Users/USER/Downloads/*/Squeak5.1-16548-32bit-All-in-One.app/Contents/MacOS/Squeak Identifier: org.squeak.Squeak5.1.32.All-in-One Version: 5.1 (32 bit) Code Type: X86 (Native) Parent Process: ??? [1] Responsible: Squeak [10551] User ID: 501 Date/Time: 2016-09-08 16:16:20.638 -0700 OS Version: Mac OS X 10.10.5 (14F1912) Report Version: 11 Anonymous UUID: CC722C69-6CB8-743E-5680-0273B167F5C6 Sleep/Wake UUID: 363BBC6C-EE71-4416-9D6C-E77C830DA4F9 Time Awake Since Boot: 89000 seconds Time Since Wake: 7900 seconds Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000030000020 VM Regions Near 0x30000020: shared memory 000000000d59c000-000000000d5ac000 [ 64K] r-x/r-x SM=SHM --> __TEXT 0000000048000000-00000000488cc000 [ 9008K] r-x/rwx SM=COW /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver Application Specific Information: abort() called Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x9173169a __pthread_kill + 10 1 libsystem_pthread.dylib 0x97f53634 pthread_kill + 101 2 libsystem_c.dylib 0x90f90de6 abort + 156 3 org.squeak.Squeak5.1.32.All-in-One 0x001305c1 sigsegv + 175 4 libsystem_platform.dylib 0x9aaab03b _sigtramp + 43 5 ??? 0xffffffff 0 + 4294967295 6 org.squeak.Squeak5.1.32.All-in-One 0x00130512 getCrashDumpFilenameInto + 82 7 com.apple.CoreFoundation 0x98c2ddaf _CFAutoreleasePoolPop + 47 8 com.apple.HIToolbox 0x902dd844 IMKInputSessionProcessEventRefWithCompletionHandler + 142 9 com.apple.HIToolbox 0x902dc954 InputMethodInstanceProcessEventRef_WithCompletionHandler + 115 10 com.apple.HIToolbox 0x902c56ed __TSMEventToInputMethod_WithCompletionHandler_block_invoke + 122 11 com.apple.HIToolbox 0x902c9e52 __TrySendLockEvent_BeforeEventToInputMethod_WithContinuationHandler_block_invoke + 33 12 com.apple.HIToolbox 0x902c9f29 __SendTSMDocumentLockEvent_WithCompletionHandler_block_invoke + 120 13 com.apple.HIToolbox 0x9007237f __SendTSMEvent_WithCompletionHandler_block_invoke + 72 14 com.apple.HIToolbox 0x900754ca __SendEventToEventTargetWithCompletionHandler_block_invoke + 25 15 com.apple.HIToolbox 0x9007549b ___ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec_block_invoke + 127 16 com.apple.AppKit 0x9535627c ___NSTSMEventHandler_block_invoke + 25 17 com.apple.AppKit 0x95349273 -[NSTextInputContext handleTSMEvent:completionHandler:] + 1250 18 com.apple.AppKit 0x95348d2b _NSTSMEventHandler + 302 19 com.apple.HIToolbox 0x901d55a4 _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36 20 com.apple.HIToolbox 0x90013681 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2291 21 com.apple.HIToolbox 0x9001265c SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 402 22 com.apple.HIToolbox 0x900124c3 SendEventToEventTargetWithOptions + 95 23 com.apple.HIToolbox 0x90071ff9 SendTSMEvent_WithCompletionHandler + 451 24 com.apple.HIToolbox 0x902c562a TrySendLockEvent_BeforeEventToInputMethod_WithContinuationHandler + 409 25 com.apple.HIToolbox 0x902c53fb TSMEventToInputMethod_WithCompletionHandler + 154 26 com.apple.HIToolbox 0x902c5349 TSMEventToKeyboardInputMethod_WithCompletionHandler + 128 27 com.apple.HIToolbox 0x9007137f TSMKeyEvent_WithCompletionHandler + 591 28 com.apple.HIToolbox 0x900710d7 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 288 29 com.apple.HIToolbox 0x90070f63 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 336 30 com.apple.HIToolbox 0x90070cc9 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 261 31 com.apple.HIToolbox 0x90070ab7 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 255 32 com.apple.HIToolbox 0x90056413 TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3730 33 com.apple.AppKit 0x959cb6a4 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke993 + 147 34 com.apple.AppKit 0x95347652 -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:] + 129 35 com.apple.AppKit 0x9534731d -[NSTextInputContext _handleEvent:options:completionHandler:] + 1708 36 com.apple.AppKit 0x95346c4e -[NSTextInputContext handleEvent:] + 128 37 com.apple.AppKit 0x95346b4b -[NSView interpretKeyEvents:] + 205 38 org.squeak.Squeak5.1.32.All-in-One 0x0012c63e -[sqSqueakOSXOpenGLView keyDown:] + 310 39 com.apple.AppKit 0x958cef9b -[NSWindow _reallySendEvent:isDelayedEvent:] + 8478 40 com.apple.AppKit 0x951b23ca -[NSWindow sendEvent:] + 526 41 com.apple.AppKit 0x951ae9c4 -[NSApplication sendEvent:] + 4765 42 org.squeak.Squeak5.1.32.All-in-One 0x00124f53 -[SqueakOSXApplication sendEvent:] + 163 43 org.squeak.Squeak5.1.32.All-in-One 0x00126a94 -[sqSqueakOSXApplication(events) pumpRunLoopEventSendAndSignal:] + 115 44 org.squeak.Squeak5.1.32.All-in-One 0x00126b32 -[sqSqueakOSXApplication(events) pumpRunLoop] + 76 45 org.squeak.Squeak5.1.32.All-in-One 0x0012e876 nativeIoProcessEvents + 208 46 org.squeak.Squeak5.1.32.All-in-One 0x0012e8ca ioProcessEvents + 35 47 org.squeak.Squeak5.1.32.All-in-One 0x00130d7c -[sqSqueakMainApplication(events) ioGetNextEvent:] + 23 48 org.squeak.Squeak5.1.32.All-in-One 0x0012e95d ioGetNextEvent + 65 49 org.squeak.Squeak5.1.32.All-in-One 0x000fa260 primitiveGetNextEvent + 100 50 ??? 0x0663f7d2 0 + 107214802 51 org.squeak.Squeak5.1.32.All-in-One 0x000c3973 interpret + 654 52 org.squeak.Squeak5.1.32.All-in-One 0x001316d9 -[sqSqueakMainApplication runSqueak] + 476 53 com.apple.Foundation 0x982070ae __NSFirePerformWithOrder + 416 54 com.apple.CoreFoundation 0x98c7781e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 55 com.apple.CoreFoundation 0x98c77760 __CFRunLoopDoObservers + 400 56 com.apple.CoreFoundation 0x98c690c2 __CFRunLoopRun + 946 57 com.apple.CoreFoundation 0x98c68aa6 CFRunLoopRunSpecific + 390 58 com.apple.CoreFoundation 0x98c6890b CFRunLoopRunInMode + 123 59 com.apple.HIToolbox 0x900398f8 RunCurrentEventLoopInMode + 262 60 com.apple.HIToolbox 0x90039503 ReceiveNextEventCommon + 192 61 com.apple.HIToolbox 0x9003942c _BlockUntilNextEventMatchingListInModeWithFilter + 99 62 com.apple.AppKit 0x950dab41 _DPSNextEvent + 742 63 com.apple.AppKit 0x950da1e5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 350 64 com.apple.AppKit 0x950ceb9c -[NSApplication run] + 907 65 com.apple.AppKit 0x95043fa0 NSApplicationMain + 2082 66 libdyld.dylib 0x9b5fc6d9 start + 1 Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x917328ce kevent64 + 10 1 libdispatch.dylib 0x967c9ce3 _dispatch_mgr_invoke + 245 2 libdispatch.dylib 0x967c98c6 _dispatch_mgr_thread + 52 Thread 2: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 3: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 4: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 5: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 6: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 7: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 8: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 9: 0 libsystem_kernel.dylib 0x91731e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x97f5172a _pthread_wqthread + 939 2 libsystem_pthread.dylib 0x97f4ee0e start_wqthread + 30 Thread 10: Thread 11:: com.apple.coreaudio.AQClient 0 libsystem_kernel.dylib 0x9172b9ce mach_msg_trap + 10 1 libsystem_kernel.dylib 0x9172aa70 mach_msg + 68 2 com.apple.CoreFoundation 0x98c69ef6 __CFRunLoopServiceMachPort + 214 3 com.apple.CoreFoundation 0x98c69309 __CFRunLoopRun + 1529 4 com.apple.CoreFoundation 0x98c68aa6 CFRunLoopRunSpecific + 390 5 com.apple.CoreFoundation 0x98c6890b CFRunLoopRunInMode + 123 6 com.apple.audio.toolbox.AudioToolbox 0x9664a456 GenericRunLoopThread::Entry(void*) + 200 7 com.apple.audio.toolbox.AudioToolbox 0x9664a356 CAPThread::Entry(CAPThread*) + 134 8 libsystem_pthread.dylib 0x97f51c25 _pthread_body + 138 9 libsystem_pthread.dylib 0x97f51b9b _pthread_start + 162 10 libsystem_pthread.dylib 0x97f4ee32 thread_start + 34 Thread 12:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x9172b9ce mach_msg_trap + 10 1 libsystem_kernel.dylib 0x9172aa70 mach_msg + 68 2 com.apple.audio.CoreAudio 0x9219db80 HALB_MachPort::SendMessageWithReply(unsigned int, unsigned int, unsigned long, unsigned long, mach_msg_header_t*, bool, unsigned int) + 142 3 com.apple.audio.CoreAudio 0x921966d0 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 72 4 com.apple.audio.CoreAudio 0x92194bf0 HALC_ProxyIOContext::IOWorkLoop() + 1326 5 com.apple.audio.CoreAudio 0x9219459a HALC_ProxyIOContext::IOThreadEntry(void*) + 156 6 com.apple.audio.CoreAudio 0x921a0cd9 ___ZN19HALC_ProxyIOContextC2Emj_block_invoke + 20 7 com.apple.audio.CoreAudio 0x921944b1 HALB_IOThread::Entry(void*) + 173 8 libsystem_pthread.dylib 0x97f51c25 _pthread_body + 138 9 libsystem_pthread.dylib 0x97f51b9b _pthread_start + 162 10 libsystem_pthread.dylib 0x97f4ee32 thread_start + 34 Thread 13: 0 libsystem_kernel.dylib 0x917318f6 __semwait_signal + 10 1 libsystem_c.dylib 0x90fb0c02 nanosleep$UNIX2003 + 218 2 org.squeak.Squeak5.1.32.All-in-One 0x00133b86 beatStateMachine + 111 3 libsystem_pthread.dylib 0x97f51c25 _pthread_body + 138 4 libsystem_pthread.dylib 0x97f51b9b _pthread_start + 162 5 libsystem_pthread.dylib 0x97f4ee32 thread_start + 34 Thread 14: 0 libsystem_kernel.dylib 0x9172b9ce mach_msg_trap + 10 1 libsystem_kernel.dylib 0x9172aa70 mach_msg + 68 2 com.apple.CoreFoundation 0x98c69ef6 __CFRunLoopServiceMachPort + 214 3 com.apple.CoreFoundation 0x98c69309 __CFRunLoopRun + 1529 4 com.apple.CoreFoundation 0x98c68aa6 CFRunLoopRunSpecific + 390 5 com.apple.CoreFoundation 0x98c6890b CFRunLoopRunInMode + 123 6 com.apple.AppKit 0x951aa2d0 _NSEventThread + 283 7 libsystem_pthread.dylib 0x97f51c25 _pthread_body + 138 8 libsystem_pthread.dylib 0x97f51b9b _pthread_start + 162 9 libsystem_pthread.dylib 0x97f4ee32 thread_start + 34 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0xbfe99d78 ecx: 0xbfe998ac edx: 0x00000000 edi: 0xa0d631d4 esi: 0x00000006 ebp: 0xbfe998c8 esp: 0xbfe998ac ss: 0x00000023 efl: 0x00000206 eip: 0x9173169a cs: 0x0000000b ds: 0x00000023 es: 0x00000023 fs: 0x00000000 gs: 0x0000000f cr2: 0xa0540a00 Logical CPU: 0 Error Code: 0x00080148 Trap Number: 132 Binary Images: 0xc2000 - 0x19dfff +org.squeak.Squeak5.1.32.All-in-One (5.1 - 32 bit) <16D89496-E124-312A-A4B3-84049E52B87F> /Users/USER/Downloads/*/Squeak5.1-16548-32bit-All-in-One.app/Contents/MacOS/Squeak 0x389a000 - 0x38e7ff7 com.apple.CloudDocs (1.0 - 321.10) <9343D667-13D3-379C-BDCA-7D6D6B8CC7E5> /System/Library/PrivateFrameworks/CloudDocs.framework/CloudDocs 0x3919000 - 0x3921ff7 libCGCMS.A.dylib (788.3.5) <662A2443-422F-3500-BD1A-C22C1DA3C9FF> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGCMS.A.dylib 0x4732000 - 0x4734ffb libCGXType.A.dylib (788.3.5) <5CC7F971-6CE8-3B82-83CB-2CDDB32C124C> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib 0x4c66000 - 0x4c8ffff libRIP.A.dylib (788.3.5) <5F0202EE-2A5D-36D2-95A5-2DAFC48B851C> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x4e82000 - 0x4e82ffb +cl_kernels (???) <198AD9E8-18FA-4152-B3FB-FED5F46016AD> cl_kernels 0x4e90000 - 0x4e90ff9 +cl_kernels (???) <7C335B6D-8AE4-465F-BE05-A3E54163F670> cl_kernels 0x4e92000 - 0x4f7dff7 unorm8_bgra.dylib (2.4.5) <9DE4095F-AAC1-3078-B3A6-197721E4BC8F> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/ImageFormats/unorm8_bgra.dylib 0x9ca0000 - 0x9ca4fff com.apple.audio.AppleHDAHALPlugIn (272.18.3 - 272.18.3) <0B46A443-2AA6-3F19-84EA-A22C023FBE88> /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn 0x9ca9000 - 0x9effffb com.apple.audio.units.Components (1.12 - 1.12) /System/Library/Components/CoreAudio.component/Contents/MacOS/CoreAudio 0xb164000 - 0xb312ffb GLEngine (11.1.6) <3D7E7F83-C719-3F1E-8888-B5D19BA9B2A7> /System/Library/Frameworks/OpenGL.framework/Resources/GLEngine.bundle/GLEngine 0xb34f000 - 0xb884fff com.apple.driver.AppleIntelHD5000GraphicsGLDriver (10.6.33 - 10.0.6) /System/Library/Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsGLDriver 0xbe39000 - 0xbe66ff7 GLRendererFloat (11.1.6) /System/Library/Frameworks/OpenGL.framework/Resources/GLRendererFloat.bundle/GLRendererFloat 0x48000000 - 0x488cbfff com.apple.GeForceGLDriver (10.4.2 - 10.0.4) <3008BF98-E8A9-34E5-8833-C483068A99BC> /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/GeForceGLDriver 0x8fe3d000 - 0x8fe70e83 dyld (353.2.4) <26A0639E-9BD3-313A-A0BF-219FA2A7F6F3> /usr/lib/dyld 0x90008000 - 0x9000afff libsystem_configuration.dylib (699.40.2) /usr/lib/system/libsystem_configuration.dylib 0x9000b000 - 0x903e4ff3 com.apple.HIToolbox (2.1.1 - 758.7) <581BD5B0-2854-320C-8F6D-8A4A1EA53C73> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x903e5000 - 0x903e5fff com.apple.Cocoa (6.8 - 21) <6AF80DDB-C28E-36FF-BC11-D7D561AC52A9> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x903e6000 - 0x90405ff7 com.apple.GenerationalStorage (2.0 - 209.11) <34CF76B2-8052-359D-816D-092608FB6919> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage 0x90ded000 - 0x90f31ff7 com.apple.ImageIO.framework (3.3.0 - 1247) <4DACD66C-D1FE-32CB-A07D-40DF2AFD16FE> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x90f32000 - 0x90fc7fff libsystem_c.dylib (1044.40.3) <235083B9-8936-3E5E-8433-49EEFE61D72A> /usr/lib/system/libsystem_c.dylib 0x90fcc000 - 0x910c2ff7 libxml2.2.dylib (26.11) <76B39037-7EA2-3C8A-B3A7-88D6E6C4E61D> /usr/lib/libxml2.2.dylib 0x911eb000 - 0x91291fff com.apple.Metadata (10.7.0 - 917.36) <6B6C3094-6820-3621-BC4D-3BECECEC5918> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x91292000 - 0x9129afff com.apple.NetFS (6.0 - 4.0) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x91313000 - 0x91315ff3 com.apple.EFILogin (2.0 - 2) <00F6D57F-5B4F-373E-BBFF-D19E1E7F87E6> /System/Library/PrivateFrameworks/EFILogin.framework/Versions/A/EFILogin 0x91316000 - 0x9133cff3 libxpc.dylib (559.40.1) /usr/lib/system/libxpc.dylib 0x9133d000 - 0x91370fe3 libsystem_m.dylib (3086.1) <951F633F-57B7-398B-912F-F6ED4DB1C597> /usr/lib/system/libsystem_m.dylib 0x91371000 - 0x91373ff7 libquarantine.dylib (76.20.1) <8694AC5A-7359-3CC6-8E93-CABFCC919D4B> /usr/lib/system/libquarantine.dylib 0x91483000 - 0x914caff3 com.apple.AppleJPEG (1.0 - 1) <677BE130-F5AB-36F4-A51A-1FF20FC0085A> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG 0x914cb000 - 0x91526fff com.apple.LanguageModeling (1.0 - 1) <9B39E059-F48E-31AF-B1B3-B0872F362627> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling 0x91527000 - 0x91698ffb libBLAS.dylib (1128) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x916e3000 - 0x91717ffb com.apple.frameworks.CoreDaemon (1.3 - 1.3) /System/Library/PrivateFrameworks/CoreDaemon.framework/Versions/B/CoreDaemon 0x91718000 - 0x91737fff libsystem_kernel.dylib (2782.50.6) <0CEB5968-52ED-3511-A951-E656246946FA> /usr/lib/system/libsystem_kernel.dylib 0x91738000 - 0x91752ff7 liblzma.5.dylib (7) /usr/lib/liblzma.5.dylib 0x91753000 - 0x91755fff libsystem_coreservices.dylib (9) <20E66A47-8D67-344A-A393-73926F0E5FB2> /usr/lib/system/libsystem_coreservices.dylib 0x91756000 - 0x91805ff7 com.apple.Bluetooth (4.3.6 - 4.3.6f3) /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth 0x91806000 - 0x91808fff com.apple.securityhi (9.0 - 55006) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x91809000 - 0x918d4fff com.apple.backup.framework (1.6.5 - 1.6.5) /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup 0x918d5000 - 0x9190ffff com.apple.LDAPFramework (2.4.28 - 194.5) /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP 0x91966000 - 0x91966fff com.apple.audio.units.AudioUnit (1.12 - 1.12) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x91967000 - 0x91978ff7 libsystem_coretls.dylib (35.40.1) <22F1F179-F6ED-3576-8169-ED44BB59780A> /usr/lib/system/libsystem_coretls.dylib 0x9197a000 - 0x919f0fff com.apple.securityfoundation (6.0 - 55126) <3E59AEFA-3DEA-322A-A7BB-7B7B93E0286F> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x919f1000 - 0x919f5ff3 com.apple.TCC (1.0 - 1) /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x919f6000 - 0x91a02fff com.apple.CrashReporterSupport (10.10 - 631) <9A6DF8E2-AE0F-3919-889A-CD7F79ABD6EC> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport 0x91a8a000 - 0x91c4ffff com.apple.QuartzCore (1.10 - 361.19) <41368020-0DAF-3886-B701-96FAE68FC023> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x91c50000 - 0x91c57ff3 libunwind.dylib (35.3) <29D9343F-9A0A-3535-B0AE-E7CC761D95EE> /usr/lib/system/libunwind.dylib 0x91ef4000 - 0x91ef9ff7 libcompiler_rt.dylib (35) <6630682F-AB76-3E55-BE51-0A3E61B6CFC2> /usr/lib/system/libcompiler_rt.dylib 0x91efa000 - 0x9202cfff com.apple.UIFoundation (1.0 - 1) /System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation 0x9202d000 - 0x920cafff com.apple.ink.framework (10.9 - 213) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x920cb000 - 0x920d4fff libcopyfile.dylib (118.1.2) /usr/lib/system/libcopyfile.dylib 0x92166000 - 0x92181ff7 com.apple.CFOpenDirectory (10.10 - 187) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x92182000 - 0x921d7ff3 com.apple.audio.CoreAudio (4.3.0 - 4.3.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x921d8000 - 0x921d9fff libremovefile.dylib (35) <49DCAF7B-4466-3775-9E58-EA5D7CBA8AE0> /usr/lib/system/libremovefile.dylib 0x921da000 - 0x92230fff libc++.1.dylib (120) /usr/lib/libc++.1.dylib 0x92231000 - 0x92270fff com.apple.NavigationServices (3.8 - 215.1) <46D8B66D-CB59-36F5-BD26-FD8309337BB3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x92271000 - 0x9227dff7 libkxld.dylib (2782.50.6) /usr/lib/system/libkxld.dylib 0x9228b000 - 0x922f7ff3 com.apple.datadetectorscore (6.0 - 396.1.2) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x922f8000 - 0x92334ff3 com.apple.RemoteViewServices (2.0 - 99) <2839C2F1-88DA-3843-87BF-441A374A8967> /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices 0x92335000 - 0x92359ffb com.apple.framework.Apple80211 (10.3 - 1030.71.6) /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211 0x9235a000 - 0x92425fff com.apple.DiscRecording (9.0 - 9000.4.2) <8E19F180-3D32-3C7A-8E73-272F2955D9A8> /System/Library/Frameworks/DiscRecording.framework/Versions/A/DiscRecording 0x92426000 - 0x9242ffff libGFXShared.dylib (11.1.6) <784C99B9-4E89-3804-801A-364700D00133> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x92430000 - 0x92433ffb libutil.dylib (38) /usr/lib/libutil.dylib 0x92434000 - 0x9243effb com.apple.audio.SoundManager (4.2 - 4.2) <4312D0A7-4B6F-3A1E-9A47-24C6E8C65E51> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x9243f000 - 0x92529ff7 libcrypto.0.9.8.dylib (52.40.1) <0B0C4964-6DCD-3625-AF4F-A9ED057002F5> /usr/lib/libcrypto.0.9.8.dylib 0x9252a000 - 0x9261aff3 com.apple.DiskImagesFramework (10.10.5 - 398) <17B6661A-ADED-3B39-9A2D-294685CF2D7B> /System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/DiskImages 0x9261b000 - 0x92a03ff7 libLAPACK.dylib (1128) <4E3D1289-2C98-3E53-BB8D-AD911357FF66> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x92a04000 - 0x92bfafff libicucore.A.dylib (531.50) <018CE684-76AA-371A-93C4-50F2EC9CE295> /usr/lib/libicucore.A.dylib 0x92bfb000 - 0x92d8cff3 libsqlite3.dylib (168.2) <85773EDA-5470-326B-8C21-20A80C89C96A> /usr/lib/libsqlite3.dylib 0x92d8d000 - 0x92ddefff libcups.2.dylib (408.2) <425E4328-ECA1-31EE-B2C4-0D67FB8848BE> /usr/lib/libcups.2.dylib 0x92ddf000 - 0x92df2fff com.apple.CoreBluetooth (1.0 - 1) <153F2DDE-CCCF-3C63-AF70-2EA306DACDCD> /System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth 0x92e47000 - 0x92e81fff com.apple.MediaKit (16 - 757.2) /System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/MediaKit 0x92e82000 - 0x92e82fff libOpenScriptingUtil.dylib (162.2) <7670C29D-B3A3-3E59-A117-DD7766C07862> /usr/lib/libOpenScriptingUtil.dylib 0x93e3e000 - 0x93e64ff3 libc++abi.dylib (125) /usr/lib/libc++abi.dylib 0x93e65000 - 0x93e72ff7 libbz2.1.0.dylib (36) <6BC7B049-8F03-3217-9840-B1804CCBF742> /usr/lib/libbz2.1.0.dylib 0x93e73000 - 0x93e84fff libbsm.0.dylib (34) /usr/lib/libbsm.0.dylib 0x93fe0000 - 0x940e3fff libJP2.dylib (1247) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x94145000 - 0x94151ff3 libGPUSupportMercury.dylib (11.1.6) <8B369211-7FBE-3D00-A449-F4835BC9AA4E> /System/Library/PrivateFrameworks/GPUSupport.framework/Versions/A/Libraries/libGPUSupportMercury.dylib 0x94152000 - 0x941f2fff com.apple.QD (301 - 301) <4DFE3689-59DE-3FBC-806B-6A4056573E52> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x941f3000 - 0x94257ff7 com.apple.AE (681.5 - 681.7) <1190538F-460A-3168-B1F6-3FE08D98F677> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x94c07000 - 0x94c17fff libGL.dylib (11.1.6) <9F457F9B-C393-3105-953A-1E0DA618DB76> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x94c18000 - 0x94c9ffff com.apple.CoreServices.OSServices (640.4 - 640.4) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x94ca0000 - 0x94cf4ff7 com.apple.HIServices (1.22 - 523) <56F4ED21-FE4C-3F33-A425-D64E69B12F05> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x94d50000 - 0x94d93fff libGLU.dylib (11.1.6) <3682B11C-7897-3A56-A82F-3EB59CD41D93> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x94d94000 - 0x94da3ffb libxar.1.dylib (255) <4FF7DB6F-3232-302F-94BC-F1188F78AF25> /usr/lib/libxar.1.dylib 0x94da4000 - 0x9502eff3 com.apple.security (7.0 - 57031.40.8) <986D75F2-F340-3DCA-9801-9F2F4DD33E00> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x9502f000 - 0x95033fff libCoreVMClient.dylib (79.1) <3DB52AB1-D41E-3AC9-A355-1B6DCEDB4DFD> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x95041000 - 0x95c6dfff com.apple.AppKit (6.9 - 1348.17) <1D891DC4-4E22-30FD-A8AC-1221531BEEA3> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x95c6e000 - 0x9657bffb libclh.dylib (4.0.3 - 4.0.3) /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib 0x9657c000 - 0x965f2ff7 com.apple.SearchKit (1.4.0 - 1.4.0) <3693A221-B615-37D4-9FB1-F5F6CC7EE1A7> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x965f3000 - 0x965ffff7 libcsfde.dylib (471.30.1) <29155D7B-2C73-38E5-9A82-609A759EB03D> /usr/lib/libcsfde.dylib 0x9663b000 - 0x967c3ff7 com.apple.audio.toolbox.AudioToolbox (1.12 - 1.12) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x967c4000 - 0x967ebfff libdispatch.dylib (442.50.1) /usr/lib/system/libdispatch.dylib 0x967ec000 - 0x96819fff com.apple.ProtectedCloudStorage (1.0 - 1) <0E0567D9-2C7F-336C-AD75-06F0DF56FAB8> /System/Library/PrivateFrameworks/ProtectedCloudStorage.framework/Versions/A/ProtectedCloudStorage 0x9681a000 - 0x96849fff com.apple.CoreVideo (1.8 - 145.1) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x968f3000 - 0x96b79fff com.apple.QuickTime (7.7.3 - 2890.9) /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime 0x96b7a000 - 0x96b7dfff libpam.2.dylib (20) /usr/lib/libpam.2.dylib 0x96b7e000 - 0x96b83ff7 libmacho.dylib (862) <48DE74F8-09E3-344F-A82F-665083A3BF8F> /usr/lib/system/libmacho.dylib 0x96b84000 - 0x96b85fff libDiagnosticMessagesClient.dylib (100) <3EE83437-AA9C-356B-810B-589346B73797> /usr/lib/libDiagnosticMessagesClient.dylib 0x96b89000 - 0x96bbbffb com.apple.GSS (4.0 - 2.0) <2B5A899E-055E-3BEC-A8A1-F8570983389B> /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x96bbc000 - 0x96bfcfff com.apple.Symbolication (1.4 - 56045) /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication 0x96bfd000 - 0x96bfefff libSystem.B.dylib (1213) <93FD6C52-0425-312B-8057-0A55FFB8D586> /usr/lib/libSystem.B.dylib 0x96bff000 - 0x96c1cfff libCRFSuite.dylib (34) <781A92EF-410E-39B2-953D-FEE12748D834> /usr/lib/libCRFSuite.dylib 0x96c1d000 - 0x96c1ffff libsystem_sandbox.dylib (358.20.5) <8F74D383-C8B0-32DD-89C1-1E99034AF763> /usr/lib/system/libsystem_sandbox.dylib 0x96c20000 - 0x97053ff3 com.apple.vision.FaceCore (3.1.6 - 3.1.6) /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore 0x97054000 - 0x97083fff com.apple.DictionaryServices (1.2 - 229.1) <627E1C9E-BEDA-32B1-97E1-45BE074FC2C3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x97084000 - 0x97088fff com.apple.IOAccelerator (156.17 - 156.17) /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator 0x97089000 - 0x97116ff3 com.apple.PerformanceAnalysis (1.0 - 1) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis 0x97117000 - 0x9711bfff libheimdal-asn1.dylib (398.40.1) /usr/lib/libheimdal-asn1.dylib 0x9711c000 - 0x97557feb com.apple.vImage (8.0 - 8.0) <56F6B317-9D70-3DC5-9868-BB6D7CB6E55D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x97558000 - 0x97583fff libxslt.1.dylib (13.12) <2D1E8E29-7F34-3C20-ACA1-C9F7E93FB6D4> /usr/lib/libxslt.1.dylib 0x97584000 - 0x97670fe7 libvMisc.dylib (516) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x97820000 - 0x97921ff7 com.apple.LaunchServices (644.56 - 644.56) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x97922000 - 0x9794efff com.apple.ChunkingLibrary (2.1 - 163.6) /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary 0x9794f000 - 0x9795cff3 com.apple.ProtocolBuffer (1 - 228.0.1) /System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer 0x97992000 - 0x97a8afff libFontParser.dylib (134.10) <1C490D97-6E83-3FC4-95FD-7E06DD8FBF68> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x97ab5000 - 0x97abeff7 libsystem_notify.dylib (133.1.1) /usr/lib/system/libsystem_notify.dylib 0x97abf000 - 0x97adeffb libresolv.9.dylib (57) /usr/lib/libresolv.9.dylib 0x97adf000 - 0x97b56fff com.apple.ApplicationServices.ATS (360 - 375.4) <15EA5277-3E03-3E09-B832-1D45E429E828> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x97b57000 - 0x97b5fff7 com.apple.icloud.FindMyDevice (1.0 - 1) /System/Library/PrivateFrameworks/FindMyDevice.framework/Versions/A/FindMyDevice 0x97b60000 - 0x97b6dff7 com.apple.speech.synthesis.framework (5.3.11 - 5.3.11) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x97b6e000 - 0x97b6efff libunc.dylib (29) /usr/lib/system/libunc.dylib 0x97b6f000 - 0x97e06fff com.apple.CoreData (111 - 526.3) <93295B9D-6C48-3919-8B9C-A4291D3522CE> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x97f24000 - 0x97f27fff libextension.dylib (55.2) /usr/lib/libextension.dylib 0x97f28000 - 0x97f4afff com.apple.MultitouchSupport.framework (264.6 - 264.6) <83627B4D-8948-35A7-A76B-7F10AC70B468> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x97f4b000 - 0x97f4dffb libRadiance.dylib (1247) <0A79950F-460D-37E2-BD63-E8B5EE8A421D> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x97f4e000 - 0x97f56fff libsystem_pthread.dylib (105.40.1) <21849EF5-A3B6-34D4-A045-4A68A6C390A1> /usr/lib/system/libsystem_pthread.dylib 0x980d9000 - 0x980dfff7 libsystem_networkextension.dylib (167.40.3) <7856EE13-BFDC-3344-AB7C-91866DC6E3EE> /usr/lib/system/libsystem_networkextension.dylib 0x980e0000 - 0x9810efff libarchive.2.dylib (30.50.1) <979CDD84-0D4A-373F-A725-70539F1135DE> /usr/lib/libarchive.2.dylib 0x9810f000 - 0x98113ffb com.apple.IOSurface (97.4 - 97.4) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x98114000 - 0x98131ffb com.apple.Ubiquity (1.3 - 313) <9ED23769-0725-3D4B-B7F4-AF08020D73C3> /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity 0x98132000 - 0x98132fff com.apple.ApplicationServices (48 - 48) <76C301A4-705B-33DE-BA11-C89DCF1EDCDD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x98133000 - 0x98134fff com.apple.TrustEvaluationAgent (2.0 - 25) <28BBD931-EF7C-3753-B50E-6568F4075086> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x98135000 - 0x9815efff libsystem_info.dylib (459.40.1) <4827C088-2BF0-397F-B9FA-0F91BDF64637> /usr/lib/system/libsystem_info.dylib 0x9815f000 - 0x984c0ff3 com.apple.Foundation (6.9 - 1154) <4F2854C1-310E-34FC-9ADA-1B16AD93D505> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x984c1000 - 0x984cfff7 libz.1.dylib (55) /usr/lib/libz.1.dylib 0x984d0000 - 0x986e0fff com.apple.CFNetwork (720.5.7 - 720.5.7) <8CE218EB-78CD-3757-B185-8FA6CB56F5B5> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x98716000 - 0x98723ff7 com.apple.OpenDirectory (10.10 - 187) <6323752A-8CBE-3EF0-9934-F587EC24EF16> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x989c6000 - 0x98a58ff7 com.apple.CoreSymbolication (3.1 - 57020.2) <5F3895EF-7C0E-3246-A1C0-0A582548AB92> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication 0x98aa9000 - 0x98ac0fff libsystem_asl.dylib (267) <85BD88AD-618E-3325-AC31-10DBAB8E9AF3> /usr/lib/system/libsystem_asl.dylib 0x98ac1000 - 0x98b12fff com.apple.opencl (2.4.2 - 2.4.2) <4AEC84E6-314A-3164-A0E8-503FF90D2BD0> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x98b13000 - 0x98b1bfff com.apple.CoreServices.FSEvents (1210.20.1 - 1210.20.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents 0x98b1c000 - 0x98b9bfff com.apple.SystemConfiguration (1.14.4 - 1.14) <796BBD68-8E23-32BF-93DD-9C0EA21DB81B> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x98b9c000 - 0x98bdcfff libauto.dylib (186) <1609D0F9-6E3A-3C67-87EF-BB0BD93EDAC9> /usr/lib/libauto.dylib 0x98bf2000 - 0x98fa6ff7 com.apple.CoreFoundation (6.9 - 1153.18) <267B1002-C755-37B4-95CD-92358CF994B8> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x98fa7000 - 0x98fadff7 libsystem_trace.dylib (72.20.1) <5F23BE77-1C60-3859-B528-C6B3C184C95C> /usr/lib/system/libsystem_trace.dylib 0x98fae000 - 0x98faefff liblaunch.dylib (559.40.1) <65101C3E-CC60-3528-A306-991309171B8A> /usr/lib/system/liblaunch.dylib 0x98faf000 - 0x990ddff7 com.apple.coreui (2.1 - 308.6) <5C418632-E00D-3864-B645-F2D993DE6455> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x990de000 - 0x99178fff com.apple.ColorSync (4.9.0 - 4.9.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x99191000 - 0x99195ffb libcache.dylib (69) <55501A00-AF64-3554-8F46-8D5AFEDEC332> /usr/lib/system/libcache.dylib 0x99196000 - 0x99287ffb libiconv.2.dylib (42) <4AF77F10-0BEC-3BE0-99DF-C5170EDB316B> /usr/lib/libiconv.2.dylib 0x99288000 - 0x994772ef libobjc.A.dylib (647) <7648C174-3098-3B26-AD20-490DBFFD5D4C> /usr/lib/libobjc.A.dylib 0x994cc000 - 0x994d7ff7 com.apple.NetAuth (5.2 - 5.2) <3E650FB0-5EB5-3807-8B71-8FAF64D6A0FC> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x994d8000 - 0x995effff com.apple.CoreText (454.11 - 454.11) <81873C09-46D8-30F8-8D32-28AA923B7C90> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x995f0000 - 0x99602ff7 libsasl2.2.dylib (194.1) <34CB75C7-09BE-3319-BF7E-D4E56495F07A> /usr/lib/libsasl2.2.dylib 0x99603000 - 0x99643ffb libGLImage.dylib (11.1.6) <7A079480-648E-3313-89B4-17CB578CAD33> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x99644000 - 0x99644fff com.apple.CoreServices (62 - 62) <08A581EC-2E8B-30CF-B555-64171C8FE5EE> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x99645000 - 0x996b0ff7 com.apple.framework.CoreWiFi (3.0 - 300.4) <632A811D-4706-3ED7-85E3-DD2CDB47CF8F> /System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi 0x996b1000 - 0x9970eff7 com.apple.print.framework.PrintCore (10.3 - 451.1) <86895179-C54B-3D8A-B515-92DFA6315FC9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x99743000 - 0x9979effb libTIFF.dylib (1247) <4D9AB800-ED01-37E9-A06A-5A3FABB365CE> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x997b7000 - 0x997c0fff com.apple.AppleSRP (5.0 - 1) <83C56D61-E2BF-3D34-93A6-DA0784BDD61A> /System/Library/PrivateFrameworks/AppleSRP.framework/Versions/A/AppleSRP 0x997c1000 - 0x99abfffb com.apple.CoreServices.CarbonCore (1108.6 - 1108.6) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x99ac0000 - 0x99ac0fff com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x99ac1000 - 0x99b3eff3 com.apple.framework.IOKit (2.0.2 - 1050.20.2) <84299E45-C5F3-365F-AC1B-0EAFF8057112> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x99e54000 - 0x99e56fff libCVMSPluginSupport.dylib (11.1.6) <27E51D50-D030-3BA8-AF6E-4317A2003944> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x99fc4000 - 0x9a0daff3 com.apple.desktopservices (1.9.3 - 1.9.3) <544FDA55-063A-3787-A55A-A54290E4BE6E> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x9a0db000 - 0x9a0fefff libJPEG.dylib (1247) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x9a0ff000 - 0x9a13cfff libsystem_network.dylib (412.20.3) <1D1D6444-EB6B-3249-902B-1710C3C0DCCB> /usr/lib/system/libsystem_network.dylib 0x9a141000 - 0x9a15aff7 libsystem_malloc.dylib (53.30.1) <1438C1B7-5CD0-3A01-ACF8-BFC4012541B9> /usr/lib/system/libsystem_malloc.dylib 0x9a17e000 - 0x9a17efff libkeymgr.dylib (28) <06DDCEF8-EB84-3F68-9E19-FD1A12B764FD> /usr/lib/system/libkeymgr.dylib 0x9a17f000 - 0x9a231fff libCoreStorage.dylib (471.30.1) <8AB3BEEF-AB8E-310F-B066-8E482958B57A> /usr/lib/libCoreStorage.dylib 0x9a232000 - 0x9a233fff liblangid.dylib (117) <34A0F807-755F-300B-B01F-AABAE3838451> /usr/lib/liblangid.dylib 0x9a234000 - 0x9a23bfff com.apple.speech.recognition.framework (5.0.9 - 5.0.9) <5D268178-3812-3777-92A6-D7D3395405B8> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x9a23c000 - 0x9a2a8ff7 libcorecrypto.dylib (233.30.1) /usr/lib/system/libcorecrypto.dylib 0x9a2a9000 - 0x9a59bffb com.apple.CoreImage (10.3.5) /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x9a5a2000 - 0x9a5abffb com.apple.CommonAuth (4.0 - 2.0) /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x9a5ac000 - 0x9a5b4fff libsystem_dnssd.dylib (576.50.2) /usr/lib/system/libsystem_dnssd.dylib 0x9a5b5000 - 0x9a5ccff3 libLinearAlgebra.dylib (1128) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib 0x9a5cd000 - 0x9a5d1ffb libGIF.dylib (1247) <5C92FDA7-CB9E-30DE-85DE-FE7F49D6315F> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x9a5d2000 - 0x9a5f8ffb libPng.dylib (1247) <3041B0DB-4718-34D0-BC2A-2620A1B08719> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x9aaa2000 - 0x9aaa5fff com.apple.xpc.ServiceManagement (1.0 - 1) <78BFBBC9-FBEA-3522-A8B1-5BA7D7A442D3> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x9aaa6000 - 0x9aaacff3 libsystem_platform.dylib (63) <509993B7-3F26-3360-B899-0BBB15152516> /usr/lib/system/libsystem_platform.dylib 0x9aaad000 - 0x9aaafffb libsystem_secinit.dylib (18) <3CBA3BD3-8BA2-358D-BD1A-A1C3DF5D84E6> /usr/lib/system/libsystem_secinit.dylib 0x9aab0000 - 0x9aaffff7 libcurl.4.dylib (83.40.2) <3311B623-79C9-3B9D-BDEB-7CD72E0D68BA> /usr/lib/libcurl.4.dylib 0x9abae000 - 0x9abc1fff libcmph.dylib (1) <2449B048-208E-36FB-9DFA-47E0F3BCF132> /usr/lib/libcmph.dylib 0x9abc2000 - 0x9ad72ff7 libGLProgrammability.dylib (11.1.6) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x9ad73000 - 0x9ad81ff3 com.apple.opengl (11.1.6 - 11.1.6) <4F03A0A3-8437-323A-8E12-A389D73C4505> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x9ad82000 - 0x9adcbffb libFontRegistry.dylib (134.1) <6CF6177B-D5D6-3E7B-88BC-BE833D55018C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x9add4000 - 0x9aee1fe3 libvDSP.dylib (516) <53F7A960-01E1-3B79-A7FD-67BD19471420> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x9aee2000 - 0x9aef0ff7 com.apple.SpeechRecognitionCore (2.1.2 - 2.1.2) /System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore 0x9b275000 - 0x9b277fff com.apple.loginsupport (1.0 - 1) /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport 0x9b278000 - 0x9b278fff com.apple.Accelerate (1.10 - Accelerate 1.10) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x9b279000 - 0x9b292fff com.apple.Kerberos (3.0 - 1) <92735F11-CF1C-3FA6-8682-9A30AC9E2651> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x9b293000 - 0x9b294fff libsystem_blocks.dylib (65) <5D98F022-E863-31D4-8ADE-D53B2AE0D331> /usr/lib/system/libsystem_blocks.dylib 0x9b295000 - 0x9b5efff7 libmecabra.dylib (666.7) <55A50B97-92D3-3DDC-8E3A-58BC5FFE5E3F> /usr/lib/libmecabra.dylib 0x9b5f0000 - 0x9b5f8feb libcldcpuengine.dylib (2.4.5) <3B205610-9339-3B26-8EAA-4B03AB9FBF56> /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libcldcpuengine.dylib 0x9b5f9000 - 0x9b5fcfff libdyld.dylib (353.2.4) <88BAC8CC-467A-3465-B941-9B52404E4AFA> /usr/lib/system/libdyld.dylib 0x9b5fd000 - 0x9b630fff com.apple.CoreServicesInternal (221.7.2 - 221.7.2) <709E9F1B-D266-399B-9A4B-3785BBF64E01> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x9b631000 - 0x9b644fff com.apple.Sharing (328.17 - 328.17) <71EC4FF5-C6F0-3521-BADE-E8BD71AA7741> /System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing 0x9b645000 - 0x9b67fff7 com.apple.DebugSymbols (115 - 115) /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols 0x9bc11000 - 0x9bc37ff7 com.apple.IconServices (47.1 - 47.1) <9C537499-B375-3F84-BF4A-EEF757FC26A9> /System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices 0x9bc38000 - 0x9c036fff com.apple.CoreGraphics (1.600.0 - 788.3.5) <58484675-9FC3-3D7E-9101-7027279E0263> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x9c071000 - 0x9c0e4ffb com.apple.framework.CoreWLAN (5.0 - 500.35.2) <812E25B3-2041-360E-8C1D-0CCA1E66D1EE> /System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN 0x9c0e5000 - 0x9c0eefff com.apple.DiskArbitration (2.6 - 2.6) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x9c0ef000 - 0x9c163fff com.apple.Heimdal (4.0 - 2.0) /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x9c164000 - 0x9c174ff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x9c175000 - 0x9c181ff3 libcommonCrypto.dylib (60061.30.1) <18B9D797-34BA-3F73-8744-7812DC9AE89C> /usr/lib/system/libcommonCrypto.dylib 0xba900000 - 0xba91dfff libJapaneseConverter.dylib (64) <7265FE24-923E-3CF7-92D6-DB6EFB9E8379> /System/Library/CoreServices/Encodings/libJapaneseConverter.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 2 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 5300688 thread_create: 0 thread_set_state: 161 VM Region Summary: ReadOnly portion of Libraries: Total=185.2M resident=37.2M(20%) swapped_out_or_unallocated=148.0M(80%) Writable regions: Total=229.5M written=6572K(3%) resident=70.0M(31%) swapped_out=4K(0%) unallocated=159.5M(69%) REGION TYPE VIRTUAL =========== ======= CG backing stores 13.5M CG image 92K CG shared images 240K CoreAnimation 128K CoreUI image data 124K Foundation 4K IOKit 10.0M Kernel Alloc Once 4K MALLOC 101.5M MALLOC (admin) 48K MALLOC_LARGE (reserved) 1024K reserved VM address space (unallocated) Memory Tag 242 12K OpenCL 16K SBRK (reserved) 4096K reserved VM address space (unallocated) Stack 70.2M Stack (reserved) 516K reserved VM address space (unallocated) VM_ALLOCATE 88.3M VM_ALLOCATE (reserved) 36K reserved VM address space (unallocated) __DATA 13.7M __GLSLBUILTINS 2588K __IMAGE 528K __LINKEDIT 44.7M __OBJC 2272K __TEXT 140.6M __UNICODE 552K mapped file 155.6M shared memory 68K =========== ======= TOTAL 650.1M TOTAL, minus reserved VM space 644.6M Model: MacBookPro11,3, BootROM MBP112.0138.B16, 4 processors, Intel Core i7, 2.6 GHz, 16 GB, SMC 2.19f12 Graphics: Intel Iris Pro, Intel Iris Pro, Built-In Graphics: NVIDIA GeForce GT 750M, NVIDIA GeForce GT 750M, PCIe, 2048 MB Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x02FE, - Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x02FE, - AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x134), Broadcom BCM43xx 1.0 (7.15.166.24.3) Bluetooth: Version 4.3.6f3 16238, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0512F, 500.28 GB USB Device: Internal Memory Card Reader USB Device: Apple Internal Keyboard / Trackpad USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Pro, Apple Inc., 17.1 On Wed, Sep 7, 2016 at 11:58 AM, Yoshiki Ohshima wrote: > I'll try that. > > BTW, on my Mac the VM Squeak5.1-16548-32bit-All-in-One crashes as soon > as I type a tab key and more or less consistently. Is this a known > issue? > > On Wed, Sep 7, 2016 at 11:07 AM, Levente Uzonyi wrote: >> Have you tried enabling logging or debugging? >> You can do by opening the server widget from the Wolrd menu, open..., >> RFB/VNCServer. The best is to pin it. >> The widget has a debugging submenu where you can enable logging and >> debugging, and you can open the server log too. >> >> Seeing those messages, it seems your client is trying to detect the encoding >> and/or color depth. Setting them before connecting should help in this case. >> >> Levente >> >> >> On Wed, 7 Sep 2016, Yoshiki Ohshima wrote: >> >>> In the console, there are bunch of messages like this: >>> >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionTimedOut: send data timeout; data not sent >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> RFB: caught ConnectionTimedOut: send data timeout; data not sent >>> RFB: caught ConnectionClosed: Connection close while waiting for data. >>> >>> It basically reset the connection every some milliseconds and >>> reconnect. I browsed code and RFBSocket>>waitForSendDoneFor: looks >>> suspicious; but some number fudging in that method on my end did not >>> help. >>> >>> (This excessive OS resource use may explain my other issue of getting >>> to the state of the VM cannot write or read a file...) >>> >>> On Tue, Sep 6, 2016 at 11:52 PM, Yoshiki Ohshima >>> wrote: >>>> >>>> With a 5.0 based image and a VM with VM version: " 'Croquet Closure >>>> Cog VM [CoInterpreterPrimitives VMMaker.oscog-eem.1044] Squeak Cog >>>> Spur 5.0.3248'", and RFB-ul.13, I still get the error. >>>> >>>> (I wanted to mail the SqueakDebug.log but I have been encountering >>>> another problem. The VM somehow loses an ability to read and write >>>> files and the debugger only shows decompiled code and calling >>>> Debugger>>storeLog manually does not produce a file.) >>>> >>>> There is no reason to stick with a 5.0 image so I'll move on to 5.1 >>>> and see what happens. >>>> >>>> On Fri, Sep 2, 2016 at 4:27 PM, Yoshiki Ohshima >>>> wrote: >>>>> >>>>> Thanks. I was not aware of those newer versions. I'll give it a try. >>>>> >>>>> >>>>> On Fri, Sep 2, 2016 at 3:59 PM, Levente Uzonyi >>>>> wrote: >>>>>> >>>>>> Hi Yoshiki, >>>>>> >>>>>> Your symptom doesn't ring a bell. I don't know what settings your >>>>>> client >>>>>> program has, but with other clients it usually helps to set the color >>>>>> space >>>>>> to 24-bits and the encoding to ZRLE. >>>>>> >>>>>> You can try to enable logging on RFBServer to see what happens when >>>>>> your >>>>>> client gets disconnected. >>>>>> >>>>>> We have improved the RFB package over the years[1], but I don't think >>>>>> any of >>>>>> our changes would be related to your problem. (If your image is 5.0, >>>>>> then >>>>>> RFB-ul.13 is the last one that should work. RFB-ul.14 is for 5.1.) >>>>>> >>>>>> Levente >>>>>> >>>>>> [1] http://leves.web.elte.hu/squeak/ >>>>>> >>>>>> >>>>>> On Fri, 2 Sep 2016, Yoshiki Ohshima wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I'm trying to use the RFB server RFB-ikp.8.mcz from >>>>>>> >>>>>>> http://www.squeaksource.com/RFB/ >>>>>>> >>>>>>> with the Mac OS ScreenShare client. >>>>>>> >>>>>>> The Mac OS client can connect to the server but after 10 seconds or >>>>>>> so, the server raises an error. >>>>>>> >>>>>>> Has somebody tried it lately? I am on Squeak 5.0 and 5.0 CogSpur VM. >>>>>>> Is the newer version better at running RFB? >>>>>>> >>>>>>> (The client has some other issues. I'll track them down later.) >>>>>>> >>>>>>> -- >>>>>>> -- Yoshiki >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> -- Yoshiki >>>> >>>> >>>> >>>> >>>> -- >>>> -- Yoshiki >>> >>> >>> >>> >>> -- >>> -- Yoshiki >>> >>> >> > > > > -- > -- Yoshiki -- -- Yoshiki From jecel at merlintec.com Thu Sep 8 23:20:41 2016 From: jecel at merlintec.com (Jecel Assumpcao Jr.) Date: Thu Sep 8 23:20:56 2016 Subject: [squeak-dev] thesis (was: 20 Years of Squeak) In-Reply-To: References: <20160714122240.GA52642@shell.msen.com> <2F4AA202-E6F4-4E79-9286-5481ADBDA6EB@rowledge.org> <1BF029BC-6BD3-414F-A616-DC0E412ED375@rowledge.org> <20160907234731.72D83A221293@bart0101.email.locaweb.com.br> Message-ID: <20160908232047.1197831D98EF9@bart0179.email.locaweb.com.br> Tony Garnock-Jones wrote: > That was indeed very interesting! Thanks! Unfortunately, my style of slides are not very useful without my narration. > Is your PhD dissertation available anywhere? I tried googling for it, > but couldn't find anything. The May 2015 version of the text is missing a bunch of chapters, but the appendices have details about the processor's instruction set: http://www.merlintec.com/download/jecel_phd_deposited.pdf I made some changes to the project in October 2015 and updated the text, but I still haven't finished it and put it online yet. For those interested in Smalltalk hardware but who would prefer a quick summary, the main idea is that in Von Neumann computers if you have enough resources for the processor then the performance is limited by the memory bandwidth. SiliconSqueak uses four different caches and a few DMA style "stream units" to both increase the local memory bandwidth and also to separate the different kinds of memory accesses so the SDRAM controller can do a better job. Another idea is that the Squeak Virtual Machine has three parts: the bytecode interpreter, the object memory and the primitives/plugins. If you could somehow execute bytecodes really fast, then you wouldn't need the first part and you could execute the Slang version of the second and third parts (just like you do in the simulator). One interesting detail is how SiliconSqueak uses the code cache to implement PICs (Polymorphic Inline Caches) with constant access times instead of the linear times that Cog and such VMs use on normal processors. -- Jecel From commits at source.squeak.org Thu Sep 8 23:40:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 8 23:40:16 2016 Subject: [squeak-dev] The Inbox: Chronology-Core-cbc.8.mcz Message-ID: A new version of Chronology-Core was added to project The Inbox: http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz ==================== Summary ==================== Name: Chronology-Core-cbc.8 Author: cbc Time: 8 September 2016, 4:39:41.903555 pm UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 Ancestors: Chronology-Core-bf.7 Add a rational #= to TimeZone - based on offset. =============== Diff against Chronology-Core-bf.7 =============== Item was added: + ----- Method: TimeZone>>= (in category 'comparing') ----- + = aTimeZone + ^offset = aTimeZone offset! From cunningham.cb at gmail.com Thu Sep 8 23:42:32 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Sep 8 23:42:35 2016 Subject: [squeak-dev] The Inbox: Chronology-Core-cbc.8.mcz In-Reply-To: <57d1f6e1.5346370a.2be31.040aSMTPIN_ADDED_MISSING@mx.google.com> References: <57d1f6e1.5346370a.2be31.040aSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This change is requested after I couldn't get get TimeZone compares to work. Try this before loading: (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time (US & Canada)' abbreviation: 'PDT') = (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time (US & Canada)' abbreviation: 'PDT') Returns false - since the hash isn't the same (different instances), although what they represent is exactly the same. After this, returns true. -cbc On Thu, Sep 8, 2016 at 4:40 PM, wrote: > A new version of Chronology-Core was added to project The Inbox: > http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz > > ==================== Summary ==================== > > Name: Chronology-Core-cbc.8 > Author: cbc > Time: 8 September 2016, 4:39:41.903555 pm > UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 > Ancestors: Chronology-Core-bf.7 > > Add a rational #= to TimeZone - based on offset. > > =============== Diff against Chronology-Core-bf.7 =============== > > Item was added: > + ----- Method: TimeZone>>= (in category 'comparing') ----- > + = aTimeZone > + ^offset = aTimeZone offset! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160908/486816b0/attachment.htm From pdebruic at gmail.com Fri Sep 9 00:31:50 2016 From: pdebruic at gmail.com (Paul DeBruicker) Date: Fri Sep 9 00:35:09 2016 Subject: [squeak-dev] Re: The Inbox: Chronology-Core-cbc.8.mcz In-Reply-To: References: Message-ID: <1473381110290-4914869.post@n4.nabble.com> TimeZones at different points in time, have different offsets (e.g. January 1 and July 1 in L.A. -8 and -7 hours respectively). And they also, at different points in time, have different offsets for the same point in time (e.g. https://en.wikipedia.org/wiki/Time_in_Indiana#2006). And their offset change arbitrarily without much notice (e.g.https://www.washingtonpost.com/news/worldviews/wp/2016/07/06/egypt-cancelled-daylight-savings-time-three-days-before-it-was-due-to-start/) Maybe a better approach for your use is to have a Time Zone cache so there is only one canonical time zone for each time zone name/abbreviation combo you're dealing with in your images. cbc wrote > This change is requested after I couldn't get get TimeZone compares to > work. Try this before loading: > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > (US > & Canada)' abbreviation: 'PDT') > = > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > (US > & Canada)' abbreviation: 'PDT') > > Returns false - since the hash isn't the same (different instances), > although what they represent is exactly the same. > > After this, returns true. > > -cbc > > On Thu, Sep 8, 2016 at 4:40 PM, < > commits@.squeak > > wrote: > >> A new version of Chronology-Core was added to project The Inbox: >> http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz >> >> ==================== Summary ==================== >> >> Name: Chronology-Core-cbc.8 >> Author: cbc >> Time: 8 September 2016, 4:39:41.903555 pm >> UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 >> Ancestors: Chronology-Core-bf.7 >> >> Add a rational #= to TimeZone - based on offset. >> >> =============== Diff against Chronology-Core-bf.7 =============== >> >> Item was added: >> + ----- Method: TimeZone>>= (in category 'comparing') ----- >> + = aTimeZone >> + ^offset = aTimeZone offset! >> >> >> -- View this message in context: http://forum.world.st/The-Inbox-Chronology-Core-cbc-8-mcz-tp4914866p4914869.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Fri Sep 9 05:55:21 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Sep 9 05:55:24 2016 Subject: [squeak-dev] Re: The Inbox: Chronology-Core-cbc.8.mcz In-Reply-To: <1473381110290-4914869.post@n4.nabble.com> References: <1473381110290-4914869.post@n4.nabble.com> Message-ID: yeess. But what I want is too know if I use one or the other of the timeZones, will that zone (specifically, the offset) give me the same time, or a different time? If there is not a valid way to compare timezones, and we don't want to check if they are the same, then I would fall back to asking if the offsets are the same (which is what I was/am proposing that TimeZone>>= do - compare by offsets, not by name or abbreviation). In my case, I was picking up the timezone from a windows box, which has different names than what is the 'standard' in the image - and quite possibly different by version of Windows (haven't checked that yet). The offset, though, is consistent, at least. -cbc On Thu, Sep 8, 2016 at 5:31 PM, Paul DeBruicker wrote: > TimeZones at different points in time, have different offsets (e.g. > January 1 > and July 1 in L.A. -8 and -7 hours respectively). > > And they also, at different points in time, have different offsets for the > same point in time (e.g. > https://en.wikipedia.org/wiki/Time_in_Indiana#2006). > > > And their offset change arbitrarily without much notice > (e.g.https://www.washingtonpost.com/news/worldviews/wp/2016/07/06/ > egypt-cancelled-daylight-savings-time-three-days- > before-it-was-due-to-start/) > > > > Maybe a better approach for your use is to have a Time Zone cache so there > is only one canonical time zone for each time zone name/abbreviation combo > you're dealing with in your images. > > > > > > > cbc wrote > > This change is requested after I couldn't get get TimeZone compares to > > work. Try this before loading: > > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > > (US > > & Canada)' abbreviation: 'PDT') > > = > > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > > (US > > & Canada)' abbreviation: 'PDT') > > > > Returns false - since the hash isn't the same (different instances), > > although what they represent is exactly the same. > > > > After this, returns true. > > > > -cbc > > > > On Thu, Sep 8, 2016 at 4:40 PM, < > > > commits@.squeak > > > > wrote: > > > >> A new version of Chronology-Core was added to project The Inbox: > >> http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz > >> > >> ==================== Summary ==================== > >> > >> Name: Chronology-Core-cbc.8 > >> Author: cbc > >> Time: 8 September 2016, 4:39:41.903555 pm > >> UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 > >> Ancestors: Chronology-Core-bf.7 > >> > >> Add a rational #= to TimeZone - based on offset. > >> > >> =============== Diff against Chronology-Core-bf.7 =============== > >> > >> Item was added: > >> + ----- Method: TimeZone>>= (in category 'comparing') ----- > >> + = aTimeZone > >> + ^offset = aTimeZone offset! > >> > >> > >> > > > > > > -- > View this message in context: http://forum.world.st/The- > Inbox-Chronology-Core-cbc-8-mcz-tp4914866p4914869.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160908/aba4b3a3/attachment.htm From commits at source.squeak.org Fri Sep 9 12:09:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 9 12:09:35 2016 Subject: [squeak-dev] The Trunk: System-bf.915.mcz Message-ID: Bert Freudenberg uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-bf.915.mcz ==================== Summary ==================== Name: System-bf.915 Author: bf Time: 9 September 2016, 2:04:28.571597 pm UUID: ffcf5f50-0963-46e9-906e-a389fac9c172 Ancestors: System-bf.914 DataStream: properly support reading immediate class instances (supersedes hacks in System-bf.914). Only used for Characters, because SmallIntegers and Floats are special-cased anyways. =============== Diff against System-bf.914 =============== Item was added: + ----- Method: Character class>>readImmediateFrom:size: (in category '*system-object storage') ----- + readImmediateFrom: aDataStream size: varsOnDisk + "Read an instance of self based on the contents of aDataStream. Return it. + Read in the value as written by Character>>storeDataOn:. + NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it. Because we need to read the value before creating the object, we need to reset the current reference position." + | refPosn instance | + refPosn := aDataStream getCurrentReference. + instance := self value: aDataStream next. + aDataStream setCurrentReference: refPosn. + aDataStream beginReference: instance. + ^instance! Item was removed: - ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') ----- - readCharacterOfSize: instSize - "Character changed to an immediate class in Spur" - | refPosn val | - self assert: instSize = 1. - refPosn := self getCurrentReference. - self setCurrentReference: refPosn. "before recursion - not really needed for integer" - val := self next. - self assert: val isInteger. - self setCurrentReference: refPosn. "before returning to next" - ^ Character value: val. - ! Item was changed: ----- Method: DataStream>>readInstance (in category 'write and read') ----- readInstance "PRIVATE -- Read the contents of an arbitrary instance. ASSUMES: readDataFrom:size: sends me beginReference: after it instantiates the new object but before reading nested objects. NOTE: We must restore the current reference position after recursive calls to next. Let the instance, not the class read the data. " | instSize aSymbol refPosn anObject newClass | instSize := (byteStream nextNumber: 4) - 1. refPosn := self getCurrentReference. aSymbol := self next. - (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"]) - ifTrue: [^ self readCharacterOfSize: instSize]. newClass := Smalltalk at: aSymbol asSymbol. + self setCurrentReference: refPosn. "before readDataFrom:size:" + anObject := newClass isImmediateClass + ifTrue: [newClass readImmediateFrom: self size: instSize] + ifFalse: [anObject := newClass isVariable "Create object here" - anObject := newClass isVariable "Create object here" ifFalse: [newClass basicNew] ifTrue: [newClass basicNew: instSize - (newClass instSize)]. + anObject readDataFrom: self size: instSize]. - self setCurrentReference: refPosn. "before readDataFrom:size:" - anObject := anObject readDataFrom: self size: instSize. self setCurrentReference: refPosn. "before returning to next" ^ anObject! Item was changed: ----- Method: SmartRefStream>>readInstanceSize:clsname:refPosn: (in category 'read write') ----- readInstanceSize: instSize clsname: className refPosn: refPosn "The common code to read the contents of an arbitrary instance. ASSUMES: readDataFrom:size: sends me beginReference: after it instantiates the new object but before reading nested objects. NOTE: We must restore the current reference position after recursive calls to next. Three cases for files from older versions of the system: 1) Class has not changed shape, read it straight. 2) Class has changed instance variables (or needs fixup). Call a particular method to do it. 3) There is a new class instead. Find it, call a particular method to read. All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!! See setStream:" | anObject newName newClass dict oldInstVars isMultiSymbol | self flag: #bobconv. self setCurrentReference: refPosn. "remember pos before readDataFrom:size:" newName := renamed at: className ifAbsent: [className]. - newName == #Character - ifTrue: [^ self readCharacterOfSize: instSize]. isMultiSymbol := newName = #MultiSymbol or: [newName = #WideSymbol]. "isMultiSymbol ifTrue: [self halt]." newClass := Smalltalk at: newName asSymbol. (steady includes: newClass) & (newName == className) ifTrue: [ + anObject := newClass isImmediateClass + ifTrue: [newClass readImmediateFrom: self size: instSize] + ifFalse: [anObject := newClass isVariable "Create object here" + ifFalse: [newClass basicNew] + ifTrue: [newClass basicNew: instSize - (newClass instSize)]. + anObject readDataFrom: self size: instSize]. + - anObject := newClass isVariable "Create it here" - ifFalse: [newClass basicNew] - ifTrue: [newClass basicNew: instSize - (newClass instSize)]. - - anObject := anObject readDataFrom: self size: instSize. self setCurrentReference: refPosn. "before returning to next" isMultiSymbol ifTrue: [^ Symbol intern: anObject asString]. ^ anObject]. oldInstVars := structures at: className ifAbsent: [ self error: 'class is not in structures list']. "Missing in object file" anObject := newClass createFrom: self size: instSize version: oldInstVars. "only create the instance" self beginReference: anObject. dict := self catalogValues: oldInstVars size: instSize. "indexed vars as (1 -> val) etc." dict at: #ClassName put: className. "so conversion method can know it" "Give each superclass a chance to make its changes" self storeInstVarsIn: anObject from: dict. "ones with the same names" anObject := self applyConversionMethodsTo: anObject className: className varMap: dict. self setCurrentReference: refPosn. "before returning to next" isMultiSymbol ifTrue: [^ Symbol intern: anObject asString]. ^ anObject! From cunningham.cb at gmail.com Fri Sep 9 20:12:16 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Sep 9 20:12:20 2016 Subject: [squeak-dev] Re: The Inbox: Chronology-Core-cbc.8.mcz In-Reply-To: References: <1473381110290-4914869.post@n4.nabble.com> Message-ID: After thinking about this a bit more, I should be caching it, too. And probably remove the #=. -cbc On Thu, Sep 8, 2016 at 10:55 PM, Chris Cunningham wrote: > yeess. But what I want is too know if I use one or the other of the > timeZones, will that zone (specifically, the offset) give me the same time, > or a different time? > > If there is not a valid way to compare timezones, and we don't want to > check if they are the same, then I would fall back to asking if the offsets > are the same (which is what I was/am proposing that TimeZone>>= do - > compare by offsets, not by name or abbreviation). > > In my case, I was picking up the timezone from a windows box, which has > different names than what is the 'standard' in the image - and quite > possibly different by version of Windows (haven't checked that yet). The > offset, though, is consistent, at least. > > -cbc > > On Thu, Sep 8, 2016 at 5:31 PM, Paul DeBruicker > wrote: > >> TimeZones at different points in time, have different offsets (e.g. >> January 1 >> and July 1 in L.A. -8 and -7 hours respectively). >> >> And they also, at different points in time, have different offsets for the >> same point in time (e.g. >> https://en.wikipedia.org/wiki/Time_in_Indiana#2006). >> >> >> And their offset change arbitrarily without much notice >> (e.g.https://www.washingtonpost.com/news/worldviews/wp/2016/ >> 07/06/egypt-cancelled-daylight-savings-time-three- >> days-before-it-was-due-to-start/) >> >> >> >> Maybe a better approach for your use is to have a Time Zone cache so there >> is only one canonical time zone for each time zone name/abbreviation combo >> you're dealing with in your images. >> >> >> >> >> >> >> cbc wrote >> > This change is requested after I couldn't get get TimeZone compares to >> > work. Try this before loading: >> > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time >> > (US >> > & Canada)' abbreviation: 'PDT') >> > = >> > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time >> > (US >> > & Canada)' abbreviation: 'PDT') >> > >> > Returns false - since the hash isn't the same (different instances), >> > although what they represent is exactly the same. >> > >> > After this, returns true. >> > >> > -cbc >> > >> > On Thu, Sep 8, 2016 at 4:40 PM, < >> >> > commits@.squeak >> >> > > wrote: >> > >> >> A new version of Chronology-Core was added to project The Inbox: >> >> http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz >> >> >> >> ==================== Summary ==================== >> >> >> >> Name: Chronology-Core-cbc.8 >> >> Author: cbc >> >> Time: 8 September 2016, 4:39:41.903555 pm >> >> UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 >> >> Ancestors: Chronology-Core-bf.7 >> >> >> >> Add a rational #= to TimeZone - based on offset. >> >> >> >> =============== Diff against Chronology-Core-bf.7 =============== >> >> >> >> Item was added: >> >> + ----- Method: TimeZone>>= (in category 'comparing') ----- >> >> + = aTimeZone >> >> + ^offset = aTimeZone offset! >> >> >> >> >> >> >> >> >> >> >> >> -- >> View this message in context: http://forum.world.st/The-Inbo >> x-Chronology-Core-cbc-8-mcz-tp4914866p4914869.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160909/f7fab3ca/attachment.htm From commits at source.squeak.org Fri Sep 9 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 9 21:55:10 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160909215508.8270.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068921.html Name: System-bf.915 Ancestors: System-bf.914 DataStream: properly support reading immediate class instances (supersedes hacks in System-bf.914). Only used for Characters, because SmallIntegers and Floats are special-cased anyways. ============================================= From Yoshiki.Ohshima at acm.org Fri Sep 9 22:15:52 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri Sep 9 22:15:58 2016 Subject: [squeak-dev] RFB In-Reply-To: References: Message-ID: At Wed, 7 Sep 2016 20:07:31 +0200 (CEST), Levente Uzonyi wrote: > > Have you tried enabling logging or debugging? > You can do by opening the server widget from the Wolrd > menu, open..., RFB/VNCServer. The best is to pin it. > The widget has a debugging submenu where you can enable logging and > debugging, and you can open the server log too. > > Seeing those messages, it seems your client is trying to detect the > encoding and/or color depth. Setting them before connecting should help > in this case. (By disabling my Japanese input method, I can at least run things in Squeak.) So I enabled logging and verbose logging and get the following. The part from: ---------------- RFB: [RFBServer>>runSession:] connection from localhost ---------------- to: ---------------- RFB: [RFBSession>>rfbSetPixelFormat] colour map a WordArray(16711680 65280 255 0) an IntegerArray(0 0 0 0) ---------------- repeats quickly until it dies. I tried to 'enable debugging', but it gets a halt notifier but then go into the emergency evaluator. -- Yoshiki -------------------------------------- RFB: [RFBSession>>release] released RFB: [RFBSession>>stop] stopped RFB: [RFBSession>>release] released RFB: [RFBServer>>removeDisplay] RFBDisplayScreen. RFBEventSensor removed RFB: [RFBServer>>release] released RFB: [RFBServer>>installDisplay] RFBDisplayScreen, RFBEventSensor installed RFB: [RFBServer>>initialize] initialised RFB: [RFBServer>>start:] start RFB: [RFBServer>>runLoop] running RFB: [RFBServer>>start:] started RFB: server already running? RFB: [RFBServer>>runSession:] connection from localhost RFB: [RFBSession>>initServer:socket:reverse:] initialised RFB: [RFBSession>>start] started a Process in [] in BlockClosure>>newProcess RFB: [RFBSession>>runLoop] running RFB: [RFBSession>>runLoop] send protocol version RFB: [RFBSession>>rfbProtocolVersion] RFB 003.003 RFB: [RFBSession>>rfbProtocolVersion] viewer using protocol 3.3 RFB: [RFBSession>>rfbProtocolVersion] ignoring minor version mismatch RFB: [RFBSession>>rfbInitialisation] client shared: true RFB: [RFBSession>>rfbInitialisation] a RFBSocket[connected] connected RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 3F3 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 3EA RFB: [RFBSession>>rfbEncodingZlib] rfbEncodingZlib RFB: [RFBSession>>setPreferredEncoding:] using ZRLE encoding RFB: [RFBSession>>rfbEncodingRichCursor] rfbEncodingRichCursor RFB: [RFBSession>>rfbEncodingRichCursor] enabling full-colour cursor updates RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 450 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44C RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: FFFFFF21 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44D RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 451 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44E RFB: [RFBSession>>rfbSetPixelFormat] received rfbSetPixelFormat RFB: [RFBSession>>rfbSetPixelFormat] set pixel format: 32bpp, depth 32 LE, true colour 255,255,255 16+8+0 RFB: [RFBSession>>rfbSetPixelFormat] colour map a WordArray(16711680 65280 255 0) an IntegerArray(0 0 0 0) RFB: [RFBServer>>runSession:] connection from localhost RFB: [RFBSession>>initServer:socket:reverse:] initialised RFB: [RFBSession>>start] started a Process in [] in BlockClosure>>newProcess RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 3F3 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 3EA RFB: [RFBSession>>rfbEncodingZlib] rfbEncodingZlib RFB: [RFBSession>>setPreferredEncoding:] using ZRLE encoding RFB: [RFBSession>>rfbEncodingRichCursor] rfbEncodingRichCursor RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 450 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44C RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: FFFFFF21 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44D RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 451 RFB: [RFBSession>>rfbEncodingUnknown:] ignoring unknown encoding: 44E RFB: caught ConnectionClosed: Connection close while waiting for data. RFB: [RFBSession>>runLoop] run loop exiting RFB: [RFBSession>>release] released RFB: [RFBSession>>runLoop] running RFB: [RFBSession>>runLoop] send protocol version RFB: [RFBSession>>rfbProtocolVersion] RFB 003.003 -------------------------------------- From lewis at mail.msen.com Sat Sep 10 02:15:35 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Sep 10 02:15:38 2016 Subject: [squeak-dev] Re: The Inbox: Chronology-Core-cbc.8.mcz In-Reply-To: References: <1473381110290-4914869.post@n4.nabble.com> Message-ID: <20160910021535.GA36964@shell.msen.com> On Thu, Sep 08, 2016 at 10:55:21PM -0700, Chris Cunningham wrote: > yeess. But what I want is too know if I use one or the other of the > timeZones, will that zone (specifically, the offset) give me the same time, > or a different time? Paul is right, be careful with that. If you want to know if the offsets are the same, then it would be better to ask that explicitly. A time zone (theoretically, not in the minimal Squeak implementation) has many offsets, where the offset value is a function of a point in time (usually, but not necessarily, the time now). So, if you want to know if the offset for "time zone A" at a given point in time is the same as the offset for "time zone B" at that same time, then you should not try to simplify the query by trying to ask if if the time zones are equal. > > If there is not a valid way to compare timezones, and we don't want to > check if they are the same, then I would fall back to asking if the offsets > are the same (which is what I was/am proposing that TimeZone>>= do - > compare by offsets, not by name or abbreviation). Yes that is the right thing to do. More precisely, you would ask if (timeZoneA offsetFor: somePointInTime) = (timeZoneB offsetFor: somePointInTime). > > In my case, I was picking up the timezone from a windows box, which has > different names than what is the 'standard' in the image - and quite > possibly different by version of Windows (haven't checked that yet). The > offset, though, is consistent, at least. Yes but ... see Paul's explanation below :-) If you think of a time zone as a lookup table of offsets as a function of points in time (https://en.wikipedia.org/wiki/Tz_database), then the time zone that you select on your Windows OS (or any other operating system, database, or e.g. Java runtime) will probably be a name that refers to one of these tables. Given a time zone table, you can look up the offset value for a given point in time. If you are just using TimeZone in Squeak, and if you do not care about details like daylight savings time, then comparing the offsets of two time zones to decide if they are the same is probably fine. But you would not want to implement that as #= for comparing TimeZone instances, because that would be wrong in most non-trivial cases. Dave > > -cbc > > On Thu, Sep 8, 2016 at 5:31 PM, Paul DeBruicker wrote: > > > TimeZones at different points in time, have different offsets (e.g. > > January 1 > > and July 1 in L.A. -8 and -7 hours respectively). > > > > And they also, at different points in time, have different offsets for the > > same point in time (e.g. > > https://en.wikipedia.org/wiki/Time_in_Indiana#2006). > > > > > > And their offset change arbitrarily without much notice > > (e.g.https://www.washingtonpost.com/news/worldviews/wp/2016/07/06/ > > egypt-cancelled-daylight-savings-time-three-days- > > before-it-was-due-to-start/) > > > > > > > > Maybe a better approach for your use is to have a Time Zone cache so there > > is only one canonical time zone for each time zone name/abbreviation combo > > you're dealing with in your images. > > > > > > > > > > > > > > cbc wrote > > > This change is requested after I couldn't get get TimeZone compares to > > > work. Try this before loading: > > > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > > > (US > > > & Canada)' abbreviation: 'PDT') > > > = > > > (TimeZone offset: (Duration hours: -7 minutes: 0) name: 'Pacific Time > > > (US > > > & Canada)' abbreviation: 'PDT') > > > > > > Returns false - since the hash isn't the same (different instances), > > > although what they represent is exactly the same. > > > > > > After this, returns true. > > > > > > -cbc > > > > > > On Thu, Sep 8, 2016 at 4:40 PM, < > > > > > commits@.squeak > > > > > > wrote: > > > > > >> A new version of Chronology-Core was added to project The Inbox: > > >> http://source.squeak.org/inbox/Chronology-Core-cbc.8.mcz > > >> > > >> ==================== Summary ==================== > > >> > > >> Name: Chronology-Core-cbc.8 > > >> Author: cbc > > >> Time: 8 September 2016, 4:39:41.903555 pm > > >> UUID: 7315e61d-3652-fe44-8472-8037bd3ecc83 > > >> Ancestors: Chronology-Core-bf.7 > > >> > > >> Add a rational #= to TimeZone - based on offset. > > >> > > >> =============== Diff against Chronology-Core-bf.7 =============== > > >> > > >> Item was added: > > >> + ----- Method: TimeZone>>= (in category 'comparing') ----- > > >> + = aTimeZone > > >> + ^offset = aTimeZone offset! > > >> > > >> > > >> > > > > > > > > > > > > -- > > View this message in context: http://forum.world.st/The- > > Inbox-Chronology-Core-cbc-8-mcz-tp4914866p4914869.html > > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > > > > From herbertkoenig at gmx.net Sat Sep 10 19:26:26 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Sat Sep 10 19:26:35 2016 Subject: [squeak-dev] The Trunk: System-bf.914.mcz In-Reply-To: References: <57d1c14b.9f18370a.16179.9ecbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi, sadly it doesn't fix it. I tried to: update a 6.0 alpha to trunk --> freezes update 5.1 to trunk --> works if some changes are accepted and merged and just loaded System-bf.915.mcz into a 5.1 With the latter two MorphicProject DNU #acceptProjectDetails. in the last one (loading System-bf.915.mcz) I comment out self acceptProjectDetails: details in MorphicProject>>storeOnServer then FileList2>>morphicViewProjectSaverFor: stumbles over the removal of ColorTheme, which I think has taken place recently. Replacing ColorTheme current with SmallLandColorTheme fails because SmallLandColorTheme lacks a lot of messages. So replacing all these with plausible values lets me find out that AlignmentMorphBob1 also relies on ColorTheme Next I filed in ColorTheme which was still present in 5.0 and I really get the save dialogue for the project. But then EtoyProjectDetailsMorph class>>getFullInfoFor: aProject ifValid: aBlock expandedFormat: wants one argument for aBlock but gets zero. I give up :-( I guess here we see why we want as many packages as possible in trunk to prevent that changes over several versions make it hard to get something to work again. Cheers, Herbert Then it fails during to Am 08.09.2016 um 22:39 schrieb Chris Muller: > Excellent! > > Now I have to wonder if this also fixes the problem with > saving/restoring Projects... > > Worth a try, Herbert? > > > On Thu, Sep 8, 2016 at 2:50 PM, wrote: >> Bert Freudenberg uploaded a new version of System to project The Trunk: >> http://source.squeak.org/trunk/System-bf.914.mcz >> >> ==================== Summary ==================== >> >> Name: System-bf.914 >> Author: bf >> Time: 8 September 2016, 9:49:26.777611 pm >> UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5 >> Ancestors: System-cmm.913 >> >> Fix DataStream reading of Characters on Spur. >> >> =============== Diff against System-cmm.913 =============== >> >> Item was changed: >> ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') ----- >> readCharacterOfSize: instSize >> + "Character changed to an immediate class in Spur" >> | refPosn val | >> self assert: instSize = 1. >> refPosn := self getCurrentReference. >> + self setCurrentReference: refPosn. "before recursion - not really needed for integer" >> - self setCurrentReference: refPosn. >> val := self next. >> + self assert: val isInteger. >> + self setCurrentReference: refPosn. "before returning to next" >> ^ Character value: val. >> ! >> >> Item was changed: >> ----- Method: DataStream>>readInstance (in category 'write and read') ----- >> readInstance >> "PRIVATE -- Read the contents of an arbitrary instance. >> ASSUMES: readDataFrom:size: sends me beginReference: after it >> instantiates the new object but before reading nested objects. >> NOTE: We must restore the current reference position after >> recursive calls to next. >> Let the instance, not the class read the data. " >> | instSize aSymbol refPosn anObject newClass | >> >> instSize := (byteStream nextNumber: 4) - 1. >> refPosn := self getCurrentReference. >> aSymbol := self next. >> + (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"]) >> - aSymbol == #Character >> ifTrue: [^ self readCharacterOfSize: instSize]. >> newClass := Smalltalk at: aSymbol asSymbol. >> anObject := newClass isVariable "Create object here" >> ifFalse: [newClass basicNew] >> ifTrue: [newClass basicNew: instSize - (newClass instSize)]. >> self setCurrentReference: refPosn. "before readDataFrom:size:" >> anObject := anObject readDataFrom: self size: instSize. >> self setCurrentReference: refPosn. "before returning to next" >> ^ anObject! >> >> Item was changed: >> ----- Method: DataStream>>vacantRef (in category 'other') ----- >> vacantRef >> "Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference >> position' to identify a reference that's not yet filled in. This must be a >> value that won't be used as an ordinary reference. Cf. outputReference: and >> readReference. -- >> NOTE: We could use a different type ID for vacant-refs rather than writing >> object-references with a magic value. (The type ID and value are >> overwritten by ordinary object-references when weak refs are fullfilled.)" >> >> + ^1073741823 "Hardcode former SmallInteger maxVal"! >> - ^ SmallInteger maxVal! >> >> From commits at source.squeak.org Sun Sep 11 17:16:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 11 17:16:23 2016 Subject: [squeak-dev] The Trunk: EToys-ul.232.mcz Message-ID: Levente Uzonyi uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-ul.232.mcz ==================== Summary ==================== Name: EToys-ul.232 Author: ul Time: 11 September 2016, 7:15:09.419613 pm UUID: 666e68e0-6e23-4f51-88d8-bdb6b9f4bd0e Ancestors: EToys-dtl.231 (hopefully) Shave off a few extra minutes of EToys loading by using Schwartzian transform in Morph class >> #unfilteredCategoriesForViewer. The real culprit is the "new" implementation of String >> #translated, which came with the EToys changes and is at least two magnitudes slower than the previous implementation. =============== Diff against EToys-dtl.231 =============== Item was changed: ----- Method: Morph class>>unfilteredCategoriesForViewer (in category '*Etoys') ----- unfilteredCategoriesForViewer "Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of: - masterOrderingOfCategorySymbols first - others last in order by translated wording" " Morph unfilteredCategoriesForViewer " | aClass additions masterOrder | aClass := self. additions := OrderedCollection new. + [ aClass == Morph superclass ] whileFalse: [ - [aClass == Morph superclass ] whileFalse: [ additions addAll: (aClass allAdditionsToViewerCategories keys asArray + "#translated can be super slow, so use Schwartzian transform" + replace: [ :each | each -> each translated ]; + sort: [ :a :b | a value <= b value ]; + replace: [ :each | each key ]). - sort: [ :a :b | a translated < b translated ]). aClass := aClass superclass ]. masterOrder := EToyVocabulary masterOrderingOfCategorySymbols. ^(masterOrder intersection: additions), (additions difference: masterOrder).! From commits at source.squeak.org Sun Sep 11 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 11 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160911215508.4386.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068922.html Name: EToys-ul.232 Ancestors: EToys-dtl.231 (hopefully) Shave off a few extra minutes of EToys loading by using Schwartzian transform in Morph class >> #unfilteredCategoriesForViewer. The real culprit is the "new" implementation of String >> #translated, which came with the EToys changes and is at least two magnitudes slower than the previous implementation. ============================================= From commits at source.squeak.org Sun Sep 11 21:59:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Sep 11 21:59:30 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz Message-ID: Chris Muller uploaded a new version of WebClient-HTTP to project The Inbox: http://source.squeak.org/inbox/WebClient-HTTP-cmm.5.mcz ==================== Summary ==================== Name: WebClient-HTTP-cmm.5 Author: cmm Time: 11 September 2016, 4:59:26.542985 pm UUID: e203b772-bc1c-4516-8bf4-4ea1bc1edb7d Ancestors: WebClient-HTTP-cmm.4 Don't force Accept header of 'text/html', let clients specify that if its appropriate. This fixes accessing servers that demand it not be present. =============== Diff against WebClient-HTTP-cmm.4 =============== Item was changed: ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- httpGetDocument: url args: args accept: mimeType request: requestString "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." | client xhdrs resp urlString progress | "Normalize the url" urlString := (Url absoluteFromText: url) asString. args ifNotNil: [ urlString := urlString, (self argString: args) ]. "Some raw extra headers which historically have been added" xhdrs := HTTPProxyCredentials, HTTPBlabEmail, "may be empty" requestString. "extra user request. Authorization" client := WebClient new. ^[resp := client httpGet: urlString do:[:req| "Add ACCEPT header" mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. - "Always accept plain text" - req addHeader: 'Accept' value: 'text/html'. - "Add the additional headers" (WebUtils readHeadersFrom: xhdrs readStream) do:[:assoc| req addHeader: assoc key value: assoc value]]. progress := [:total :amount| (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' ]. "Simulate old HTTPSocket return behavior" (resp code between: 200 and: 299) ifTrue:[MIMEDocument contentType: resp contentType content: (resp contentWithProgress: progress) url: url] ifFalse:[resp asString, resp content]. ] ensure:[client destroy]. ! From asqueaker at gmail.com Sun Sep 11 22:02:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sun Sep 11 22:03:12 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz In-Reply-To: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> References: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: With this fix, I can do: 'https://www.quandl.com/api/v3/databases.csv' asUrl retrieveContents without, I can't. On Sun, Sep 11, 2016 at 4:59 PM, wrote: > Chris Muller uploaded a new version of WebClient-HTTP to project The Inbox: > http://source.squeak.org/inbox/WebClient-HTTP-cmm.5.mcz > > ==================== Summary ==================== > > Name: WebClient-HTTP-cmm.5 > Author: cmm > Time: 11 September 2016, 4:59:26.542985 pm > UUID: e203b772-bc1c-4516-8bf4-4ea1bc1edb7d > Ancestors: WebClient-HTTP-cmm.4 > > Don't force Accept header of 'text/html', let clients specify that if its appropriate. This fixes accessing servers that demand it not be present. > > =============== Diff against WebClient-HTTP-cmm.4 =============== > > Item was changed: > ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- > httpGetDocument: url args: args accept: mimeType request: requestString > "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" > > "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." > > | client xhdrs resp urlString progress | > "Normalize the url" > urlString := (Url absoluteFromText: url) asString. > > args ifNotNil: [ > urlString := urlString, (self argString: args) > ]. > > "Some raw extra headers which historically have been added" > xhdrs := HTTPProxyCredentials, > HTTPBlabEmail, "may be empty" > requestString. "extra user request. Authorization" > > client := WebClient new. > ^[resp := client httpGet: urlString do:[:req| > "Add ACCEPT header" > mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. > > - "Always accept plain text" > - req addHeader: 'Accept' value: 'text/html'. > - > "Add the additional headers" > (WebUtils readHeadersFrom: xhdrs readStream) > do:[:assoc| req addHeader: assoc key value: assoc value]]. > > progress := [:total :amount| > (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' > ]. > > "Simulate old HTTPSocket return behavior" > (resp code between: 200 and: 299) > ifTrue:[MIMEDocument contentType: resp contentType > content: (resp contentWithProgress: progress) url: url] > ifFalse:[resp asString, resp content]. > ] ensure:[client destroy]. > ! > > From Das.Linux at gmx.de Sun Sep 11 22:05:23 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Sep 11 22:05:27 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz In-Reply-To: References: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <13E861D5-B69F-4F22-BBDE-52902213BDC0@gmx.de> On 12.09.2016, at 00:02, Chris Muller wrote: > With this fix, I can do: > > 'https://www.quandl.com/api/v3/databases.csv' asUrl retrieveContents > > without, I can't. Well, shouldn't it be something like this then?: Accept: text/html; q=1.0, */*; q=0.1 Best regards -Tobias > > On Sun, Sep 11, 2016 at 4:59 PM, wrote: >> Chris Muller uploaded a new version of WebClient-HTTP to project The Inbox: >> http://source.squeak.org/inbox/WebClient-HTTP-cmm.5.mcz >> >> ==================== Summary ==================== >> >> Name: WebClient-HTTP-cmm.5 >> Author: cmm >> Time: 11 September 2016, 4:59:26.542985 pm >> UUID: e203b772-bc1c-4516-8bf4-4ea1bc1edb7d >> Ancestors: WebClient-HTTP-cmm.4 >> >> Don't force Accept header of 'text/html', let clients specify that if its appropriate. This fixes accessing servers that demand it not be present. >> >> =============== Diff against WebClient-HTTP-cmm.4 =============== >> >> Item was changed: >> ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- >> httpGetDocument: url args: args accept: mimeType request: requestString >> "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" >> >> "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." >> >> | client xhdrs resp urlString progress | >> "Normalize the url" >> urlString := (Url absoluteFromText: url) asString. >> >> args ifNotNil: [ >> urlString := urlString, (self argString: args) >> ]. >> >> "Some raw extra headers which historically have been added" >> xhdrs := HTTPProxyCredentials, >> HTTPBlabEmail, "may be empty" >> requestString. "extra user request. Authorization" >> >> client := WebClient new. >> ^[resp := client httpGet: urlString do:[:req| >> "Add ACCEPT header" >> mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. >> >> - "Always accept plain text" >> - req addHeader: 'Accept' value: 'text/html'. >> - >> "Add the additional headers" >> (WebUtils readHeadersFrom: xhdrs readStream) >> do:[:assoc| req addHeader: assoc key value: assoc value]]. >> >> progress := [:total :amount| >> (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' >> ]. >> >> "Simulate old HTTPSocket return behavior" >> (resp code between: 200 and: 299) >> ifTrue:[MIMEDocument contentType: resp contentType >> content: (resp contentWithProgress: progress) url: url] >> ifFalse:[resp asString, resp content]. >> ] ensure:[client destroy]. >> ! >> >> > From asqueaker at gmail.com Sun Sep 11 22:09:17 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sun Sep 11 22:10:00 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz In-Reply-To: <13E861D5-B69F-4F22-BBDE-52902213BDC0@gmx.de> References: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> <13E861D5-B69F-4F22-BBDE-52902213BDC0@gmx.de> Message-ID: No, that fails too. On Sun, Sep 11, 2016 at 5:05 PM, Tobias Pape wrote: > > On 12.09.2016, at 00:02, Chris Muller wrote: > >> With this fix, I can do: >> >> 'https://www.quandl.com/api/v3/databases.csv' asUrl retrieveContents >> >> without, I can't. > > > Well, shouldn't it be something like this then?: > > Accept: text/html; q=1.0, */*; q=0.1 > > Best regards > -Tobias > >> >> On Sun, Sep 11, 2016 at 4:59 PM, wrote: >>> Chris Muller uploaded a new version of WebClient-HTTP to project The Inbox: >>> http://source.squeak.org/inbox/WebClient-HTTP-cmm.5.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: WebClient-HTTP-cmm.5 >>> Author: cmm >>> Time: 11 September 2016, 4:59:26.542985 pm >>> UUID: e203b772-bc1c-4516-8bf4-4ea1bc1edb7d >>> Ancestors: WebClient-HTTP-cmm.4 >>> >>> Don't force Accept header of 'text/html', let clients specify that if its appropriate. This fixes accessing servers that demand it not be present. >>> >>> =============== Diff against WebClient-HTTP-cmm.4 =============== >>> >>> Item was changed: >>> ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- >>> httpGetDocument: url args: args accept: mimeType request: requestString >>> "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" >>> >>> "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." >>> >>> | client xhdrs resp urlString progress | >>> "Normalize the url" >>> urlString := (Url absoluteFromText: url) asString. >>> >>> args ifNotNil: [ >>> urlString := urlString, (self argString: args) >>> ]. >>> >>> "Some raw extra headers which historically have been added" >>> xhdrs := HTTPProxyCredentials, >>> HTTPBlabEmail, "may be empty" >>> requestString. "extra user request. Authorization" >>> >>> client := WebClient new. >>> ^[resp := client httpGet: urlString do:[:req| >>> "Add ACCEPT header" >>> mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. >>> >>> - "Always accept plain text" >>> - req addHeader: 'Accept' value: 'text/html'. >>> - >>> "Add the additional headers" >>> (WebUtils readHeadersFrom: xhdrs readStream) >>> do:[:assoc| req addHeader: assoc key value: assoc value]]. >>> >>> progress := [:total :amount| >>> (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' >>> ]. >>> >>> "Simulate old HTTPSocket return behavior" >>> (resp code between: 200 and: 299) >>> ifTrue:[MIMEDocument contentType: resp contentType >>> content: (resp contentWithProgress: progress) url: url] >>> ifFalse:[resp asString, resp content]. >>> ] ensure:[client destroy]. >>> ! >>> >>> >> > > From Das.Linux at gmx.de Sun Sep 11 22:33:02 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Sep 11 22:33:06 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz In-Reply-To: References: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> <13E861D5-B69F-4F22-BBDE-52902213BDC0@gmx.de> Message-ID: On 12.09.2016, at 00:09, Chris Muller wrote: > No, that fails too. Strange, because this works: curl -H"Accept: text/html; q=1.0, */*; q=0.1" -v https://www.quandl.com/api/v3/databases.csv so there should not be any difference with WebClient then. Btw: This also works (without your change): ========================================================== WebClient httpGet: 'https://www.quandl.com/api/v3/databases.csv' " WebResponse(HTTP/1.1 200 OK cache-control: max-age=0, private, must-revalidate content-type: text/csv; charset=utf-8 date: Sun, 11 Sep 2016 22:31:35 GMT etag: W/"fcd593ee1d24f34ad69d1bc7a307c655" server: openresty vary: Origin x-api-version: 2015-04-09 x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-rack-cors: preflight-hit; no-origin x-ratelimit-limit: 50 x-ratelimit-remaining: 45 x-request-id: 0ddf764c-e906-49fc-80c6-8c4f64689d72 x-runtime: 0.175008 x-xss-protection: 1; mode=block content-length: 26215 connection: keep-alive )" ========================================================== As does this ========================================================== curl -H"Accept: text/html" -v https://www.quandl.com/api/v3/databases.csv * Adding handle: conn: 0x7fe5d4003a00 * Adding handle: send: 0 * Adding handle: recv: 0 * Curl_addHandleToPipeline: length: 1 * - Conn 0 (0x7fe5d4003a00) send_pipe: 1, recv_pipe: 0 * About to connect() to www.quandl.com port 443 (#0) * Trying 54.174.87.84... * Connected to www.quandl.com (54.174.87.84) port 443 (#0) * TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 * Server certificate: *.quandl.com * Server certificate: Amazon * Server certificate: Amazon Root CA 1 * Server certificate: Starfield Services Root Certificate Authority - G2 > GET /api/v3/databases.csv HTTP/1.1 > User-Agent: curl/7.30.0 > Host: www.quandl.com > Accept: text/html > < HTTP/1.1 200 OK < Cache-Control: max-age=0, private, must-revalidate < Content-Type: text/csv; charset=utf-8 < Date: Sun, 11 Sep 2016 22:29:42 GMT < ETag: W/"fcd593ee1d24f34ad69d1bc7a307c655" * Server openresty is not blacklisted < Server: openresty < Vary: Origin < X-API-Version: 2015-04-09 < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-Rack-CORS: preflight-hit; no-origin < X-RateLimit-Limit: 50 < X-RateLimit-Remaining: 46 < X-Request-Id: e63f62a2-37ba-4f0c-87e9-0ea91081ce83 < X-Runtime: 0.204353 < X-XSS-Protection: 1; mode=block < Content-Length: 26215 < Connection: keep-alive < ========================================================== So the change is bogus. could you please revert? Best regards -Tobias > > On Sun, Sep 11, 2016 at 5:05 PM, Tobias Pape wrote: >> >> On 12.09.2016, at 00:02, Chris Muller wrote: >> >>> With this fix, I can do: >>> >>> 'https://www.quandl.com/api/v3/databases.csv' asUrl retrieveContents >>> >>> without, I can't. >> >> >> Well, shouldn't it be something like this then?: >> >> Accept: text/html; q=1.0, */*; q=0.1 >> >> Best regards >> -Tobias >> >>> >>> On Sun, Sep 11, 2016 at 4:59 PM, wrote: >>>> Chris Muller uploaded a new version of WebClient-HTTP to project The Inbox: >>>> http://source.squeak.org/inbox/WebClient-HTTP-cmm.5.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: WebClient-HTTP-cmm.5 >>>> Author: cmm >>>> Time: 11 September 2016, 4:59:26.542985 pm >>>> UUID: e203b772-bc1c-4516-8bf4-4ea1bc1edb7d >>>> Ancestors: WebClient-HTTP-cmm.4 >>>> >>>> Don't force Accept header of 'text/html', let clients specify that if its appropriate. This fixes accessing servers that demand it not be present. >>>> >>>> =============== Diff against WebClient-HTTP-cmm.4 =============== >>>> >>>> Item was changed: >>>> ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- >>>> httpGetDocument: url args: args accept: mimeType request: requestString >>>> "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" >>>> >>>> "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." >>>> >>>> | client xhdrs resp urlString progress | >>>> "Normalize the url" >>>> urlString := (Url absoluteFromText: url) asString. >>>> >>>> args ifNotNil: [ >>>> urlString := urlString, (self argString: args) >>>> ]. >>>> >>>> "Some raw extra headers which historically have been added" >>>> xhdrs := HTTPProxyCredentials, >>>> HTTPBlabEmail, "may be empty" >>>> requestString. "extra user request. Authorization" >>>> >>>> client := WebClient new. >>>> ^[resp := client httpGet: urlString do:[:req| >>>> "Add ACCEPT header" >>>> mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. >>>> >>>> - "Always accept plain text" >>>> - req addHeader: 'Accept' value: 'text/html'. >>>> - >>>> "Add the additional headers" >>>> (WebUtils readHeadersFrom: xhdrs readStream) >>>> do:[:assoc| req addHeader: assoc key value: assoc value]]. >>>> >>>> progress := [:total :amount| >>>> (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' >>>> ]. >>>> >>>> "Simulate old HTTPSocket return behavior" >>>> (resp code between: 200 and: 299) >>>> ifTrue:[MIMEDocument contentType: resp contentType >>>> content: (resp contentWithProgress: progress) url: url] >>>> ifFalse:[resp asString, resp content]. >>>> ] ensure:[client destroy]. >>>> ! >>>> >>>> >>> >> >> > From Das.Linux at gmx.de Sun Sep 11 22:34:33 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Sep 11 22:34:37 2016 Subject: [squeak-dev] The Inbox: WebClient-HTTP-cmm.5.mcz In-Reply-To: References: <57d5d3c4.4532ed0a.9f18c.502eSMTPIN_ADDED_MISSING@mx.google.com> <13E861D5-B69F-4F22-BBDE-52902213BDC0@gmx.de> Message-ID: <35D96A0B-A7DD-4D8F-94C2-593FE87002D8@gmx.de> On 12.09.2016, at 00:33, Tobias Pape wrote: > bogus Wrong word. meant something like "not fixing what is to be fixed as something else needs fixing" From Yoshiki.Ohshima at acm.org Mon Sep 12 17:53:47 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon Sep 12 17:53:51 2016 Subject: [squeak-dev] Smallapack In-Reply-To: References: Message-ID: Sorry for coming back to this again... I just tried to run Smallapack on 5.1, but it fails. Specifically, I modified SqueakPluginsBuiltInOrLocalOnly to be false, restart the session and run: Installer ss project: 'MetacelloRepository'; install: 'ConfigurationOfSmallapack'. ((Smalltalk at: #ConfigurationOfSmallapack) project version: #development) load. and call initialization (which may not be necessary): CBlasLibrary install. CLapackLibrary install. LapackMatrix resetBlasInterfaces; resetLapackInterfaces. and try to run the tests. But the tests fails. This is from the same directory where 5.0 based VM and image can run; so those dylibs are copied into the same directory. I also suspected the capitalization of the dylib file names but it also was not the case. Can anybody else confirm that this works, or does not work, for you? On Fri, Aug 12, 2016 at 3:46 PM, Yoshiki Ohshima wrote: > Thanks! > > I had not been able to focus on getting this to work so it's been > almost two weeks now but as finally the basic case finally going, I am > now happy. Thanks for the help! > > > On Fri, Aug 12, 2016 at 3:07 PM, Nicolas Cellier > wrote: >> Thanks Yoshiki, new configuration published. >> >> 2016-08-12 22:59 GMT+02:00 Yoshiki Ohshima : >>> >>> Ok, now I'm getting some success! >>> >>> I start over with the VM: Croquet Closure Cog VM [CoInterpreterPrimitives >>> VMMaker.oscog-eem.1044] Squeak Cog Spur 5.0.3248 >>> >>> and followed Nicolas' instruction in this thread. The image is 32-bit 5.0 >>> image. In this setting all tests passed. Yay. To run the above mentioned >>> example: >>> >>> ------------------- >>> a := LapackDGEMatrix rows: #(#(3 2 4) #(2 -5 -1) #(1 -2 2)). >>> b := LapackDGEMatrix rows: #(#(1) (2) (3)). >>> c := LapackLeastSquareProblem matrix: a rhsMatrix: b. >>> >>> c solution. >>> ------------------- >>> >>> I needed to fix the processSVD to make it work. The changes are to >>> change: >>> >>> rank := WordArray new: 1. >>> >>> into: >>> >>> rank := ExternalLongArray new: 1. >>> >>> (otherwise #arrayPointer is not understood by 'rank') and also the return >>> value from gelssWithm: has to be stored in 'info' (otherwise it will be >>> always nil). >>> >>> >>> >>> On Thu, Aug 11, 2016 at 6:05 PM, Yoshiki Ohshima >>> wrote: >>>> >>>> I have not reached the conclusion but would like to give some status >>>> report. >>>> >>>> My test case is simple: >>>> >>>> ------------------- >>>> a := LapackDGEMatrix rows: #(#(3 2 4) #(2 -5 -1) #(1 -2 2)). >>>> b := LapackDGEMatrix rows: #(#(1) (2) (3)). >>>> c := LapackLeastSquareProblem matrix: a rhsMatrix: b. >>>> >>>> c solution. >>>> ------------------- >>>> >>>> If I evaluate this, the external call for 'dgesvd_' in >>>> >>>> CLapackDLibrary>>xgesvdWithjobu:jobvt:m:n:a:lda:s:u:ldu:vt:ldvt:work:lwork:info: >>>> fails. >>>> >>>> But if I fix it by rewriting the cdecl line to: >>>> >>>> >>> double * double * long * double * long * double * long * long * ) >>>> module: 'libLAPACK'> >>>> >>>> from >>>> >>>> >>> double * double * long * double * long * double * long * long * )> >>>> >>>> it passes. >>>> >>>> However, the value that gets stored in the 's' instance variable of >>>> LapackSVDecomposition is a LapackDGEMatrix, and when the resulting >>>> value is used in the #defaultTolerance, I get DNU for '*". >>>> >>>> >>>> >>>> On Tue, Aug 9, 2016 at 3:26 PM, Yoshiki Ohshima >>>> wrote: >>>> > Correction: (sorry) >>>> > >>>> > In a 64 bit image, TestCBlas runs fine but the ones listed above fails >>>> > in a 32-bit image. >>>> > >>>> > On Tue, Aug 9, 2016 at 3:12 PM, Yoshiki Ohshima >>>> > wrote: >>>> >> Thanks! >>>> >> >>>> >> I am trying this from a vanilla 5.0 image and I see that >>>> >> ConfigurationOfSmallapack-nice.18 is loaded. Now, however, the >>>> >> following tests from Smallapack-SUnitTests category fail: >>>> >> >>>> >> #('TestCBlas>>#testCsscal' 'TestCBlas>>#testSaxpy' >>>> >> 'TestCBlas>>#testSgemv' 'TestCBlas>>#testSgemvTrans' >>>> >> 'TestCBlas>>#testSger' 'TestCBlas>>#testSscal' 'TestCBlas>>#testStrsm' >>>> >> 'TestLapackMatrix>>#testMatrixProduct' 'TestLapackMatrix>>#testSum' >>>> >> 'TestRandMatrix>>#testOperationTiming') >>>> >> >>>> >> As I wrote, TestCBlas used to be all green. I'll check what has >>>> >> changed since -nice.16... >>>> >> >>>> >> On Sat, Aug 6, 2016 at 4:56 PM, Nicolas Cellier >>>> >> wrote: >>>> >>> This should be fixed in ConfigurationOfSmallapack-nice.18 >>>> >>> BTW, I think you can provide the absolute path to the .dylib instead >>>> >>> of >>>> >>> copying in local repository... >>>> >>> >>>> >>> >>>> >>> 2016-08-06 23:29 GMT+02:00 Nicolas Cellier >>>> >>> : >>>> >>>> >>>> >>>> Hi Yoshiki, >>>> >>>> thanks for reporting, I'll try better... >>>> >>>> >>>> >>>> >>>> >>>> 2016-08-01 0:48 GMT+02:00 Yoshiki Ohshima : >>>> >>>>> >>>> >>>>> I see you have some changes but it appears that evaluating the >>>> >>>>> Installer do it goes into an infinite loop of #moduleName and >>>> >>>>> #masOsxModuleName. >>>> >>>>> >>>> >>>>> (Thanks again!) >>>> >>>>> >>>> >>>>> On Sat, Jul 30, 2016 at 8:23 AM, Yoshiki Ohshima >>>> >>>>> wrote: >>>> >>>>> > But some of TestLapackMatrix tests fail. A few external >>>> >>>>> > functions >>>> >>>>> > cannot be found, it looks like. >>>> >>>>> > >>>> >>>>> > On Sat, Jul 30, 2016 at 7:55 AM, Yoshiki Ohshima >>>> >>>>> > wrote: >>>> >>>>> >> Great! >>>> >>>>> >> >>>> >>>>> >> Before (I got into a meeting and then entered the "Friday mode", >>>> >>>>> >> I was >>>> >>>>> >> going down the path of trying to call the Framework functions >>>> >>>>> >> but >>>> >>>>> >> copying files anyway was a simpler solution for now. >>>> >>>>> >> >>>> >>>>> >> Yes, I got all tests green. Thank you! >>>> >>>>> >> >>>> >>>>> >> On Fri, Jul 29, 2016 at 3:24 PM, Nicolas Cellier >>>> >>>>> >> wrote: >>>> >>>>> >>> OK, what I did on my Mac: >>>> >>>>> >>> >>>> >>>>> >>> 1) look under the Squeak app and edit the Contents/Info.plist >>>> >>>>> >>> 2) change value of SqueakPluginsBuiltInOrLocalOnly to "No" >>>> >>>>> >>> otherwise library loading is restricted to the Squeak app >>>> >>>>> >>> bundle >>>> >>>>> >>> 3) copy the veclib framework library files (dylib) in same >>>> >>>>> >>> directory >>>> >>>>> >>> as >>>> >>>>> >>> squeak image >>>> >>>>> >>> 4) launch Squeak >>>> >>>>> >>> 5) install Smallapack >>>> >>>>> >>> follow instruction from >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >>> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>>> >>>>> >>> 6) change CBlasLibrary class>>moduleName 'libcblas.dylib' -> >>>> >>>>> >>> 'libBlas.dylib' >>>> >>>>> >>> nowadays, cblas and blas are in the same dylib... >>>> >>>>> >>> 7) change CLapackLibrary class>>moduleName 'libclapack.dylib' >>>> >>>>> >>> -> >>>> >>>>> >>> 'libLapack.dylib' >>>> >>>>> >>> idem >>>> >>>>> >>> 8) re-initialize the cache (I know, I know, there are too >>>> >>>>> >>> many...) >>>> >>>>> >>> CBlasLibrary install. CLapackLibrary install. LapackMatrix >>>> >>>>> >>> resetBlasInterfaces; resetLapackInterfaces. >>>> >>>>> >>> 9) run the TestCBlas suite >>>> >>>>> >>> >>>> >>>>> >>> It should be green >>>> >>>>> >>> I will commit the changes later, and will probably implement >>>> >>>>> >>> moduleNames as >>>> >>>>> >>> a Preference (pragma oriented). >>>> >>>>> >>> No need to override code anymore :) >>>> >>>>> >>> >>>> >>>>> >>> I think step 3) is necessary because of ioLoadModuleRaw() in >>>> >>>>> >>> platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >>> https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m >>>> >>>>> >>> It would only look those frameworks: >>>> >>>>> >>> >>>> >>>>> >>> static char *frameworks[]= >>>> >>>>> >>> { >>>> >>>>> >>> "", >>>> >>>>> >>> "/CoreServices.framework/Frameworks", >>>> >>>>> >>> >>>> >>>>> >>> "/ApplicationServices.framework/Frameworks", >>>> >>>>> >>> "/Carbon.framework/Frameworks", >>>> >>>>> >>> 0 >>>> >>>>> >>> }; >>>> >>>>> >>> >>>> >>>>> >>> But I did step 3) before I tried 1) + 2), adn did not retry, so >>>> >>>>> >>> maybe >>>> >>>>> >>> I'm >>>> >>>>> >>> wrong... >>>> >>>>> >>> Scanning all the frameworks is not a solution. And what if we >>>> >>>>> >>> want a >>>> >>>>> >>> specific version? >>>> >>>>> >>> It would be far better to be able to specify the path to the >>>> >>>>> >>> library >>>> >>>>> >>> from >>>> >>>>> >>> within the image like VW... >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >>> 2016-07-29 19:41 GMT+02:00 Nicolas Cellier >>>> >>>>> >>> : >>>> >>>>> >>>> >>>> >>>>> >>>> >>>> >>>>> >>>> >>>> >>>>> >>>> 2016-07-29 19:28 GMT+02:00 Nicolas Cellier >>>> >>>>> >>>> : >>>> >>>>> >>>>> >>>> >>>>> >>>>> >>>> >>>>> >>>>> >>>> >>>>> >>>>> 2016-07-29 19:02 GMT+02:00 Yoshiki Ohshima >>>> >>>>> >>>>> : >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> First question: >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> The Mac OS comes with Accelerate.Framework and that contains >>>> >>>>> >>>>>> BLAS. >>>> >>>>> >>>>>> But probably I still should compile those libraries, right? >>>> >>>>> >>>>>> >>>> >>>>> >>>>> >>>> >>>>> >>>>> No, it's better to link to accelerated library. >>>> >>>>> >>>>> I don't have a Mac handy here to verify how to link to it >>>> >>>>> >>>>> though. >>>> >>>>> >>>>> I'll be able to check latter in the evening >>>> >>>>> >>>>> >>>> >>>>> >>>> >>>> >>>>> >>>> >>>> >>>>> >>>> I've downloaded the code, and I see it now: the library names >>>> >>>>> >>>> are >>>> >>>>> >>>> hardcoded (see implementors of moduleName). >>>> >>>>> >>>> For Mac it is libblas.dylib and libcblas.dylib >>>> >>>>> >>>> Also note that there is a preference for switching to cblas >>>> >>>>> >>>> (blas >>>> >>>>> >>>> functions with C interface). >>>> >>>>> >>>> This should be faster because we pass some parameters by value >>>> >>>>> >>>> rather than >>>> >>>>> >>>> allocating them and pass reference... >>>> >>>>> >>>> >>>> >>>>> >>>> Module names could also be replaced by Preferences eventually, >>>> >>>>> >>>> but >>>> >>>>> >>>> by now, >>>> >>>>> >>>> you'll have to override... >>>> >>>>> >>>> >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> On Thu, Jul 28, 2016 at 4:11 PM, Yoshiki Ohshima >>>> >>>>> >>>>>> wrote: >>>> >>>>> >>>>>> > Thanks! >>>> >>>>> >>>>>> > >>>> >>>>> >>>>>> > On Thu, Jul 28, 2016 at 4:04 PM, Nicolas Cellier >>>> >>>>> >>>>>> > wrote: >>>> >>>>> >>>>>> >> Hi Yoshiki, >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> Thanks for inquiring about Smallapack. >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> This problem has been solved in 2011 as the post tells. >>>> >>>>> >>>>>> >> Moreover, it was about alignment of squeak objects that >>>> >>>>> >>>>>> >> was on >>>> >>>>> >>>>>> >> multiple of 4 >>>> >>>>> >>>>>> >> on SqueakV3 memory. >>>> >>>>> >>>>>> >> Spur is 8 byte aligned, so the problem would have also >>>> >>>>> >>>>>> >> vanished >>>> >>>>> >>>>>> >> without any >>>> >>>>> >>>>>> >> patch for those being patient :) >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> For the 15 arguments limit, Smallapack comes with it's >>>> >>>>> >>>>>> >> own >>>> >>>>> >>>>>> >> compiler, >>>> >>>>> >>>>>> >> so it's >>>> >>>>> >>>>>> >> a non issue. >>>> >>>>> >>>>>> >> Maybe I should make the documentation more clear on >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> https://github.com/nicolas-cellier-aka-nice/smallapack/wiki/SmallapackSqueak >>>> >>>>> >>>>>> >> ? >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> Unfortunately, there's no Sparse Matrix representation in >>>> >>>>> >>>>>> >> Lapack. >>>> >>>>> >>>>>> >> If you know of a good package for that, it could be >>>> >>>>> >>>>>> >> integrated. >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> If you have other questions, don't hesitate to ask. >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> cheers >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> Nicolas >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> 2016-07-29 0:22 GMT+02:00 Yoshiki Ohshima >>>> >>>>> >>>>>> >> : >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> I am trying to do a bit of linear algebra stuff that >>>> >>>>> >>>>>> >>> involves >>>> >>>>> >>>>>> >>> to >>>> >>>>> >>>>>> >>> solve >>>> >>>>> >>>>>> >>> a sparse 2D matrix (for a variation of doing least >>>> >>>>> >>>>>> >>> square >>>> >>>>> >>>>>> >>> fit). >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> There was a message from Nicolas: >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-August/161113.html >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> Is this where it stands today, too? It looks like that >>>> >>>>> >>>>>> >>> arg >>>> >>>>> >>>>>> >>> count >>>> >>>>> >>>>>> >>> problem is still there in 5.0, but is it in a way >>>> >>>>> >>>>>> >>> non-issue as >>>> >>>>> >>>>>> >>> it is >>>> >>>>> >>>>>> >>> still FFI based? >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> Thanks! >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >>> -- >>>> >>>>> >>>>>> >>> -- Yoshiki >>>> >>>>> >>>>>> >>> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> >> >>>> >>>>> >>>>>> > >>>> >>>>> >>>>>> > >>>> >>>>> >>>>>> > >>>> >>>>> >>>>>> > -- >>>> >>>>> >>>>>> > -- Yoshiki >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> >>>> >>>>> >>>>>> -- >>>> >>>>> >>>>>> -- Yoshiki >>>> >>>>> >>>>>> >>>> >>>>> >>>>> >>>> >>>>> >>>> >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >>> >>>> >>>>> >> >>>> >>>>> >> >>>> >>>>> >> >>>> >>>>> >> -- >>>> >>>>> >> -- Yoshiki >>>> >>>>> > >>>> >>>>> > >>>> >>>>> > >>>> >>>>> > -- >>>> >>>>> > -- Yoshiki >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> -- >>>> >>>>> -- Yoshiki >>>> >>>>> >>>> >>>> >>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> >> >>>> >> >>>> >> >>>> >> -- >>>> >> -- Yoshiki >>>> > >>>> > >>>> > >>>> > -- >>>> > -- Yoshiki >>>> >>>> >>>> >>>> -- >>>> -- Yoshiki >>> >>> >>> >>> >>> -- >>> -- Yoshiki >>> >>> >>> >>> >> >> >> >> > > > > -- > -- Yoshiki -- -- Yoshiki From bert at freudenbergs.de Mon Sep 12 20:27:42 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Sep 12 20:27:46 2016 Subject: [squeak-dev] The Trunk: EToys-ul.232.mcz In-Reply-To: References: Message-ID: On Sun, Sep 11, 2016 at 7:15 PM, wrote: > Levente Uzonyi uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-ul.232.mcz > > ==================== Summary ==================== > > Name: EToys-ul.232 > Author: ul > Time: 11 September 2016, 7:15:09.419613 pm > UUID: 666e68e0-6e23-4f51-88d8-bdb6b9f4bd0e > Ancestors: EToys-dtl.231 > > (hopefully) Shave off a few extra minutes of EToys loading by using > Schwartzian transform in Morph class >> #unfilteredCategoriesForViewer. > The real culprit is the "new" implementation of String >> #translated, > which came with the EToys changes and is at least two magnitudes slower > than the previous implementation. > > Ah. #translated relies on the translation dictionaries actually being loaded. If it doesn't find the translation in the default dict, it scans all other dictionaries which is indeed very slow. So while this is a great improvement, we maybe should have a fast #translated fail code if there are no translations at all. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160912/159b9ef0/attachment.htm From leves at caesar.elte.hu Mon Sep 12 20:48:20 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon Sep 12 20:48:24 2016 Subject: [squeak-dev] The Trunk: EToys-ul.232.mcz In-Reply-To: References: Message-ID: On Mon, 12 Sep 2016, Bert Freudenberg wrote: > On Sun, Sep 11, 2016 at 7:15 PM, wrote: > Levente Uzonyi uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-ul.232.mcz > > ==================== Summary ==================== > > Name: EToys-ul.232 > Author: ul > Time: 11 September 2016, 7:15:09.419613 pm > UUID: 666e68e0-6e23-4f51-88d8-bdb6b9f4bd0e > Ancestors: EToys-dtl.231 > > (hopefully) Shave off a few extra minutes of EToys loading by using Schwartzian transform in Morph class >> #unfilteredCategoriesForViewer. > The real culprit is the "new" implementation of String >> #translated, which came with the EToys changes and is at least two magnitudes slower than the previous implementation. > > > Ah. #translated relies on the translation dictionaries actually being loaded. If it doesn't find the translation in the default dict, it scans all other dictionaries which is indeed very slow. > > So while this is a great improvement, we maybe should have a fast #translated fail code if there are no translations at all. Definitely that's the way to go. Levente > > - Bert - > > > From commits at source.squeak.org Tue Sep 13 19:50:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 13 19:50:12 2016 Subject: [squeak-dev] The Trunk: Tools-bf.726.mcz Message-ID: Bert Freudenberg uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-bf.726.mcz ==================== Summary ==================== Name: Tools-bf.726 Author: bf Time: 13 September 2016, 9:49:34.324302 pm UUID: 12fb04ec-ae59-4436-ae4a-942568bb28b6 Ancestors: Tools-bf.725 Fix PointerFinder for CompiledMethods. =============== Diff against Tools-bf.725 =============== Item was changed: ----- Method: PointerFinder>>buildList (in category 'application') ----- buildList | list obj parent object key | list := OrderedCollection new. obj := goal. [list addFirst: obj. obj := parents at: obj ifAbsent: []. obj == nil] whileFalse. list removeFirst. parent := Smalltalk. objectList := OrderedCollection new. pointerList := OrderedCollection new. [list isEmpty] whileFalse: [object := list removeFirst. key := nil. (parent isKindOf: Dictionary) ifTrue: [list size >= 2 ifTrue: [key := parent keyAtValue: list second ifAbsent: []. key == nil ifFalse: [object := list removeFirst; removeFirst. pointerList add: key printString , ' -> ' , object class name]]]. key == nil ifTrue: [parent class == object ifTrue: [key := 'CLASS']. key == nil ifTrue: [1 to: parent class instSize do: [:i | key == nil ifTrue: [(parent instVarAt: i) == object ifTrue: [key := parent class allInstVarNames at: i]]]]. + key == nil ifTrue: [(parent isCompiledMethod and: [object isVariableBinding]) ifTrue: [key := 'literals?']]. key == nil ifTrue: [1 to: parent basicSize do: [:i | key == nil ifTrue: [(parent basicAt: i) == object ifTrue: [key := i printString]]]]. key == nil ifTrue: [(parent isMorph and: [object isKindOf: Array]) ifTrue: [key := 'submorphs?']]. - key == nil ifTrue: [(parent isCompiledMethod and: [object isVariableBinding]) ifTrue: [key := 'literals?']]. key == nil ifTrue: [key := '???']. pointerList add: key , ': ' , object class name, (object isMorph ifTrue: [' (', object identityHash asString, ')'] ifFalse: [ String empty ]) ]. objectList add: object. parent := object]! From commits at source.squeak.org Tue Sep 13 20:02:14 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 13 20:02:17 2016 Subject: [squeak-dev] The Trunk: Graphics-bf.365.mcz Message-ID: Bert Freudenberg uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-bf.365.mcz ==================== Summary ==================== Name: Graphics-bf.365 Author: bf Time: 13 September 2016, 10:01:12.119134 pm UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 Ancestors: Graphics-tfel.364 Work around Mac VM bug: use 32 bpp =============== Diff against Graphics-tfel.364 =============== Item was added: + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category 'other') ----- + primSupportsDisplayDepth: pixelDepth + "Return true if this pixel depth is supported on the current host platform. + Primitive. Optional." + + ^#(1 2 4 8 16 32) includes: pixelDepth! Item was changed: ----- Method: DisplayScreen>>supportsDisplayDepth: (in category 'other') ----- supportsDisplayDepth: pixelDepth + "Return true if this pixel depth is supported on the current host platform." + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = 32]. "Work around VM bug" + ^self primSupportsDisplayDepth: pixelDepth! - "Return true if this pixel depth is supported on the current host platform. - Primitive. Optional." - - ^#(1 2 4 8 16 32) includes: pixelDepth! From commits at source.squeak.org Tue Sep 13 20:07:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 13 20:07:50 2016 Subject: [squeak-dev] The Trunk: EToys-bf.233.mcz Message-ID: Bert Freudenberg uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-bf.233.mcz ==================== Summary ==================== Name: EToys-bf.233 Author: bf Time: 13 September 2016, 10:06:47.925688 pm UUID: 7f56b9c2-2453-4707-83b0-94204f4372a5 Ancestors: EToys-ul.232 Fix roundedWindowCorners =============== Diff against EToys-ul.232 =============== Item was changed: ----- Method: BorderedMorph>>useRoundedCornersInEtoys (in category '*Etoys-Squeakland-accessing') ----- useRoundedCornersInEtoys + SystemWindow roundedWindowCorners - Preferences roundedWindowCorners ifTrue: [self useRoundedCorners]! From bert at freudenbergs.de Tue Sep 13 20:09:58 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Sep 13 20:10:04 2016 Subject: [squeak-dev] Make ImageSegments import-only? Message-ID: Hi all, I think there is no current usage of image segments. Project storing has been broken for a while and that's the only current use I am aware of. What about this idea: We keep ImageSegment but remove all support for writing. It would only be used for importing old projects. It would not use the VM primitives (because they are incompatible anyways). The number of methods in ImageSegment would shrink from more than 80 to 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog appears to be fast enough to not cause a significant slowdown in loading. With this, old projects can still be imported, but writing projects would have to use some other serialization mechanism (which we discussed before). It would remove quite a bit of unused code, making the remaining code more easily understandable. Sounds good? - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160913/1f5c6784/attachment.htm From commits at source.squeak.org Tue Sep 13 20:10:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 13 20:10:44 2016 Subject: [squeak-dev] The Trunk: SMBase-bf.136.mcz Message-ID: Bert Freudenberg uploaded a new version of SMBase to project The Trunk: http://source.squeak.org/trunk/SMBase-bf.136.mcz ==================== Summary ==================== Name: SMBase-bf.136 Author: bf Time: 13 September 2016, 10:10:25.135647 pm UUID: e8e8e01a-5714-4b71-8e9e-8dfb43d9ff38 Ancestors: SMBase-cmm.135 Remove unused ImageSegment extension method. =============== Diff against SMBase-cmm.135 =============== Item was removed: - ----- Method: ImageSegment>>writeForExportOn: (in category '*SMBase-export') ----- - writeForExportOn: fileStream - "Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk." - - state = #activeCopy ifFalse: [self error: 'wrong state']. - fileStream fileOutClass: nil andObject: self. - "remember extra structures. Note class names."! From lewis at mail.msen.com Tue Sep 13 20:28:55 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Sep 13 20:28:59 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: Message-ID: <61650.136.1.1.170.1473798535.squirrel@webmail.msen.com> +1 Dave > Hi all, > > I think there is no current usage of image segments. Project storing has > been broken for a while and that's the only current use I am aware of. > > What about this idea: > > We keep ImageSegment but remove all support for writing. It would only be > used for importing old projects. It would not use the VM primitives > (because they are incompatible anyways). > > The number of methods in ImageSegment would shrink from more than 80 to > 15. > My SegmentLoader has 25 methods, it replaces the VM primitive. Cog appears > to be fast enough to not cause a significant slowdown in loading. > > With this, old projects can still be imported, but writing projects would > have to use some other serialization mechanism (which we discussed > before). > It would remove quite a bit of unused code, making the remaining code more > easily understandable. > > Sounds good? > > - Bert - > > From Das.Linux at gmx.de Tue Sep 13 20:59:26 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Sep 13 20:59:30 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: Message-ID: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> +1 On 13.09.2016, at 22:09, Bert Freudenberg wrote: > Hi all, > > I think there is no current usage of image segments. Project storing has been broken for a while and that's the only current use I am aware of. > > What about this idea: > > We keep ImageSegment but remove all support for writing. It would only be used for importing old projects. It would not use the VM primitives (because they are incompatible anyways). > > The number of methods in ImageSegment would shrink from more than 80 to 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog appears to be fast enough to not cause a significant slowdown in loading. > > With this, old projects can still be imported, but writing projects would have to use some other serialization mechanism (which we discussed before). It would remove quite a bit of unused code, making the remaining code more easily understandable. > > Sounds good? > > - Bert - > From commits at source.squeak.org Tue Sep 13 21:55:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 13 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160913215507.17108.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068923.html Name: Tools-bf.726 Ancestors: Tools-bf.725 Fix PointerFinder for CompiledMethods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068924.html Name: Graphics-bf.365 Ancestors: Graphics-tfel.364 Work around Mac VM bug: use 32 bpp ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068925.html Name: EToys-bf.233 Ancestors: EToys-ul.232 Fix roundedWindowCorners ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068926.html Name: SMBase-bf.136 Ancestors: SMBase-cmm.135 Remove unused ImageSegment extension method. ============================================= From hannes.hirzel at gmail.com Wed Sep 14 03:48:15 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Wed Sep 14 03:48:18 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> Message-ID: +1 On 9/13/16, Tobias Pape wrote: > +1 > On 13.09.2016, at 22:09, Bert Freudenberg wrote: > >> Hi all, >> >> I think there is no current usage of image segments. Project storing has >> been broken for a while and that's the only current use I am aware of. >> >> What about this idea: >> >> We keep ImageSegment but remove all support for writing. It would only be >> used for importing old projects. It would not use the VM primitives >> (because they are incompatible anyways). >> >> The number of methods in ImageSegment would shrink from more than 80 to >> 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog >> appears to be fast enough to not cause a significant slowdown in loading. >> >> With this, old projects can still be imported, but writing projects would >> have to use some other serialization mechanism (which we discussed >> before). It would remove quite a bit of unused code, making the remaining >> code more easily understandable. >> >> Sounds good? >> >> - Bert - >> > > > From bert at freudenbergs.de Wed Sep 14 07:57:47 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 14 07:57:49 2016 Subject: [squeak-dev] Mac VM display broken for smaller bit depths Message-ID: This hack avoids entering an unusable state. OTOH it makes debugging it more difficult. What to do? - Bert - On Tue, Sep 13, 2016 at 10:01 PM, wrote: > Bert Freudenberg uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-bf.365.mcz > > ==================== Summary ==================== > > Name: Graphics-bf.365 > Author: bf > Time: 13 September 2016, 10:01:12.119134 pm > UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 > Ancestors: Graphics-tfel.364 > > Work around Mac VM bug: use 32 bpp > > =============== Diff against Graphics-tfel.364 =============== > > Item was added: > + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category > 'other') ----- > + primSupportsDisplayDepth: pixelDepth > + "Return true if this pixel depth is supported on the current host > platform. > + Primitive. Optional." > + > + ^#(1 2 4 8 16 32) includes: pixelDepth! > > Item was changed: > ----- Method: DisplayScreen>>supportsDisplayDepth: (in category > 'other') ----- > supportsDisplayDepth: pixelDepth > + "Return true if this pixel depth is supported on the current host > platform." > + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = 32]. > "Work around VM bug" > + ^self primSupportsDisplayDepth: pixelDepth! > - "Return true if this pixel depth is supported on the current host > platform. > - Primitive. Optional." > - > - ^#(1 2 4 8 16 32) includes: pixelDepth! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/8d6d09f6/attachment.htm From Das.Linux at gmx.de Wed Sep 14 08:02:37 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Sep 14 08:02:42 2016 Subject: [squeak-dev] Mac VM display broken for smaller bit depths In-Reply-To: References: Message-ID: <38846963-5714-4434-B43F-49074A75BC78@gmx.de> Hi, On 14.09.2016, at 09:57, Bert Freudenberg wrote: > This hack avoids entering an unusable state. OTOH it makes debugging it more difficult. What to do? Is the unstable state present in cocoa or carbon VMs? Best regards -Tobias > > - Bert - > > On Tue, Sep 13, 2016 at 10:01 PM, wrote: > Bert Freudenberg uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-bf.365.mcz > > ==================== Summary ==================== > > Name: Graphics-bf.365 > Author: bf > Time: 13 September 2016, 10:01:12.119134 pm > UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 > Ancestors: Graphics-tfel.364 > > Work around Mac VM bug: use 32 bpp > > =============== Diff against Graphics-tfel.364 =============== > > Item was added: > + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category 'other') ----- > + primSupportsDisplayDepth: pixelDepth > + "Return true if this pixel depth is supported on the current host platform. > + Primitive. Optional." > + > + ^#(1 2 4 8 16 32) includes: pixelDepth! > > Item was changed: > ----- Method: DisplayScreen>>supportsDisplayDepth: (in category 'other') ----- > supportsDisplayDepth: pixelDepth > + "Return true if this pixel depth is supported on the current host platform." > + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = 32]. "Work around VM bug" > + ^self primSupportsDisplayDepth: pixelDepth! > - "Return true if this pixel depth is supported on the current host platform. > - Primitive. Optional." > - > - ^#(1 2 4 8 16 32) includes: pixelDepth! > > > > From bert at freudenbergs.de Wed Sep 14 08:13:18 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 14 08:13:23 2016 Subject: [squeak-dev] Mac VM display broken for smaller bit depths In-Reply-To: <38846963-5714-4434-B43F-49074A75BC78@gmx.de> References: <38846963-5714-4434-B43F-49074A75BC78@gmx.de> Message-ID: On Wed, Sep 14, 2016 at 10:02 AM, Tobias Pape wrote: > Hi, > > On 14.09.2016, at 09:57, Bert Freudenberg wrote: > > > This hack avoids entering an unusable state. OTOH it makes debugging it > more difficult. What to do? > > Is the unstable state present in cocoa or carbon VMs? > Best regards > -Tobias > Cocoa I would think? A current Spur VM. The display just looks garbled e.g. when choosing 16 bpp. I wouldn't call it "unstable" just "unusable". - Bert - > > > > > - Bert - > > > > On Tue, Sep 13, 2016 at 10:01 PM, wrote: > > Bert Freudenberg uploaded a new version of Graphics to project The Trunk: > > http://source.squeak.org/trunk/Graphics-bf.365.mcz > > > > ==================== Summary ==================== > > > > Name: Graphics-bf.365 > > Author: bf > > Time: 13 September 2016, 10:01:12.119134 pm > > UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 > > Ancestors: Graphics-tfel.364 > > > > Work around Mac VM bug: use 32 bpp > > > > =============== Diff against Graphics-tfel.364 =============== > > > > Item was added: > > + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category > 'other') ----- > > + primSupportsDisplayDepth: pixelDepth > > + "Return true if this pixel depth is supported on the current > host platform. > > + Primitive. Optional." > > + > > + ^#(1 2 4 8 16 32) includes: pixelDepth! > > > > Item was changed: > > ----- Method: DisplayScreen>>supportsDisplayDepth: (in category > 'other') ----- > > supportsDisplayDepth: pixelDepth > > + "Return true if this pixel depth is supported on the current > host platform." > > + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = > 32]. "Work around VM bug" > > + ^self primSupportsDisplayDepth: pixelDepth! > > - "Return true if this pixel depth is supported on the current > host platform. > > - Primitive. Optional." > > - > > - ^#(1 2 4 8 16 32) includes: pixelDepth! > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/d2972b5f/attachment.htm From commits at source.squeak.org Wed Sep 14 10:30:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 14 10:30:13 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1037.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1037.mcz ==================== Summary ==================== Name: Kernel-bf.1037 Author: bf Time: 14 September 2016, 12:29:29.496445 pm UUID: e18c7fae-264c-4be6-9895-69e022aa1850 Ancestors: Kernel-ul.1036 Remove unused allInstancesEverywhereDo: =============== Diff against Kernel-ul.1036 =============== Item was removed: - ----- Method: Behavior>>allInstancesEverywhereDo: (in category 'enumerating') ----- - allInstancesEverywhereDo: aBlock - "Evaluate the argument, aBlock, for each of the current instances of the receiver. Including those in ImageSegments that are out on the disk. Bring each in briefly." - - self == UndefinedObject ifTrue: [^ aBlock value: nil]. - self allInstancesDo: aBlock. - "Now iterate over instances in segments that are out on the disk." - ImageSegment allSubInstancesDo: [:seg | - seg allInstancesOf: self do: aBlock]. - ! Item was removed: - ----- Method: Metaclass>>allInstancesEverywhereDo: (in category 'enumerating') ----- - allInstancesEverywhereDo: aBlock - "There should be only one" - thisClass class == self ifTrue:[^ aBlock value: thisClass]. - ^ super allInstancesEverywhereDo: aBlock! From nicolas.cellier.aka.nice at gmail.com Wed Sep 14 11:51:35 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 14 11:51:38 2016 Subject: [squeak-dev] Mac VM display broken for smaller bit depths In-Reply-To: References: <38846963-5714-4434-B43F-49074A75BC78@gmx.de> Message-ID: could we bissect from which version this happened? 2016-09-14 10:13 GMT+02:00 Bert Freudenberg : > On Wed, Sep 14, 2016 at 10:02 AM, Tobias Pape wrote: > >> Hi, >> >> On 14.09.2016, at 09:57, Bert Freudenberg wrote: >> >> > This hack avoids entering an unusable state. OTOH it makes debugging it >> more difficult. What to do? >> >> Is the unstable state present in cocoa or carbon VMs? >> Best regards >> -Tobias >> > > Cocoa I would think? A current Spur VM. The display just looks garbled > e.g. when choosing 16 bpp. I wouldn't call it "unstable" just "unusable". > > - Bert - > > > >> >> > >> > - Bert - >> > >> > On Tue, Sep 13, 2016 at 10:01 PM, wrote: >> > Bert Freudenberg uploaded a new version of Graphics to project The >> Trunk: >> > http://source.squeak.org/trunk/Graphics-bf.365.mcz >> > >> > ==================== Summary ==================== >> > >> > Name: Graphics-bf.365 >> > Author: bf >> > Time: 13 September 2016, 10:01:12.119134 pm >> > UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 >> > Ancestors: Graphics-tfel.364 >> > >> > Work around Mac VM bug: use 32 bpp >> > >> > =============== Diff against Graphics-tfel.364 =============== >> > >> > Item was added: >> > + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category >> 'other') ----- >> > + primSupportsDisplayDepth: pixelDepth >> > + "Return true if this pixel depth is supported on the current >> host platform. >> > + Primitive. Optional." >> > + >> > + ^#(1 2 4 8 16 32) includes: pixelDepth! >> > >> > Item was changed: >> > ----- Method: DisplayScreen>>supportsDisplayDepth: (in category >> 'other') ----- >> > supportsDisplayDepth: pixelDepth >> > + "Return true if this pixel depth is supported on the current >> host platform." >> > + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = >> 32]. "Work around VM bug" >> > + ^self primSupportsDisplayDepth: pixelDepth! >> > - "Return true if this pixel depth is supported on the current >> host platform. >> > - Primitive. Optional." >> > - >> > - ^#(1 2 4 8 16 32) includes: pixelDepth! >> > >> > >> > >> > >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/976c7e7f/attachment.htm From bert at freudenbergs.de Wed Sep 14 11:54:37 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 14 11:54:41 2016 Subject: [squeak-dev] Mac VM display broken for smaller bit depths In-Reply-To: References: <38846963-5714-4434-B43F-49074A75BC78@gmx.de> Message-ID: Has it ever worked on the cocoa VM? - Bert - On Wed, Sep 14, 2016 at 1:51 PM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > could we bissect from which version this happened? > > 2016-09-14 10:13 GMT+02:00 Bert Freudenberg : > >> On Wed, Sep 14, 2016 at 10:02 AM, Tobias Pape wrote: >> >>> Hi, >>> >>> On 14.09.2016, at 09:57, Bert Freudenberg wrote: >>> >>> > This hack avoids entering an unusable state. OTOH it makes debugging >>> it more difficult. What to do? >>> >>> Is the unstable state present in cocoa or carbon VMs? >>> Best regards >>> -Tobias >>> >> >> Cocoa I would think? A current Spur VM. The display just looks garbled >> e.g. when choosing 16 bpp. I wouldn't call it "unstable" just "unusable". >> >> - Bert - >> >> >> >>> >>> > >>> > - Bert - >>> > >>> > On Tue, Sep 13, 2016 at 10:01 PM, wrote: >>> > Bert Freudenberg uploaded a new version of Graphics to project The >>> Trunk: >>> > http://source.squeak.org/trunk/Graphics-bf.365.mcz >>> > >>> > ==================== Summary ==================== >>> > >>> > Name: Graphics-bf.365 >>> > Author: bf >>> > Time: 13 September 2016, 10:01:12.119134 pm >>> > UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4 >>> > Ancestors: Graphics-tfel.364 >>> > >>> > Work around Mac VM bug: use 32 bpp >>> > >>> > =============== Diff against Graphics-tfel.364 =============== >>> > >>> > Item was added: >>> > + ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category >>> 'other') ----- >>> > + primSupportsDisplayDepth: pixelDepth >>> > + "Return true if this pixel depth is supported on the current >>> host platform. >>> > + Primitive. Optional." >>> > + >>> > + ^#(1 2 4 8 16 32) includes: pixelDepth! >>> > >>> > Item was changed: >>> > ----- Method: DisplayScreen>>supportsDisplayDepth: (in category >>> 'other') ----- >>> > supportsDisplayDepth: pixelDepth >>> > + "Return true if this pixel depth is supported on the current >>> host platform." >>> > + Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = >>> 32]. "Work around VM bug" >>> > + ^self primSupportsDisplayDepth: pixelDepth! >>> > - "Return true if this pixel depth is supported on the current >>> host platform. >>> > - Primitive. Optional." >>> > - >>> > - ^#(1 2 4 8 16 32) includes: pixelDepth! >>> > >>> > >>> > >>> > >>> >>> >>> >> >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/46f7e62b/attachment-0001.htm From commits at source.squeak.org Wed Sep 14 13:40:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 14 13:40:58 2016 Subject: [squeak-dev] The Trunk: Morphic-bf.1306.mcz Message-ID: Bert Freudenberg uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-bf.1306.mcz ==================== Summary ==================== Name: Morphic-bf.1306 Author: bf Time: 14 September 2016, 3:39:53.677084 pm UUID: 1854981d-62dc-4ade-836b-2185ff8e94b6 Ancestors: Morphic-tfel.1305 Remove ImageSegment dependency =============== Diff against Morphic-tfel.1305 =============== Item was added: + ----- Method: MorphicProject>>myPlayerClasses (in category 'release') ----- + myPlayerClasses + "Answer all my (non-systemDefined) player classes" + | classes presenter | + classes := Set new. + presenter := self world presenter. + presenter ifNotNil: [ + presenter flushPlayerListCache. "old and outside guys" + presenter allExtantPlayers do: + [:p | p class isSystemDefined ifFalse: [classes add: p class]]]. + ^classes! Item was changed: ----- Method: MorphicProject>>prepareForDelete (in category 'release') ----- prepareForDelete "The window in which the project is housed is about to deleted. Perform any necessary actions to prepare for deletion." + | list | - | is list | Smalltalk at: #WonderlandCameraMorph ifPresent:[:aClass | world submorphs do: "special release for wonderlands" [:m | (m isKindOf: aClass) and: [m getWonderland release]]]. "Remove Player classes and metaclasses owned by project" + self myPlayerClasses do: [:playerCls | playerCls removeFromSystemUnlogged]. - is := ImageSegment new arrayOfRoots: (Array with: self). - (list := is rootsIncludingPlayers) ifNotNil: - [list do: [:playerCls | - (playerCls respondsTo: #isMeta) ifTrue: - [playerCls isMeta ifFalse: - [playerCls removeFromSystemUnlogged]]]] ! From bert at freudenbergs.de Wed Sep 14 13:50:26 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 14 13:50:29 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> Message-ID: Okay, I've put it in the inbox as System-bf.916. Are we sure about removing the ability to store? I just noticed that Eliot claimed to have fixed ImageSegments in System-eem.758. OTOH if nobody intends to use them it's better to get rid of the dead code. - Bert - On Wed, Sep 14, 2016 at 5:48 AM, H. Hirzel wrote: > +1 > > On 9/13/16, Tobias Pape wrote: > > +1 > > On 13.09.2016, at 22:09, Bert Freudenberg wrote: > > > >> Hi all, > >> > >> I think there is no current usage of image segments. Project storing has > >> been broken for a while and that's the only current use I am aware of. > >> > >> What about this idea: > >> > >> We keep ImageSegment but remove all support for writing. It would only > be > >> used for importing old projects. It would not use the VM primitives > >> (because they are incompatible anyways). > >> > >> The number of methods in ImageSegment would shrink from more than 80 to > >> 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog > >> appears to be fast enough to not cause a significant slowdown in > loading. > >> > >> With this, old projects can still be imported, but writing projects > would > >> have to use some other serialization mechanism (which we discussed > >> before). It would remove quite a bit of unused code, making the > remaining > >> code more easily understandable. > >> > >> Sounds good? > >> > >> - Bert - > >> > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/da641d54/attachment.htm From asqueaker at gmail.com Wed Sep 14 16:50:30 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Sep 14 16:51:13 2016 Subject: [squeak-dev] The Trunk: EToys-bf.233.mcz In-Reply-To: <57d85c98.8a1b370a.da6aa.440dSMTPIN_ADDED_MISSING@mx.google.com> References: <57d85c98.8a1b370a.da6aa.440dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Not sure if this method is a getter or a setter, but SystemWindow roundedWindowCorners, so I don't know if you intended to change this method to a no-op... On Tue, Sep 13, 2016 at 3:06 PM, wrote: > Bert Freudenberg uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-bf.233.mcz > > ==================== Summary ==================== > > Name: EToys-bf.233 > Author: bf > Time: 13 September 2016, 10:06:47.925688 pm > UUID: 7f56b9c2-2453-4707-83b0-94204f4372a5 > Ancestors: EToys-ul.232 > > Fix roundedWindowCorners > > =============== Diff against EToys-ul.232 =============== > > Item was changed: > ----- Method: BorderedMorph>>useRoundedCornersInEtoys (in category '*Etoys-Squeakland-accessing') ----- > useRoundedCornersInEtoys > + SystemWindow roundedWindowCorners > - Preferences roundedWindowCorners > ifTrue: [self useRoundedCorners]! > > From Das.Linux at gmx.de Wed Sep 14 17:51:46 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Sep 14 17:51:51 2016 Subject: [squeak-dev] The Trunk: EToys-bf.233.mcz In-Reply-To: References: <57d85c98.8a1b370a.da6aa.440dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <53A8991B-9999-4C00-BD0B-CFEF3AFF59C0@gmx.de> On 14.09.2016, at 18:50, Chris Muller wrote: > Not sure if this method is a getter or a setter, but SystemWindow > roundedWindowCorners, so I don't know if you intended to change this > method to a no-op... Why No-op? This is a normal preference (current version differs just in not having a typo in the description): -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto 2016-09-14 um 19.48.57.PNG Type: image/png Size: 52331 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160914/f3d5a592/Bildschirmfoto2016-09-14um19.48.57.png -------------- next part -------------- From asqueaker at gmail.com Wed Sep 14 19:56:44 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed Sep 14 19:57:28 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> Message-ID: The original purpose of ImageSegments was to leverage the garbage-collector in order to have a performant serialization mechanism, is that right? Now with Cog/Spur, its performance is probably not as advantageous, and so the relative cost of its magical implementation, code size, number of serializers confusion, seems unlikely it will be used by any new code. On Wed, Sep 14, 2016 at 8:50 AM, Bert Freudenberg wrote: > Okay, I've put it in the inbox as System-bf.916. > > Are we sure about removing the ability to store? I just noticed that Eliot > claimed to have fixed ImageSegments in System-eem.758. OTOH if nobody > intends to use them it's better to get rid of the dead code. > > - Bert - > > On Wed, Sep 14, 2016 at 5:48 AM, H. Hirzel wrote: >> >> +1 >> >> On 9/13/16, Tobias Pape wrote: >> > +1 >> > On 13.09.2016, at 22:09, Bert Freudenberg wrote: >> > >> >> Hi all, >> >> >> >> I think there is no current usage of image segments. Project storing >> >> has >> >> been broken for a while and that's the only current use I am aware of. >> >> >> >> What about this idea: >> >> >> >> We keep ImageSegment but remove all support for writing. It would only >> >> be >> >> used for importing old projects. It would not use the VM primitives >> >> (because they are incompatible anyways). >> >> >> >> The number of methods in ImageSegment would shrink from more than 80 to >> >> 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog >> >> appears to be fast enough to not cause a significant slowdown in >> >> loading. >> >> >> >> With this, old projects can still be imported, but writing projects >> >> would >> >> have to use some other serialization mechanism (which we discussed >> >> before). It would remove quite a bit of unused code, making the >> >> remaining >> >> code more easily understandable. >> >> >> >> Sounds good? >> >> >> >> - Bert - >> >> >> > >> > >> > >> > > > > From commits at source.squeak.org Wed Sep 14 21:55:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 14 21:55:07 2016 Subject: [squeak-dev] The Trunk: Morphic-cmm.1306.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.1306.mcz ==================== Summary ==================== Name: Morphic-cmm.1306 Author: cmm Time: 14 September 2016, 4:53:42.843871 pm UUID: 53b3f640-bc3a-42e9-bb01-66c8a4afc483 Ancestors: Morphic-bf.1306 Fix docking bars occluding windows when pinch-resizing them. =============== Diff against Morphic-bf.1306 =============== Item was changed: ----- Method: HaloMorph>>doResizeTarget: (in category 'dragging or resizing') ----- + doResizeTarget: evt + | newExtent | - doResizeTarget: evt - - | oldExtent newExtent newPosition | newExtent := originalExtent + (evt position - positionOffset * 2). + (newExtent x > 1 and: [ newExtent y > 1 ]) ifTrue: + [ | oldExtent dockingBarBottom newPosition | + oldExtent := target extent. + dockingBarBottom := owner mainDockingBars + inject: 0 + into: [ : bottomMostBottom : each | bottomMostBottom max: each bottom ]. + target setExtentFromHalo: (newExtent min: owner extent x @ (owner extent y - dockingBarBottom)). + newPosition := target position - (target extent - oldExtent // 2). + newPosition := (newPosition x + min: owner extent x - newExtent x + max: 0) @ + (newPosition y + min: owner extent y - newExtent y + max: dockingBarBottom). + target + setConstrainedPosition: newPosition + hangOut: true ]. + self bounds: self target worldBoundsForHalo! - - (newExtent x > 1 and: [newExtent y > 1]) - ifTrue: [ - oldExtent := target extent. - target setExtentFromHalo: (newExtent min: owner extent). - newPosition := target position - (target extent - oldExtent // 2). - newPosition := (newPosition x min: owner extent x - newExtent x max: 0) @ (newPosition y min: owner extent y - newExtent y max: 0). - target setConstrainedPosition: newPosition hangOut: true]. - - self bounds: self target worldBoundsForHalo.! From commits at source.squeak.org Wed Sep 14 21:55:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 14 21:55:16 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160914215510.19053.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068927.html Name: Kernel-bf.1037 Ancestors: Kernel-ul.1036 Remove unused allInstancesEverywhereDo: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068928.html Name: Morphic-bf.1306 Ancestors: Morphic-tfel.1305 Remove ImageSegment dependency ============================================= From tim at rowledge.org Thu Sep 15 01:40:53 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu Sep 15 01:40:59 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> Message-ID: <9C0D0608-8CE4-4D83-B8D0-81D80B6C20A0@rowledge.org> > On 14-09-2016, at 12:56 PM, Chris Muller wrote: > > The original purpose of ImageSegments was to leverage the > garbage-collector in order to have a performant serialization > mechanism, is that right? > > Now with Cog/Spur, its performance is probably not as advantageous, > and so the relative cost of its magical implementation, code size, > number of serializers confusion, seems unlikely it will be used by any > new code. Given that Spur is somewhat different memory model I doubt that using the original idea of the image segment is of any real advantage. And given that the detail of the memory model is different we?d have to do assorted fiddling in both directions. Seems like a bit of a loser to me. Being able to stop keeping compatibility code working in the vm would save some hassles. I say ?just dolt' tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Brain fried; core dumped. From commits at source.squeak.org Thu Sep 15 11:47:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 15 11:47:56 2016 Subject: [squeak-dev] The Trunk: EToys-bf.234.mcz Message-ID: Bert Freudenberg uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-bf.234.mcz ==================== Summary ==================== Name: EToys-bf.234 Author: bf Time: 15 September 2016, 1:46:41.663164 pm UUID: e2796761-35e4-418b-b7d2-65e8e3b6eb07 Ancestors: EToys-bf.233 Remove ImageSegment extension methods =============== Diff against EToys-bf.233 =============== Item was removed: - ----- Method: ImageSegment>>classOrganizersBeRoots: (in category '*Etoys-Squeakland-read/write segment') ----- - classOrganizersBeRoots: dummy - "The ClassOrganizers of some UniClasses may slip into OutPointers. They point directly at the class of the UniClass (in subject). They need to be in arrayOfRoots. Find them and insert them into dummy's references." - - dummy references keys do: [:anObject | - anObject isBehavior & (anObject isKindOf: ClassDescription) ifTrue: [ - anObject theNonMetaClass isSystemDefined ifFalse: ["uniClass will be in image seg" - (dummy references includesKey: anObject organization) ifFalse: [ - dummy references at: anObject organization put: 47]]]]. "will get into roots"! Item was removed: - ----- Method: ImageSegment>>rehashDictionaries: (in category '*Etoys-Squeakland-fileIn/Out') ----- - rehashDictionaries: aCollection - ProgressInitiationException - display: 'Rehash objects...' - during: [:bar | 1 - to: aCollection size - do: [:i | - (aCollection at: i) rehash. - i \\ 10 = 0 - ifTrue: [bar value: i / aCollection size]]]! Item was removed: - ----- Method: ImageSegment>>rehashMethodDictionaries: (in category '*Etoys-Squeakland-fileIn/Out') ----- - rehashMethodDictionaries: oldDictionaries - | newDictionaries | - newDictionaries := oldDictionaries collect: [:d | d rehashWithoutBecome]. - oldDictionaries asArray elementsForwardIdentityTo: newDictionaries asArray. - ! From bert at freudenbergs.de Thu Sep 15 12:13:03 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Sep 15 12:13:08 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: <9C0D0608-8CE4-4D83-B8D0-81D80B6C20A0@rowledge.org> References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> <9C0D0608-8CE4-4D83-B8D0-81D80B6C20A0@rowledge.org> Message-ID: Okay. I moved it to trunk. With this, we should be able to load most old Etoys projects. If something doesn't work, speak up :) - Bert - On Thu, Sep 15, 2016 at 3:40 AM, tim Rowledge wrote: > > > On 14-09-2016, at 12:56 PM, Chris Muller wrote: > > > > The original purpose of ImageSegments was to leverage the > > garbage-collector in order to have a performant serialization > > mechanism, is that right? > > > > Now with Cog/Spur, its performance is probably not as advantageous, > > and so the relative cost of its magical implementation, code size, > > number of serializers confusion, seems unlikely it will be used by any > > new code. > > Given that Spur is somewhat different memory model I doubt that using the > original idea of the image segment is of any real advantage. And given that > the detail of the memory model is different we?d have to do assorted > fiddling in both directions. Seems like a bit of a loser to me. Being able > to stop keeping compatibility code working in the vm would save some > hassles. I say ?just dolt' > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Brain fried; core dumped. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160915/5681bde8/attachment.htm From commits at source.squeak.org Thu Sep 15 16:33:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 15 16:33:59 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1038.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1038.mcz ==================== Summary ==================== Name: Kernel-bf.1038 Author: bf Time: 15 September 2016, 6:33:16.643947 pm UUID: 8c354082-7d64-4039-8dc2-e2d78c537570 Ancestors: Kernel-bf.1037 Fix typos =============== Diff against Kernel-bf.1037 =============== Item was changed: ----- Method: Monitor>>primitiveTestAndSetOwnershipOfCriticalSection (in category 'private-primitives') ----- primitiveTestAndSetOwnershipOfCriticalSection "Primitive. Attempt to set the ownership of the receiver. If the receiver is unowned set its owningProcess to the activeProcess and answer false. If the receiver is owned by the activeProcess answer true. If the receiver is owned by some other process answer nil. Copyright (c) 2016 - 3D Immersive Collaboration Consulting, LLC." + self primitiveFailed - self primitiveFail "In the spirit of the following" "[owner ifNil: [owningProcess := Processor activeProcess. ^false]. owner = Processor activeProcess ifTrue: [^true]. ^nil] valueUnpreemptively"! Item was changed: ----- Method: Mutex>>primitiveTestAndSetOwnershipOfCriticalSection (in category 'private-primitives') ----- primitiveTestAndSetOwnershipOfCriticalSection "Primitive. Attempt to set the ownership of the receiver. If the receiver is unowned set its owningProcess to the activeProcess and answer false. If the receiver is owned by the activeProcess answer true. If the receiver is owned by some other process answer nil. Copyright (c) 2016 - 3D Immersive Collaboration Consulting, LLC." + self primitiveFailed - self primitiveFail "In the spirit of the following" "[owner ifNil: [owningProcess := Processor activeProcess. ^false]. owner = Processor activeProcess ifTrue: [^true]. ^nil] valueUnpreemptively"! From commits at source.squeak.org Thu Sep 15 21:55:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 15 21:55:08 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160915215507.15376.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068929.html Name: Morphic-cmm.1306 Ancestors: Morphic-bf.1306 Fix docking bars occluding windows when pinch-resizing them. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068930.html Name: System-bf.916 Ancestors: System-bf.915 Replace VM-level ImageSegment loading with a Smalltalk implementation for old (interpreter-era) projects. Also removes support for writing segments. This overrides the Spur support introduced in System-eem.758. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068931.html Name: EToys-bf.234 Ancestors: EToys-bf.233 Remove ImageSegment extension methods ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068932.html Name: Kernel-bf.1038 Ancestors: Kernel-bf.1037 Fix typos ============================================= From commits at source.squeak.org Thu Sep 15 22:23:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 15 22:23:08 2016 Subject: [squeak-dev] The Trunk: WebClient-HTTP-cmm.6.mcz Message-ID: Chris Muller uploaded a new version of WebClient-HTTP to project The Trunk: http://source.squeak.org/trunk/WebClient-HTTP-cmm.6.mcz ==================== Summary ==================== Name: WebClient-HTTP-cmm.6 Author: cmm Time: 14 September 2016, 3:27:23.768768 pm UUID: 900bff82-5c5e-478b-a08a-1ba7736a074d Ancestors: WebClient-HTTP-cmm.4 Accept text/html by default only when the user has not specified their own mimeType. =============== Diff against WebClient-HTTP-cmm.4 =============== Item was changed: ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in category '*webclient-http') ----- httpGetDocument: url args: args accept: mimeType request: requestString "Return the exact contents of a web object. Asks for the given MIME type. If mimeType is nil, use 'text/html'. An extra requestString may be submitted and must end with crlf. The parsed header is saved. Use a proxy server if one has been registered. tk 7/23/97 17:12" "Note: To fetch raw data, you can use the MIME type 'application/octet-stream'." | client xhdrs resp urlString progress | "Normalize the url" urlString := (Url absoluteFromText: url) asString. args ifNotNil: [ urlString := urlString, (self argString: args) ]. "Some raw extra headers which historically have been added" xhdrs := HTTPProxyCredentials, HTTPBlabEmail, "may be empty" requestString. "extra user request. Authorization" client := WebClient new. ^[resp := client httpGet: urlString do:[:req| + "Add ACCEPT header, accept plain text by default." + req headerAt: 'Accept' put: (mimeType ifNil: ['text/html']). - "Add ACCEPT header" - mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. - "Always accept plain text" - req addHeader: 'Accept' value: 'text/html'. - "Add the additional headers" (WebUtils readHeadersFrom: xhdrs readStream) do:[:assoc| req addHeader: assoc key value: assoc value]]. progress := [:total :amount| (HTTPProgress new) total: total; amount: amount; signal: 'Downloading...' ]. "Simulate old HTTPSocket return behavior" (resp code between: 200 and: 299) ifTrue:[MIMEDocument contentType: resp contentType content: (resp contentWithProgress: progress) url: url] ifFalse:[resp asString, resp content]. ] ensure:[client destroy]. ! From dram.wang at gmail.com Fri Sep 16 03:48:01 2016 From: dram.wang at gmail.com (Xin Wang) Date: Fri Sep 16 03:48:04 2016 Subject: [squeak-dev] The Trunk: WebClient-HTTP-cmm.6.mcz In-Reply-To: <57db1f50.078b370a.27175.300fSMTPIN_ADDED_MISSING@mx.google.com> References: <57db1f50.078b370a.27175.300fSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-09-16 6:22 GMT+08:00 : > Chris Muller uploaded a new version of WebClient-HTTP to project The Trunk: > http://source.squeak.org/trunk/WebClient-HTTP-cmm.6.mcz > > ==================== Summary ==================== > > Name: WebClient-HTTP-cmm.6 > Author: cmm > Time: 14 September 2016, 3:27:23.768768 pm > UUID: 900bff82-5c5e-478b-a08a-1ba7736a074d > Ancestors: WebClient-HTTP-cmm.4 > > Accept text/html by default only when the user has not specified their own > mimeType. > > =============== Diff against WebClient-HTTP-cmm.4 =============== > > Item was changed: > ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: > (in category '*webclient-http') ----- > httpGetDocument: url args: args accept: mimeType request: requestString > "Return the exact contents of a web object. Asks for the given > MIME type. If mimeType is nil, use 'text/html'. An extra requestString may > be submitted and must end with crlf. The parsed header is saved. Use a > proxy server if one has been registered. tk 7/23/97 17:12" > > "Note: To fetch raw data, you can use the MIME type > 'application/octet-stream'." > > | client xhdrs resp urlString progress | > "Normalize the url" > urlString := (Url absoluteFromText: url) asString. > > args ifNotNil: [ > urlString := urlString, (self argString: args) > ]. > > "Some raw extra headers which historically have been added" > xhdrs := HTTPProxyCredentials, > HTTPBlabEmail, "may be empty" > requestString. "extra user request. Authorization" > > client := WebClient new. > ^[resp := client httpGet: urlString do:[:req| > + "Add ACCEPT header, accept plain text by default." > + req headerAt: 'Accept' put: (mimeType ifNil: > ['text/html']). > - "Add ACCEPT header" > - mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. > > - "Always accept plain text" > - req addHeader: 'Accept' value: 'text/html'. > - > "Add the additional headers" > (WebUtils readHeadersFrom: xhdrs readStream) > do:[:assoc| req addHeader: assoc key value: assoc > value]]. > > progress := [:total :amount| > (HTTPProgress new) total: total; amount: amount; signal: > 'Downloading...' > ]. > > "Simulate old HTTPSocket return behavior" > (resp code between: 200 and: 299) > ifTrue:[MIMEDocument contentType: resp contentType > content: (resp contentWithProgress: > progress) url: url] > ifFalse:[resp asString, resp content]. > ] ensure:[client destroy]. > ! > > > Comment typo? I think ?text/html" does not mean "plain text", as there is "text/plain". Regards, Xin Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160916/e91a4308/attachment.htm From jakob.reschke at student.hpi.de Fri Sep 16 12:50:26 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Fri Sep 16 12:50:50 2016 Subject: [squeak-dev] How to use Environments? Message-ID: Hello, I am having a look at Environments, but have not yet figured out, how to operate them. I would like to create a new environment with an additional binding for an existing class under another name, and load a package in that new environment. The most of a documentation I have found is http://wiki.squeak.org/squeak/6220 and I have tried the following so far: testenv := Environment named: #TestEnv1. testenv import: Smalltalk globals. testenv from: Smalltalk globals import: { #String -> #MyString }. testenv importSelf. testenv exportSelf. However, testenv valueOf: #MyString or testenv valueOf: #String both return nil instead of the String class. Does it mean that the from:import: did not work? It seems to only add a policy to my environment, but no declarations or bindings. For evaluating something in context of the environment, I have found the EnvironmentLoader, but it does not seem to recognize the additional binding either: (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil (EnvironmentLoader for: testenv) evaluate: 'String'. => nil (at least the import of the original globals seems to have worked). What steps am I missing? Also it is not very convenient to make up strings of code everytime I want to do something in the other environment, is there a better way? Can I get a system browser for my environment (where saving a method compiles it with the environment bindings in place)? Best regards, Jakob From asqueaker at gmail.com Fri Sep 16 15:15:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Sep 16 15:16:21 2016 Subject: [squeak-dev] The Trunk: WebClient-HTTP-cmm.6.mcz In-Reply-To: References: <57db1f50.078b370a.27175.300fSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Xin, I'm sure this will sound odd, but I decided to keep as much of Andreas' original code intact. He may have simply meant, *not* binary, html is expressed in plain text. But, you are right that this creates a sort of ambiguity with the "text/plain" MIME type. Best, Chris On Thu, Sep 15, 2016 at 10:48 PM, Xin Wang wrote: > > > 2016-09-16 6:22 GMT+08:00 : >> >> Chris Muller uploaded a new version of WebClient-HTTP to project The >> Trunk: >> http://source.squeak.org/trunk/WebClient-HTTP-cmm.6.mcz >> >> ==================== Summary ==================== >> >> Name: WebClient-HTTP-cmm.6 >> Author: cmm >> Time: 14 September 2016, 3:27:23.768768 pm >> UUID: 900bff82-5c5e-478b-a08a-1ba7736a074d >> Ancestors: WebClient-HTTP-cmm.4 >> >> Accept text/html by default only when the user has not specified their own >> mimeType. >> >> =============== Diff against WebClient-HTTP-cmm.4 =============== >> >> Item was changed: >> ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: (in >> category '*webclient-http') ----- >> httpGetDocument: url args: args accept: mimeType request: requestString >> "Return the exact contents of a web object. Asks for the given >> MIME type. If mimeType is nil, use 'text/html'. An extra requestString may >> be submitted and must end with crlf. The parsed header is saved. Use a >> proxy server if one has been registered. tk 7/23/97 17:12" >> >> "Note: To fetch raw data, you can use the MIME type >> 'application/octet-stream'." >> >> | client xhdrs resp urlString progress | >> "Normalize the url" >> urlString := (Url absoluteFromText: url) asString. >> >> args ifNotNil: [ >> urlString := urlString, (self argString: args) >> ]. >> >> "Some raw extra headers which historically have been added" >> xhdrs := HTTPProxyCredentials, >> HTTPBlabEmail, "may be empty" >> requestString. "extra user request. Authorization" >> >> client := WebClient new. >> ^[resp := client httpGet: urlString do:[:req| >> + "Add ACCEPT header, accept plain text by default." >> + req headerAt: 'Accept' put: (mimeType ifNil: >> ['text/html']). >> - "Add ACCEPT header" >> - mimeType ifNotNil:[req headerAt: 'Accept' put: mimeType]. >> >> - "Always accept plain text" >> - req addHeader: 'Accept' value: 'text/html'. >> - >> "Add the additional headers" >> (WebUtils readHeadersFrom: xhdrs readStream) >> do:[:assoc| req addHeader: assoc key value: assoc >> value]]. >> >> progress := [:total :amount| >> (HTTPProgress new) total: total; amount: amount; signal: >> 'Downloading...' >> ]. >> >> "Simulate old HTTPSocket return behavior" >> (resp code between: 200 and: 299) >> ifTrue:[MIMEDocument contentType: resp contentType >> content: (resp contentWithProgress: >> progress) url: url] >> ifFalse:[resp asString, resp content]. >> ] ensure:[client destroy]. >> ! >> >> > > > Comment typo? > > I think ?text/html" does not mean "plain text", as there is "text/plain". > > > Regards, > Xin Wang > > > From robert.hirschfeld at gmx.net Fri Sep 16 15:56:46 2016 From: robert.hirschfeld at gmx.net (Robert Hirschfeld) Date: Fri Sep 16 15:56:51 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: <13EF1AF6-DF84-4BC1-AC48-4B159BAE24F3@gmx.de> Message-ID: Until we have an alternative implementation, it would be nice to have full image segment support to for example revive Croquet's islands. (We did that for Squeak v4, but stopped working on it with v5...) Best, Robert > On 14 Sep 2016, at 15:50, Bert Freudenberg wrote: > > Okay, I've put it in the inbox as System-bf.916. > > Are we sure about removing the ability to store? I just noticed that Eliot claimed to have fixed ImageSegments in System-eem.758. OTOH if nobody intends to use them it's better to get rid of the dead code. > > - Bert - > > On Wed, Sep 14, 2016 at 5:48 AM, H. Hirzel wrote: > +1 > > On 9/13/16, Tobias Pape wrote: > > +1 > > On 13.09.2016, at 22:09, Bert Freudenberg wrote: > > > >> Hi all, > >> > >> I think there is no current usage of image segments. Project storing has > >> been broken for a while and that's the only current use I am aware of. > >> > >> What about this idea: > >> > >> We keep ImageSegment but remove all support for writing. It would only be > >> used for importing old projects. It would not use the VM primitives > >> (because they are incompatible anyways). > >> > >> The number of methods in ImageSegment would shrink from more than 80 to > >> 15. My SegmentLoader has 25 methods, it replaces the VM primitive. Cog > >> appears to be fast enough to not cause a significant slowdown in loading. > >> > >> With this, old projects can still be imported, but writing projects would > >> have to use some other serialization mechanism (which we discussed > >> before). It would remove quite a bit of unused code, making the remaining > >> code more easily understandable. > >> > >> Sounds good? > >> > >> - Bert - > >> > > > > > > > > > -- Robert Hirschfeld hirschfeld@acm.org www.hirschfeld.org From brasspen at gmail.com Fri Sep 16 16:27:59 2016 From: brasspen at gmail.com (Chris Cunnington) Date: Fri Sep 16 16:28:05 2016 Subject: [squeak-dev] How to use Environments? Message-ID: <04e81a8c-b2a7-8f10-ed47-c8bf8a344780@gmail.com> >Can I get a system browser for my environment (where saving a method >compiles it with the environment bindings in place)? http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-June/164605.html Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160916/02dcdff5/attachment.htm From commits at source.squeak.org Fri Sep 16 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 16 21:55:10 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160916215508.2105.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068933.html Name: WebClient-HTTP-cmm.6 Ancestors: WebClient-HTTP-cmm.4 Accept text/html by default only when the user has not specified their own mimeType. ============================================= From dram.wang at gmail.com Sat Sep 17 11:23:54 2016 From: dram.wang at gmail.com (Xin Wang) Date: Sat Sep 17 11:23:58 2016 Subject: [squeak-dev] The Trunk: WebClient-HTTP-cmm.6.mcz In-Reply-To: References: <57db1f50.078b370a.27175.300fSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-09-16 23:15 GMT+08:00 Chris Muller : > Hi Xin, I'm sure this will sound odd, but I decided to keep as much of > Andreas' original code intact. > > He may have simply meant, *not* binary, html is expressed in plain > text. But, you are right that this creates a sort of ambiguity with > the "text/plain" MIME type. > > Best, > Chris > > Get it. Thanks! > On Thu, Sep 15, 2016 at 10:48 PM, Xin Wang wrote: > > > > > > 2016-09-16 6:22 GMT+08:00 : > >> > >> Chris Muller uploaded a new version of WebClient-HTTP to project The > >> Trunk: > >> http://source.squeak.org/trunk/WebClient-HTTP-cmm.6.mcz > >> > >> ==================== Summary ==================== > >> > >> Name: WebClient-HTTP-cmm.6 > >> Author: cmm > >> Time: 14 September 2016, 3:27:23.768768 pm > >> UUID: 900bff82-5c5e-478b-a08a-1ba7736a074d > >> Ancestors: WebClient-HTTP-cmm.4 > >> > >> Accept text/html by default only when the user has not specified their > own > >> mimeType. > >> > >> =============== Diff against WebClient-HTTP-cmm.4 =============== > >> > >> Item was changed: > >> ----- Method: HTTPSocket class>>httpGetDocument:args:accept:request: > (in > >> category '*webclient-http') ----- > >> httpGetDocument: url args: args accept: mimeType request: > requestString > >> "Return the exact contents of a web object. Asks for the given > >> MIME type. If mimeType is nil, use 'text/html'. An extra requestString > may > >> be submitted and must end with crlf. The parsed header is saved. Use a > >> proxy server if one has been registered. tk 7/23/97 17:12" > >> > >> "Note: To fetch raw data, you can use the MIME type > >> 'application/octet-stream'." > >> > >> | client xhdrs resp urlString progress | > >> "Normalize the url" > >> urlString := (Url absoluteFromText: url) asString. > >> > >> args ifNotNil: [ > >> urlString := urlString, (self argString: args) > >> ]. > >> > >> "Some raw extra headers which historically have been added" > >> xhdrs := HTTPProxyCredentials, > >> HTTPBlabEmail, "may be empty" > >> requestString. "extra user request. Authorization" > >> > >> client := WebClient new. > >> ^[resp := client httpGet: urlString do:[:req| > >> + "Add ACCEPT header, accept plain text by default." > >> + req headerAt: 'Accept' put: (mimeType ifNil: > >> ['text/html']). > >> - "Add ACCEPT header" > >> - mimeType ifNotNil:[req headerAt: 'Accept' put: > mimeType]. > >> > >> - "Always accept plain text" > >> - req addHeader: 'Accept' value: 'text/html'. > >> - > >> "Add the additional headers" > >> (WebUtils readHeadersFrom: xhdrs readStream) > >> do:[:assoc| req addHeader: assoc key value: > assoc > >> value]]. > >> > >> progress := [:total :amount| > >> (HTTPProgress new) total: total; amount: amount; signal: > >> 'Downloading...' > >> ]. > >> > >> "Simulate old HTTPSocket return behavior" > >> (resp code between: 200 and: 299) > >> ifTrue:[MIMEDocument contentType: resp contentType > >> content: (resp contentWithProgress: > >> progress) url: url] > >> ifFalse:[resp asString, resp content]. > >> ] ensure:[client destroy]. > >> ! > >> > >> > > > > > > Comment typo? > > > > I think ?text/html" does not mean "plain text", as there is "text/plain". > > > > > > Regards, > > Xin Wang > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160917/f0bbd5a9/attachment.htm From robert.w.withers at gmail.com Sun Sep 18 07:41:33 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Sun Sep 18 07:41:37 2016 Subject: [squeak-dev] unable to write to http://squeaksource.com Message-ID: <95a8b44e-df36-2f1f-3301-c8c85e0e3711@gmail.com> I forgot my password to this code server. The forgotten password capability isn't working for me. Does anyone know how I could reset my password? Thank you, Robert From lewis at mail.msen.com Sun Sep 18 13:04:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Sep 18 13:04:46 2016 Subject: [squeak-dev] unable to write to http://squeaksource.com In-Reply-To: <95a8b44e-df36-2f1f-3301-c8c85e0e3711@gmail.com> References: <95a8b44e-df36-2f1f-3301-c8c85e0e3711@gmail.com> Message-ID: <20160918130444.GB7582@shell.msen.com> On Sun, Sep 18, 2016 at 03:41:33AM -0400, Robert Withers wrote: > I forgot my password to this code server. The forgotten password > capability isn't working for me. Does anyone know how I could reset my > password? > > Thank you, > > Robert > Password reset (hopefully), and sent to you in private email. Dave From commits at source.squeak.org Mon Sep 19 11:22:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Sep 19 11:22:10 2016 Subject: [squeak-dev] The Inbox: EToys-jl.235.mcz Message-ID: A new version of EToys was added to project The Inbox: http://source.squeak.org/inbox/EToys-jl.235.mcz ==================== Summary ==================== Name: EToys-jl.235 Author: jl Time: 19 September 2016, 1:21:41.203006 pm UUID: 605a7062-4fa8-5545-8482-9f59e261d0b8 Ancestors: EToys-jl.231, EToys-bf.234 fixed Kedama distanceTo: (with tfel) =============== Diff against EToys-jl.231 =============== Item was changed: ----- Method: BorderedMorph>>useRoundedCornersInEtoys (in category '*Etoys-Squeakland-accessing') ----- useRoundedCornersInEtoys + SystemWindow roundedWindowCorners - Preferences roundedWindowCorners ifTrue: [self useRoundedCorners]! Item was removed: - ----- Method: Character>>setValue: (in category '*Etoys-Squeakland-private') ----- - setValue: newValue - ^self error:'Characters are immutable' - ! Item was removed: - ----- Method: ImageSegment>>cc:new:current:fake:refStrm: (in category '*Etoys-Squeakland-compact classes') ----- - cc: ind new: inTheSeg current: inTheImage fake: fakeCls refStrm: smartRefStream - "Sort out all the cases and decide what to do. Every Fake class is uncompacted before having insts converted. As the segment is installed, instances of reshaped compact classes will have the wrong class. Trouble cases: - 1) Existing class is compact in the segment and not compact here. Make that compact, (error if that slot is used), load the segment. If an class was just filed in, it is an existing class as far as we are concerned. - 2) A compact class has a different shape. We created a Fake class. Load the segment, with instances in the seg having the Wrong Class!!!! Find the bad instancees, and copy them over to being the real class. - 3) An existing class is not compact in the segment, but is in the image. Just let the new instance be uncompact. That is OK, and never reaches this code. - A class that is a root in this segment cannot be compact. That is not allowed." - - (inTheImage == nil) & (fakeCls == nil) ifTrue: ["case 1 and empty slot" - inTheSeg becomeCompactSimplyAt: ind. ^ true]. - - (inTheImage == inTheSeg) & (fakeCls == nil) ifTrue: ["everything matches" - ^ true]. - - inTheImage ifNil: ["reshaped and is an empty slot" - fakeCls becomeCompactSimplyAt: ind. ^ true]. - "comeFullyUpOnReload: will clean up" - - (inTheSeg == String and:[inTheImage == ByteString]) ifTrue:[ - "ar 4/10/2005: Workaround after renaming String to ByteString" - ^true - ]. - - "Is the image class really the class we are expecting? inTheSeg came in as a DiskProxy, and was mapped if it was renamed!!" - inTheImage == inTheSeg ifFalse: [ - self inform: 'The incoming class ', inTheSeg name, ' wants compact class \location ', ind printString, ', but that is occupied by ', inTheImage name, '. \This file cannot be read into this system. The author of the file \should make the class uncompact and create the file again.' withCRs. - ^ false]. - - "Instances of fakeCls think they are compact, and thus will say they are instances of the class inTheImage, which is a different shape. Just allow this to happen. Collect them and remap them as soon as the segment is installed." - ^ true! Item was removed: - ----- Method: ImageSegment>>classOrganizersBeRoots: (in category '*Etoys-Squeakland-read/write segment') ----- - classOrganizersBeRoots: dummy - "The ClassOrganizers of some UniClasses may slip into OutPointers. They point directly at the class of the UniClass (in subject). They need to be in arrayOfRoots. Find them and insert them into dummy's references." - - dummy references keys do: [:anObject | - anObject isBehavior & (anObject isKindOf: ClassDescription) ifTrue: [ - anObject theNonMetaClass isSystemDefined ifFalse: ["uniClass will be in image seg" - (dummy references includesKey: anObject organization) ifFalse: [ - dummy references at: anObject organization put: 47]]]]. "will get into roots"! Item was removed: - ----- Method: ImageSegment>>rehashDictionaries: (in category '*Etoys-Squeakland-fileIn/Out') ----- - rehashDictionaries: aCollection - ProgressInitiationException - display: 'Rehash objects...' - during: [:bar | 1 - to: aCollection size - do: [:i | - (aCollection at: i) rehash. - i \\ 10 = 0 - ifTrue: [bar value: i / aCollection size]]]! Item was removed: - ----- Method: ImageSegment>>rehashMethodDictionaries: (in category '*Etoys-Squeakland-fileIn/Out') ----- - rehashMethodDictionaries: oldDictionaries - | newDictionaries | - newDictionaries := oldDictionaries collect: [:d | d rehashWithoutBecome]. - oldDictionaries asArray elementsForwardIdentityTo: newDictionaries asArray. - ! Item was added: + ----- Method: KedamaExamplerPlayer>>getXAndY (in category 'slot getters/setters') ----- + getXAndY + + ^ self turtles getXAndY! Item was added: + ----- Method: KedamaTurtlePlayer>>getXAndY (in category 'commands and slots') ----- + getXAndY + + ^ x@y. + ! Item was added: + ----- Method: KedamaTurtleVectorPlayer>>getXAndY (in category 'player commands') ----- + getXAndY + + ^ self getX @ self getY + ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2 class>>primGetDistanceToX:toY:xArray:yArray:resultInto: (in category 'as yet unclassified') ----- primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result + | ppx ppy tempMin | - | ppx ppy | "^ KedamaPlugin doPrimitive: #vectorGetDistanceTo." ppx := pX. ppy := pY. 1 to: result size do: [:index | pX isCollection ifTrue: [ + tempMin := SmallInteger maxVal. + 1 to: pX size do: [:index2 | + ppx := pX at: index2. + ppy := pY at: index2. + tempMin := tempMin min: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. + ]. + self flag: #todo. "should really also remember the other side index to re-use inside the script" + result at: index put: tempMin. + ] ifFalse: [ + result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. + ] - ppx := pX at: index. - ppy := pY at: index. - ]. - result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. - ]. ^ result. ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>getDistanceTo: (in category 'player commands') ----- getDistanceTo: players | p xArray yArray result pX pY xy | players isCollection ifFalse: [ p := players ]. xArray := arrays at: 2. yArray := arrays at: 3. result := KedamaFloatArray new: self size. players isCollection ifTrue: [ pX := KedamaFloatArray new: players size. pY := KedamaFloatArray new: players size. 1 to: players size do: [:i | xy := (players at: i) getXAndY. pX at: i put: xy x. pY at: i put: xy y. ]. ] ifFalse: [ + pX := p turtles getX. + pY := p turtles getY. - xy := p getXAndY. - pX := xy x. - pY := xy y. ]. ^ KedamaTurtleVectorPlayer2 primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. ! Item was added: + ----- Method: KedamaTurtleVectorPlayer2>>getXAndY (in category 'player commands') ----- + getXAndY + | ys | + ys := self getY. + ^ self getX asArray withIndexCollect: [:ea :idx | ea @ (ys at: idx)] + ! Item was changed: ----- Method: Morph class>>unfilteredCategoriesForViewer (in category '*Etoys') ----- unfilteredCategoriesForViewer "Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of: - masterOrderingOfCategorySymbols first - others last in order by translated wording" " Morph unfilteredCategoriesForViewer " | aClass additions masterOrder | aClass := self. additions := OrderedCollection new. + [ aClass == Morph superclass ] whileFalse: [ - [aClass == Morph superclass ] whileFalse: [ additions addAll: (aClass allAdditionsToViewerCategories keys asArray + "#translated can be super slow, so use Schwartzian transform" + replace: [ :each | each -> each translated ]; + sort: [ :a :b | a value <= b value ]; + replace: [ :each | each key ]). - sort: [ :a :b | a translated < b translated ]). aClass := aClass superclass ]. masterOrder := EToyVocabulary masterOrderingOfCategorySymbols. ^(masterOrder intersection: additions), (additions difference: masterOrder).! Item was added: + ----- Method: Player>>getXAndY (in category 'slot getters/setters') ----- + getXAndY + + ^ self getX @ self getY + ! From vaidasd at gmail.com Mon Sep 19 17:38:18 2016 From: vaidasd at gmail.com (=?UTF-8?Q?Vaidotas_Did=C5=BEbalis?=) Date: Mon Sep 19 17:39:03 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: Message-ID: Hello list, We use project-saving feature. Users maintains a set of projects with connectors based diagrams in them and project saving allows to share them among different user images. It's nice to be able to save any morph to disk and resurrect it in other image. We use Squeak 4.4. Vaidotas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160919/a7e28a5b/attachment.htm From landrewcoward at shaw.ca Mon Sep 19 18:31:35 2016 From: landrewcoward at shaw.ca (Andrew Coward) Date: Mon Sep 19 18:31:43 2016 Subject: [squeak-dev] Multiple Images executing simultaneously Message-ID: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> I am using the all-in-one image to carry out neural network simulations with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to complete. I have found it is possible to have 7 or more different images all executing at the same time. Each image runs at the same speed as when only one image is running. Obviously a huge benefit. This works in either Smalltalk 4.4 or 5.0. Each image has a different name, and one oddity is that sometimes when opening an image I get the message ?cannot find application?. However, changing the name of the image, for example by inserting spaces at the end, eventually gets to an image that will open (so far 1 to 4 spaces have always been sufficient). Does anyone know if this ability to run multiple images is a ?happy accident? or an intended feature of Smalltalk that will be preserved in future releases of Smalltalk and OS ? From herbertkoenig at gmx.net Mon Sep 19 18:54:23 2016 From: herbertkoenig at gmx.net (=?UTF-8?Q?Herbert_K=c3=b6nig?=) Date: Mon Sep 19 18:54:43 2016 Subject: [squeak-dev] Multiple Images executing simultaneously In-Reply-To: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> References: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> Message-ID: Hi Andrew, I'm using exactly your setup to run genetic algorithms. I have three running on a Raspberry Pi (linux) and three on my windows 7 laptop. All images live in the same folder with different names and each image has a changes file of the same name. Never encountered the problems you describe. In 2007 I did the same with training neural networks in Squeak 3.8. I see no reasons why this shouldn't work. Not knowing Mac it sounds like you start the VM by double clicking the image. I start the VM which then prompts me for the image. That's the only difference I can see. Cheers, Herbert Am 19.09.2016 um 20:31 schrieb Andrew Coward: > I am using the all-in-one image to carry out neural network simulations with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to complete. > > I have found it is possible to have 7 or more different images all executing at the same time. Each image runs at the same speed as when only one image is running. Obviously a huge benefit. > > This works in either Smalltalk 4.4 or 5.0. > > Each image has a different name, and one oddity is that sometimes when opening an image I get the message ?cannot find application?. However, changing the name of the image, for example by inserting spaces at the end, eventually gets to an image that will open (so far 1 to 4 spaces have always been sufficient). > > Does anyone know if this ability to run multiple images is a ?happy accident? or an intended feature of Smalltalk that will be preserved in future releases of Smalltalk and OS ? From tom.b.rushworth at gmail.com Mon Sep 19 19:11:50 2016 From: tom.b.rushworth at gmail.com (Tom Rushworth) Date: Mon Sep 19 19:12:02 2016 Subject: [squeak-dev] Multiple Images executing simultaneously In-Reply-To: References: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> Message-ID: <432c8197-7d7f-7d97-d8df-48495edb003f@gmail.com> Hi All, The Mac has a habit of starting only one instance of an application for multiple open documents. That works fine for a word processor, not so well for squeak. Try starting the VM from the command line, and use the activity manager (or the 'ps' command) to make sure there are multiple instances running. On 19/09/2016 11:54, Herbert K?nig wrote: > Hi Andrew, > > I'm using exactly your setup to run genetic algorithms. I have three > running on a Raspberry Pi (linux) and three on my windows 7 laptop. > > All images live in the same folder with different names and each image > has a changes file of the same name. Never encountered the problems you > describe. In 2007 I did the same with training neural networks in Squeak > 3.8. I see no reasons why this shouldn't work. > > Not knowing Mac it sounds like you start the VM by double clicking the > image. I start the VM which then prompts me for the image. That's the > only difference I can see. > > Cheers, > > > Herbert > > Am 19.09.2016 um 20:31 schrieb Andrew Coward: >> I am using the all-in-one image to carry out neural network >> simulations with different parameters using a MacBook Pro 2 GHx Intel >> Core i7 with OSX 10.11.6. Each simulation can take up to 36 hours to >> complete. >> >> I have found it is possible to have 7 or more different images all >> executing at the same time. Each image runs at the same speed as when >> only one image is running. Obviously a huge benefit. >> >> This works in either Smalltalk 4.4 or 5.0. >> >> Each image has a different name, and one oddity is that sometimes when >> opening an image I get the message ?cannot find application?. However, >> changing the name of the image, for example by inserting spaces at the >> end, eventually gets to an image that will open (so far 1 to 4 spaces >> have always been sufficient). >> >> Does anyone know if this ability to run multiple images is a ?happy >> accident? or an intended feature of Smalltalk that will be preserved >> in future releases of Smalltalk and OS ? > > > -- Tom Rushworth From hannes.hirzel at gmail.com Mon Sep 19 20:38:05 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Mon Sep 19 20:38:08 2016 Subject: [squeak-dev] Make ImageSegments import-only? In-Reply-To: References: Message-ID: Yes, sharing projects through save and load in another project is a need. The question is just which serialization format should be used in the future. We are currently looking for a replacement for ImageSegments. But to do so it means that reading Image Segments is necessary in a current version. --Hannes On 9/19/16, Vaidotas Did?balis wrote: > Hello list, > We use project-saving feature. Users maintains a set of projects with > connectors based diagrams in them and project saving allows to share them > among different user images. It's nice to be able to save any morph to disk > and resurrect it in other image. We use Squeak 4.4. > Vaidotas > From hannes.hirzel at gmail.com Mon Sep 19 20:48:21 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Mon Sep 19 20:48:24 2016 Subject: [squeak-dev] Other serialisation formats -- SIXX serialisation format, JSON, Fuel? In-Reply-To: References: <00A78F34-3E9C-447D-B1BE-B3653B7C19D2@gmail.com> Message-ID: I have started using Fuel and Ma Serializer to store PasteUpMorphs stored in a project. Actually it is a collection of PastUpMorphs used as a slide show. I used as well SIXX for some tests. It is possible to keep all the serialization packages in the same image. Fuel and Ma Serializer work fine so far to save and restore PasteUpMorphs (with content). To use SIXX I had to go for a description and then restore from the description. Interestingly SIXX was about as space efficient as the other ones if I used compression on the the resulting file. As SISS is modeled after SIXX the result is probably the same (I did not verify this). For the tests I did so far Ma Serializer was more space efficient. And the claim is that it spans versions wherase Fuel description explicitly states that it does not. There is a need to agree on some test cases and criteria. It is as well worth considering supporting different formats. The API to do so is very thin. E.g. for the Fuel test to restore the slide collection I just had to do. slides := FLMaterializer materializeFromFileNamed: '/home/user/sq5.1test-Fuel/documentation/Kopie_Lit_01.FL'. slides reverseDo: [:s | s openInWorld] --Hannes On 9/1/16, H. Hirzel wrote: > To widen the discussion. > > I think there was no discussion yet if the serialisation format should > > a) be a binary format > b) a text format > c) or that we need both. > > The prominent use case is saving and loading of projects, see thread > > 'Vaidotas, Squeak 5.1 saving of Morphic projects is broken' > > and the SISS thread. > > Speed of course is an issue. > But then as well portability between different versions of images. > > If the question is put as > > Which serialisation format should succeed image segments then then the > choice is probably limited to > > - Fuel > - Ma Serializer > > > On 8/31/16, Chris Muller wrote: >> I would, of course, love for Ma Serializer to be considered. Its >> mature and proven, and has a lot of hooks and I just know the scrutiny >> and brilliance of this community would benefit it tremendously, and >> since Magma uses it, would make Magma fundamentally better, too. >> >> The Fuel hysteria appears to have already garnered everyone's vote >> before I saw this thread to get myself on the ballot.. I once took >> at look at trying to use Fuel for Magma, but its much too limited (and >> not nearly as much faster than Ma Serializer as reported in the Fuel >> paper). Its is good for UC1) Save an object and UC2) Load an object, >> but not much else. :( >> >> On Wed, Aug 31, 2016 at 6:40 AM, Eliot Miranda >> wrote: >>> >>> >>> On Aug 31, 2016, at 11:14 AM, Bert Freudenberg >>> wrote: >>> >>> On Wednesday, 31 August 2016, H. Hirzel wrote: >>>> >>>> >>>> We might consider JSON or Fuel might as well options for a format to >>>> save projects (with ImageMorphs, Browsers, Workspaces, BookMorphs for >>>> example). >>> >>> >>> If someone wants to take a serious look I'd suggest Fuel. Being a >>> replacement for ImageSegments was one of its design goals, if I remember >>> correctly. >>> >>> >>> +1. It also has a very performant architecture. It is very similar to >>> VW's >>> parcel format which priced to be significantly faster than other formats >>> at >>> PPD. >>> >>> >>> - Bert - >>> >>> >>> >>> >>> >> >> > From marianopeck at gmail.com Mon Sep 19 20:55:22 2016 From: marianopeck at gmail.com (Mariano Martinez Peck) Date: Mon Sep 19 20:55:24 2016 Subject: [squeak-dev] Other serialisation formats -- SIXX serialisation format, JSON, Fuel? In-Reply-To: References: <00A78F34-3E9C-447D-B1BE-B3653B7C19D2@gmail.com> Message-ID: On Mon, Sep 19, 2016 at 5:48 PM, H. Hirzel wrote: > I have started using Fuel and Ma Serializer to store PasteUpMorphs > stored in a project. Actually it is a collection of PastUpMorphs used > as a slide show. I used as well SIXX for some tests. > > It is possible to keep all the serialization packages in the same image. > > Fuel and Ma Serializer work fine so far to save and restore > PasteUpMorphs (with content). > To use SIXX I had to go for a description and then restore from the > description. Interestingly SIXX was about as space efficient as the > other ones if I used compression on the the resulting file. As SISS is > modeled after SIXX the result is probably the same (I did not verify > this). > > For the tests I did so far Ma Serializer was more space efficient. And > the claim is that it spans versions wherase Fuel description > explicitly states that it does not. > > There is a need to agree on some test cases and criteria. > > It is as well worth considering supporting different formats. > > The API to do so is very thin. > > E.g. for the Fuel test to restore the slide collection I just had to do. > > slides := FLMaterializer materializeFromFileNamed: > '/home/user/sq5.1test-Fuel/documentation/Kopie_Lit_01.FL'. > > slides reverseDo: [:s | s openInWorld] > > You can even add the #openInWorld as a post materialization action which is serialized in a header. That way, the #materialize will automatically evaluate your post actions. > --Hannes > > > > On 9/1/16, H. Hirzel wrote: > > To widen the discussion. > > > > I think there was no discussion yet if the serialisation format should > > > > a) be a binary format > > b) a text format > > c) or that we need both. > > > > The prominent use case is saving and loading of projects, see thread > > > > 'Vaidotas, Squeak 5.1 saving of Morphic projects is broken' > > > > and the SISS thread. > > > > Speed of course is an issue. > > But then as well portability between different versions of images. > > > > If the question is put as > > > > Which serialisation format should succeed image segments then then the > > choice is probably limited to > > > > - Fuel > > - Ma Serializer > > > > > > On 8/31/16, Chris Muller wrote: > >> I would, of course, love for Ma Serializer to be considered. Its > >> mature and proven, and has a lot of hooks and I just know the scrutiny > >> and brilliance of this community would benefit it tremendously, and > >> since Magma uses it, would make Magma fundamentally better, too. > >> > >> The Fuel hysteria appears to have already garnered everyone's vote > >> before I saw this thread to get myself on the ballot.. I once took > >> at look at trying to use Fuel for Magma, but its much too limited (and > >> not nearly as much faster than Ma Serializer as reported in the Fuel > >> paper). Its is good for UC1) Save an object and UC2) Load an object, > >> but not much else. :( > >> > >> On Wed, Aug 31, 2016 at 6:40 AM, Eliot Miranda > > >> wrote: > >>> > >>> > >>> On Aug 31, 2016, at 11:14 AM, Bert Freudenberg > >>> wrote: > >>> > >>> On Wednesday, 31 August 2016, H. Hirzel > wrote: > >>>> > >>>> > >>>> We might consider JSON or Fuel might as well options for a format to > >>>> save projects (with ImageMorphs, Browsers, Workspaces, BookMorphs for > >>>> example). > >>> > >>> > >>> If someone wants to take a serious look I'd suggest Fuel. Being a > >>> replacement for ImageSegments was one of its design goals, if I > remember > >>> correctly. > >>> > >>> > >>> +1. It also has a very performant architecture. It is very similar to > >>> VW's > >>> parcel format which priced to be significantly faster than other > formats > >>> at > >>> PPD. > >>> > >>> > >>> - Bert - > >>> > >>> > >>> > >>> > >>> > >> > >> > > > > -- Mariano http://marianopeck.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160919/37dbae32/attachment.htm From dram.wang at gmail.com Tue Sep 20 01:27:14 2016 From: dram.wang at gmail.com (Xin Wang) Date: Tue Sep 20 01:27:16 2016 Subject: [squeak-dev] Change line ending style in TextEditor? Message-ID: Hi all, Is there any way to change default line ending in TextEditor? Currently it defaults to CR, which will mess up files in UNIX line ending style. Thanks, Xin Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160920/2601e2bb/attachment.htm From tim at rowledge.org Tue Sep 20 04:26:34 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Sep 20 04:26:35 2016 Subject: [squeak-dev] Change line ending style in TextEditor? In-Reply-To: References: Message-ID: <7F420019-A1B3-45E5-A628-520437B3FAD1@rowledge.org> > On 19-09-2016, at 6:27 PM, Xin Wang wrote: > > Hi all, > > > Is there any way to change default line ending in TextEditor? Currently it defaults to CR, which will mess up files in UNIX line ending style. Using LF instead of CR is an abomination unto Nuggan and shall be punished! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Liability: a valuable political skill From dram.wang at gmail.com Tue Sep 20 04:51:16 2016 From: dram.wang at gmail.com (Xin Wang) Date: Tue Sep 20 04:51:19 2016 Subject: [squeak-dev] Change line ending style in TextEditor? In-Reply-To: <7F420019-A1B3-45E5-A628-520437B3FAD1@rowledge.org> References: <7F420019-A1B3-45E5-A628-520437B3FAD1@rowledge.org> Message-ID: 2016-09-20 12:26 GMT+08:00 tim Rowledge : > > > On 19-09-2016, at 6:27 PM, Xin Wang wrote: > > > > Hi all, > > > > > > Is there any way to change default line ending in TextEditor? Currently > it defaults to CR, which will mess up files in UNIX line ending style. > > Using LF instead of CR is an abomination unto Nuggan and shall be punished! > > Could you elaborate? > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Liability: a valuable political skill > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160920/1978840e/attachment.htm From commits at source.squeak.org Tue Sep 20 08:41:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 08:41:54 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.235.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.235.mcz ==================== Summary ==================== Name: EToys-tfel.235 Author: tfel Time: 20 September 2016, 10:40:06.499404 am UUID: 4c293f06-9bcb-5348-844b-76cc91922065 Ancestors: EToys-bf.234 - begin removal of old Kedama classes, to eventually replace everything with Kedama2 - move SugarLauncher code that needs Dbus into SugarDBus package - remove unused BooleanPreferenceView and HaloThemePrefernceView classes - remove unused MorphicGamesInfo class - remove old Utilities methods that got moved into McmUpdater and re-added by the merge heuristic =============== Diff against EToys-bf.234 =============== Item was removed: - PreferenceView subclass: #BooleanPreferenceView - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-Squeakland-System-Support'! - - !BooleanPreferenceView commentStamp: '' prior: 0! - I am responsible for building the visual representation of a preference that accepts true and false values! Item was removed: - ----- Method: BooleanPreferenceView class>>handlesPanel: (in category 'view registry') ----- - handlesPanel: aPreferencePanel - ^aPreferencePanel isKindOf: PreferencesPanel! Item was removed: - ----- Method: BooleanPreferenceView class>>initialize (in category 'class initialization') ----- - initialize - PreferenceViewRegistry ofBooleanPreferences register: self.! Item was removed: - ----- Method: BooleanPreferenceView class>>unload (in category 'class initialization') ----- - unload - PreferenceViewRegistry ofBooleanPreferences unregister: self.! Item was removed: - ----- Method: BooleanPreferenceView>>offerPersistenceMenu (in category 'user interface') ----- - offerPersistenceMenu - | aMenu | - Preferences ensurePersistedPreferencesAccessible - ifFalse: [^self]. - aMenu := MenuMorph new defaultTarget: self preference. - aMenu addTitle: self preference name. - aMenu addUpdating: #isEnabledOnStartupString target: self preference selector: #persistValue: argumentList: {true}. - aMenu addUpdating: #isDisabledOnStartupString target: self preference selector: #persistValue: argumentList: {false}. - aMenu addUpdating: #isNotSetOnStartupString target: self preference selector: #persistValue: argumentList: {nil}. - aMenu popUpInWorld! Item was removed: - ----- Method: BooleanPreferenceView>>offerPreferenceNameMenu:with:in: (in category 'user interface') ----- - offerPreferenceNameMenu: aPanel with: ignored1 in: ignored2 - "the user clicked on a preference name -- put up a menu" - - | aMenu | - ActiveHand showTemporaryCursor: nil. - aMenu := MenuMorph new defaultTarget: self preference. - aMenu addTitle: self preference name. - - (Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue: - [aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness. - aMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project' translated]. - - aMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllCallsOn: argument: self preference name. - aMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "' translated, self preference name, '".'. - aMenu add: 'show category...' translated target: aPanel selector: #findCategoryFromPreference: argument: self preference name. - aMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.' translated. - - Smalltalk isMorphic ifTrue: - [aMenu add: 'hand me a button for this preference' translated target: self selector: #tearOffButton. - aMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish' translated]. - - aMenu add: 'copy this name to clipboard' translated target: self preference selector: #copyName. - aMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere' translated. - aMenu add: 'set automatically on startup...' translated target: self selector: #offerPersistenceMenu. - aMenu balloonTextForLastItem: 'Store a value for this preference on file. On startup, it will be automatically restored.' translated. - - aMenu popUpInWorld! Item was removed: - ----- Method: BooleanPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- - representativeButtonWithColor: aColor inPanel: aPreferencesPanel - "Return a button that controls the setting of prefSymbol. It will keep up to date even if the preference value is changed in a different place" - - | outerButton aButton str miniWrapper | - - outerButton := AlignmentMorph newRow height: 24. - outerButton color: (aColor ifNil: [Color r: 0.645 g: 1.0 b: 1.0]). - outerButton hResizing: (aPreferencesPanel ifNil: [#shrinkWrap] ifNotNil: [#spaceFill]). - outerButton vResizing: #shrinkWrap. - outerButton addMorph: (aButton := UpdatingThreePhaseButtonMorph checkBox). - aButton - target: self preference; - actionSelector: #togglePreferenceValue; - getSelector: #preferenceValue. - - outerButton addTransparentSpacerOfSize: (2 @ 0). - str := StringMorph contents: self preference name font: Preferences standardButtonFont. - - self preference localToProject ifTrue: - [str emphasis: 1]. - - miniWrapper := AlignmentMorph newRow hResizing: #shrinkWrap; vResizing: #shrinkWrap. - miniWrapper layoutInset: 0. - miniWrapper beTransparent addMorphBack: str lock. - aPreferencesPanel - ifNotNil: "We're in a Preferences panel" - [miniWrapper on: #mouseDown send: #offerPreferenceNameMenu:with:in: to: self withValue: aPreferencesPanel. - miniWrapper on: #mouseEnter send: #menuButtonMouseEnter: to: miniWrapper. - miniWrapper on: #mouseLeave send: #menuButtonMouseLeave: to: miniWrapper. - miniWrapper setBalloonText: 'Click here for a menu of options regarding this preference. Click on the checkbox to the left to toggle the setting of this preference' translated] - - ifNil: "We're a naked button, not in a panel" - [miniWrapper setBalloonText: self preference helpString translated; setProperty: #balloonTarget toValue: aButton]. - - outerButton addMorphBack: miniWrapper. - outerButton setNameTo: self preference name. - - aButton setBalloonText: self preference helpString. - - ^ outerButton - ! Item was removed: - PreferenceView subclass: #HaloThemePreferenceView - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-Squeakland-System-Support'! - - !HaloThemePreferenceView commentStamp: '' prior: 0! - I am responsible for building the view for the preference that choose the halo theme! Item was removed: - ----- Method: HaloThemePreferenceView class>>handlesPanel: (in category 'view registry') ----- - handlesPanel: aPreferencePanel - ^aPreferencePanel isKindOf: PreferencesPanel! Item was removed: - ----- Method: HaloThemePreferenceView class>>initialize (in category 'class initialization') ----- - initialize - "adding the halo theme preference to Preferences and registering myself as its view" - PreferenceViewRegistry ofHaloThemePreferences register: self. - Preferences - addPreference: #haloTheme - categories: {#halos} - default: #iconicHaloSpecifications - balloonHelp: '' - projectLocal: false - changeInformee: nil - changeSelector: nil - viewRegistry: PreferenceViewRegistry ofHaloThemePreferences.! Item was removed: - ----- Method: HaloThemePreferenceView class>>unload (in category 'class initialization') ----- - unload - PreferenceViewRegistry ofHaloThemePreferences unregister: self.! Item was removed: - ----- Method: HaloThemePreferenceView>>haloThemeRadioButtons (in category 'user interface') ----- - haloThemeRadioButtons - "Answer a column of butons representing the choices of halo theme" - - | buttonColumn aRow aRadioButton aStringMorph | - buttonColumn := AlignmentMorph newColumn beTransparent. - #('iconic' 'classic' 'simple' 'custom') translatedNoop. - #( (iconicHaloSpecifications iconic iconicHalosInForce 'circular halos with icons inside') - (classicHaloSpecs classic classicHalosInForce 'plain circular halos') - (simpleFullHaloSpecifications simple simpleHalosInForce 'fewer, larger halos') - (customHaloSpecs custom customHalosInForce 'customizable halos')) translatedNoop do: - - [:quad | - aRow := AlignmentMorph newRow beTransparent. - aRow addMorph: (aRadioButton := UpdatingThreePhaseButtonMorph radioButton). - aRadioButton target: Preferences. - aRadioButton setBalloonText: quad fourth translated. - aRadioButton actionSelector: #installHaloTheme:. - aRadioButton getSelector: quad third. - aRadioButton arguments: (Array with: quad first). - aRow addTransparentSpacerOfSize: (4 @ 0). - aRow addMorphBack: (aStringMorph := StringMorph contents: quad second asString translated). - aStringMorph setBalloonText: quad fourth translated. - buttonColumn addMorphBack: aRow]. - ^ buttonColumn - - "(Preferences preferenceAt: #haloTheme) view tearOffButton"! Item was removed: - ----- Method: HaloThemePreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- - representativeButtonWithColor: aColor inPanel: aPreferencesPanel - | outerButton editButton | - editButton := SimpleButtonMorph new - target: Preferences; - color: Color transparent; - actionSelector: #editCustomHalos; - label: 'Edit custom halos' translated; - setBalloonText: 'Click here to edit the method that defines the custom halos' translated. - - outerButton := AlignmentMorph newColumn. - outerButton - color: (aColor ifNil: [Color r: 0.645 g: 1.0 b: 1.0]); - hResizing: (aPreferencesPanel ifNil: [#shrinkWrap] ifNotNil: [#spaceFill]); - vResizing: #shrinkWrap; - addTransparentSpacerOfSize: (0@4); - addMorphBack: self haloThemeRadioButtons; - addTransparentSpacerOfSize: (0@4); - addMorphBack: editButton. - - ^outerButton. - - "(Preferences preferenceAt: #haloTheme) view tearOffButton" ! Item was removed: - ----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain (in category 'debug support') ----- - copyAllMethodsAgain - - | c result | - c := turtles class. - result := (ClassBuilder new) - name: c name - inEnvironment: c environment - subclassOf: c superclass - type: c typeOfClass - instanceVariableNames: KedamaTurtleVectorPlayer instanceVariablesString - classVariableNames: KedamaTurtleVectorPlayer classVariablesString - poolDictionaries: KedamaTurtleVectorPlayer sharedPoolsString - category: c category. - turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer. - sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub]. - ! Item was removed: - ----- Method: KedamaExamplerPlayer>>createTurtles (in category 'subclass players management') ----- - createTurtles - - turtles := self class createTurtleSubclass new. - turtles kedamaWorld: kedamaWorld. - turtles exampler: self. - ^ turtles. - ! Item was added: + ----- Method: KedamaSequenceExecutionStub class>>isSystemDefined (in category 'as yet unclassified') ----- + isSystemDefined + ^ name endsWithDigit not! Item was added: + ----- Method: KedamaSequenceExecutionStub class>>isUniClass (in category 'as yet unclassified') ----- + isUniClass + + ^ self ~~ self officialClass! Item was removed: - ----- Method: KedamaTurtleMorph class>>copyAllMethodsAgain (in category 'scripting') ----- - copyAllMethodsAgain - " - KedamaTurtleMorph copyAllMethodsAgain. - " - KedamaTurtleMorph allInstancesDo: [:e | e player ifNotNil: [e player copyAllMethodsAgain]]. - ! Item was removed: - KedamaExamplerPlayer subclass: #KedamaTurtleVectorPlayer - instanceVariableNames: 'exampler info types arrays deletingIndex whoTable whoTableBase whoTableValid turtlesMap turtleMapValid lastWho lastWhoStub' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-StarSqueak'! Item was removed: - ----- Method: KedamaTurtleVectorPlayer class>>officialClass (in category 'all') ----- - officialClass - - ^ KedamaTurtleVectorPlayer - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>aTurtleAtX:y: (in category 'turtle map') ----- - aTurtleAtX: xPos y: yPos - - | w x y index who stub | - turtleMapValid ifFalse: [ - self makeTurtlesMap. - ]. - - w := kedamaWorld dimensions x. - x := xPos truncated. - y := yPos truncated. - x < 0 ifTrue: [^ nil]. - x >= w ifTrue: [^ nil]. - y < 0 ifTrue: [^ nil]. - y >= kedamaWorld dimensions y ifTrue: [^ nil]. - index := (w * y) + x + 1. - who := turtlesMap at: index. - who = 0 ifTrue: [^ nil]. - who = lastWho ifTrue: [^ lastWhoStub]. - stub := exampler clonedSequentialStub. - stub who: who. - lastWho := who. - ^ lastWhoStub := stub. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>addInstanceVarNamed:withValue: (in category 'player protocol') ----- - addInstanceVarNamed: aName withValue: aValue - - | newArray | - (aValue isKindOf: Number) ifTrue: [ - newArray := KedamaFloatArray new: self size. - ]. - (aValue isKindOf: Color) ifTrue: [ - newArray := WordArray new: self size. - ]. - (aValue isKindOf: Player) ifTrue: [ - newArray := Array new: self size. - ]. - - arrays := arrays, newArray. - info at: aName asSymbol put: arrays size. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>addInstanceVarVectorNamed:withValue: (in category 'player protocol') ----- - addInstanceVarVectorNamed: aName withValue: aValue - - | newArray | - newArray := KedamaFloatArray new: self size. - arrays := arrays, (Array with: newArray). - newArray atAllPut: aValue. - info at: aName asSymbol put: arrays size. - types at: arrays size put: #Number. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>addTurtlesCount:ofPrototype:for:positionAndColorArray: (in category 'add turtles') ----- - addTurtlesCount: count ofPrototype: prototype for: aKedamaWorld positionAndColorArray: positionAndColorArray - - | oldCount | - oldCount := self size. - info associationsDo: [:assoc | | defaultValue index newArray array | - index := info at: assoc key. - array := arrays at: (info at: assoc key). - defaultValue := prototype at: index. - newArray := array class new: count. - (#(who x y heading color normal) includes: assoc key) ifFalse: [ - newArray atAllPut: defaultValue. - ]. - assoc key = #x ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray first startingAt: 1]. - assoc key = #y ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray second startingAt: 1]. - assoc key = #color ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray third startingAt: 1]. - assoc key = #heading ifTrue: [newArray atAllPut: 1.57079631 "Float pi / 2.0"]. - assoc key = #normal ifTrue: [newArray atAllPut: 1.57079631 "Float pi / 2.0"]. - - arrays at: (assoc value) put: array, newArray. - ]. - - #(who) do: [:name | - self setInitialValueOf: name from: oldCount + 1 to: self size for: aKedamaWorld. - ]. - whoTableValid := false. - turtleMapValid := false. - - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>addTurtlesCount:ofPrototype:for:randomize: (in category 'add turtles') ----- - addTurtlesCount: count ofPrototype: prototype for: aKedamaWorld randomize: randomizeFlag - - | oldCount | - oldCount := self size. - info associationsDo: [:assoc | | array defaultValue newArray index | - index := info at: assoc key. - array := arrays at: index. - defaultValue := prototype at: index. - newArray := array class new: count. - newArray atAllPut: defaultValue. - arrays at: index put: (array, newArray). - ]. - - self setInitialValueOf: #who from: oldCount + 1 to: self size for: aKedamaWorld. - - randomizeFlag ifTrue: [ - #(x y heading) do: [:name | - self setInitialValueOf: name from: oldCount + 1 to: self size for: aKedamaWorld. - ]. - ]. - whoTableValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>arrayForType: (in category 'private') ----- - arrayForType: typeName - - | newArray | - (typeName = #Number) ifTrue: [ - newArray := KedamaFloatArray new: self size. - ]. - (typeName = #Color) ifTrue: [ - newArray := WordArray new: self size. - ]. - (typeName = #Boolean) ifTrue: [ - newArray := ByteArray new: self size. - ]. - - newArray ifNil: [ - newArray := Array new: self size. - ]. - - ^ newArray. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>arrays (in category 'accessing') ----- - arrays - - ^ arrays. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>basicGetAngleTo: (in category 'player commands') ----- - basicGetAngleTo: players - - | ret p xArray yArray result | - players isCollection ifFalse: [ - p := players - ]. - xArray := arrays at: 2. - yArray := arrays at: 3. - result := KedamaFloatArray new: self size. - 1 to: self size do: [:index | - players isCollection ifTrue: [ - p := players at: index. - ]. - ret := ((p getX - (xArray at: index))@(p getY - (yArray at: index))) theta radiansToDegrees + 90.0. - ret > 360.0 ifTrue: [ret := ret - 360.0]. - result at: index put: ret. - ]. - ^ result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>basicGetDistanceTo: (in category 'player commands') ----- - basicGetDistanceTo: players - - | p xArray yArray result | - players isCollection ifFalse: [ - p := players - ]. - xArray := arrays at: 2. - yArray := arrays at: 3. - result := KedamaFloatArray new: self size. - 1 to: self size do: [:index | - players isCollection ifTrue: [ - p := players at: index. - ]. - result at: index put: ((p getX - (xArray at: index)) squared + (p getY - (yArray at: index)) squared) sqrt. - - ]. - ^ result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>basicMakeTurtlesMap (in category 'turtle map') ----- - basicMakeTurtlesMap - - | x y xArray yArray width height mapIndex whoArray | - xArray := arrays at: 2. - yArray := arrays at: 3. - whoArray := arrays at: 1. - width := kedamaWorld dimensions x. - height := kedamaWorld dimensions y. - turtlesMap atAllPut: 0. - - 1 to: self size do: [:index | - x := (xArray at: index) truncated. - y := (yArray at: index) truncated. - mapIndex := (width * y) + x + 1. - (0 < mapIndex and: [mapIndex <= turtlesMap size]) ifTrue: [ - turtlesMap at: mapIndex put: (whoArray at: index). - ]. - ]. - - turtleMapValid := true. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>color: (in category 'player commands') ----- - color: c - - c isColor ifTrue: [ - self setColorVarAt: 5 put: ((c pixelValueForDepth: 32) bitAnd: 16rFFFFFF). - ] ifFalse: [ - self setColorVarAt: 5 put: c. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>colorFromPatch: (in category 'player commands') ----- - colorFromPatch: aPatch - - | xArray yArray cArray patch | - xArray := arrays at: 2. - yArray := arrays at: 3. - cArray := arrays at: 5. - patch := aPatch costume renderedMorph. - 1 to: self size do: [:i | - cArray at: i put: ((patch pixelAtX: (xArray at: i) y: (yArray at: i)) bitAnd: 16rFFFFFF). - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>colorToPatch: (in category 'player commands') ----- - colorToPatch: aPatch - - | xArray yArray cArray patch | - xArray := arrays at: 2. - yArray := arrays at: 3. - cArray := arrays at: 5. - patch := aPatch costume renderedMorph. - 1 to: self size do: [:i | - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: (cArray at: i). - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>compileAllAccessors (in category 'player protocol') ----- - compileAllAccessors - - info keys do: [:k | - (#(who x y heading color visible) includes: k) ifFalse: [ - self compileVectorInstVarAccessorsFor: k. - ]. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>compileVectorInstVarAccessorsFor: (in category 'player protocol') ----- - compileVectorInstVarAccessorsFor: varName - - | nameString index type setPhrase | - nameString := varName asString capitalized. - index := info at: varName asSymbol. - self class compileSilently: ('get', nameString, ' - ^ ', '(arrays at: ', index printString, ')') - classified: 'access'. - - type := types at: index. - type = #Number ifTrue: [ - setPhrase := 'setNumberVarAt:'. - ]. - type = #Boolean ifTrue: [ - setPhrase := 'setBooleanVarAt:'. - ]. - type = #Color ifTrue: [ - setPhrase := 'setColorVarAt:'. - ]. - setPhrase ifNil: [setPhrase := 'setObjectVarAt:']. - - self class compileSilently: ('set', nameString, ': xxxArg - self ', setPhrase, index printString, ' put: xxxArg') - classified: 'access'! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>delete (in category 'deleting') ----- - delete - - exampler := nil. - arrays := nil. - whoTable := nil. - turtlesMap := nil. - self class removeFromSystem: false. - self becomeForward: UnscriptedPlayer new - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>deleteTurtleID: (in category 'player commands') ----- - deleteTurtleID: who - - | whoArray whoIndex | - whoArray := arrays at: 1. - whoIndex := whoArray indexOf: who ifAbsent: [^ self]. - deletingIndex := whoIndex - 1. - arrays withIndexDo: [:array :index | | newArray | - newArray := (array copyFrom: 1 to: whoIndex - 1), (array copyFrom: whoIndex + 1 to: array size). - arrays at: index put: newArray. - ]. - whoTableValid := false. - turtleMapValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>doCommand: (in category 'command execution') ----- - doCommand: aBlock - - ^ aBlock value: self. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>doDieCommand: (in category 'command execution') ----- - doDieCommand: aBlock - - ^ exampler doDieCommand: aBlock. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>doExamplerCommand: (in category 'command execution') ----- - doExamplerCommand: aBlock - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>doSequentialCommand: (in category 'command execution') ----- - doSequentialCommand: aBlock - - ^ exampler doSequentialCommand: aBlock. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>drawOn: (in category 'displaying') ----- - drawOn: aForm - - | xArray yArray colorArray visibleArray bits x y visible bitsIndex dimX dimY ret | - xArray := arrays at: 2. - yArray := arrays at: 3. - colorArray := arrays at: 5. - visibleArray := arrays at: 6. - bits := aForm bits. - dimX := aForm width. - dimY := aForm height. - - ret := self primDrawOn: bits destWidth: dimX destHeight: dimY xArray: xArray yArray: yArray colorArray: colorArray visibleArray: visibleArray. - ret ifNotNil: [^ self]. - - 1 to: self size do: [:index | - x := (xArray at: index) truncated. - y := (yArray at: index) truncated. - visible := (visibleArray at: index) ~= 0. - (visible and: [((x >= 0) and: [y >= 0]) and: [(x < dimX) and: [y < dimY]]]) ifTrue: [ - bitsIndex := ((y * dimX) + x) + 1. - bits at: bitsIndex put: (colorArray at: index). - ]. - ]. - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>exampler: (in category 'accessing') ----- - exampler: e - - exampler := e. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>forward: (in category 'player commands') ----- - forward: val - - exampler getGrouped ifFalse: [ - self primForwardXArray: (arrays at: 2) yArray: (arrays at: 3) headingArray: (arrays at: 4) value: (val isNumber ifTrue: [val asFloat] ifFalse: [val]) destWidth: kedamaWorld wrapX asFloat destHeight: kedamaWorld wrapY asFloat leftEdgeMode: kedamaWorld leftEdgeModeMnemonic rightEdgeMode: kedamaWorld rightEdgeModeMnemonic topEdgeMode: kedamaWorld topEdgeModeMnemonic bottomEdgeMode: kedamaWorld bottomEdgeModeMnemonic. - ] ifTrue: [ - self groupForward: val - ]. - turtleMapValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getAngleTo: (in category 'player commands') ----- - getAngleTo: players - - | p xArray yArray result pX pY xy | - players isCollection ifFalse: [ - p := players - ]. - xArray := arrays at: 2. - yArray := arrays at: 3. - result := KedamaFloatArray new: self size. - players isCollection ifTrue: [ - pX := KedamaFloatArray new: players size. - pY := KedamaFloatArray new: players size. - 1 to: players size do: [:i | - xy := (players at: i) getXAndY. - pX at: i put: xy x. - pY at: i put: xy y. - ]. - ] ifFalse: [ - xy := p getXAndY. - pX := xy x. - pY := xy y. - ]. - ^ self primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getBlueComponentIn: (in category 'player commands') ----- - getBlueComponentIn: aPatch - - | pix xArray yArray patch w | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - w := WordArray new: self size. - 1 to: self size do: [:i | - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - w at: i put: (pix bitAnd: 16rFF). - ]. - ^ w. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getBooleanVarAt: (in category 'accessing - private') ----- - getBooleanVarAt: index - - ^ arrays at: index. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getColor (in category 'player commands') ----- - getColor - - ^ self getVarAt: 5. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getColorVarAt: (in category 'accessing - private') ----- - getColorVarAt: index - - ^ (arrays at: index) collect: [:c | Color colorFromPixelValue: c depth: 32]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getDistanceTo: (in category 'player commands') ----- - getDistanceTo: players - - | p xArray yArray result pX pY xy | - players isCollection ifFalse: [ - p := players - ]. - xArray := arrays at: 2. - yArray := arrays at: 3. - result := KedamaFloatArray new: self size. - players isCollection ifTrue: [ - pX := KedamaFloatArray new: players size. - pY := KedamaFloatArray new: players size. - 1 to: players size do: [:i | - xy := (players at: i) getXAndY. - pX at: i put: xy x. - pY at: i put: xy y. - ]. - ] ifFalse: [ - xy := p getXAndY. - pX := xy x. - pY := xy y. - ]. - ^ self primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getGreenComponentIn: (in category 'player commands') ----- - getGreenComponentIn: aPatch - - | pix xArray yArray patch w | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - w := WordArray new: self size. - 1 to: self size do: [:i | - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - w at: i put: ((pix bitShift: -8) bitAnd: 16rFF). - ]. - ^ w. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getGrouped (in category 'player commands') ----- - getGrouped - - ^ exampler getGrouped. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getHeading (in category 'player commands') ----- - getHeading - - | heading result ret | - heading := (arrays at: 4). - result := KedamaFloatArray new: heading size. - ret := self primGetHeading: heading into: result. - ret ifNotNil: [^ result]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getNormal (in category 'player commands') ----- - getNormal - - | result ret normal | - normal := (arrays at: 7). - result := KedamaFloatArray new: normal size. - ret := self primGetHeading: normal into: result. - ret ifNotNil: [^ result]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getPatchValueIn: (in category 'player commands') ----- - getPatchValueIn: aPatch - - | w patch xArray yArray | - w := WordArray new: self size. - patch := aPatch costume renderedMorph. - xArray := arrays at: 2. - yArray := arrays at: 3. - patch pixelsAtXArray: xArray yArray: yArray into: w. - ^ w. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getRedComponentIn: (in category 'player commands') ----- - getRedComponentIn: aPatch - - | pix xArray yArray patch w | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - w := WordArray new: self size. - 1 to: self size do: [:i | - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - w at: i put: ((pix bitShift: -16) bitAnd: 16rFF). - ]. - ^ w. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getTurtleAt: (in category 'player commands') ----- - getTurtleAt: aPlayer - - | xy | - aPlayer isCollection ifTrue: [ - self error: 'should not happen'. - ]. - xy := aPlayer getXAndY. - ^ (self aTurtleAtX: xy x y: xy y) ifNil: [^ aPlayer]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getTurtleOf: (in category 'player commands') ----- - getTurtleOf: aBreedPlayer - - | xy | - aBreedPlayer isCollection ifTrue: [ - "self error: 'should not happen'." - ^ aBreedPlayer. - ]. - xy := aBreedPlayer getXAndY. - ^ (self aTurtleAtX: xy x y: xy y) ifNil: [^ aBreedPlayer]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getTurtleVisible (in category 'player commands') ----- - getTurtleVisible - - ^ (turtles arrays at: 6) collect: [:t | t = 1]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getUphillIn: (in category 'player commands') ----- - getUphillIn: aPatch - - | xArray yArray headingArray result patch | - xArray := arrays at: 2. - yArray := arrays at: 3. - headingArray := arrays at: 4. - result := KedamaFloatArray new: self size. - patch := aPatch costume renderedMorph. - 1 to: self size do: [:index | - result at: index put: (patch - uphillForTurtleX: (xArray at: index) - turtleY: (yArray at: index) - turtleHeading: (headingArray at: index)). - ]. - ^ result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getVarAt: (in category 'accessing - private') ----- - getVarAt: index - - ^ arrays at: index. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getX (in category 'player commands') ----- - getX - - | xArray | - exampler getGrouped ifFalse: [ - ^ arrays at: 2. - ] ifTrue: [ - xArray := arrays at: 2. - xArray size = 0 ifTrue: [^ exampler getX]. - ^ xArray first. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>getY (in category 'player commands') ----- - getY - - | yArray | - exampler getGrouped ifFalse: [ - ^ arrays at: 3. - ] ifTrue: [ - yArray := arrays at: 3. - yArray size = 0 ifTrue: [^ exampler getY]. - ^ yArray first. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>groupForward: (in category 'private') ----- - groupForward: dist - - | x y headingRadians | - self size = 0 ifTrue: [^ self]. - - x := (arrays at: 2) first. - y := (arrays at: 3) first. - headingRadians := (arrays at: 4) first. - self groupSetX: (x + (dist asFloat * headingRadians cos)). - self groupSetY: (y - (dist asFloat * headingRadians sin)). - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>groupSetX: (in category 'private') ----- - groupSetX: val - - | xArray headingArray origX origHeading leftEdgeMode rightEdgeMode newArray wrapX minX maxX | - self size = 0 ifTrue: [^ self]. - xArray := arrays at: 2. - headingArray := arrays at: 4. - - origX := xArray first. - origHeading := headingArray first. - - leftEdgeMode := kedamaWorld leftEdgeModeMnemonic. - rightEdgeMode := kedamaWorld rightEdgeModeMnemonic. - - newArray := xArray collect: [:e | e + val - origX]. - wrapX := kedamaWorld wrapX. - minX := newArray min. - maxX := newArray max. - ((minX < 0.0) not and: [(maxX >= wrapX) not]) ifTrue: [ - arrays at: 2 put: newArray. - ^ self. - ]. - - minX < 0.0 ifTrue: [ - leftEdgeMode = 1 ifTrue: [ - newArray withIndexDo: [:e :i | - e < 0.0 ifTrue: [newArray at: i put: e + wrapX]. - ]. - ]. - leftEdgeMode = 2 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - minX. - ]. - ]. - leftEdgeMode = 3 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e + (minX * -2.0). - ]. - ]. - ]. - - maxX >= wrapX ifTrue: [ - rightEdgeMode = 1 ifTrue: [ - newArray withIndexDo: [:e :i | - e >= wrapX ifTrue: [newArray at: i put: e - wrapX]. - ]. - ]. - rightEdgeMode = 2 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - (maxX - wrapX) - 2.35099e-038. - ]. - ]. - rightEdgeMode = 3 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - ((maxX - wrapX) * 2.0) - 2.35099e-038. - ]. - ]. - ]. - - arrays at: 2 put: newArray. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>groupSetY: (in category 'private') ----- - groupSetY: val - - | yArray headingArray origY origHeading topEdgeMode bottomEdgeMode newArray wrapY minY maxY | - self size = 0 ifTrue: [^ self]. - yArray := arrays at: 3. - headingArray := arrays at: 4. - - origY := yArray first. - origHeading := headingArray first. - - topEdgeMode := kedamaWorld topEdgeModeMnemonic. - bottomEdgeMode := kedamaWorld bottomEdgeModeMnemonic. - - newArray := yArray collect: [:e | e + val - origY]. - wrapY := kedamaWorld wrapY. - minY := newArray min. - maxY := newArray max. - ((minY < 0.0) not and: [(maxY >= wrapY) not]) ifTrue: [ - arrays at: 3 put: newArray. - ^ self. - ]. - - minY < 0.0 ifTrue: [ - topEdgeMode = 1 ifTrue: [ - newArray withIndexDo: [:e :i | - e < 0.0 ifTrue: [newArray at: i put: e + wrapY]. - ]. - ]. - topEdgeMode = 2 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - minY. - ]. - ]. - topEdgeMode = 3 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e + (minY * -2.0). - ]. - ]. - ]. - - maxY >= wrapY ifTrue: [ - bottomEdgeMode = 1 ifTrue: [ - newArray withIndexDo: [:e :i | - e >= wrapY ifTrue: [newArray at: i put: e - wrapY]. - ]. - ]. - bottomEdgeMode = 2 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - (maxY - wrapY) - 2.35099e-038. - ]. - ]. - bottomEdgeMode = 3 ifTrue: [ - newArray withIndexDo: [:e :i | - newArray at: i put: e - ((maxY - wrapY) * 2.0) - 2.35099e-038. - ]. - ]. - ]. - - arrays at: 3 put: newArray. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>heading (in category 'player commands') ----- - heading - - ^ self getHeading. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>heading: (in category 'player commands') ----- - heading: degrees - - | deg | - deg := degrees isNumber ifTrue: [degrees asFloat] ifFalse: [degrees]. - self primSetHeading: (arrays at: 4) from: deg. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>hide (in category 'player commands') ----- - hide - - (arrays at: 6) atAllPut: 0. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>indexOf: (in category 'enumeration') ----- - indexOf: who - - | whoArray | - whoTableValid ifTrue: [^ whoTable at: (who - whoTableBase)]. - - whoArray := arrays at: 1. - - whoArray size = 0 ifTrue: [^ 0]. - - whoTableBase := whoArray first - 1. - whoTable := WordArray new: whoArray last - whoTableBase. - 1 to: whoArray size do: [:w | - whoTable at: (whoArray at: w) - whoTableBase put: w. - ]. - whoTableValid := true. - - ^ whoTable at: (who - whoTableBase). - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>info (in category 'accessing') ----- - info - - ^ info. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>initialize (in category 'initialization') ----- - initialize - - super initialize. - info := IdentityDictionary new. - info at: #who put: 1. - info at: #x put: 2. - info at: #y put: 3. - info at: #heading put: 4. - info at: #color put: 5. - info at: #visible put: 6. - info at: #normal put: 7. - - arrays := Array new: 7. - arrays at: (info at: #who) put: (WordArray new: 0). - arrays at: (info at: #x) put: (KedamaFloatArray new: 0). - arrays at: (info at: #y) put: (KedamaFloatArray new: 0). - arrays at: (info at: #heading) put: (KedamaFloatArray new: 0). - arrays at: (info at: #color) put: (WordArray new: 0). - arrays at: (info at: #visible) put: (ByteArray new: 0). - arrays at: (info at: #normal) put: (KedamaFloatArray new: 0). - - types := Array new: 64. - - types at: 1 put: #Integer. - types at: 2 put: #Number. - types at: 3 put: #Number. - types at: 4 put: #Number. - types at: 5 put: #Color. - types at: 6 put: #Boolean. - types at: 7 put: #Number. - - whoTableValid := false. - turtleMapValid := false. - - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>initializeDeletingIndex (in category 'enumeration') ----- - initializeDeletingIndex - - deletingIndex := 0. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>instSize (in category 'accessing') ----- - instSize - - ^ arrays size. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>invalidateTurtleMap (in category 'turtle map') ----- - invalidateTurtleMap - - turtleMapValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>makePrototypeFromFirstInstance (in category 'add turtles') ----- - makePrototypeFromFirstInstance - - ^ (1 to: arrays size) collect: [:index | - (arrays at: index) first - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>makeTurtlesMap (in category 'turtle map') ----- - makeTurtlesMap - - | xArray yArray width height whoArray ret | - xArray := arrays at: 2. - yArray := arrays at: 3. - whoArray := arrays at: 1. - width := kedamaWorld dimensions x. - height := kedamaWorld dimensions y. - turtlesMap ifNil: [turtlesMap := WordArray new: width * height]. - - ret := self primMakeTurtlesMap: turtlesMap whoArray: whoArray xArray: xArray yArray: yArray width: width height: height. - - ret ifNil: [self basicMakeTurtlesMap]. - - turtleMapValid := true. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>nextDeletingIndex (in category 'enumeration') ----- - nextDeletingIndex - - ^ deletingIndex := deletingIndex + 1. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>normal: (in category 'player commands') ----- - normal: degrees - - | deg | - deg := degrees isNumber ifTrue: [degrees asFloat] ifFalse: [degrees]. - self primSetHeading: (arrays at: 7) from: deg. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>noteRenameOf:to:inPlayer: (in category 'player protocol') ----- - noteRenameOf: oldSlotName to: newSlotName inPlayer: aPlayer - - self compileAllAccessors - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primDrawOn:destWidth:destHeight:xArray:yArray:colorArray:visibleArray: (in category 'primitives') ----- - primDrawOn: destBits destWidth: destWidth destHeight: destHeight xArray: xArray yArray: yArray colorArray: colorArray visibleArray: visibleArray - - | x y visible bitsIndex | - - "^ KedamaPlugin doPrimitive: #drawTurtlesInArray." - - 1 to: xArray size do: [:i | - x := (xArray at: i) asInteger. - y := (yArray at: i) asInteger. - visible := (visibleArray at: i). - (visible ~= 0 and: [((x >= 0) and: [y >= 0]) and: [(x < destWidth) and: [y < destHeight]]]) ifTrue: [ - bitsIndex := ((y * destWidth) + x) + 1. - destBits at: bitsIndex put: (colorArray at: i). - ] - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primForwardXArray:yArray:headingArray:value:destWidth:destHeight:leftEdgeMode:rightEdgeMode:topEdgeMode:bottomEdgeMode: (in category 'primitives') ----- - primForwardXArray: xArray yArray: yArray headingArray: headingArray value: v destWidth: destWidth destHeight: destHeight leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode - - | dist newX newY | - - "^ KedamaPlugin doPrimitive: #primTurtlesForward." - - 1 to: xArray size do: [:i | - v isCollection ifTrue: [ - dist := (v at: i) asFloat. - ] ifFalse: [ - dist := v asFloat. - ]. - newX := (xArray at: i) + (dist * (headingArray at: i) cos). - newY := (yArray at: i) - (dist * (headingArray at: i) sin). - KedamaMorph scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode. - KedamaMorph scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primGetAngleToX:toY:xArray:yArray:resultInto: (in category 'primitives') ----- - primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result - - | ppx ppy x y ret | - - "^ KedamaPlugin doPrimitive: #vectorGetAngleTo." - - ppx := pX. - ppy := pY. - 1 to: result size do: [:index | - pX isCollection ifTrue: [ - ppx := pX at: index. - ppy := pY at: index. - ]. - x := ppx - (xArray at: index). - y := ppy - (yArray at: index). - ret := (x@y) theta radiansToDegrees + 90.0. - ret > 360.0 ifTrue: [ret := ret - 360.0]. - result at: index put: ret. - ]. - ^ result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primGetDistanceToX:toY:xArray:yArray:resultInto: (in category 'primitives') ----- - primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result - - | ppx ppy | - - "^ KedamaPlugin doPrimitive: #vectorGetDistanceTo." - - ppx := pX. - ppy := pY. - 1 to: result size do: [:index | - pX isCollection ifTrue: [ - ppx := pX at: index. - ppy := pY at: index. - ]. - result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. - - ]. - ^ result. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primGetHeading:into: (in category 'primitives') ----- - primGetHeading: headingArray into: resultArray - - | heading | - - "^ KedamaPlugin doPrimitive: #getHeadingArrayInto." - - 1 to: headingArray size do: [:i | - heading := headingArray at: i. - heading := heading / 0.0174532925199433. - heading := 90.0 - heading. - heading > 0.0 ifFalse: [heading := heading + 360.0]. - resultArray at: i put: heading. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primMakeTurtlesMap:whoArray:xArray:yArray:width:height: (in category 'primitives') ----- - primMakeTurtlesMap: map whoArray: whoArray xArray: xArray yArray: yArray width: w height: h - - - ^ nil. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primRandomRange:from:to:intoFloatArray:factor: (in category 'primitives') ----- - primRandomRange: range from: from to: to intoFloatArray: aFloatArray factor: factor - - - - from to: to do: [:index | - aFloatArray at: index put: (kedamaWorld random: range) asFloat * factor. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primRandomRange:from:to:intoIntegerArray:factor: (in category 'primitives') ----- - primRandomRange: range from: from to: to intoIntegerArray: anIntegerArray factor: factor - - - - from to: to do: [:index | - anIntegerArray at: index put: ((kedamaWorld random: range) asFloat * factor) asInteger. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primSetHeading:from: (in category 'primitives') ----- - primSetHeading: headingArray from: val - - | heading | - - "^ KedamaPlugin doPrimitive: #setHeadingArrayFrom." - - val isCollection ifFalse: [ - heading := val asFloat. - heading := KedamaMorph degreesToRadians: heading. - ]. - - 1 to: headingArray size do: [:i | - val isCollection ifTrue: [ - heading := val at: i. - heading := KedamaMorph degreesToRadians: heading. - ]. - headingArray at: i put: heading. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primSetX:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: (in category 'primitives') ----- - primSetX: xArray headingArray: headingArray value: v destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode - - | val newX | - - "^ KedamaPlugin doPrimitive: #turtlesSetX." - - v isCollection ifFalse: [ - val := v asFloat. - ]. - - 1 to: xArray size do: [:i | - v isCollection ifTrue: [ - newX := v at: i. - ] ifFalse: [ - newX := val. - ]. - KedamaMorph scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode. - ]. - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>primSetY:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: (in category 'primitives') ----- - primSetY: yArray headingArray: headingArray value: v destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode - - | val newY | - - "^ KedamaPlugin doPrimitive: #turtlesSetY." - - v isCollection ifFalse: [ - val := v asFloat. - ]. - - 1 to: yArray size do: [:i | - v isCollection ifTrue: [ - newY := v at: i. - ] ifFalse: [ - newY := val. - ]. - KedamaMorph scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>removeSlotNamed: (in category 'player protocol') ----- - removeSlotNamed: aSlotName - - | index newArrays | - self basicRemoveSlotNamed: aSlotName. - index := info at: aSlotName asSymbol ifAbsent: [^ self]. - newArrays := (arrays copyFrom: 1 to: index - 1), (arrays copyFrom: index + 1 to: arrays size). - types replaceFrom: index to: types size with: types startingAt: index + 1. - - info removeKey: aSlotName asSymbol. - arrays := newArrays. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>removeVectorSlotNamed: (in category 'player protocol') ----- - removeVectorSlotNamed: aSlotName - - | index newArrays | - index := info at: aSlotName asSymbol ifAbsent: [^ self]. - newArrays := (arrays copyFrom: 1 to: index - 1), (arrays copyFrom: index + 1 to: arrays size). - types replaceFrom: index to: types size - 1 with: types startingAt: index + 1. - - info removeKey: aSlotName asSymbol. - arrays := newArrays. - self compileAllAccessors. - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>renameVectorSlot:newSlotName: (in category 'player protocol') ----- - renameVectorSlot: oldSlotName newSlotName: newSlotName - - | index | - index := info at: oldSlotName asSymbol ifAbsent: [^ self]. - info removeKey: oldSlotName asSymbol. - info at: newSlotName put: index. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setBlueComponentIn:to: (in category 'player commands') ----- - setBlueComponentIn: aPatch to: value - - | xArray yArray patch component | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - value isCollection ifFalse: [ - component := value asInteger bitAnd: 16rFF. - ]. - (1 to: self size) do: [:i | | pix | - value isCollection ifTrue: [ - component := (value at: i) asInteger bitAnd: 16rFF. - ]. - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - pix := (pix bitAnd: 16rFFFF00) bitOr: component. - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setBooleanVarAt:put: (in category 'accessing - private') ----- - setBooleanVarAt: index put: v - - (v == true or: [v == false]) ifTrue: [ - (arrays at: index) atAllPut: (v == true ifTrue: [1] ifFalse: [0]). - ^ self. - ]. - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setColor: (in category 'player commands') ----- - setColor: color - - ^ self color: color. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setColorVarAt:put: (in category 'accessing - private') ----- - setColorVarAt: index put: cPixel - - cPixel isNumber ifTrue: [ - (arrays at: index) atAllPut: cPixel. - ^ self. - ]. - - (arrays at: index) replaceFrom: 1 to: cPixel size with: cPixel startingAt: 1. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setGreenComponentIn:to: (in category 'player commands') ----- - setGreenComponentIn: aPatch to: value - - | xArray yArray patch component | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - value isCollection ifFalse: [ - component := (value asInteger bitAnd: 16rFF) bitShift: 8. - ]. - (1 to: self size) do: [:i | | pix | - value isCollection ifTrue: [ - component := ((value at: i) asInteger bitAnd: 16rFF) bitShift: 8. - ]. - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - pix := (pix bitAnd: 16rFF00FF) bitOr: component. - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setHeading: (in category 'player commands') ----- - setHeading: degrees - - ^ self heading: degrees. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setInitialValueOf:from:to:for: (in category 'player commands') ----- - setInitialValueOf: name from: from to: to for: aKedamaWorld - - | array max | - array := arrays at: (info at: name). - name = #who ifTrue: [ - from to: to do: [:index | - array at: index put: (aKedamaWorld nextTurtleID). - ]. - ^ self. - ]. - name = #x ifTrue: [ - max := aKedamaWorld dimensions x * 100. - self primRandomRange: max from: from to: to intoFloatArray: array factor: 0.01. - ^ self. - ]. - name = #y ifTrue: [ - max := aKedamaWorld dimensions y * 100. - self primRandomRange: max from: from to: to intoFloatArray: array factor: 0.01. - ^ self. - ]. - name = #heading ifTrue: [ - self primRandomRange: 36000 from: from to: to intoFloatArray: array factor: (0.01 * 0.0174532925199433). - ^ self. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setNormal: (in category 'player commands') ----- - setNormal: degrees - - ^ self normal: degrees. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setNumberVarAt:put: (in category 'accessing - private') ----- - setNumberVarAt: index put: v - - v isNumber ifTrue: [ - (arrays at: index) atAllPut: v. - ^ self. - ]. - (v isMemberOf: KedamaFloatArray) ifTrue: [ - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. - ^ self. - ]. - (v isMemberOf: WordArray) ifTrue: [ - v primAddScalar: v and: 0.0 into: (arrays at: index). - ^ self. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setObjectVarAt:put: (in category 'accessing - private') ----- - setObjectVarAt: index put: v - - (v isKindOf: Array) ifFalse: [ - (arrays at: index) atAllPut: v. - ^ self. - ]. - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setPatchValueIn:to: (in category 'player commands') ----- - setPatchValueIn: aPatch to: value - - | xArray yArray patchMorph | - xArray := arrays at: 2. - yArray := arrays at: 3. - patchMorph := aPatch costume renderedMorph. - patchMorph setPixelsAtXArray: xArray yArray: yArray value: value. - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setRedComponentIn:to: (in category 'player commands') ----- - setRedComponentIn: aPatch to: value - - | xArray yArray patch component | - xArray := arrays at: 2. - yArray := arrays at: 3. - patch := aPatch costume renderedMorph. - value isCollection ifFalse: [ - component := (value asInteger bitAnd: 16rFF) bitShift: 16. - ]. - (1 to: self size) do: [:i | | pix | - value isCollection ifTrue: [ - component := ((value at: i) asInteger bitAnd: 16rFF) bitShift: 16. - ]. - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). - pix := (pix bitAnd: 16r00FFFF) bitOr: component. - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setTurtleVisible: (in category 'player commands') ----- - setTurtleVisible: aBooleanArray - - 1 to: self size do: [:i | - (turtles arrays at: 6) at: i put: ((aBooleanArray at: i) ifTrue: [1] ifFalse: [0]). - ]. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setTurtlesCount:prototype:for:randomize: (in category 'add turtles') ----- - setTurtlesCount: count prototype: prototype for: aKedamaWorld randomize: rondomizeFlag - - | anInteger | - anInteger := count. - count < 0 ifTrue: [anInteger := 0]. - - self size > anInteger ifTrue: [ - info associationsDo: [:assoc | | array | - array := (arrays at: assoc value). - array := array copyFrom: 1 to: anInteger. - arrays at: assoc value put: array. - ]. - turtleMapValid := false. - whoTableValid := false. - ]. - - self size < anInteger ifTrue: [ - self addTurtlesCount: (anInteger - self size) ofPrototype: prototype for: aKedamaWorld randomize: rondomizeFlag. - turtleMapValid := false. - whoTableValid := false. - - ]. - - - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setVectorSlotTypeFor:typeChosen: (in category 'player protocol') ----- - setVectorSlotTypeFor: slotName typeChosen: typeChosen - - | index initVar | - index := info at: slotName asSymbol. - index = 0 ifTrue: [^ self]. - - initVar := self initialValueForSlotOfType: typeChosen. - - types at: index put: typeChosen. - - self compileAllAccessors. - arrays at: index put: (self arrayForType: typeChosen). - self perform: ('set', slotName capitalized, ':') asSymbol with: initVar. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setX: (in category 'player commands') ----- - setX: v - - exampler getGrouped ifFalse: [ - self - primSetX: (arrays at: 2) - headingArray: (arrays at: 4) - value: (v isNumber ifTrue: [v asFloat] ifFalse: [v]) - destWidth: kedamaWorld wrapX - leftEdgeMode: kedamaWorld leftEdgeModeMnemonic - rightEdgeMode: kedamaWorld rightEdgeModeMnemonic. - ] ifTrue: [ - self groupSetX: v - ]. - turtleMapValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>setY: (in category 'player commands') ----- - setY: v - - exampler getGrouped ifFalse: [ - self - primSetY: (arrays at: 3) - headingArray: (arrays at: 4) - value: (v isNumber ifTrue: [v asFloat] ifFalse: [v]) - destHeight: kedamaWorld wrapY - topEdgeMode: kedamaWorld topEdgeModeMnemonic - bottomEdgeMode: kedamaWorld bottomEdgeModeMnemonic. - ] ifTrue: [ - self groupSetY: v. - ]. - turtleMapValid := false. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>show (in category 'player commands') ----- - show - - (arrays at: 6) atAllPut: 1. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>size (in category 'accessing') ----- - size - - ^ arrays first size. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>turn: (in category 'player commands') ----- - turn: degrees - "Turn by the given number of degrees." - - self heading: (self heading + degrees). - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>types (in category 'accessing') ----- - types - - ^ types. - ! Item was removed: - ----- Method: KedamaTurtleVectorPlayer>>useKedamaFloatArray (in category 'private') ----- - useKedamaFloatArray - - - arrays withIndexDo: [:array :index | | newArray | - (array isMemberOf: FloatArray) ifTrue: [ - newArray := KedamaFloatArray new: array size. - newArray replaceFrom: 1 to: array size with: array startingAt: 1. - arrays at: index put: newArray. - ]. - ]. - ! Item was removed: - PackageInfo subclass: #MorphicGamesInfo - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-Squeakland-Morphic-Games'! - - !MorphicGamesInfo commentStamp: 'asm 7/5/2003 15:59' prior: 0! - to create the package: - - in a 5325 image - -file in SARBuilder - - SARPackageDumper fileOutPackageNamed: 'Morphic-Games' - as: (FileDirectory default nextNameFor: 'Morphic-Games' extension: 'sar')! Item was removed: - ----- Method: MorphicGamesInfo>>changesText (in category 'introspection') ----- - changesText - ^' - version 6: included Rick McGeer''s Chess Castling Fix - version 5: included Atomic (some changes were needed to make it work in 3.7) and some Babel stuff - version 4: includes Andreas Raab''s rewrite of ChessConstants as declarative pool (update 5325) - version 3: -added one change by the KCP team - -Chess its playing again - version 2: applied changes by the MCP team'! Item was removed: - ----- Method: MorphicGamesInfo>>postscriptText (in category 'introspection') ----- - postscriptText - "Executed after load" - ^ 'Utilities informUser: ''Generating Games thumbnails in PartsBin, please wait...'' during: [ - PartsBin clearThumbnailCache. - PartsBin cacheAllThumbnails. - ]. - "End ', self packageName, '"'! Item was removed: - ----- Method: MorphicGamesInfo>>readmeText (in category 'introspection') ----- - readmeText - ^'Morphic-Games has the games that were in the image before 3.6: - Chess, Chinese Checkers, Cipher, Crostic, FreeCell, Mines, Same and Tetris. - plus Atomic'! Item was removed: - ----- Method: Player class>>createTurtleSubclass (in category 'turtles') ----- - createTurtleSubclass - - | instVarString classInstVarString aName aClass | - instVarString := KedamaTurtleVectorPlayer instVarNames. - classInstVarString := ''. - aName := self chooseUniqueTurtleClassName. - aClass := self subclass: aName instanceVariableNames: instVarString - classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. - classInstVarString size > 0 ifTrue: - [aClass class instanceVariableNames: classInstVarString]. - aClass copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer. - ^ aClass - ! Item was removed: - ----- Method: SugarLauncher>>badgeFlap (in category 'presence') ----- - badgeFlap - "This finds or creates a flap to hold badges" - - | translatedFlapName flapTab flap spacer holder | - translatedFlapName := 'Buddies' translated. - flapTab := Flaps globalFlapTab: translatedFlapName. - flapTab ifNotNil: [^flapTab]. - - flap := AlignmentMorph newRow. - flap clipSubmorphs: true. - flap beTransparent. - flap layoutInset: 0; cellInset: 0; borderWidth: 0. - flap setProperty: #wantsHaloFromClick toValue: false. - flap beFlap: true. - - spacer := Morph new beTransparent. "This provides space for tabs to be seen." - spacer width: 20. - spacer hResizing: #rigid; vResizing: #spaceFill. - flap addMorphBack: spacer. - - holder := Morph new. - holder name: 'Badges'. - holder position: 0@100. - holder layoutPolicy: TableLayout new. - holder color: Color red muchLighter; - wrapDirection: #topToBottom; - hResizing: #spaceFill; - vResizing: #spaceFill; - cellInset: 10; - layoutInset: 10. - flap addMorphBack: holder. - - flap beSticky. - spacer beSticky; lock: true. - holder beSticky. - - flapTab := FlapTab new. - flapTab referent: flap. - flapTab setName: translatedFlapName edge: #left color: Color red muchLighter. - flapTab referentMargin: 0@75. - flapTab setToPopOutOnDragOver: true. - Flaps addGlobalFlap: flapTab. - ActiveWorld addGlobalFlaps. - ScriptingSystem cleanUpFlapTabsOnLeft. - - ^flapTab! Item was removed: - ----- Method: SugarLauncher>>badgeFor: (in category 'presence') ----- - badgeFor: aBuddy - ^self badgeHolder submorphs - detect: [:m | - (m isKindOf: NebraskaSenderMorph) and: [ - (m valueOfProperty: #buddy) = aBuddy]] - ifNone: [nil] - ! Item was removed: - ----- Method: SugarLauncher>>badgeHolder (in category 'presence') ----- - badgeHolder - "This finds or creates a flap to hold badges" - - ^self badgeFlap referent submorphNamed: 'Badges' - ! Item was removed: - ----- Method: SugarLauncher>>buddies (in category 'presence') ----- - buddies - sharedActivity ifNil: [^Dictionary new]. - buddies ifNil: [self setupBuddies]. - ^buddies! Item was removed: - ----- Method: SugarLauncher>>buddiesLock (in category 'presence') ----- - buddiesLock - ^buddiesLock ifNil: [buddiesLock := Semaphore forMutualExclusion]! Item was removed: - ----- Method: SugarLauncher>>createJournalEntryFor:filename:mimetype: (in category 'datastore') ----- - createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString - | properties id | - properties := self propertiesFrom: aProject. - properties at: 'ctime' put: (properties at: 'mtime'). - properties at: 'mime_type' put: mimetypeString. - properties removeKey: 'uid' ifAbsent: []. "would confuse Sugar 0.82" - aFilename ifEmpty: [properties at: 'title:text' put: 'Etoys' translated]. - id := self dataStore create: properties with: aFilename squeakToUtf8 with: true. - ^id asString! Item was removed: - ----- Method: SugarLauncher>>deleteBadges (in category 'presence') ----- - deleteBadges - | flapTab | - flapTab := (Flaps globalFlapTab: 'Buddies' translated) ifNil: [^self]. - Flaps removeFlapTab: flapTab keepInList: false. - ! Item was removed: - ----- Method: SugarLauncher>>deleteUnused: (in category 'datastore') ----- - deleteUnused: filePath - "Delete file if filePath is indeed unused" - - World submorphs do: [:m | - (m isSystemWindow and: [ - (m model isKindOf: FileList) and: [ - m model fullName = filePath]]) ifTrue: [ - ^self deleteUnused: filePath whenDoneWith: m]]. - - [FileDirectory deleteFilePath: filePath] on: Error do: ["ignore"] - ! Item was removed: - ----- Method: SugarLauncher>>deleteUnused:whenDoneWith: (in category 'datastore') ----- - deleteUnused: fileName whenDoneWith: anObject - "Delete fileName when anObject is not in use anymore" - - ^anObject - toFinalizeSend: #deleteUnused: - to: self - with: fileName! Item was removed: - ----- Method: SugarLauncher>>enableSharedActivitySignals (in category 'presence') ----- - enableSharedActivitySignals - sharedActivity onBuddyJoinedSend: #buddyJoined: to: self. - sharedActivity onBuddyLeftSend: #buddyLeft: to: self. - ! Item was removed: - ----- Method: SugarLauncher>>findJournalEntries:properties: (in category 'datastore') ----- - findJournalEntries: query properties: propNames - "query is either a String or a dictionary, e.g. {'mime_type'->'application/x-squeak-project'}. Answers an array of properties. If propNames is not nil, only the named properties will be returned (which will be more efficient)" - ^(self dataStore find: query with: (propNames ifNil: [#()])) first! Item was removed: - ----- Method: SugarLauncher>>getFile: (in category 'datastore') ----- - getFile: id - "answer a temporary file, will be deleted if not used anymore" - | utf8Name file | - utf8Name := self dataStore getFilename: id. - utf8Name isEmptyOrNil ifTrue: [^nil]. - file := FileStream readOnlyFileNamed: utf8Name utf8ToSqueak. - self deleteUnused: file name whenDoneWith: file. - ^file! Item was removed: - ----- Method: SugarLauncher>>getProperties: (in category 'datastore') ----- - getProperties: objectId - | props | - props := self dataStore getProperties: objectId. - "Make sure the props we care about are strings" - props at: 'title' ifPresent: [:value | props at: 'title' put: value asString utf8ToSqueak composeAccents]. - props at: 'mime_type' ifPresent: [:value | props at: 'mime_type' put: value asString]. - props at: 'uid' put: objectId asString. - ^props! Item was removed: - ----- Method: SugarLauncher>>handleStream:mimetype:titled: (in category 'datastore') ----- - handleStream: tmpStream mimetype: mimetypeOrNil titled: title - "tmpStream was opened from journal or other media. - For simplicity, we re-use the file drop logic." - - ActiveHand lastEvent position: World center. - [ - [(ExternalDropHandler lookupExternalDropHandler: tmpStream) - handle: tmpStream in: World dropEvent: ActiveHand lastEvent] - ifError: [self inform: ('Cannot open {1}' translated format: {title})] - ] ensure: [tmpStream ifNotNil: [tmpStream close]].! Item was removed: - ----- Method: SugarLauncher>>joinSharedActivity (in category 'presence') ----- - joinSharedActivity - "join a shared activity on startup" - Utilities informUser: 'Looking for shared activity ...' translated - during: [ - [sharedActivity := self presence getActivityById: self activityId] - ifError: [^sharedActivity := nil]]. - - Utilities informUser: 'Joining activity ...' translated - during: [ - [sharedActivity join] ifError: [^sharedActivity := nil] . - self setupBuddies. - self setupTubes. - self enableSharedActivitySignals. - SugarNavigatorBar current ifNotNilDo: [:bar | bar joinSharedActivity]. - ]. - - ! Item was removed: - ----- Method: SugarLauncher>>leaveSharedActivity (in category 'presence') ----- - leaveSharedActivity - sharedActivity ifNotNil: [ - sharedActivity leaveAsync. - sharedActivity := nil. - self buddiesLock critical: [buddies := nil]. - self deleteBadges]. - ! Item was removed: - ----- Method: SugarLauncher>>makeJournalEntryFor:filename:mimetype: (in category 'datastore') ----- - makeJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString - "If this is a new project (no journal id yet), create a new Journal object, and remember the new id. - Otherwise, if this is an auto-save, update the existing Journal entry. - But if it is an explicit save, always create a new entry. Which entry we continue to work on depends on the sugarAutoSave preference. If enabled (before 4.1), the new entry is just a checkpoint, the project continues to use the old id/entry, and will be saved again on quit. If disabled (default since 4.1), we switch to the newly created id/entry." - | id | - (id := aProject sugarObjectId) - ifNil: [ - id := self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString. - aProject sugarObjectId: id. - self monitorJournalEntry: id] - ifNotNil: [ - (Preferences sugarAutoSave and: [aProject projectParameterAt: #sugarAutoSave ifAbsent: [true]]) - ifTrue: [self updateJournalEntry: id for: aProject filename: aFilename mimetype: mimetypeString] - ifFalse: [ - id := self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString. - Preferences sugarAutoSave ifFalse: [ - self unmonitorJournalEntry: aProject sugarObjectId. - aProject sugarObjectId: id. - self monitorJournalEntry: id]]]! Item was removed: - ----- Method: SugarLauncher>>monitorJournalEntry: (in category 'datastore') ----- - monitorJournalEntry: objectId - self dataStore - onUpdated: objectId - send: #updatedJournalEntry: - to: self.! Item was removed: - ----- Method: SugarLauncher>>propertiesFrom: (in category 'datastore') ----- - propertiesFrom: aProject - | preview autoSave props markFavorite setActivity | - preview := [ByteArray streamContents: [:s | PNGReadWriter - putForm: (aProject thumbnail asFormOfDepth: 16) - onStream: s]] ifError: ['']. - autoSave := aProject projectParameterAt: #sugarAutoSave ifAbsent: [true]. - setActivity := Preferences sugarAutoSave not | autoSave. - markFavorite := Preferences sugarAutoSave & autoSave not. - props := (aProject sugarProperties ifNil: [Dictionary new]) copy. - { - 'activity' -> self bundleId. - 'activity_id' -> (setActivity ifTrue: [self activityId] ifFalse: ['']). - 'title:text' -> (self titleFromProject: aProject) squeakToUtf8. - 'title_set_by_user' -> (aProject currentVersionNumber>0 ifTrue: ['1'] ifFalse: ['0']). - 'keep' -> (markFavorite ifTrue: ['1'] ifFalse: ['0']). - 'mtime' -> (DateAndTime now asString first: 19). - 'timestamp' -> (DateAndTime now asUnixTime). - 'preview' -> preview. - 'icon-color' -> self ownerBuddy colors. - } do: [:each | props add: each]. - ^props - ! Item was removed: - ----- Method: SugarLauncher>>resumeJournalEntry: (in category 'datastore') ----- - resumeJournalEntry: id - | props file title project mimetype | - props := self getProperties: id. - title := props at: 'title' ifAbsent: ['untitled' translated]. - mimetype := props at: 'mime_type' ifAbsent: ['']. - - mimetype isEmpty ifTrue: [^self welcome: '']. - - mimetype = 'application/x-squeak-project' ifFalse: [ - "reuse drop code" - WorldState addDeferredUIMessage: [ - self open: id title: title mimetype: mimetype]. - ^Project enterNew]. - - 'Loading a Project...' displaySequentialProgress: [ - Display fillWhite;forceToScreen. - file := self getFile: id. - "load project and close temp file (which will thus be deleted)" - project := ProjectLoading - loadName: ((title copyReplaceAll: '/' with: '\') contractTo: 64) - stream: file - fromDirectory: nil - withProjectView: nil. - file close. - project keepSugarProperties: props monitor: true. - project projectParameterAt: #sugarAutoSave put: true. - project enter]. - ! Item was removed: - ----- Method: SugarLauncher>>setupBuddies (in category 'presence') ----- - setupBuddies - self badgeFlap. - self buddiesLock critical: [buddies := Dictionary new]. - sharedActivity getJoinedBuddies do: [:each | - self buddyJoined: each]. - ! Item was removed: - ----- Method: SugarLauncher>>sharePublicly: (in category 'presence') ----- - sharePublicly: aBoolean - sharedActivity ifNotNil: [^self]. - - sharedActivity := self presence - shareActivity: self activityId - with: self bundleId - with: (self titleFromProject: Project current) squeakToUtf8 - with: Dictionary new. "due to bug 4660 we can't pass properties directly" - sharedActivity setProperties: ({'private' -> aBoolean not} as: Dictionary). - self setupBuddies. - self enableSharedActivitySignals. - self setupTubes. - ! Item was removed: - ----- Method: SugarLauncher>>showBadges (in category 'presence') ----- - showBadges - self badgeFlap openFully! Item was removed: - ----- Method: SugarLauncher>>titleFromProject: (in category 'datastore') ----- - titleFromProject: aProject - ^(aProject name beginsWith: 'Unnamed' translated) - ifTrue: ['Etoys Project' translated] - ifFalse: [aProject name]! Item was removed: - ----- Method: SugarLauncher>>unmonitorJournalEntry: (in category 'datastore') ----- - unmonitorJournalEntry: objectId - self dataStore - onUpdated: objectId - send: nil - to: self.! Item was removed: - ----- Method: SugarLauncher>>updateJournalEntry: (in category 'datastore') ----- - updateJournalEntry: id - ^self updateJournalEntry: id - for: Project current - filename: '' - mimetype: ''! Item was removed: - ----- Method: SugarLauncher>>updateJournalEntry:for:filename:mimetype: (in category 'datastore') ----- - updateJournalEntry: id for: aProject filename: aFilename mimetype: mimetypeString - "Move aProject saved to aFilename into the datastore, delete aFilename" - | properties | - properties := self propertiesFrom: aProject. - properties at: 'mime_type' put: mimetypeString. - self dataStore update: id with: properties with: aFilename squeakToUtf8 with: true.! Item was removed: - ----- Method: Utilities class>>defaultRepositoryChangeLogOn: (in category '*Etoys-Squeakland-fetching updates') ----- - defaultRepositoryChangeLogOn: aStream - "Transcript clear. Utilities defaultRepositoryChangeLogOn: Transcript" - | repo updates latest previous latestVersion previousVersion added removed latestPackages previousPackages prevDep prevInfo latestInfo | - repo := MCRepositoryGroup default repositories detect: [:r | - r description = MCMcmUpdater defaultUpdateURL]. - updates := repo allFileNames select: [:each | 'update-*.mcm' match: each]. - updates := updates asSortedCollection: - [:a :b | a splitInteger second > b splitInteger second]. - latest := repo versionFromFileNamed: updates first. - previous := repo versionFromFileNamed: updates second. - latestVersion := self versionNumberAndDateFromConfig: latest. - previousVersion := self versionNumberAndDateFromConfig: previous. - aStream nextPutAll: 'Changes from v'; print: previousVersion first; - nextPutAll: ' of '; print: previousVersion second; - nextPutAll: ' to v'; print: latestVersion first; - nextPutAll: ' of '; print: latestVersion second; - nextPutAll: ':'; cr. - aStream flush. - latestPackages := latest dependencies collect: [:dep | dep package]. - previousPackages := previous dependencies collect: [:dep | dep package]. - added := latestPackages difference: previousPackages. - removed := previousPackages difference: latestPackages. - added ifNotEmpty: [ - aStream nextPutAll: 'Added packages:'. - added do: [:each | aStream space; nextPutAll: each name]. - aStream cr]. - removed ifNotEmpty: [ - aStream nextPutAll: 'Removed packages:'. - removed do: [:each | aStream space; nextPutAll: each name]. - aStream cr]. - latest dependencies do: [:latestDep | - prevDep := previous dependencies detect: [:p | latestDep package = p package] ifNone: []. - (prevDep notNil and: [prevDep versionInfo ~= latestDep versionInfo]) - ifTrue: [ - aStream nextPutAll: '--------------------'; cr. - prevInfo := prevDep package workingCopy ancestry findAncestor: prevDep versionInfo. - latestInfo := latestDep package workingCopy ancestry findAncestor: latestDep versionInfo. - (latestInfo allAncestorsOnPathTo: prevInfo) reverse, {latestInfo} - do: [:ver | aStream nextPutAll: ver name; cr; nextPutAll: ver message; cr] - separatedBy: [aStream cr]]]. - aStream flush - ! Item was removed: - ----- Method: Utilities class>>updateFromDefaultRepository (in category '*Etoys-Squeakland-fetching updates') ----- - updateFromDefaultRepository - | config | - "Flush all caches. If a previous download failed this is often helpful" - MCFileBasedRepository flushAllCaches. - config := MCMcmUpdater updateFromDefaultRepository. - config ifNil: [^self inform: 'Repository unavailable' translated]. - self setSystemVersionFromConfig: config. - self inform: ('Update completed. - System version is now: - {1}' translated format: {SystemVersion current asString}). - ! From btc at openinworld.com Tue Sep 20 09:04:13 2016 From: btc at openinworld.com (Ben Coman) Date: Tue Sep 20 09:04:37 2016 Subject: [squeak-dev] Change line ending style in TextEditor? In-Reply-To: References: <7F420019-A1B3-45E5-A628-520437B3FAD1@rowledge.org> Message-ID: On Tue, Sep 20, 2016 at 12:51 PM, Xin Wang wrote: > > > 2016-09-20 12:26 GMT+08:00 tim Rowledge : >> >> >> > On 19-09-2016, at 6:27 PM, Xin Wang wrote: >> > >> > Hi all, >> > >> > >> > Is there any way to change default line ending in TextEditor? Currently >> > it defaults to CR, which will mess up files in UNIX line ending style. >> >> Using LF instead of CR is an abomination unto Nuggan and shall be >> punished! >> > > Could you elaborate? Maybe humour?? http://wiki.lspace.org/mediawiki/Nuggan Or maybe he's secretly a card carrying member of one of these ancient churches... Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II family, Oberon, Mac OS up to version 9, MIT Lisp Machine and OS-9 https://en.wikipedia.org/wiki/Newline bring out the holy hand grenade! cheers -ben From lewis at mail.msen.com Tue Sep 20 09:40:10 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Sep 20 09:40:14 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.235.mcz In-Reply-To: <201609200841.u8K8fsRL045345@shell.msen.com> References: <201609200841.u8K8fsRL045345@shell.msen.com> Message-ID: <20160920094010.GA53125@shell.msen.com> We have a number of Etoys submissions from 'jl' in the inbox, including EToys-jl.235. Are these being merged with the 'tfel' versions? If so, maybe the inbox files can be moved to the treated inbox. Dave On Tue, Sep 20, 2016 at 08:40:49AM +0000, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.235.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.235 > Author: tfel > Time: 20 September 2016, 10:40:06.499404 am > UUID: 4c293f06-9bcb-5348-844b-76cc91922065 > Ancestors: EToys-bf.234 > > - begin removal of old Kedama classes, to eventually replace everything with Kedama2 > - move SugarLauncher code that needs Dbus into SugarDBus package > - remove unused BooleanPreferenceView and HaloThemePrefernceView classes > - remove unused MorphicGamesInfo class > - remove old Utilities methods that got moved into McmUpdater and re-added by the merge heuristic > > =============== Diff against EToys-bf.234 =============== > > Item was removed: > - PreferenceView subclass: #BooleanPreferenceView > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-System-Support'! > - > - !BooleanPreferenceView commentStamp: '' prior: 0! > - I am responsible for building the visual representation of a preference that accepts true and false values! > > Item was removed: > - ----- Method: BooleanPreferenceView class>>handlesPanel: (in category 'view registry') ----- > - handlesPanel: aPreferencePanel > - ^aPreferencePanel isKindOf: PreferencesPanel! > > Item was removed: > - ----- Method: BooleanPreferenceView class>>initialize (in category 'class initialization') ----- > - initialize > - PreferenceViewRegistry ofBooleanPreferences register: self.! > > Item was removed: > - ----- Method: BooleanPreferenceView class>>unload (in category 'class initialization') ----- > - unload > - PreferenceViewRegistry ofBooleanPreferences unregister: self.! > > Item was removed: > - ----- Method: BooleanPreferenceView>>offerPersistenceMenu (in category 'user interface') ----- > - offerPersistenceMenu > - | aMenu | > - Preferences ensurePersistedPreferencesAccessible > - ifFalse: [^self]. > - aMenu := MenuMorph new defaultTarget: self preference. > - aMenu addTitle: self preference name. > - aMenu addUpdating: #isEnabledOnStartupString target: self preference selector: #persistValue: argumentList: {true}. > - aMenu addUpdating: #isDisabledOnStartupString target: self preference selector: #persistValue: argumentList: {false}. > - aMenu addUpdating: #isNotSetOnStartupString target: self preference selector: #persistValue: argumentList: {nil}. > - aMenu popUpInWorld! > > Item was removed: > - ----- Method: BooleanPreferenceView>>offerPreferenceNameMenu:with:in: (in category 'user interface') ----- > - offerPreferenceNameMenu: aPanel with: ignored1 in: ignored2 > - "the user clicked on a preference name -- put up a menu" > - > - | aMenu | > - ActiveHand showTemporaryCursor: nil. > - aMenu := MenuMorph new defaultTarget: self preference. > - aMenu addTitle: self preference name. > - > - (Preferences okayToChangeProjectLocalnessOf: self preference name) ifTrue: > - [aMenu addUpdating: #isProjectLocalString target: self preference action: #toggleProjectLocalness. > - aMenu balloonTextForLastItem: 'Some preferences are best applied uniformly to all projects, and others are best set by each individual project. If this item is checked, then this preference will be printed in bold and will have a separate value for each project' translated]. > - > - aMenu add: 'browse senders' translated target: self systemNavigation selector: #browseAllCallsOn: argument: self preference name. > - aMenu balloonTextForLastItem: 'This will open a method-list browser on all methods that the send the preference "' translated, self preference name, '".'. > - aMenu add: 'show category...' translated target: aPanel selector: #findCategoryFromPreference: argument: self preference name. > - aMenu balloonTextForLastItem: 'Allows you to find out which category, or categories, this preference belongs to.' translated. > - > - Smalltalk isMorphic ifTrue: > - [aMenu add: 'hand me a button for this preference' translated target: self selector: #tearOffButton. > - aMenu balloonTextForLastItem: 'Will give you a button that governs this preference, which you may deposit wherever you wish' translated]. > - > - aMenu add: 'copy this name to clipboard' translated target: self preference selector: #copyName. > - aMenu balloonTextForLastItem: 'Copy the name of the preference to the text clipboard, so that you can paste into code somewhere' translated. > - aMenu add: 'set automatically on startup...' translated target: self selector: #offerPersistenceMenu. > - aMenu balloonTextForLastItem: 'Store a value for this preference on file. On startup, it will be automatically restored.' translated. > - > - aMenu popUpInWorld! > > Item was removed: > - ----- Method: BooleanPreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- > - representativeButtonWithColor: aColor inPanel: aPreferencesPanel > - "Return a button that controls the setting of prefSymbol. It will keep up to date even if the preference value is changed in a different place" > - > - | outerButton aButton str miniWrapper | > - > - outerButton := AlignmentMorph newRow height: 24. > - outerButton color: (aColor ifNil: [Color r: 0.645 g: 1.0 b: 1.0]). > - outerButton hResizing: (aPreferencesPanel ifNil: [#shrinkWrap] ifNotNil: [#spaceFill]). > - outerButton vResizing: #shrinkWrap. > - outerButton addMorph: (aButton := UpdatingThreePhaseButtonMorph checkBox). > - aButton > - target: self preference; > - actionSelector: #togglePreferenceValue; > - getSelector: #preferenceValue. > - > - outerButton addTransparentSpacerOfSize: (2 @ 0). > - str := StringMorph contents: self preference name font: Preferences standardButtonFont. > - > - self preference localToProject ifTrue: > - [str emphasis: 1]. > - > - miniWrapper := AlignmentMorph newRow hResizing: #shrinkWrap; vResizing: #shrinkWrap. > - miniWrapper layoutInset: 0. > - miniWrapper beTransparent addMorphBack: str lock. > - aPreferencesPanel > - ifNotNil: "We're in a Preferences panel" > - [miniWrapper on: #mouseDown send: #offerPreferenceNameMenu:with:in: to: self withValue: aPreferencesPanel. > - miniWrapper on: #mouseEnter send: #menuButtonMouseEnter: to: miniWrapper. > - miniWrapper on: #mouseLeave send: #menuButtonMouseLeave: to: miniWrapper. > - miniWrapper setBalloonText: 'Click here for a menu of options regarding this preference. Click on the checkbox to the left to toggle the setting of this preference' translated] > - > - ifNil: "We're a naked button, not in a panel" > - [miniWrapper setBalloonText: self preference helpString translated; setProperty: #balloonTarget toValue: aButton]. > - > - outerButton addMorphBack: miniWrapper. > - outerButton setNameTo: self preference name. > - > - aButton setBalloonText: self preference helpString. > - > - ^ outerButton > - ! > > Item was removed: > - PreferenceView subclass: #HaloThemePreferenceView > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-System-Support'! > - > - !HaloThemePreferenceView commentStamp: '' prior: 0! > - I am responsible for building the view for the preference that choose the halo theme! > > Item was removed: > - ----- Method: HaloThemePreferenceView class>>handlesPanel: (in category 'view registry') ----- > - handlesPanel: aPreferencePanel > - ^aPreferencePanel isKindOf: PreferencesPanel! > > Item was removed: > - ----- Method: HaloThemePreferenceView class>>initialize (in category 'class initialization') ----- > - initialize > - "adding the halo theme preference to Preferences and registering myself as its view" > - PreferenceViewRegistry ofHaloThemePreferences register: self. > - Preferences > - addPreference: #haloTheme > - categories: {#halos} > - default: #iconicHaloSpecifications > - balloonHelp: '' > - projectLocal: false > - changeInformee: nil > - changeSelector: nil > - viewRegistry: PreferenceViewRegistry ofHaloThemePreferences.! > > Item was removed: > - ----- Method: HaloThemePreferenceView class>>unload (in category 'class initialization') ----- > - unload > - PreferenceViewRegistry ofHaloThemePreferences unregister: self.! > > Item was removed: > - ----- Method: HaloThemePreferenceView>>haloThemeRadioButtons (in category 'user interface') ----- > - haloThemeRadioButtons > - "Answer a column of butons representing the choices of halo theme" > - > - | buttonColumn aRow aRadioButton aStringMorph | > - buttonColumn := AlignmentMorph newColumn beTransparent. > - #('iconic' 'classic' 'simple' 'custom') translatedNoop. > - #( (iconicHaloSpecifications iconic iconicHalosInForce 'circular halos with icons inside') > - (classicHaloSpecs classic classicHalosInForce 'plain circular halos') > - (simpleFullHaloSpecifications simple simpleHalosInForce 'fewer, larger halos') > - (customHaloSpecs custom customHalosInForce 'customizable halos')) translatedNoop do: > - > - [:quad | > - aRow := AlignmentMorph newRow beTransparent. > - aRow addMorph: (aRadioButton := UpdatingThreePhaseButtonMorph radioButton). > - aRadioButton target: Preferences. > - aRadioButton setBalloonText: quad fourth translated. > - aRadioButton actionSelector: #installHaloTheme:. > - aRadioButton getSelector: quad third. > - aRadioButton arguments: (Array with: quad first). > - aRow addTransparentSpacerOfSize: (4 @ 0). > - aRow addMorphBack: (aStringMorph := StringMorph contents: quad second asString translated). > - aStringMorph setBalloonText: quad fourth translated. > - buttonColumn addMorphBack: aRow]. > - ^ buttonColumn > - > - "(Preferences preferenceAt: #haloTheme) view tearOffButton"! > > Item was removed: > - ----- Method: HaloThemePreferenceView>>representativeButtonWithColor:inPanel: (in category 'user interface') ----- > - representativeButtonWithColor: aColor inPanel: aPreferencesPanel > - | outerButton editButton | > - editButton := SimpleButtonMorph new > - target: Preferences; > - color: Color transparent; > - actionSelector: #editCustomHalos; > - label: 'Edit custom halos' translated; > - setBalloonText: 'Click here to edit the method that defines the custom halos' translated. > - > - outerButton := AlignmentMorph newColumn. > - outerButton > - color: (aColor ifNil: [Color r: 0.645 g: 1.0 b: 1.0]); > - hResizing: (aPreferencesPanel ifNil: [#shrinkWrap] ifNotNil: [#spaceFill]); > - vResizing: #shrinkWrap; > - addTransparentSpacerOfSize: (0@4); > - addMorphBack: self haloThemeRadioButtons; > - addTransparentSpacerOfSize: (0@4); > - addMorphBack: editButton. > - > - ^outerButton. > - > - "(Preferences preferenceAt: #haloTheme) view tearOffButton" ! > > Item was removed: > - ----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain (in category 'debug support') ----- > - copyAllMethodsAgain > - > - | c result | > - c := turtles class. > - result := (ClassBuilder new) > - name: c name > - inEnvironment: c environment > - subclassOf: c superclass > - type: c typeOfClass > - instanceVariableNames: KedamaTurtleVectorPlayer instanceVariablesString > - classVariableNames: KedamaTurtleVectorPlayer classVariablesString > - poolDictionaries: KedamaTurtleVectorPlayer sharedPoolsString > - category: c category. > - turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer. > - sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub]. > - ! > > Item was removed: > - ----- Method: KedamaExamplerPlayer>>createTurtles (in category 'subclass players management') ----- > - createTurtles > - > - turtles := self class createTurtleSubclass new. > - turtles kedamaWorld: kedamaWorld. > - turtles exampler: self. > - ^ turtles. > - ! > > Item was added: > + ----- Method: KedamaSequenceExecutionStub class>>isSystemDefined (in category 'as yet unclassified') ----- > + isSystemDefined > + ^ name endsWithDigit not! > > Item was added: > + ----- Method: KedamaSequenceExecutionStub class>>isUniClass (in category 'as yet unclassified') ----- > + isUniClass > + > + ^ self ~~ self officialClass! > > Item was removed: > - ----- Method: KedamaTurtleMorph class>>copyAllMethodsAgain (in category 'scripting') ----- > - copyAllMethodsAgain > - " > - KedamaTurtleMorph copyAllMethodsAgain. > - " > - KedamaTurtleMorph allInstancesDo: [:e | e player ifNotNil: [e player copyAllMethodsAgain]]. > - ! > > Item was removed: > - KedamaExamplerPlayer subclass: #KedamaTurtleVectorPlayer > - instanceVariableNames: 'exampler info types arrays deletingIndex whoTable whoTableBase whoTableValid turtlesMap turtleMapValid lastWho lastWhoStub' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-StarSqueak'! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer class>>officialClass (in category 'all') ----- > - officialClass > - > - ^ KedamaTurtleVectorPlayer > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>aTurtleAtX:y: (in category 'turtle map') ----- > - aTurtleAtX: xPos y: yPos > - > - | w x y index who stub | > - turtleMapValid ifFalse: [ > - self makeTurtlesMap. > - ]. > - > - w := kedamaWorld dimensions x. > - x := xPos truncated. > - y := yPos truncated. > - x < 0 ifTrue: [^ nil]. > - x >= w ifTrue: [^ nil]. > - y < 0 ifTrue: [^ nil]. > - y >= kedamaWorld dimensions y ifTrue: [^ nil]. > - index := (w * y) + x + 1. > - who := turtlesMap at: index. > - who = 0 ifTrue: [^ nil]. > - who = lastWho ifTrue: [^ lastWhoStub]. > - stub := exampler clonedSequentialStub. > - stub who: who. > - lastWho := who. > - ^ lastWhoStub := stub. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>addInstanceVarNamed:withValue: (in category 'player protocol') ----- > - addInstanceVarNamed: aName withValue: aValue > - > - | newArray | > - (aValue isKindOf: Number) ifTrue: [ > - newArray := KedamaFloatArray new: self size. > - ]. > - (aValue isKindOf: Color) ifTrue: [ > - newArray := WordArray new: self size. > - ]. > - (aValue isKindOf: Player) ifTrue: [ > - newArray := Array new: self size. > - ]. > - > - arrays := arrays, newArray. > - info at: aName asSymbol put: arrays size. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>addInstanceVarVectorNamed:withValue: (in category 'player protocol') ----- > - addInstanceVarVectorNamed: aName withValue: aValue > - > - | newArray | > - newArray := KedamaFloatArray new: self size. > - arrays := arrays, (Array with: newArray). > - newArray atAllPut: aValue. > - info at: aName asSymbol put: arrays size. > - types at: arrays size put: #Number. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>addTurtlesCount:ofPrototype:for:positionAndColorArray: (in category 'add turtles') ----- > - addTurtlesCount: count ofPrototype: prototype for: aKedamaWorld positionAndColorArray: positionAndColorArray > - > - | oldCount | > - oldCount := self size. > - info associationsDo: [:assoc | | defaultValue index newArray array | > - index := info at: assoc key. > - array := arrays at: (info at: assoc key). > - defaultValue := prototype at: index. > - newArray := array class new: count. > - (#(who x y heading color normal) includes: assoc key) ifFalse: [ > - newArray atAllPut: defaultValue. > - ]. > - assoc key = #x ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray first startingAt: 1]. > - assoc key = #y ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray second startingAt: 1]. > - assoc key = #color ifTrue: [newArray replaceFrom: 1 to: newArray size with: positionAndColorArray third startingAt: 1]. > - assoc key = #heading ifTrue: [newArray atAllPut: 1.57079631 "Float pi / 2.0"]. > - assoc key = #normal ifTrue: [newArray atAllPut: 1.57079631 "Float pi / 2.0"]. > - > - arrays at: (assoc value) put: array, newArray. > - ]. > - > - #(who) do: [:name | > - self setInitialValueOf: name from: oldCount + 1 to: self size for: aKedamaWorld. > - ]. > - whoTableValid := false. > - turtleMapValid := false. > - > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>addTurtlesCount:ofPrototype:for:randomize: (in category 'add turtles') ----- > - addTurtlesCount: count ofPrototype: prototype for: aKedamaWorld randomize: randomizeFlag > - > - | oldCount | > - oldCount := self size. > - info associationsDo: [:assoc | | array defaultValue newArray index | > - index := info at: assoc key. > - array := arrays at: index. > - defaultValue := prototype at: index. > - newArray := array class new: count. > - newArray atAllPut: defaultValue. > - arrays at: index put: (array, newArray). > - ]. > - > - self setInitialValueOf: #who from: oldCount + 1 to: self size for: aKedamaWorld. > - > - randomizeFlag ifTrue: [ > - #(x y heading) do: [:name | > - self setInitialValueOf: name from: oldCount + 1 to: self size for: aKedamaWorld. > - ]. > - ]. > - whoTableValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>arrayForType: (in category 'private') ----- > - arrayForType: typeName > - > - | newArray | > - (typeName = #Number) ifTrue: [ > - newArray := KedamaFloatArray new: self size. > - ]. > - (typeName = #Color) ifTrue: [ > - newArray := WordArray new: self size. > - ]. > - (typeName = #Boolean) ifTrue: [ > - newArray := ByteArray new: self size. > - ]. > - > - newArray ifNil: [ > - newArray := Array new: self size. > - ]. > - > - ^ newArray. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>arrays (in category 'accessing') ----- > - arrays > - > - ^ arrays. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>basicGetAngleTo: (in category 'player commands') ----- > - basicGetAngleTo: players > - > - | ret p xArray yArray result | > - players isCollection ifFalse: [ > - p := players > - ]. > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - result := KedamaFloatArray new: self size. > - 1 to: self size do: [:index | > - players isCollection ifTrue: [ > - p := players at: index. > - ]. > - ret := ((p getX - (xArray at: index))@(p getY - (yArray at: index))) theta radiansToDegrees + 90.0. > - ret > 360.0 ifTrue: [ret := ret - 360.0]. > - result at: index put: ret. > - ]. > - ^ result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>basicGetDistanceTo: (in category 'player commands') ----- > - basicGetDistanceTo: players > - > - | p xArray yArray result | > - players isCollection ifFalse: [ > - p := players > - ]. > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - result := KedamaFloatArray new: self size. > - 1 to: self size do: [:index | > - players isCollection ifTrue: [ > - p := players at: index. > - ]. > - result at: index put: ((p getX - (xArray at: index)) squared + (p getY - (yArray at: index)) squared) sqrt. > - > - ]. > - ^ result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>basicMakeTurtlesMap (in category 'turtle map') ----- > - basicMakeTurtlesMap > - > - | x y xArray yArray width height mapIndex whoArray | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - whoArray := arrays at: 1. > - width := kedamaWorld dimensions x. > - height := kedamaWorld dimensions y. > - turtlesMap atAllPut: 0. > - > - 1 to: self size do: [:index | > - x := (xArray at: index) truncated. > - y := (yArray at: index) truncated. > - mapIndex := (width * y) + x + 1. > - (0 < mapIndex and: [mapIndex <= turtlesMap size]) ifTrue: [ > - turtlesMap at: mapIndex put: (whoArray at: index). > - ]. > - ]. > - > - turtleMapValid := true. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>color: (in category 'player commands') ----- > - color: c > - > - c isColor ifTrue: [ > - self setColorVarAt: 5 put: ((c pixelValueForDepth: 32) bitAnd: 16rFFFFFF). > - ] ifFalse: [ > - self setColorVarAt: 5 put: c. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>colorFromPatch: (in category 'player commands') ----- > - colorFromPatch: aPatch > - > - | xArray yArray cArray patch | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - cArray := arrays at: 5. > - patch := aPatch costume renderedMorph. > - 1 to: self size do: [:i | > - cArray at: i put: ((patch pixelAtX: (xArray at: i) y: (yArray at: i)) bitAnd: 16rFFFFFF). > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>colorToPatch: (in category 'player commands') ----- > - colorToPatch: aPatch > - > - | xArray yArray cArray patch | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - cArray := arrays at: 5. > - patch := aPatch costume renderedMorph. > - 1 to: self size do: [:i | > - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: (cArray at: i). > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>compileAllAccessors (in category 'player protocol') ----- > - compileAllAccessors > - > - info keys do: [:k | > - (#(who x y heading color visible) includes: k) ifFalse: [ > - self compileVectorInstVarAccessorsFor: k. > - ]. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>compileVectorInstVarAccessorsFor: (in category 'player protocol') ----- > - compileVectorInstVarAccessorsFor: varName > - > - | nameString index type setPhrase | > - nameString := varName asString capitalized. > - index := info at: varName asSymbol. > - self class compileSilently: ('get', nameString, ' > - ^ ', '(arrays at: ', index printString, ')') > - classified: 'access'. > - > - type := types at: index. > - type = #Number ifTrue: [ > - setPhrase := 'setNumberVarAt:'. > - ]. > - type = #Boolean ifTrue: [ > - setPhrase := 'setBooleanVarAt:'. > - ]. > - type = #Color ifTrue: [ > - setPhrase := 'setColorVarAt:'. > - ]. > - setPhrase ifNil: [setPhrase := 'setObjectVarAt:']. > - > - self class compileSilently: ('set', nameString, ': xxxArg > - self ', setPhrase, index printString, ' put: xxxArg') > - classified: 'access'! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>delete (in category 'deleting') ----- > - delete > - > - exampler := nil. > - arrays := nil. > - whoTable := nil. > - turtlesMap := nil. > - self class removeFromSystem: false. > - self becomeForward: UnscriptedPlayer new > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>deleteTurtleID: (in category 'player commands') ----- > - deleteTurtleID: who > - > - | whoArray whoIndex | > - whoArray := arrays at: 1. > - whoIndex := whoArray indexOf: who ifAbsent: [^ self]. > - deletingIndex := whoIndex - 1. > - arrays withIndexDo: [:array :index | | newArray | > - newArray := (array copyFrom: 1 to: whoIndex - 1), (array copyFrom: whoIndex + 1 to: array size). > - arrays at: index put: newArray. > - ]. > - whoTableValid := false. > - turtleMapValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>doCommand: (in category 'command execution') ----- > - doCommand: aBlock > - > - ^ aBlock value: self. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>doDieCommand: (in category 'command execution') ----- > - doDieCommand: aBlock > - > - ^ exampler doDieCommand: aBlock. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>doExamplerCommand: (in category 'command execution') ----- > - doExamplerCommand: aBlock > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>doSequentialCommand: (in category 'command execution') ----- > - doSequentialCommand: aBlock > - > - ^ exampler doSequentialCommand: aBlock. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>drawOn: (in category 'displaying') ----- > - drawOn: aForm > - > - | xArray yArray colorArray visibleArray bits x y visible bitsIndex dimX dimY ret | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - colorArray := arrays at: 5. > - visibleArray := arrays at: 6. > - bits := aForm bits. > - dimX := aForm width. > - dimY := aForm height. > - > - ret := self primDrawOn: bits destWidth: dimX destHeight: dimY xArray: xArray yArray: yArray colorArray: colorArray visibleArray: visibleArray. > - ret ifNotNil: [^ self]. > - > - 1 to: self size do: [:index | > - x := (xArray at: index) truncated. > - y := (yArray at: index) truncated. > - visible := (visibleArray at: index) ~= 0. > - (visible and: [((x >= 0) and: [y >= 0]) and: [(x < dimX) and: [y < dimY]]]) ifTrue: [ > - bitsIndex := ((y * dimX) + x) + 1. > - bits at: bitsIndex put: (colorArray at: index). > - ]. > - ]. > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>exampler: (in category 'accessing') ----- > - exampler: e > - > - exampler := e. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>forward: (in category 'player commands') ----- > - forward: val > - > - exampler getGrouped ifFalse: [ > - self primForwardXArray: (arrays at: 2) yArray: (arrays at: 3) headingArray: (arrays at: 4) value: (val isNumber ifTrue: [val asFloat] ifFalse: [val]) destWidth: kedamaWorld wrapX asFloat destHeight: kedamaWorld wrapY asFloat leftEdgeMode: kedamaWorld leftEdgeModeMnemonic rightEdgeMode: kedamaWorld rightEdgeModeMnemonic topEdgeMode: kedamaWorld topEdgeModeMnemonic bottomEdgeMode: kedamaWorld bottomEdgeModeMnemonic. > - ] ifTrue: [ > - self groupForward: val > - ]. > - turtleMapValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getAngleTo: (in category 'player commands') ----- > - getAngleTo: players > - > - | p xArray yArray result pX pY xy | > - players isCollection ifFalse: [ > - p := players > - ]. > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - result := KedamaFloatArray new: self size. > - players isCollection ifTrue: [ > - pX := KedamaFloatArray new: players size. > - pY := KedamaFloatArray new: players size. > - 1 to: players size do: [:i | > - xy := (players at: i) getXAndY. > - pX at: i put: xy x. > - pY at: i put: xy y. > - ]. > - ] ifFalse: [ > - xy := p getXAndY. > - pX := xy x. > - pY := xy y. > - ]. > - ^ self primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getBlueComponentIn: (in category 'player commands') ----- > - getBlueComponentIn: aPatch > - > - | pix xArray yArray patch w | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - w := WordArray new: self size. > - 1 to: self size do: [:i | > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - w at: i put: (pix bitAnd: 16rFF). > - ]. > - ^ w. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getBooleanVarAt: (in category 'accessing - private') ----- > - getBooleanVarAt: index > - > - ^ arrays at: index. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getColor (in category 'player commands') ----- > - getColor > - > - ^ self getVarAt: 5. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getColorVarAt: (in category 'accessing - private') ----- > - getColorVarAt: index > - > - ^ (arrays at: index) collect: [:c | Color colorFromPixelValue: c depth: 32]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getDistanceTo: (in category 'player commands') ----- > - getDistanceTo: players > - > - | p xArray yArray result pX pY xy | > - players isCollection ifFalse: [ > - p := players > - ]. > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - result := KedamaFloatArray new: self size. > - players isCollection ifTrue: [ > - pX := KedamaFloatArray new: players size. > - pY := KedamaFloatArray new: players size. > - 1 to: players size do: [:i | > - xy := (players at: i) getXAndY. > - pX at: i put: xy x. > - pY at: i put: xy y. > - ]. > - ] ifFalse: [ > - xy := p getXAndY. > - pX := xy x. > - pY := xy y. > - ]. > - ^ self primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getGreenComponentIn: (in category 'player commands') ----- > - getGreenComponentIn: aPatch > - > - | pix xArray yArray patch w | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - w := WordArray new: self size. > - 1 to: self size do: [:i | > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - w at: i put: ((pix bitShift: -8) bitAnd: 16rFF). > - ]. > - ^ w. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getGrouped (in category 'player commands') ----- > - getGrouped > - > - ^ exampler getGrouped. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getHeading (in category 'player commands') ----- > - getHeading > - > - | heading result ret | > - heading := (arrays at: 4). > - result := KedamaFloatArray new: heading size. > - ret := self primGetHeading: heading into: result. > - ret ifNotNil: [^ result]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getNormal (in category 'player commands') ----- > - getNormal > - > - | result ret normal | > - normal := (arrays at: 7). > - result := KedamaFloatArray new: normal size. > - ret := self primGetHeading: normal into: result. > - ret ifNotNil: [^ result]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getPatchValueIn: (in category 'player commands') ----- > - getPatchValueIn: aPatch > - > - | w patch xArray yArray | > - w := WordArray new: self size. > - patch := aPatch costume renderedMorph. > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch pixelsAtXArray: xArray yArray: yArray into: w. > - ^ w. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getRedComponentIn: (in category 'player commands') ----- > - getRedComponentIn: aPatch > - > - | pix xArray yArray patch w | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - w := WordArray new: self size. > - 1 to: self size do: [:i | > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - w at: i put: ((pix bitShift: -16) bitAnd: 16rFF). > - ]. > - ^ w. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getTurtleAt: (in category 'player commands') ----- > - getTurtleAt: aPlayer > - > - | xy | > - aPlayer isCollection ifTrue: [ > - self error: 'should not happen'. > - ]. > - xy := aPlayer getXAndY. > - ^ (self aTurtleAtX: xy x y: xy y) ifNil: [^ aPlayer]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getTurtleOf: (in category 'player commands') ----- > - getTurtleOf: aBreedPlayer > - > - | xy | > - aBreedPlayer isCollection ifTrue: [ > - "self error: 'should not happen'." > - ^ aBreedPlayer. > - ]. > - xy := aBreedPlayer getXAndY. > - ^ (self aTurtleAtX: xy x y: xy y) ifNil: [^ aBreedPlayer]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getTurtleVisible (in category 'player commands') ----- > - getTurtleVisible > - > - ^ (turtles arrays at: 6) collect: [:t | t = 1]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getUphillIn: (in category 'player commands') ----- > - getUphillIn: aPatch > - > - | xArray yArray headingArray result patch | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - headingArray := arrays at: 4. > - result := KedamaFloatArray new: self size. > - patch := aPatch costume renderedMorph. > - 1 to: self size do: [:index | > - result at: index put: (patch > - uphillForTurtleX: (xArray at: index) > - turtleY: (yArray at: index) > - turtleHeading: (headingArray at: index)). > - ]. > - ^ result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getVarAt: (in category 'accessing - private') ----- > - getVarAt: index > - > - ^ arrays at: index. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getX (in category 'player commands') ----- > - getX > - > - | xArray | > - exampler getGrouped ifFalse: [ > - ^ arrays at: 2. > - ] ifTrue: [ > - xArray := arrays at: 2. > - xArray size = 0 ifTrue: [^ exampler getX]. > - ^ xArray first. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>getY (in category 'player commands') ----- > - getY > - > - | yArray | > - exampler getGrouped ifFalse: [ > - ^ arrays at: 3. > - ] ifTrue: [ > - yArray := arrays at: 3. > - yArray size = 0 ifTrue: [^ exampler getY]. > - ^ yArray first. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>groupForward: (in category 'private') ----- > - groupForward: dist > - > - | x y headingRadians | > - self size = 0 ifTrue: [^ self]. > - > - x := (arrays at: 2) first. > - y := (arrays at: 3) first. > - headingRadians := (arrays at: 4) first. > - self groupSetX: (x + (dist asFloat * headingRadians cos)). > - self groupSetY: (y - (dist asFloat * headingRadians sin)). > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>groupSetX: (in category 'private') ----- > - groupSetX: val > - > - | xArray headingArray origX origHeading leftEdgeMode rightEdgeMode newArray wrapX minX maxX | > - self size = 0 ifTrue: [^ self]. > - xArray := arrays at: 2. > - headingArray := arrays at: 4. > - > - origX := xArray first. > - origHeading := headingArray first. > - > - leftEdgeMode := kedamaWorld leftEdgeModeMnemonic. > - rightEdgeMode := kedamaWorld rightEdgeModeMnemonic. > - > - newArray := xArray collect: [:e | e + val - origX]. > - wrapX := kedamaWorld wrapX. > - minX := newArray min. > - maxX := newArray max. > - ((minX < 0.0) not and: [(maxX >= wrapX) not]) ifTrue: [ > - arrays at: 2 put: newArray. > - ^ self. > - ]. > - > - minX < 0.0 ifTrue: [ > - leftEdgeMode = 1 ifTrue: [ > - newArray withIndexDo: [:e :i | > - e < 0.0 ifTrue: [newArray at: i put: e + wrapX]. > - ]. > - ]. > - leftEdgeMode = 2 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - minX. > - ]. > - ]. > - leftEdgeMode = 3 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e + (minX * -2.0). > - ]. > - ]. > - ]. > - > - maxX >= wrapX ifTrue: [ > - rightEdgeMode = 1 ifTrue: [ > - newArray withIndexDo: [:e :i | > - e >= wrapX ifTrue: [newArray at: i put: e - wrapX]. > - ]. > - ]. > - rightEdgeMode = 2 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - (maxX - wrapX) - 2.35099e-038. > - ]. > - ]. > - rightEdgeMode = 3 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - ((maxX - wrapX) * 2.0) - 2.35099e-038. > - ]. > - ]. > - ]. > - > - arrays at: 2 put: newArray. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>groupSetY: (in category 'private') ----- > - groupSetY: val > - > - | yArray headingArray origY origHeading topEdgeMode bottomEdgeMode newArray wrapY minY maxY | > - self size = 0 ifTrue: [^ self]. > - yArray := arrays at: 3. > - headingArray := arrays at: 4. > - > - origY := yArray first. > - origHeading := headingArray first. > - > - topEdgeMode := kedamaWorld topEdgeModeMnemonic. > - bottomEdgeMode := kedamaWorld bottomEdgeModeMnemonic. > - > - newArray := yArray collect: [:e | e + val - origY]. > - wrapY := kedamaWorld wrapY. > - minY := newArray min. > - maxY := newArray max. > - ((minY < 0.0) not and: [(maxY >= wrapY) not]) ifTrue: [ > - arrays at: 3 put: newArray. > - ^ self. > - ]. > - > - minY < 0.0 ifTrue: [ > - topEdgeMode = 1 ifTrue: [ > - newArray withIndexDo: [:e :i | > - e < 0.0 ifTrue: [newArray at: i put: e + wrapY]. > - ]. > - ]. > - topEdgeMode = 2 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - minY. > - ]. > - ]. > - topEdgeMode = 3 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e + (minY * -2.0). > - ]. > - ]. > - ]. > - > - maxY >= wrapY ifTrue: [ > - bottomEdgeMode = 1 ifTrue: [ > - newArray withIndexDo: [:e :i | > - e >= wrapY ifTrue: [newArray at: i put: e - wrapY]. > - ]. > - ]. > - bottomEdgeMode = 2 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - (maxY - wrapY) - 2.35099e-038. > - ]. > - ]. > - bottomEdgeMode = 3 ifTrue: [ > - newArray withIndexDo: [:e :i | > - newArray at: i put: e - ((maxY - wrapY) * 2.0) - 2.35099e-038. > - ]. > - ]. > - ]. > - > - arrays at: 3 put: newArray. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>heading (in category 'player commands') ----- > - heading > - > - ^ self getHeading. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>heading: (in category 'player commands') ----- > - heading: degrees > - > - | deg | > - deg := degrees isNumber ifTrue: [degrees asFloat] ifFalse: [degrees]. > - self primSetHeading: (arrays at: 4) from: deg. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>hide (in category 'player commands') ----- > - hide > - > - (arrays at: 6) atAllPut: 0. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>indexOf: (in category 'enumeration') ----- > - indexOf: who > - > - | whoArray | > - whoTableValid ifTrue: [^ whoTable at: (who - whoTableBase)]. > - > - whoArray := arrays at: 1. > - > - whoArray size = 0 ifTrue: [^ 0]. > - > - whoTableBase := whoArray first - 1. > - whoTable := WordArray new: whoArray last - whoTableBase. > - 1 to: whoArray size do: [:w | > - whoTable at: (whoArray at: w) - whoTableBase put: w. > - ]. > - whoTableValid := true. > - > - ^ whoTable at: (who - whoTableBase). > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>info (in category 'accessing') ----- > - info > - > - ^ info. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>initialize (in category 'initialization') ----- > - initialize > - > - super initialize. > - info := IdentityDictionary new. > - info at: #who put: 1. > - info at: #x put: 2. > - info at: #y put: 3. > - info at: #heading put: 4. > - info at: #color put: 5. > - info at: #visible put: 6. > - info at: #normal put: 7. > - > - arrays := Array new: 7. > - arrays at: (info at: #who) put: (WordArray new: 0). > - arrays at: (info at: #x) put: (KedamaFloatArray new: 0). > - arrays at: (info at: #y) put: (KedamaFloatArray new: 0). > - arrays at: (info at: #heading) put: (KedamaFloatArray new: 0). > - arrays at: (info at: #color) put: (WordArray new: 0). > - arrays at: (info at: #visible) put: (ByteArray new: 0). > - arrays at: (info at: #normal) put: (KedamaFloatArray new: 0). > - > - types := Array new: 64. > - > - types at: 1 put: #Integer. > - types at: 2 put: #Number. > - types at: 3 put: #Number. > - types at: 4 put: #Number. > - types at: 5 put: #Color. > - types at: 6 put: #Boolean. > - types at: 7 put: #Number. > - > - whoTableValid := false. > - turtleMapValid := false. > - > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>initializeDeletingIndex (in category 'enumeration') ----- > - initializeDeletingIndex > - > - deletingIndex := 0. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>instSize (in category 'accessing') ----- > - instSize > - > - ^ arrays size. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>invalidateTurtleMap (in category 'turtle map') ----- > - invalidateTurtleMap > - > - turtleMapValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>makePrototypeFromFirstInstance (in category 'add turtles') ----- > - makePrototypeFromFirstInstance > - > - ^ (1 to: arrays size) collect: [:index | > - (arrays at: index) first > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>makeTurtlesMap (in category 'turtle map') ----- > - makeTurtlesMap > - > - | xArray yArray width height whoArray ret | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - whoArray := arrays at: 1. > - width := kedamaWorld dimensions x. > - height := kedamaWorld dimensions y. > - turtlesMap ifNil: [turtlesMap := WordArray new: width * height]. > - > - ret := self primMakeTurtlesMap: turtlesMap whoArray: whoArray xArray: xArray yArray: yArray width: width height: height. > - > - ret ifNil: [self basicMakeTurtlesMap]. > - > - turtleMapValid := true. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>nextDeletingIndex (in category 'enumeration') ----- > - nextDeletingIndex > - > - ^ deletingIndex := deletingIndex + 1. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>normal: (in category 'player commands') ----- > - normal: degrees > - > - | deg | > - deg := degrees isNumber ifTrue: [degrees asFloat] ifFalse: [degrees]. > - self primSetHeading: (arrays at: 7) from: deg. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>noteRenameOf:to:inPlayer: (in category 'player protocol') ----- > - noteRenameOf: oldSlotName to: newSlotName inPlayer: aPlayer > - > - self compileAllAccessors > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primDrawOn:destWidth:destHeight:xArray:yArray:colorArray:visibleArray: (in category 'primitives') ----- > - primDrawOn: destBits destWidth: destWidth destHeight: destHeight xArray: xArray yArray: yArray colorArray: colorArray visibleArray: visibleArray > - > - | x y visible bitsIndex | > - > - "^ KedamaPlugin doPrimitive: #drawTurtlesInArray." > - > - 1 to: xArray size do: [:i | > - x := (xArray at: i) asInteger. > - y := (yArray at: i) asInteger. > - visible := (visibleArray at: i). > - (visible ~= 0 and: [((x >= 0) and: [y >= 0]) and: [(x < destWidth) and: [y < destHeight]]]) ifTrue: [ > - bitsIndex := ((y * destWidth) + x) + 1. > - destBits at: bitsIndex put: (colorArray at: i). > - ] > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primForwardXArray:yArray:headingArray:value:destWidth:destHeight:leftEdgeMode:rightEdgeMode:topEdgeMode:bottomEdgeMode: (in category 'primitives') ----- > - primForwardXArray: xArray yArray: yArray headingArray: headingArray value: v destWidth: destWidth destHeight: destHeight leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode > - > - | dist newX newY | > - > - "^ KedamaPlugin doPrimitive: #primTurtlesForward." > - > - 1 to: xArray size do: [:i | > - v isCollection ifTrue: [ > - dist := (v at: i) asFloat. > - ] ifFalse: [ > - dist := v asFloat. > - ]. > - newX := (xArray at: i) + (dist * (headingArray at: i) cos). > - newY := (yArray at: i) - (dist * (headingArray at: i) sin). > - KedamaMorph scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode. > - KedamaMorph scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primGetAngleToX:toY:xArray:yArray:resultInto: (in category 'primitives') ----- > - primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result > - > - | ppx ppy x y ret | > - > - "^ KedamaPlugin doPrimitive: #vectorGetAngleTo." > - > - ppx := pX. > - ppy := pY. > - 1 to: result size do: [:index | > - pX isCollection ifTrue: [ > - ppx := pX at: index. > - ppy := pY at: index. > - ]. > - x := ppx - (xArray at: index). > - y := ppy - (yArray at: index). > - ret := (x@y) theta radiansToDegrees + 90.0. > - ret > 360.0 ifTrue: [ret := ret - 360.0]. > - result at: index put: ret. > - ]. > - ^ result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primGetDistanceToX:toY:xArray:yArray:resultInto: (in category 'primitives') ----- > - primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result > - > - | ppx ppy | > - > - "^ KedamaPlugin doPrimitive: #vectorGetDistanceTo." > - > - ppx := pX. > - ppy := pY. > - 1 to: result size do: [:index | > - pX isCollection ifTrue: [ > - ppx := pX at: index. > - ppy := pY at: index. > - ]. > - result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. > - > - ]. > - ^ result. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primGetHeading:into: (in category 'primitives') ----- > - primGetHeading: headingArray into: resultArray > - > - | heading | > - > - "^ KedamaPlugin doPrimitive: #getHeadingArrayInto." > - > - 1 to: headingArray size do: [:i | > - heading := headingArray at: i. > - heading := heading / 0.0174532925199433. > - heading := 90.0 - heading. > - heading > 0.0 ifFalse: [heading := heading + 360.0]. > - resultArray at: i put: heading. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primMakeTurtlesMap:whoArray:xArray:yArray:width:height: (in category 'primitives') ----- > - primMakeTurtlesMap: map whoArray: whoArray xArray: xArray yArray: yArray width: w height: h > - > - > - ^ nil. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primRandomRange:from:to:intoFloatArray:factor: (in category 'primitives') ----- > - primRandomRange: range from: from to: to intoFloatArray: aFloatArray factor: factor > - > - > - > - from to: to do: [:index | > - aFloatArray at: index put: (kedamaWorld random: range) asFloat * factor. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primRandomRange:from:to:intoIntegerArray:factor: (in category 'primitives') ----- > - primRandomRange: range from: from to: to intoIntegerArray: anIntegerArray factor: factor > - > - > - > - from to: to do: [:index | > - anIntegerArray at: index put: ((kedamaWorld random: range) asFloat * factor) asInteger. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primSetHeading:from: (in category 'primitives') ----- > - primSetHeading: headingArray from: val > - > - | heading | > - > - "^ KedamaPlugin doPrimitive: #setHeadingArrayFrom." > - > - val isCollection ifFalse: [ > - heading := val asFloat. > - heading := KedamaMorph degreesToRadians: heading. > - ]. > - > - 1 to: headingArray size do: [:i | > - val isCollection ifTrue: [ > - heading := val at: i. > - heading := KedamaMorph degreesToRadians: heading. > - ]. > - headingArray at: i put: heading. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primSetX:headingArray:value:destWidth:leftEdgeMode:rightEdgeMode: (in category 'primitives') ----- > - primSetX: xArray headingArray: headingArray value: v destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode > - > - | val newX | > - > - "^ KedamaPlugin doPrimitive: #turtlesSetX." > - > - v isCollection ifFalse: [ > - val := v asFloat. > - ]. > - > - 1 to: xArray size do: [:i | > - v isCollection ifTrue: [ > - newX := v at: i. > - ] ifFalse: [ > - newX := val. > - ]. > - KedamaMorph scalarXAt: i xArray: xArray headingArray: headingArray value: newX destWidth: destWidth leftEdgeMode: leftEdgeMode rightEdgeMode: rightEdgeMode. > - ]. > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>primSetY:headingArray:value:destHeight:topEdgeMode:bottomEdgeMode: (in category 'primitives') ----- > - primSetY: yArray headingArray: headingArray value: v destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode > - > - | val newY | > - > - "^ KedamaPlugin doPrimitive: #turtlesSetY." > - > - v isCollection ifFalse: [ > - val := v asFloat. > - ]. > - > - 1 to: yArray size do: [:i | > - v isCollection ifTrue: [ > - newY := v at: i. > - ] ifFalse: [ > - newY := val. > - ]. > - KedamaMorph scalarYAt: i yArray: yArray headingArray: headingArray value: newY destHeight: destHeight topEdgeMode: topEdgeMode bottomEdgeMode: bottomEdgeMode. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>removeSlotNamed: (in category 'player protocol') ----- > - removeSlotNamed: aSlotName > - > - | index newArrays | > - self basicRemoveSlotNamed: aSlotName. > - index := info at: aSlotName asSymbol ifAbsent: [^ self]. > - newArrays := (arrays copyFrom: 1 to: index - 1), (arrays copyFrom: index + 1 to: arrays size). > - types replaceFrom: index to: types size with: types startingAt: index + 1. > - > - info removeKey: aSlotName asSymbol. > - arrays := newArrays. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>removeVectorSlotNamed: (in category 'player protocol') ----- > - removeVectorSlotNamed: aSlotName > - > - | index newArrays | > - index := info at: aSlotName asSymbol ifAbsent: [^ self]. > - newArrays := (arrays copyFrom: 1 to: index - 1), (arrays copyFrom: index + 1 to: arrays size). > - types replaceFrom: index to: types size - 1 with: types startingAt: index + 1. > - > - info removeKey: aSlotName asSymbol. > - arrays := newArrays. > - self compileAllAccessors. > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>renameVectorSlot:newSlotName: (in category 'player protocol') ----- > - renameVectorSlot: oldSlotName newSlotName: newSlotName > - > - | index | > - index := info at: oldSlotName asSymbol ifAbsent: [^ self]. > - info removeKey: oldSlotName asSymbol. > - info at: newSlotName put: index. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setBlueComponentIn:to: (in category 'player commands') ----- > - setBlueComponentIn: aPatch to: value > - > - | xArray yArray patch component | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - value isCollection ifFalse: [ > - component := value asInteger bitAnd: 16rFF. > - ]. > - (1 to: self size) do: [:i | | pix | > - value isCollection ifTrue: [ > - component := (value at: i) asInteger bitAnd: 16rFF. > - ]. > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - pix := (pix bitAnd: 16rFFFF00) bitOr: component. > - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setBooleanVarAt:put: (in category 'accessing - private') ----- > - setBooleanVarAt: index put: v > - > - (v == true or: [v == false]) ifTrue: [ > - (arrays at: index) atAllPut: (v == true ifTrue: [1] ifFalse: [0]). > - ^ self. > - ]. > - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setColor: (in category 'player commands') ----- > - setColor: color > - > - ^ self color: color. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setColorVarAt:put: (in category 'accessing - private') ----- > - setColorVarAt: index put: cPixel > - > - cPixel isNumber ifTrue: [ > - (arrays at: index) atAllPut: cPixel. > - ^ self. > - ]. > - > - (arrays at: index) replaceFrom: 1 to: cPixel size with: cPixel startingAt: 1. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setGreenComponentIn:to: (in category 'player commands') ----- > - setGreenComponentIn: aPatch to: value > - > - | xArray yArray patch component | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - value isCollection ifFalse: [ > - component := (value asInteger bitAnd: 16rFF) bitShift: 8. > - ]. > - (1 to: self size) do: [:i | | pix | > - value isCollection ifTrue: [ > - component := ((value at: i) asInteger bitAnd: 16rFF) bitShift: 8. > - ]. > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - pix := (pix bitAnd: 16rFF00FF) bitOr: component. > - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setHeading: (in category 'player commands') ----- > - setHeading: degrees > - > - ^ self heading: degrees. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setInitialValueOf:from:to:for: (in category 'player commands') ----- > - setInitialValueOf: name from: from to: to for: aKedamaWorld > - > - | array max | > - array := arrays at: (info at: name). > - name = #who ifTrue: [ > - from to: to do: [:index | > - array at: index put: (aKedamaWorld nextTurtleID). > - ]. > - ^ self. > - ]. > - name = #x ifTrue: [ > - max := aKedamaWorld dimensions x * 100. > - self primRandomRange: max from: from to: to intoFloatArray: array factor: 0.01. > - ^ self. > - ]. > - name = #y ifTrue: [ > - max := aKedamaWorld dimensions y * 100. > - self primRandomRange: max from: from to: to intoFloatArray: array factor: 0.01. > - ^ self. > - ]. > - name = #heading ifTrue: [ > - self primRandomRange: 36000 from: from to: to intoFloatArray: array factor: (0.01 * 0.0174532925199433). > - ^ self. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setNormal: (in category 'player commands') ----- > - setNormal: degrees > - > - ^ self normal: degrees. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setNumberVarAt:put: (in category 'accessing - private') ----- > - setNumberVarAt: index put: v > - > - v isNumber ifTrue: [ > - (arrays at: index) atAllPut: v. > - ^ self. > - ]. > - (v isMemberOf: KedamaFloatArray) ifTrue: [ > - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. > - ^ self. > - ]. > - (v isMemberOf: WordArray) ifTrue: [ > - v primAddScalar: v and: 0.0 into: (arrays at: index). > - ^ self. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setObjectVarAt:put: (in category 'accessing - private') ----- > - setObjectVarAt: index put: v > - > - (v isKindOf: Array) ifFalse: [ > - (arrays at: index) atAllPut: v. > - ^ self. > - ]. > - (arrays at: index) replaceFrom: 1 to: v size with: v startingAt: 1. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setPatchValueIn:to: (in category 'player commands') ----- > - setPatchValueIn: aPatch to: value > - > - | xArray yArray patchMorph | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patchMorph := aPatch costume renderedMorph. > - patchMorph setPixelsAtXArray: xArray yArray: yArray value: value. > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setRedComponentIn:to: (in category 'player commands') ----- > - setRedComponentIn: aPatch to: value > - > - | xArray yArray patch component | > - xArray := arrays at: 2. > - yArray := arrays at: 3. > - patch := aPatch costume renderedMorph. > - value isCollection ifFalse: [ > - component := (value asInteger bitAnd: 16rFF) bitShift: 16. > - ]. > - (1 to: self size) do: [:i | | pix | > - value isCollection ifTrue: [ > - component := ((value at: i) asInteger bitAnd: 16rFF) bitShift: 16. > - ]. > - pix := patch pixelAtX: (xArray at: i) y: (yArray at: i). > - pix := (pix bitAnd: 16r00FFFF) bitOr: component. > - patch pixelAtX: (xArray at: i) y: (yArray at: i) put: pix. > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setTurtleVisible: (in category 'player commands') ----- > - setTurtleVisible: aBooleanArray > - > - 1 to: self size do: [:i | > - (turtles arrays at: 6) at: i put: ((aBooleanArray at: i) ifTrue: [1] ifFalse: [0]). > - ]. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setTurtlesCount:prototype:for:randomize: (in category 'add turtles') ----- > - setTurtlesCount: count prototype: prototype for: aKedamaWorld randomize: rondomizeFlag > - > - | anInteger | > - anInteger := count. > - count < 0 ifTrue: [anInteger := 0]. > - > - self size > anInteger ifTrue: [ > - info associationsDo: [:assoc | | array | > - array := (arrays at: assoc value). > - array := array copyFrom: 1 to: anInteger. > - arrays at: assoc value put: array. > - ]. > - turtleMapValid := false. > - whoTableValid := false. > - ]. > - > - self size < anInteger ifTrue: [ > - self addTurtlesCount: (anInteger - self size) ofPrototype: prototype for: aKedamaWorld randomize: rondomizeFlag. > - turtleMapValid := false. > - whoTableValid := false. > - > - ]. > - > - > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setVectorSlotTypeFor:typeChosen: (in category 'player protocol') ----- > - setVectorSlotTypeFor: slotName typeChosen: typeChosen > - > - | index initVar | > - index := info at: slotName asSymbol. > - index = 0 ifTrue: [^ self]. > - > - initVar := self initialValueForSlotOfType: typeChosen. > - > - types at: index put: typeChosen. > - > - self compileAllAccessors. > - arrays at: index put: (self arrayForType: typeChosen). > - self perform: ('set', slotName capitalized, ':') asSymbol with: initVar. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setX: (in category 'player commands') ----- > - setX: v > - > - exampler getGrouped ifFalse: [ > - self > - primSetX: (arrays at: 2) > - headingArray: (arrays at: 4) > - value: (v isNumber ifTrue: [v asFloat] ifFalse: [v]) > - destWidth: kedamaWorld wrapX > - leftEdgeMode: kedamaWorld leftEdgeModeMnemonic > - rightEdgeMode: kedamaWorld rightEdgeModeMnemonic. > - ] ifTrue: [ > - self groupSetX: v > - ]. > - turtleMapValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>setY: (in category 'player commands') ----- > - setY: v > - > - exampler getGrouped ifFalse: [ > - self > - primSetY: (arrays at: 3) > - headingArray: (arrays at: 4) > - value: (v isNumber ifTrue: [v asFloat] ifFalse: [v]) > - destHeight: kedamaWorld wrapY > - topEdgeMode: kedamaWorld topEdgeModeMnemonic > - bottomEdgeMode: kedamaWorld bottomEdgeModeMnemonic. > - ] ifTrue: [ > - self groupSetY: v. > - ]. > - turtleMapValid := false. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>show (in category 'player commands') ----- > - show > - > - (arrays at: 6) atAllPut: 1. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>size (in category 'accessing') ----- > - size > - > - ^ arrays first size. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>turn: (in category 'player commands') ----- > - turn: degrees > - "Turn by the given number of degrees." > - > - self heading: (self heading + degrees). > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>types (in category 'accessing') ----- > - types > - > - ^ types. > - ! > > Item was removed: > - ----- Method: KedamaTurtleVectorPlayer>>useKedamaFloatArray (in category 'private') ----- > - useKedamaFloatArray > - > - > - arrays withIndexDo: [:array :index | | newArray | > - (array isMemberOf: FloatArray) ifTrue: [ > - newArray := KedamaFloatArray new: array size. > - newArray replaceFrom: 1 to: array size with: array startingAt: 1. > - arrays at: index put: newArray. > - ]. > - ]. > - ! > > Item was removed: > - PackageInfo subclass: #MorphicGamesInfo > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Etoys-Squeakland-Morphic-Games'! > - > - !MorphicGamesInfo commentStamp: 'asm 7/5/2003 15:59' prior: 0! > - to create the package: > - > - in a 5325 image > - -file in SARBuilder > - > - SARPackageDumper fileOutPackageNamed: 'Morphic-Games' > - as: (FileDirectory default nextNameFor: 'Morphic-Games' extension: 'sar')! > > Item was removed: > - ----- Method: MorphicGamesInfo>>changesText (in category 'introspection') ----- > - changesText > - ^' > - version 6: included Rick McGeer''s Chess Castling Fix > - version 5: included Atomic (some changes were needed to make it work in 3.7) and some Babel stuff > - version 4: includes Andreas Raab''s rewrite of ChessConstants as declarative pool (update 5325) > - version 3: -added one change by the KCP team > - -Chess its playing again > - version 2: applied changes by the MCP team'! > > Item was removed: > - ----- Method: MorphicGamesInfo>>postscriptText (in category 'introspection') ----- > - postscriptText > - "Executed after load" > - ^ 'Utilities informUser: ''Generating Games thumbnails in PartsBin, please wait...'' during: [ > - PartsBin clearThumbnailCache. > - PartsBin cacheAllThumbnails. > - ]. > - "End ', self packageName, '"'! > > Item was removed: > - ----- Method: MorphicGamesInfo>>readmeText (in category 'introspection') ----- > - readmeText > - ^'Morphic-Games has the games that were in the image before 3.6: > - Chess, Chinese Checkers, Cipher, Crostic, FreeCell, Mines, Same and Tetris. > - plus Atomic'! > > Item was removed: > - ----- Method: Player class>>createTurtleSubclass (in category 'turtles') ----- > - createTurtleSubclass > - > - | instVarString classInstVarString aName aClass | > - instVarString := KedamaTurtleVectorPlayer instVarNames. > - classInstVarString := ''. > - aName := self chooseUniqueTurtleClassName. > - aClass := self subclass: aName instanceVariableNames: instVarString > - classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. > - classInstVarString size > 0 ifTrue: > - [aClass class instanceVariableNames: classInstVarString]. > - aClass copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer. > - ^ aClass > - ! > > Item was removed: > - ----- Method: SugarLauncher>>badgeFlap (in category 'presence') ----- > - badgeFlap > - "This finds or creates a flap to hold badges" > - > - | translatedFlapName flapTab flap spacer holder | > - translatedFlapName := 'Buddies' translated. > - flapTab := Flaps globalFlapTab: translatedFlapName. > - flapTab ifNotNil: [^flapTab]. > - > - flap := AlignmentMorph newRow. > - flap clipSubmorphs: true. > - flap beTransparent. > - flap layoutInset: 0; cellInset: 0; borderWidth: 0. > - flap setProperty: #wantsHaloFromClick toValue: false. > - flap beFlap: true. > - > - spacer := Morph new beTransparent. "This provides space for tabs to be seen." > - spacer width: 20. > - spacer hResizing: #rigid; vResizing: #spaceFill. > - flap addMorphBack: spacer. > - > - holder := Morph new. > - holder name: 'Badges'. > - holder position: 0@100. > - holder layoutPolicy: TableLayout new. > - holder color: Color red muchLighter; > - wrapDirection: #topToBottom; > - hResizing: #spaceFill; > - vResizing: #spaceFill; > - cellInset: 10; > - layoutInset: 10. > - flap addMorphBack: holder. > - > - flap beSticky. > - spacer beSticky; lock: true. > - holder beSticky. > - > - flapTab := FlapTab new. > - flapTab referent: flap. > - flapTab setName: translatedFlapName edge: #left color: Color red muchLighter. > - flapTab referentMargin: 0@75. > - flapTab setToPopOutOnDragOver: true. > - Flaps addGlobalFlap: flapTab. > - ActiveWorld addGlobalFlaps. > - ScriptingSystem cleanUpFlapTabsOnLeft. > - > - ^flapTab! > > Item was removed: > - ----- Method: SugarLauncher>>badgeFor: (in category 'presence') ----- > - badgeFor: aBuddy > - ^self badgeHolder submorphs > - detect: [:m | > - (m isKindOf: NebraskaSenderMorph) and: [ > - (m valueOfProperty: #buddy) = aBuddy]] > - ifNone: [nil] > - ! > > Item was removed: > - ----- Method: SugarLauncher>>badgeHolder (in category 'presence') ----- > - badgeHolder > - "This finds or creates a flap to hold badges" > - > - ^self badgeFlap referent submorphNamed: 'Badges' > - ! > > Item was removed: > - ----- Method: SugarLauncher>>buddies (in category 'presence') ----- > - buddies > - sharedActivity ifNil: [^Dictionary new]. > - buddies ifNil: [self setupBuddies]. > - ^buddies! > > Item was removed: > - ----- Method: SugarLauncher>>buddiesLock (in category 'presence') ----- > - buddiesLock > - ^buddiesLock ifNil: [buddiesLock := Semaphore forMutualExclusion]! > > Item was removed: > - ----- Method: SugarLauncher>>createJournalEntryFor:filename:mimetype: (in category 'datastore') ----- > - createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString > - | properties id | > - properties := self propertiesFrom: aProject. > - properties at: 'ctime' put: (properties at: 'mtime'). > - properties at: 'mime_type' put: mimetypeString. > - properties removeKey: 'uid' ifAbsent: []. "would confuse Sugar 0.82" > - aFilename ifEmpty: [properties at: 'title:text' put: 'Etoys' translated]. > - id := self dataStore create: properties with: aFilename squeakToUtf8 with: true. > - ^id asString! > > Item was removed: > - ----- Method: SugarLauncher>>deleteBadges (in category 'presence') ----- > - deleteBadges > - | flapTab | > - flapTab := (Flaps globalFlapTab: 'Buddies' translated) ifNil: [^self]. > - Flaps removeFlapTab: flapTab keepInList: false. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>deleteUnused: (in category 'datastore') ----- > - deleteUnused: filePath > - "Delete file if filePath is indeed unused" > - > - World submorphs do: [:m | > - (m isSystemWindow and: [ > - (m model isKindOf: FileList) and: [ > - m model fullName = filePath]]) ifTrue: [ > - ^self deleteUnused: filePath whenDoneWith: m]]. > - > - [FileDirectory deleteFilePath: filePath] on: Error do: ["ignore"] > - ! > > Item was removed: > - ----- Method: SugarLauncher>>deleteUnused:whenDoneWith: (in category 'datastore') ----- > - deleteUnused: fileName whenDoneWith: anObject > - "Delete fileName when anObject is not in use anymore" > - > - ^anObject > - toFinalizeSend: #deleteUnused: > - to: self > - with: fileName! > > Item was removed: > - ----- Method: SugarLauncher>>enableSharedActivitySignals (in category 'presence') ----- > - enableSharedActivitySignals > - sharedActivity onBuddyJoinedSend: #buddyJoined: to: self. > - sharedActivity onBuddyLeftSend: #buddyLeft: to: self. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>findJournalEntries:properties: (in category 'datastore') ----- > - findJournalEntries: query properties: propNames > - "query is either a String or a dictionary, e.g. {'mime_type'->'application/x-squeak-project'}. Answers an array of properties. If propNames is not nil, only the named properties will be returned (which will be more efficient)" > - ^(self dataStore find: query with: (propNames ifNil: [#()])) first! > > Item was removed: > - ----- Method: SugarLauncher>>getFile: (in category 'datastore') ----- > - getFile: id > - "answer a temporary file, will be deleted if not used anymore" > - | utf8Name file | > - utf8Name := self dataStore getFilename: id. > - utf8Name isEmptyOrNil ifTrue: [^nil]. > - file := FileStream readOnlyFileNamed: utf8Name utf8ToSqueak. > - self deleteUnused: file name whenDoneWith: file. > - ^file! > > Item was removed: > - ----- Method: SugarLauncher>>getProperties: (in category 'datastore') ----- > - getProperties: objectId > - | props | > - props := self dataStore getProperties: objectId. > - "Make sure the props we care about are strings" > - props at: 'title' ifPresent: [:value | props at: 'title' put: value asString utf8ToSqueak composeAccents]. > - props at: 'mime_type' ifPresent: [:value | props at: 'mime_type' put: value asString]. > - props at: 'uid' put: objectId asString. > - ^props! > > Item was removed: > - ----- Method: SugarLauncher>>handleStream:mimetype:titled: (in category 'datastore') ----- > - handleStream: tmpStream mimetype: mimetypeOrNil titled: title > - "tmpStream was opened from journal or other media. > - For simplicity, we re-use the file drop logic." > - > - ActiveHand lastEvent position: World center. > - [ > - [(ExternalDropHandler lookupExternalDropHandler: tmpStream) > - handle: tmpStream in: World dropEvent: ActiveHand lastEvent] > - ifError: [self inform: ('Cannot open {1}' translated format: {title})] > - ] ensure: [tmpStream ifNotNil: [tmpStream close]].! > > Item was removed: > - ----- Method: SugarLauncher>>joinSharedActivity (in category 'presence') ----- > - joinSharedActivity > - "join a shared activity on startup" > - Utilities informUser: 'Looking for shared activity ...' translated > - during: [ > - [sharedActivity := self presence getActivityById: self activityId] > - ifError: [^sharedActivity := nil]]. > - > - Utilities informUser: 'Joining activity ...' translated > - during: [ > - [sharedActivity join] ifError: [^sharedActivity := nil] . > - self setupBuddies. > - self setupTubes. > - self enableSharedActivitySignals. > - SugarNavigatorBar current ifNotNilDo: [:bar | bar joinSharedActivity]. > - ]. > - > - ! > > Item was removed: > - ----- Method: SugarLauncher>>leaveSharedActivity (in category 'presence') ----- > - leaveSharedActivity > - sharedActivity ifNotNil: [ > - sharedActivity leaveAsync. > - sharedActivity := nil. > - self buddiesLock critical: [buddies := nil]. > - self deleteBadges]. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>makeJournalEntryFor:filename:mimetype: (in category 'datastore') ----- > - makeJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString > - "If this is a new project (no journal id yet), create a new Journal object, and remember the new id. > - Otherwise, if this is an auto-save, update the existing Journal entry. > - But if it is an explicit save, always create a new entry. Which entry we continue to work on depends on the sugarAutoSave preference. If enabled (before 4.1), the new entry is just a checkpoint, the project continues to use the old id/entry, and will be saved again on quit. If disabled (default since 4.1), we switch to the newly created id/entry." > - | id | > - (id := aProject sugarObjectId) > - ifNil: [ > - id := self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString. > - aProject sugarObjectId: id. > - self monitorJournalEntry: id] > - ifNotNil: [ > - (Preferences sugarAutoSave and: [aProject projectParameterAt: #sugarAutoSave ifAbsent: [true]]) > - ifTrue: [self updateJournalEntry: id for: aProject filename: aFilename mimetype: mimetypeString] > - ifFalse: [ > - id := self createJournalEntryFor: aProject filename: aFilename mimetype: mimetypeString. > - Preferences sugarAutoSave ifFalse: [ > - self unmonitorJournalEntry: aProject sugarObjectId. > - aProject sugarObjectId: id. > - self monitorJournalEntry: id]]]! > > Item was removed: > - ----- Method: SugarLauncher>>monitorJournalEntry: (in category 'datastore') ----- > - monitorJournalEntry: objectId > - self dataStore > - onUpdated: objectId > - send: #updatedJournalEntry: > - to: self.! > > Item was removed: > - ----- Method: SugarLauncher>>propertiesFrom: (in category 'datastore') ----- > - propertiesFrom: aProject > - | preview autoSave props markFavorite setActivity | > - preview := [ByteArray streamContents: [:s | PNGReadWriter > - putForm: (aProject thumbnail asFormOfDepth: 16) > - onStream: s]] ifError: ['']. > - autoSave := aProject projectParameterAt: #sugarAutoSave ifAbsent: [true]. > - setActivity := Preferences sugarAutoSave not | autoSave. > - markFavorite := Preferences sugarAutoSave & autoSave not. > - props := (aProject sugarProperties ifNil: [Dictionary new]) copy. > - { > - 'activity' -> self bundleId. > - 'activity_id' -> (setActivity ifTrue: [self activityId] ifFalse: ['']). > - 'title:text' -> (self titleFromProject: aProject) squeakToUtf8. > - 'title_set_by_user' -> (aProject currentVersionNumber>0 ifTrue: ['1'] ifFalse: ['0']). > - 'keep' -> (markFavorite ifTrue: ['1'] ifFalse: ['0']). > - 'mtime' -> (DateAndTime now asString first: 19). > - 'timestamp' -> (DateAndTime now asUnixTime). > - 'preview' -> preview. > - 'icon-color' -> self ownerBuddy colors. > - } do: [:each | props add: each]. > - ^props > - ! > > Item was removed: > - ----- Method: SugarLauncher>>resumeJournalEntry: (in category 'datastore') ----- > - resumeJournalEntry: id > - | props file title project mimetype | > - props := self getProperties: id. > - title := props at: 'title' ifAbsent: ['untitled' translated]. > - mimetype := props at: 'mime_type' ifAbsent: ['']. > - > - mimetype isEmpty ifTrue: [^self welcome: '']. > - > - mimetype = 'application/x-squeak-project' ifFalse: [ > - "reuse drop code" > - WorldState addDeferredUIMessage: [ > - self open: id title: title mimetype: mimetype]. > - ^Project enterNew]. > - > - 'Loading a Project...' displaySequentialProgress: [ > - Display fillWhite;forceToScreen. > - file := self getFile: id. > - "load project and close temp file (which will thus be deleted)" > - project := ProjectLoading > - loadName: ((title copyReplaceAll: '/' with: '\') contractTo: 64) > - stream: file > - fromDirectory: nil > - withProjectView: nil. > - file close. > - project keepSugarProperties: props monitor: true. > - project projectParameterAt: #sugarAutoSave put: true. > - project enter]. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>setupBuddies (in category 'presence') ----- > - setupBuddies > - self badgeFlap. > - self buddiesLock critical: [buddies := Dictionary new]. > - sharedActivity getJoinedBuddies do: [:each | > - self buddyJoined: each]. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>sharePublicly: (in category 'presence') ----- > - sharePublicly: aBoolean > - sharedActivity ifNotNil: [^self]. > - > - sharedActivity := self presence > - shareActivity: self activityId > - with: self bundleId > - with: (self titleFromProject: Project current) squeakToUtf8 > - with: Dictionary new. "due to bug 4660 we can't pass properties directly" > - sharedActivity setProperties: ({'private' -> aBoolean not} as: Dictionary). > - self setupBuddies. > - self enableSharedActivitySignals. > - self setupTubes. > - ! > > Item was removed: > - ----- Method: SugarLauncher>>showBadges (in category 'presence') ----- > - showBadges > - self badgeFlap openFully! > > Item was removed: > - ----- Method: SugarLauncher>>titleFromProject: (in category 'datastore') ----- > - titleFromProject: aProject > - ^(aProject name beginsWith: 'Unnamed' translated) > - ifTrue: ['Etoys Project' translated] > - ifFalse: [aProject name]! > > Item was removed: > - ----- Method: SugarLauncher>>unmonitorJournalEntry: (in category 'datastore') ----- > - unmonitorJournalEntry: objectId > - self dataStore > - onUpdated: objectId > - send: nil > - to: self.! > > Item was removed: > - ----- Method: SugarLauncher>>updateJournalEntry: (in category 'datastore') ----- > - updateJournalEntry: id > - ^self updateJournalEntry: id > - for: Project current > - filename: '' > - mimetype: ''! > > Item was removed: > - ----- Method: SugarLauncher>>updateJournalEntry:for:filename:mimetype: (in category 'datastore') ----- > - updateJournalEntry: id for: aProject filename: aFilename mimetype: mimetypeString > - "Move aProject saved to aFilename into the datastore, delete aFilename" > - | properties | > - properties := self propertiesFrom: aProject. > - properties at: 'mime_type' put: mimetypeString. > - self dataStore update: id with: properties with: aFilename squeakToUtf8 with: true.! > > Item was removed: > - ----- Method: Utilities class>>defaultRepositoryChangeLogOn: (in category '*Etoys-Squeakland-fetching updates') ----- > - defaultRepositoryChangeLogOn: aStream > - "Transcript clear. Utilities defaultRepositoryChangeLogOn: Transcript" > - | repo updates latest previous latestVersion previousVersion added removed latestPackages previousPackages prevDep prevInfo latestInfo | > - repo := MCRepositoryGroup default repositories detect: [:r | > - r description = MCMcmUpdater defaultUpdateURL]. > - updates := repo allFileNames select: [:each | 'update-*.mcm' match: each]. > - updates := updates asSortedCollection: > - [:a :b | a splitInteger second > b splitInteger second]. > - latest := repo versionFromFileNamed: updates first. > - previous := repo versionFromFileNamed: updates second. > - latestVersion := self versionNumberAndDateFromConfig: latest. > - previousVersion := self versionNumberAndDateFromConfig: previous. > - aStream nextPutAll: 'Changes from v'; print: previousVersion first; > - nextPutAll: ' of '; print: previousVersion second; > - nextPutAll: ' to v'; print: latestVersion first; > - nextPutAll: ' of '; print: latestVersion second; > - nextPutAll: ':'; cr. > - aStream flush. > - latestPackages := latest dependencies collect: [:dep | dep package]. > - previousPackages := previous dependencies collect: [:dep | dep package]. > - added := latestPackages difference: previousPackages. > - removed := previousPackages difference: latestPackages. > - added ifNotEmpty: [ > - aStream nextPutAll: 'Added packages:'. > - added do: [:each | aStream space; nextPutAll: each name]. > - aStream cr]. > - removed ifNotEmpty: [ > - aStream nextPutAll: 'Removed packages:'. > - removed do: [:each | aStream space; nextPutAll: each name]. > - aStream cr]. > - latest dependencies do: [:latestDep | > - prevDep := previous dependencies detect: [:p | latestDep package = p package] ifNone: []. > - (prevDep notNil and: [prevDep versionInfo ~= latestDep versionInfo]) > - ifTrue: [ > - aStream nextPutAll: '--------------------'; cr. > - prevInfo := prevDep package workingCopy ancestry findAncestor: prevDep versionInfo. > - latestInfo := latestDep package workingCopy ancestry findAncestor: latestDep versionInfo. > - (latestInfo allAncestorsOnPathTo: prevInfo) reverse, {latestInfo} > - do: [:ver | aStream nextPutAll: ver name; cr; nextPutAll: ver message; cr] > - separatedBy: [aStream cr]]]. > - aStream flush > - ! > > Item was removed: > - ----- Method: Utilities class>>updateFromDefaultRepository (in category '*Etoys-Squeakland-fetching updates') ----- > - updateFromDefaultRepository > - | config | > - "Flush all caches. If a previous download failed this is often helpful" > - MCFileBasedRepository flushAllCaches. > - config := MCMcmUpdater updateFromDefaultRepository. > - config ifNil: [^self inform: 'Repository unavailable' translated]. > - self setSystemVersionFromConfig: config. > - self inform: ('Update completed. > - System version is now: > - {1}' translated format: {SystemVersion current asString}). > - ! > From commits at source.squeak.org Tue Sep 20 10:54:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 10:54:27 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.236.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.236.mcz ==================== Summary ==================== Name: EToys-tfel.236 Author: tfel Time: 20 September 2016, 12:53:18.013404 pm UUID: 4e58e94c-ad35-324e-8af8-0f0426cb9d10 Ancestors: EToys-tfel.235 - move forgotten method from OLPC-Display package into Etoys - until we have a final solution for project saving, install SISS into releases for squeakland =============== Diff against EToys-tfel.235 =============== Item was added: + ----- Method: Form>>isVirtualScreen (in category '*Etoys-OLPC-Display') ----- + isVirtualScreen + "Am I a virtual display screen?" + ^false! Item was added: + ----- Method: ReleaseBuilderSqueakland class>>installExtraPackages (in category 'preparing') ----- + installExtraPackages + + #('Meta-Implementation' 'Meta-Examples' 'SISS') do: [:pkg | + Installer swasource project: 'etoys-spur'; install: pkg].! Item was changed: ----- Method: ReleaseBuilderSqueakland class>>prepareEnvironment (in category 'preparing') ----- prepareEnvironment | directory entries projectNames | super prepareEnvironment. projectNames := #('Gallery' 'Tutorials' 'Home'). directory := FileDirectory on: Smalltalk imagePath. entries := FileList2 projectOnlySelectionMethod: directory entries. projectNames do: [:projectName | (entries anySatisfy: [:each | (Project parseProjectFileName: each first) first = projectName]) ifFalse: [self inform: projectName , ' is not found']]. + self installExtraPackages. DeferredTask := [ProjectLoading openFromImagePath: 'Home'].! From commits at source.squeak.org Tue Sep 20 11:43:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 11:43:18 2016 Subject: [squeak-dev] The Trunk: Tools-jl.727.mcz Message-ID: Jens Lincke uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-jl.727.mcz ==================== Summary ==================== Name: Tools-jl.727 Author: jl Time: 20 September 2016, 1:42:21.385902 pm UUID: 5ef2f6d9-b959-1d4c-81dc-db164dd7ee6e Ancestors: Tools-jl.725, Tools-bf.726 fix etoys project load dialog =============== Diff against Tools-bf.726 =============== Item was changed: ----- Method: FileList2 class>>morphicViewProjectLoader2InWorld:reallyLoad:dirFilterType: (in category 'blue ui') ----- morphicViewProjectLoader2InWorld: aWorld reallyLoad: aBoolean dirFilterType: aSymbol | window aFileList buttons treePane textColor1 fileListPane pane2a pane2b treeExtent filesExtent | window := AlignmentMorphBob1 newColumn. window hResizing: #shrinkWrap; vResizing: #shrinkWrap. textColor1 := Color r: 0.742 g: 0.839 b: 1.0. + aFileList := self new. - aFileList := self new directory: FileDirectory default. aFileList optionalButtonSpecs: aFileList servicesForProjectLoader; fileSelectionBlock: ( aSymbol == #limitedSuperSwikiDirectoryList ifTrue: [ MessageSend receiver: self selector: #projectOnlySelectionMethod: ] ifFalse: [ self projectOnlySelectionBlock ] ); "dirSelectionBlock: self hideSqueakletDirectoryBlock;" modalView: window. + aFileList directory: FileDirectory default. window setProperty: #FileList toValue: aFileList; wrapCentering: #center; cellPositioning: #topCenter; borderWidth: 1; borderColor: (Color r: 0.9 g: 0.801 b: 0.2); useRoundedCorners. buttons := {{'OK'. Color lightGreen}. {'Cancel'. Color lightRed}} collect: [ :each | self blueButtonText: each first textColor: textColor1 color: each second inWindow: window ]. aWorld width < 800 ifTrue: [ treeExtent := 150@300. filesExtent := 350@300. ] ifFalse: [ + treeExtent := 350@500. + filesExtent := 550@500. - treeExtent := 250@300. - filesExtent := 350@300. ]. (treePane := aFileList morphicDirectoryTreePaneFiltered: aSymbol) extent: treeExtent; retractable: false; borderWidth: 0. fileListPane := aFileList morphicFileListPane extent: filesExtent; retractable: false; borderWidth: 0. window addARow: { window fancyText: 'Load A Project' translated font: Preferences standardEToysTitleFont color: textColor1 }; addARowCentered: { buttons first. (Morph new extent: 30@5) color: Color transparent. buttons second }; addARow: { window fancyText: 'Please select a project' translated font: Preferences standardEToysFont color: textColor1 }; addARow: { (window inAColumn: {(pane2a := window inARow: {window inAColumn: {treePane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. (window inAColumn: {(pane2b := window inARow: {window inAColumn: {fileListPane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. }. window fullBounds. window fillWithRamp: (Color r: 1 g: 0.85 b: 0.975) oriented: 0.65. pane2a fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). pane2b fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). " buttons do: [ :each | each fillWithRamp: ColorTheme current dialogButtonsRampOrColor oriented: (0.75 @ 0). ]. " buttons first on: #mouseUp send: (aBoolean ifTrue: [#okHitForProjectLoader] ifFalse: [#okHit]) to: aFileList. buttons second on: #mouseUp send: #cancelHit to: aFileList. aFileList postOpen. window position: aWorld topLeft + (aWorld extent - window extent // 2). window adoptPaneColor: (Color r: 0.548 g: 0.677 b: 1.0). window becomeModal. ^ window openInWorld: aWorld.! From commits at source.squeak.org Tue Sep 20 11:49:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 11:49:47 2016 Subject: [squeak-dev] The Trunk: EToys-jl.237.mcz Message-ID: Jens Lincke uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-jl.237.mcz ==================== Summary ==================== Name: EToys-jl.237 Author: jl Time: 20 September 2016, 1:48:28.446902 pm UUID: 255d2987-bffc-ef4b-bb13-a862a8adbc86 Ancestors: EToys-jl.235, EToys-tfel.236 - distanceTo calculations in Kedama between groups of turtles - conditions in Kedama per turtle, not globally - fix for dynamically changing the size of a Kedama world =============== Diff against EToys-tfel.236 =============== Item was added: + ----- Method: KedamaExamplerPlayer>>getXAndY (in category 'slot getters/setters') ----- + getXAndY + + ^ self turtles getXAndY! Item was changed: ----- Method: KedamaMorph>>dimensions: (in category 'accessing') ----- dimensions: anExtent dimensions := anExtent. wrapX := dimensions x asFloat. wrapY := dimensions y asFloat. patchVarDisplayForm := Form extent: dimensions depth: 32. + patchesToDisplay ifNotNil: [ + patchesToDisplay do: [ :ea | + ea newExtent: anExtent. + ]. - patchesToDisplay do: [ :ea | - ea newExtent: anExtent. ]. self pixelsPerPatch: self pixelsPerPatch.! Item was added: + ----- Method: KedamaTurtlePlayer>>getXAndY (in category 'commands and slots') ----- + getXAndY + + ^ x@y. + ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2 class>>primGetDistanceToX:toY:xArray:yArray:resultInto: (in category 'as yet unclassified') ----- primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result + | ppx ppy tempMin | - | ppx ppy | "^ KedamaPlugin doPrimitive: #vectorGetDistanceTo." ppx := pX. ppy := pY. 1 to: result size do: [:index | pX isCollection ifTrue: [ + tempMin := SmallInteger maxVal. + 1 to: pX size do: [:index2 | + ppx := pX at: index2. + ppy := pY at: index2. + tempMin := tempMin min: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. + ]. + self flag: #todo. "should really also remember the other side index to re-use inside the script" + result at: index put: tempMin. + ] ifFalse: [ + result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. + ] - ppx := pX at: index. - ppy := pY at: index. - ]. - result at: index put: ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. - ]. ^ result. ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>getDistanceTo: (in category 'player commands') ----- getDistanceTo: players | p xArray yArray result pX pY xy | players isCollection ifFalse: [ p := players ]. xArray := arrays at: 2. yArray := arrays at: 3. result := KedamaFloatArray new: self size. players isCollection ifTrue: [ pX := KedamaFloatArray new: players size. pY := KedamaFloatArray new: players size. 1 to: players size do: [:i | xy := (players at: i) getXAndY. pX at: i put: xy x. pY at: i put: xy y. ]. ] ifFalse: [ + pX := p turtles getX. + pY := p turtles getY. - xy := p getXAndY. - pX := xy x. - pY := xy y. ]. ^ KedamaTurtleVectorPlayer2 primGetDistanceToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. ! Item was added: + ----- Method: KedamaTurtleVectorPlayer2>>getXAndY (in category 'player commands') ----- + getXAndY + | ys | + ys := self getY. + ^ self getX asArray withIndexCollect: [:ea :idx | ea @ (ys at: idx)] + ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>test:ifTrue:ifFalse: (in category 'command execution') ----- test: cond ifTrue: trueBlock ifFalse: falseBlock + | origPredicate c actualCond condValue | + - | origPredicate c actualCond | (cond == true or: [cond == false]) ifTrue: [ ^ cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. ]. actualCond := cond. cond isBlock ifTrue: [ actualCond := ByteArray new: predicate size. + condValue := cond value. + condValue isCollection + ifTrue: [ + actualCond := condValue. + ] ifFalse: [ + 1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])] + ] - 1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])] ]. origPredicate := predicate clone. predicate bytesAnd: actualCond. trueBlock value: self. c := actualCond clone. c not. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1. predicate bytesAnd: c. falseBlock value: self. predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1.! Item was changed: ----- Method: Object>>test:ifTrue:ifFalse: (in category '*Etoys-Squeakland-Tweak-Kedama') ----- test: cond ifTrue: trueBlock ifFalse: falseBlock + cond value ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. - cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self]. ! Item was added: + ----- Method: Player>>getXAndY (in category 'slot getters/setters') ----- + getXAndY + + ^ self getX @ self getY + ! Item was changed: ----- Method: WordArray>>eToysEQ: (in category '*Etoys-Squeakland-array arithmetic') ----- eToysEQ: other | result | + result := ByteArray new: self size. other isNumber ifTrue: [ ^ self primEQScalar: self and: other into: result. ]. other isCollection ifTrue: [ ^ self primEQArray: self and: other into: result. ]. + other isColor ifTrue: [ + ^ self primEQScalar: self and: (other pixelValueForDepth: 32) into: result. + ]. + ^ super = other. ! From giovanni at corriga.net Tue Sep 20 13:04:38 2016 From: giovanni at corriga.net (Giovanni Corriga) Date: Tue Sep 20 13:04:42 2016 Subject: [squeak-dev] UK Smalltalk User Group Meeting - Monday, September 26th Message-ID: Hi, The next meeting of the UK Smalltalk User Group Meeting will be on Monday, September 26th. We'll meet at our usual venue The Counting House ( http://www.the-counting-house.com/) at 7pm. If you'd like to join us, you can just show up at the pub. You can also sign up in advance at the meeting's Meetup page: https://www.meetup.com/UKSTUG/events/233567686/ . Thanks, Giovanni -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160920/c8146f1b/attachment.htm From commits at source.squeak.org Tue Sep 20 13:52:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 13:52:03 2016 Subject: [squeak-dev] The Trunk: EToys-jl.238.mcz Message-ID: Jens Lincke uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-jl.238.mcz ==================== Summary ==================== Name: EToys-jl.238 Author: jl Time: 20 September 2016, 3:50:57.399902 pm UUID: 4130651d-c6a9-1c43-a5aa-734f9e8d8202 Ancestors: EToys-jl.237 allow closing projects in the project history view morph. necessary because of changes to how project deletion works for trees of projects. =============== Diff against EToys-jl.237 =============== Item was added: + ----- Method: EToyProjectHistoryMorph>>confirmedDelete:evt:from: (in category 'as yet unclassified') ----- + confirmedDelete: aProject evt: evt from: origin + + self delete. + aProject = Project current ifTrue: [ + ^ self inform: 'Cannot delete current project' translated]. + (self confirm: ('Do you really want to delete {1} + and all its content?' translated format: {aProject name})) + ifTrue: [aProject delete].! Item was changed: ----- Method: EToyProjectHistoryMorph>>jumpToProject (in category 'as yet unclassified') ----- jumpToProject - | selection | - selection := (Project current buildJumpToMenu: MenuMorph new) invokeModal. self closeMyFlapIfAny. + Project current jumpToProject. + - Project current jumpToSelection: selection ! Item was changed: ----- Method: EToyProjectHistoryMorph>>rebuild (in category 'as yet unclassified') ----- rebuild | history r1 | history := ProjectHistory currentHistory mostRecentCopy. changeCounter := ProjectHistory changeCounter. self removeAllMorphs. self rubberBandCells: false. "enable growing" r1 := self addARow: { self inAColumn: { StringMorph new contents: 'Jump...' translated; lock. }. }. r1 on: #mouseUp send: #jumpToProject to: self. history do: [ :each | ( self addARow: { (self inAColumn: { StretchyImageMorph new form: each second; minWidth: 35; minHeight: 35; lock }) vResizing: #spaceFill. self inAColumn: { StringMorph new contents: each first; lock. + "StringMorph new contents: each fourth first; lock." - "StringMorph new contents: each third; lock." }. + (self inAColumn: { + StringMorph new + color: Color red; + contents: 'X'; + on: #mouseDown send: #confirmedDelete:evt:from: to: self withValue: each fourth first + }) hResizing: #rigid. } ) color: Color paleYellow; borderWidth: 1; borderColor: #raised; vResizing: #spaceFill; on: #mouseUp send: #mouseUp:in: to: self; on: #mouseDown send: #mouseDown:in: to: self; on: #mouseMove send: #mouseMove:in: to: self; on: #mouseLeave send: #mouseLeave:in: to: self; setProperty: #projectParametersTuple toValue: each; setBalloonText: (each third isEmptyOrNil ifTrue: ['not saved'] ifFalse: [each third]) ]. "--- newTuple := { aProject name. aProject thumbnail. aProject url. WeakArray with: aProject. }. ---"! Item was changed: ----- Method: SugarNavigatorBar>>newProject (in category 'the actions') ----- newProject + "Not creating a view. mt's refactoring of projects breaks the assumption that we can always delete a project and all it's children through a view anyway" MorphicProject new enter! From commits at source.squeak.org Tue Sep 20 16:21:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 16:21:16 2016 Subject: [squeak-dev] The Trunk: EToys-jl.240.mcz Message-ID: Jens Lincke uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-jl.240.mcz ==================== Summary ==================== Name: EToys-jl.240 Author: jl Time: 20 September 2016, 6:20:07.114902 pm UUID: 794a0157-9eed-c94b-a895-bdcb32650c0d Ancestors: EToys-jl.239 something went wrong =============== Diff against EToys-jl.238 =============== Item was changed: ----- Method: KedamaTurtleVectorPlayer2 class>>primGetAngleToX:toY:xArray:yArray:resultInto: (in category 'as yet unclassified') ----- primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result + | ppx ppy x y ret currentDist minDist nearestNeighbour | - | ppx ppy x y ret | "^ KedamaPlugin doPrimitive: #vectorGetAngleTo." ppx := pX. ppy := pY. 1 to: result size do: [:index | pX isCollection ifTrue: [ + minDist := SmallInteger maxVal. + 1 to: pX size do: [:index2 | + ppx := pX at: index2. + ppy := pY at: index2. + currentDist := ((ppx - (xArray at: index)) squared + (ppy - (yArray at: index)) squared) sqrt. + currentDist < minDist ifTrue: [ + minDist := currentDist. + nearestNeighbour := index2]]. + ppx := pX at: nearestNeighbour. + ppy := pY at: nearestNeighbour. - ppx := pX at: index. - ppy := pY at: index. ]. x := ppx - (xArray at: index). y := ppy - (yArray at: index). ret := (x@y) theta radiansToDegrees + 90.0. ret > 360.0 ifTrue: [ret := ret - 360.0]. result at: index put: ret. ]. ^ result. ! Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>getAngleTo: (in category 'player commands') ----- getAngleTo: players | p xArray yArray result pX pY xy | players isCollection ifFalse: [ p := players ]. xArray := arrays at: 2. yArray := arrays at: 3. result := KedamaFloatArray new: self size. players isCollection ifTrue: [ pX := KedamaFloatArray new: players size. pY := KedamaFloatArray new: players size. 1 to: players size do: [:i | xy := (players at: i) getXAndY. pX at: i put: xy x. pY at: i put: xy y. ]. ] ifFalse: [ + pX := p turtles getX. + pY := p turtles getY. - xy := p getXAndY. - pX := xy x. - pY := xy y. ]. ^ KedamaTurtleVectorPlayer2 primGetAngleToX: pX toY: pY xArray: xArray yArray: yArray resultInto: result. ! Item was changed: ----- Method: MessageAsTempNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 | t7 t8 t9 t10 t11 t13 | t5 ifFalse: [^ t1]. t9 := t2 at: self. (t9 select: [:t14 | t14 first notNil and: [t14 first isPrototypeTurtlePlayer]]) size = 0 ifTrue: [^ #none]. t4 = #sequential ifTrue: [^ #sequential]. t1 = #sequential ifTrue: [^ #sequential]. t3 ifNil: [^ #none]. t7 := t3 first. t4 = #condition ifTrue: [t11 := IdentitySet new. t13 := IdentitySet new. t9 do: [:t14 | (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) ~= #read]) ifTrue: [t14 first ifNotNil: [t13 add: t14 first]]. (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) = #read]) ifTrue: [t14 first ifNotNil: [t11 add: t14 first]]]. ((t13 intersection: t11) copyWithout: t7) ifNotEmpty: [^ #sequential]. ^ #parallel]. t11 := IdentitySet new. t13 := IdentitySet new. t8 := OrderedCollection new. t10 := OrderedCollection new. t9 do: [:t14 | t14 first = t7 ifTrue: [((t7 isBreedSelector: t14 second) or: [t7 isUserDefinedSelector: t14 second]) ifFalse: [t8 add: t14 second]]. t14 first ifNil: [t10 add: t14 second] ifNotNil: [(t14 at: 4) == #read ifTrue: [t11 add: t14 first]. (t14 at: 4) == #read ifFalse: [t13 add: t14 first]]. (t7 containsSequentialSelector: t14 second) ifTrue: [^ #sequential]]. (t8 includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [t6 = t7]) and: [t7 isBreedSelector: self property property]) ifTrue: [^ #none]. (t7 areOkaySelectors: t10) ifFalse: [^ #sequential]. (t7 vectorizableTheseSelectors: t8) ifFalse: [^ #sequential]. ((t11 intersection: t13) copyWithout: t7) ifNotEmpty: [^ #sequential]. self + nodesDo: [:t14 | (t14 isMessageNode + and: [t7 containsSequentialSelector: t14 selector]) - nodesDo: [:t14 | (t14 isLeaf - and: [t7 containsSequentialSelector: t14 key]) ifTrue: [^ #sequential]]. ^ #parallel! Item was changed: ----- Method: MessageNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 | t7 t8 t9 t10 t11 t13 | t5 ifFalse: [^ t1]. t9 := t2 at: self. (t9 select: [:t14 | t14 first notNil and: [t14 first isPrototypeTurtlePlayer]]) size = 0 ifTrue: [^ #none]. t4 = #sequential ifTrue: [^ #sequential]. t1 = #sequential ifTrue: [^ #sequential]. t3 ifNil: [^ #none]. t7 := t3 first. t4 = #condition ifTrue: [t11 := IdentitySet new. t13 := IdentitySet new. t9 do: [:t14 | (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) ~= #read]) ifTrue: [t14 first ifNotNil: [t13 add: t14 first]]. (((t14 at: 5) = #testBody or: [(t14 at: 5) = #testCond]) and: [(t14 at: 4) = #read]) ifTrue: [t14 first ifNotNil: [t11 add: t14 first]]]. ((t13 intersection: t11) copyWithout: t7) ifNotEmpty: [^ #sequential]. ^ #parallel]. t11 := IdentitySet new. t13 := IdentitySet new. t8 := OrderedCollection new. t10 := OrderedCollection new. t9 do: [:t14 | t14 first = t7 ifTrue: [((t7 isBreedSelector: t14 second) or: [t7 isUserDefinedSelector: t14 second]) ifFalse: [t8 add: t14 second]]. t14 first ifNil: [t10 add: t14 second] ifNotNil: [(t14 at: 4) == #read ifTrue: [t11 add: t14 first]. (t14 at: 4) == #read ifFalse: [t13 add: t14 first]]. (t7 containsSequentialSelector: t14 second) ifTrue: [^ #sequential]]. (t8 includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [t6 = t7]) and: [t7 isBreedSelector: self property property]) ifTrue: [^ #none]. (t7 areOkaySelectors: t10) ifFalse: [^ #sequential]. (t7 vectorizableTheseSelectors: t8) ifFalse: [^ #sequential]. ((t11 intersection: t13) copyWithout: t7) ifNotEmpty: [^ #sequential]. self + nodesDo: [:t14 | (t14 isMessageNode + and: [t7 containsSequentialSelector: t14 selector]) - nodesDo: [:t14 | (t14 isLeaf - and: [t7 containsSequentialSelector: t14 key]) ifTrue: [^ #sequential]]. ^ #parallel! From tim at rowledge.org Tue Sep 20 17:25:42 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue Sep 20 17:25:47 2016 Subject: [squeak-dev] Change line ending style in TextEditor? In-Reply-To: References: <7F420019-A1B3-45E5-A628-520437B3FAD1@rowledge.org> Message-ID: > On 20-09-2016, at 2:04 AM, Ben Coman wrote: > > http://wiki.lspace.org/mediawiki/Nuggan Exactly. If you haven?t read the Discworld books you a re missing out on one of life?s great treats. But then, if you want to use LF instead of CR, maybe you don?t deserver such a treat ?. > > Or maybe he's secretly a card carrying member of one of these ancient > churches... > Commodore 8-bit machines, Acorn BBC, ZX Spectrum, TRS-80, Apple II > family, Oberon, Mac OS up to version 9, MIT Lisp Machine and OS-9 RISC OS is the one true OS. Do not mention the spekkies or amigroids to anyone in Polite Society or face being Shunned Forever! > > bring out the holy hand grenade! What was that count again? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: MII: Mask all Interrupts and then Interrupt From javier_diaz_r at mac.com Tue Sep 20 19:30:50 2016 From: javier_diaz_r at mac.com (Javier Diaz-Reinoso) Date: Tue Sep 20 19:30:59 2016 Subject: [squeak-dev] Change line ending style in TextEditor? In-Reply-To: References: Message-ID: <251A9AF9-535E-4ECA-AE62-5311E54E66DE@mac.com> This is probably not exactly what you want but you can adapt the code; is a small changes to the ?workspace with content? menu in the File List window, this remember the correct name, directory and line ending of the document so it can save with the correct attributes: -------------- next part -------------- A non-text attachment was scrubbed... Name: BetterSaveWorkspace.5.cs.zip Type: application/zip Size: 1357 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160920/34dc9cb3/BetterSaveWorkspace.5.cs.zip -------------- next part -------------- > On Sep 19, 2016, at 20:27, Xin Wang wrote: > > Hi all, > > > Is there any way to change default line ending in TextEditor? Currently it defaults to CR, which will mess up files in UNIX line ending style. > > > Thanks, > Xin Wang > From commits at source.squeak.org Tue Sep 20 21:01:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 21:01:03 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1039.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1039.mcz ==================== Summary ==================== Name: Kernel-nice.1039 Author: nice Time: 20 September 2016, 11:00:27.302558 pm UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f Ancestors: Kernel-bf.1038 Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited. =============== Diff against Kernel-bf.1038 =============== Item was added: + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- + isDoubleWords + "Answer true if the receiver is made of 64-bit instance variables." + + ^self instSpec = 2r1001! Item was added: + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- + isHalfWords + "Answer true if the receiver is made of 16-bit instance variables." + + ^(self instSpec bitAnd: 2r11100) = 2r1100! Item was changed: ----- Method: Behavior>>isWords (in category 'testing') ----- isWords "Answer true if the receiver is made of 32-bit instance variables." + ^(self instSpec bitAnd: 2r11110) = 2r1010! - ^self isBytes not! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable double-word-sized nonpointer variables." + ^(ClassBuilder new) + superclass: self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat + ! Item was added: + ----- Method: Class>>variableDoubleWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable double-word-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableDoubleWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass + ! Item was added: + ----- Method: Class>>variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableHalfWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable half-word-sized nonpointer variables." + ^(ClassBuilder new) + superclass: self + variableHalfWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat + ! Item was added: + ----- Method: Class>>variableHalfWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- + variableHalfWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class (the receiver) in which the subclass is to + have indexable half-word-sized nonpointer variables." + + | newClass copyOfOldClass | + copyOfOldClass := self copy. + newClass := self + variableHalfWordSubclass: t + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat. + + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. + SystemChangeNotifier uniqueInstance + classDefinitionChangedFrom: copyOfOldClass to: newClass. + ^newClass! Item was changed: ----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass variableByteSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class in which the subclass is to have indexable byte-sized nonpointer variables." | oldClassOrNil actualType env | (aClass instSize > 0) ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. (aClass isVariable and: [aClass isWords]) ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with half word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a byte subclass of a class with double word fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. oldClassOrNil := aClass environment at: t ifAbsent:[nil]. actualType := (oldClassOrNil notNil and: [oldClassOrNil typeOfClass == #compiledMethod]) ifTrue: [#compiledMethod] ifFalse: [#bytes]. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: actualType instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableDoubleWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class in which the subclass is to + have indexable double-word-sized nonpointer variables." + | env | + (aClass instSize > 0) + ifTrue: [^self error: 'cannot make a double word subclass of a class with named fields']. + (aClass isVariable and: [aClass isBytes]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with half word fields']. + (aClass isVariable and: [aClass isWords]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with word fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a double word subclass of a class with pointer fields']. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #longs + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was added: + ----- Method: ClassBuilder>>superclass:variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- + superclass: aClass + variableHalfWordSubclass: t instanceVariableNames: f + classVariableNames: d poolDictionaries: s category: cat + "This is the standard initialization message for creating a new class as a + subclass of an existing class in which the subclass is to + have indexable half-word-sized nonpointer variables." + | env | + (aClass instSize > 0) + ifTrue: [^self error: 'cannot make a half word subclass of a class with named fields']. + (aClass isVariable and: [aClass isBytes]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isWords]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with double word fields']. + (aClass isVariable and: [aClass isPointers]) + ifTrue: [^self error: 'cannot make a half word subclass of a class with pointer fields']. + env := CurrentEnvironment signal ifNil: [aClass environment]. + ^self + name: t + inEnvironment: env + subclassOf: aClass + type: #shorts + instanceVariableNames: f + classVariableNames: d + poolDictionaries: s + category: cat! Item was changed: ----- Method: ClassBuilder>>superclass:variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- superclass: aClass variableWordSubclass: t instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat "This is the standard initialization message for creating a new class as a subclass of an existing class in which the subclass is to have indexable word-sized nonpointer variables." | env | (aClass instSize > 0) ifTrue: [^self error: 'cannot make a word subclass of a class with named fields']. (aClass isVariable and: [aClass isBytes]) ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields']. + (aClass isVariable and: [aClass isHalfWords]) + ifTrue: [^self error: 'cannot make a word subclass of a class with half word fields']. + (aClass isVariable and: [aClass isDoubleWords]) + ifTrue: [^self error: 'cannot make a word subclass of a class with double word fields']. (aClass isVariable and: [aClass isPointers]) ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields']. env := CurrentEnvironment signal ifNil: [aClass environment]. ^self name: t inEnvironment: env subclassOf: aClass type: #words instanceVariableNames: f classVariableNames: d poolDictionaries: s category: cat! From commits at source.squeak.org Tue Sep 20 21:02:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 21:02:55 2016 Subject: [squeak-dev] The Inbox: KernelTests-nice.312.mcz Message-ID: Nicolas Cellier uploaded a new version of KernelTests to project The Inbox: http://source.squeak.org/inbox/KernelTests-nice.312.mcz ==================== Summary ==================== Name: KernelTests-nice.312 Author: nice Time: 20 September 2016, 11:02:44.892325 pm UUID: 20bb751e-7ac1-4e91-8437-9f2cdcb8df5c Ancestors: KernelTests-mt.311 ClassBuilder tests for half and double word variable subclasses =============== Diff against KernelTests-mt.311 =============== Item was added: + ----- Method: ClassBuilderTest>>makeDoubleWordVariableSubclassOf: (in category 'utilities') ----- + makeDoubleWordVariableSubclassOf: aClass + ^ aClass variableDoubleWordSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was added: + ----- Method: ClassBuilderTest>>makeHalfWordVariableSubclassOf: (in category 'utilities') ----- + makeHalfWordVariableSubclassOf: aClass + ^ aClass variableHalfWordSubclass: self subClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses! Item was changed: ----- Method: ClassBuilderTest>>testByteVariableSubclass (in category 'testing - format') ----- testByteVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableByteSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" subClass := self makeByteVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). self deny: (subClass isWeak). self assert: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testDoubleWordVariableSubclass (in category 'testing - format') ----- + testDoubleWordVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableDoubleWordSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isDoubleWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isWords). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeDoubleWordVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isDoubleWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isWords). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was added: + ----- Method: ClassBuilderTest>>testHalfWordVariableSubclass (in category 'testing - format') ----- + testHalfWordVariableSubclass + "Ensure that the invariants for superclass/subclass format are preserved" + baseClass := Object variableHalfWordSubclass: self baseClassName + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: self categoryNameForTemporaryClasses. + [ + subClass := self makeNormalSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isHalfWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isDoubleWords). + subClass removeFromSystem. + + "pointer classes" + self should:[self makeIVarsSubclassOf: baseClass] raise: Error. + self should:[self makeVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWeakSubclassOf: baseClass] raise: Error. + + "bit classes" + self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. + subClass := self makeHalfWordVariableSubclassOf: baseClass. + self deny: (subClass isPointers). + self assert: (subClass isVariable). + self assert: (subClass isHalfWords). + self deny: (subClass isWeak). + self deny: (subClass isBytes). + self deny: (subClass isWords). + self deny: (subClass isDoubleWords). + subClass removeFromSystem. + ] ensure:[self cleanup].! Item was changed: ----- Method: ClassBuilderTest>>testWordVariableSubclass (in category 'testing - format') ----- testWordVariableSubclass "Ensure that the invariants for superclass/subclass format are preserved" baseClass := Object variableWordSubclass: self baseClassName instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: self categoryNameForTemporaryClasses. [ subClass := self makeNormalSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. "pointer classes" self should:[self makeIVarsSubclassOf: baseClass] raise: Error. self should:[self makeVariableSubclassOf: baseClass] raise: Error. self should:[self makeWeakSubclassOf: baseClass] raise: Error. "bit classes" self should:[self makeByteVariableSubclassOf: baseClass] raise: Error. + self should:[self makeHalfWordVariableSubclassOf: baseClass] raise: Error. + self should:[self makeDoubleWordVariableSubclassOf: baseClass] raise: Error. subClass := self makeWordVariableSubclassOf: baseClass. self deny: (subClass isPointers). self assert: (subClass isVariable). + self assert: (subClass isWords). self deny: (subClass isWeak). self deny: (subClass isBytes). + self deny: (subClass isHalfWords). + self deny: (subClass isDoubleWords). subClass removeFromSystem. ] ensure:[self cleanup].! From commits at source.squeak.org Tue Sep 20 21:05:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 21:05:37 2016 Subject: [squeak-dev] The Inbox: Monticello-nice.649.mcz Message-ID: Nicolas Cellier uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-nice.649.mcz ==================== Summary ==================== Name: Monticello-nice.649 Author: nice Time: 20 September 2016, 11:05:23.764791 pm UUID: 21077de5-41b3-4bd4-99ee-93cb5aca0301 Ancestors: Monticello-mt.648 Support for half and double word variable subclasses =============== Diff against Monticello-mt.648 =============== Item was changed: ----- Method: MCClassDefinition>>kindOfSubclass (in category 'printing') ----- kindOfSubclass type = #normal ifTrue: [^' subclass: ']. type = #variable ifTrue: [^' variableSubclass: ']. type = #bytes ifTrue: [^' variableByteSubclass: ']. type = #compiledMethod ifTrue: [^' variableByteSubclass: ' ]. + type = #shorts ifTrue: [^' variableHalfWordSubclass: ']. type = #words ifTrue: [^' variableWordSubclass: ']. + type = #longs ifTrue: [^' variableDoubleWordSubclass: ']. type = #weak ifTrue: [^' weakSubclass: ' ]. type = #ephemeron ifTrue: [^' ephemeronSubclass: ' ]. type = #immediate ifTrue: [^' immediateSubclass: ' ]. self error: 'Unrecognized class type' ! Item was changed: ----- Method: MCStReader>>typeOfSubclass: (in category 'as yet unclassified') ----- typeOfSubclass: aSymbol #( (subclass: normal) (variableSubclass: variable) (variableByteSubclass: bytes) + (variableHalfWordSubclass: shorts) (variableWordSubclass: words) + (variableDoubleWordSubclass: longs) (weakSubclass: weak) (ephemeronSubclass: ephemeron) (immediateSubclass: immediate) ) do: [:ea | ea first = aSymbol ifTrue: [^ ea second]]. self error: 'Unrecognized class definition'! From commits at source.squeak.org Tue Sep 20 21:18:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 21:18:13 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1040.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1040.mcz ==================== Summary ==================== Name: Kernel-nice.1040 Author: nice Time: 20 September 2016, 11:16:58.635456 pm UUID: 02e2c754-2964-4b4a-8f91-102bd6c3a92d Ancestors: Kernel-nice.1039 Prefer HalfWord to DoubleByte =============== Diff against Kernel-nice.1039 =============== Item was changed: ----- Method: Behavior>>kindOfSubclass (in category 'testing class hierarchy') ----- kindOfSubclass "Answer a String that is the keyword that describes the receiver's kind of subclass, either a regular subclass, a variableSubclass, a variableByteSubclass, a variableWordSubclass, a weakSubclass, an ephemeronSubclass or an immediateSubclass. c.f. typeOfClass & instSpec" ^(#(' subclass: ' ' subclass: ' ' variableSubclass: ' ' variableSubclass: ' ' weakSubclass: ' ' ephemeronSubclass: ' nil ' immediateSubclass: ' nil ' variableDoubleWordSubclass: ' ' variableWordSubclass: ' nil + ' variableHalfWordSubclass: ' nil nil nil - ' variableDoubleByteSubclass: ' nil nil nil ' variableByteSubclass: ' nil nil nil nil nil nil nil ' variableByteSubclass: ' nil nil nil nil nil nil nil ) at: self instSpec + 1) ifNil: [self error: 'invalid class type']! From asqueaker at gmail.com Tue Sep 20 21:42:13 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue Sep 20 21:42:58 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1039.mcz In-Reply-To: <57e1a392.c947370a.1b007.15c1SMTPIN_ADDED_MISSING@mx.google.com> References: <57e1a392.c947370a.1b007.15c1SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Cool. So we already have variableWord subclasses which provide a 32-bit integral per slot. This adds variableHalfWord and variableDoubleWord for 16 and 64-bit slots sizes, respectively. May I assume these new class formats will work fine in both 32 and 64-bit spur images? Applications should be careful about assuming (#isWords =false) = (#isBytes = true) in this broader context. On Tue, Sep 20, 2016 at 4:00 PM, wrote: > Nicolas Cellier uploaded a new version of Kernel to project The Inbox: > http://source.squeak.org/inbox/Kernel-nice.1039.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.1039 > Author: nice > Time: 20 September 2016, 11:00:27.302558 pm > UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f > Ancestors: Kernel-bf.1038 > > Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited. > > =============== Diff against Kernel-bf.1038 =============== > > Item was added: > + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- > + isDoubleWords > + "Answer true if the receiver is made of 64-bit instance variables." > + > + ^self instSpec = 2r1001! > > Item was added: > + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- > + isHalfWords > + "Answer true if the receiver is made of 16-bit instance variables." > + > + ^(self instSpec bitAnd: 2r11100) = 2r1100! > > Item was changed: > ----- Method: Behavior>>isWords (in category 'testing') ----- > isWords > "Answer true if the receiver is made of 32-bit instance variables." > > + ^(self instSpec bitAnd: 2r11110) = 2r1010! > - ^self isBytes not! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class (the receiver) in which the subclass is to > + have indexable double-word-sized nonpointer variables." > + ^(ClassBuilder new) > + superclass: self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat > + ! > > Item was added: > + ----- Method: Class>>variableDoubleWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- > + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class (the receiver) in which the subclass is to > + have indexable double-word-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableDoubleWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass > + ! > > Item was added: > + ----- Method: Class>>variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- > + variableHalfWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class (the receiver) in which the subclass is to > + have indexable half-word-sized nonpointer variables." > + ^(ClassBuilder new) > + superclass: self > + variableHalfWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat > + ! > > Item was added: > + ----- Method: Class>>variableHalfWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') ----- > + variableHalfWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class (the receiver) in which the subclass is to > + have indexable half-word-sized nonpointer variables." > + > + | newClass copyOfOldClass | > + copyOfOldClass := self copy. > + newClass := self > + variableHalfWordSubclass: t > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat. > + > + newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition. > + SystemChangeNotifier uniqueInstance > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > + ^newClass! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- > superclass: aClass > variableByteSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new class as a > subclass of an existing class in which the subclass is to > have indexable byte-sized nonpointer variables." > | oldClassOrNil actualType env | > (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields']. > (aClass isVariable and: [aClass isWords]) > ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a byte subclass of a class with half word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a byte subclass of a class with double word fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields']. > oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > actualType := (oldClassOrNil notNil > and: [oldClassOrNil typeOfClass == #compiledMethod]) > ifTrue: [#compiledMethod] > ifFalse: [#bytes]. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: actualType > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- > + superclass: aClass > + variableDoubleWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class in which the subclass is to > + have indexable double-word-sized nonpointer variables." > + | env | > + (aClass instSize > 0) > + ifTrue: [^self error: 'cannot make a double word subclass of a class with named fields']. > + (aClass isVariable and: [aClass isBytes]) > + ifTrue: [^self error: 'cannot make a double word subclass of a class with byte fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a double word subclass of a class with half word fields']. > + (aClass isVariable and: [aClass isWords]) > + ifTrue: [^self error: 'cannot make a double word subclass of a class with word fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a double word subclass of a class with pointer fields']. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #longs > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was added: > + ----- Method: ClassBuilder>>superclass:variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- > + superclass: aClass > + variableHalfWordSubclass: t instanceVariableNames: f > + classVariableNames: d poolDictionaries: s category: cat > + "This is the standard initialization message for creating a new class as a > + subclass of an existing class in which the subclass is to > + have indexable half-word-sized nonpointer variables." > + | env | > + (aClass instSize > 0) > + ifTrue: [^self error: 'cannot make a half word subclass of a class with named fields']. > + (aClass isVariable and: [aClass isBytes]) > + ifTrue: [^self error: 'cannot make a half word subclass of a class with byte fields']. > + (aClass isVariable and: [aClass isWords]) > + ifTrue: [^self error: 'cannot make a half word subclass of a class with word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a half word subclass of a class with double word fields']. > + (aClass isVariable and: [aClass isPointers]) > + ifTrue: [^self error: 'cannot make a half word subclass of a class with pointer fields']. > + env := CurrentEnvironment signal ifNil: [aClass environment]. > + ^self > + name: t > + inEnvironment: env > + subclassOf: aClass > + type: #shorts > + instanceVariableNames: f > + classVariableNames: d > + poolDictionaries: s > + category: cat! > > Item was changed: > ----- Method: ClassBuilder>>superclass:variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') ----- > superclass: aClass > variableWordSubclass: t instanceVariableNames: f > classVariableNames: d poolDictionaries: s category: cat > "This is the standard initialization message for creating a new class as a > subclass of an existing class in which the subclass is to > have indexable word-sized nonpointer variables." > | env | > (aClass instSize > 0) > ifTrue: [^self error: 'cannot make a word subclass of a class with named fields']. > (aClass isVariable and: [aClass isBytes]) > ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields']. > + (aClass isVariable and: [aClass isHalfWords]) > + ifTrue: [^self error: 'cannot make a word subclass of a class with half word fields']. > + (aClass isVariable and: [aClass isDoubleWords]) > + ifTrue: [^self error: 'cannot make a word subclass of a class with double word fields']. > (aClass isVariable and: [aClass isPointers]) > ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields']. > env := CurrentEnvironment signal ifNil: [aClass environment]. > ^self > name: t > inEnvironment: env > subclassOf: aClass > type: #words > instanceVariableNames: f > classVariableNames: d > poolDictionaries: s > category: cat! > > From commits at source.squeak.org Tue Sep 20 21:55:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 20 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160920215509.27233.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068934.html Name: EToys-tfel.235 Ancestors: EToys-bf.234 - begin removal of old Kedama classes, to eventually replace everything with Kedama2 - move SugarLauncher code that needs Dbus into SugarDBus package - remove unused BooleanPreferenceView and HaloThemePrefernceView classes - remove unused MorphicGamesInfo class - remove old Utilities methods that got moved into McmUpdater and re-added by the merge heuristic ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068935.html Name: EToys-tfel.236 Ancestors: EToys-tfel.235 - move forgotten method from OLPC-Display package into Etoys - until we have a final solution for project saving, install SISS into releases for squeakland ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068936.html Name: Tools-jl.727 Ancestors: Tools-jl.725, Tools-bf.726 fix etoys project load dialog ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068937.html Name: EToys-jl.237 Ancestors: EToys-jl.235, EToys-tfel.236 - distanceTo calculations in Kedama between groups of turtles - conditions in Kedama per turtle, not globally - fix for dynamically changing the size of a Kedama world ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068938.html Name: EToys-jl.238 Ancestors: EToys-jl.237 allow closing projects in the project history view morph. necessary because of changes to how project deletion works for trees of projects. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068939.html Name: EToys-jl.240 Ancestors: EToys-jl.239 something went wrong ============================================= From nicolas.cellier.aka.nice at gmail.com Wed Sep 21 06:47:11 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 21 06:47:17 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1039.mcz In-Reply-To: References: <57e1a392.c947370a.1b007.15c1SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-09-20 23:42 GMT+02:00 Chris Muller : > Cool. So we already have variableWord subclasses which provide a > 32-bit integral per slot. This adds variableHalfWord and > variableDoubleWord for 16 and 64-bit slots sizes, respectively. May I > assume these new class formats will work fine in both 32 and 64-bit > spur images? > > yes, but there's currently problems with JIT at least for x64... > Applications should be careful about assuming (#isWords =false) = > (#isBytes = true) in this broader context. > > yes > On Tue, Sep 20, 2016 at 4:00 PM, wrote: > > Nicolas Cellier uploaded a new version of Kernel to project The Inbox: > > http://source.squeak.org/inbox/Kernel-nice.1039.mcz > > > > ==================== Summary ==================== > > > > Name: Kernel-nice.1039 > > Author: nice > > Time: 20 September 2016, 11:00:27.302558 pm > > UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f > > Ancestors: Kernel-bf.1038 > > > > Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which > are possible in Spur format, but yet not exploited. > > > > =============== Diff against Kernel-bf.1038 =============== > > > > Item was added: > > + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- > > + isDoubleWords > > + "Answer true if the receiver is made of 64-bit instance > variables." > > + > > + ^self instSpec = 2r1001! > > > > Item was added: > > + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- > > + isHalfWords > > + "Answer true if the receiver is made of 16-bit instance > variables." > > + > > + ^(self instSpec bitAnd: 2r11100) = 2r1100! > > > > Item was changed: > > ----- Method: Behavior>>isWords (in category 'testing') ----- > > isWords > > "Answer true if the receiver is made of 32-bit instance > variables." > > > > + ^(self instSpec bitAnd: 2r11110) = 2r1010! > > - ^self isBytes not! > > > > Item was added: > > + ----- Method: Class>>variableDoubleWordSubcl > ass:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'subclass creation') ----- > > + variableDoubleWordSubclass: t instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class (the receiver) in which the > subclass is to > > + have indexable double-word-sized nonpointer variables." > > + ^(ClassBuilder new) > > + superclass: self > > + variableDoubleWordSubclass: t > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat > > + ! > > > > Item was added: > > + ----- Method: Class>>variableDoubleWordSubclass:uses: > instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'subclass creation') ----- > > + variableDoubleWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class (the receiver) in which the > subclass is to > > + have indexable double-word-sized nonpointer variables." > > + > > + | newClass copyOfOldClass | > > + copyOfOldClass := self copy. > > + newClass := self > > + variableDoubleWordSubclass: t > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat. > > + > > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > > + SystemChangeNotifier uniqueInstance > > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > > + ^newClass > > + ! > > > > Item was added: > > + ----- Method: Class>>variableHalfWordSubclas > s:instanceVariableNames:classVariableNames:poolDictionaries:category: (in > category 'subclass creation') ----- > > + variableHalfWordSubclass: t instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class (the receiver) in which the > subclass is to > > + have indexable half-word-sized nonpointer variables." > > + ^(ClassBuilder new) > > + superclass: self > > + variableHalfWordSubclass: t > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat > > + ! > > > > Item was added: > > + ----- Method: Class>>variableHalfWordSubclas > s:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'subclass creation') ----- > > + variableHalfWordSubclass: t uses: aTraitCompositionOrArray > instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class (the receiver) in which the > subclass is to > > + have indexable half-word-sized nonpointer variables." > > + > > + | newClass copyOfOldClass | > > + copyOfOldClass := self copy. > > + newClass := self > > + variableHalfWordSubclass: t > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat. > > + > > + newClass setTraitComposition: aTraitCompositionOrArray > asTraitComposition. > > + SystemChangeNotifier uniqueInstance > > + classDefinitionChangedFrom: copyOfOldClass to: newClass. > > + ^newClass! > > > > Item was changed: > > ----- Method: ClassBuilder>>superclass:varia > bleByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'public') ----- > > superclass: aClass > > variableByteSubclass: t instanceVariableNames: f > > classVariableNames: d poolDictionaries: s category: cat > > "This is the standard initialization message for creating a new > class as a > > subclass of an existing class in which the subclass is to > > have indexable byte-sized nonpointer variables." > > | oldClassOrNil actualType env | > > (aClass instSize > 0) > > ifTrue: [^self error: 'cannot make a byte subclass of a > class with named fields']. > > (aClass isVariable and: [aClass isWords]) > > ifTrue: [^self error: 'cannot make a byte subclass of a > class with word fields']. > > + (aClass isVariable and: [aClass isHalfWords]) > > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with half word fields']. > > + (aClass isVariable and: [aClass isDoubleWords]) > > + ifTrue: [^self error: 'cannot make a byte subclass of a > class with double word fields']. > > (aClass isVariable and: [aClass isPointers]) > > ifTrue: [^self error: 'cannot make a byte subclass of a > class with pointer fields']. > > oldClassOrNil := aClass environment at: t ifAbsent:[nil]. > > actualType := (oldClassOrNil notNil > > and: [oldClassOrNil typeOfClass == > #compiledMethod]) > > ifTrue: [#compiledMethod] > > ifFalse: [#bytes]. > > env := CurrentEnvironment signal ifNil: [aClass environment]. > > ^self > > name: t > > inEnvironment: env > > subclassOf: aClass > > type: actualType > > instanceVariableNames: f > > classVariableNames: d > > poolDictionaries: s > > category: cat! > > > > Item was added: > > + ----- Method: ClassBuilder>>superclass:varia > bleDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'public') ----- > > + superclass: aClass > > + variableDoubleWordSubclass: t instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class in which the subclass is to > > + have indexable double-word-sized nonpointer variables." > > + | env | > > + (aClass instSize > 0) > > + ifTrue: [^self error: 'cannot make a double word > subclass of a class with named fields']. > > + (aClass isVariable and: [aClass isBytes]) > > + ifTrue: [^self error: 'cannot make a double word > subclass of a class with byte fields']. > > + (aClass isVariable and: [aClass isHalfWords]) > > + ifTrue: [^self error: 'cannot make a double word > subclass of a class with half word fields']. > > + (aClass isVariable and: [aClass isWords]) > > + ifTrue: [^self error: 'cannot make a double word > subclass of a class with word fields']. > > + (aClass isVariable and: [aClass isPointers]) > > + ifTrue: [^self error: 'cannot make a double word > subclass of a class with pointer fields']. > > + env := CurrentEnvironment signal ifNil: [aClass environment]. > > + ^self > > + name: t > > + inEnvironment: env > > + subclassOf: aClass > > + type: #longs > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat! > > > > Item was added: > > + ----- Method: ClassBuilder>>superclass:varia > bleHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'public') ----- > > + superclass: aClass > > + variableHalfWordSubclass: t instanceVariableNames: f > > + classVariableNames: d poolDictionaries: s category: cat > > + "This is the standard initialization message for creating a new > class as a > > + subclass of an existing class in which the subclass is to > > + have indexable half-word-sized nonpointer variables." > > + | env | > > + (aClass instSize > 0) > > + ifTrue: [^self error: 'cannot make a half word subclass > of a class with named fields']. > > + (aClass isVariable and: [aClass isBytes]) > > + ifTrue: [^self error: 'cannot make a half word subclass > of a class with byte fields']. > > + (aClass isVariable and: [aClass isWords]) > > + ifTrue: [^self error: 'cannot make a half word subclass > of a class with word fields']. > > + (aClass isVariable and: [aClass isDoubleWords]) > > + ifTrue: [^self error: 'cannot make a half word subclass > of a class with double word fields']. > > + (aClass isVariable and: [aClass isPointers]) > > + ifTrue: [^self error: 'cannot make a half word subclass > of a class with pointer fields']. > > + env := CurrentEnvironment signal ifNil: [aClass environment]. > > + ^self > > + name: t > > + inEnvironment: env > > + subclassOf: aClass > > + type: #shorts > > + instanceVariableNames: f > > + classVariableNames: d > > + poolDictionaries: s > > + category: cat! > > > > Item was changed: > > ----- Method: ClassBuilder>>superclass:varia > bleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: > (in category 'public') ----- > > superclass: aClass > > variableWordSubclass: t instanceVariableNames: f > > classVariableNames: d poolDictionaries: s category: cat > > "This is the standard initialization message for creating a new > class as a > > subclass of an existing class in which the subclass is to > > have indexable word-sized nonpointer variables." > > | env | > > (aClass instSize > 0) > > ifTrue: [^self error: 'cannot make a word subclass of a > class with named fields']. > > (aClass isVariable and: [aClass isBytes]) > > ifTrue: [^self error: 'cannot make a word subclass of a > class with byte fields']. > > + (aClass isVariable and: [aClass isHalfWords]) > > + ifTrue: [^self error: 'cannot make a word subclass of a > class with half word fields']. > > + (aClass isVariable and: [aClass isDoubleWords]) > > + ifTrue: [^self error: 'cannot make a word subclass of a > class with double word fields']. > > (aClass isVariable and: [aClass isPointers]) > > ifTrue: [^self error: 'cannot make a word subclass of a > class with pointer fields']. > > env := CurrentEnvironment signal ifNil: [aClass environment]. > > ^self > > name: t > > inEnvironment: env > > subclassOf: aClass > > type: #words > > instanceVariableNames: f > > classVariableNames: d > > poolDictionaries: s > > category: cat! > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160921/efe2fa11/attachment-0001.htm From bert at freudenbergs.de Wed Sep 21 07:36:31 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 21 07:36:36 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1039.mcz In-Reply-To: References: Message-ID: On Tue, Sep 20, 2016 at 11:00 PM, wrote: > Item was added: > + ----- Method: Behavior>>isDoubleWords (in category 'testing') ----- > + isDoubleWords > + "Answer true if the receiver is made of 64-bit instance variables." > + > + ^self instSpec = 2r1001! > > Item was added: > + ----- Method: Behavior>>isHalfWords (in category 'testing') ----- > + isHalfWords > + "Answer true if the receiver is made of 16-bit instance variables." > + > + ^(self instSpec bitAnd: 2r11100) = 2r1100! > > Item was changed: > ----- Method: Behavior>>isWords (in category 'testing') ----- > isWords > "Answer true if the receiver is made of 32-bit instance variables." > > + ^(self instSpec bitAnd: 2r11110) = 2r1010! > - ^self isBytes not! > > In an instSpec, the lower bits are always 0, so no need to bitAnd:. Equality test would be fine: "Formats 11, 13-15, 17-23 & 25-31 are unused in classes but used in instances to define the number of elements missing up to the slot size." The test in isBytes needs to cover both ByteArrays and CompiledMethods, that's why it does not use equality. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160921/59b69847/attachment.htm From peter at ozzard.org Wed Sep 21 11:06:22 2016 From: peter at ozzard.org (Peter Crowther) Date: Wed Sep 21 11:06:26 2016 Subject: [squeak-dev] Multiple Images executing simultaneously In-Reply-To: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> References: <1BADE04E-5402-49D1-A587-CF65B3532726@shaw.ca> Message-ID: Squeak is single-threaded, and I don't expect that to change as too much in the image relies on it. Therefore, assuming your simulation is CPU-bound (pretty much a given for most neural network work), you should be able to run about as many Squeak images as you have threads on your processor. There are a few nuances to that - Intel hyperthreading causing contention for parts of cores, CPU cache size and hence bandwidth to/from RAM, that kind of thing - but it mostly works. Incidentally, this behaviour isn't specific to Squeak or to a particular version of MacOS, and it's not a happy accident. Processor designers and operating system developers have spent many years making sure this happens. The same thing would probably be true for any other single-threaded CPU-limited code you wrote and ran, on any "modern" (last 20 years) OS. So it's pretty safe to rely on it. Cheers, - Peter On 19 September 2016 at 19:31, Andrew Coward wrote: > I am using the all-in-one image to carry out neural network simulations > with different parameters using a MacBook Pro 2 GHx Intel Core i7 with OSX > 10.11.6. Each simulation can take up to 36 hours to complete. > > I have found it is possible to have 7 or more different images all > executing at the same time. Each image runs at the same speed as when only > one image is running. Obviously a huge benefit. > > This works in either Smalltalk 4.4 or 5.0. > > Each image has a different name, and one oddity is that sometimes when > opening an image I get the message ?cannot find application?. However, > changing the name of the image, for example by inserting spaces at the end, > eventually gets to an image that will open (so far 1 to 4 spaces have > always been sufficient). > > Does anyone know if this ability to run multiple images is a ?happy > accident? or an intended feature of Smalltalk that will be preserved in > future releases of Smalltalk and OS ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160921/4d1cf7af/attachment.htm From commits at source.squeak.org Wed Sep 21 11:34:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 11:34:03 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.241.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.241.mcz ==================== Summary ==================== Name: EToys-tfel.241 Author: tfel Time: 21 September 2016, 1:32:27.270674 pm UUID: 5004a379-3d39-e341-b206-ddf0aee13899 Ancestors: EToys-jl.240 - fix prepareEnvironment script =============== Diff against EToys-jl.240 =============== Item was changed: ----- Method: ReleaseBuilderSqueakland class>>prepareEnvironment (in category 'preparing') ----- prepareEnvironment | directory entries projectNames | super prepareEnvironment. projectNames := #('Gallery' 'Tutorials' 'Home'). directory := FileDirectory on: Smalltalk imagePath. entries := FileList2 projectOnlySelectionMethod: directory entries. projectNames do: [:projectName | (entries + anySatisfy: [:each | (Project parseProjectFileName: each name) first = projectName]) - anySatisfy: [:each | (Project parseProjectFileName: each first) first = projectName]) ifFalse: [self inform: projectName , ' is not found']]. self installExtraPackages. DeferredTask := [ProjectLoading openFromImagePath: 'Home'].! From commits at source.squeak.org Wed Sep 21 11:38:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 11:38:19 2016 Subject: [squeak-dev] The Trunk: Morphic-jl.1307.mcz Message-ID: Jens Lincke uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-jl.1307.mcz ==================== Summary ==================== Name: Morphic-jl.1307 Author: jl Time: 21 September 2016, 1:36:40.108628 pm UUID: 2360f2a4-21ac-e141-8dde-f5769c1f285a Ancestors: Morphic-cmm.1306 deleting a view morph deletes morph and project again =============== Diff against Morphic-cmm.1306 =============== Item was changed: ----- Method: ProjectViewMorph>>expungeProject (in category 'as yet unclassified') ----- expungeProject (self confirm: ('Do you really want to delete {1} and all its content?' translated format: {project name})) ifFalse: [^ self]. owner isSystemWindow ifTrue: [owner model: nil; delete]. + project delete. + self delete.! - project delete.! From commits at source.squeak.org Wed Sep 21 14:39:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 14:39:45 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-jl.197.mcz Message-ID: Jens Lincke uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-jl.197.mcz ==================== Summary ==================== Name: MorphicExtras-jl.197 Author: jl Time: 21 September 2016, 4:39:08.769628 pm UUID: fe309652-c36d-374f-8d22-4813f83c7d60 Ancestors: MorphicExtras-jl.196 - update the default parts for the supplies flaps - make the viewer flaps avoid each other and the global flaps on the top (like in Squeakland) =============== Diff against MorphicExtras-tfel.195 =============== Item was changed: ----- Method: Flaps class>>defaultsQuadsDefiningPlugInSuppliesFlap (in category 'predefined flaps') ----- defaultsQuadsDefiningPlugInSuppliesFlap "Answer a list of quads which define the objects to appear in the default Supplies flap used in the Plug-in image" + "PartsBin reconstructAllPartsIcons" + ^ #( (ObjectsTool newStandAlone 'Object Catalog' 'A tool that lets you browse the catalog of available objects') + (AllScriptsTool allScriptsToolForActiveWorld 'All Scripts' 'Stop, Step, and Go buttons for controlling all your scripts at once. The tool can also be "opened up" to control each script in your project individually.') - "(AllScriptsTool allScriptsToolForActiveWorld 'All Scripts' 'Stop, Step, and Go buttons for controlling all your scripts at once. The tool can also be "opened up" to control each script in your project individually.')" (TrashCanMorph new 'Trash' 'A tool for discarding objects') (GrabPatchMorph new 'Grab Patch' 'Allows you to create a new Sketch by grabbing a rectangular patch from the screen') (LassoPatchMorph new 'Lasso' 'Allows you to create a new Sketch by lassoing an area from the screen') (StickyPadMorph newStandAlone 'Sticky Pad' 'Each time you obtain one of these pastel, translucent, borderless rectangles, it will be a different color from the previous time.') "(PaintInvokingMorph new 'Paint' 'Drop this into an area to start making a fresh painting there')" (TextMorph boldAuthoringPrototype 'Text' 'Text that you can edit into anything you desire.') (RecordingControlsMorph authoringPrototype 'Sound' 'A device for making sound recordings.') (RectangleMorph authoringPrototype 'Rectangle' 'A rectangle') (RectangleMorph roundRectPrototype 'RoundRect' 'A rectangle with rounded corners') (EllipseMorph authoringPrototype 'Ellipse' 'An ellipse or circle') (StarMorph authoringPrototype 'Star' 'A star') (CurveMorph authoringPrototype 'Curve' 'A curve') (PolygonMorph authoringPrototype 'Polygon' 'A straight-sided figure with any number of sides') (ScriptableButton authoringPrototype 'Button' 'A Scriptable button') + "(BookMorph nextPageButton 'NextPage' 'A button that takes you to the next page') + (BookMorph previousPageButton 'PreviousPage' 'A button that takes you to the previous page')" - (BookMorph nextPageButton 'NextPage' 'A button that takes you to the next page') - (BookMorph previousPageButton 'PreviousPage' 'A button that takes you to the previous page') "(ScriptingSystem prototypicalHolder 'Holder' 'A place for storing alternative pictures in an animation, etc.')" (PasteUpMorph authoringPrototype 'Playfield' 'A place for assembling parts or for staging animations') (SimpleSliderMorph authoringPrototype 'Slider' 'A slider for showing and setting numeric values.') (JoystickMorph authoringPrototype 'Joystick' 'A joystick-like control') (BookMorph authoringPrototype 'Book' 'A multi-paged structure') "(ClockMorph authoringPrototype 'Clock' 'A simple digital clock')" + (KedamaMorph newSet 'Particles' 'A Kedama World with pre-made components') + "(RandomNumberTile new 'Random' 'A random-number tile for use with tile scripting')") asOrderedCollection! - (RandomNumberTile new 'Random' 'A random-number tile for use with tile scripting')) asOrderedCollection! Item was added: + ----- Method: ViewerFlapTab>>adjustPositionAfterHidingFlap (in category 'show & hide') ----- + adjustPositionAfterHidingFlap + "we add the width of flap itself to our referent, to reflect the actual width from the edge of the screen, including the space we leave for other flaps. see also ViewerFlapTab>>fitOnScreen" + self referent width: self referent width + self width. + super adjustPositionAfterHidingFlap.! Item was added: + ----- Method: ViewerFlapTab>>fitOnScreen (in category 'positioning') ----- + fitOnScreen + | constrainer | + super fitOnScreen. + "We want to leave a margin for the flaps on the side and for the global flaps at the top (like the Sugar navbar) so we reduce the referents top and its width. We undo this before hiding the flap in ViewerFlapTab>>adjustPositionAfterHidingFlap" + constrainer := (owner ifNil: [self]) clearArea. + self flapShowing ifTrue: [ + Flaps globalFlapTabsIfAny + do: [:each | + (each edgeToAdhereTo = #top and: [each bottom > self referent top]) + ifTrue: [self referent top: each bottom]. + (each edgeToAdhereTo = #top and: [each bottom > self top]) + ifTrue: [self top: each bottom]]. + self referent width: constrainer right - self width - self right].! From commits at source.squeak.org Wed Sep 21 14:51:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 14:51:38 2016 Subject: [squeak-dev] The Trunk: EToys-jl.242.mcz Message-ID: Jens Lincke uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-jl.242.mcz ==================== Summary ==================== Name: EToys-jl.242 Author: jl Time: 21 September 2016, 4:50:30.595628 pm UUID: a01c6a14-2b59-244f-a945-3efd07a67bed Ancestors: EToys-tfel.241 fix drawing glitch in zoomed Kedama =============== Diff against EToys-tfel.241 =============== Item was changed: ----- Method: KedamaMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | result | drawRequested ifFalse: [^ self]. drawRequested := false. changePending := false. "Time millisecondClockValue printString displayAt: 0@0." + aCanvas fillRectangle: (self bounds) color: self color. + self player ifNil: [^ self]. - self player ifNil: [^ aCanvas fillRectangle: (self bounds) color: self color]. patchVarDisplayForm fillColor: self color. patchesToDisplay do: [:p | p displayPatchVariableOn: patchVarDisplayForm. ]. self drawTurtlesOnForm: patchVarDisplayForm. pixelsPerPatch = 1 ifTrue: [ aCanvas drawImage: patchVarDisplayForm at: bounds origin. ] ifFalse: [ result := self zoom: patchVarDisplayForm into: magnifiedDisplayForm factor: pixelsPerPatch. result ifNil: [ aCanvas warpImage: patchVarDisplayForm transform: (MatrixTransform2x3 withScale: pixelsPerPatch) at: self innerBounds origin. ] ifNotNil: [ aCanvas drawImage: magnifiedDisplayForm at: bounds origin. ] ]. ! From commits at source.squeak.org Wed Sep 21 15:10:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 15:10:46 2016 Subject: [squeak-dev] The Trunk: Morphic-jl.1308.mcz Message-ID: Jens Lincke uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-jl.1308.mcz ==================== Summary ==================== Name: Morphic-jl.1308 Author: jl Time: 21 September 2016, 5:09:23.877628 pm UUID: 9e56c715-6e6d-d447-85fb-cf1869058d6b Ancestors: Morphic-jl.1307 Make magic halos great again. =============== Diff against Morphic-jl.1307 =============== Item was changed: ----- Method: HaloMorph>>addHandle:on:send:to: (in category 'private') ----- addHandle: handleSpec on: eventName send: selector to: recipient "Add a handle within the halo box as per the haloSpec, and set it up to respond to the given event by sending the given selector to the given recipient. Return the handle." | handle aPoint | aPoint := self positionIn: haloBox horizontalPlacement: handleSpec horizontalPlacement verticalPlacement: handleSpec verticalPlacement. handle := self addHandleAt: aPoint color: (Color colorFrom: handleSpec color) icon: handleSpec iconSymbol on: eventName send: selector to: recipient. - self isMagicHalo - ifTrue: [ - handle on: #mouseEnter send: #handleEntered to: self. - handle on: #mouseLeave send: #handleLeft to: self]. - ^ handle! Item was changed: ----- Method: HaloMorph>>isMagicHalo: (in category 'accessing') ----- isMagicHalo: aBool self setProperty: #isMagicHalo toValue: aBool. + aBool + ifTrue: [ + self on: #mouseEnter send: #handleEntered to: self. + self on: #mouseLeave send: #handleLeft to: self] + ifFalse:[ + "Reset everything" + self eventHandler ifNotNil: [:eh | + eh forgetDispatchesTo: #handleEntered; + forgetDispatchesTo: #handleLeft]. + self stopStepping. "get rid of all" + self startStepping. "only those of interest"].! - aBool ifFalse:[ - "Reset everything" - self stopStepping. "get rid of all" - self startStepping. "only those of interest" - ].! From bert at freudenbergs.de Wed Sep 21 15:25:21 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Sep 21 15:25:24 2016 Subject: [squeak-dev] The Trunk: Morphic-jl.1308.mcz In-Reply-To: References: Message-ID: On Wed, Sep 21, 2016 at 5:09 PM, wrote: > > Make magic halos great again. > LOL This may be a good time to welcome Jens Linke as a new core developer. He's been working with Squeak since he was a student intern at impara 10 years ago, and now with a PhD under his belt he's himself working with students at HPI in Potsdam. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160921/d6891c53/attachment.htm From commits at source.squeak.org Wed Sep 21 19:07:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 19:07:21 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1041.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1041.mcz ==================== Summary ==================== Name: Kernel-nice.1041 Author: nice Time: 21 September 2016, 9:06:09.983013 pm UUID: 80f9f68f-fad8-42d7-b1bc-bfa1ee876629 Ancestors: Kernel-nice.1040 The last bits of intSpec are zero, so no need to mask it. Those bits are used in instances only - see intSpec comment. =============== Diff against Kernel-nice.1040 =============== Item was changed: ----- Method: Behavior>>isHalfWords (in category 'testing') ----- isHalfWords "Answer true if the receiver is made of 16-bit instance variables." + ^self instSpec = 2r1100! - ^(self instSpec bitAnd: 2r11100) = 2r1100! Item was changed: ----- Method: Behavior>>isWords (in category 'testing') ----- isWords "Answer true if the receiver is made of 32-bit instance variables." + ^self instSpec = 2r1010! - ^(self instSpec bitAnd: 2r11110) = 2r1010! From commits at source.squeak.org Wed Sep 21 19:44:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 19:44:06 2016 Subject: [squeak-dev] The Inbox: Collections-nice.717.mcz Message-ID: Nicolas Cellier uploaded a new version of Collections to project The Inbox: http://source.squeak.org/inbox/Collections-nice.717.mcz ==================== Summary ==================== Name: Collections-nice.717 Author: nice Time: 21 September 2016, 9:43:43.472517 pm UUID: f94b2210-9435-4dce-81d4-fe6fb57b3ec7 Ancestors: Collections-dtl.716 Introduce HalfWordArray and DoubleWordArray for positive 16 bits and 64 bits integer elements. =============== Diff against Collections-dtl.716 =============== Item was added: ==== ERROR === Error: Unrecognized class type 21 September 2016 7:44:02.02 pm VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(DoubleWordArray) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #DoubleWordArray superclassName: #ArrayedCollection variables: an OrderedCollection() category: #'Collections-Arrayed' type: #longs comment: 'DoubleWordArrays store 64-bit unsigned Integer values.' commentStamp: 'nice 9/20/2016 23:37' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(DoubleWordArray) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeAddition: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Wed Sep 21 19:46:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 19:46:56 2016 Subject: [squeak-dev] The Inbox: CollectionsTests-nice.268.mcz Message-ID: Nicolas Cellier uploaded a new version of CollectionsTests to project The Inbox: http://source.squeak.org/inbox/CollectionsTests-nice.268.mcz ==================== Summary ==================== Name: CollectionsTests-nice.268 Author: nice Time: 21 September 2016, 9:46:42.419239 pm UUID: 13ee237c-8a1d-46b4-870c-86fcb2aaddbd Ancestors: CollectionsTests-pre.267 Provide some tests for half-word, word and double-word arrays (positive 16, 32 and 64 bits integer elements). At time of writing, half and double words require VM improvments. =============== Diff against CollectionsTests-pre.267 =============== Item was added: + ClassTestCase subclass: #DoubleWordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! + + !DoubleWordArrayTest commentStamp: 'nice 9/21/2016 21:09' prior: 0! + DoubleWordArrayTest are SUnit tests for DoubleWordArray. + ! Item was added: + ----- Method: DoubleWordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (DoubleWordArray new: 1) byteSize = 8 "8 bytes are 64 bits"! Item was added: + ----- Method: DoubleWordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [DoubleWordArray with: -1] raise: Error! Item was added: + ----- Method: DoubleWordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 64 - 1. + self assert: (DoubleWordArray with: maxValue) first = maxValue. + self should: [DoubleWordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: DoubleWordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: DoubleWordArray new bytesPerElement = 8 "8 bytes are 64 bits"! Item was added: + ----- Method: DoubleWordArrayTest>>testSomeValues (in category 'testing') ----- + testSomeValues + | dwArray int next | + next := [:x | x - 3 * x sqrtFloor + 5]. + int := 0. + dwArray := DoubleWordArray new: 1. + [int highBit < 64] + whileTrue: + [dwArray at: 1 put: int. + self assert: (dwArray at: 1) = int. + int := next value: int]. + self should: [dwArray at: 1 put: int] raise: Error! Item was added: + ClassTestCase subclass: #HalfWordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! + + !HalfWordArrayTest commentStamp: 'nice 9/21/2016 21:08' prior: 0! + HalfWordArrayTest are SUnit tests for HalfWordArray. + ! Item was added: + ----- Method: HalfWordArrayTest>>testAllPossibleValues (in category 'testing') ----- + testAllPossibleValues + | halfWordArray | + halfWordArray := (1 to: 65535) as: HalfWordArray. + 1 to: halfWordArray size do: [:i | + self assert: (halfWordArray at: i) = i]! Item was added: + ----- Method: HalfWordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (HalfWordArray new: 1) byteSize = 2 "2 bytes are 16 bits"! Item was added: + ----- Method: HalfWordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [HalfWordArray with: -1] raise: Error! Item was added: + ----- Method: HalfWordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 16 - 1. + self assert: (HalfWordArray with: maxValue) first = maxValue. + self should: [HalfWordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: HalfWordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: HalfWordArray new bytesPerElement = 2 "2 bytes are 16 bits"! Item was added: + ClassTestCase subclass: #WordArrayTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'CollectionsTests-Arrayed'! Item was added: + ----- Method: WordArrayTest>>testByteSize (in category 'testing') ----- + testByteSize + self assert: (WordArray new: 1) byteSize = 4 "4 bytes are 32 bits"! Item was added: + ----- Method: WordArrayTest>>testCannotPutNegativeValue (in category 'testing') ----- + testCannotPutNegativeValue + self should: [WordArray with: -1] raise: Error! Item was added: + ----- Method: WordArrayTest>>testCannotPutTooLargeValue (in category 'testing') ----- + testCannotPutTooLargeValue + | maxValue | + maxValue := 1 << 32 - 1. + self assert: (WordArray with: maxValue) first = maxValue. + self should: [WordArray with: maxValue + 1] raise: Error! Item was added: + ----- Method: WordArrayTest>>testElementSize (in category 'testing') ----- + testElementSize + self assert: WordArray new bytesPerElement = 4 "4 bytes are 32 bits"! Item was added: + ----- Method: WordArrayTest>>testSomeValues (in category 'testing') ----- + testSomeValues + | wArray int next | + next := [:x | x - 3 * x sqrtFloor + 5]. + int := 0. + wArray := WordArray new: 1. + [int highBit < 32] + whileTrue: + [wArray at: 1 put: int. + self assert: (wArray at: 1) = int. + int := next value: int]. + self should: [wArray at: 1 put: int] raise: Error! From commits at source.squeak.org Wed Sep 21 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 21 21:55:10 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160921215508.27686.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068940.html Name: EToys-tfel.241 Ancestors: EToys-jl.240 - fix prepareEnvironment script ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068941.html Name: Morphic-jl.1307 Ancestors: Morphic-cmm.1306 deleting a view morph deletes morph and project again ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068942.html Name: MorphicExtras-jl.197 Ancestors: MorphicExtras-jl.196 - update the default parts for the supplies flaps - make the viewer flaps avoid each other and the global flaps on the top (like in Squeakland) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068943.html Name: EToys-jl.242 Ancestors: EToys-tfel.241 fix drawing glitch in zoomed Kedama ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068944.html Name: Morphic-jl.1308 Ancestors: Morphic-jl.1307 Make magic halos great again. ============================================= From eancaer at gmail.com Thu Sep 22 11:54:33 2016 From: eancaer at gmail.com (Edwin Ancaer) Date: Thu Sep 22 11:59:25 2016 Subject: [squeak-dev] Re: New, faster RISC OS Squeak In-Reply-To: <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> References: <5113DB10.5030400@gmail.com> <3535DA7F-09DF-47CF-AF11-DECA190AD89B@rowledge.org> <51140748.4070706@gmail.com> <7E411575-069C-4793-BB79-0993A4C4C2ED@rowledge.org> <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> Message-ID: <1474545273132-4916592.post@n4.nabble.com> Hello, I don't know if it is OK to re-use this old message, but I was following this conversation to solve my StreamMan problem while installing Squeak (I downloaded Squeak RiscOS 4.4 on riscos squeak.org) on RiscOs (New to RiscOs, having some experience with squeak on Linux) Only, I did not get it working, I got until the - wait patiently, don't double-click again, because that will run yet another copy of the VM I saw th Squeak icon appear, and after a while, I got an error saying: /Squeak may have gone wrong. Click Continue to resume or Quit to stop Squeak./ Of course, I choose the Describe button that gave the message: /Internal Error. Abort on data transfer at &FC02D134./ I'm sill trying to figure out how to get to the postmortem report, but whatever button I use to click, the window always closes immediately. I hoped you could provide any pointers on what I'm doing wrong Many thanks, Edwin Ancaer -- View this message in context: http://forum.world.st/New-faster-RISC-OS-Squeak-tp4668295p4916592.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Thu Sep 22 15:22:32 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 22 15:22:36 2016 Subject: [squeak-dev] The Trunk: Morphic-jl.1308.mcz In-Reply-To: References: Message-ID: On Wed, Sep 21, 2016 at 8:25 AM, Bert Freudenberg wrote: > On Wed, Sep 21, 2016 at 5:09 PM, wrote: > >> >> Make magic halos great again. >> > > LOL > > This may be a good time to welcome Jens Linke as a new core developer. > He's been working with Squeak since he was a student intern at impara 10 > years ago, and now with a PhD under his belt he's himself working with > students at HPI in Potsdam. > Hi Jens, welcome! _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/5e4c5dd8/attachment.htm From commits at source.squeak.org Thu Sep 22 15:38:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 22 15:38:32 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.243.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.243.mcz ==================== Summary ==================== Name: EToys-tfel.243 Author: tfel Time: 22 September 2016, 5:37:19.089089 pm UUID: 5d05775b-7045-8c40-a02b-c8598754751b Ancestors: EToys-jl.242 - improve the kedama morph accepting a drawing to be more stable - don't show the step-button for kedama scripts, because it doesn't work - allowEtoyUserCustomEvents preference was removed =============== Diff against EToys-jl.242 =============== Item was added: + ----- Method: KedamaMorph>>acceptFormFromDrawing: (in category 'event handling') ----- + acceptFormFromDrawing: largeForm + + | aForm c xArray yArray colorArray newX newY turtlesByColor colorArrays thisPlayer xArrays yArrays | + turtlesDict keysAndValuesDo: [:player :vector | + player setTurtleCount: 0]. + turtlesByColor := Dictionary new. + turtlesDict keysAndValuesDo: [:player :vector | + turtlesByColor at: player color put: player]. + xArrays := Dictionary new. + yArrays := Dictionary new. + colorArrays := Dictionary new. + aForm := largeForm scaledToSize: (largeForm extent / pixelsPerPatch) rounded smoothing: 1. + aForm offset: (largeForm offset / self pixelsPerPatch) rounded. + 0 to: aForm height do: [:y | + 0 to: aForm width do: [:x | + c := aForm colorAt: (x@y). + c isTransparent ifFalse: [ + newX := x + aForm offset x. + newY := y + aForm offset y. + ((newX >= 0 and: [newX < self dimensions x]) and: [newY >= 0 and: [newY < self dimensions y]]) ifTrue: [ + thisPlayer := turtlesByColor at: c ifAbsentPut: [ + turtlesByColor keys + detect: [:thisColor | (thisColor diff: c) < 0.2] + ifFound: [:thisColor | turtlesByColor at: thisColor] + ifNone: [ + turtlesDict associations first key. "all non-matching go to be the first turtle" + "(self player newTurtleSilently color: c; player)"]]. + xArray := xArrays at: thisPlayer ifAbsentPut: [OrderedCollection new: aForm width * aForm height]. + yArray := yArrays at: thisPlayer ifAbsentPut: [OrderedCollection new: aForm width * aForm height]. + colorArray := colorArrays at: thisPlayer ifAbsentPut: [OrderedCollection new: aForm width * aForm height]. + + xArray add: newX asFloat. + yArray add: newY asFloat. + colorArray add: (c pixelValueForDepth: 32). + ]. + ]. + ]. + ]. + xArrays keysAndValuesDo: [:player :xArry | + self makeTurtlesAtPositionsIn: {xArry asArray. (yArrays at: player) asArray. (colorArrays at: player) asArray} examplerPlayer: player ofPrototype: nil. + player costume privateTurtleCount: (self turtlesCountOf: player)].! Item was changed: ----- Method: KedamaMorph>>editDrawing (in category 'menu') ----- editDrawing | bnds sketchEditor delBlock myForm mySketch | self world assureNotPaintingElse: [^self]. self world prepareToPaint; displayWorld. bnds := self boundsInWorld. sketchEditor := SketchEditorMorph new. self comeToFront. myForm := self imageForm clippedToSize: (bnds extent - 2). myForm mapColor: self color to: Color transparent. mySketch := SketchMorph withForm: myForm. mySketch position: self position. self world addMorphFront: sketchEditor. sketchEditor initializeFor: mySketch inBounds: bnds pasteUpMorph: self world. delBlock := [self world paintingFlapTab ifNotNil: [:pt | pt hideFlap] ifNil: [self world paintBox ifNotNil: [:pb | pb delete]]]. sketchEditor afterNewPicDo: [:aForm :aRect | aForm offset: aRect topLeft - self topLeft. + self acceptFormFromDrawing: aForm. - self acceptForm: aForm. delBlock value] ifNoBits: [delBlock value]! Item was added: + ----- Method: ReleaseBuilderSqueakland class>>updateProjects (in category 'scripts') ----- + updateProjects + "self updateProjects" + "Use this script to load store the gallery projects in the expected format into the repository" + ! Item was changed: ----- Method: ScriptEditorMorph>>buttonRowForEditor (in category 'buttons') ----- buttonRowForEditor "Answer a row of buttons that comprise the header at the top of the Scriptor" | aRow aString aStatusMorph aButton aTile aMorph goldBoxButton aBox | aRow := AlignmentMorph newRow color: ScriptingSystem baseColor; layoutInset: 1. aRow hResizing: #spaceFill. aRow vResizing: #shrinkWrap. self addDismissButtonTo: aRow. aRow addTransparentSpacerOfSize: 9. "Player's name" aString := playerScripted externalName. aMorph := StringMorph contents: aString font: ScriptingSystem fontForTiles. aMorph setNameTo: 'title'. aRow addMorphBack: aMorph. aRow addTransparentSpacerOfSize: 6. "Script's name" aBox := AlignmentMorph newRow. aBox hResizing: #shrinkWrap; vResizing: #shrinkWrap. aBox color: (Color r: 0.839 g: 1.0 b: 0.806). aBox borderWidth: 1. aBox borderColor: (Color r: 0.645 g: 0.774 b: 0.613). aButton := UpdatingStringMorph new. aButton useStringFormat; target: self; getSelector: #scriptTitle; setNameTo: 'script name'; font: ScriptingSystem fontForNameEditingInScriptor; putSelector: #setScriptNameTo:; setProperty: #okToTextEdit toValue: true; step; yourself. aBox addMorph: aButton. aRow addMorphBack: aBox. aBox setBalloonText: 'Click here to edit the name of the script.' translated. "aRow addTransparentSpacerOfSize: 9." aRow addVariableTransparentSpacer. "Try It button" self hasParameter ifFalse: [aRow addMorphBack: ((ThreePhaseButtonMorph labelSymbol: #TryIt target: self actionSelector: #tryMe arguments: #()) actWhen: #whilePressed; balloonTextSelector: #tryMe). aRow addTransparentSpacerOfSize: 3]. + "Step button, only for non-Kedama" + (self playerScripted isPrototypeTurtlePlayer or: [self hasParameter]) ifFalse: - "Step button" - self hasParameter ifFalse: [aRow addMorphBack: (aButton := ThreePhaseButtonMorph labelSymbol: #StepMe target: self actionSelector: #stepMe arguments: #()). aButton balloonTextSelector: #stepMe. aRow addTransparentSpacerOfSize: 3]. "Status controller" self hasParameter ifTrue: [aTile := TypeListTile new choices: Vocabulary typeChoicesForUserVariables dataType: nil. aTile addArrows. aTile setLiteral: self typeForParameter. aRow addMorphBack: aTile. aTile borderColor: Color red. aTile color: ScriptingSystem uniformTileInteriorColor. aTile setBalloonText: 'Drag from here to get a parameter tile' translated. aTile addCaretsAsAppropriate: true] ifFalse: [aRow addMorphBack: (aStatusMorph := self scriptInstantiation statusControlMorph)]. "aRow addTransparentSpacerOfSize: 3." aRow addVariableTransparentSpacer. "Gold-box" aRow addMorphBack: (goldBoxButton := IconicButton new). goldBoxButton borderWidth: 0; labelGraphic: (ScriptingSystem formAtKey: 'RoundGoldBox'); color: Color transparent; actWhen: #buttonDown; target: self; actionSelector: #offerGoldBoxMenu; shedSelvedge; setBalloonText: 'click here to get a palette of useful tiles to use in your script.' translated. aRow addTransparentSpacerOfSize: 6@1. "Menu Button" aButton := self menuButton. aButton actionSelector: #offerScriptorMenu. aRow addMorphBack: aButton. (playerScripted existingScriptInstantiationForSelector: scriptName) ifNotNilDo: [:inst | inst updateStatusMorph: aStatusMorph]. ^ aRow! Item was changed: ----- Method: Vocabulary class>>typeChoicesForUserVariables (in category '*Etoys-Squeakland-type vocabularies') ----- typeChoicesForUserVariables "Answer a list of all user-choosable value types for variables." | aList | aList := #(Boolean Color CustomEvents Graphic Number Patch Player Point ScriptName Sound String) asOrderedCollection. (ActiveWorld notNil and: [ActiveWorld isKedamaPresent not]) ifTrue: [aList remove: #Patch ifAbsent: []]. - Preferences allowEtoyUserCustomEvents ifFalse: [aList remove: #CustomEvents ifAbsent: []]. ^ aList asSortedArray " Vocabulary typeChoicesForUserVariables "! From eliot.miranda at gmail.com Thu Sep 22 18:09:59 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 22 18:10:03 2016 Subject: [squeak-dev] The Inbox: Files-dtl.166.mcz In-Reply-To: <20160905141410.GA36889@shell.msen.com> References: <201609041909.u84J9bUO029456@shell.msen.com> <20160904192409.GA31502@shell.msen.com> <20160905001201.GA74866@shell.msen.com> <20160905033835.GA9214@shell.msen.com> <20160905141410.GA36889@shell.msen.com> Message-ID: Hi David, On Mon, Sep 5, 2016 at 7:14 AM, David T. Lewis wrote: > On Mon, Sep 05, 2016 at 01:08:38PM +0800, Ben Coman wrote: > > On Mon, Sep 5, 2016 at 11:38 AM, David T. Lewis > wrote: > > > On Mon, Sep 05, 2016 at 02:33:43AM +0200, Eliot Miranda wrote: > > >> Hi Both, > > >> > > >> the adoptInstance: code fails on V3 because of compact classes. > One cannot change a 1-word header instance if a compact class into a 1-word > header of a non-compact class; there is no room in a 1-word header for the > 32-bit non/compact class reference. > > >> > > > > > > Hi Eliot, > > > > > > Right. You have documented this clearly in VMMaker. It is a reasonable > and > > > expected limitation. > > > > > >> David, fur give me for broaching what may be an emotionally painful > topic. I have no desire to cause you pain, but IMO this is important. > > >> > > >> We should /NOT/ hamstring code for either Spur or V3 with needless > and expensive compatibility. David, you're going to have to accept that > the two will diverge. Instead, try and think of a mechanism that supports > tracking the differences instead of trying to keep the code bases the same. > IMO effort put into keeping the two the same is effort wasted. > > > > > > My initial attempt to do this is http://www.squeaksource.com/ > TrunkUpdateStreamV3. > > > For example, to see differences in the Collections package, use > Monticello from > > > trunk Squeak to look at differences in the Collections.V3 package in > the > > > TrunkUpdateStreamV3 repository. The other differences are in > Compiler.V3, > > > Kernel.V3, and System.V3 (along with the trivial difference in > Files.V3 that > > > was the subject of this thread). > > > > > > My question concerning the Files package arises directly from this. > Aside > > > from a single optimization in Files, all other significant differences > > > have been contained within the Compiler, Collections, System, and > Kernel > > > packages. > > > > > >> Instead one could put effort into a Spur interpreter VM, > > > > > > I do not want to volunteer to start a new VM project until I finish the > > > last one that I committed to do. I have said this before. And it's > really > > > just not someething that I can take on right now. > > > > Dave, Just to clarify... If there happen to be a Context Interpreter > > Spur VM, you would not be concerned about V3 compatibility? > > > > Hi Ben, > > Ideally we would like to be able to have the context and stack interpreters > built from the same code base, and in that scenario the context interpreter > would be of little interest for a Spur object memory. The stack interpreter > already exists for both V3 and Spur, and it is an improvement on the > traditional > context interpreter. > > That said, there are things in the VMMaker code base for the interpreter VM > that could usefully be moved to the VMMaker.oscog code base, and Eliot is > quite rightly trying to encourage someone to step forward and make that > happen. > Thanks for this list! I agree with all of it except where I've commented. > If anyone is interested, I'll be happy to help where I can (but it's not > a project that I want to try to undertake myself right now). Off the top > of my head, here are some things that might be of interest from the VMMaker > code base: > > - Refactor interpreter and object memory hierarchies, methods specific > to context versus stack interpreters in their own hierarchies, no method > overrides, use #subclassResponsibility in common superclasses > - For methods specific to the context interpreter, update them from the > more recent code in VMMaker > - 32 versus 64 bit object word size as a compile time option (not as part > of source code generation), single generated C code base > This is infeasible. The way Spur 64- vs 32- bit is architected is different from V3. There are distinct subclasses of SpurMemoryManager (Spur32BitMemoryManager, Spur32BitCoMemoryManager, Spur64BitMemoryManager, Spur64BitCoMemoryManager) which works well in being able to optimize the code for each variant, but makes it very difficult to generate #if SPUR64 style code. Further, the generation of the Cogit is one file per processor. The separate generation works fine. We have compile time options for fairly small changes, such as IMMUTABILITY and Pharo vs Squeak (which affects the FilePlugin). But for something as pervasive as 64- vs 32- bits it's not practical and IMO of little benefit. > - Ensure that context and stack interpreters (not necessarily Cog) compile > and run on 64-bit platforms (no 32-bit libraries) > - Add support for loading older 6504 images (should work with stack > interpreter) > - Memory access C macros reimplemented in slang, allow similator to execute > the lowest level functions in Smalltalk > - Browse generated C code for methods in Squeak browsers > and just to be clear, start the work from the oscog fork, not the VMMaker trunk, since so many changes have been made to Slang to get the Cog and Spur systems going. > Dave > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/a51ceabf/attachment.htm From eliot.miranda at gmail.com Thu Sep 22 18:28:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 22 18:28:45 2016 Subject: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) Message-ID: Hi Bert, Hi All, On Thu, Sep 15, 2016 at 2:55 PM, wrote: [snip] > http://lists.squeakfoundation.org/pipermail/packages/2016- > September/068930.html > > Name: System-bf.916 > Ancestors: System-bf.915 > > Replace VM-level ImageSegment loading with a Smalltalk implementation for > old (interpreter-era) projects. > > Also removes support for writing segments. > > This overrides the Spur support introduced in System-eem.758. > So one question is should we delete VM support for ImageSegment from the Spur VM? There's at least 1.5k of generated source for the Spur ImageSegment load and save support, some 2% of the interpreter/primitives source code. That's a lot, and the code is complex and ugly. If it never really worked before IMO we should nuke it asap. If it worked in some fashion perhaps we can schedule its demise for the 6.0 release's VM. What do others think? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/93e2a996/attachment.htm From maxleske at gmail.com Thu Sep 22 18:42:13 2016 From: maxleske at gmail.com (Max Leske) Date: Thu Sep 22 18:42:19 2016 Subject: [Pharo-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> > On 22 Sep 2016, at 20:28, Eliot Miranda wrote: > > Hi Bert, Hi All, > > On Thu, Sep 15, 2016 at 2:55 PM, > wrote: > [snip] > http://lists.squeakfoundation.org/pipermail/packages/2016-September/068930.html > > Name: System-bf.916 > Ancestors: System-bf.915 > > Replace VM-level ImageSegment loading with a Smalltalk implementation for old (interpreter-era) projects. > > Also removes support for writing segments. > > This overrides the Spur support introduced in System-eem.758. > > So one question is should we delete VM support for ImageSegment from the Spur VM? There's at least 1.5k of generated source for the Spur ImageSegment load and save support, some 2% of the interpreter/primitives source code. That's a lot, and the code is complex and ugly. If it never really worked before IMO we should nuke it asap. If it worked in some fashion perhaps we can schedule its demise for the 6.0 release's VM. > > What do others think? As long as you don?t remove it from the Cog VM?s until I no longer need it I?m fine with that. Max > > _,,,^..^,,,_ > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/71c50ead/attachment.htm From eliot.miranda at gmail.com Thu Sep 22 18:46:58 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 22 18:47:07 2016 Subject: [Vm-dev] Re: [Pharo-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> References: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> Message-ID: Hi Max, On Thu, Sep 22, 2016 at 11:42 AM, Max Leske wrote: > > > On 22 Sep 2016, at 20:28, Eliot Miranda wrote: > > Hi Bert, Hi All, > > On Thu, Sep 15, 2016 at 2:55 PM, wrote: > [snip] > >> http://lists.squeakfoundation.org/pipermail/packages/2016-Se >> ptember/068930.html >> >> Name: System-bf.916 >> Ancestors: System-bf.915 >> >> Replace VM-level ImageSegment loading with a Smalltalk implementation for >> old (interpreter-era) projects. >> >> Also removes support for writing segments. >> >> This overrides the Spur support introduced in System-eem.758. >> > > So one question is should we delete VM support for ImageSegment from the > Spur VM? There's at least 1.5k of generated source for the Spur > ImageSegment load and save support, some 2% of the interpreter/primitives > source code. That's a lot, and the code is complex and ugly. If it never > really worked before IMO we should nuke it asap. If it worked in some > fashion perhaps we can schedule its demise for the 6.0 release's VM. > > What do others think? > > > As long as you don?t remove it from the Cog VM?s until I no longer need it > I?m fine with that. > And when would that be? Do you mean that you use it in ways not covered by Bert's modifications (which render the VM support superfluous), or do you mean that you use ImageSegment as a naive consumer and are happy just so long as it works? > > Max > > > _,,,^..^,,,_ > best, Eliot > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/4cd0cdd9/attachment-0001.htm From ron at usmedrec.com Thu Sep 22 18:58:24 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Thu Sep 22 18:59:03 2016 Subject: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> Message-ID: <008f01d21503$4bf5a280$e3e0e780$@usmedrec.com> Hi All, Sorry I?m joining this conversation late. We are using ImageSegment for transferring croquet island state. Is this something covered in the changes from Bert or are we talking about dropping ImageSegment altogether? All the best, Ron Teitelbaum From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Eliot Miranda Sent: Thursday, September 22, 2016 2:47 PM To: Squeak Virtual Machine Development Discussion Cc: Pharo Development List; The general-purpose Squeak developers list Subject: Re: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) Hi Max, On Thu, Sep 22, 2016 at 11:42 AM, Max Leske wrote: On 22 Sep 2016, at 20:28, Eliot Miranda wrote: Hi Bert, Hi All, On Thu, Sep 15, 2016 at 2:55 PM, wrote: [snip] http://lists.squeakfoundation.org/pipermail/packages/2016-September/068930.html Name: System-bf.916 Ancestors: System-bf.915 Replace VM-level ImageSegment loading with a Smalltalk implementation for old (interpreter-era) projects. Also removes support for writing segments. This overrides the Spur support introduced in System-eem.758. So one question is should we delete VM support for ImageSegment from the Spur VM? There's at least 1.5k of generated source for the Spur ImageSegment load and save support, some 2% of the interpreter/primitives source code. That's a lot, and the code is complex and ugly. If it never really worked before IMO we should nuke it asap. If it worked in some fashion perhaps we can schedule its demise for the 6.0 release's VM. What do others think? As long as you don?t remove it from the Cog VM?s until I no longer need it I?m fine with that. And when would that be? Do you mean that you use it in ways not covered by Bert's modifications (which render the VM support superfluous), or do you mean that you use ImageSegment as a naive consumer and are happy just so long as it works? Max _,,,^..^,,,_ best, Eliot -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/00af5dfe/attachment.htm From eliot.miranda at gmail.com Thu Sep 22 19:07:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Sep 22 19:07:27 2016 Subject: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: <008f01d21503$4bf5a280$e3e0e780$@usmedrec.com> References: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> <008f01d21503$4bf5a280$e3e0e780$@usmedrec.com> Message-ID: Hi Ron, Hi All, On Thu, Sep 22, 2016 at 11:58 AM, Ron Teitelbaum wrote: > Hi All, > > > > Sorry I?m joining this conversation late. > > > > We are using ImageSegment for transferring croquet island state. Is this > something covered in the changes from Bert or are we talking about dropping > ImageSegment altogether? > I suppose I should explain. At ESUG Bert and others announced support for Toys in Squeak 5.1. As part of this work, ImageSegment loading and saving was moved from the VM up into pure Smalltalk code. This allows Squeak 5.1 (Spur) to load image segments saved on pre-Spur VMs. Consequent;ly we no longer need VM support for ImageSegment. Instead we can use the pure image-level code Bert has kindly written. The question is then at what point can we nuke the Spur VM support, since it is now superfluous. Bert, am I jumping the gun? Do we still need to write image-level support for writing image segments? If this is the case, Igor Stasenko described a primitive for collecting the set of objects to be written out. It is the initial part of the segment-writing primitive that collects the transitive closure of objects reachable only from those root objects. > > > All the best, > > > > Ron Teitelbaum > > > > *From:* Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] *On Behalf > Of *Eliot Miranda > *Sent:* Thursday, September 22, 2016 2:47 PM > *To:* Squeak Virtual Machine Development Discussion > *Cc:* Pharo Development List; The general-purpose Squeak developers list > *Subject:* Re: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support > (was Re: [squeak-dev] Daily Commit Log; System-bf.916) > > > > Hi Max, > > > > On Thu, Sep 22, 2016 at 11:42 AM, Max Leske wrote: > > > > > > On 22 Sep 2016, at 20:28, Eliot Miranda wrote: > > > > Hi Bert, Hi All, > > > > On Thu, Sep 15, 2016 at 2:55 PM, wrote: > > [snip] > > http://lists.squeakfoundation.org/pipermail/packages/2016- > September/068930.html > > Name: System-bf.916 > Ancestors: System-bf.915 > > Replace VM-level ImageSegment loading with a Smalltalk implementation for > old (interpreter-era) projects. > > Also removes support for writing segments. > > This overrides the Spur support introduced in System-eem.758. > > > > So one question is should we delete VM support for ImageSegment from the > Spur VM? There's at least 1.5k of generated source for the Spur > ImageSegment load and save support, some 2% of the interpreter/primitives > source code. That's a lot, and the code is complex and ugly. If it never > really worked before IMO we should nuke it asap. If it worked in some > fashion perhaps we can schedule its demise for the 6.0 release's VM. > > > > What do others think? > > > > As long as you don?t remove it from the Cog VM?s until I no longer need it > I?m fine with that. > > > > And when would that be? Do you mean that you use it in ways not covered > by Bert's modifications (which render the VM support superfluous), or do > you mean that you use ImageSegment as a naive consumer and are happy just > so long as it works? > > > > > > Max > > > > > > _,,,^..^,,,_ > > best, Eliot > > > > > > > > > > -- > > _,,,^..^,,,_ > > best, Eliot > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/5052aebd/attachment.htm From maxleske at gmail.com Thu Sep 22 19:08:14 2016 From: maxleske at gmail.com (Max Leske) Date: Thu Sep 22 19:08:20 2016 Subject: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> Message-ID: <180B5329-8FC3-445C-A6A0-9CC6139D7F18@gmail.com> Hi Eliot, > On 22 Sep 2016, at 20:46, Eliot Miranda wrote: > > Hi Max, > > On Thu, Sep 22, 2016 at 11:42 AM, Max Leske > wrote: > > >> On 22 Sep 2016, at 20:28, Eliot Miranda > wrote: >> >> Hi Bert, Hi All, >> >> On Thu, Sep 15, 2016 at 2:55 PM, > wrote: >> [snip] >> http://lists.squeakfoundation.org/pipermail/packages/2016-September/068930.html >> >> Name: System-bf.916 >> Ancestors: System-bf.915 >> >> Replace VM-level ImageSegment loading with a Smalltalk implementation for old (interpreter-era) projects. >> >> Also removes support for writing segments. >> >> This overrides the Spur support introduced in System-eem.758. >> >> So one question is should we delete VM support for ImageSegment from the Spur VM? There's at least 1.5k of generated source for the Spur ImageSegment load and save support, some 2% of the interpreter/primitives source code. That's a lot, and the code is complex and ugly. If it never really worked before IMO we should nuke it asap. If it worked in some fashion perhaps we can schedule its demise for the 6.0 release's VM. >> >> What do others think? > > As long as you don?t remove it from the Cog VM?s until I no longer need it I?m fine with that. > > And when would that be? Can?t really say but I'm hoping to get rid of ImageSegment within the next 2 years (very rough estimate). > Do you mean that you use it in ways not covered by Bert's modifications (which render the VM support superfluous), or do you mean that you use ImageSegment as a naive consumer and are happy just so long as it works? Speed is important to me, as I use ImageSegment to create snapshots of our applications (and hence I need write support, which Bert apparently removed). Those snapshots can exceed 90 MB and the graphs include thousands of objects. I fear that a pure Smalltalk implementation would not be fast enough. On the other hand, we would simply not move to a VM version without ImageSegment support, so that case may give me the boost I need to get rid of ImageSegment :) Currently we?re preparing to move to our first Cog VM in production. If you can give me 2 or 3 months, so that I know the version we use works for us, you could then remove ImageSegment support and we would start replacing ImageSegment with something else so we could keep updating our VM. Cheers, Max > > > Max > >> >> _,,,^..^,,,_ >> best, Eliot > > > > > > -- > _,,,^..^,,,_ > best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160922/2487adbf/attachment.htm From commits at source.squeak.org Thu Sep 22 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 22 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160922215508.18007.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068945.html Name: EToys-tfel.243 Ancestors: EToys-jl.242 - improve the kedama morph accepting a drawing to be more stable - don't show the step-button for kedama scripts, because it doesn't work - allowEtoyUserCustomEvents preference was removed ============================================= From commits at source.squeak.org Fri Sep 23 09:16:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 09:16:02 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.244.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.244.mcz ==================== Summary ==================== Name: EToys-tfel.244 Author: tfel Time: 23 September 2016, 11:14:39.343418 am UUID: 92cd544d-1e83-614e-a7e5-62b8d4215044 Ancestors: EToys-tfel.243 - move the BookMorph>>storeAsDataStream methods to SISS - when editing the Kedama drawing, don't include the patch in the painting, only the turtles (this way we can now e.g. pause the forest fire, erase some trees to create a firebreak, and then continue running the fire :)) - re-add the code from Squeakland to draw large arrows on mouse over =============== Diff against EToys-tfel.243 =============== Item was removed: - ----- Method: BookMorph>>storeAsDataStream (in category '*Etoys-Squeakland-fileIn/out') ----- - storeAsDataStream - - self storeAsDataStreamNamed: Project current name, '.sexp.data.gz'.! Item was removed: - ----- Method: BookMorph>>storeAsDataStreamNamed: (in category '*Etoys-Squeakland-fileIn/out') ----- - storeAsDataStreamNamed: zippedFileName - - | f d bytes zipped | - bytes := WriteStream on: ByteArray new. - d := DataStream on: bytes. - d nextPut: self pagesAndColorInSISSFormat. - d close. - f := FileStream newFileNamed: zippedFileName. - f binary; setFileTypeToObject. - zipped := GZipWriteStream on: f. - zipped nextPutAll: bytes contents. - zipped close. - f close - ! Item was changed: ----- Method: KedamaMorph>>editDrawing (in category 'menu') ----- editDrawing + | bnds sketchEditor delBlock myForm mySketch canvas | - | bnds sketchEditor delBlock myForm mySketch | self world assureNotPaintingElse: [^self]. self world prepareToPaint; displayWorld. bnds := self boundsInWorld. sketchEditor := SketchEditorMorph new. self comeToFront. + canvas := Display defaultCanvasClass extent: self fullBounds extent depth: 32. + canvas fillRectangle: (self bounds) color: self color. + patchVarDisplayForm fillColor: self color. + self drawTurtlesOnForm: patchVarDisplayForm. + pixelsPerPatch = 1 + ifTrue: [canvas drawImage: patchVarDisplayForm at: 0@0] + ifFalse: [canvas warpImage: patchVarDisplayForm transform: (MatrixTransform2x3 withScale: pixelsPerPatch) at: 0@0]. + myForm := canvas form. - myForm := self imageForm clippedToSize: (bnds extent - 2). myForm mapColor: self color to: Color transparent. mySketch := SketchMorph withForm: myForm. mySketch position: self position. self world addMorphFront: sketchEditor. sketchEditor initializeFor: mySketch inBounds: bnds pasteUpMorph: self world. delBlock := [self world paintingFlapTab ifNotNil: [:pt | pt hideFlap] ifNil: [self world paintBox ifNotNil: [:pb | pb delete]]]. sketchEditor afterNewPicDo: [:aForm :aRect | aForm offset: aRect topLeft - self topLeft. self acceptFormFromDrawing: aForm. delBlock value] ifNoBits: [delBlock value]! Item was changed: + ----- Method: TileMorph>>fixLayoutOfSubmorphsNotIn: (in category 'layout') ----- - ----- Method: TileMorph>>fixLayoutOfSubmorphsNotIn: (in category 'as yet unclassified') ----- fixLayoutOfSubmorphsNotIn: aCollection self allMorphsDo: [:m | (aCollection includes: m) ifFalse: [(m respondsTo: #fixLayoutOfSubmorphsNotIn:) ifTrue: [m ~~ self ifTrue: [m fixLayoutOfSubmorphsNotIn: aCollection]] ifFalse: [m layoutChanged]. aCollection add: m]]. self layoutChanged; fullBounds! Item was added: + ----- Method: TileMorph>>handlesMouseOver: (in category 'event handling') ----- + handlesMouseOver: evt + ^ self isPopArrowNeeded + or: [^super handlesMouseOver: evt]! Item was added: + ----- Method: TileMorph>>layoutChanged (in category 'layout') ----- + layoutChanged + | vpanel hpanel popArrows | + super layoutChanged. + self labelMorph + ifNil: [^ self]. + popArrows := self activeHand ifNil: [^ self] ifNotNilDo: [:ac | + ac valueOfProperty: #popArrows + ifAbsent: [^ self]]. + popArrows first == self + ifFalse: [^ self]. + vpanel := popArrows second. + hpanel := popArrows third. + vpanel + ifNotNil: [vpanel openInWorld. + vpanel center: self labelMorph center. + vpanel right: self labelMorph left - 2]. + hpanel + ifNotNil: [hpanel openInWorld. + hpanel center: self labelMorph center. + hpanel left: self labelMorph right + 2]! Item was added: + ----- Method: TileMorph>>morphToDropInPasteUp: (in category 'event handling') ----- + morphToDropInPasteUp: aPasteUp + "Answer the morph to drop in aPasteUp, given that the receiver is the putative droppee" + + ^ ScriptingTileHolder around: self! Item was added: + ----- Method: TileMorph>>mouseEnter: (in category 'event handling') ----- + mouseEnter: evt + + super mouseEnter:evt. + ^self showPopArrows! Item was added: + ----- Method: TileMorph>>mouseLeave: (in category 'event handling') ----- + mouseLeave: evt + "When the mouse is leaving and next object is not a pop arrow, remove + pop arrows." + | popArrows vpanel hpanel | + popArrows := evt hand + valueOfProperty: #popArrows + ifAbsent: [^super mouseLeave: evt]. + vpanel := popArrows second. + hpanel := popArrows third. + (vpanel notNil + and: [vpanel containsPoint: evt position]) + ifTrue: [^super mouseLeave: evt]. + (hpanel notNil + and: [hpanel containsPoint: evt position]) + ifTrue: [^super mouseLeave: evt]. + self hidePopArrows. + ^super mouseLeave: evt! Item was changed: ----- Method: TileMorph>>showPopArrows (in category '*Etoys-Squeakland-arrows popup') ----- showPopArrows | vpanel hpanel | Preferences usePopUpArrows ifFalse: [^ self]. self hidePopArrows. self isPopArrowNeeded ifFalse: [^ self]. + 1 haltOnce. vpanel := self buildVPopArrows. hpanel := self buildHPopArrows. self activeHand setProperty: #popArrows toValue: {self. vpanel. hpanel}. self layoutChanged! From commits at source.squeak.org Fri Sep 23 09:20:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 09:20:30 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.245.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.245.mcz ==================== Summary ==================== Name: EToys-tfel.245 Author: tfel Time: 23 September 2016, 11:19:04.516418 am UUID: fb4ca44e-d52b-f74f-ac74-e136cc4f9bb9 Ancestors: EToys-tfel.244 remove haltOnce. I should check for slips before committing =============== Diff against EToys-tfel.244 =============== Item was changed: ----- Method: TileMorph>>showPopArrows (in category '*Etoys-Squeakland-arrows popup') ----- showPopArrows | vpanel hpanel | Preferences usePopUpArrows ifFalse: [^ self]. self hidePopArrows. self isPopArrowNeeded ifFalse: [^ self]. - 1 haltOnce. vpanel := self buildVPopArrows. hpanel := self buildHPopArrows. self activeHand setProperty: #popArrows toValue: {self. vpanel. hpanel}. self layoutChanged! From Das.Linux at gmx.de Fri Sep 23 09:59:11 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Sep 23 09:59:17 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: References: Message-ID: Hi Colin, do you have an idea here? Best regards -Tobias On 16.09.2016, at 14:50, Jakob Reschke wrote: > Hello, > > I am having a look at Environments, but have not yet figured out, how > to operate them. I would like to create a new environment with an > additional binding for an existing class under another name, and load > a package in that new environment. > > The most of a documentation I have found is http://wiki.squeak.org/squeak/6220 > and I have tried the following so far: > > testenv := Environment named: #TestEnv1. > testenv import: Smalltalk globals. > testenv from: Smalltalk globals import: { #String -> #MyString }. > testenv importSelf. > testenv exportSelf. > > However, testenv valueOf: #MyString or testenv valueOf: #String both > return nil instead of the String class. Does it mean that the > from:import: did not work? It seems to only add a policy to my > environment, but no declarations or bindings. > > For evaluating something in context of the environment, I have found > the EnvironmentLoader, but it does not seem to recognize the > additional binding either: > > (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil > (EnvironmentLoader for: testenv) evaluate: 'String'. => nil > > (at least the import of the original globals seems to have worked). > > What steps am I missing? > > Also it is not very convenient to make up strings of code everytime I > want to do something in the other environment, is there a better way? > Can I get a system browser for my environment (where saving a method > compiles it with the environment bindings in place)? > > Best regards, > Jakob > From commits at source.squeak.org Fri Sep 23 11:44:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 11:44:58 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.246.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.246.mcz ==================== Summary ==================== Name: EToys-tfel.246 Author: tfel Time: 23 September 2016, 1:43:43.492418 pm UUID: 4adda244-96f0-8d44-a558-de9db4c3bc22 Ancestors: EToys-tfel.245 - hide uniclasses from the system, so they are collected when their players go away - fix editing and saving player scripts that refer to other players by name =============== Diff against EToys-tfel.245 =============== Item was changed: ----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain2 (in category '*Etoys-Squeakland-debug support') ----- copyAllMethodsAgain2 | c result | c := turtles class. result := (ClassBuilder new) name: c name inEnvironment: c environment subclassOf: c superclass type: c typeOfClass instanceVariableNames: KedamaTurtleVectorPlayer2 instanceVariablesString classVariableNames: KedamaTurtleVectorPlayer2 classVariablesString poolDictionaries: KedamaTurtleVectorPlayer2 sharedPoolsString category: Object categoryForUniclasses. turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer2. sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub]. + self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" + result environment forgetClass: result logged: false. + c superclass removeSubclass: result. ! Item was changed: ----- Method: Player class>>setNewInstVarNames: (in category 'user-defined inst vars') ----- setNewInstVarNames: listOfStrings "Make listOfStrings be the new list of instance variable names for the receiver" | disappearing firstAppearing instVarString instVarList | instVarList := self instVarNames asOrderedCollection. disappearing := instVarList copy. disappearing removeAllFoundIn: listOfStrings. disappearing do: [:oldName | self removeAccessorsFor: oldName]. firstAppearing := listOfStrings copy. firstAppearing removeAllFoundIn: instVarList. instVarString := String streamContents: [:aStream | listOfStrings do: [:aString | aStream nextPutAll: aString; nextPut: $ ]]. superclass subclass: self name instanceVariableNames: instVarString classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. + self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" + self environment forgetClass: self logged: false. + superclass removeSubclass: self. firstAppearing do: [:newName | self compileAccessorsFor: newName]. ! Item was added: + ----- Method: ScriptEncoder>>init:notifying: (in category 'as yet unclassified') ----- + init: class notifying: parser + + super init: class notifying: parser. + self referenceObject: ActiveWorld referenceWorld.! Item was added: + ----- Method: ScriptParser>>encoder (in category 'public access') ----- + encoder + ^encoder ifNil: + [encoder := ScriptEncoder new]! From commits at source.squeak.org Fri Sep 23 11:50:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 11:50:09 2016 Subject: [squeak-dev] The Trunk: Kernel-tfel.1039.mcz Message-ID: Tim Felgentreff uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-tfel.1039.mcz ==================== Summary ==================== Name: Kernel-tfel.1039 Author: tfel Time: 23 September 2016, 1:49:11.864418 pm UUID: 9e2d7733-0e85-1140-b333-5725f60a8877 Ancestors: Kernel-bf.1038 - hide uniclasses from the environment, so they are collected automatically when their players go away. One can always browse such classes using the InstanceBrowser, anyway. =============== Diff against Kernel-bf.1038 =============== Item was changed: ----- Method: Object class>>newUniqueClassInstVars:classInstVars: (in category 'instance creation') ----- newUniqueClassInstVars: instVarString classInstVars: classInstVarString "Create a unique class for the receiver" | aName aClass | self isSystemDefined ifFalse: [^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString]. aName := self chooseUniqueClassName. aClass := self subclass: aName instanceVariableNames: instVarString classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. + self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" + aClass environment forgetClass: aClass logged: false. + self removeSubclass: aClass. classInstVarString size > 0 ifTrue: [aClass class instanceVariableNames: classInstVarString]. ^ aClass! From commits at source.squeak.org Fri Sep 23 11:52:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 11:52:43 2016 Subject: [squeak-dev] The Trunk: Morphic-tfel.1309.mcz Message-ID: Tim Felgentreff uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tfel.1309.mcz ==================== Summary ==================== Name: Morphic-tfel.1309 Author: tfel Time: 23 September 2016, 1:51:11.868418 pm UUID: 3eebde93-d50b-bb42-bbb2-1d62eeb9b93a Ancestors: Morphic-jl.1308 when uniclasses are hidden from the global environment, we want to browse them with the InstanceBrowser =============== Diff against Morphic-jl.1308 =============== Item was changed: ----- Method: Morph>>buildDebugMenu: (in category 'debug and other') ----- buildDebugMenu: aHand "Answer a debugging menu for the receiver. The hand argument is seemingly historical and plays no role presently" | aMenu aPlayer | aMenu := MenuMorph new defaultTarget: self. aMenu addStayUpItem. (self hasProperty: #errorOnDraw) ifTrue: [aMenu add: 'start drawing again' translated action: #resumeAfterDrawError. aMenu addLine]. (self hasProperty: #errorOnStep) ifTrue: [aMenu add: 'start stepping again' translated action: #resumeAfterStepError. aMenu addLine]. aMenu add: 'inspect morph' translated action: #inspectInMorphic:. aMenu add: 'inspect owner chain' translated action: #inspectOwnerChain. Smalltalk isMorphic ifFalse: [aMenu add: 'inspect morph (in MVC)' translated action: #inspect]. self isMorphicModel ifTrue: [aMenu add: 'inspect model' translated target: self model action: #inspect]. (aPlayer := self player) ifNotNil: [aMenu add: 'inspect player' translated target: aPlayer action: #inspect]. aMenu add: 'explore morph' translated target: self selector: #exploreInMorphic:. aMenu addLine. aPlayer ifNotNil: [ aMenu add: 'viewer for Player' translated target: self player action: #beViewed. aMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan "View" halo handle' translated ]. aMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly. aMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated. aMenu addLine. aPlayer ifNotNil: [aPlayer class isUniClass ifTrue: [ + aMenu add: 'browse player class' translated target: aPlayer selector: #haveFullProtocolBrowsedShowingSelector: argumentList: #(nil)]]. - aMenu add: 'browse player class' translated target: aPlayer action: #browseHierarchy]]. aMenu add: 'browse morph class' translated target: self selector: #browseHierarchy. (self isMorphicModel) ifTrue: [aMenu add: 'browse model class' target: self model selector: #browseHierarchy]. aMenu addLine. self addViewingItemsTo: aMenu. aMenu add: 'make own subclass' translated action: #subclassMorph; add: 'save morph in file' translated action: #saveOnFile; addLine; add: 'call #tempCommand' translated action: #tempCommand; add: 'define #tempCommand' translated action: #defineTempCommand; addLine; add: 'control-menu...' translated target: self selector: #invokeMetaMenu:; add: 'edit balloon help' translated action: #editBalloonHelpText. ^ aMenu! From commits at source.squeak.org Fri Sep 23 11:53:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 11:53:47 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-tfel.198.mcz Message-ID: Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-tfel.198.mcz ==================== Summary ==================== Name: MorphicExtras-tfel.198 Author: tfel Time: 23 September 2016, 1:53:04.966418 pm UUID: 356e739d-3d27-4341-ac87-b4b42b58766b Ancestors: MorphicExtras-jl.197 Flag those hacks for the etoys viewer flaps so we can remember to clean them up =============== Diff against MorphicExtras-jl.197 =============== Item was changed: ----- Method: ViewerFlapTab>>adjustPositionAfterHidingFlap (in category 'show & hide') ----- adjustPositionAfterHidingFlap "we add the width of flap itself to our referent, to reflect the actual width from the edge of the screen, including the space we leave for other flaps. see also ViewerFlapTab>>fitOnScreen" + self flag: #todo. self referent width: self referent width + self width. super adjustPositionAfterHidingFlap.! Item was changed: ----- Method: ViewerFlapTab>>fitOnScreen (in category 'positioning') ----- fitOnScreen | constrainer | super fitOnScreen. "We want to leave a margin for the flaps on the side and for the global flaps at the top (like the Sugar navbar) so we reduce the referents top and its width. We undo this before hiding the flap in ViewerFlapTab>>adjustPositionAfterHidingFlap" + self flag: #todo. constrainer := (owner ifNil: [self]) clearArea. self flapShowing ifTrue: [ Flaps globalFlapTabsIfAny do: [:each | (each edgeToAdhereTo = #top and: [each bottom > self referent top]) ifTrue: [self referent top: each bottom]. (each edgeToAdhereTo = #top and: [each bottom > self top]) ifTrue: [self top: each bottom]]. self referent width: constrainer right - self width - self right].! From commits at source.squeak.org Fri Sep 23 12:02:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 12:02:36 2016 Subject: [squeak-dev] The Trunk: Protocols-tfel.57.mcz Message-ID: Tim Felgentreff uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-tfel.57.mcz ==================== Summary ==================== Name: Protocols-tfel.57 Author: tfel Time: 23 September 2016, 2:02:17.869418 pm UUID: d102b3c8-32c4-054f-81ba-8e08d7069039 Ancestors: Protocols-tfel.56 Fix showing source of uniclasses that are not in the environment in instance browsers by going directly through the instance's class for lookup =============== Diff against Protocols-tfel.56 =============== Item was added: + ----- Method: InstanceBrowser>>setClassAndSelectorIn: (in category 'as yet unclassified') ----- + setClassAndSelectorIn: csBlock + | cm | + super setClassAndSelectorIn: [:class :selector | + (class notNil and: [selector notNil]) ifTrue: [^ csBlock value: class value: selector]. + cm := targetClass + lookupSelector: (self selection asString findTokens: Character space) first asSymbol. + cm ifNotNil: [^ csBlock value: (cm methodClass ifNil: [targetClass]) value: cm selector]]. + ^ csBlock value: nil value: nil! From commits at source.squeak.org Fri Sep 23 12:45:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 12:45:23 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.247.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.247.mcz ==================== Summary ==================== Name: EToys-tfel.247 Author: tfel Time: 23 September 2016, 2:44:03.029418 pm UUID: 6dee507f-4191-7145-846d-2a52f0e41672 Ancestors: EToys-tfel.246 - Player classes should always return a category, be it the uniclass category by default. This is required for recompiling when the class isn't in any organization - make sure that we cannot drag tile morphs out of their Etoys sentences, because that breaks compilation =============== Diff against EToys-tfel.246 =============== Item was added: + ----- Method: Player class>>category (in category 'organization') ----- + category + + ^ super category ifNil: [self categoryForUniclasses]! Item was added: + ----- Method: TileMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') ----- + aboutToBeGrabbedBy: aHand + "do not allow grabbing me out of a tile or out of a tile pad morph (which itself is in a tile)" + ^ (self owner isTileLike or: [self owner owner notNil and: [self owner owner isTileLike]]) + ifTrue: [nil] ifFalse: [self] + ! From commits at source.squeak.org Fri Sep 23 13:10:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 13:10:24 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.248.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.248.mcz ==================== Summary ==================== Name: EToys-tfel.248 Author: tfel Time: 23 September 2016, 3:08:59.783418 pm UUID: 4e5fd879-c6b4-624b-9380-e84b180eaeb2 Ancestors: EToys-tfel.247 - also don't allow grabbing a tile morph out of the viewer line - add a convenient way to add a name watcher to a player's morph through the viewer menu =============== Diff against EToys-tfel.247 =============== Item was changed: ----- Method: Player>>offerViewerMenuFor:event: (in category 'misc') ----- offerViewerMenuFor: aViewer event: evt "Put up the Viewer menu on behalf of the receiver. If the shift key is held down, put up the alternate menu. The menu omits the 'add a new variable' item when in eToyFriendly mode, as per request from teachers using Squeakland in 2003 once the button for adding a new variable was added to the viewer" | aMenu aWorld | (evt notNil and: [evt shiftPressed and: [Preferences eToyFriendly not]]) ifTrue: [^ self offerAlternateViewerMenuFor: aViewer event: evt]. aWorld := aViewer world. aMenu := MenuMorph new defaultTarget: self. aMenu title: self externalName. aMenu addStayUpItem. self costume renderedMorph offerCostumeViewerMenu: aMenu. Preferences eToyFriendly ifFalse: "exclude this from squeakland-like UI " [aMenu add: 'add a new variable' translated target: self action: #addInstanceVariable. aMenu balloonTextForLastItem: 'Add a new variable to this object and all of its siblings. You will be asked to supply a name for it.' translated]. aMenu add: 'add a new script' translated target: aViewer action: #newPermanentScript. aMenu balloonTextForLastItem: 'Add a new script that will work for this object and all of its siblings' translated. aMenu addLine. aMenu add: 'grab this object' translated target: self selector: #grabPlayerIn: argument: aWorld. aMenu balloonTextForLastItem: 'This will actually pick up the object this Viewer is looking at, and hand it to you. Click the (left) button to drop it' translated. aMenu add: 'reveal this object' translated target: self selector: #revealPlayerIn: argument: aWorld. aMenu balloonTextForLastItem: 'If you have misplaced the object that this Viewer is looking at, use this item to (try to) make it visible' translated. aMenu add: 'tile representing this object' translated action: #tearOffTileForSelf. aMenu balloonTextForLastItem: 'choose this to obtain a tile which represents the object associated with this script' translated. aMenu addLine. aMenu add: 'add a search pane' translated target: aViewer action: #addSearchPane. + aMenu add: 'Toggle showing name' translated target: self action: #toggleShowName. Preferences eToyFriendly ifFalse: [ aMenu addLine. aMenu add: 'more...' translated target: self selector: #offerAlternateViewerMenuFor:event: argumentList: {aViewer. evt}]. aMenu popUpEvent: evt in: aWorld ! Item was added: + ----- Method: Player>>toggleShowName (in category 'as yet unclassified') ----- + toggleShowName + | watcher | + self costume ifNil: [^ self]. + watcher := self costume valueOfProperty: #nameWatcher ifAbsent: [nil]. + watcher + ifNil: [ + watcher := FollowingWatcher new unlabeledForPlayer: self getter: #externalName. + watcher openInWorld.] + ifNotNil: [ + watcher delete. + watcher := nil]. + self costume setProperty: #nameWatcher toValue: watcher.! Item was changed: ----- Method: TileMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') ----- aboutToBeGrabbedBy: aHand "do not allow grabbing me out of a tile or out of a tile pad morph (which itself is in a tile)" + ^ (self owner isTileLike or: + [self owner owner notNil and: [self owner owner isTileLike]] or: + [self owner isAlignmentMorph]) - ^ (self owner isTileLike or: [self owner owner notNil and: [self owner owner isTileLike]]) ifTrue: [nil] ifFalse: [self] ! From commits at source.squeak.org Fri Sep 23 13:27:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 13:27:28 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.249.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.249.mcz ==================== Summary ==================== Name: EToys-tfel.249 Author: tfel Time: 23 September 2016, 3:26:09.056418 pm UUID: 844e5444-0afb-144b-a622-dcb33fbf8597 Ancestors: EToys-tfel.248 fix the defensive code for updating status morphs in scripts =============== Diff against EToys-tfel.248 =============== Item was changed: ----- Method: ScriptInstantiation>>updateAllStatusMorphs (in category 'status control') ----- updateAllStatusMorphs "Update all status morphs bound to the receiver. Done with a sledge-hammer at present." | w | w := self currentWorld. + (w hasProperty: #updateStatusMorph) ifTrue: [^ self]. + w setProperty: #updateStatusMorph toValue: true. + Project current addDeferredUIMessage: [ + (w valueOfProperty: #updateStatusMorph ifAbsent: [false]) ifTrue: [ + (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and: + [m scriptInstantiation == self]]) do: + [:aStatusControl | self updateStatusMorph: aStatusControl]. + w removeProperty: #updateStatusMorph. - - (w hasProperty: #foo) ifFalse: [ - w setProperty: #updateStatusMorph toValue: true. - Project current addDeferredUIMessage: [ - (w hasProperty: #foo) ifTrue: [ - w removeProperty: #updateStatusMorph. - (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and: - [m scriptInstantiation == self]]) do: - [:aStatusControl | self updateStatusMorph: aStatusControl] . - ] ] ] ! From commits at source.squeak.org Fri Sep 23 13:45:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 13:45:51 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.250.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.250.mcz ==================== Summary ==================== Name: EToys-tfel.250 Author: tfel Time: 23 September 2016, 3:44:00.135418 pm UUID: e1800a62-97df-e84d-8053-4c42e5199bf3 Ancestors: EToys-tfel.249 since different script instantiation may need to update their statuses, don't use just one global flag, instead have a flag for each instantiation =============== Diff against EToys-tfel.249 =============== Item was changed: ----- Method: ScriptInstantiation>>updateAllStatusMorphs (in category 'status control') ----- updateAllStatusMorphs "Update all status morphs bound to the receiver. Done with a sledge-hammer at present." | w | w := self currentWorld. + (w hasProperty: self) ifTrue: [^ self]. + w setProperty: self toValue: #updating. - (w hasProperty: #updateStatusMorph) ifTrue: [^ self]. - w setProperty: #updateStatusMorph toValue: true. Project current addDeferredUIMessage: [ + (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and: + [m scriptInstantiation == self]]) do: + [:aStatusControl | self updateStatusMorph: aStatusControl]. + w removeProperty: self. - (w valueOfProperty: #updateStatusMorph ifAbsent: [false]) ifTrue: [ - (w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and: - [m scriptInstantiation == self]]) do: - [:aStatusControl | self updateStatusMorph: aStatusControl]. - w removeProperty: #updateStatusMorph. - ] ] ! From vaidasd at gmail.com Fri Sep 23 14:10:12 2016 From: vaidasd at gmail.com (=?UTF-8?Q?Vaidotas_Did=C5=BEbalis?=) Date: Fri Sep 23 14:10:57 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Hello all, To save morph and restore it is a basic behavior which is broken since Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a debugger window open in a few clicks. This bug happened as a side effect of pushing Environments package into the Squeak image beginning from Squeak 4.5. No one uses Environments; there are significant use for morph saving. Squeak needs this ability. Maybe it is easier to remove Environments from stock Image and to fix the bug introduced by that package. Introduction of new packages need not to break useful things... regards, Vaidotas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160923/502c53cb/attachment.htm From jakob.reschke at student.hpi.de Fri Sep 23 14:36:39 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Fri Sep 23 14:37:05 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Hi Vaidotas, I cannot reproduce this. In my current trunk image where I coincidentally try to get familiar with Environments to put them to use, I can save morphs without a debugger appearing. Loading via drag and drop works as well (though the option "load as morph" appears twice in the dialog that prompts me for an action after the drop). Does Morph saving depend on ImageSegments anyway? Best regards, Jakob 2016-09-23 16:10 GMT+02:00 Vaidotas Did?balis : > Hello all, > To save morph and restore it is a basic behavior which is broken since > Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a > debugger window open in a few clicks. This bug happened as a side effect of > pushing Environments package into the Squeak image beginning from Squeak > 4.5. No one uses Environments; there are significant use for morph saving. > Squeak needs this ability. Maybe it is easier to remove Environments from > stock Image and to fix the bug introduced by that package. > Introduction of new packages need not to break useful things... > regards, > Vaidotas > From commits at source.squeak.org Fri Sep 23 14:54:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 14:54:55 2016 Subject: [squeak-dev] The Trunk: 60Deprecated-tfel.3.mcz Message-ID: Tim Felgentreff uploaded a new version of 60Deprecated to project The Trunk: http://source.squeak.org/trunk/60Deprecated-tfel.3.mcz ==================== Summary ==================== Name: 60Deprecated-tfel.3 Author: tfel Time: 23 September 2016, 4:54:25.289724 pm UUID: c54a411d-c089-7442-8413-739b29ca5fb4 Ancestors: 60Deprecated-mt.2 deprecate the old modalWindow property, was only used by eToys code =============== Diff against 60Deprecated-mt.2 =============== Item was added: + ----- Method: Morph>>becomeModal (in category '*60Deprecated-user-interface') ----- + becomeModal + + self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'. + "self currentWorld + ifNotNil: [self currentWorld modalWindow: self]"! Item was added: + ----- Method: PasteUpMorph>>modalWindow: (in category '*60Deprecated-accessing') ----- + modalWindow: aMorph + + self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'. + "(self valueOfProperty: #modalWindow) + ifNotNil: [:morph | morph doCancel]. + self setProperty: #modalWindow toValue: aMorph. + aMorph + ifNotNil: [self + when: #aboutToLeaveWorld + send: #removeModalWindow + to: self]"! Item was added: + ----- Method: PasteUpMorph>>removeModalWindow (in category '*60Deprecated-accessing') ----- + removeModalWindow + self deprecated: 'The global becomeModal is no longer supported, use e.g. a dialog window'. + "self modalWindow: nil"! From commits at source.squeak.org Fri Sep 23 14:57:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 14:57:48 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.251.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.251.mcz ==================== Summary ==================== Name: EToys-tfel.251 Author: tfel Time: 23 September 2016, 4:56:28.394724 pm UUID: 2ccc5290-487a-fc49-833c-2f771035e779 Ancestors: EToys-tfel.250 remove becomeModal =============== Diff against EToys-tfel.250 =============== Item was changed: ----- Method: EToyProjectDetailsMorph class>>getFullInfoFor:ifValid:expandedFormat: (in category 'instance creation') ----- getFullInfoFor: aProject ifValid: aMessageSend expandedFormat: expandedFormat "Obtain project info for the project by putting up a dialog-box showing current values for the various project-info variables and allowing the user to change the data." | detailsMorph | detailsMorph := self basicNew. detailsMorph expandedFormat: expandedFormat; project: aProject actionBlock: aMessageSend; initialize; - becomeModal; beSticky; openCenteredInWorld! Item was changed: ----- Method: EToyProjectQueryMorph class>>onServer: (in category 'instance creation') ----- onServer: aProjectServer "EToyProjectQueryMorph onServer: SuperSwikiServer testOnlySuperSwiki" | detailsMorph messageToSendIfValid | detailsMorph := self basicNew. messageToSendIfValid := MessageSend receiver: detailsMorph selector: #carryOutQuery:onProjectServer: arguments: {nil. aProjectServer}. detailsMorph project: nil actionBlock: messageToSendIfValid; "*** actionBlock: [ :x | criteria := OrderedCollection new. x keysAndValuesDo: [ :k :v | (clean := v withBlanksTrimmed convertToEncoding: SuperSwikiServer defaultEncodingName) isEmpty ifFalse: [criteria add: k,': *',clean,'*']]. aProjectServer queryProjectsAndShow: criteria]; ****" initialize; - becomeModal; openCenteredInWorld! Item was changed: ----- Method: FileList2 class>>buildMorphicWindow:title: (in category '*Etoys-Squeakland-blue ui') ----- buildMorphicWindow: aFileList title: aString | window | window := ScriptingSystem buildPanelTitled: aString. window setProperty: #FileList toValue: aFileList. aFileList modalView: window. - window becomeModal. ^ window! From commits at source.squeak.org Fri Sep 23 14:59:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 15:00:56 2016 Subject: [squeak-dev] The Trunk: Morphic-tfel.1310.mcz Message-ID: Tim Felgentreff uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tfel.1310.mcz ==================== Summary ==================== Name: Morphic-tfel.1310 Author: tfel Time: 23 September 2016, 4:59:03.672724 pm UUID: bac48a9f-07c3-2640-9923-a1be55a78df0 Ancestors: Morphic-tfel.1309 deprecate modalWindow property usage on PasteUpMorphs, that was only used in eToys related code =============== Diff against Morphic-tfel.1309 =============== Item was removed: - ----- Method: Morph>>becomeModal (in category 'user interface') ----- - becomeModal - self currentWorld - ifNotNil: [self currentWorld modalWindow: self]! Item was changed: ----- Method: PasteUpMorph>>assureNotPaintingElse: (in category 'world state') ----- assureNotPaintingElse: aBlock "If painting is already underway in the receiver, put up an informer to that effect and evalute aBlock" - self removeModalWindow. self sketchEditorOrNil ifNotNil: [self inform: 'Sorry, you can only paint one object at a time' translated. Cursor normal show. ^ aBlock value] ! Item was removed: - ----- Method: PasteUpMorph>>modalWindow: (in category 'accessing') ----- - modalWindow: aMorph - (self valueOfProperty: #modalWindow) - ifNotNil: [:morph | morph doCancel]. - self setProperty: #modalWindow toValue: aMorph. - aMorph - ifNotNil: [self - when: #aboutToLeaveWorld - send: #removeModalWindow - to: self]! Item was changed: ----- Method: PasteUpMorph>>releaseCachedState (in category 'caching') ----- releaseCachedState super releaseCachedState. - self removeModalWindow. presenter ifNotNil:[presenter flushPlayerListCache]. self isWorldMorph ifTrue:[self cleanseStepList].! Item was removed: - ----- Method: PasteUpMorph>>removeModalWindow (in category 'accessing') ----- - removeModalWindow - self modalWindow: nil! From commits at source.squeak.org Fri Sep 23 15:03:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 15:03:08 2016 Subject: [squeak-dev] The Trunk: Network-tfel.185.mcz Message-ID: Tim Felgentreff uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-tfel.185.mcz ==================== Summary ==================== Name: Network-tfel.185 Author: tfel Time: 23 September 2016, 5:02:31.408724 pm UUID: 8a7f87c3-69e4-e44d-9ff8-ab1737aa78ed Ancestors: Network-tfel.184 becomeModal was deprecated =============== Diff against Network-tfel.184 =============== Item was changed: ----- Method: SuperSwikiServer>>showQueryAsPVM: (in category 'testing') ----- showQueryAsPVM: resultStream | answer gif whatToShow projectName fileName firstURL wrapper currX currY maxX maxY rawProjectName | "SuperSwikiServer testOnlySuperSwiki queryProjectsAndShow" resultStream reset; nextLine. answer := RectangleMorph new useRoundedCorners; borderWidth: 0; borderColor: Color blue; color: Color paleBlue. currX := currY := maxX := maxY := 10. [resultStream atEnd] whileFalse: [ rawProjectName := resultStream nextLine. projectName := rawProjectName convertFromEncoding: self encodingName. fileName := resultStream nextLine convertFromEncoding: self encodingName. gif := self oldFileOrNoneNamed: rawProjectName,'.gif'. gif ifNotNil: [gif := GIFReadWriter formFromStream: gif]. currX > 600 ifTrue: [ currX := 10. currY := maxY + 10. ]. gif ifNil: [ gif := AlignmentMorph newColumn hResizing: #shrinkWrap; vResizing: #shrinkWrap; borderWidth: 8; borderColor: Color red; color: Color lightRed; addMorph: (StringMorph contents: 'No GIF for ',projectName); fullBounds; imageForm ]. firstURL := self url. firstURL last == $/ ifFalse: [firstURL := firstURL, '/']. whatToShow := ProjectViewMorph new image: (gif asFormOfDepth: Display depth); lastProjectThumbnail: gif; setProperty: #SafeProjectName toValue: projectName; project: (DiskProxy global: #Project selector: #namedUrl: args: {firstURL,fileName} ). answer addMorphBack: (whatToShow position: currX @ currY). currX := currX + whatToShow width + 10. maxX := maxX max: currX. maxY := maxY max: currY + whatToShow height. ]. maxX = 10 ifTrue: [ ^self inform: 'No projects found for your criteria' ]. answer extent: (maxX @ maxY) + (0@10). wrapper := ScrollPane new extent: (answer width + 10) @ (answer height min: 400). wrapper color: Color white. wrapper scroller addMorph: answer. + wrapper - wrapper - becomeModal; openCenteredInWorld; useRoundedCorners; setScrollDeltas.! From commits at source.squeak.org Fri Sep 23 15:07:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 15:07:24 2016 Subject: [squeak-dev] The Trunk: Tools-tfel.728.mcz Message-ID: Tim Felgentreff uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-tfel.728.mcz ==================== Summary ==================== Name: Tools-tfel.728 Author: tfel Time: 23 September 2016, 5:06:29.422724 pm UUID: eb83c28d-866e-914d-9d6b-aba9bac17034 Ancestors: Tools-jl.727 becomeModal was deprecated =============== Diff against Tools-jl.727 =============== Item was changed: ----- Method: FileList2 class>>morphicViewGeneralLoaderInWorld: (in category 'blue ui') ----- morphicViewGeneralLoaderInWorld: aWorld " FileList2 morphicViewGeneralLoaderInWorld: self currentWorld " | window aFileList buttons treePane textColor1 fileListPane pane2a pane2b fileTypeInfo fileTypeButtons fileTypeRow actionRow | fileTypeInfo := self endingSpecs. window := AlignmentMorphBob1 newColumn. window hResizing: #shrinkWrap; vResizing: #shrinkWrap. textColor1 := Color r: 0.742 g: 0.839 b: 1.0. aFileList := self new directory: FileDirectory default. aFileList fileSelectionBlock: self projectOnlySelectionBlock; modalView: window. window setProperty: #FileList toValue: aFileList; wrapCentering: #center; cellPositioning: #topCenter; borderWidth: 1; borderColor: (Color r: 0.9 g: 0.801 b: 0.2); useRoundedCorners. fileTypeButtons := fileTypeInfo collect: [ :each | (self blueButtonText: each first textColor: Color gray inWindow: window) setProperty: #enabled toValue: true; hResizing: #shrinkWrap; useSquareCorners ]. buttons := {{'OK'. Color lightGreen}. {'Cancel'. Color lightRed}} collect: [ :each | self blueButtonText: each first textColor: textColor1 color: each second inWindow: window ]. treePane := aFileList morphicDirectoryTreePane extent: 250@300; retractable: false; borderWidth: 0. fileListPane := aFileList morphicFileListPane extent: 350@300; retractable: false; borderWidth: 0. window addARow: {window fancyText: 'Find...' translated font: Preferences standardEToysTitleFont color: textColor1}. fileTypeRow := window addARowCentered: fileTypeButtons cellInset: 2. actionRow := window addARowCentered: { buttons first. (Morph new extent: 30@5) color: Color transparent. buttons second } cellInset: 2. window addARow: { (window inAColumn: {(pane2a := window inARow: {window inAColumn: {treePane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. (window inAColumn: {(pane2b := window inARow: {window inAColumn: {fileListPane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. }. window fullBounds. window fillWithRamp: (Color r: 1 g: 0.85 b: 0.975) oriented: 0.65. pane2a fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). pane2b fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). " buttons do: [ :each | each fillWithRamp: ColorTheme current dialogButtonsRampOrColor oriented: (0.75 @ 0). ]. " fileTypeButtons do: [ :each | each on: #mouseUp send: #value:value: to: [ :evt :morph | self update: actionRow in: window fileTypeRow: fileTypeRow morphUp: morph. ] ]. buttons first on: #mouseUp send: #okHit to: aFileList. buttons second on: #mouseUp send: #cancelHit to: aFileList. aFileList postOpen. window position: aWorld topLeft + (aWorld extent - window extent // 2). aFileList directoryChangeBlock: [ :newDir | self update: actionRow in: window fileTypeRow: fileTypeRow morphUp: nil. self enableTypeButtons: fileTypeButtons info: fileTypeInfo forDir: newDir. ]. aFileList directory: aFileList directory. window adoptPaneColor: (Color r: 0.548 g: 0.677 b: 1.0). - window becomeModal. ^ window openInWorld: aWorld.! Item was changed: ----- Method: FileList2 class>>morphicViewProjectLoader2InWorld:reallyLoad:dirFilterType: (in category 'blue ui') ----- morphicViewProjectLoader2InWorld: aWorld reallyLoad: aBoolean dirFilterType: aSymbol | window aFileList buttons treePane textColor1 fileListPane pane2a pane2b treeExtent filesExtent | window := AlignmentMorphBob1 newColumn. window hResizing: #shrinkWrap; vResizing: #shrinkWrap. textColor1 := Color r: 0.742 g: 0.839 b: 1.0. aFileList := self new. aFileList optionalButtonSpecs: aFileList servicesForProjectLoader; fileSelectionBlock: ( aSymbol == #limitedSuperSwikiDirectoryList ifTrue: [ MessageSend receiver: self selector: #projectOnlySelectionMethod: ] ifFalse: [ self projectOnlySelectionBlock ] ); "dirSelectionBlock: self hideSqueakletDirectoryBlock;" modalView: window. aFileList directory: FileDirectory default. window setProperty: #FileList toValue: aFileList; wrapCentering: #center; cellPositioning: #topCenter; borderWidth: 1; borderColor: (Color r: 0.9 g: 0.801 b: 0.2); useRoundedCorners. buttons := {{'OK'. Color lightGreen}. {'Cancel'. Color lightRed}} collect: [ :each | self blueButtonText: each first textColor: textColor1 color: each second inWindow: window ]. aWorld width < 800 ifTrue: [ treeExtent := 150@300. filesExtent := 350@300. ] ifFalse: [ treeExtent := 350@500. filesExtent := 550@500. ]. (treePane := aFileList morphicDirectoryTreePaneFiltered: aSymbol) extent: treeExtent; retractable: false; borderWidth: 0. fileListPane := aFileList morphicFileListPane extent: filesExtent; retractable: false; borderWidth: 0. window addARow: { window fancyText: 'Load A Project' translated font: Preferences standardEToysTitleFont color: textColor1 }; addARowCentered: { buttons first. (Morph new extent: 30@5) color: Color transparent. buttons second }; addARow: { window fancyText: 'Please select a project' translated font: Preferences standardEToysFont color: textColor1 }; addARow: { (window inAColumn: {(pane2a := window inARow: {window inAColumn: {treePane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. (window inAColumn: {(pane2b := window inARow: {window inAColumn: {fileListPane}}) useRoundedCorners; layoutInset: 0; borderWidth: 1; borderColor: (Color r: 0.6 g: 0.7 b: 1) }) layoutInset: 10. }. window fullBounds. window fillWithRamp: (Color r: 1 g: 0.85 b: 0.975) oriented: 0.65. pane2a fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). pane2b fillWithRamp: (Color r: 0.85 g: 0.9 b: 1) oriented: (0.7 @ 0.35). " buttons do: [ :each | each fillWithRamp: ColorTheme current dialogButtonsRampOrColor oriented: (0.75 @ 0). ]. " buttons first on: #mouseUp send: (aBoolean ifTrue: [#okHitForProjectLoader] ifFalse: [#okHit]) to: aFileList. buttons second on: #mouseUp send: #cancelHit to: aFileList. aFileList postOpen. window position: aWorld topLeft + (aWorld extent - window extent // 2). window adoptPaneColor: (Color r: 0.548 g: 0.677 b: 1.0). - window becomeModal. ^ window openInWorld: aWorld.! From jakob.reschke at student.hpi.de Fri Sep 23 15:28:35 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Fri Sep 23 15:29:05 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: In the meantime, I figured out that the Smalltalk globals environment does not export anything. Hence, nothing can be imported from it by default. Further, I found this post [1] by Frank Shearar, which contains a snippet to load a package into an environment (however, EnvironmentRequest has been renamed to CurrentEnvironment since then). He also proposes `Smalltalk globals exportSelf` there, to let the global environment export its contents, which could be one way to solve my first problem. I am unsure how this is intended to be used; what is the reason for not letting the global environment export anything by default? After all, you have to start somewhere... To attempt an alternative, I created a fresh environment for the classes that I want to import later under other names like so: fsenv := Environment named: #FileSystem. fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: []. fspackage classes do: [:ea | fsenv bind: ea name to: ea ] fsenv importSelf. fsenv exportSelf. testenv := Environment named: #TestEnv1. testenv importSelf. testenv exportSelf. testenv import: fsenv removingPrefix: 'FS'. testenv valueOf: #Filesystem "=> FSFilesystem" Now I can use testenv valueOf: #Filesystem to retrieve the FSFilesystem class, so far so good. I have not used my testenv for anything real yet, but it is still missing all the basics such as Object or Array. So I doubt it will be of much use, unless I set up another environment to import from that contains all the Kernel, Collections etc. classes. But this does not feel right, as there already is such an environment: Smalltalk globals... In the post from 2012 for which Chris posted the link, Colin linked an image (and luckily, he has not removed it from his webspace since then) from which I could grab the browser opening snippet. It is simply Browser fullOnClass: aClassDefinedInAnotherEnvironment ...which in my case gives me a browser for the global environment instead, because the "renamed" classes stem from there, of course. Frank's post also has another snippet to browse an environment: b := Browser new selectEnvironment: anEnvironment; yourself. Browser openBrowserView: (b openEditString: nil) label: b defaultBrowserTitle But it seems like the browser will only show an environment's own contents, not the imported classes. Hence, I do not see anything in my environments so far. If my assumption is correct, there is no way to see the imported classes under their new names in the browser. When I try to define a new class using my empty browser on my environment, it goes back into Smalltalk globals and puts the class there instead. It also does that in Colin's old image, so I guess defining classes in environments is not supported that way. More elaborate tools are probably required to easily see what is going on, without exploring the Environments implementation in parallel. [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-December/175519.html 2016-09-23 11:59 GMT+02:00 Tobias Pape : > Hi Colin, > > do you have an idea here? > > Best regards > -Tobias 2016-09-16 18:27 GMT+02:00 Chris Cunnington : >>Can I get a system browser for my environment (where saving a method >>compiles it with the environment bindings in place)? > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-June/164605.html > > Chris > > On 16.09.2016, at 14:50, Jakob Reschke wrote: > >> Hello, >> >> I am having a look at Environments, but have not yet figured out, how >> to operate them. I would like to create a new environment with an >> additional binding for an existing class under another name, and load >> a package in that new environment. >> >> The most of a documentation I have found is http://wiki.squeak.org/squeak/6220 >> and I have tried the following so far: >> >> testenv := Environment named: #TestEnv1. >> testenv import: Smalltalk globals. >> testenv from: Smalltalk globals import: { #String -> #MyString }. >> testenv importSelf. >> testenv exportSelf. >> >> However, testenv valueOf: #MyString or testenv valueOf: #String both >> return nil instead of the String class. Does it mean that the >> from:import: did not work? It seems to only add a policy to my >> environment, but no declarations or bindings. >> >> For evaluating something in context of the environment, I have found >> the EnvironmentLoader, but it does not seem to recognize the >> additional binding either: >> >> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil >> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil >> >> (at least the import of the original globals seems to have worked). >> >> What steps am I missing? >> >> Also it is not very convenient to make up strings of code everytime I >> want to do something in the other environment, is there a better way? >> Can I get a system browser for my environment (where saving a method >> compiles it with the environment bindings in place)? >> >> Best regards, >> Jakob >> > From vaidasd at gmail.com Fri Sep 23 16:34:37 2016 From: vaidasd at gmail.com (=?UTF-8?Q?Vaidotas_Did=C5=BEbalis?=) Date: Fri Sep 23 16:35:22 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Hello Jacob, ActiveWorld is morph also, and it cannot be stored to disk. I believed all morphs share the same storage mechanism, and that we are considering to remove that mechanism. Sorry for wrong claim. You are right, some morphs can be saved. Perhaps morphs I tried saving were dependent on the ActiveWorld. regards, Vaidotas On Fri, Sep 23, 2016 at 5:36 PM, Jakob Reschke wrote: > Hi Vaidotas, > > I cannot reproduce this. In my current trunk image where I > coincidentally try to get familiar with Environments to put them to > use, I can save morphs without a debugger appearing. Loading via drag > and drop works as well (though the option "load as morph" appears > twice in the dialog that prompts me for an action after the drop). > > Does Morph saving depend on ImageSegments anyway? > > Best regards, > Jakob > > 2016-09-23 16:10 GMT+02:00 Vaidotas Did?balis : > > Hello all, > > To save morph and restore it is a basic behavior which is broken since > > Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a > > debugger window open in a few clicks. This bug happened as a side effect > of > > pushing Environments package into the Squeak image beginning from Squeak > > 4.5. No one uses Environments; there are significant use for morph > saving. > > Squeak needs this ability. Maybe it is easier to remove Environments from > > stock Image and to fix the bug introduced by that package. > > Introduction of new packages need not to break useful things... > > regards, > > Vaidotas > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160923/3ff7a0c3/attachment.htm From hannes.hirzel at gmail.com Fri Sep 23 17:15:37 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Sep 23 17:15:40 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Hello Jakob On 9/23/16, Jakob Reschke wrote: > Hi Vaidotas, > > I cannot reproduce this. In my current trunk image where I > coincidentally try to get familiar with Environments to put them to > use, I can save morphs without a debugger appearing. This is indeed the case. A test case for Squeak6.0alpha-16755? 1. In a project activate the 'objects' flap. 2. Choose the 'Multimedia' category 3. Drag out a bookmorph 4. In the control bar click on the top-right icon to get 'more controls' 5. Add some morphs to the page 6. Add another page by clicking on 'plus' and add more morphs 7. Bring up the 'halo' menu 8. Choose submenu 'debug' and then 'save morph in file'. 9. Delete the morph 10. Choose menu 'tools' / 'File list' 11. Identify the file of the saved bookmorph and click on it. 12. Choose 'Load as morph' Result OK Questions: a) Since then is this working again? b) Which underlying mechanism is used to do this? --Hannes > Loading via drag > and drop works as well (though the option "load as morph" appears > twice in the dialog that prompts me for an action after the drop). > > Does Morph saving depend on ImageSegments anyway? > > Best regards, > Jakob > > 2016-09-23 16:10 GMT+02:00 Vaidotas Did?balis : >> Hello all, >> To save morph and restore it is a basic behavior which is broken since >> Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a >> debugger window open in a few clicks. This bug happened as a side effect >> of >> pushing Environments package into the Squeak image beginning from Squeak >> 4.5. No one uses Environments; there are significant use for morph >> saving. >> Squeak needs this ability. Maybe it is easier to remove Environments from >> stock Image and to fix the bug introduced by that package. >> Introduction of new packages need not to break useful things... >> regards, >> Vaidotas >> > > From eliot.miranda at gmail.com Fri Sep 23 17:46:36 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Sep 23 17:46:40 2016 Subject: Whitewash (was Re: [squeak-dev] The Trunk: EToys-tfel.249.mcz) Message-ID: Hi All, in reading Tobias' much improved code below I noticed that a lot of code is using Morph>>allMorphs where Morph>>allMorphsDo: would be much better On Fri, Sep 23, 2016 at 6:26 AM, wrote: > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.249.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.249 > Author: tfel > Time: 23 September 2016, 3:26:09.056418 pm > UUID: 844e5444-0afb-144b-a622-dcb33fbf8597 > Ancestors: EToys-tfel.248 > > fix the defensive code for updating status morphs in scripts > > =============== Diff against EToys-tfel.248 =============== > > Item was changed: > ----- Method: ScriptInstantiation>>updateAllStatusMorphs (in category > 'status control') ----- > updateAllStatusMorphs > "Update all status morphs bound to the receiver. Done with a > sledge-hammer at present." > > | w | > w := self currentWorld. > + (w hasProperty: #updateStatusMorph) ifTrue: [^ self]. > + w setProperty: #updateStatusMorph toValue: true. > + Project current addDeferredUIMessage: [ > + (w valueOfProperty: #updateStatusMorph ifAbsent: [false]) > ifTrue: [ > + (w allMorphs select: [:m | (m isKindOf: > ScriptStatusControl) and: > + [m scriptInstantiation == self]]) do: > + [:aStatusControl | self updateStatusMorph: > aStatusControl]. > + w removeProperty: #updateStatusMorph. > - > - (w hasProperty: #foo) ifFalse: [ > - w setProperty: #updateStatusMorph toValue: true. > - Project current addDeferredUIMessage: [ > - (w hasProperty: #foo) ifTrue: [ > - w removeProperty: #updateStatusMorph. > - (w allMorphs select: [:m | (m isKindOf: > ScriptStatusControl) and: > - [m scriptInstantiation == self]]) > do: > - [:aStatusControl | self > updateStatusMorph: aStatusControl] . > - ] > ] > ] > > ! > So the above could be updateAllStatusMorphs "Update all status morphs bound to the receiver. Done with a sledge-hammer at present." | w | w := self currentWorld. (w hasProperty: self) ifTrue: [^ self]. w setProperty: self toValue: #updating. Project current addDeferredUIMessage: [[w allMorphsDo: [:m | ((m isKindOf: ScriptStatusControl) and: [m scriptInstantiation == self]) ifTrue: [self updateStatusMorph: m]]] ensure: [w removeProperty: self]] There are quite a few examples like this, even one egregious "ow allMorphs do: [:m|..." instead of "ow allMorphsDo: [:m|...". Calling for volunteers who know Morphic well to go through and make the necessary changes. This should help slow machines like RasperryPi a bit. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160923/90eb10da/attachment.htm From tim at rowledge.org Fri Sep 23 18:51:52 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri Sep 23 18:51:54 2016 Subject: Whitewash (was Re: [squeak-dev] The Trunk: EToys-tfel.249.mcz) In-Reply-To: References: Message-ID: <25755392-DBDD-412B-B5E9-5105DEF66FCD@rowledge.org> This is an excellent bit of Morphic code to dismantle because it illustrates several things that really ought to get improved. > > updateAllStatusMorphs > "Update all status morphs bound to the receiver. Done with a sledge-hammer at present." > > | w | > w := self currentWorld. > (w hasProperty: self) ifTrue: [^ self]. > w setProperty: self toValue: #updating. > Project current addDeferredUIMessage: > [[w allMorphsDo: > [:m | > ((m isKindOf: ScriptStatusControl) > and: [m scriptInstantiation == self]) ifTrue: > [self updateStatusMorph: m]]] > ensure: > [w removeProperty: self]] > > There are quite a few examples like this, even one egregious "ow allMorphs do: [:m|..." instead of "ow allMorphsDo: [:m|...". Calling for volunteers who know Morphic well to go through and make the necessary changes. This should help slow machines like RasperryPi a bit. Trying to work ?outwards? - - breaking of encapsulation in 'm scriptInstantiation == self]) ifTrue: [self updateStatusMorph: m]]]? This is a common pattern I really dislike. Lots of ?(a getaninstvar comparewith: b) ifTrue:[a setinstvar: b getsomeinstvar]?. Ought to be more like ?a doSomethingWith: b?. In the above case, how about ?m updateStatusRelatingTo: self? - use of isKindOf: A wrist-slapping offence at the very least. It?s slow. It?s just plain *wrong* in many cases since it ignores functionality in favour of fake-type-name. Even worse, it encourages people to make not-very-related things subclasses of some inappropriate parent class just to make some nasty code function. As a nasty but at least improving hack, #isStatusIndicatingMorph would be better. Yes, it means another silly looking ^false method in Morph, but at least the relevant subclasses don?t have to be constrained into a single inheritance tree. And with caching and cogging the size of method dictionaries is long past being an issue to worry about. If you don?t like seeing lots of little near-null methods, then improve the browsers to help hide them! So we could now make the inner code more like - ?w allMorphsDo:[:m| m isStatusIndicatingMorph ifTrue:[m updateStatusRelatingTo: self]]? which is a bit less awful and potentially a fair bit faster. - misuse of generality Perhaps not the best description of the problem, but I?ll use it for now. Simply because a morph has a list of submorphs into which all included morphs are supposed to go (though I?m reasonably sure there are one or two morph classes where this is broken) does not mean that we have to *only* put them there and always search every submorph with the concomitant misuse of #isKindOf: etc. It can be much better to add a status indicating morph (for example) via an #addStatusIndicatorMorph: method that adds the morph to both a list of status morphs and the main submorphs list. It also avoids any use of the #is? messages outside of maybe checking that the morph ought actually be accepted here.. Thus our loop becomes ?w allStatusIndicatorMorphsDo: [:m| updateStatusRelatingTo: self]? which could easily be dozens of times faster. I?ve found hundreds of such cases in the old Scratch code and fixed many dozens, with a lot still to go. Such improvements account for something like an X8 increase in the user visible performance. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- An early example of the Peter Principle. From hannes.hirzel at gmail.com Fri Sep 23 18:51:55 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Sep 23 18:52:00 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Just for clarity: Please note that saving a project (menu 'project' / 'save project') is not yet working. It breaks in MorphicProject>>exportSegmentWithChangeSet: aChangeSetOrNil fileName: aFileName directory: aDirectory withoutInteraction: noInteraction world cleanUpReferences. (world is a PasteUpMorph) On 9/23/16, H. Hirzel wrote: > Hello Jakob > > On 9/23/16, Jakob Reschke wrote: >> Hi Vaidotas, >> >> I cannot reproduce this. In my current trunk image where I >> coincidentally try to get familiar with Environments to put them to >> use, I can save morphs without a debugger appearing. > > This is indeed the case. > A test case for Squeak6.0alpha-16755? > > 1. In a project activate the 'objects' flap. > 2. Choose the 'Multimedia' category > 3. Drag out a bookmorph > 4. In the control bar click on the top-right icon to get 'more controls' > 5. Add some morphs to the page > 6. Add another page by clicking on 'plus' and add more morphs > 7. Bring up the 'halo' menu > 8. Choose submenu 'debug' and then 'save morph in file'. > 9. Delete the morph > 10. Choose menu 'tools' / 'File list' > 11. Identify the file of the saved bookmorph and click on it. > 12. Choose 'Load as morph' > > Result OK > > Questions: > a) Since then is this working again? > b) Which underlying mechanism is used to do this? > > > --Hannes > >> Loading via drag >> and drop works as well (though the option "load as morph" appears >> twice in the dialog that prompts me for an action after the drop). >> >> Does Morph saving depend on ImageSegments anyway? >> >> Best regards, >> Jakob >> >> 2016-09-23 16:10 GMT+02:00 Vaidotas Did?balis : >>> Hello all, >>> To save morph and restore it is a basic behavior which is broken since >>> Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a >>> debugger window open in a few clicks. This bug happened as a side effect >>> of >>> pushing Environments package into the Squeak image beginning from Squeak >>> 4.5. No one uses Environments; there are significant use for morph >>> saving. >>> Squeak needs this ability. Maybe it is easier to remove Environments >>> from >>> stock Image and to fix the bug introduced by that package. >>> Introduction of new packages need not to break useful things... >>> regards, >>> Vaidotas >>> >> >> > From Das.Linux at gmx.de Fri Sep 23 20:05:33 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Sep 23 20:05:39 2016 Subject: [squeak-dev] Seaside3.2 on Squeak5.1 is working well. Message-ID: <14F51DDD-15AD-4F4F-A4E6-38979D17F204@gmx.de> Hi all I just want to report that Seaside3.2 works well on Squeak5.1 with 1422 passing tests. [1] Thanks for everyone developing Seaside and/or Squeak for taking care! Yay! Best regards -Tobias [1]: There's only one Test error because "'Seaside-Pharo-Continuation' depends on unknown package 'Grease-Pharo-Core'" which is obviously not loaded on Squeak, but gladly that does not hamper functionality. From commits at source.squeak.org Fri Sep 23 20:28:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 20:28:04 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-topa.188.mcz Message-ID: Tobias Pape uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-topa.188.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-topa.188 Author: topa Time: 23 September 2016, 10:27:45.599099 pm UUID: 5b808207-4f79-42b5-98b8-be4203bb54f2 Ancestors: ToolBuilder-Morphic-mt.187 Make pluggable trees work again with nodes whose children are dictionary-like =============== Diff against ToolBuilder-Morphic-mt.187 =============== Item was changed: ----- Method: PluggableTreeMorph>>contentsOfNode: (in category 'node access') ----- contentsOfNode: node | children | + getChildrenSelector ifNil: [^#()]. - getChildrenSelector ifNil:[^#()]. children := model perform: getChildrenSelector with: node item. + ^ self nodesForChildren: children inNode: node + ! - ^children collectWithIndex: [:item :index | - (self nodeClass with: item model: self) - index: index; - parent: node]! Item was added: + ----- Method: PluggableTreeMorph>>instantiateNodeWithContents:index:parent: (in category 'node access') ----- + instantiateNodeWithContents: item index: aNumber parent: anObject + + ^ (self nodeClass with: item model: self) + index: aNumber; + parent: anObject! Item was added: + ----- Method: PluggableTreeMorph>>nodesForChildren:inNode: (in category 'node access') ----- + nodesForChildren: aCollection inNode: anObject + + ^ aCollection isSequenceable + ifTrue: [aCollection collectWithIndex: + [:item :index | + self instantiateNodeWithContents: item index: index parent: anObject]] + ifFalse: [ | count | + count := 0. "artificial index." + aCollection collect: + [:item | + count := count + 1. + self instantiateNodeWithContents: item index: count parent: anObject]]! From commits at source.squeak.org Fri Sep 23 21:55:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 23 21:55:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160923215508.18679.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068946.html Name: EToys-tfel.244 Ancestors: EToys-tfel.243 - move the BookMorph>>storeAsDataStream methods to SISS - when editing the Kedama drawing, don't include the patch in the painting, only the turtles (this way we can now e.g. pause the forest fire, erase some trees to create a firebreak, and then continue running the fire :)) - re-add the code from Squeakland to draw large arrows on mouse over ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068947.html Name: EToys-tfel.245 Ancestors: EToys-tfel.244 remove haltOnce. I should check for slips before committing ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068948.html Name: EToys-tfel.246 Ancestors: EToys-tfel.245 - hide uniclasses from the system, so they are collected when their players go away - fix editing and saving player scripts that refer to other players by name ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068949.html Name: Kernel-tfel.1039 Ancestors: Kernel-bf.1038 - hide uniclasses from the environment, so they are collected automatically when their players go away. One can always browse such classes using the InstanceBrowser, anyway. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068950.html Name: Morphic-tfel.1309 Ancestors: Morphic-jl.1308 when uniclasses are hidden from the global environment, we want to browse them with the InstanceBrowser ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068951.html Name: MorphicExtras-tfel.198 Ancestors: MorphicExtras-jl.197 Flag those hacks for the etoys viewer flaps so we can remember to clean them up ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068952.html Name: Protocols-tfel.57 Ancestors: Protocols-tfel.56 Fix showing source of uniclasses that are not in the environment in instance browsers by going directly through the instance's class for lookup ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068953.html Name: EToys-tfel.247 Ancestors: EToys-tfel.246 - Player classes should always return a category, be it the uniclass category by default. This is required for recompiling when the class isn't in any organization - make sure that we cannot drag tile morphs out of their Etoys sentences, because that breaks compilation ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068954.html Name: EToys-tfel.248 Ancestors: EToys-tfel.247 - also don't allow grabbing a tile morph out of the viewer line - add a convenient way to add a name watcher to a player's morph through the viewer menu ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068955.html Name: EToys-tfel.249 Ancestors: EToys-tfel.248 fix the defensive code for updating status morphs in scripts ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068956.html Name: EToys-tfel.250 Ancestors: EToys-tfel.249 since different script instantiation may need to update their statuses, don't use just one global flag, instead have a flag for each instantiation ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068957.html Name: 60Deprecated-tfel.3 Ancestors: 60Deprecated-mt.2 deprecate the old modalWindow property, was only used by eToys code ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068958.html Name: EToys-tfel.251 Ancestors: EToys-tfel.250 remove becomeModal ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068959.html Name: Morphic-tfel.1310 Ancestors: Morphic-tfel.1309 deprecate modalWindow property usage on PasteUpMorphs, that was only used in eToys related code ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068960.html Name: Network-tfel.185 Ancestors: Network-tfel.184 becomeModal was deprecated ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068961.html Name: Tools-tfel.728 Ancestors: Tools-jl.727 becomeModal was deprecated ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068962.html Name: ToolBuilder-Morphic-topa.188 Ancestors: ToolBuilder-Morphic-mt.187 Make pluggable trees work again with nodes whose children are dictionary-like ============================================= From lewis at mail.msen.com Fri Sep 23 23:12:03 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Sep 23 23:12:05 2016 Subject: [squeak-dev] Seaside3.2 on Squeak5.1 is working well. In-Reply-To: <14F51DDD-15AD-4F4F-A4E6-38979D17F204@gmx.de> References: <14F51DDD-15AD-4F4F-A4E6-38979D17F204@gmx.de> Message-ID: <20160923231203.GA9928@shell.msen.com> On Fri, Sep 23, 2016 at 10:05:33PM +0200, Tobias Pape wrote: > Hi all > > I just want to report that Seaside3.2 works well on Squeak5.1 with 1422 passing tests. [1] > Thanks for everyone developing Seaside and/or Squeak for taking care! > > Yay! > > Best regards > -Tobias > > [1]: There's only one Test error because "'Seaside-Pharo-Continuation' depends on unknown package 'Grease-Pharo-Core'" which is obviously not loaded on Squeak, but gladly that does not hamper functionality. > > Excellent! Thanks for the update. Dave From frank.shearar at gmail.com Sat Sep 24 05:10:21 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Sat Sep 24 05:10:25 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: On 23 September 2016 at 07:10, Vaidotas Did?balis wrote: > Hello all, > To save morph and restore it is a basic behavior which is broken since > Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a > debugger window open in a few clicks. This bug happened as a side effect of > pushing Environments package into the Squeak image beginning from Squeak > 4.5. No one uses Environments; there are significant use for morph saving. > Squeak needs this ability. Maybe it is easier to remove Environments from > stock Image and to fix the bug introduced by that package. > Introduction of new packages need not to break useful things... > regards, > Vaidotas > It was pretty difficult for Colin Putney to perform the heart surgery necessary to get Environments into the image in the first place. The capabilities that Environments enable are pretty dang awesome, and it's a crying shame that people either don't see these capabilities (sandboxing, trivial resolution of class name clashes are the START of things) or (more likely) simply haven't had the time to build the _missing tooling support_ to make Environments work to their fullest. I'm equally to blame here: I burned out a few years back, and have since been too busy doing other stuff to work on Environments (or Squeak at all). But it would be tragic if we performed the equally painful surgery to remove Environments. So instead of removing a super awesome half-implemented feature of Squeak, why don't we, I don't know, _fix the bug_. Raise a bug report. Give a patch. It will make Squeak better. frank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160923/fede04a1/attachment.htm From lecteur at zogotounga.net Sat Sep 24 08:41:11 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat Sep 24 08:41:12 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: > It was pretty difficult for Colin Putney to perform the heart surgery > necessary to get Environments into the image in the first place. The > capabilities that Environments enable are pretty dang awesome, and it's > a crying shame that people either don't see these capabilities > (sandboxing, trivial resolution of class name clashes are the START of > things) or (more likely) simply haven't had the time to build the > _missing tooling support_ to make Environments work to their fullest. Where is the canonical documentation for Environments, where I would expect to find an exposition of its overall architecture, plus a detailed tour of its most important classes and methods, along with a couple of examples showing how to use it? Stef From hannes.hirzel at gmail.com Sat Sep 24 12:10:21 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat Sep 24 12:10:24 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: On 9/24/16, Frank Shearar wrote: .... > > It was pretty difficult for Colin Putney to perform the heart surgery > necessary to get Environments into the image in the first place. The > capabilities that Environments enable are pretty dang awesome, and it's a > crying shame that people either don't see these capabilities (sandboxing, > trivial resolution of class name clashes are the START of things) or (more > likely) simply haven't had the time to build the _missing tooling support_ > to make Environments work to their fullest. > > I'm equally to blame here: I burned out a few years back, and have since > been too busy doing other stuff to work on Environments (or Squeak at all). > > But it would be tragic if we performed the equally painful surgery to > remove Environments. > > So instead of removing a super awesome half-implemented feature of Squeak, > why don't we, I don't know, _fix the bug_. Raise a bug report. Give a > patch. It will make Squeak better. Yes, this is the way to go. And add notes on the Squeak wiki And simple use cases first. Maybe entering a new environment when entering a project and leaving it then leaving the environment is a simple use case. Subclassing MorphicProject is neat these days and with overriding a few methods you can customize the project. The question is what would be needed to set up a project specific environment. Maybe a new thread should be started for this. --Hannes From squeaklist at gmail.com Sat Sep 24 12:14:54 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Sat Sep 24 12:15:02 2016 Subject: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: Yay sandboxing Yay trivial solve name clashing Why hide it Vat good iss a Dooms Day device If You Keep It A Zecret Vhy Didn't You Tell Ze VVorld HAH? <---[ Doctor strange love ] in my opinion if you make a function in a software and don't tell anyone you might as well not have made the function nobody knows it's in there in Smalltalk the code itself often tells anyone but in other languages not so much consequently they seem to have better documentation some or mostly in Smalltalk if a function is dispersed or complex such that the code does not speak very well or is muted then not spending a few minutes to comment ( like Andy Bower used to do for Dolphin every single method with a one line comment<---[ is priceless ][ no other help is needed ][ mostly ] most of the main classes big commented ) the main Classes with design and or usage notes is a crime of wasted effort in my opinion look at the fact that Dolphin has always been so bullet proof with images going for months even years without a crash or a memory leak and all or most of it made by just one or two guys can it be attributed to the comments at all well i bet you a good big chunk of that success rate can be I know those comments contributed a good big chunk of my not needing to ask for help with Dolphin ever such that i got a bad habit of never asking for help and was totally spoiled for anything that was not Dolphin how about this idea a Class whose only job is to describe some subsystem where each of the Methods is just a comment or returns a String like a little book right in the code ( use Pier Seaside Aida Iliad etc if you had a wild hair to get fancy )<---[ not needed ] so up with comments and up with Andy Bower is what I'm saying and don't hand Google another brick in the wall of their world domination by hiding comments out on the internet unless you link to it from comments in the code in that case every single Class involved should contain such a link in its comment to its comment out on the web and Methods could have comment links to specific places in the web pages where it is commented or you hate the users and you hate cheaply gotten Maybe wider Smalltalk usage in my opinion On Saturday, September 24, 2016, St?phane Rollandin wrote: > It was pretty difficult for Colin Putney to perform the heart surgery >> necessary to get Environments into the image in the first place. The >> capabilities that Environments enable are pretty dang awesome, and it's >> a crying shame that people either don't see these capabilities >> (sandboxing, trivial resolution of class name clashes are the START of >> things) or (more likely) simply haven't had the time to build the >> _missing tooling support_ to make Environments work to their fullest. >> > > Where is the canonical documentation for Environments, where I would > expect to find an exposition of its overall architecture, plus a detailed > tour of its most important classes and methods, along with a couple of > examples showing how to use it? > > Stef > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160924/5914b878/attachment-0001.htm From eancaer at gmail.com Sun Sep 25 17:50:52 2016 From: eancaer at gmail.com (Edwin Ancaer) Date: Sun Sep 25 17:56:05 2016 Subject: [squeak-dev] Re: New, faster RISC OS Squeak In-Reply-To: <1474545273132-4916592.post@n4.nabble.com> References: <5113DB10.5030400@gmail.com> <3535DA7F-09DF-47CF-AF11-DECA190AD89B@rowledge.org> <51140748.4070706@gmail.com> <7E411575-069C-4793-BB79-0993A4C4C2ED@rowledge.org> <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> <1474545273132-4916592.post@n4.nabble.com> Message-ID: <1474825852477-4917042.post@n4.nabble.com> Hello, I add a picture of the postmortem data, as I did not find a way to save them in a file. I hope the result is clear enough. If anybody has an idea Thanks in advance, Edwin Ancaer -- View this message in context: http://forum.world.st/New-faster-RISC-OS-Squeak-tp4668295p4917042.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Sep 26 08:07:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Sep 26 08:07:55 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.252.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.252.mcz ==================== Summary ==================== Name: EToys-tfel.252 Author: tfel Time: 26 September 2016, 10:06:37.467552 am UUID: ec8e5c79-9271-ee4b-b729-a0138c2b4b9d Ancestors: EToys-tfel.251 fix a potential bug when the info dictionary for kedama turtle vector players was restored from siss =============== Diff against EToys-tfel.251 =============== Item was changed: ----- Method: KedamaTurtleVectorPlayer2>>compileAllAccessors (in category 'player protocol') ----- compileAllAccessors + info rehash. info keys asArray do: [:k | (#(who x y heading color visible predicate) includes: k) ifFalse: [ self compileVectorInstVarAccessorsFor: k. ]. ]. ! From commits at source.squeak.org Mon Sep 26 09:41:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Sep 26 09:41:35 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.253.mcz ==================== Summary ==================== Name: EToys-tfel.253 Author: tfel Time: 26 September 2016, 11:40:48.856552 am UUID: a00694aa-7017-b444-a8d0-6671ec171efd Ancestors: EToys-tfel.252 delete the project saving morph before saving =============== Diff against EToys-tfel.252 =============== Item was changed: ----- Method: EToyProjectDetailsMorph>>doOK (in category 'utilities') ----- doOK "User hit the ok button in the project-info dialog. Store the updated project-info back in the project. Call the message-send residing in the receiver's actionBlock to carry out any subsequent desired task. Note that this method sets the 'arguments' of the message-send in the actionBlock" | args actionSelector | self validateTheProjectName ifFalse: [^false]. projectDetails := self copyOutDetails. theProject acceptProjectDetails: projectDetails. "Make sure project & world feel the changes" + + self delete. - actionBlock isMessageSend "new way -- hopefully all cases" ifTrue: "please excuse this ugly, non-modular code..." [actionSelector := actionBlock selector. args := (actionSelector = #handUserSorterMorphForProjectNamed:) ifTrue: [{theProject name}] ifFalse: [actionSelector numArgs = 0 ifTrue: [nil] ifFalse: [Array with: projectDetails]]. actionBlock arguments: args. actionBlock value] ifFalse: "Old way, with actionBlock actually a block of one argument. This should no longer occur." + [actionBlock value: projectDetails].! - [actionBlock value: projectDetails]. - - self delete! Item was changed: ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button hit') ----- doOK "User hit the ok button in the project-query dialog." | details | details := self copyOutDetails. + self delete. actionBlock isMessageSend "new way -- hopefully all cases" ifTrue: [actionBlock arguments: {details. actionBlock arguments second}. actionBlock value] ifFalse: "Old way, with actionBlock actually a block of one argument. This should no longer occur." + [actionBlock value: details].! - [actionBlock value: details]. - - self delete! From commits at source.squeak.org Mon Sep 26 13:08:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Sep 26 13:09:01 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.254.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.254.mcz ==================== Summary ==================== Name: EToys-tfel.254 Author: tfel Time: 26 September 2016, 3:08:19.655594 pm UUID: d6ca728e-ca89-5043-a50c-d8a505760da6 Ancestors: EToys-tfel.253 fix the mouse over highlights for tiles in the viewer =============== Diff against EToys-tfel.253 =============== Item was added: + ----- Method: PhraseTileMorph>>handlesMouseOver: (in category 'event handling') ----- + handlesMouseOver: evt + + ^ true + ! Item was added: + ----- Method: PhraseTileMorph>>mouseEnter: (in category 'event handling') ----- + mouseEnter: evt + + self removeHighlightFeedback. + self addCommandFeedback: evt. + ! Item was added: + ----- Method: PhraseTileMorph>>mouseLeave: (in category 'event handling') ----- + mouseLeave: evt + "Resume drop-tracking in enclosing editor" + | ed | + self removeHighlightFeedback. + (ed := self enclosingTestTile) ifNotNil: [ed mouseEnter: evt].! Item was changed: ----- Method: ViewerLine>>addGetterFeedback (in category 'slot') ----- addGetterFeedback "Add feedback during mouseover of a getter" + | aMorph | + aMorph := RectangleMorph new + bounds: (self firstTileMorph topLeft corner: + (self firstAlignmentMorph ifNil: [self submorphs last bottomRight] ifNotNil: [:m | m bottomLeft])). - | aMorph endMorph | - - endMorph _ - (#(touchesA: #seesColor: #overlaps: color:sees: overlapsAny: bearingTo: bearingFrom: distanceToPlayer:) includes: self elementSymbol) - ifTrue: - [submorphs seventh] - ifFalse: - [submorphs fifth]. - aMorph := RectangleMorph new bounds: ((submorphs third topLeft - (2@1)) corner: ((endMorph right @ submorphs third bottom) + (2@1))). aMorph beTransparent; borderWidth: 2; borderColor: ScriptingSystem getterFeedback; lock. ActiveWorld addHighlightMorph: aMorph for: nil. " Color fromUser (Color r: 1.0 g: 0.355 b: 0.839) "! Item was changed: ----- Method: ViewerLine>>addSetterFeedback (in category 'slot') ----- addSetterFeedback "Add screen feedback showing what would be torn off to make a setter" | aMorph | + aMorph := RectangleMorph new bounds: (self firstTileMorph topLeft corner: self bounds bottomRight). - aMorph := RectangleMorph new bounds: ((submorphs third topLeft - (2@1)) corner: ((submorphs last right @ submorphs third bottom) + (2@1))). aMorph beTransparent; borderWidth: 2; borderColor: ScriptingSystem setterFeedback; lock. ActiveWorld addHighlightMorph: aMorph for: nil! Item was added: + ----- Method: ViewerLine>>firstAlignmentMorph (in category 'slot') ----- + firstAlignmentMorph + + ^ self submorphs reverse detect: [:m | m isAlignmentMorph] ifNone: []! Item was added: + ----- Method: ViewerLine>>firstTileMorph (in category 'slot') ----- + firstTileMorph + + ^ self submorphs detect: [:m | m isTileMorph]! From squeaklist at gmail.com Mon Sep 26 15:14:47 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Mon Sep 26 15:14:51 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz In-Reply-To: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> References: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: M>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! ( M handUserSorterMorphForProjectNamed: nil )"<---[ easy way to make a MessageSend ]" ... sendTo: obj On Monday, September 26, 2016, wrote: > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.253.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.253 > Author: tfel > Time: 26 September 2016, 11:40:48.856552 am > UUID: a00694aa-7017-b444-a8d0-6671ec171efd > Ancestors: EToys-tfel.252 > > delete the project saving morph before saving > > =============== Diff against EToys-tfel.252 =============== > > Item was changed: > ----- Method: EToyProjectDetailsMorph>>doOK (in category 'utilities') > ----- > doOK > "User hit the ok button in the project-info dialog. Store the > updated project-info back in the project. Call the message-send residing in > the receiver's actionBlock to carry out any subsequent desired task. Note > that this method sets the 'arguments' of the message-send in the > actionBlock" > > | args actionSelector | > self validateTheProjectName ifFalse: [^false]. > projectDetails := self copyOutDetails. > > theProject acceptProjectDetails: projectDetails. "Make sure > project & world feel the changes" > + > + self delete. > - > actionBlock isMessageSend "new way -- hopefully all cases" > ifTrue: "please excuse this ugly, non-modular code..." > [actionSelector := actionBlock selector. > args := (actionSelector = # > handUserSorterMorphForProjectNamed:) > ifTrue: > [{theProject name}] > ifFalse: > [actionSelector numArgs = 0 > ifTrue: > [nil] > ifFalse: > [Array with: > projectDetails]]. > actionBlock arguments: args. > actionBlock value] > > ifFalse: "Old way, with actionBlock actually a block of > one argument. This should no longer occur." > + [actionBlock value: projectDetails].! > - [actionBlock value: projectDetails]. > - > - self delete! > > Item was changed: > ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button hit') > ----- > doOK > "User hit the ok button in the project-query dialog." > > | details | > details := self copyOutDetails. > > + self delete. > actionBlock isMessageSend "new way -- hopefully all cases" > ifTrue: > [actionBlock arguments: {details. actionBlock > arguments second}. > actionBlock value] > > ifFalse: "Old way, with actionBlock actually a block of > one argument. This should no longer occur." > + [actionBlock value: details].! > - [actionBlock value: details]. > - > - self delete! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/9e27af97/attachment.htm From squeaklist at gmail.com Mon Sep 26 15:22:24 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Mon Sep 26 15:22:28 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz In-Reply-To: References: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: M class>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! ( ( M som:eMe:ssa:ge: inputs ) receiver: obj ) On Monday, September 26, 2016, Kjell Godo wrote: > M>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! > > ( M handUserSorterMorphForProjectNamed: nil )"<---[ easy way to make a > MessageSend ]" > ... > sendTo: obj > > On Monday, September 26, 2016, > wrote: > >> Tim Felgentreff uploaded a new version of EToys to project The Trunk: >> http://source.squeak.org/trunk/EToys-tfel.253.mcz >> >> ==================== Summary ==================== >> >> Name: EToys-tfel.253 >> Author: tfel >> Time: 26 September 2016, 11:40:48.856552 am >> UUID: a00694aa-7017-b444-a8d0-6671ec171efd >> Ancestors: EToys-tfel.252 >> >> delete the project saving morph before saving >> >> =============== Diff against EToys-tfel.252 =============== >> >> Item was changed: >> ----- Method: EToyProjectDetailsMorph>>doOK (in category 'utilities') >> ----- >> doOK >> "User hit the ok button in the project-info dialog. Store the >> updated project-info back in the project. Call the message-send residing in >> the receiver's actionBlock to carry out any subsequent desired task. Note >> that this method sets the 'arguments' of the message-send in the >> actionBlock" >> >> | args actionSelector | >> self validateTheProjectName ifFalse: [^false]. >> projectDetails := self copyOutDetails. >> >> theProject acceptProjectDetails: projectDetails. "Make sure >> project & world feel the changes" >> + >> + self delete. >> - >> actionBlock isMessageSend "new way -- hopefully all cases" >> ifTrue: "please excuse this ugly, non-modular code..." >> [actionSelector := actionBlock selector. >> args := (actionSelector = >> #handUserSorterMorphForProjectNamed:) >> ifTrue: >> [{theProject name}] >> ifFalse: >> [actionSelector numArgs = 0 >> ifTrue: >> [nil] >> ifFalse: >> [Array with: >> projectDetails]]. >> actionBlock arguments: args. >> actionBlock value] >> >> ifFalse: "Old way, with actionBlock actually a block of >> one argument. This should no longer occur." >> + [actionBlock value: projectDetails].! >> - [actionBlock value: projectDetails]. >> - >> - self delete! >> >> Item was changed: >> ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button hit') >> ----- >> doOK >> "User hit the ok button in the project-query dialog." >> >> | details | >> details := self copyOutDetails. >> >> + self delete. >> actionBlock isMessageSend "new way -- hopefully all cases" >> ifTrue: >> [actionBlock arguments: {details. actionBlock >> arguments second}. >> actionBlock value] >> >> ifFalse: "Old way, with actionBlock actually a block of >> one argument. This should no longer occur." >> + [actionBlock value: details].! >> - [actionBlock value: details]. >> - >> - self delete! >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/56c41bcf/attachment.htm From squeaklist at gmail.com Mon Sep 26 15:41:29 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Mon Sep 26 15:41:32 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz In-Reply-To: References: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: When is a MessageSend better than a BlockClosure? I would like to know. Because you can change it? You can look inside. What if the arguments were Blocks. You could easily make a tree of MessageSends ( ( M message1:( M message2: obj2 ) message1:( M message3: obj31 message3: obj32 ) ) receiverDeep:{ r1. r2. r3 }"<---[ left right top down traverse ]" ) valueDeep On Monday, September 26, 2016, Kjell Godo wrote: > M class>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! > > ( ( M som:eMe:ssa:ge: inputs ) receiver: obj ) > > On Monday, September 26, 2016, Kjell Godo > wrote: > >> M>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! >> >> ( M handUserSorterMorphForProjectNamed: nil )"<---[ easy way to make a >> MessageSend ]" >> ... >> sendTo: obj >> >> On Monday, September 26, 2016, wrote: >> >>> Tim Felgentreff uploaded a new version of EToys to project The Trunk: >>> http://source.squeak.org/trunk/EToys-tfel.253.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: EToys-tfel.253 >>> Author: tfel >>> Time: 26 September 2016, 11:40:48.856552 am >>> UUID: a00694aa-7017-b444-a8d0-6671ec171efd >>> Ancestors: EToys-tfel.252 >>> >>> delete the project saving morph before saving >>> >>> =============== Diff against EToys-tfel.252 =============== >>> >>> Item was changed: >>> ----- Method: EToyProjectDetailsMorph>>doOK (in category 'utilities') >>> ----- >>> doOK >>> "User hit the ok button in the project-info dialog. Store the >>> updated project-info back in the project. Call the message-send residing in >>> the receiver's actionBlock to carry out any subsequent desired task. Note >>> that this method sets the 'arguments' of the message-send in the >>> actionBlock" >>> >>> | args actionSelector | >>> self validateTheProjectName ifFalse: [^false]. >>> projectDetails := self copyOutDetails. >>> >>> theProject acceptProjectDetails: projectDetails. "Make sure >>> project & world feel the changes" >>> + >>> + self delete. >>> - >>> actionBlock isMessageSend "new way -- hopefully all cases" >>> ifTrue: "please excuse this ugly, non-modular code..." >>> [actionSelector := actionBlock selector. >>> args := (actionSelector = >>> #handUserSorterMorphForProjectNamed:) >>> ifTrue: >>> [{theProject name}] >>> ifFalse: >>> [actionSelector numArgs = 0 >>> ifTrue: >>> [nil] >>> ifFalse: >>> [Array with: >>> projectDetails]]. >>> actionBlock arguments: args. >>> actionBlock value] >>> >>> ifFalse: "Old way, with actionBlock actually a block of >>> one argument. This should no longer occur." >>> + [actionBlock value: projectDetails].! >>> - [actionBlock value: projectDetails]. >>> - >>> - self delete! >>> >>> Item was changed: >>> ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button >>> hit') ----- >>> doOK >>> "User hit the ok button in the project-query dialog." >>> >>> | details | >>> details := self copyOutDetails. >>> >>> + self delete. >>> actionBlock isMessageSend "new way -- hopefully all cases" >>> ifTrue: >>> [actionBlock arguments: {details. actionBlock >>> arguments second}. >>> actionBlock value] >>> >>> ifFalse: "Old way, with actionBlock actually a block of >>> one argument. This should no longer occur." >>> + [actionBlock value: details].! >>> - [actionBlock value: details]. >>> - >>> - self delete! >>> >>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/708cc078/attachment.htm From squeaklist at gmail.com Mon Sep 26 15:48:50 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Mon Sep 26 15:48:52 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz In-Reply-To: References: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: it becomes like a programming language. Could it be used to allow restricted user customization. Like a scripting language given some kind of hierarchical editor. On Monday, September 26, 2016, Kjell Godo wrote: > When is a MessageSend better than a BlockClosure? > I would like to know. Because you can change it? > You can look inside. What if the arguments were Blocks. > You could easily make a tree of MessageSends > ( > ( M message1:( M message2: obj2 ) > message1:( M message3: obj31 > message3: obj32 ) > ) receiverDeep:{ r1. r2. r3 }"<---[ left right top down traverse ]" > ) valueDeep > > On Monday, September 26, 2016, Kjell Godo > wrote: > >> M class>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! >> >> ( ( M som:eMe:ssa:ge: inputs ) receiver: obj ) >> >> On Monday, September 26, 2016, Kjell Godo wrote: >> >>> M>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! >>> >>> ( M handUserSorterMorphForProjectNamed: nil )"<---[ easy way to make a >>> MessageSend ]" >>> ... >>> sendTo: obj >>> >>> On Monday, September 26, 2016, wrote: >>> >>>> Tim Felgentreff uploaded a new version of EToys to project The Trunk: >>>> http://source.squeak.org/trunk/EToys-tfel.253.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: EToys-tfel.253 >>>> Author: tfel >>>> Time: 26 September 2016, 11:40:48.856552 am >>>> UUID: a00694aa-7017-b444-a8d0-6671ec171efd >>>> Ancestors: EToys-tfel.252 >>>> >>>> delete the project saving morph before saving >>>> >>>> =============== Diff against EToys-tfel.252 =============== >>>> >>>> Item was changed: >>>> ----- Method: EToyProjectDetailsMorph>>doOK (in category 'utilities') >>>> ----- >>>> doOK >>>> "User hit the ok button in the project-info dialog. Store the >>>> updated project-info back in the project. Call the message-send residing in >>>> the receiver's actionBlock to carry out any subsequent desired task. Note >>>> that this method sets the 'arguments' of the message-send in the >>>> actionBlock" >>>> >>>> | args actionSelector | >>>> self validateTheProjectName ifFalse: [^false]. >>>> projectDetails := self copyOutDetails. >>>> >>>> theProject acceptProjectDetails: projectDetails. "Make sure >>>> project & world feel the changes" >>>> + >>>> + self delete. >>>> - >>>> actionBlock isMessageSend "new way -- hopefully all cases" >>>> ifTrue: "please excuse this ugly, non-modular code..." >>>> [actionSelector := actionBlock selector. >>>> args := (actionSelector = >>>> #handUserSorterMorphForProjectNamed:) >>>> ifTrue: >>>> [{theProject name}] >>>> ifFalse: >>>> [actionSelector numArgs = 0 >>>> ifTrue: >>>> [nil] >>>> ifFalse: >>>> [Array with: >>>> projectDetails]]. >>>> actionBlock arguments: args. >>>> actionBlock value] >>>> >>>> ifFalse: "Old way, with actionBlock actually a block >>>> of one argument. This should no longer occur." >>>> + [actionBlock value: projectDetails].! >>>> - [actionBlock value: projectDetails]. >>>> - >>>> - self delete! >>>> >>>> Item was changed: >>>> ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button >>>> hit') ----- >>>> doOK >>>> "User hit the ok button in the project-query dialog." >>>> >>>> | details | >>>> details := self copyOutDetails. >>>> >>>> + self delete. >>>> actionBlock isMessageSend "new way -- hopefully all cases" >>>> ifTrue: >>>> [actionBlock arguments: {details. actionBlock >>>> arguments second}. >>>> actionBlock value] >>>> >>>> ifFalse: "Old way, with actionBlock actually a block >>>> of one argument. This should no longer occur." >>>> + [actionBlock value: details].! >>>> - [actionBlock value: details]. >>>> - >>>> - self delete! >>>> >>>> >>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/cbd22957/attachment.htm From bert at freudenbergs.de Mon Sep 26 17:32:26 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Sep 26 17:32:30 2016 Subject: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: <180B5329-8FC3-445C-A6A0-9CC6139D7F18@gmail.com> References: <93BCDA63-951E-464D-9B33-10CB96AB7A6E@gmail.com> <180B5329-8FC3-445C-A6A0-9CC6139D7F18@gmail.com> Message-ID: Hi Max, I'd be interested to learn how you are using ImageSegments. Is it using CodeLoader? - Bert - On Thu, Sep 22, 2016 at 9:08 PM, Max Leske wrote: > Hi Eliot, > > On 22 Sep 2016, at 20:46, Eliot Miranda wrote: > > Hi Max, > > On Thu, Sep 22, 2016 at 11:42 AM, Max Leske wrote: > >> >> >> On 22 Sep 2016, at 20:28, Eliot Miranda wrote: >> >> Hi Bert, Hi All, >> >> On Thu, Sep 15, 2016 at 2:55 PM, wrote: >> [snip] >> >>> http://lists.squeakfoundation.org/pipermail/packages/2016-Se >>> ptember/068930.html >>> >>> Name: System-bf.916 >>> Ancestors: System-bf.915 >>> >>> Replace VM-level ImageSegment loading with a Smalltalk implementation >>> for old (interpreter-era) projects. >>> >>> Also removes support for writing segments. >>> >>> This overrides the Spur support introduced in System-eem.758. >>> >> >> So one question is should we delete VM support for ImageSegment from the >> Spur VM? There's at least 1.5k of generated source for the Spur >> ImageSegment load and save support, some 2% of the interpreter/primitives >> source code. That's a lot, and the code is complex and ugly. If it never >> really worked before IMO we should nuke it asap. If it worked in some >> fashion perhaps we can schedule its demise for the 6.0 release's VM. >> >> What do others think? >> >> >> As long as you don?t remove it from the Cog VM?s until I no longer need >> it I?m fine with that. >> > > And when would that be? > > > Can?t really say but I'm hoping to get rid of ImageSegment within the next > 2 years (very rough estimate). > > Do you mean that you use it in ways not covered by Bert's modifications > (which render the VM support superfluous), or do you mean that you use > ImageSegment as a naive consumer and are happy just so long as it works? > > > Speed is important to me, as I use ImageSegment to create snapshots of our > applications (and hence I need write support, which Bert apparently > removed). Those snapshots can exceed 90 MB and the graphs include thousands > of objects. I fear that a pure Smalltalk implementation would not be fast > enough. > > > On the other hand, we would simply not move to a VM version without > ImageSegment support, so that case may give me the boost I need to get rid > of ImageSegment :) Currently we?re preparing to move to our first Cog VM in > production. If you can give me 2 or 3 months, so that I know the version we > use works for us, you could then remove ImageSegment support and we would > start replacing ImageSegment with something else so we could keep updating > our VM. > > Cheers, > Max > > > >> >> Max >> >> >> _,,,^..^,,,_ >> best, Eliot >> >> >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/34868e55/attachment.htm From bert at freudenbergs.de Mon Sep 26 17:35:51 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Sep 26 17:35:53 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: On Sat, Sep 24, 2016 at 7:10 AM, Frank Shearar wrote: > On 23 September 2016 at 07:10, Vaidotas Did?balis > wrote: > >> Hello all, >> To save morph and restore it is a basic behavior which is broken since >> Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a >> debugger window open in a few clicks. This bug happened as a side effect of >> pushing Environments package into the Squeak image beginning from Squeak >> 4.5. No one uses Environments; there are significant use for morph saving. >> Squeak needs this ability. Maybe it is easier to remove Environments from >> stock Image and to fix the bug introduced by that package. >> Introduction of new packages need not to break useful things... >> regards, >> Vaidotas >> > > It was pretty difficult for Colin Putney to perform the heart surgery > necessary to get Environments into the image in the first place. The > capabilities that Environments enable are pretty dang awesome, and it's a > crying shame that people either don't see these capabilities (sandboxing, > trivial resolution of class name clashes are the START of things) or (more > likely) simply haven't had the time to build the _missing tooling support_ > to make Environments work to their fullest. > > I'm equally to blame here: I burned out a few years back, and have since > been too busy doing other stuff to work on Environments (or Squeak at all). > > But it would be tragic if we performed the equally painful surgery to > remove Environments. > > So instead of removing a super awesome half-implemented feature of Squeak, > why don't we, I don't know, _fix the bug_. Raise a bug report. Give a > patch. It will make Squeak better. > +1 Don't worry, we're not removing environments. Project saving will work again some way or other pretty soon. - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/fb08624a/attachment.htm From squeaklist at gmail.com Mon Sep 26 17:39:12 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Mon Sep 26 17:39:16 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.253.mcz In-Reply-To: References: <57e8ed56.455c370a.cfdf3.52e2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: a tree View that knew about types( Classes ) could do it. A tree context popUp Menu or popUp tree view could show you the valid options for any input to any Message that you were building. perhaps when this tree like scripting editor comes up it could show a tree view of the various things you could do similar to Scratch. then when you choose something it automatically takes you through all the choices by traversing the Message tree and filling in all the Message arguments by the user picking from popUp tree views that dissapear once you pick and then the pick fills in a Message argument and the user keeps going to fill in all the other Message arguments and when every argument is filled in the user has a finished script which can be run or called from other scripts or the scripts could be Methods in a Class Hierarchy of some kind maybe it helps you think OOP by asking questions like in the Pharo Class comment template what do you want this thing to be able to do what body parts do you want this thing to have how will it speak to others how will it speak to suppliers how will it speak to customers how will it speak to enemies what are its responsibilities how will it speak to itself what things does it need to store inside etc and it could perform some demos to show the ideas and then the MessageSend could be converted to Smalltalk and compiled if speed was need you could have MMessageSendSequence >>do: >>do:do: >>do:do:do: >>do:do:do:do: etc to make a sequence of MessageSends you could have MLet>>define: listOfAssociations in: messageSendSequence MAssociation>>key:value: MList>>n: >>n:n: >>n:n:n: etc MMethod>>inClass:makeMethod_withInputs:into: <---[ creates a Method ] >>inAnimal:makeBehavior_withInputs:into: MLambda>>makeLambda_withInputs:into: <---[ creates a Lambda ( BlockClosure ) ] MClass>>makeClass_superClass:bodyParts: MAnimal>>makeAnimal_superAnimal:addedBodyParts: maybe if you switched from Class>>Method to Animal>>Behavior it would require a lot less Splaining to get newbies to think OOP in fact it would take no explaining at all people would just get it So Class>>Method = big slowdown in the adoption rate of OOP Shouldabeen Animal>>Behavior that wouldabeen the Finnish way to do it they got the phonetic spelling system -> no illiteracy ha ha easy SmalltalkV manual did Animal>>Behavior A simple name change might have put Smalltalk on top but then there was the speed thing the speed thing On Monday, September 26, 2016, Kjell Godo wrote: > it becomes like a programming language. > Could it be used to allow restricted user customization. > Like a scripting language given some kind of > hierarchical editor. > > On Monday, September 26, 2016, Kjell Godo > wrote: > >> When is a MessageSend better than a BlockClosure? >> I would like to know. Because you can change it? >> You can look inside. What if the arguments were Blocks. >> You could easily make a tree of MessageSends >> ( >> ( M message1:( M message2: obj2 ) >> message1:( M message3: obj31 >> message3: obj32 ) >> ) receiverDeep:{ r1. r2. r3 }"<---[ left right top down traverse ]" >> ) valueDeep >> >> On Monday, September 26, 2016, Kjell Godo wrote: >> >>> M class>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! >>> >>> ( ( M som:eMe:ssa:ge: inputs ) receiver: obj ) >>> >>> On Monday, September 26, 2016, Kjell Godo wrote: >>> >>>> M>>doesNotUnderstand: aMessage ^aMessage asMessageSend ! >>>> >>>> ( M handUserSorterMorphForProjectNamed: nil )"<---[ easy way to make a >>>> MessageSend ]" >>>> ... >>>> sendTo: obj >>>> >>>> On Monday, September 26, 2016, wrote: >>>> >>>>> Tim Felgentreff uploaded a new version of EToys to project The Trunk: >>>>> http://source.squeak.org/trunk/EToys-tfel.253.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: EToys-tfel.253 >>>>> Author: tfel >>>>> Time: 26 September 2016, 11:40:48.856552 am >>>>> UUID: a00694aa-7017-b444-a8d0-6671ec171efd >>>>> Ancestors: EToys-tfel.252 >>>>> >>>>> delete the project saving morph before saving >>>>> >>>>> =============== Diff against EToys-tfel.252 =============== >>>>> >>>>> Item was changed: >>>>> ----- Method: EToyProjectDetailsMorph>>doOK (in category >>>>> 'utilities') ----- >>>>> doOK >>>>> "User hit the ok button in the project-info dialog. Store the >>>>> updated project-info back in the project. Call the message-send residing in >>>>> the receiver's actionBlock to carry out any subsequent desired task. Note >>>>> that this method sets the 'arguments' of the message-send in the >>>>> actionBlock" >>>>> >>>>> | args actionSelector | >>>>> self validateTheProjectName ifFalse: [^false]. >>>>> projectDetails := self copyOutDetails. >>>>> >>>>> theProject acceptProjectDetails: projectDetails. "Make sure >>>>> project & world feel the changes" >>>>> + >>>>> + self delete. >>>>> - >>>>> actionBlock isMessageSend "new way -- hopefully all cases" >>>>> ifTrue: "please excuse this ugly, non-modular code..." >>>>> [actionSelector := actionBlock selector. >>>>> args := (actionSelector = >>>>> #handUserSorterMorphForProjectNamed:) >>>>> ifTrue: >>>>> [{theProject name}] >>>>> ifFalse: >>>>> [actionSelector numArgs = 0 >>>>> ifTrue: >>>>> [nil] >>>>> ifFalse: >>>>> [Array with: >>>>> projectDetails]]. >>>>> actionBlock arguments: args. >>>>> actionBlock value] >>>>> >>>>> ifFalse: "Old way, with actionBlock actually a block >>>>> of one argument. This should no longer occur." >>>>> + [actionBlock value: projectDetails].! >>>>> - [actionBlock value: projectDetails]. >>>>> - >>>>> - self delete! >>>>> >>>>> Item was changed: >>>>> ----- Method: EToyProjectQueryMorph>>doOK (in category 'ok button >>>>> hit') ----- >>>>> doOK >>>>> "User hit the ok button in the project-query dialog." >>>>> >>>>> | details | >>>>> details := self copyOutDetails. >>>>> >>>>> + self delete. >>>>> actionBlock isMessageSend "new way -- hopefully all cases" >>>>> ifTrue: >>>>> [actionBlock arguments: {details. actionBlock >>>>> arguments second}. >>>>> actionBlock value] >>>>> >>>>> ifFalse: "Old way, with actionBlock actually a block >>>>> of one argument. This should no longer occur." >>>>> + [actionBlock value: details].! >>>>> - [actionBlock value: details]. >>>>> - >>>>> - self delete! >>>>> >>>>> >>>>> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/c912e63d/attachment-0001.htm From tim at rowledge.org Mon Sep 26 18:12:00 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon Sep 26 18:12:05 2016 Subject: [squeak-dev] New, faster RISC OS Squeak In-Reply-To: <1474545273132-4916592.post@n4.nabble.com> References: <5113DB10.5030400@gmail.com> <3535DA7F-09DF-47CF-AF11-DECA190AD89B@rowledge.org> <51140748.4070706@gmail.com> <7E411575-069C-4793-BB79-0993A4C4C2ED@rowledge.org> <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> <1474545273132-4916592.post@n4.nabble.com> Message-ID: <268E4112-C9FE-49F2-9370-F1E5073B4D58@rowledge.org> Apologies for the delayed response; busy re-conditioning my kitchen furniture etc. Have to take advantage of the last few days of relatively warm/dry weather for spraying! From the screenshot you posted it is evident that the initial Display setup is failing to set up the big table to translate Squeak colour values to RISC OS ones. I?m fairly sure it is the call to read the depth required for the palette since the failure seems to be on line 671 of platforms/RiscOS/vm/sqRPCWindows.c - which I can assert from reading the executable in the text editor (not actually witchcraft since the RISC OS text editor can disassemble executables and display them in nice clean assembler format). The only likely candidate I can come up with is the process of building the root window failed to actually create a window and set the handle element of the window structures I keep in a linked list (this is part of the Ffenestri system for multiple host windows) *except* if the create-a-window OS call failed it would have raised a fatal error in a different place. See platforms/RiscOS/vm/sqRPCWindows.c ll:1013 for example. So I?m currently baffled. On my admittedly very old Pi SD card with RISC OS it works perfectly well for the default screen depth. Did you by any chance change anything at all to do with screen size or depth, either in RISC OS or Squeak? I?ll try to download the latest RISC OS sometime but I?m kinda swamped right now so please don?t hold your breath for any answers! > On 22-09-2016, at 4:54 AM, Edwin Ancaer wrote: > > Hello, > > I don't know if it is OK to re-use this old message, but I was following > this conversation to solve my StreamMan problem while installing Squeak (I > downloaded Squeak RiscOS 4.4 on riscos squeak.org) on RiscOs (New to RiscOs, > having some experience with squeak on Linux) > > Only, I did not get it working, I got until the > - wait patiently, don't double-click again, because that will run yet > another copy of the VM > > I saw th Squeak icon appear, and after a while, I got an error saying: > /Squeak may have gone wrong. Click Continue to resume or Quit to stop > Squeak./ > Of course, I choose the Describe button that gave the message: > /Internal Error. Abort on data transfer at &FC02D134./ > > > I'm sill trying to figure out how to get to the postmortem report, but > whatever button I use to click, the window always closes immediately. > > > I hoped you could provide any pointers on what I'm doing wrong > > > Many thanks, > > Edwin Ancaer > > > > > > -- > View this message in context: http://forum.world.st/New-faster-RISC-OS-Squeak-tp4668295p4916592.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The substance "Hey Y'all, watch this!" is known by the state of California to be hazardous to your health. From eliot.miranda at gmail.com Mon Sep 26 18:40:45 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Sep 26 18:40:49 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: On Fri, Sep 23, 2016 at 10:10 PM, Frank Shearar wrote: > On 23 September 2016 at 07:10, Vaidotas Did?balis > wrote: > >> Hello all, >> To save morph and restore it is a basic behavior which is broken since >> Squeak 4.5. This is a bug. Beginning from 4.5 new Squeak user will get a >> debugger window open in a few clicks. This bug happened as a side effect of >> pushing Environments package into the Squeak image beginning from Squeak >> 4.5. No one uses Environments; there are significant use for morph saving. >> Squeak needs this ability. Maybe it is easier to remove Environments from >> stock Image and to fix the bug introduced by that package. >> Introduction of new packages need not to break useful things... >> regards, >> Vaidotas >> > > It was pretty difficult for Colin Putney to perform the heart surgery > necessary to get Environments into the image in the first place. The > capabilities that Environments enable are pretty dang awesome, and it's a > crying shame that people either don't see these capabilities (sandboxing, > trivial resolution of class name clashes are the START of things) or (more > likely) simply haven't had the time to build the _missing tooling support_ > to make Environments work to their fullest. > > I'm equally to blame here: I burned out a few years back, and have since > been too busy doing other stuff to work on Environments (or Squeak at all). > > But it would be tragic if we performed the equally painful surgery to > remove Environments. > > So instead of removing a super awesome half-implemented feature of Squeak, > why don't we, I don't know, _fix the bug_. Raise a bug report. Give a > patch. It will make Squeak better. > +1000 > frank > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/21f6d07b/attachment.htm From maxleske at gmail.com Mon Sep 26 19:43:36 2016 From: maxleske at gmail.com (Max Leske) Date: Mon Sep 26 19:43:41 2016 Subject: [Pharo-dev] [Vm-dev] Re: Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: <57e95d52.4dd4370a.5ba6.6515SMTPIN_ADDED_MISSING@mx.google.com> References: <57e95d52.4dd4370a.5ba6.6515SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <40495849-2B54-4178-B75B-3B0FB66A8397@gmail.com> Hi Bert, No, we use ImageSegment directly (we?ve subclassed ImageSegment). Here?s the short version: 1. we copy the roots: self copyFromRoots: (Array with: anObject) sizeHint: self fileSize // 2 areUnique: true. 2. we write the segment onto a MutliByteFileStream (which we?ve subclassed): NSSegmentStream forceNewFileNamed: fileName do: [ :stream | stream writeObject: self ]. where #writeObject: is implemented as: writeObject: anObject (SmartRefStream on: self) nextPutObjOnly: anObject We load the segment back by: 1. opening a MultiByteFileStream and sending the installation message: NSSegmentStream readOnlyFileNamed: (aDirectory fullNameFor: filename) do: [ :stream | self installSegmentFrom: stream andDo: aBlock ] 2. #installSegmentFrom:andDo: basically sends #readObject to the file stream: readObject "This is a hack to allow for the old segments (mixed code and objects) to be loaded without the #inform: in #nextAndClose opening a UI element." ^ self binary peek = ReferenceStream versionCode ifTrue: [ (SmartRefStream on: self) nextAndClose ] ifFalse: [ | object | self ascii; fileIn. object := SmartRefStream scannedObject. SmartRefStream scannedObject: nil. object ] 3. and once we have the segment we send #install to it We?ve made some modifications here and there (e.g. to suppress UI elements) but the above is the gist of it. I can give you the full source if you need it. It?s possible that this is all overkill or parallels functionality found in other places. I?ve inherited the code and haven?t spent the time exploring improvements in that area. Cheers, Max > On 26 Sep 2016, at 19:39, squeak-dev-request@lists.squeakfoundation.org wrote: > > Hi Max, > > I'd be interested to learn how you are using ImageSegments. Is it > using CodeLoader? > > - Bert - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160926/8da35119/attachment.htm From lecteur at zogotounga.net Mon Sep 26 19:49:06 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Mon Sep 26 19:49:02 2016 Subject: [Vm-dev] Nuking VM ImageSegment support (was Re: [squeak-dev] Daily Commit Log; System-bf.916) In-Reply-To: References: Message-ID: > Where is the canonical documentation for Environments, where I would > expect to find an exposition of its overall architecture, plus a > detailed tour of its most important classes and methods, along with a > couple of examples showing how to use it? So there is really no documentation ? Stef From commits at source.squeak.org Mon Sep 26 21:55:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Sep 26 21:55:10 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160926215507.28023.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068963.html Name: EToys-tfel.252 Ancestors: EToys-tfel.251 fix a potential bug when the info dictionary for kedama turtle vector players was restored from siss ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068964.html Name: EToys-tfel.253 Ancestors: EToys-tfel.252 delete the project saving morph before saving ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068965.html Name: EToys-tfel.254 Ancestors: EToys-tfel.253 fix the mouse over highlights for tiles in the viewer ============================================= From commits at source.squeak.org Tue Sep 27 12:53:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 12:53:25 2016 Subject: [squeak-dev] The Trunk: System-tfel.917.mcz Message-ID: Tim Felgentreff uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-tfel.917.mcz ==================== Summary ==================== Name: System-tfel.917 Author: tfel Time: 27 September 2016, 2:52:54.264629 pm UUID: 6436c2ff-4a02-d845-9b8e-45b8130a609c Ancestors: System-bf.916 when trying to load a project from my local server when that is not set, at least try to fall back to the default directory =============== Diff against System-bf.916 =============== Item was changed: ----- Method: Project>>fromMyServerLoad: (in category 'file in/out') ----- fromMyServerLoad: otherProjectName | pair pr dirToUse | "If a newer version of me is on the server, load it." (pr := Project named: otherProjectName) ifNotNil: ["it appeared" ^ pr enter ]. + dirToUse := self primaryServerIfNil: [ + lastDirectory + ifNil: [FileDirectory default] + ifNotNil: [lastDirectory]]. - lastDirectory ifNil: [ - self inform: 'Current project does not know a server either.'. - ^nil]. - lastDirectory]. pair := self class mostRecent: otherProjectName onServer: dirToUse. pair first ifNil: [^self decideAboutCreatingBlank: otherProjectName]. "nothing to load" ^ProjectLoading installRemoteNamed: pair first from: dirToUse named: otherProjectName in: self ! From commits at source.squeak.org Tue Sep 27 12:55:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 12:55:21 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-tfel.199.mcz Message-ID: Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-tfel.199.mcz ==================== Summary ==================== Name: MorphicExtras-tfel.199 Author: tfel Time: 27 September 2016, 2:55:01.185629 pm UUID: 654861ec-a93d-7b42-b2bc-f57bdbc9647f Ancestors: MorphicExtras-tfel.198 Force re-drawing of the main hand after the EventRecorder finishes =============== Diff against MorphicExtras-tfel.198 =============== Item was changed: ----- Method: EventRecorderMorph>>pauseIn: (in category 'pause/resume') ----- pauseIn: aWorld "Suspend playing or recording, either as part of a stop command, or as part of a project switch, after which it will be resumed." self setStatusLight: #ready. state = #play ifTrue: [state := #suspendedPlay. playHand halo ifNotNil: [playHand halo delete]. playHand delete. aWorld removeHand: playHand. + aWorld firstHand showHardwareCursor: true. playHand := nil]. state = #record ifTrue: [state := #suspendedRecord. recHand removeEventListener: self. recHand := nil]. voiceRecorder ifNotNil: [voiceRecorder pause. startSoundEvent ifNotNil: [startSoundEvent argument: voiceRecorder recordedSound. voiceRecorder clearRecordedSound. startSoundEvent := nil]]. ! From commits at source.squeak.org Tue Sep 27 12:57:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 12:57:59 2016 Subject: [squeak-dev] The Trunk: Kernel-tfel.1040.mcz Message-ID: Tim Felgentreff uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-tfel.1040.mcz ==================== Summary ==================== Name: Kernel-tfel.1040 Author: tfel Time: 27 September 2016, 2:57:29.665629 pm UUID: e6781812-fc7b-a546-818b-0b16c5d62e88 Ancestors: Kernel-tfel.1039 refactor newSubclass to go through the more general newUniqueClassInstVars:classInstVars: method. =============== Diff against Kernel-tfel.1039 =============== Item was changed: ----- Method: Class>>newSubclass (in category 'subclass creation') ----- newSubclass - | i className | - i := 1. - [className := (self name , i printString) asSymbol. - self environment includesKey: className] - whileTrue: [i := i + 1]. + ^ self newUniqueClassInstVars: '' classInstVars: '' - ^ self subclass: className - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: Object categoryForUniclasses "Point newSubclass new"! Item was changed: ----- Method: Object class>>newUniqueClassInstVars:classInstVars: (in category 'instance creation') ----- newUniqueClassInstVars: instVarString classInstVars: classInstVarString "Create a unique class for the receiver" | aName aClass | self isSystemDefined ifFalse: [^ superclass newUniqueClassInstVars: instVarString classInstVars: classInstVarString]. aName := self chooseUniqueClassName. aClass := self subclass: aName instanceVariableNames: instVarString classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. + classInstVarString size > 0 ifTrue: + [aClass class instanceVariableNames: classInstVarString]. self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" aClass environment forgetClass: aClass logged: false. self removeSubclass: aClass. - classInstVarString size > 0 ifTrue: - [aClass class instanceVariableNames: classInstVarString]. ^ aClass! From commits at source.squeak.org Tue Sep 27 13:42:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 13:42:29 2016 Subject: [squeak-dev] The Trunk: Kernel-tfel.1041.mcz Message-ID: Tim Felgentreff uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-tfel.1041.mcz ==================== Summary ==================== Name: Kernel-tfel.1041 Author: tfel Time: 27 September 2016, 3:41:40.508268 pm UUID: 31da1f70-2af0-e74e-b46c-74f1c7b615b7 Ancestors: Kernel-tfel.1040 uniclasses might not have a category =============== Diff against Kernel-tfel.1040 =============== Item was changed: ----- Method: ClassBuilder>>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe: (in category 'class definition') ----- name: className inEnvironment: env subclassOf: newSuper type: type instanceVariableNames: instVarString classVariableNames: classVarString poolDictionaries: poolString category: category unsafe: unsafe "Define a new class in the given environment. If unsafe is true do not run any validation checks. This facility is provided to implement important system changes." | oldClass instVars classVars copyOfOldClass newClass | environ := env. instVars := Scanner new scanFieldNames: instVarString. classVars := (Scanner new scanFieldNames: classVarString) collect: [:x | x asSymbol]. "Validate the proposed name" unsafe ifFalse:[(self validateClassName: className) ifFalse:[^nil]]. oldClass := env at: className ifAbsent:[nil]. oldClass isBehavior ifFalse: [oldClass := nil] "Already checked in #validateClassName:" ifTrue: [ copyOfOldClass := oldClass copy. copyOfOldClass superclass addSubclass: copyOfOldClass]. [ | newCategory needNew force organization oldCategory | unsafe ifFalse:[ "Run validation checks so we know that we have a good chance for recompilation" (self validateSuperclass: newSuper forSubclass: oldClass) ifFalse:[^nil]. (self validateInstvars: instVars from: oldClass forSuper: newSuper) ifFalse:[^nil]. (self validateClassvars: classVars from: oldClass forSuper: newSuper) ifFalse:[^nil]. (self validateSubclassFormat: type from: oldClass forSuper: newSuper extra: instVars size) ifFalse:[^nil]]. "See if we need a new subclass" needNew := self needsSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass. needNew == nil ifTrue:[^nil]. "some error" (needNew and:[unsafe not]) ifTrue:[ "Make sure we don't redefine any dangerous classes" (self tooDangerousClasses includes: oldClass name) ifTrue:[ self error: oldClass name, ' cannot be changed'. ]. "Check if the receiver should not be redefined" (oldClass ~~ nil and:[oldClass shouldNotBeRedefined]) ifTrue:[ self notify: oldClass name asText allBold, ' should not be redefined. \Proceed to store over it.' withCRs]]. needNew ifTrue:[ "Create the new class" newClass := self newSubclassOf: newSuper type: type instanceVariables: instVars from: oldClass. newClass == nil ifTrue:[^nil]. "Some error" newClass setName: className. newClass environment: environ. ] ifFalse:[ "Reuse the old class" newClass := oldClass. ]. "Install the class variables and pool dictionaries... " force := (newClass declare: classVarString) | (newClass sharing: poolString). "... classify ..." + category ifNotNil: [ + newCategory := category asSymbol. + organization := environ ifNotNil:[environ organization]. + oldClass isNil ifFalse: [oldCategory := (organization categoryOfElement: oldClass name) asSymbol]. + organization classify: newClass name under: newCategory suppressIfDefault: true]. + - newCategory := category asSymbol. - organization := environ ifNotNil:[environ organization]. - oldClass isNil ifFalse: [oldCategory := (organization categoryOfElement: oldClass name) asSymbol]. - organization classify: newClass name under: newCategory suppressIfDefault: true. - "... recompile ..." newClass := self recompile: force from: oldClass to: newClass mutate: false. "... export if not yet done ..." (environ at: newClass name ifAbsent:[nil]) == newClass ifFalse:[ [environ at: newClass name put: newClass] on: AttemptToWriteReadOnlyGlobal do:[:ex| ex resume: true]. environ flushClassNameCache. ]. newClass doneCompiling. "... notify interested clients ..." oldClass isNil ifTrue: [ SystemChangeNotifier uniqueInstance classAdded: newClass inCategory: newCategory. ^ newClass]. newCategory ~= oldCategory ifTrue: [SystemChangeNotifier uniqueInstance class: newClass recategorizedFrom: oldCategory to: category] ifFalse: [SystemChangeNotifier uniqueInstance classDefinitionChangedFrom: copyOfOldClass to: newClass.]. ] ensure: [copyOfOldClass ifNotNil: [copyOfOldClass superclass removeSubclass: copyOfOldClass]. Behavior flushObsoleteSubclasses. ]. ^newClass! From commits at source.squeak.org Tue Sep 27 13:45:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 13:45:48 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.255.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.255.mcz ==================== Summary ==================== Name: EToys-tfel.255 Author: tfel Time: 27 September 2016, 3:44:53.921268 pm UUID: 76eaa9ec-bd5b-7c48-b15a-fff14d6af1ee Ancestors: EToys-tfel.254 pretend uniclasses have an environment, to make the compilation paths work =============== Diff against EToys-tfel.254 =============== Item was removed: - ----- Method: Player class>>category (in category 'organization') ----- - category - - ^ super category ifNil: [self categoryForUniclasses]! Item was added: + ----- Method: Player class>>environment (in category 'organization') ----- + environment + + ^ self isUniClass + ifTrue: [(Environment withName: 'EtoysUserDefinedTempEnvironment') + at: self name put: self; + yourself] + ifFalse: [super environment]! From commits at source.squeak.org Tue Sep 27 13:49:16 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 13:49:18 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.256.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.256.mcz ==================== Summary ==================== Name: EToys-tfel.256 Author: tfel Time: 27 September 2016, 3:48:35.810629 pm UUID: 67cc3cc0-a391-2e4e-af52-dd6bbc2e1f03 Ancestors: EToys-tfel.255 - various fixes for the mentoring event recorder - utility methods for etoys course =============== Diff against EToys-tfel.255 =============== Item was changed: ----- Method: InteriorSolidSugarSuppliesTab>>mouseMove: (in category 'event handling') ----- mouseMove: evt "Handle a mouse-move within the solid tab." | aPosition newReferentThickness adjustedPosition thick aWorldlet | + true ifTrue: [^ self]. dragged ifFalse: [(thick := self referentThickness) > 0 ifTrue: [lastReferentThickness := thick]]. aWorldlet := self ownerThatIsA: Worldlet. aPosition := evt cursorPoint - aWorldlet position. edgeToAdhereTo == #top ifTrue: [adjustedPosition := aPosition - evt hand targetOffset. newReferentThickness := adjustedPosition y - self navBarHeight] ifFalse: [adjustedPosition := aPosition - evt hand targetOffset. newReferentThickness := aWorldlet height - (adjustedPosition y + self navBarHeight + self height)]. self applyThickness: newReferentThickness. dragged := true. self fitOnScreen! Item was changed: ----- Method: MentoringEventRecorder>>handleListenEvent: (in category 'events-processing') ----- handleListenEvent: anEvent "Process a listen event." anEvent hand == recHand ifFalse: [^ self]. "not for me" (#(recording recordingWithSound) includes: self state) ifFalse: ["If user got an error while recording and deleted recorder, will still be listening" recHand ifNotNil: [recHand removeEventListener: self]. ^ self]. + anEvent timeStamp: Time millisecondClockValue. "Workaround a bug in Windows VM" anEvent = lastEvent ifTrue: [^ self]. (anEvent isKeyboard and: [anEvent keyValue = 27 "esc"]) ifTrue: [^ self handleEscape]. time := anEvent timeStamp. tapeStream ifNotNil: [tapeStream nextPut: (anEvent copy setHand: nil)]. lastEvent := anEvent! Item was changed: ----- Method: MentoringEventRecorder>>pauseIn: (in category 'pause/resume') ----- pauseIn: aWorld "Suspend -- a stop command, typically because an EOF event was found on the event tape being played." (#(recordingWithSound playbackAddingVoiceover) includes: self state) ifTrue: [self terminateVoiceRecording. self state: #atEndOfPlayback. recHand ifNotNil: [recHand removeEventListener: self]. recHand := nil.]. (#(playback) includes: self state) ifTrue: [self state: #suspendedPlay. playHand ifNotNil: [playHand halo ifNotNil: [playHand halo delete]. playHand delete]. aWorld removeHand: playHand. self removeProperty: #suspendedContentArea. playHand := nil. + recordingSpace playingEnded. + aWorld firstHand showHardwareCursor: true] - recordingSpace playingEnded] ! Item was changed: ----- Method: MentoringEventRecorder>>resumePlayIn: (in category 'pause/resume') ----- resumePlayIn: aWorld "Playback" | anEvent aPosition | recordingSpace abandonReplayHandsAndHalos. self flag: #deferred. "I guess it's the above line that messes up the nesting of these guys..." self state: #playback. recordingSpace populateControlsPanel. aWorld doOneCycle. playHand := HandMorphForReplay new recorder: self. [((anEvent := tapeStream next) notNil and: [(anEvent isKindOf: UserInputEvent) not])] whileTrue: []. aPosition := anEvent ifNil: [recordingSpace contentArea center] ifNotNil: [anEvent position]. tapeStream reset. playHand position: aPosition + recordingSpace areaOffset. aWorld addHand: playHand. playHand newKeyboardFocus: aWorld. + playHand userInitials: '' andPicture: nil. - playHand userInitials: 'play' andPicture: nil. lastEvent := nil. lastDelta := 0@0. startPlaybackTime := Time millisecondClockValue. millisecondsIntoPlayback := 0. self findPlayOffset. self synchronize ! Item was changed: ----- Method: PasteUpMorph>>impartPrivatePresenter (in category '*Etoys-playfield') ----- impartPrivatePresenter presenter ifNil: [presenter := EtoysPresenter new associatedMorph: self. + "presenter standardPlayer"]! - presenter standardPlayer]! Item was added: + ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- + cleanUpEtoysGarbage + "Project cleanUpEtoysGarbage" + "All these should eventuall go away and be fixed, but for now we have this here." + Smalltalk garbageCollect. + "Clear weak message sends to remove modal windows from worlds that are closing." + (WeakMessageSend allInstances select: [:wm | + (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. + "Clear the weak dictionary on the class side that keeps node state around in the rewriter" + KedamaEvaluatorNodeState initialize. + "Clear the KedamaEvaluator that holds on to the last Kedama world" + ScriptEditorMorph setDefaultEvaluator. + "Clear the hard references to player classes, " + (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | + Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. + Player withAllSubclasses + select: [:c | c isSystemDefined not] + thenDo: [:c | c superclass removeSubclass: c]. + "Clear the paste buffer" + HandMorph initialize. + "Clear the reference to the project tree in SkObject" + SkObject initialize. + Smalltalk garbageCollect.! Item was added: + ----- Method: Project class>>makeANewLocalGallery (in category '*Etoys-Squeakland-utilities') ----- + makeANewLocalGallery + | m pvm | + m := Morph new + changeTableLayout; + listDirection: #leftToRight; + wrapDirection: #topToBottom; + yourself. + (((FileDirectory default fileNamesMatching: '*.pr') + collect: [:name | (Project parseProjectFileName: name) first]) asSet sorted) do: [:name | + pvm := ProjectViewMorph new. + m addMorph: (pvm + project: (DiskProxy global: #Project selector: #named: args: {name}))]. + m openInHand! From eancaer at gmail.com Tue Sep 27 19:10:32 2016 From: eancaer at gmail.com (Edwin Ancaer) Date: Tue Sep 27 19:15:59 2016 Subject: [squeak-dev] Re: New, faster RISC OS Squeak In-Reply-To: <268E4112-C9FE-49F2-9370-F1E5073B4D58@rowledge.org> References: <5113DB10.5030400@gmail.com> <3535DA7F-09DF-47CF-AF11-DECA190AD89B@rowledge.org> <51140748.4070706@gmail.com> <7E411575-069C-4793-BB79-0993A4C4C2ED@rowledge.org> <8A6A037B-88F2-4B89-A0B7-7CF435AF3864@freudenbergs.de> <1474545273132-4916592.post@n4.nabble.com> <268E4112-C9FE-49F2-9370-F1E5073B4D58@rowledge.org> Message-ID: <1475003432560-4917270.post@n4.nabble.com> No apologies necessary: I appreciate the effort that goes into the maintenance of Squeak on Riscos. There is enough for me to learn about RISCos and Squeak to keep me occupied for a while.. Some additional info from display manager: Colours: 16 million Resolution: 1024 x 768 Frame Rate: 6O Hz After changing the colors to 256, and restarting, the problem remains. Another question: Could this problem be linked to the installation of GCC? When I start the Raspberry Pi, and lick the image file, I get the error 'File make not found' . Then, clicking the GCC-application and clicking the image file again, the problem with the make file is gone, but I get the 'Squeak may have gone wrong' error.. I will create a new noobs SD-card, and try an installation on a new Riscos installation of squeak on that. Kind regards, Edwin Ancaer -- View this message in context: http://forum.world.st/New-faster-RISC-OS-Squeak-tp4668295p4917270.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Sep 27 21:55:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Sep 27 21:55:07 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160927215504.5910.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068966.html Name: System-tfel.917 Ancestors: System-bf.916 when trying to load a project from my local server when that is not set, at least try to fall back to the default directory ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068967.html Name: MorphicExtras-tfel.199 Ancestors: MorphicExtras-tfel.198 Force re-drawing of the main hand after the EventRecorder finishes ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068968.html Name: Kernel-tfel.1040 Ancestors: Kernel-tfel.1039 refactor newSubclass to go through the more general newUniqueClassInstVars:classInstVars: method. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068969.html Name: Kernel-tfel.1041 Ancestors: Kernel-tfel.1040 uniclasses might not have a category ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068970.html Name: EToys-tfel.255 Ancestors: EToys-tfel.254 pretend uniclasses have an environment, to make the compilation paths work ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068971.html Name: EToys-tfel.256 Ancestors: EToys-tfel.255 - various fixes for the mentoring event recorder - utility methods for etoys course ============================================= From leves at caesar.elte.hu Tue Sep 27 23:26:59 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 27 23:27:03 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.256.mcz In-Reply-To: References: Message-ID: On Tue, 27 Sep 2016, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.256.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.256 > Author: tfel > Time: 27 September 2016, 3:48:35.810629 pm > UUID: 67cc3cc0-a391-2e4e-af52-dd6bbc2e1f03 > Ancestors: EToys-tfel.255 > > - various fixes for the mentoring event recorder > - utility methods for etoys course > > =============== Diff against EToys-tfel.255 =============== > > Item was changed: > ----- Method: InteriorSolidSugarSuppliesTab>>mouseMove: (in category 'event handling') ----- > mouseMove: evt > "Handle a mouse-move within the solid tab." > > | aPosition newReferentThickness adjustedPosition thick aWorldlet | > + true ifTrue: [^ self]. > dragged ifFalse: [(thick := self referentThickness) > 0 > ifTrue: [lastReferentThickness := thick]]. > > aWorldlet := self ownerThatIsA: Worldlet. > aPosition := evt cursorPoint - aWorldlet position. > edgeToAdhereTo == #top > ifTrue: > [adjustedPosition := aPosition - evt hand targetOffset. > newReferentThickness := adjustedPosition y - self navBarHeight] > ifFalse: > [adjustedPosition := aPosition - evt hand targetOffset. > newReferentThickness := aWorldlet height - (adjustedPosition y + self navBarHeight + self height)]. > > self applyThickness: newReferentThickness. > dragged := true. > self fitOnScreen! > > Item was changed: > ----- Method: MentoringEventRecorder>>handleListenEvent: (in category 'events-processing') ----- > handleListenEvent: anEvent > "Process a listen event." > > anEvent hand == recHand ifFalse: [^ self]. "not for me" > (#(recording recordingWithSound) includes: self state) ifFalse: > ["If user got an error while recording and deleted recorder, will still be listening" > recHand ifNotNil: [recHand removeEventListener: self]. > ^ self]. > + anEvent timeStamp: Time millisecondClockValue. "Workaround a bug in Windows VM" That shoud be Time >> #eventMillisecondClock. Levente > anEvent = lastEvent ifTrue: [^ self]. > (anEvent isKeyboard and: [anEvent keyValue = 27 "esc"]) > ifTrue: [^ self handleEscape]. > time := anEvent timeStamp. > tapeStream ifNotNil: > [tapeStream nextPut: (anEvent copy setHand: nil)]. > lastEvent := anEvent! > > Item was changed: > ----- Method: MentoringEventRecorder>>pauseIn: (in category 'pause/resume') ----- > pauseIn: aWorld > "Suspend -- a stop command, typically because an EOF event was found on the event tape being played." > > (#(recordingWithSound playbackAddingVoiceover) includes: self state) ifTrue: > [self terminateVoiceRecording. > self state: #atEndOfPlayback. > recHand ifNotNil: [recHand removeEventListener: self]. > recHand := nil.]. > > (#(playback) includes: self state) ifTrue: > [self state: #suspendedPlay. > playHand ifNotNil: > [playHand halo ifNotNil: [playHand halo delete]. > playHand delete]. > aWorld removeHand: playHand. > self removeProperty: #suspendedContentArea. > playHand := nil. > + recordingSpace playingEnded. > + aWorld firstHand showHardwareCursor: true] > - recordingSpace playingEnded] > ! > > Item was changed: > ----- Method: MentoringEventRecorder>>resumePlayIn: (in category 'pause/resume') ----- > resumePlayIn: aWorld > "Playback" > > | anEvent aPosition | > recordingSpace abandonReplayHandsAndHalos. > self flag: #deferred. "I guess it's the above line that messes up the nesting of these guys..." > > self state: #playback. > recordingSpace populateControlsPanel. > aWorld doOneCycle. > > playHand := HandMorphForReplay new recorder: self. > [((anEvent := tapeStream next) notNil and: [(anEvent isKindOf: UserInputEvent) not])] > whileTrue: []. > aPosition := anEvent > ifNil: > [recordingSpace contentArea center] > ifNotNil: > [anEvent position]. > tapeStream reset. > playHand position: aPosition + recordingSpace areaOffset. > aWorld addHand: playHand. > playHand newKeyboardFocus: aWorld. > + playHand userInitials: '' andPicture: nil. > - playHand userInitials: 'play' andPicture: nil. > > lastEvent := nil. > lastDelta := 0@0. > startPlaybackTime := Time millisecondClockValue. > millisecondsIntoPlayback := 0. > self findPlayOffset. > > self synchronize > ! > > Item was changed: > ----- Method: PasteUpMorph>>impartPrivatePresenter (in category '*Etoys-playfield') ----- > impartPrivatePresenter > presenter ifNil: > [presenter := EtoysPresenter new associatedMorph: self. > + "presenter standardPlayer"]! > - presenter standardPlayer]! > > Item was added: > + ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- > + cleanUpEtoysGarbage > + "Project cleanUpEtoysGarbage" > + "All these should eventuall go away and be fixed, but for now we have this here." > + Smalltalk garbageCollect. > + "Clear weak message sends to remove modal windows from worlds that are closing." > + (WeakMessageSend allInstances select: [:wm | > + (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. > + "Clear the weak dictionary on the class side that keeps node state around in the rewriter" > + KedamaEvaluatorNodeState initialize. > + "Clear the KedamaEvaluator that holds on to the last Kedama world" > + ScriptEditorMorph setDefaultEvaluator. > + "Clear the hard references to player classes, " > + (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | > + Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. > + Player withAllSubclasses > + select: [:c | c isSystemDefined not] > + thenDo: [:c | c superclass removeSubclass: c]. > + "Clear the paste buffer" > + HandMorph initialize. > + "Clear the reference to the project tree in SkObject" > + SkObject initialize. > + Smalltalk garbageCollect.! > > Item was added: > + ----- Method: Project class>>makeANewLocalGallery (in category '*Etoys-Squeakland-utilities') ----- > + makeANewLocalGallery > + | m pvm | > + m := Morph new > + changeTableLayout; > + listDirection: #leftToRight; > + wrapDirection: #topToBottom; > + yourself. > + (((FileDirectory default fileNamesMatching: '*.pr') > + collect: [:name | (Project parseProjectFileName: name) first]) asSet sorted) do: [:name | > + pvm := ProjectViewMorph new. > + m addMorph: (pvm > + project: (DiskProxy global: #Project selector: #named: args: {name}))]. > + m openInHand! > > > From leves at caesar.elte.hu Tue Sep 27 23:28:38 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 27 23:28:43 2016 Subject: [squeak-dev] The Trunk: System-tfel.917.mcz In-Reply-To: References: Message-ID: On Tue, 27 Sep 2016, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-tfel.917.mcz > > ==================== Summary ==================== > > Name: System-tfel.917 > Author: tfel > Time: 27 September 2016, 2:52:54.264629 pm > UUID: 6436c2ff-4a02-d845-9b8e-45b8130a609c > Ancestors: System-bf.916 > > when trying to load a project from my local server when that is not set, at least try to fall back to the default directory > > =============== Diff against System-bf.916 =============== > > Item was changed: > ----- Method: Project>>fromMyServerLoad: (in category 'file in/out') ----- > fromMyServerLoad: otherProjectName > | pair pr dirToUse | > "If a newer version of me is on the server, load it." > > (pr := Project named: otherProjectName) ifNotNil: ["it appeared" > ^ pr enter > ]. > + > dirToUse := self primaryServerIfNil: [ > + lastDirectory > + ifNil: [FileDirectory default] > + ifNotNil: [lastDirectory]]. The #ifNotNil: branch is unnecessary. Levente > - lastDirectory ifNil: [ > - self inform: 'Current project does not know a server either.'. > - ^nil]. > - lastDirectory]. > > pair := self class mostRecent: otherProjectName onServer: dirToUse. > pair first ifNil: [^self decideAboutCreatingBlank: otherProjectName]. "nothing to load" > ^ProjectLoading > installRemoteNamed: pair first > from: dirToUse > named: otherProjectName > in: self > > ! > > > From leves at caesar.elte.hu Tue Sep 27 23:31:18 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue Sep 27 23:31:20 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.252.mcz In-Reply-To: References: Message-ID: On Mon, 26 Sep 2016, commits@source.squeak.org wrote: > Tim Felgentreff uploaded a new version of EToys to project The Trunk: > http://source.squeak.org/trunk/EToys-tfel.252.mcz > > ==================== Summary ==================== > > Name: EToys-tfel.252 > Author: tfel > Time: 26 September 2016, 10:06:37.467552 am > UUID: ec8e5c79-9271-ee4b-b729-a0138c2b4b9d > Ancestors: EToys-tfel.251 > > fix a potential bug when the info dictionary for kedama turtle vector players was restored from siss > > =============== Diff against EToys-tfel.251 =============== > > Item was changed: > ----- Method: KedamaTurtleVectorPlayer2>>compileAllAccessors (in category 'player protocol') ----- > compileAllAccessors > > + info rehash. > info keys asArray do: [:k | How about using #keysDo: here? Levente > (#(who x y heading color visible predicate) includes: k) ifFalse: [ > self compileVectorInstVarAccessorsFor: k. > ]. > ]. > ! > > > From jakob.reschke at student.hpi.de Wed Sep 28 09:17:15 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Wed Sep 28 09:18:14 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Let me repeat my question which might have gone unnoticed in my previous wall of text: Why doesn't the global environment (Smalltalk globals) export anything by default? Is there a reason at all, or was it simply forgotten at some point (because "nobody uses Environments" anyway)? Alternatively: Are there downsides of `Smalltalk globals exportSelf` other than that you have to do it yourself in current Squeak images? 2016-09-23 17:28 GMT+02:00 Jakob Reschke : > In the meantime, I figured out that the Smalltalk globals environment > does not export anything. Hence, nothing can be imported from it by > default. > > Further, I found this post [1] by Frank Shearar, which contains a > snippet to load a package into an environment (however, > EnvironmentRequest has been renamed to CurrentEnvironment since then). > He also proposes `Smalltalk globals exportSelf` there, to let the > global environment export its contents, which could be one way to > solve my first problem. > > I am unsure how this is intended to be used; what is the reason for > not letting the global environment export anything by default? After > all, you have to start somewhere... To attempt an alternative, I > created a fresh environment for the classes that I want to import > later under other names like so: > > fsenv := Environment named: #FileSystem. > fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: []. > fspackage classes do: [:ea | fsenv bind: ea name to: ea ] > fsenv importSelf. > fsenv exportSelf. > testenv := Environment named: #TestEnv1. > testenv importSelf. > testenv exportSelf. > testenv import: fsenv removingPrefix: 'FS'. > testenv valueOf: #Filesystem "=> FSFilesystem" > > Now I can use testenv valueOf: #Filesystem to retrieve the > FSFilesystem class, so far so good. I have not used my testenv for > anything real yet, but it is still missing all the basics such as > Object or Array. So I doubt it will be of much use, unless I set up > another environment to import from that contains all the Kernel, > Collections etc. classes. But this does not feel right, as there > already is such an environment: Smalltalk globals... > > In the post from 2012 for which Chris posted the link, Colin linked an > image (and luckily, he has not removed it from his webspace since > then) from which I could grab the browser opening snippet. It is > simply > > Browser fullOnClass: aClassDefinedInAnotherEnvironment > > ...which in my case gives me a browser for the global environment > instead, because the "renamed" classes stem from there, of course. > > Frank's post also has another snippet to browse an environment: > > b := Browser new > selectEnvironment: anEnvironment; > yourself. > Browser openBrowserView: (b openEditString: nil) label: b > defaultBrowserTitle > > But it seems like the browser will only show an environment's own > contents, not the imported classes. Hence, I do not see anything in my > environments so far. If my assumption is correct, there is no way to > see the imported classes under their new names in the browser. > > When I try to define a new class using my empty browser on my > environment, it goes back into Smalltalk globals and puts the class > there instead. It also does that in Colin's old image, so I guess > defining classes in environments is not supported that way. > > More elaborate tools are probably required to easily see what is going > on, without exploring the Environments implementation in parallel. > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-December/175519.html > > > 2016-09-23 11:59 GMT+02:00 Tobias Pape : >> Hi Colin, >> >> do you have an idea here? >> >> Best regards >> -Tobias > > 2016-09-16 18:27 GMT+02:00 Chris Cunnington : >>>Can I get a system browser for my environment (where saving a method >>>compiles it with the environment bindings in place)? >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-June/164605.html >> >> Chris > >> >> On 16.09.2016, at 14:50, Jakob Reschke wrote: >> >>> Hello, >>> >>> I am having a look at Environments, but have not yet figured out, how >>> to operate them. I would like to create a new environment with an >>> additional binding for an existing class under another name, and load >>> a package in that new environment. >>> >>> The most of a documentation I have found is http://wiki.squeak.org/squeak/6220 >>> and I have tried the following so far: >>> >>> testenv := Environment named: #TestEnv1. >>> testenv import: Smalltalk globals. >>> testenv from: Smalltalk globals import: { #String -> #MyString }. >>> testenv importSelf. >>> testenv exportSelf. >>> >>> However, testenv valueOf: #MyString or testenv valueOf: #String both >>> return nil instead of the String class. Does it mean that the >>> from:import: did not work? It seems to only add a policy to my >>> environment, but no declarations or bindings. >>> >>> For evaluating something in context of the environment, I have found >>> the EnvironmentLoader, but it does not seem to recognize the >>> additional binding either: >>> >>> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil >>> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil >>> >>> (at least the import of the original globals seems to have worked). >>> >>> What steps am I missing? >>> >>> Also it is not very convenient to make up strings of code everytime I >>> want to do something in the other environment, is there a better way? >>> Can I get a system browser for my environment (where saving a method >>> compiles it with the environment bindings in place)? >>> >>> Best regards, >>> Jakob >>> >> From commits at source.squeak.org Wed Sep 28 12:02:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 28 12:02:57 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.257.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.257.mcz ==================== Summary ==================== Name: EToys-tfel.257 Author: tfel Time: 28 September 2016, 2:02:17.012904 pm UUID: a4bd9831-92ff-fb4f-9f7f-0681429e8add Ancestors: EToys-tfel.256 make Kedama worlds copyable, by forcing it to always copy also its patches and turtles, and fixing up the deep copying so these players are copied correctly and their scripts are also recompiled correctly. =============== Diff against EToys-tfel.256 =============== Item was added: + ----- Method: KedamaExamplerPlayer>>veryDeepInner: (in category 'copying') ----- + veryDeepInner: deepCopier + "Special code that handles user-added instance variables of a uniClass. + Copy all of my instance variables. Some need to be not copied at all, but shared. This is special code for the dictionary. See DeepCopier." + + kedamaWorld := kedamaWorld veryDeepCopyWith: deepCopier. + turtles := turtles veryDeepCopyWith: deepCopier. + sequentialStub := sequentialStub veryDeepCopyWith: deepCopier. + super veryDeepInner: deepCopier. + ! Item was added: + ----- Method: KedamaMorph>>duplicate (in category 'as yet unclassified') ----- + duplicate + + | allMorphBounds allMorphs allOwners copyW s w | + allMorphs := {self}, self player allPatchAndTurtleMorphs. + allOwners := allMorphs collect: #owner. + allMorphBounds := allMorphs allButFirst + inject: self bounds into: [:acc :next | next bounds merge: acc]. + w := PasteUpMorph new. + w bounds: allMorphBounds. + w openInWorld. + w addAllMorphs: allMorphs. + copyW := w duplicate. + allMorphs withIndexDo: [:m :idx | (allOwners at: idx) addMorph: m]. + w delete. + s := SelectionMorph new. + s bounds: copyW bounds. + s selectSubmorphsOf: copyW. + ^ s! Item was changed: ----- Method: KedamaMorph>>isVisible: (in category 'private') ----- isVisible: examplerPlayer | turtleMorph | turtleMorph := examplerPlayer costume. turtleMorph visible ifFalse: [^ false]. + turtleMorph world ifNil: [^ false]. turtleMorph owner isRenderer ifFalse: [^ true]. ^ turtleMorph owner visible. ! Item was changed: ----- Method: KedamaMorph>>offerCostumeViewerMenu: (in category 'menu') ----- offerCostumeViewerMenu: aMenu aMenu add: 'add a new patch variable' translated action: #newPatch. aMenu balloonTextForLastItem: 'Add a new patch variable' translated. aMenu add: 'add a new breed of turtle' translated action: #newTurtle. aMenu balloonTextForLastItem: 'Add a new turtle' translated. aMenu addLine. + aMenu add: 'gather patches and turtles' translated action: #gatherPatchesAndTurtles. + aMenu balloonTextForLastItem: 'Show all turtles next to me' translated. ! Item was added: + ----- Method: KedamaMorph>>patches (in category 'accessing') ----- + patches + + ^ patchesToDisplay! Item was added: + ----- Method: KedamaMorph>>turtles (in category 'accessing') ----- + turtles + + ^ turtlesDict keys! Item was added: + ----- Method: KedamaPatchMorph>>veryDeepInner: (in category 'as yet unclassified') ----- + veryDeepInner: deepCopier + "the state of a Kedama patch is held in its forms, so we need to " + form := form deepCopy. + displayForm := displayForm deepCopy. + tmpForm := tmpForm deepCopy. + super veryDeepInner: deepCopier.! Item was added: + ----- Method: Player>>allPatchAndTurtleMorphs (in category 'slot-kedama') ----- + allPatchAndTurtleMorphs + + self costume ifNil: [^ #()]. + ^ self costume patches, (self costume turtles collect: #costume)! Item was added: + ----- Method: Player>>gatherPatchesAndTurtles (in category 'slot-kedama') ----- + gatherPatchesAndTurtles + + | position | + self costume owner ifNil: [^ self]. + position := self costume topRight + (5@0). + self allPatchAndTurtleMorphs do: [:m | + m ifNotNil: [ + m position: position. + self costume owner addMorph: m. + m visible: true. + position := position + (0@(m height + 5))]].! Item was added: + ----- Method: UniclassScript>>veryDeepFixupWith: (in category 'copying') ----- + veryDeepFixupWith: deepCopier + + super veryDeepFixupWith: deepCopier. + self flag: #todo. "Textually coded scripts may also have to be adapted" + Project current addDeferredUIMessage: [ + "We do this in a deferred way, because the deep copying may non-deterministically + be in a state where not all referenced players already have copies, so then we recompile the + script, but we still reference the wrong players!! - tfel,jl" + self recompileScriptFromTilesUnlessTextuallyCoded].! From commits at source.squeak.org Wed Sep 28 15:28:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 28 15:28:20 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.258.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.258.mcz ==================== Summary ==================== Name: EToys-tfel.258 Author: tfel Time: 28 September 2016, 5:27:37.334594 pm UUID: ef184947-0831-4b86-9f5f-5707547734bc Ancestors: EToys-tfel.257 - Fix for duplicating KedamaMorphs with non-visible patches or turtles - be careful not to loose top level projects when deleting projects through the etoys history morph - setTurtleCount: on a vector player should go to the exampler player =============== Diff against EToys-tfel.257 =============== Item was changed: ----- Method: EToyProjectHistoryMorph>>confirmedDelete:evt:from: (in category 'as yet unclassified') ----- confirmedDelete: aProject evt: evt from: origin self delete. aProject = Project current ifTrue: [ ^ self inform: 'Cannot delete current project' translated]. (self confirm: ('Do you really want to delete {1} and all its content?' translated format: {aProject name})) + ifTrue: [ + aProject isTopProject ifTrue: [Project current beTopProject]. + aProject delete. + Project rebuildAllProjects].! - ifTrue: [aProject delete].! Item was changed: ----- Method: KedamaMorph>>duplicate (in category 'as yet unclassified') ----- duplicate | allMorphBounds allMorphs allOwners copyW s w | allMorphs := {self}, self player allPatchAndTurtleMorphs. allOwners := allMorphs collect: #owner. allMorphBounds := allMorphs allButFirst inject: self bounds into: [:acc :next | next bounds merge: acc]. w := PasteUpMorph new. w bounds: allMorphBounds. w openInWorld. w addAllMorphs: allMorphs. copyW := w duplicate. + allMorphs withIndexDo: [:m :idx | (allOwners at: idx) ifNotNil: [:o | o addMorph: m]]. - allMorphs withIndexDo: [:m :idx | (allOwners at: idx) addMorph: m]. w delete. s := SelectionMorph new. s bounds: copyW bounds. s selectSubmorphsOf: copyW. ^ s! Item was added: + ----- Method: KedamaTurtleVectorPlayer2>>setTurtleCount: (in category 'slot-kedama') ----- + setTurtleCount: aNumber + + ^ exampler setTurtleCount: aNumber! From nicolas.cellier.aka.nice at gmail.com Wed Sep 28 15:51:35 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 28 15:51:43 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-09-28 11:17 GMT+02:00 Jakob Reschke : > Let me repeat my question which might have gone unnoticed in my > previous wall of text: > > Why doesn't the global environment (Smalltalk globals) export anything > by default? Is there a reason at all, or was it simply forgotten at > some point (because "nobody uses Environments" anyway)? > > It's a bug. Currently, the Environment SUnit tests only work because of strange name scope resolution: we use the environment of superclass in that resolution with no good reason. Since ProtoObject/Object are in the class hierarchy, we have undue access to Smalltalk globals. See below some changes rotting for too long in squeak inbox. IMO, we should evaluate 'Smalltalk exportSelf' in environment package post actions, then apply the fix below. ---------------------------- http://source.squeak.org/inbox/Kernel-nice.798.diff ---------------------------- Name: Kernel-nice.798 Author: nice Time: 30 July 2013, 10:34:15.34 pm UUID: e02ae597-3f6d-40b9-9468-bf01416db6de Ancestors: Kernel-nice.797 Better fix for http://bugs.squeak.org/view.php?id=1554 A class variable defined in a superclass should take precedence over a global variable. First look in local class variables. Then look in local sharedPools (a local sharedPool will shadow a super class variable, that sounds fair). Then look in superclass pools. When superclass chain is exhausted, look in the Environment that were provided as parameter. Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: (or st-80), except that anEvironment parameter replaces Smalltalk. This way we avoid duplicate lookup of previous workaround. And we never ever look in superclass environment, that's not necessarily ours. This currently breaks some EnvironmentTest because inheriting superclass environment is a cheap and easy way to import all Smalltalk (unless you are not an Object or ProtoObject of course). The longest and proper way would be to properly export some symbols from Smalltalk globals, and import them explicitely in the tested environment. Alternatively: Are there downsides of `Smalltalk globals exportSelf` > other than that you have to do it yourself in current Squeak images? > > 2016-09-23 17:28 GMT+02:00 Jakob Reschke : > > In the meantime, I figured out that the Smalltalk globals environment > > does not export anything. Hence, nothing can be imported from it by > > default. > > > > Further, I found this post [1] by Frank Shearar, which contains a > > snippet to load a package into an environment (however, > > EnvironmentRequest has been renamed to CurrentEnvironment since then). > > He also proposes `Smalltalk globals exportSelf` there, to let the > > global environment export its contents, which could be one way to > > solve my first problem. > > > > I am unsure how this is intended to be used; what is the reason for > > not letting the global environment export anything by default? After > > all, you have to start somewhere... To attempt an alternative, I > > created a fresh environment for the classes that I want to import > > later under other names like so: > > > > fsenv := Environment named: #FileSystem. > > fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: > []. > > fspackage classes do: [:ea | fsenv bind: ea name to: ea ] > > fsenv importSelf. > > fsenv exportSelf. > > testenv := Environment named: #TestEnv1. > > testenv importSelf. > > testenv exportSelf. > > testenv import: fsenv removingPrefix: 'FS'. > > testenv valueOf: #Filesystem "=> FSFilesystem" > > > > Now I can use testenv valueOf: #Filesystem to retrieve the > > FSFilesystem class, so far so good. I have not used my testenv for > > anything real yet, but it is still missing all the basics such as > > Object or Array. So I doubt it will be of much use, unless I set up > > another environment to import from that contains all the Kernel, > > Collections etc. classes. But this does not feel right, as there > > already is such an environment: Smalltalk globals... > > > > In the post from 2012 for which Chris posted the link, Colin linked an > > image (and luckily, he has not removed it from his webspace since > > then) from which I could grab the browser opening snippet. It is > > simply > > > > Browser fullOnClass: aClassDefinedInAnotherEnvironment > > > > ...which in my case gives me a browser for the global environment > > instead, because the "renamed" classes stem from there, of course. > > > > Frank's post also has another snippet to browse an environment: > > > > b := Browser new > > selectEnvironment: anEnvironment; > > yourself. > > Browser openBrowserView: (b openEditString: nil) label: b > > defaultBrowserTitle > > > > But it seems like the browser will only show an environment's own > > contents, not the imported classes. Hence, I do not see anything in my > > environments so far. If my assumption is correct, there is no way to > > see the imported classes under their new names in the browser. > > > > When I try to define a new class using my empty browser on my > > environment, it goes back into Smalltalk globals and puts the class > > there instead. It also does that in Colin's old image, so I guess > > defining classes in environments is not supported that way. > > > > More elaborate tools are probably required to easily see what is going > > on, without exploring the Environments implementation in parallel. > > > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013- > December/175519.html > > > > > > 2016-09-23 11:59 GMT+02:00 Tobias Pape : > >> Hi Colin, > >> > >> do you have an idea here? > >> > >> Best regards > >> -Tobias > > > > 2016-09-16 18:27 GMT+02:00 Chris Cunnington : > >>>Can I get a system browser for my environment (where saving a method > >>>compiles it with the environment bindings in place)? > >> > >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012- > June/164605.html > >> > >> Chris > > > >> > >> On 16.09.2016, at 14:50, Jakob Reschke > wrote: > >> > >>> Hello, > >>> > >>> I am having a look at Environments, but have not yet figured out, how > >>> to operate them. I would like to create a new environment with an > >>> additional binding for an existing class under another name, and load > >>> a package in that new environment. > >>> > >>> The most of a documentation I have found is > http://wiki.squeak.org/squeak/6220 > >>> and I have tried the following so far: > >>> > >>> testenv := Environment named: #TestEnv1. > >>> testenv import: Smalltalk globals. > >>> testenv from: Smalltalk globals import: { #String -> #MyString }. > >>> testenv importSelf. > >>> testenv exportSelf. > >>> > >>> However, testenv valueOf: #MyString or testenv valueOf: #String both > >>> return nil instead of the String class. Does it mean that the > >>> from:import: did not work? It seems to only add a policy to my > >>> environment, but no declarations or bindings. > >>> > >>> For evaluating something in context of the environment, I have found > >>> the EnvironmentLoader, but it does not seem to recognize the > >>> additional binding either: > >>> > >>> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil > >>> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil > >>> > >>> (at least the import of the original globals seems to have worked). > >>> > >>> What steps am I missing? > >>> > >>> Also it is not very convenient to make up strings of code everytime I > >>> want to do something in the other environment, is there a better way? > >>> Can I get a system browser for my environment (where saving a method > >>> compiles it with the environment bindings in place)? > >>> > >>> Best regards, > >>> Jakob > >>> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/7b1ba946/attachment-0001.htm From nicolas.cellier.aka.nice at gmail.com Wed Sep 28 16:13:32 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 28 16:13:37 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-09-28 17:51 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > > 2016-09-28 11:17 GMT+02:00 Jakob Reschke : > >> Let me repeat my question which might have gone unnoticed in my >> previous wall of text: >> >> Why doesn't the global environment (Smalltalk globals) export anything >> by default? Is there a reason at all, or was it simply forgotten at >> some point (because "nobody uses Environments" anyway)? >> >> > It's a bug. > Currently, the Environment SUnit tests only work because of strange name > scope resolution: > we use the environment of superclass in that resolution with no good > reason. > Since ProtoObject/Object are in the class hierarchy, we have undue access > to Smalltalk globals. > > See below some changes rotting for too long in squeak inbox. > > IMO, we should evaluate 'Smalltalk exportSelf' in environment package post > actions, then apply the fix below. > > > Also don't forget that each environment pretends that Smalltalk globals are pointing to itself (see Environment>>initializeWithName:), creating some kind of sand-boxing. It's nice. But Smalltalk is now ambiguous ;) And not so nice at the moment, because some names are misleading now. Smalltalk globals are not really globals (the variable scope meaning). Or they are globals in their sandbox... And each Smalltalk is an instance of SmalltalkImage. Once upon a time SmalltalkImage current was meant for universal access to state of object memory (image as a snapshot) but now what are these "images"? It looks like unfinished job, with very short term goal (maximizing portability). I don't know what are the next steps for constructing something solid and consistent. We're not yet there. > ---------------------------- > > > http://source.squeak.org/inbox/Kernel-nice.798.diff > > ---------------------------- > > Name: Kernel-nice.798 > Author: nice > Time: 30 July 2013, 10:34:15.34 pm > UUID: e02ae597-3f6d-40b9-9468-bf01416db6de > Ancestors: Kernel-nice.797 > > Better fix for http://bugs.squeak.org/view.php?id=1554 > A class variable defined in a superclass should take precedence over a > global variable. > > First look in local class variables. > Then look in local sharedPools (a local sharedPool will shadow a super > class variable, that sounds fair). > Then look in superclass pools. > When superclass chain is exhausted, look in the Environment that were > provided as parameter. > > Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: > (or st-80), except that anEvironment parameter replaces Smalltalk. > This way we avoid duplicate lookup of previous workaround. > And we never ever look in superclass environment, that's not necessarily > ours. > > This currently breaks some EnvironmentTest because inheriting superclass > environment is a cheap and easy way to import all Smalltalk (unless you > are not an Object or ProtoObject of course). > The longest and proper way would be to properly export some symbols from > Smalltalk globals, and import them explicitely in the tested environment. > > > Alternatively: Are there downsides of `Smalltalk globals exportSelf` >> other than that you have to do it yourself in current Squeak images? >> >> 2016-09-23 17:28 GMT+02:00 Jakob Reschke : >> > In the meantime, I figured out that the Smalltalk globals environment >> > does not export anything. Hence, nothing can be imported from it by >> > default. >> > >> > Further, I found this post [1] by Frank Shearar, which contains a >> > snippet to load a package into an environment (however, >> > EnvironmentRequest has been renamed to CurrentEnvironment since then). >> > He also proposes `Smalltalk globals exportSelf` there, to let the >> > global environment export its contents, which could be one way to >> > solve my first problem. >> > >> > I am unsure how this is intended to be used; what is the reason for >> > not letting the global environment export anything by default? After >> > all, you have to start somewhere... To attempt an alternative, I >> > created a fresh environment for the classes that I want to import >> > later under other names like so: >> > >> > fsenv := Environment named: #FileSystem. >> > fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: >> []. >> > fspackage classes do: [:ea | fsenv bind: ea name to: ea ] >> > fsenv importSelf. >> > fsenv exportSelf. >> > testenv := Environment named: #TestEnv1. >> > testenv importSelf. >> > testenv exportSelf. >> > testenv import: fsenv removingPrefix: 'FS'. >> > testenv valueOf: #Filesystem "=> FSFilesystem" >> > >> > Now I can use testenv valueOf: #Filesystem to retrieve the >> > FSFilesystem class, so far so good. I have not used my testenv for >> > anything real yet, but it is still missing all the basics such as >> > Object or Array. So I doubt it will be of much use, unless I set up >> > another environment to import from that contains all the Kernel, >> > Collections etc. classes. But this does not feel right, as there >> > already is such an environment: Smalltalk globals... >> > >> > In the post from 2012 for which Chris posted the link, Colin linked an >> > image (and luckily, he has not removed it from his webspace since >> > then) from which I could grab the browser opening snippet. It is >> > simply >> > >> > Browser fullOnClass: aClassDefinedInAnotherEnvironment >> > >> > ...which in my case gives me a browser for the global environment >> > instead, because the "renamed" classes stem from there, of course. >> > >> > Frank's post also has another snippet to browse an environment: >> > >> > b := Browser new >> > selectEnvironment: anEnvironment; >> > yourself. >> > Browser openBrowserView: (b openEditString: nil) label: b >> > defaultBrowserTitle >> > >> > But it seems like the browser will only show an environment's own >> > contents, not the imported classes. Hence, I do not see anything in my >> > environments so far. If my assumption is correct, there is no way to >> > see the imported classes under their new names in the browser. >> > >> > When I try to define a new class using my empty browser on my >> > environment, it goes back into Smalltalk globals and puts the class >> > there instead. It also does that in Colin's old image, so I guess >> > defining classes in environments is not supported that way. >> > >> > More elaborate tools are probably required to easily see what is going >> > on, without exploring the Environments implementation in parallel. >> > >> > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013- >> December/175519.html >> > >> > >> > 2016-09-23 11:59 GMT+02:00 Tobias Pape : >> >> Hi Colin, >> >> >> >> do you have an idea here? >> >> >> >> Best regards >> >> -Tobias >> > >> > 2016-09-16 18:27 GMT+02:00 Chris Cunnington : >> >>>Can I get a system browser for my environment (where saving a method >> >>>compiles it with the environment bindings in place)? >> >> >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012- >> June/164605.html >> >> >> >> Chris >> > >> >> >> >> On 16.09.2016, at 14:50, Jakob Reschke >> wrote: >> >> >> >>> Hello, >> >>> >> >>> I am having a look at Environments, but have not yet figured out, how >> >>> to operate them. I would like to create a new environment with an >> >>> additional binding for an existing class under another name, and load >> >>> a package in that new environment. >> >>> >> >>> The most of a documentation I have found is >> http://wiki.squeak.org/squeak/6220 >> >>> and I have tried the following so far: >> >>> >> >>> testenv := Environment named: #TestEnv1. >> >>> testenv import: Smalltalk globals. >> >>> testenv from: Smalltalk globals import: { #String -> #MyString }. >> >>> testenv importSelf. >> >>> testenv exportSelf. >> >>> >> >>> However, testenv valueOf: #MyString or testenv valueOf: #String both >> >>> return nil instead of the String class. Does it mean that the >> >>> from:import: did not work? It seems to only add a policy to my >> >>> environment, but no declarations or bindings. >> >>> >> >>> For evaluating something in context of the environment, I have found >> >>> the EnvironmentLoader, but it does not seem to recognize the >> >>> additional binding either: >> >>> >> >>> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil >> >>> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil >> >>> >> >>> (at least the import of the original globals seems to have worked). >> >>> >> >>> What steps am I missing? >> >>> >> >>> Also it is not very convenient to make up strings of code everytime I >> >>> want to do something in the other environment, is there a better way? >> >>> Can I get a system browser for my environment (where saving a method >> >>> compiles it with the environment bindings in place)? >> >>> >> >>> Best regards, >> >>> Jakob >> >>> >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/ef999489/attachment.htm From nicolas.cellier.aka.nice at gmail.com Wed Sep 28 20:29:40 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 28 20:29:43 2016 Subject: [squeak-dev] Environment declarations vs bindings Message-ID: Since we are at reviewing Environment, here is a small detail that bothers me. I already asked some months ago, but silence was the only response, so ping. Implementation of Environment is sometimes not obvious: - Environment>>associationAt: uses declarations inst.var.. - Environment>>associationOrUndeclaredAt: uses bindings inst.var. How can it be so different, the selector does not speak, does it? OK, there is a flag: #review in one of them, but that does not make code clearer, it's just a smell of over-complexity or ill-naming. Whatever the reason (self explaining code?) Colin does not comment class/methods, that's a fact. Chris made the effort of commenting Environment but then came this declarations/bindings split, and the comment did rapidly rot. We have here an un-healthy statu quo crying for change. So if we want to at least comment the class with the meaning/role/responsibility of inst vars, here is my understanding: environment bind: #Foo to: 0. just add to the declarations. (You see how names are not obvious: bind does not bind the new binding to bindings). If the Environment importSelf, then the ClassBinding/Global also goes to bindings... (thru an observer pattern and the magic of naming policies) The bindings is what is used by the compiler, so what if an environment does not importSelf? It means that the variable it declares are not bound, so it is not reachable (kind of invisible class/Global). IOW, the bindings will contain all the imports, including self-imports. importSelf is generally what we want to do, unless weird cases of powerless environment for obfuscation or trustless sandboxing reason. Now, associationAt: does not speak for itself. It's too hard to decide if we're speaking of own declarations or bindings... Analyzing the usage is difficult. bindingAt: would be less ambiguous, so IMO we cannot fix without semantic shift. The semantic will be carried by the senders (the Tools), and the tools by usage we want to make of Environment. So we first have to define that: what feature do we want to support? With which tool? That probably require yet another thread... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/c0321e69/attachment.htm From nicolas.cellier.aka.nice at gmail.com Wed Sep 28 21:02:30 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed Sep 28 21:02:33 2016 Subject: [squeak-dev] What are environments for Message-ID: Environment carry great promise and potential... But for now, it's only that. I recently read "let's fix environments". +1 too to that generous idea. But what does it mean? Without clear goals or vision, fixing could essentially mean "let Environment be transparent", that is let it remain a promise, a potential, whithout too many side effects... Not exactly YAGNI, just a bit of over-engineered nice piece of code that might serve later. OK this sounds like a mandatory first step. But then, what feature are we after? I have read bootstrapping, sandboxing, letting concurrent packages and/or versions co-exist, stop prefixing class names with pseudo namespace... So environment are about reducing global variable scope. For me, the essential decisions are in these questions: - how will environments and source-code-management interfere? - how are we going to specify reproducible artifacts (images)? Are we going to use environment "statically" like in VW, just like namespaces are in many languages? That somehow means that the SCM will have to be environment aware. Or are we going to transfer this responsibility at a higher level, like Metacello for example? In this later case, we have greater flexibility, but assembling an image means telling which package is installed into which environment, then which import are necessary for each environment. But it's even more complex than that, because the way we create classes: by subclassing another class. So we don't need one environment, we need at least two, one source environment for picking the super class, one destination environment for hosting the subclass. Hmm, the metacello configuration is going to be verbose... OK, OK, but how would we designate an environment in the configuration, is it by name in a sort of Environment registry? All this is strongly related to Newspeak mechanisms for contructing a module, http://bracha.org/newspeak-modules.pdf. Newspeak was conceived with solid foundations. Can we reach a solid design by small iterations? Will we converge to the same economy of concepts? I just wonder, or should I say wander? That's very interesting. So who has a vision? No urge to asnwer this, let's rather make environment transparent ;) Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/04b9893d/attachment.htm From anonymous4.anonymous2 at gmail.com Wed Sep 28 21:03:38 2016 From: anonymous4.anonymous2 at gmail.com (Gary Mary) Date: Wed Sep 28 21:03:41 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: Message-ID: Protecting the environment is very important. It is made up of the very air we breathe, as well as the things which we eat. I would love to answer some of your questions about bothersome details, so ping. For starters, the implementation of the environment in our lives couldn't be more obvious. Like, you literally walk outside and it's like trees and water and ducks and the Taco Bell down the street and it's like: "Woah dude. I'm alive." It's the same thing for us every day. I don't know how it could be less different, and I don't believe in natural selection, it speaks for itself, and it's pretty wild. On another note, I read a book the other day while I was in school. It was called: "Sus." It went: "Sus." I felt pretty inspired so I went home from school and wrote a story called: "Sus." It went: "Sussowssaucesoossiissooososousususoes...s..." I sent it into the paper, still havent heard anything from the editor but I'll let you know how it goes. Nice hearing from you Nicolas! Sincerely Gary Mary On Wed, Sep 28, 2016 at 5:59 PM, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > Since we are at reviewing Environment, here is a small detail that bothers > me. I already asked some months ago, but silence was the only response, so > ping. > > Implementation of Environment is sometimes not obvious: > - Environment>>associationAt: uses declarations inst.var.. > - Environment>>associationOrUndeclaredAt: uses bindings inst.var. > How can it be so different, the selector does not speak, does it? > > OK, there is a flag: #review in one of them, but that does not make code > clearer, it's just a smell of over-complexity or ill-naming. > > Whatever the reason (self explaining code?) Colin does not comment > class/methods, that's a fact. > Chris made the effort of commenting Environment but then came this > declarations/bindings split, and the comment did rapidly rot. > We have here an un-healthy statu quo crying for change. > > So if we want to at least comment the class with the > meaning/role/responsibility of inst vars, here is my understanding: > > environment bind: #Foo to: 0. just add to the declarations. > (You see how names are not obvious: bind does not bind the new binding to > bindings). > > If the Environment importSelf, then the ClassBinding/Global also goes to > bindings... (thru an observer pattern and the magic of naming policies) > > The bindings is what is used by the compiler, so what if an environment > does not importSelf? It means that the variable it declares are not bound, > so it is not reachable (kind of invisible class/Global). > > IOW, the bindings will contain all the imports, including self-imports. > importSelf is generally what we want to do, unless weird cases of > powerless environment for obfuscation or trustless sandboxing reason. > > Now, associationAt: does not speak for itself. It's too hard to decide if > we're speaking of own declarations or bindings... Analyzing the usage is > difficult. bindingAt: would be less ambiguous, so IMO we cannot fix without > semantic shift. > > The semantic will be carried by the senders (the Tools), and the tools by > usage we want to make of Environment. So we first have to define that: what > feature do we want to support? With which tool? That probably require yet > another thread... > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160928/b1943319/attachment.htm From commits at source.squeak.org Wed Sep 28 21:55:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Sep 28 21:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160928215504.31396.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068972.html Name: EToys-tfel.257 Ancestors: EToys-tfel.256 make Kedama worlds copyable, by forcing it to always copy also its patches and turtles, and fixing up the deep copying so these players are copied correctly and their scripts are also recompiled correctly. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068973.html Name: EToys-tfel.258 Ancestors: EToys-tfel.257 - Fix for duplicating KedamaMorphs with non-visible patches or turtles - be careful not to loose top level projects when deleting projects through the etoys history morph - setTurtleCount: on a vector player should go to the exampler player ============================================= From jakob.reschke at student.hpi.de Wed Sep 28 22:58:14 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Wed Sep 28 22:58:39 2016 Subject: [squeak-dev] What are environments for In-Reply-To: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> References: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Hi Nicolas, First, thank you for answering me in the other thread. 2016-09-28 23:02 GMT+02:00 Nicolas Cellier : > Without clear goals or vision, fixing could essentially mean "let > Environment be transparent", that is let it remain a promise, a potential, > whithout too many side effects... Not exactly YAGNI, just a bit of > over-engineered nice piece of code that might serve later. OK this sounds > like a mandatory first step. I don't quite get what you mean by transparent, other than fixing it and enhancing the documentation to shed some light on what it is, why it is there and how to use it. > But then, what feature are we after? > I have read bootstrapping, sandboxing, letting concurrent packages and/or > versions co-exist, stop prefixing class names with pseudo namespace... > So environment are about reducing global variable scope. > > For me, the essential decisions are in these questions: > - how will environments and source-code-management interfere? > - how are we going to specify reproducible artifacts (images)? > > Are we going to use environment "statically" like in VW, just like > namespaces are in many languages? That somehow means that the SCM will have > to be environment aware. > > Or are we going to transfer this responsibility at a higher level, like > Metacello for example? In this later case, we have greater flexibility, but > assembling an image means telling which package is installed into which > environment, then which import are necessary for each environment. It depends on whether you look at Environments as a developer's tool (like, e. g., Java packages) or an operator's/administrator's tool (like, e. g., Docker containers, maybe). In this discrimination developers can also be operators while they gather the dependencies for their projects, for example. Treating them as an operator's tool, I could imagine to create a new environment for every "Squeak app" you want to deploy in a production image. Installing that app via Metacello or the Squeak Map could (optionally?) create such an environment, isolating its dependencies (and their particular versions) from other apps in that image. Alternatively, you could install that app or library package into an existing environment that you must specify then. But I do not consider myself an operator, so I might be off conventional paths here... Another thing I have in mind is running a new test case against many older versions of a package (and its dependencies?) to find out which version introduced a regression, without changing the "main" environment each time when another version is checked out. Imagine you would want to do this with the Kernel or Collections package. I would want "throwaway" environments for this. My current naive use case is to hide from a Pharo package that I want to get going in Squeak the fact that in Pharo some classes have been renamed. I just want to make the older Squeak classes available under their changed names, without really renaming the classes themselves and without doing a big search&replace in the client package. This is probably bound to fail, because the interface has probably changed as well, but a generalization of this would be compatibility-, adapter- or emulation environments. > But it's even more complex than that, because the way we create classes: by > subclassing another class. So we don't need one environment, we need at > least two, one source environment for picking the super class, one > destination environment for hosting the subclass. Hmm, the metacello > configuration is going to be verbose... > OK, OK, but how would we designate an environment in the configuration, is > it by name in a sort of Environment registry? Currently, Environments can be retrieved by name, or you have a reference to an Environment object (and treat it as anonymous). In the operations mindframe from above, I would not want a Metacello baseline or whatever to specify its environments. This configuration would only belong to the particular image you want to build. You could still put this configuration as a script into another package, of course... On the other hand, if packages started to abandon class name prefixes, being "agnostic" to environments in your package might not be feasible in some cases, when you have to do renames to resolve naming conflicts. I look forward to hearing other opinions. > All this is strongly related to Newspeak mechanisms for contructing a > module, http://bracha.org/newspeak-modules.pdf. Newspeak was conceived with > solid foundations. Can we reach a solid design by small iterations? Will we > converge to the same economy of concepts? I just wonder, or should I say > wander? > > That's very interesting. So who has a vision? > No urge to asnwer this, let's rather make environment transparent ;) > > Nicolas > Best regards, Jakob From hannes.hirzel at gmail.com Thu Sep 29 05:33:35 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 05:33:38 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: Message-ID: On 9/28/16, Nicolas Cellier wrote: > Since we are at reviewing Environment, here is a small detail that bothers > me. I already asked some months ago, but silence was the only response, so > ping. > > Implementation of Environment is sometimes not obvious: > - Environment>>associationAt: uses declarations inst.var.. > - Environment>>associationOrUndeclaredAt: uses bindings inst.var. > How can it be so different, the selector does not speak, does it? > > OK, there is a flag: #review in one of them, but that does not make code > clearer, it's just a smell of over-complexity or ill-naming. > > Whatever the reason (self explaining code?) Colin does not comment > class/methods, that's a fact. Alternatively a description of the general ideas and the mechanism would help. After all Environments is just a clever combination of a few dictionaries to look up class names? Isn't it? ;-) However the fact that people did not move on much finalising the implementation of environments since 2012 shows that it is hard to reverse-engineer the intentions from the (incomplete) code. > Chris made the effort of commenting Environment but then came this > declarations/bindings split, and the comment did rapidly rot. > We have here an un-healthy statu quo crying for change. > > So if we want to at least comment the class with the > meaning/role/responsibility of inst vars, here is my understanding: > > environment bind: #Foo to: 0. just add to the declarations. > (You see how names are not obvious: bind does not bind the new binding to > bindings). Environments bind: aSymbol to: anObject | binding newBinding | newBinding := aSymbol => anObject. binding := declarations associationAt: aSymbol ifAbsent: [nil]. binding ifNotNil: [binding class == newBinding class ifTrue: [binding value: anObject] ifFalse: [binding becomeForward: newBinding]. ^anObject]. binding := undeclared associationAt: aSymbol ifAbsent: [nil]. binding ifNil: [binding := newBinding] ifNotNil: [undeclared removeKey: aSymbol. binding class == newBinding class ifTrue: [binding value: anObject] ifFalse: [binding becomeForward: newBinding]]. declarations add: binding. self binding: binding addedTo: self. ^anObject Could you elaborate a bit please? > If the Environment importSelf, then the ClassBinding/Global also goes to > bindings... (thru an observer pattern and the magic of naming policies) > > The bindings is what is used by the compiler, so what if an environment > does not importSelf? It means that the variable it declares are not bound, > so it is not reachable (kind of invisible class/Global). > > IOW, the bindings will contain all the imports, including self-imports. > importSelf is generally what we want to do, unless weird cases of powerless > environment for obfuscation or trustless sandboxing reason. > > Now, associationAt: does not speak for itself. It's too hard to decide if > we're speaking of own declarations or bindings... Analyzing the usage is > difficult. bindingAt: would be less ambiguous, so IMO we cannot fix without > semantic shift. This would need as well elaboration as well a separate thread. > The semantic will be carried by the senders (the Tools), and the tools by > usage we want to make of Environment. So we first have to define that: what > feature do we want to support? With which tool? That probably require yet > another thread... Yes --Hannes From hannes.hirzel at gmail.com Thu Sep 29 05:51:23 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 05:51:27 2016 Subject: [squeak-dev] What are environments for In-Reply-To: References: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 9/29/16, Jakob Reschke wrote: > Hi Nicolas, > > First, thank you for answering me in the other thread. > > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > : >> Without clear goals or vision, fixing could essentially mean "let >> Environment be transparent", that is let it remain a promise, a >> potential, >> whithout too many side effects... Not exactly YAGNI, just a bit of >> over-engineered nice piece of code that might serve later. OK this sounds >> like a mandatory first step. > > I don't quite get what you mean by transparent, other than fixing it > and enhancing the documentation to shed some light on what it is, why > it is there and how to use it. > >> But then, what feature are we after? >> I have read bootstrapping, sandboxing, letting concurrent packages and/or >> versions co-exist, stop prefixing class names with pseudo namespace... >> So environment are about reducing global variable scope. >> >> For me, the essential decisions are in these questions: >> - how will environments and source-code-management interfere? >> - how are we going to specify reproducible artifacts (images)? >> >> Are we going to use environment "statically" like in VW, just like >> namespaces are in many languages? That somehow means that the SCM will >> have >> to be environment aware. >> >> Or are we going to transfer this responsibility at a higher level, like >> Metacello for example? In this later case, we have greater flexibility, >> but >> assembling an image means telling which package is installed into which >> environment, then which import are necessary for each environment. > > It depends on whether you look at Environments as a developer's tool > (like, e. g., Java packages) or an operator's/administrator's tool > (like, e. g., Docker containers, maybe). In this discrimination > developers can also be operators while they gather the dependencies > for their projects, for example. > > Treating them as an operator's tool, I could imagine to create a new > environment for every "Squeak app" you want to deploy in a production > image. Installing that app via Metacello or the Squeak Map could > (optionally?) create such an environment, isolating its dependencies > (and their particular versions) from other apps in that image. > Alternatively, you could install that app or library package into an > existing environment that you must specify then. But I do not consider > myself an operator, so I might be off conventional paths here... > > Another thing I have in mind is running a new test case against many > older versions of a package (and its dependencies?) to find out which > version introduced a regression, without changing the "main" > environment each time when another version is checked out. Imagine you > would want to do this with the Kernel or Collections package. I would > want "throwaway" environments for this. > > My current naive use case is to hide from a Pharo package that I want > to get going in Squeak the fact that in Pharo some classes have been > renamed. I just want to make the older Squeak classes available under > their changed names, without really renaming the classes themselves > and without doing a big search&replace in the client package. This is > probably bound to fail, because the interface has probably changed as > well, but a generalization of this would be compatibility-, adapter- > or emulation environments. Another maybe simple use case could be to have a project specific environment set up when you enter a project (http://wiki.squeak.org/squeak/1020). We now have very nicely cleaned up Project code in Squeak 5.1 1) Subclass MorphicProject --- MyMorphicProject 2) Subclass PasteUpMorph --- MyPasteUpMorph 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph 4) ... some more adaptations ..... to enter a new Environment -- how? >> But it's even more complex than that, because the way we create classes: >> by >> subclassing another class. So we don't need one environment, we need at >> least two, one source environment for picking the super class, one >> destination environment for hosting the subclass. Hmm, the metacello >> configuration is going to be verbose... >> OK, OK, but how would we designate an environment in the configuration, >> is >> it by name in a sort of Environment registry? > > Currently, Environments can be retrieved by name, or you have a > reference to an Environment object (and treat it as anonymous). In the > operations mindframe from above, I would not want a Metacello baseline > or whatever to specify its environments. This configuration would only > belong to the particular image you want to build. You could still put > this configuration as a script into another package, of course... > > On the other hand, if packages started to abandon class name prefixes, > being "agnostic" to environments in your package might not be feasible > in some cases, when you have to do renames to resolve naming > conflicts. > > I look forward to hearing other opinions. > >> All this is strongly related to Newspeak mechanisms for contructing a >> module, http://bracha.org/newspeak-modules.pdf. Newspeak was conceived >> with >> solid foundations. Can we reach a solid design by small iterations? Will >> we >> converge to the same economy of concepts? I just wonder, or should I say >> wander? >> >> That's very interesting. So who has a vision? >> No urge to asnwer this, let's rather make environment transparent ;) >> >> Nicolas >> > > Best regards, > Jakob > > From Das.Linux at gmx.de Thu Sep 29 06:28:58 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Sep 29 06:28:59 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <00624466-B24F-45DE-8DC4-04A53094827F@gmx.de> On 28.09.2016, at 17:51, Nicolas Cellier wrote: > > > 2016-09-28 11:17 GMT+02:00 Jakob Reschke : > Let me repeat my question which might have gone unnoticed in my > previous wall of text: > > Why doesn't the global environment (Smalltalk globals) export anything > by default? Is there a reason at all, or was it simply forgotten at > some point (because "nobody uses Environments" anyway)? > > > It's a bug. > Currently, the Environment SUnit tests only work because of strange name scope resolution: > we use the environment of superclass in that resolution with no good reason. > Since ProtoObject/Object are in the class hierarchy, we have undue access to Smalltalk globals. > > See below some changes rotting for too long in squeak inbox. > > IMO, we should evaluate 'Smalltalk exportSelf' in environment package post actions, then apply the fix below. +1 Because why not? Environments seem currently strangely unusable. Fixing them can be great :) > > > ---------------------------- > > > http://source.squeak.org/inbox/Kernel-nice.798.diff > > ---------------------------- > > Name: Kernel-nice.798 > Author: nice > Time: 30 July 2013, 10:34:15.34 pm > UUID: e02ae597-3f6d-40b9-9468-bf01416db6de > Ancestors: Kernel-nice.797 > > Better fix for http://bugs.squeak.org/view.php?id=1554 > A class variable defined in a superclass should take precedence over a global variable. > > First look in local class variables. > Then look in local sharedPools (a local sharedPool will shadow a super class variable, that sounds fair). > Then look in superclass pools. > When superclass chain is exhausted, look in the Environment that were provided as parameter. > > Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: (or st-80), except that anEvironment parameter replaces Smalltalk. > This way we avoid duplicate lookup of previous workaround. > And we never ever look in superclass environment, that's not necessarily ours. > > This currently breaks some EnvironmentTest because inheriting superclass environment is a cheap and easy way to import all Smalltalk (unless you are not an Object or ProtoObject of course). > The longest and proper way would be to properly export some symbols from Smalltalk globals, and import them explicitely in the tested environment. > > > Alternatively: Are there downsides of `Smalltalk globals exportSelf` > other than that you have to do it yourself in current Squeak images? > > 2016-09-23 17:28 GMT+02:00 Jakob Reschke : > > In the meantime, I figured out that the Smalltalk globals environment > > does not export anything. Hence, nothing can be imported from it by > > default. > > > > Further, I found this post [1] by Frank Shearar, which contains a > > snippet to load a package into an environment (however, > > EnvironmentRequest has been renamed to CurrentEnvironment since then). > > He also proposes `Smalltalk globals exportSelf` there, to let the > > global environment export its contents, which could be one way to > > solve my first problem. > > > > I am unsure how this is intended to be used; what is the reason for > > not letting the global environment export anything by default? After > > all, you have to start somewhere... To attempt an alternative, I > > created a fresh environment for the classes that I want to import > > later under other names like so: > > > > fsenv := Environment named: #FileSystem. > > fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: []. > > fspackage classes do: [:ea | fsenv bind: ea name to: ea ] > > fsenv importSelf. > > fsenv exportSelf. > > testenv := Environment named: #TestEnv1. > > testenv importSelf. > > testenv exportSelf. > > testenv import: fsenv removingPrefix: 'FS'. > > testenv valueOf: #Filesystem "=> FSFilesystem" > > > > Now I can use testenv valueOf: #Filesystem to retrieve the > > FSFilesystem class, so far so good. I have not used my testenv for > > anything real yet, but it is still missing all the basics such as > > Object or Array. So I doubt it will be of much use, unless I set up > > another environment to import from that contains all the Kernel, > > Collections etc. classes. But this does not feel right, as there > > already is such an environment: Smalltalk globals... > > > > In the post from 2012 for which Chris posted the link, Colin linked an > > image (and luckily, he has not removed it from his webspace since > > then) from which I could grab the browser opening snippet. It is > > simply > > > > Browser fullOnClass: aClassDefinedInAnotherEnvironment > > > > ...which in my case gives me a browser for the global environment > > instead, because the "renamed" classes stem from there, of course. > > > > Frank's post also has another snippet to browse an environment: > > > > b := Browser new > > selectEnvironment: anEnvironment; > > yourself. > > Browser openBrowserView: (b openEditString: nil) label: b > > defaultBrowserTitle > > > > But it seems like the browser will only show an environment's own > > contents, not the imported classes. Hence, I do not see anything in my > > environments so far. If my assumption is correct, there is no way to > > see the imported classes under their new names in the browser. > > > > When I try to define a new class using my empty browser on my > > environment, it goes back into Smalltalk globals and puts the class > > there instead. It also does that in Colin's old image, so I guess > > defining classes in environments is not supported that way. > > > > More elaborate tools are probably required to easily see what is going > > on, without exploring the Environments implementation in parallel. > > > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-December/175519.html > > > > > > 2016-09-23 11:59 GMT+02:00 Tobias Pape : > >> Hi Colin, > >> > >> do you have an idea here? > >> > >> Best regards > >> -Tobias > > > > 2016-09-16 18:27 GMT+02:00 Chris Cunnington : > >>>Can I get a system browser for my environment (where saving a method > >>>compiles it with the environment bindings in place)? > >> > >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012-June/164605.html > >> > >> Chris > > > >> > >> On 16.09.2016, at 14:50, Jakob Reschke wrote: > >> > >>> Hello, > >>> > >>> I am having a look at Environments, but have not yet figured out, how > >>> to operate them. I would like to create a new environment with an > >>> additional binding for an existing class under another name, and load > >>> a package in that new environment. > >>> > >>> The most of a documentation I have found is http://wiki.squeak.org/squeak/6220 > >>> and I have tried the following so far: > >>> > >>> testenv := Environment named: #TestEnv1. > >>> testenv import: Smalltalk globals. > >>> testenv from: Smalltalk globals import: { #String -> #MyString }. > >>> testenv importSelf. > >>> testenv exportSelf. > >>> > >>> However, testenv valueOf: #MyString or testenv valueOf: #String both > >>> return nil instead of the String class. Does it mean that the > >>> from:import: did not work? It seems to only add a policy to my > >>> environment, but no declarations or bindings. > >>> > >>> For evaluating something in context of the environment, I have found > >>> the EnvironmentLoader, but it does not seem to recognize the > >>> additional binding either: > >>> > >>> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil > >>> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil > >>> > >>> (at least the import of the original globals seems to have worked). > >>> > >>> What steps am I missing? > >>> > >>> Also it is not very convenient to make up strings of code everytime I > >>> want to do something in the other environment, is there a better way? > >>> Can I get a system browser for my environment (where saving a method > >>> compiles it with the environment bindings in place)? > >>> > >>> Best regards, > >>> Jakob > >>> > >> > > > From squeaklist at gmail.com Thu Sep 29 07:44:48 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Thu Sep 29 07:44:53 2016 Subject: [squeak-dev] How to use Environments? In-Reply-To: <00624466-B24F-45DE-8DC4-04A53094827F@gmx.de> References: <18557fb67b17479c811866a4f3ebb30f@MX2015-DAG2.hpi.uni-potsdam.de> <00624466-B24F-45DE-8DC4-04A53094827F@gmx.de> Message-ID: +1 On Wednesday, September 28, 2016, Tobias Pape wrote: > > On 28.09.2016, at 17:51, Nicolas Cellier < > nicolas.cellier.aka.nice@gmail.com > wrote: > > > > > > > 2016-09-28 11:17 GMT+02:00 Jakob Reschke >: > > Let me repeat my question which might have gone unnoticed in my > > previous wall of text: > > > > Why doesn't the global environment (Smalltalk globals) export anything > > by default? Is there a reason at all, or was it simply forgotten at > > some point (because "nobody uses Environments" anyway)? > > > > > > It's a bug. > > Currently, the Environment SUnit tests only work because of strange name > scope resolution: > > we use the environment of superclass in that resolution with no good > reason. > > Since ProtoObject/Object are in the class hierarchy, we have undue > access to Smalltalk globals. > > > > See below some changes rotting for too long in squeak inbox. > > > > IMO, we should evaluate 'Smalltalk exportSelf' in environment package > post actions, then apply the fix below. > > +1 > Because why not? Environments seem currently strangely unusable. Fixing > them can be great :) > > > > > > > ---------------------------- > > > > > > http://source.squeak.org/inbox/Kernel-nice.798.diff > > > > ---------------------------- > > > > Name: Kernel-nice.798 > > Author: nice > > Time: 30 July 2013, 10:34:15.34 pm > > UUID: e02ae597-3f6d-40b9-9468-bf01416db6de > > Ancestors: Kernel-nice.797 > > > > Better fix for http://bugs.squeak.org/view.php?id=1554 > > A class variable defined in a superclass should take precedence over a > global variable. > > > > First look in local class variables. > > Then look in local sharedPools (a local sharedPool will shadow a super > class variable, that sounds fair). > > Then look in superclass pools. > > When superclass chain is exhausted, look in the Environment that were > provided as parameter. > > > > Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: > (or st-80), except that anEvironment parameter replaces Smalltalk. > > This way we avoid duplicate lookup of previous workaround. > > And we never ever look in superclass environment, that's not necessarily > ours. > > > > This currently breaks some EnvironmentTest because inheriting superclass > environment is a cheap and easy way to import all Smalltalk (unless you > are not an Object or ProtoObject of course). > > The longest and proper way would be to properly export some symbols from > Smalltalk globals, and import them explicitely in the tested environment. > > > > > > Alternatively: Are there downsides of `Smalltalk globals exportSelf` > > other than that you have to do it yourself in current Squeak images? > > > > 2016-09-23 17:28 GMT+02:00 Jakob Reschke >: > > > In the meantime, I figured out that the Smalltalk globals environment > > > does not export anything. Hence, nothing can be imported from it by > > > default. > > > > > > Further, I found this post [1] by Frank Shearar, which contains a > > > snippet to load a package into an environment (however, > > > EnvironmentRequest has been renamed to CurrentEnvironment since then). > > > He also proposes `Smalltalk globals exportSelf` there, to let the > > > global environment export its contents, which could be one way to > > > solve my first problem. > > > > > > I am unsure how this is intended to be used; what is the reason for > > > not letting the global environment export anything by default? After > > > all, you have to start somewhere... To attempt an alternative, I > > > created a fresh environment for the classes that I want to import > > > later under other names like so: > > > > > > fsenv := Environment named: #FileSystem. > > > fspackage := PackageOrganizer default packageNamed: 'FS' ifAbsent: > []. > > > fspackage classes do: [:ea | fsenv bind: ea name to: ea ] > > > fsenv importSelf. > > > fsenv exportSelf. > > > testenv := Environment named: #TestEnv1. > > > testenv importSelf. > > > testenv exportSelf. > > > testenv import: fsenv removingPrefix: 'FS'. > > > testenv valueOf: #Filesystem "=> FSFilesystem" > > > > > > Now I can use testenv valueOf: #Filesystem to retrieve the > > > FSFilesystem class, so far so good. I have not used my testenv for > > > anything real yet, but it is still missing all the basics such as > > > Object or Array. So I doubt it will be of much use, unless I set up > > > another environment to import from that contains all the Kernel, > > > Collections etc. classes. But this does not feel right, as there > > > already is such an environment: Smalltalk globals... > > > > > > In the post from 2012 for which Chris posted the link, Colin linked an > > > image (and luckily, he has not removed it from his webspace since > > > then) from which I could grab the browser opening snippet. It is > > > simply > > > > > > Browser fullOnClass: aClassDefinedInAnotherEnvironment > > > > > > ...which in my case gives me a browser for the global environment > > > instead, because the "renamed" classes stem from there, of course. > > > > > > Frank's post also has another snippet to browse an environment: > > > > > > b := Browser new > > > selectEnvironment: anEnvironment; > > > yourself. > > > Browser openBrowserView: (b openEditString: nil) label: b > > > defaultBrowserTitle > > > > > > But it seems like the browser will only show an environment's own > > > contents, not the imported classes. Hence, I do not see anything in my > > > environments so far. If my assumption is correct, there is no way to > > > see the imported classes under their new names in the browser. > > > > > > When I try to define a new class using my empty browser on my > > > environment, it goes back into Smalltalk globals and puts the class > > > there instead. It also does that in Colin's old image, so I guess > > > defining classes in environments is not supported that way. > > > > > > More elaborate tools are probably required to easily see what is going > > > on, without exploring the Environments implementation in parallel. > > > > > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2013- > December/175519.html > > > > > > > > > 2016-09-23 11:59 GMT+02:00 Tobias Pape >: > > >> Hi Colin, > > >> > > >> do you have an idea here? > > >> > > >> Best regards > > >> -Tobias > > > > > > 2016-09-16 18:27 GMT+02:00 Chris Cunnington >: > > >>>Can I get a system browser for my environment (where saving a method > > >>>compiles it with the environment bindings in place)? > > >> > > >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2012- > June/164605.html > > >> > > >> Chris > > > > > >> > > >> On 16.09.2016, at 14:50, Jakob Reschke > wrote: > > >> > > >>> Hello, > > >>> > > >>> I am having a look at Environments, but have not yet figured out, how > > >>> to operate them. I would like to create a new environment with an > > >>> additional binding for an existing class under another name, and load > > >>> a package in that new environment. > > >>> > > >>> The most of a documentation I have found is > http://wiki.squeak.org/squeak/6220 > > >>> and I have tried the following so far: > > >>> > > >>> testenv := Environment named: #TestEnv1. > > >>> testenv import: Smalltalk globals. > > >>> testenv from: Smalltalk globals import: { #String -> #MyString }. > > >>> testenv importSelf. > > >>> testenv exportSelf. > > >>> > > >>> However, testenv valueOf: #MyString or testenv valueOf: #String both > > >>> return nil instead of the String class. Does it mean that the > > >>> from:import: did not work? It seems to only add a policy to my > > >>> environment, but no declarations or bindings. > > >>> > > >>> For evaluating something in context of the environment, I have found > > >>> the EnvironmentLoader, but it does not seem to recognize the > > >>> additional binding either: > > >>> > > >>> (EnvironmentLoader for: testenv) evaluate: 'MyString'. => nil > > >>> (EnvironmentLoader for: testenv) evaluate: 'String'. => nil > > >>> > > >>> (at least the import of the original globals seems to have worked). > > >>> > > >>> What steps am I missing? > > >>> > > >>> Also it is not very convenient to make up strings of code everytime I > > >>> want to do something in the other environment, is there a better way? > > >>> Can I get a system browser for my environment (where saving a method > > >>> compiles it with the environment bindings in place)? > > >>> > > >>> Best regards, > > >>> Jakob > > >>> > > >> > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/ad891ba3/attachment-0001.htm From commits at source.squeak.org Thu Sep 29 08:12:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 08:12:42 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.259.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.259.mcz ==================== Summary ==================== Name: EToys-tfel.259 Author: tfel Time: 29 September 2016, 10:11:59.109594 am UUID: 2f475582-bfa8-48fa-a9eb-362252d134ef Ancestors: EToys-tfel.258 Another fix for copying Kedama, KedamaPatches need to reference the copy of their world, too, if that was copied. =============== Diff against EToys-tfel.258 =============== Item was added: + ----- Method: KedamaPatchMorph>>veryDeepFixupWith: (in category 'copying') ----- + veryDeepFixupWith: deepCopier + + super veryDeepFixupWith: deepCopier. + kedamaWorld := deepCopier references at: kedamaWorld ifAbsent: [kedamaWorld].! Item was changed: + ----- Method: KedamaPatchMorph>>veryDeepInner: (in category 'copying') ----- - ----- Method: KedamaPatchMorph>>veryDeepInner: (in category 'as yet unclassified') ----- veryDeepInner: deepCopier "the state of a Kedama patch is held in its forms, so we need to " form := form deepCopy. displayForm := displayForm deepCopy. tmpForm := tmpForm deepCopy. super veryDeepInner: deepCopier.! From commits at source.squeak.org Thu Sep 29 08:13:47 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 08:13:48 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.798.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.798.mcz ==================== Summary ==================== Name: Kernel-nice.798 Author: nice Time: 30 July 2013, 10:34:15.34 pm UUID: e02ae597-3f6d-40b9-9468-bf01416db6de Ancestors: Kernel-nice.797 Better fix for http://bugs.squeak.org/view.php?id=1554 A class variable defined in a superclass should take precedence over a global variable. First look in local class variables. Then look in local sharedPools (a local sharedPool will shadow a super class variable, that sounds fair). Then look in superclass pools. When superclass chain is exhausted, look in the Environment that were provided as parameter. Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: (or st-80), except that anEvironment parameter replaces Smalltalk. This way we avoid duplicate lookup of previous workaround. And we never ever look in superclass environment, that's not necessarily ours. This currently breaks some EnvironmentTest because inheriting superclass environment is a cheap and easy way to import all Smalltalk (unless you are not an Object or ProtoObject of course). The longest and proper way would be to properly export some symbols from Smalltalk globals, and import them explicitely in the tested environment. =============== Diff against Kernel-nice.797 =============== Item was changed: ----- Method: Class>>bindingOf:environment: (in category 'compiling') ----- bindingOf: varName environment: anEnvironment "Answer the binding of some variable resolved in the scope of the receiver" | aSymbol binding | aSymbol := varName asSymbol. + "First look in local classVar dictionary." + binding := self classPool bindingOf: aSymbol. + binding ifNotNil:[^binding]. - "First look in classVar dictionary." - (self classThatDefinesClassVariable: aSymbol) ifNotNil: - [:x | ^x classPool bindingOf: aSymbol]. + "Next look in local shared pools." - "Next look in shared pools." self sharedPools do:[:pool | binding := pool bindingOf: aSymbol. binding ifNotNil:[^binding]. ]. + "Next look into superclass pools" + superclass ifNotNil: [^ superclass bindingOf: aSymbol environment: anEnvironment]. + + "No more superclass... Last look in declared environment." + ^anEnvironment bindingOf: aSymbol - "Next look in declared environment." - binding := anEnvironment bindingOf: aSymbol. - binding ifNotNil:[^binding]. - "Finally look higher up the superclass chain and fail at the end." - superclass == nil - ifTrue: [^ nil] - ifFalse: [^ superclass bindingOf: aSymbol]. - ! From commits at source.squeak.org Thu Sep 29 08:18:58 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 08:19:00 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1042.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1042.mcz ==================== Summary ==================== Name: Kernel-nice.1042 Author: nice Time: 29 September 2016, 10:15:16.009388 am UUID: 8923b113-72cf-414e-802c-cef7c50f8ad1 Ancestors: Kernel-tfel.1041, Kernel-nice.798 Merge Kernel-nice.798 (variable scope fix, don't resolve name in superclass environment) Reminder: this requires some Smalltalk exportSelf. =============== Diff against Kernel-tfel.1041 =============== Item was changed: ----- Method: Class>>bindingOf:environment: (in category 'compiling') ----- bindingOf: varName environment: anEnvironment "Answer the binding of some variable resolved in the scope of the receiver" | aSymbol binding | aSymbol := varName asSymbol. + "First look in local classVar dictionary." + binding := self classPool bindingOf: aSymbol. + binding ifNotNil:[^binding]. - "First look in classVar dictionary." - (self classThatDefinesClassVariable: aSymbol) ifNotNil: - [:x | ^x classPool bindingOf: aSymbol]. + "Next look in local shared pools." - "Next look in shared pools." self sharedPools do:[:pool | binding := pool bindingOf: aSymbol. binding ifNotNil:[^binding]. ]. + "Next look into superclass pools" + superclass ifNotNil: [^ superclass bindingOf: aSymbol environment: anEnvironment]. + + "No more superclass... Last look in declared environment." + ^anEnvironment bindingOf: aSymbol - "Next look in declared environment." - binding := anEnvironment bindingOf: aSymbol. - binding ifNotNil:[^binding]. - "Finally look higher up the superclass chain and fail at the end." - superclass == nil - ifTrue: [^ nil] - ifFalse: [^ superclass bindingOf: aSymbol]. - ! From commits at source.squeak.org Thu Sep 29 08:33:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 08:33:26 2016 Subject: [squeak-dev] The Trunk: Environments-nice.63.mcz Message-ID: Nicolas Cellier uploaded a new version of Environments to project The Trunk: http://source.squeak.org/trunk/Environments-nice.63.mcz ==================== Summary ==================== Name: Environments-nice.63 Author: nice Time: 29 September 2016, 10:29:59.273388 am UUID: 1c6b29fd-c218-034b-8059-2a4e231109d4 Ancestors: Environments-mt.62 Update the class comment of Environment to match current instance variable list. Update the postscript to export Smalltalk bindings. =============== Diff against Environments-mt.62 =============== Item was changed: Object subclass: #Environment instanceVariableNames: 'info declarations bindings undeclared policies observers' classVariableNames: 'Default Instances' poolDictionaries: '' category: 'Environments-Core'! + !Environment commentStamp: 'nice 9/29/2016 10:27' prior: 0! - !Environment commentStamp: 'cmm 12/20/2013 14:10' prior: 0! I am a context for compiling methods. I maintain the namespace of classes and global variables that are visible to the methods compiled within me. I have the following instance variables: info Metadata about me and the code I contain. - imports - Rules for importing globals from other environments. - - exports - Rules for exposing globals to other environments. - declarations + Bindings for class and other globals that have been declared inside me. - Bindings for globals that have been declared inside me. + bindings + Bindings for all the class and global variables visible from the compiler. + It generally includes the declarations (see importSelf), plus other imports from other environments, including aliases. - references - Bindings for globals that are used by methods compiled inside me. + policies + The list of rules for importing and exporting bindings to other environments. - public - Bindings for classes that have been declared inside me, and which satisfy the export rules contain in 'exports'. + observers + These are the environments importing some bindings from self, and which should be notified whenever we add/remove/change some binding. + ! - undeclared - Bindings for globals that are used by methods compiled inside me, but which aren't present in 'references' and couldn't be found via the rules in 'imports'.! Item was changed: + (PackageInfo named: 'Environments') postscript: '"It''s impossible to import a binding if not exported. + There''s nothing secret in Smalltalk (nor private)." + Smalltalk exportSelf. - (PackageInfo named: 'Environments') postscript: '"Recompile all methods to fix errant bindings" - Compiler recompileAll. '! From commits at source.squeak.org Thu Sep 29 08:45:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 08:45:19 2016 Subject: [squeak-dev] The Trunk: Environments-nice.64.mcz Message-ID: Nicolas Cellier uploaded a new version of Environments to project The Trunk: http://source.squeak.org/trunk/Environments-nice.64.mcz ==================== Summary ==================== Name: Environments-nice.64 Author: nice Time: 29 September 2016, 10:41:52.190388 am UUID: 607ee3c4-cc23-ff46-9f28-edddf2118760 Ancestors: Environments-nice.63 Fix the postscript: it's Smalltalk globals that should be exported... Note: Environment stack policies without testing if they already exist, so there's a big danger to exportmore than once! There might be undesired side effects (notifying more than once?) =============== Diff against Environments-nice.63 =============== Item was changed: (PackageInfo named: 'Environments') postscript: '"It''s impossible to import a binding if not exported. There''s nothing secret in Smalltalk (nor private)." + Smalltalk globals exportSelf. - Smalltalk exportSelf. '! From commits at source.squeak.org Thu Sep 29 10:11:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 10:11:07 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.260.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.260.mcz ==================== Summary ==================== Name: EToys-tfel.260 Author: tfel Time: 29 September 2016, 12:10:17.056594 pm UUID: eddd1b98-0a8e-4a23-b671-287897615d1b Ancestors: EToys-tfel.259 for performance, write sexp on DataStream =============== Diff against EToys-tfel.259 =============== Item was changed: ----- Method: Project>>writeForExportInSexp:withSources:inDirectory:changeSet: (in category '*Etoys-Squeakland-file in/out') ----- writeForExportInSexp: sexp withSources: actualName inDirectory: aDirectory changeSet: aChangeSetOrNil | fileStream tempFileName zipper | tempFileName := aDirectory nextNameFor: 'SqProject' extension: 'temp'. zipper := [ aDirectory rename: tempFileName toBe: actualName. aDirectory deleteFileNamed: tempFileName ifAbsent: [] ]. + aDirectory forceNewFileNamed: tempFileName do: [:f | + f binary; + nextPutAll: ((DataStream on: (WriteStream on: (ByteArray new: sexp elements size * 50))) + nextPut: sexp; + contents)]. - fileStream := aDirectory newFileNamed: tempFileName. - sexp printOn: fileStream. - fileStream close. fileStream := aDirectory newFileNamed: 'changes.cs'. aChangeSetOrNil ifNotNil: [aChangeSetOrNil fileOutOn: fileStream]. fileStream close. zipper value.! Item was changed: ----- Method: ProjectLoading class>>loadSexpProjectDict:stream:fromDirectory:withProjectView: (in category '*etoys') ----- loadSexpProjectDict: dict stream: preStream fromDirectory: aDirectoryOrNil withProjectView: existingView + | archive anObject newProj d member memberStream members newSet allNames realName oldSet s | - | archive anObject newProj d member b s memberStream members newSet allNames realName oldSet | (self checkStream: preStream) ifTrue: [^ nil]. ProgressNotification signal: '0.2'. preStream reset. archive := preStream isZipArchive ifTrue:[ZipArchive new readFrom: preStream] ifFalse:[nil]. members := archive membersMatching: '*.cs'. members do: [:e | newSet := ChangeSorter newChangesFromStream: e contentStream named: 'zzTemp', Time totalSeconds printString]. member := (archive membersMatching: '*.sexp') first. memberStream := member contentStream. (self checkSecurity: member name preStream: preStream projStream: memberStream) ifFalse: [^nil]. + self flag: #tfel. "load all projects and save them again in the new format, then get rid of the error block!!" - b := String new: member uncompressedSize. s := memberStream basicUpToEnd. + d := [(DataStream on: memberStream) next] on: Error do: [:e | + (Smalltalk at: #MSExpParser) parse: s with: #ksexp]. - d := (Smalltalk at: #MSExpParser) parse: s with: #ksexp. anObject := d sissReadObjectsAsEtoysProject. preStream close. "anObject := (MSExpParser parse: (archive membersMatching: '*.sexp') first contents with: #ksexp) sissReadObjects." anObject ifNil: [^ nil]. (anObject isKindOf: PasteUpMorph) ifFalse: [^ World addMorph: anObject]. ProgressNotification signal: '0.7'. newProj := MorphicProject new. newProj installPasteUpAsWorld: anObject. newSet ifNotNil: [oldSet := newProj changeSet. newProj setChangeSet: newSet. ChangeSorter removeChangeSet: oldSet]. dict at: 'projectname' ifPresent: [:n | allNames := Project allNames. realName := Utilities keyLike: n satisfying: [:nn | (allNames includes: nn) not]. newProj renameTo: realName. ]. anObject valueOfProperty: #projectVersion ifPresentDo: [:v | newProj version: v]. newProj noteManifestDetailsIn: dict. ProgressNotification signal: '0.8'. ^ newProj.! Item was changed: ----- Method: SugarNavigatorBar>>loadASexp (in category 'button actions') ----- loadASexp | file siss sexp | file := FileList2 modalFileSelectorForSuffixes: #('sexp'). file ifNil: [^ self]. + file binary. siss := file contents. + sexp := [(DataStream on: (file reset; yourself)) next] on: Error do: [:e | + (Smalltalk at: #MSExpParser) parse: siss with: #ksexp]. - file close. - sexp := (Smalltalk at: #MSExpParser) parse: siss with: #ksexp. sexp sissReadObjectsAsEtoysProject submorphs do: #openInWorld. ! Item was changed: ----- Method: SugarNavigatorBar>>publishSexp (in category 'button actions') ----- publishSexp | morphs siss tempPasteUp directory fileModel window prevSubmorphs | self world paintBoxOrNil ifNotNil: [ self inform: 'You seem to be painting a sketch. You should finish or cancel your painting first' translated. ^ self]. tempPasteUp := PasteUpMorph new bounds: (self world bounds); openInWorld; yourself. morphs := self world submorphs select: [:m | (m player notNil and: [m player externalName ~= 'dot']) or: [m isKindOf: ScriptEditorMorph]]. prevSubmorphs := self world submorphs. tempPasteUp addAllMorphs: morphs. siss := tempPasteUp sissScanObjectsAsEtoysProject. tempPasteUp delete. self world addAllMorphs: prevSubmorphs. window := FileList2 morphicViewProjectSaverFor: Project current. (window findDeepSubmorphThat: [:m | m eventHandler notNil and: [m eventHandler mouseUpSelector = #saveLocalOnlyHit]] ifAbsent: []) ifNotNil: [:m | m delete]. fileModel := window valueOfProperty: #FileList. self world addMorphInLayer: window. self world startSteppingSubmorphsOf: window. FileList2 modalLoopOn: window. directory := fileModel getSelectedDirectory withoutListWrapper. directory ifNil: [^ self]. + directory forceNewFileNamed: (Project current name, '.sexp') do: [:f | + f binary; + nextPutAll: ((DataStream on: (WriteStream on: (ByteArray new: siss elements size * 50))) + nextPut: siss; + contents)]. - directory forceNewFileNamed: (Project current name, '.sexp') do: [:f | siss printOn: f]. ! From commits at source.squeak.org Thu Sep 29 12:01:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 12:01:02 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.261.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.261.mcz ==================== Summary ==================== Name: EToys-tfel.261 Author: tfel Time: 29 September 2016, 2:00:18.299594 pm UUID: b41c90b3-754a-452e-add4-3637e2be7a97 Ancestors: EToys-tfel.260 make ScriptableButtons hold on to their own action scripts, rather than their enclosing paste up morph. Otherwise the button action changes when I drop it in a different world! =============== Diff against EToys-tfel.260 =============== Item was removed: - ----- Method: ButtonProperties>>editButtonsScript: (in category 'events') ----- - editButtonsScript: evt - "The user has touched my Scriptor halo-handle. Bring up a Scriptor on the script of the button." - - | cardsPasteUp cardsPlayer anEditor scriptSelector | - - cardsPasteUp := self pasteUpMorph. - (cardsPlayer := cardsPasteUp assuredPlayer) assureUniClass. - scriptSelector := self figureOutScriptSelector. - scriptSelector ifNil: [ - scriptSelector := cardsPasteUp scriptSelectorToTriggerFor: self. - anEditor := cardsPlayer newTextualScriptorFor: scriptSelector. - evt hand attachMorph: anEditor. - ^self - ]. - - (cardsPlayer class includesSelector: scriptSelector) ifTrue: [ - anEditor := cardsPlayer scriptEditorFor: scriptSelector. - evt hand attachMorph: anEditor. - ^self - ]. - "Method somehow got removed; I guess we start aftresh" - scriptSelector := nil. - ^ self editButtonsScript! Item was removed: - ----- Method: PasteUpMorph>>scriptSelectorToTriggerFor: (in category '*Etoys-viewing') ----- - scriptSelectorToTriggerFor: aButtonMorph - "Answer a new selector which will bear the code for aButtonMorph in the receiver" - - | buttonName selectorName | - buttonName := aButtonMorph externalName. - selectorName := self assuredPlayer acceptableScriptNameFrom: buttonName forScriptCurrentlyNamed: nil. - - buttonName ~= selectorName ifTrue: - [aButtonMorph setNameTo: selectorName]. - ^ selectorName! Item was changed: ----- Method: ScriptableButton>>doButtonAction (in category 'button') ----- doButtonAction "The user has pressed the button. Dispatch to the actual user script, if any." scriptSelector ifNil: [^ super doButtonAction]. + self player performScriptIfCan: scriptSelector! - self pasteUpMorph player performScriptIfCan: scriptSelector! Item was changed: ----- Method: ScriptableButton>>editButtonsScript (in category 'script') ----- editButtonsScript "The user has touched my Scriptor halo-handle. Bring up a Scriptor on the script of the button." + | anEditor player | + (player := self assuredPlayer) assureUniClass. - | cardsPasteUp cardsPlayer anEditor | - cardsPasteUp := self pasteUpMorph. - (cardsPlayer := cardsPasteUp assuredPlayer) assureUniClass. anEditor := scriptSelector ifNil: + [scriptSelector := self scriptSelectorToTriggerForMe. + player newTextualScriptorFor: scriptSelector. + player scriptEditorFor: scriptSelector] - [scriptSelector := cardsPasteUp scriptSelectorToTriggerFor: self. - cardsPlayer newTextualScriptorFor: scriptSelector. - cardsPlayer scriptEditorFor: scriptSelector - ] ifNotNil: + [(player class selectors includes: scriptSelector) + ifTrue: [player scriptEditorFor: scriptSelector] - [(cardsPlayer class selectors includes: scriptSelector) - ifTrue: [cardsPlayer scriptEditorFor: scriptSelector] ifFalse: ["Method somehow got removed; I guess we start afresh" - scriptSelector := nil. + ^ self editButtonsScript]]. - ^self editButtonsScript]]. anEditor showingMethodPane ifTrue: [anEditor toggleWhetherShowingTiles]. self currentHand attachMorph: anEditor! Item was added: + ----- Method: ScriptableButton>>scriptSelectorToTriggerForMe (in category 'accessing') ----- + scriptSelectorToTriggerForMe + "Answer a new selector which will bear the code for myself" + + | buttonName selectorName | + buttonName := self externalName. + selectorName := self assuredPlayer acceptableScriptNameFrom: buttonName forScriptCurrentlyNamed: nil. + + buttonName ~= selectorName ifTrue: + [self setNameTo: selectorName]. + ^ selectorName! From commits at source.squeak.org Thu Sep 29 12:14:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 12:14:09 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.262.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.262.mcz ==================== Summary ==================== Name: EToys-tfel.262 Author: tfel Time: 29 September 2016, 2:13:27.526594 pm UUID: ec1649f4-3c03-415c-89d4-504ffe9be9a1 Ancestors: EToys-tfel.261 remove a transcript show that was triggered often during compilation of kedama scripts =============== Diff against EToys-tfel.261 =============== Item was changed: ----- Method: KedamaAttributeEvaluator>>evaluateOccurence: (in category 'private') ----- evaluateOccurence: occurence "pick the attribute from the occurence at parseNode." "check the dependency for that occurence." "if they are not evaluated, recursively call itself with new arguments." "if all the values are evaluated, #perform: the registered method with these values." | ret n args realArgs | n := occurence node. args := ReadStream on: (occurence dependencies collect: [:oc | oc value]). realArgs := Array new: 0. occurence inputSizes do: [:s | s isCollection ifTrue: [ realArgs := realArgs copyWith: (args next: (s at: 1)). ] ifFalse: [ realArgs := realArgs copyWith: args next. ]. ]. (n = parseTree and: [occurence selectedRule selector = #rcvr]) ifTrue: [ ret := receiver ] ifFalse: [ ret := n perform: occurence selectedRule selector withArguments: realArgs. ]. Debug == true ifTrue: [ Transcript show: n printString, ' ', occurence selectedRule selector, ' ', args printString, ' ', realArgs printString, ' ', ret printString; cr. ]. - ret ifNil: [Transcript show: occurence printString; cr]. occurence value: ret. ! From lewis at mail.msen.com Thu Sep 29 12:37:53 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Sep 29 12:37:55 2016 Subject: [squeak-dev] What are environments for In-Reply-To: References: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <20160929123753.GD22150@shell.msen.com> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: > On 9/29/16, Jakob Reschke wrote: > > Hi Nicolas, > > > > First, thank you for answering me in the other thread. > > > > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > > : > >> Without clear goals or vision, fixing could essentially mean "let > >> Environment be transparent", that is let it remain a promise, a > >> potential, > >> whithout too many side effects... Not exactly YAGNI, just a bit of > >> over-engineered nice piece of code that might serve later. OK this sounds > >> like a mandatory first step. > > > > I don't quite get what you mean by transparent, other than fixing it > > and enhancing the documentation to shed some light on what it is, why > > it is there and how to use it. > > > >> But then, what feature are we after? > >> I have read bootstrapping, sandboxing, letting concurrent packages and/or > >> versions co-exist, stop prefixing class names with pseudo namespace... > >> So environment are about reducing global variable scope. > >> > >> For me, the essential decisions are in these questions: > >> - how will environments and source-code-management interfere? > >> - how are we going to specify reproducible artifacts (images)? > >> > >> Are we going to use environment "statically" like in VW, just like > >> namespaces are in many languages? That somehow means that the SCM will > >> have > >> to be environment aware. > >> > >> Or are we going to transfer this responsibility at a higher level, like > >> Metacello for example? In this later case, we have greater flexibility, > >> but > >> assembling an image means telling which package is installed into which > >> environment, then which import are necessary for each environment. > > > > It depends on whether you look at Environments as a developer's tool > > (like, e. g., Java packages) or an operator's/administrator's tool > > (like, e. g., Docker containers, maybe). In this discrimination > > developers can also be operators while they gather the dependencies > > for their projects, for example. > > > > Treating them as an operator's tool, I could imagine to create a new > > environment for every "Squeak app" you want to deploy in a production > > image. Installing that app via Metacello or the Squeak Map could > > (optionally?) create such an environment, isolating its dependencies > > (and their particular versions) from other apps in that image. > > Alternatively, you could install that app or library package into an > > existing environment that you must specify then. But I do not consider > > myself an operator, so I might be off conventional paths here... > > > > Another thing I have in mind is running a new test case against many > > older versions of a package (and its dependencies?) to find out which > > version introduced a regression, without changing the "main" > > environment each time when another version is checked out. Imagine you > > would want to do this with the Kernel or Collections package. I would > > want "throwaway" environments for this. > > > > My current naive use case is to hide from a Pharo package that I want > > to get going in Squeak the fact that in Pharo some classes have been > > renamed. I just want to make the older Squeak classes available under > > their changed names, without really renaming the classes themselves > > and without doing a big search&replace in the client package. This is > > probably bound to fail, because the interface has probably changed as > > well, but a generalization of this would be compatibility-, adapter- > > or emulation environments. > > Another maybe simple use case could be to have a project specific > environment set up when you enter a project > (http://wiki.squeak.org/squeak/1020). > > We now have very nicely cleaned up Project code in Squeak 5.1 > > 1) Subclass MorphicProject --- MyMorphicProject > 2) Subclass PasteUpMorph --- MyPasteUpMorph > 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph > 4) ... some more adaptations ..... to enter a new Environment -- how? > I like this idea a lot. I would love to see a simple "hello world!" level example of Environments. If someone could make an EnvironmentsDemoProject that opens a new project with something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', I think it might really help me to understand how to use Environments. Dave From jakob.reschke at student.hpi.de Thu Sep 29 13:01:29 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Sep 29 13:01:54 2016 Subject: [squeak-dev] What are environments for In-Reply-To: References: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: I don't know if this would be quicker to implement than a Project type, but at the moment I would appreciate a simple Workspace that evaluates everything in a specific Environment. Projects would be far more useful to actually write code in another Environment, of course. 2016-09-29 14:37 GMT+02:00 David T. Lewis : > On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >> On 9/29/16, Jakob Reschke wrote: >> > Hi Nicolas, >> > >> > First, thank you for answering me in the other thread. >> > >> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >> > : >> >> Without clear goals or vision, fixing could essentially mean "let >> >> Environment be transparent", that is let it remain a promise, a >> >> potential, >> >> whithout too many side effects... Not exactly YAGNI, just a bit of >> >> over-engineered nice piece of code that might serve later. OK this sounds >> >> like a mandatory first step. >> > >> > I don't quite get what you mean by transparent, other than fixing it >> > and enhancing the documentation to shed some light on what it is, why >> > it is there and how to use it. >> > >> >> But then, what feature are we after? >> >> I have read bootstrapping, sandboxing, letting concurrent packages and/or >> >> versions co-exist, stop prefixing class names with pseudo namespace... >> >> So environment are about reducing global variable scope. >> >> >> >> For me, the essential decisions are in these questions: >> >> - how will environments and source-code-management interfere? >> >> - how are we going to specify reproducible artifacts (images)? >> >> >> >> Are we going to use environment "statically" like in VW, just like >> >> namespaces are in many languages? That somehow means that the SCM will >> >> have >> >> to be environment aware. >> >> >> >> Or are we going to transfer this responsibility at a higher level, like >> >> Metacello for example? In this later case, we have greater flexibility, >> >> but >> >> assembling an image means telling which package is installed into which >> >> environment, then which import are necessary for each environment. >> > >> > It depends on whether you look at Environments as a developer's tool >> > (like, e. g., Java packages) or an operator's/administrator's tool >> > (like, e. g., Docker containers, maybe). In this discrimination >> > developers can also be operators while they gather the dependencies >> > for their projects, for example. >> > >> > Treating them as an operator's tool, I could imagine to create a new >> > environment for every "Squeak app" you want to deploy in a production >> > image. Installing that app via Metacello or the Squeak Map could >> > (optionally?) create such an environment, isolating its dependencies >> > (and their particular versions) from other apps in that image. >> > Alternatively, you could install that app or library package into an >> > existing environment that you must specify then. But I do not consider >> > myself an operator, so I might be off conventional paths here... >> > >> > Another thing I have in mind is running a new test case against many >> > older versions of a package (and its dependencies?) to find out which >> > version introduced a regression, without changing the "main" >> > environment each time when another version is checked out. Imagine you >> > would want to do this with the Kernel or Collections package. I would >> > want "throwaway" environments for this. >> > >> > My current naive use case is to hide from a Pharo package that I want >> > to get going in Squeak the fact that in Pharo some classes have been >> > renamed. I just want to make the older Squeak classes available under >> > their changed names, without really renaming the classes themselves >> > and without doing a big search&replace in the client package. This is >> > probably bound to fail, because the interface has probably changed as >> > well, but a generalization of this would be compatibility-, adapter- >> > or emulation environments. >> >> Another maybe simple use case could be to have a project specific >> environment set up when you enter a project >> (http://wiki.squeak.org/squeak/1020). >> >> We now have very nicely cleaned up Project code in Squeak 5.1 >> >> 1) Subclass MorphicProject --- MyMorphicProject >> 2) Subclass PasteUpMorph --- MyPasteUpMorph >> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >> 4) ... some more adaptations ..... to enter a new Environment -- how? >> > > I like this idea a lot. > > I would love to see a simple "hello world!" level example of Environments. > If someone could make an EnvironmentsDemoProject that opens a new project with > something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', > I think it might really help me to understand how to use Environments. > > Dave > > From jakob.reschke at student.hpi.de Thu Sep 29 13:15:47 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Sep 29 13:16:13 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Hi, Environment>>associationAt: is part of the Smalltalk globals Dictionary compatibility interface, right? As a quick and dirty fix, I changed instances of Smalltalk at: xyz in Monticello code to CurrentEnvironment signal at: xyz, but #at: also only reads in the declarations, so myEnvironment at: #MCWriter or myEnvironment at: #Object returns nil by default. It would make more sense to perform a full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't it? Best, Jakob 2016-09-29 7:33 GMT+02:00 H. Hirzel : > On 9/28/16, Nicolas Cellier wrote: >> Since we are at reviewing Environment, here is a small detail that bothers >> me. I already asked some months ago, but silence was the only response, so >> ping. >> >> Implementation of Environment is sometimes not obvious: >> - Environment>>associationAt: uses declarations inst.var.. >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >> How can it be so different, the selector does not speak, does it? >> >> OK, there is a flag: #review in one of them, but that does not make code >> clearer, it's just a smell of over-complexity or ill-naming. >> >> Whatever the reason (self explaining code?) Colin does not comment >> class/methods, that's a fact. > > Alternatively a description of the general ideas and the mechanism would help. > > After all Environments is just a clever combination of a few > dictionaries to look up class names? Isn't it? ;-) > > However the fact that people did not move on much finalising the > implementation of environments since 2012 shows that it is hard to > reverse-engineer the intentions from the (incomplete) code. > > > > > >> Chris made the effort of commenting Environment but then came this >> declarations/bindings split, and the comment did rapidly rot. >> We have here an un-healthy statu quo crying for change. >> >> So if we want to at least comment the class with the >> meaning/role/responsibility of inst vars, here is my understanding: >> >> environment bind: #Foo to: 0. just add to the declarations. >> (You see how names are not obvious: bind does not bind the new binding to >> bindings). > > Environments > > bind: aSymbol to: anObject > | binding newBinding | > newBinding := aSymbol => anObject. > > binding := declarations associationAt: aSymbol ifAbsent: [nil]. > binding ifNotNil: > [binding class == newBinding class > ifTrue: [binding value: anObject] > ifFalse: [binding becomeForward: newBinding]. > ^anObject]. > > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. > binding > ifNil: [binding := newBinding] > ifNotNil: > [undeclared removeKey: aSymbol. > binding class == newBinding class > ifTrue: [binding value: anObject] > ifFalse: [binding becomeForward: newBinding]]. > > declarations add: binding. > self binding: binding addedTo: self. > ^anObject > > > Could you elaborate a bit please? > > > > >> If the Environment importSelf, then the ClassBinding/Global also goes to >> bindings... (thru an observer pattern and the magic of naming policies) >> >> The bindings is what is used by the compiler, so what if an environment >> does not importSelf? It means that the variable it declares are not bound, >> so it is not reachable (kind of invisible class/Global). >> >> IOW, the bindings will contain all the imports, including self-imports. >> importSelf is generally what we want to do, unless weird cases of powerless >> environment for obfuscation or trustless sandboxing reason. >> >> Now, associationAt: does not speak for itself. It's too hard to decide if >> we're speaking of own declarations or bindings... Analyzing the usage is >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix without >> semantic shift. > > This would need as well elaboration as well a separate thread. > > >> The semantic will be carried by the senders (the Tools), and the tools by >> usage we want to make of Environment. So we first have to define that: what >> feature do we want to support? With which tool? That probably require yet >> another thread... > > Yes > > --Hannes > From commits at source.squeak.org Thu Sep 29 14:08:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 14:08:18 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.263.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.263.mcz ==================== Summary ==================== Name: EToys-tfel.263 Author: tfel Time: 29 September 2016, 4:07:37.715594 pm UUID: 951255bb-c387-4df7-8044-181017752b52 Ancestors: EToys-tfel.262 - remove two obsolete methods - forward sendLog to the Debugger =============== Diff against EToys-tfel.262 =============== Item was removed: - ----- Method: FillInTheBlankMorph>>createQueryTextMorph: (in category '*Etoys-Squeakland-initialization') ----- - createQueryTextMorph: queryString - "create the queryTextMorph" - | r | - r := TextMorph new newContents: queryString. - r setNameTo: 'query' translated. - r font: Preferences standardMenuFont. - r releaseParagraphReally. - r fillStyle: ScriptingSystem baseColor. - r centered. - r lock. - r hResizing: #spaceFill. - ^ r! Item was removed: - ----- Method: FillInTheBlankMorph>>createTextPaneAcceptBoolean: (in category '*Etoys-Squeakland-initialization') ----- - createTextPaneAcceptBoolean: acceptBoolean - "create the textPane" - | r | - r := PluggableTextMorph - on: self - text: #response - accept: #response: - readSelection: #selectionInterval - menu: #codePaneMenu:shifted:. - r hResizing: #spaceFill; - vResizing: #spaceFill. - r borderWidth: 1. - r borderColor: Preferences menuBorderColor. - r hasUnacceptedEdits: true. - r acceptOnCR: acceptBoolean. - r setNameTo: 'textPane'. - r font: Preferences standardMenuFont. - r hideScrollBarsIndefinitely. - r selectionInterval: nil. - r selectAll. - ^ r! Item was added: + ----- Method: PreDebugWindow>>sendLog (in category 'as yet unclassified') ----- + sendLog + model storeLog; sendLog.! From commits at source.squeak.org Thu Sep 29 14:09:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 14:09:53 2016 Subject: [squeak-dev] The Trunk: Morphic-tfel.1311.mcz Message-ID: Tim Felgentreff uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-tfel.1311.mcz ==================== Summary ==================== Name: Morphic-tfel.1311 Author: tfel Time: 29 September 2016, 4:09:12.249594 pm UUID: 11d7f211-8f95-4d7d-86d6-854150acb550 Ancestors: Morphic-tfel.1310 - scroll to top if the FillInTheBlankMorph has a lot of text - translate the title string of FillInTheBlankMorph =============== Diff against Morphic-tfel.1310 =============== Item was changed: ----- Method: FillInTheBlankMorph>>createTextPaneAcceptOnCR: (in category 'initialization') ----- createTextPaneAcceptOnCR: acceptBoolean textPane := PluggableTextMorph on: self text: #response accept: #response: readSelection: #selectionInterval menu: #codePaneMenu:shifted:. textPane showScrollBarsOnlyWhenNeeded; wantsFrameAdornments: false; hasUnacceptedEdits: true; acceptOnCR: acceptBoolean; setNameTo: 'textPane'; layoutFrame: (LayoutFrame fractions: (0@0 corner: 1@1)); hResizing: #spaceFill; + vResizing: #spaceFill; + scrollToTop. - vResizing: #spaceFill. - ^ textPane! Item was changed: ----- Method: FillInTheBlankMorph>>setQuery:initialAnswer:answerExtent:acceptOnCR: (in category 'initialization') ----- setQuery: queryString initialAnswer: initialAnswer answerExtent: answerExtent acceptOnCR: acceptBoolean | text | result := initialAnswer. done := false. self paneMorph removeAllMorphs. + self title: 'Input Requested' translated. - self title: 'Input Requested'. self message: queryString. text := self createTextPaneAcceptOnCR: acceptBoolean. self paneMorph addMorphBack: text. self paneMorph wantsPaneSplitters: true; addCornerGrips. self paneMorph grips do: [:ea | ea drawCornerResizeHandles: true]. self paneMorph extent: ((initialAnswer asText asMorph extent + (20@10) max: answerExtent) min: 500@500). self setDefaultParameters.! From commits at source.squeak.org Thu Sep 29 14:47:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 14:47:31 2016 Subject: [squeak-dev] The Trunk: Tools-tfel.729.mcz Message-ID: Tim Felgentreff uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-tfel.729.mcz ==================== Summary ==================== Name: Tools-tfel.729 Author: tfel Time: 29 September 2016, 4:47:02.790594 pm UUID: 9b62c088-e527-4b8b-aa12-58517f3ec58e Ancestors: Tools-tfel.728 When the system is set to eToyFriendly, the debugger previously offered to store the log of the error in a text file. To help with keeping track of problems for the people who use Etoys, add some facility so we can offer to send error reports to a server set in a preference. =============== Diff against Tools-tfel.728 =============== Item was changed: CodeHolder subclass: #Debugger instanceVariableNames: 'interruptedProcess interruptedController contextStack contextStackIndex contextStackList receiverInspector contextVariablesInspector externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject errorWasInUIProcess labelString message untilExpression' + classVariableNames: 'ContextStackKeystrokes ErrorRecursion ErrorReportServer InterruptUIProcessIfBlockedOnErrorInBackgroundProcess WantsAnnotationPane' - classVariableNames: 'ContextStackKeystrokes ErrorRecursion InterruptUIProcessIfBlockedOnErrorInBackgroundProcess WantsAnnotationPane' poolDictionaries: '' category: 'Tools-Debugger'! !Debugger commentStamp: '' prior: 0! I represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context. Special note on recursive errors: Some errors affect Squeak's ability to present a debugger. This is normally an unrecoverable situation. However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger. Here is the chain of events in such a recovery. * A recursive error is detected. * The current project is queried for an isolationHead * Changes in the isolationHead are revoked * The parent project of isolated project is returned to * The debugger is opened there and execution resumes. If the user closes that debugger, execution continues in the outer project and layer. If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. ! Item was added: + ----- Method: Debugger class>>errorReportServer (in category 'preferences') ----- + errorReportServer + + ^ErrorReportServer ifNil: ['']! Item was added: + ----- Method: Debugger class>>errorReportServer: (in category 'preferences') ----- + errorReportServer: aString + + ErrorReportServer := aString! Item was changed: ----- Method: Debugger>>preDebugButtonQuads (in category 'initialize') ----- preDebugButtonQuads ^Preferences eToyFriendly ifTrue: [ { + {'Send error report' translated. #sendReport. #blue. 'send a report of the encountered problem to the Squeak developers' translated}. - {'Store log' translated. #storeLog. #blue. 'write a log of the encountered problem' translated}. {'Abandon' translated. #abandon. #black. 'abandon this execution by closing this window' translated}. {'Debug' translated. #debug. #red. 'bring up a debugger' translated}}] ifFalse: [ { {'Proceed' translated. #proceed. #blue. 'continue execution' translated}. {'Abandon' translated. #abandon. #black. 'abandon this execution by closing this window' translated}. {'Debug' translated. #debug. #red. 'bring up a debugger' translated}}] ! Item was changed: ----- Method: Debugger>>preDebugMessageString (in category 'toolbuilder') ----- preDebugMessageString + ^ message ifNil: [ + String streamContents: [:s | + s nextPutAll: 'An error has occurred, sorry!! You could send the Squeak developers an error report or just hit ''Abandon''. + + In the error report, there is no personal information, only information that we can use to investigate the error. If you decide to send us the error report, it will include the following text: + + ' translated. + [s nextPutAll: self contextStackTop printString; cr. + self contextStackTop errorReportOn: s] on: Error do: [s nextPutAll: 'no text, there was an error creating the error report' translated]]].! - ^ message ifNil: ['An error has occurred; you should probably just hit ''abandon''. Sorry!!' translated].! Item was added: + ----- Method: Debugger>>sendReport (in category 'notifier menu') ----- + sendReport + [| errorReport | + errorReport := String streamContents: [:s | + s nextPutAll: self contextStackTop printString; cr. + self contextStackTop errorReportOn: s]. + (Smalltalk classNamed: #WebClient) + ifNotNil: [:wc | + wc + httpPost: self class errorReportServer + content: errorReport + type: 'text/plain']] on: Error do: ["nothing"]. + self abandon.! From commits at source.squeak.org Thu Sep 29 14:54:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 14:54:39 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.264.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.264.mcz ==================== Summary ==================== Name: EToys-tfel.264 Author: tfel Time: 29 September 2016, 4:53:52.684594 pm UUID: 9d15add9-79e2-4777-9f0b-d2acefe870ed Ancestors: EToys-tfel.263 renamed sendLog to sendReport =============== Diff against EToys-tfel.263 =============== Item was removed: - ----- Method: PreDebugWindow>>sendLog (in category 'as yet unclassified') ----- - sendLog - model storeLog; sendLog.! Item was added: + ----- Method: PreDebugWindow>>sendReport (in category 'as yet unclassified') ----- + sendReport + model storeLog; sendReport.! From nicolas.cellier.aka.nice at gmail.com Thu Sep 29 15:30:13 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Sep 29 15:30:17 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-09-29 15:15 GMT+02:00 Jakob Reschke : > Hi, > > Environment>>associationAt: is part of the Smalltalk globals > Dictionary compatibility interface, right? As a quick and dirty fix, I > changed instances of Smalltalk at: xyz in Monticello code to > CurrentEnvironment signal at: xyz, but #at: also only reads in the > declarations, so myEnvironment at: #MCWriter or myEnvironment at: > #Object returns nil by default. It would make more sense to perform a > full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't > it? > > Best, > Jakob > > I imagine that the question is about tools. For now Smalltalk importSelf, so bindings and declarations do agree. If an Environment does not importSelf, then some variables will be invisibles (unbounds). Do we still want to see them in some tool, or not? What's going on if we play with Alias? Do we want to see the Alias in some browser? If not, then we'd better stick with declarations. There is no easy solution. A single facade for two dictionaries cannot fit all, so we need several different messages. But it's much about what we want to do with those environments. > 2016-09-29 7:33 GMT+02:00 H. Hirzel : > > On 9/28/16, Nicolas Cellier wrote: > >> Since we are at reviewing Environment, here is a small detail that > bothers > >> me. I already asked some months ago, but silence was the only response, > so > >> ping. > >> > >> Implementation of Environment is sometimes not obvious: > >> - Environment>>associationAt: uses declarations inst.var.. > >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. > >> How can it be so different, the selector does not speak, does it? > >> > >> OK, there is a flag: #review in one of them, but that does not make code > >> clearer, it's just a smell of over-complexity or ill-naming. > >> > >> Whatever the reason (self explaining code?) Colin does not comment > >> class/methods, that's a fact. > > > > Alternatively a description of the general ideas and the mechanism would > help. > > > > After all Environments is just a clever combination of a few > > dictionaries to look up class names? Isn't it? ;-) > > > > However the fact that people did not move on much finalising the > > implementation of environments since 2012 shows that it is hard to > > reverse-engineer the intentions from the (incomplete) code. > > > > > > > > > > > >> Chris made the effort of commenting Environment but then came this > >> declarations/bindings split, and the comment did rapidly rot. > >> We have here an un-healthy statu quo crying for change. > >> > >> So if we want to at least comment the class with the > >> meaning/role/responsibility of inst vars, here is my understanding: > >> > >> environment bind: #Foo to: 0. just add to the declarations. > >> (You see how names are not obvious: bind does not bind the new binding > to > >> bindings). > > > > Environments > > > > bind: aSymbol to: anObject > > | binding newBinding | > > newBinding := aSymbol => anObject. > > > > binding := declarations associationAt: aSymbol ifAbsent: [nil]. > > binding ifNotNil: > > [binding class == newBinding class > > ifTrue: [binding value: anObject] > > ifFalse: [binding becomeForward: newBinding]. > > ^anObject]. > > > > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. > > binding > > ifNil: [binding := newBinding] > > ifNotNil: > > [undeclared removeKey: aSymbol. > > binding class == newBinding class > > ifTrue: [binding value: anObject] > > ifFalse: [binding becomeForward: > newBinding]]. > > > > declarations add: binding. > > self binding: binding addedTo: self. > > ^anObject > > > > > > Could you elaborate a bit please? > > > > > > > > > >> If the Environment importSelf, then the ClassBinding/Global also goes to > >> bindings... (thru an observer pattern and the magic of naming policies) > >> > >> The bindings is what is used by the compiler, so what if an environment > >> does not importSelf? It means that the variable it declares are not > bound, > >> so it is not reachable (kind of invisible class/Global). > >> > >> IOW, the bindings will contain all the imports, including self-imports. > >> importSelf is generally what we want to do, unless weird cases of > powerless > >> environment for obfuscation or trustless sandboxing reason. > >> > >> Now, associationAt: does not speak for itself. It's too hard to decide > if > >> we're speaking of own declarations or bindings... Analyzing the usage is > >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix > without > >> semantic shift. > > > > This would need as well elaboration as well a separate thread. > > > > > >> The semantic will be carried by the senders (the Tools), and the tools > by > >> usage we want to make of Environment. So we first have to define that: > what > >> feature do we want to support? With which tool? That probably require > yet > >> another thread... > > > > Yes > > > > --Hannes > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/28f5c5ce/attachment.htm From jakob.reschke at student.hpi.de Thu Sep 29 16:39:33 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Thu Sep 29 16:39:58 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Many questions should be answered with tooling here, but in the particular case I mentioned, IMHO it is not about tooling. Until now, code that does `Smalltalk at: something` wants to look up something dynamically or it can't be sure that this class is actually loaded. As there was only one place to do such lookups, no differentiation about visibility or the source of a binding was necessary. Instances of `Smalltalk at: something` should either be replaced by an environment aware equivalent that makes clear if a name should be looked up *only* in the receiving environment (in its declarations), or if a name should be resolved, looking also in imported environments (in the bindings). As it is inconvenient to find all these pieces of code and change them all, `Smalltalk (globals)` could be the "active" environment (currently via dynamic scoping with `on: CurrentEnvironment do: ...`), not the original global environment. But then Environment>>at: must behave sensibly. I would expect that I can always do `Smalltalk at: #Object` to retrieve `Object` in any environment (under the assumption that every environment would import the "Kernel" or original environment). This is currently not the case, because Environment>>at: looks only into an environment's (own) declarations, not the imported bindings. 2016-09-29 17:30 GMT+02:00 Nicolas Cellier : > > > 2016-09-29 15:15 GMT+02:00 Jakob Reschke : >> >> Hi, >> >> Environment>>associationAt: is part of the Smalltalk globals >> Dictionary compatibility interface, right? As a quick and dirty fix, I >> changed instances of Smalltalk at: xyz in Monticello code to >> CurrentEnvironment signal at: xyz, but #at: also only reads in the >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: >> #Object returns nil by default. It would make more sense to perform a >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't >> it? >> >> Best, >> Jakob >> > > I imagine that the question is about tools. > For now Smalltalk importSelf, so bindings and declarations do agree. > If an Environment does not importSelf, then some variables will be > invisibles (unbounds). Do we still want to see them in some tool, or not? > What's going on if we play with Alias? Do we want to see the Alias in some > browser? If not, then we'd better stick with declarations. > There is no easy solution. A single facade for two dictionaries cannot fit > all, so we need several different messages. > But it's much about what we want to do with those environments. > > >> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : >> > On 9/28/16, Nicolas Cellier wrote: >> >> Since we are at reviewing Environment, here is a small detail that >> >> bothers >> >> me. I already asked some months ago, but silence was the only response, >> >> so >> >> ping. >> >> >> >> Implementation of Environment is sometimes not obvious: >> >> - Environment>>associationAt: uses declarations inst.var.. >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >> >> How can it be so different, the selector does not speak, does it? >> >> >> >> OK, there is a flag: #review in one of them, but that does not make >> >> code >> >> clearer, it's just a smell of over-complexity or ill-naming. >> >> >> >> Whatever the reason (self explaining code?) Colin does not comment >> >> class/methods, that's a fact. >> > >> > Alternatively a description of the general ideas and the mechanism would >> > help. >> > >> > After all Environments is just a clever combination of a few >> > dictionaries to look up class names? Isn't it? ;-) >> > >> > However the fact that people did not move on much finalising the >> > implementation of environments since 2012 shows that it is hard to >> > reverse-engineer the intentions from the (incomplete) code. >> > >> > >> > >> > >> > >> >> Chris made the effort of commenting Environment but then came this >> >> declarations/bindings split, and the comment did rapidly rot. >> >> We have here an un-healthy statu quo crying for change. >> >> >> >> So if we want to at least comment the class with the >> >> meaning/role/responsibility of inst vars, here is my understanding: >> >> >> >> environment bind: #Foo to: 0. just add to the declarations. >> >> (You see how names are not obvious: bind does not bind the new binding >> >> to >> >> bindings). >> > >> > Environments >> > >> > bind: aSymbol to: anObject >> > | binding newBinding | >> > newBinding := aSymbol => anObject. >> > >> > binding := declarations associationAt: aSymbol ifAbsent: [nil]. >> > binding ifNotNil: >> > [binding class == newBinding class >> > ifTrue: [binding value: anObject] >> > ifFalse: [binding becomeForward: newBinding]. >> > ^anObject]. >> > >> > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. >> > binding >> > ifNil: [binding := newBinding] >> > ifNotNil: >> > [undeclared removeKey: aSymbol. >> > binding class == newBinding class >> > ifTrue: [binding value: anObject] >> > ifFalse: [binding becomeForward: >> > newBinding]]. >> > >> > declarations add: binding. >> > self binding: binding addedTo: self. >> > ^anObject >> > >> > >> > Could you elaborate a bit please? >> > >> > >> > >> > >> >> If the Environment importSelf, then the ClassBinding/Global also goes >> >> to >> >> bindings... (thru an observer pattern and the magic of naming policies) >> >> >> >> The bindings is what is used by the compiler, so what if an environment >> >> does not importSelf? It means that the variable it declares are not >> >> bound, >> >> so it is not reachable (kind of invisible class/Global). >> >> >> >> IOW, the bindings will contain all the imports, including self-imports. >> >> importSelf is generally what we want to do, unless weird cases of >> >> powerless >> >> environment for obfuscation or trustless sandboxing reason. >> >> >> >> Now, associationAt: does not speak for itself. It's too hard to decide >> >> if >> >> we're speaking of own declarations or bindings... Analyzing the usage >> >> is >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix >> >> without >> >> semantic shift. >> > >> > This would need as well elaboration as well a separate thread. >> > >> > >> >> The semantic will be carried by the senders (the Tools), and the tools >> >> by >> >> usage we want to make of Environment. So we first have to define that: >> >> what >> >> feature do we want to support? With which tool? That probably require >> >> yet >> >> another thread... >> > >> > Yes >> > >> > --Hannes >> > >> > From nicolas.cellier.aka.nice at gmail.com Thu Sep 29 16:54:50 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Sep 29 16:54:54 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: Message-ID: 2016-09-29 7:33 GMT+02:00 H. Hirzel : > On 9/28/16, Nicolas Cellier wrote: > > Since we are at reviewing Environment, here is a small detail that > bothers > > me. I already asked some months ago, but silence was the only response, > so > > ping. > > > > Implementation of Environment is sometimes not obvious: > > - Environment>>associationAt: uses declarations inst.var.. > > - Environment>>associationOrUndeclaredAt: uses bindings inst.var. > > How can it be so different, the selector does not speak, does it? > > > > OK, there is a flag: #review in one of them, but that does not make code > > clearer, it's just a smell of over-complexity or ill-naming. > > > > Whatever the reason (self explaining code?) Colin does not comment > > class/methods, that's a fact. > > Alternatively a description of the general ideas and the mechanism would > help. > > After all Environments is just a clever combination of a few > dictionaries to look up class names? Isn't it? ;-) > > However the fact that people did not move on much finalising the > implementation of environments since 2012 shows that it is hard to > reverse-engineer the intentions from the (incomplete) code. > > > More than that: we only get core functionalities, the intentions are not written here. IOW things still are very open. > > > > > Chris made the effort of commenting Environment but then came this > > declarations/bindings split, and the comment did rapidly rot. > > We have here an un-healthy statu quo crying for change. > > > > So if we want to at least comment the class with the > > meaning/role/responsibility of inst vars, here is my understanding: > > > > environment bind: #Foo to: 0. just add to the declarations. > > (You see how names are not obvious: bind does not bind the new binding to > > bindings). > > Environments > > bind: aSymbol to: anObject > | binding newBinding | > newBinding := aSymbol => anObject. > This creates either a Global or ClassBinding. The first one is writeable, the second not. > > binding := declarations associationAt: aSymbol ifAbsent: [nil]. > A class points to its environment where it is declared. So we expect this invariant: (Foo environment declarationOf: Foo name) value == Foo. And of course: (declarations values select: [:c | c isBehavior]) allSatisfy: [:c | c environment == self]. For globals I don't know why they are attached to a specific environment. Just because of mechanism for propagating changes? > binding ifNotNil: > [binding class == newBinding class > ifTrue: [binding value: anObject] > ifFalse: [binding becomeForward: newBinding]. > ^anObject]. > Since we different binding classes we cannot just change the value. Since bindings are shared by bindings inst. var., CompiledMethods and other environments if we don't use value, we must preserve identity with a become... Note: above code protects against Object := Array because ClassBinding cannot change value. But not against Object := 1, become protects nothing. It must be handled somewhere else. > > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. > binding > ifNil: [binding := newBinding] > ifNotNil: > [undeclared removeKey: aSymbol. > binding class == newBinding class > ifTrue: [binding value: anObject] > ifFalse: [binding becomeForward: > newBinding]]. > > If we previously had some undeclared reference to such variable name (normally a Global with nil value), it's time to rebind it. > declarations add: binding. > self binding: binding addedTo: self. > Now propagate the change to every interested observer (those who import declarations from yourself). > ^anObject > like at:put: used to do, we still answer the put object. > > > Could you elaborate a bit please? > > See above, by pure reverse engineering ;) > > > > > If the Environment importSelf, then the ClassBinding/Global also goes to > > bindings... (thru an observer pattern and the magic of naming policies) > > > > The bindings is what is used by the compiler, so what if an environment > > does not importSelf? It means that the variable it declares are not > bound, > > so it is not reachable (kind of invisible class/Global). > > > > IOW, the bindings will contain all the imports, including self-imports. > > importSelf is generally what we want to do, unless weird cases of > powerless > > environment for obfuscation or trustless sandboxing reason. > > > > Now, associationAt: does not speak for itself. It's too hard to decide if > > we're speaking of own declarations or bindings... Analyzing the usage is > > difficult. bindingAt: would be less ambiguous, so IMO we cannot fix > without > > semantic shift. > > This would need as well elaboration as well a separate thread. > > > > The semantic will be carried by the senders (the Tools), and the tools by > > usage we want to make of Environment. So we first have to define that: > what > > feature do we want to support? With which tool? That probably require yet > > another thread... > > Yes > already opened :) > > --Hannes > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/0ec5f00d/attachment-0001.htm From nicolas.cellier.aka.nice at gmail.com Thu Sep 29 17:10:24 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu Sep 29 17:10:28 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-09-29 18:39 GMT+02:00 Jakob Reschke : > Many questions should be answered with tooling here, but in the > particular case I mentioned, IMHO it is not about tooling. Until now, > code that does `Smalltalk at: something` wants to look up something > dynamically or it can't be sure that this class is actually loaded. As > there was only one place to do such lookups, no differentiation about > visibility or the source of a binding was necessary. > > Instances of `Smalltalk at: something` should either be replaced by an > environment aware equivalent that makes clear if a name should be > looked up *only* in the receiving environment (in its declarations), > or if a name should be resolved, looking also in imported environments > (in the bindings). Agree > As it is inconvenient to find all these pieces of > code and change them all, `Smalltalk (globals)` could be the "active" > environment (currently via dynamic scoping with `on: > CurrentEnvironment do: ...`), not the original global environment. I don't like the idea of CurrentEnvironment at all. IMO global state stinks. It would mean that a lotta behavior would change by simply switching one shared variable... I see it more like a not so clever workaround to make tools still work in presence of environments with minimal changes. > But > then Environment>>at: must behave sensibly. I would expect that I can > always do `Smalltalk at: #Object` to retrieve `Object` in any > environment (under the assumption that every environment would import > the "Kernel" or original environment). This is currently not the case, > because Environment>>at: looks only into an environment's (own) > declarations, not the imported bindings. > > I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for deferred bindings. I remind you that Smalltalk itself is a global variable created with a different instance for each environment. Object is in the superclass chain, so we can still access with superclass superclass ... environment. > 2016-09-29 17:30 GMT+02:00 Nicolas Cellier gmail.com>: > > > > > > 2016-09-29 15:15 GMT+02:00 Jakob Reschke : > >> > >> Hi, > >> > >> Environment>>associationAt: is part of the Smalltalk globals > >> Dictionary compatibility interface, right? As a quick and dirty fix, I > >> changed instances of Smalltalk at: xyz in Monticello code to > >> CurrentEnvironment signal at: xyz, but #at: also only reads in the > >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: > >> #Object returns nil by default. It would make more sense to perform a > >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't > >> it? > >> > >> Best, > >> Jakob > >> > > > > I imagine that the question is about tools. > > For now Smalltalk importSelf, so bindings and declarations do agree. > > If an Environment does not importSelf, then some variables will be > > invisibles (unbounds). Do we still want to see them in some tool, or not? > > What's going on if we play with Alias? Do we want to see the Alias in > some > > browser? If not, then we'd better stick with declarations. > > There is no easy solution. A single facade for two dictionaries cannot > fit > > all, so we need several different messages. > > But it's much about what we want to do with those environments. > > > > > >> > >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : > >> > On 9/28/16, Nicolas Cellier > wrote: > >> >> Since we are at reviewing Environment, here is a small detail that > >> >> bothers > >> >> me. I already asked some months ago, but silence was the only > response, > >> >> so > >> >> ping. > >> >> > >> >> Implementation of Environment is sometimes not obvious: > >> >> - Environment>>associationAt: uses declarations inst.var.. > >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. > >> >> How can it be so different, the selector does not speak, does it? > >> >> > >> >> OK, there is a flag: #review in one of them, but that does not make > >> >> code > >> >> clearer, it's just a smell of over-complexity or ill-naming. > >> >> > >> >> Whatever the reason (self explaining code?) Colin does not comment > >> >> class/methods, that's a fact. > >> > > >> > Alternatively a description of the general ideas and the mechanism > would > >> > help. > >> > > >> > After all Environments is just a clever combination of a few > >> > dictionaries to look up class names? Isn't it? ;-) > >> > > >> > However the fact that people did not move on much finalising the > >> > implementation of environments since 2012 shows that it is hard to > >> > reverse-engineer the intentions from the (incomplete) code. > >> > > >> > > >> > > >> > > >> > > >> >> Chris made the effort of commenting Environment but then came this > >> >> declarations/bindings split, and the comment did rapidly rot. > >> >> We have here an un-healthy statu quo crying for change. > >> >> > >> >> So if we want to at least comment the class with the > >> >> meaning/role/responsibility of inst vars, here is my understanding: > >> >> > >> >> environment bind: #Foo to: 0. just add to the declarations. > >> >> (You see how names are not obvious: bind does not bind the new > binding > >> >> to > >> >> bindings). > >> > > >> > Environments > >> > > >> > bind: aSymbol to: anObject > >> > | binding newBinding | > >> > newBinding := aSymbol => anObject. > >> > > >> > binding := declarations associationAt: aSymbol ifAbsent: > [nil]. > >> > binding ifNotNil: > >> > [binding class == newBinding class > >> > ifTrue: [binding value: anObject] > >> > ifFalse: [binding becomeForward: newBinding]. > >> > ^anObject]. > >> > > >> > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. > >> > binding > >> > ifNil: [binding := newBinding] > >> > ifNotNil: > >> > [undeclared removeKey: aSymbol. > >> > binding class == newBinding class > >> > ifTrue: [binding value: anObject] > >> > ifFalse: [binding becomeForward: > >> > newBinding]]. > >> > > >> > declarations add: binding. > >> > self binding: binding addedTo: self. > >> > ^anObject > >> > > >> > > >> > Could you elaborate a bit please? > >> > > >> > > >> > > >> > > >> >> If the Environment importSelf, then the ClassBinding/Global also goes > >> >> to > >> >> bindings... (thru an observer pattern and the magic of naming > policies) > >> >> > >> >> The bindings is what is used by the compiler, so what if an > environment > >> >> does not importSelf? It means that the variable it declares are not > >> >> bound, > >> >> so it is not reachable (kind of invisible class/Global). > >> >> > >> >> IOW, the bindings will contain all the imports, including > self-imports. > >> >> importSelf is generally what we want to do, unless weird cases of > >> >> powerless > >> >> environment for obfuscation or trustless sandboxing reason. > >> >> > >> >> Now, associationAt: does not speak for itself. It's too hard to > decide > >> >> if > >> >> we're speaking of own declarations or bindings... Analyzing the usage > >> >> is > >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix > >> >> without > >> >> semantic shift. > >> > > >> > This would need as well elaboration as well a separate thread. > >> > > >> > > >> >> The semantic will be carried by the senders (the Tools), and the > tools > >> >> by > >> >> usage we want to make of Environment. So we first have to define > that: > >> >> what > >> >> feature do we want to support? With which tool? That probably require > >> >> yet > >> >> another thread... > >> > > >> > Yes > >> > > >> > --Hannes > >> > > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/e2b94aa4/attachment.htm From frank.shearar at gmail.com Thu Sep 29 17:28:26 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Sep 29 17:28:31 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 29 September 2016 at 10:10, Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com> wrote: > > > 2016-09-29 18:39 GMT+02:00 Jakob Reschke : > >> Many questions should be answered with tooling here, but in the >> particular case I mentioned, IMHO it is not about tooling. Until now, >> code that does `Smalltalk at: something` wants to look up something >> dynamically or it can't be sure that this class is actually loaded. As >> there was only one place to do such lookups, no differentiation about >> visibility or the source of a binding was necessary. >> >> Instances of `Smalltalk at: something` should either be replaced by an >> environment aware equivalent that makes clear if a name should be >> looked up *only* in the receiving environment (in its declarations), >> or if a name should be resolved, looking also in imported environments >> (in the bindings). > > > Agree > > >> As it is inconvenient to find all these pieces of >> code and change them all, `Smalltalk (globals)` could be the "active" >> environment (currently via dynamic scoping with `on: >> CurrentEnvironment do: ...`), not the original global environment. > > > I don't like the idea of CurrentEnvironment at all. IMO global state > stinks. > It would mean that a lotta behavior would change by simply switching one > shared variable... > I see it more like a not so clever workaround to make tools still work in > presence of environments with minimal changes. > Global state does indeed stink, which is why Environments is so nice, because "global" isn't global anymore. But that's the whole point of CurrentEnvironment - it's a _delimited dynamic variable_, turning formerly actually global state into something context sensitive. frank > But >> then Environment>>at: must behave sensibly. I would expect that I can >> always do `Smalltalk at: #Object` to retrieve `Object` in any >> environment (under the assumption that every environment would import >> the "Kernel" or original environment). This is currently not the case, >> because Environment>>at: looks only into an environment's (own) >> declarations, not the imported bindings. >> >> > I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. > VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for > deferred bindings. > I remind you that Smalltalk itself is a global variable created with a > different instance for each environment. > > Object is in the superclass chain, so we can still access with superclass > superclass ... environment. > > > >> 2016-09-29 17:30 GMT+02:00 Nicolas Cellier > l.com>: >> > >> > >> > 2016-09-29 15:15 GMT+02:00 Jakob Reschke >> : >> >> >> >> Hi, >> >> >> >> Environment>>associationAt: is part of the Smalltalk globals >> >> Dictionary compatibility interface, right? As a quick and dirty fix, I >> >> changed instances of Smalltalk at: xyz in Monticello code to >> >> CurrentEnvironment signal at: xyz, but #at: also only reads in the >> >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: >> >> #Object returns nil by default. It would make more sense to perform a >> >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't >> >> it? >> >> >> >> Best, >> >> Jakob >> >> >> > >> > I imagine that the question is about tools. >> > For now Smalltalk importSelf, so bindings and declarations do agree. >> > If an Environment does not importSelf, then some variables will be >> > invisibles (unbounds). Do we still want to see them in some tool, or >> not? >> > What's going on if we play with Alias? Do we want to see the Alias in >> some >> > browser? If not, then we'd better stick with declarations. >> > There is no easy solution. A single facade for two dictionaries cannot >> fit >> > all, so we need several different messages. >> > But it's much about what we want to do with those environments. >> > >> > >> >> >> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : >> >> > On 9/28/16, Nicolas Cellier >> wrote: >> >> >> Since we are at reviewing Environment, here is a small detail that >> >> >> bothers >> >> >> me. I already asked some months ago, but silence was the only >> response, >> >> >> so >> >> >> ping. >> >> >> >> >> >> Implementation of Environment is sometimes not obvious: >> >> >> - Environment>>associationAt: uses declarations inst.var.. >> >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >> >> >> How can it be so different, the selector does not speak, does it? >> >> >> >> >> >> OK, there is a flag: #review in one of them, but that does not make >> >> >> code >> >> >> clearer, it's just a smell of over-complexity or ill-naming. >> >> >> >> >> >> Whatever the reason (self explaining code?) Colin does not comment >> >> >> class/methods, that's a fact. >> >> > >> >> > Alternatively a description of the general ideas and the mechanism >> would >> >> > help. >> >> > >> >> > After all Environments is just a clever combination of a few >> >> > dictionaries to look up class names? Isn't it? ;-) >> >> > >> >> > However the fact that people did not move on much finalising the >> >> > implementation of environments since 2012 shows that it is hard to >> >> > reverse-engineer the intentions from the (incomplete) code. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> Chris made the effort of commenting Environment but then came this >> >> >> declarations/bindings split, and the comment did rapidly rot. >> >> >> We have here an un-healthy statu quo crying for change. >> >> >> >> >> >> So if we want to at least comment the class with the >> >> >> meaning/role/responsibility of inst vars, here is my understanding: >> >> >> >> >> >> environment bind: #Foo to: 0. just add to the declarations. >> >> >> (You see how names are not obvious: bind does not bind the new >> binding >> >> >> to >> >> >> bindings). >> >> > >> >> > Environments >> >> > >> >> > bind: aSymbol to: anObject >> >> > | binding newBinding | >> >> > newBinding := aSymbol => anObject. >> >> > >> >> > binding := declarations associationAt: aSymbol ifAbsent: >> [nil]. >> >> > binding ifNotNil: >> >> > [binding class == newBinding class >> >> > ifTrue: [binding value: anObject] >> >> > ifFalse: [binding becomeForward: newBinding]. >> >> > ^anObject]. >> >> > >> >> > binding := undeclared associationAt: aSymbol ifAbsent: [nil]. >> >> > binding >> >> > ifNil: [binding := newBinding] >> >> > ifNotNil: >> >> > [undeclared removeKey: aSymbol. >> >> > binding class == newBinding class >> >> > ifTrue: [binding value: anObject] >> >> > ifFalse: [binding becomeForward: >> >> > newBinding]]. >> >> > >> >> > declarations add: binding. >> >> > self binding: binding addedTo: self. >> >> > ^anObject >> >> > >> >> > >> >> > Could you elaborate a bit please? >> >> > >> >> > >> >> > >> >> > >> >> >> If the Environment importSelf, then the ClassBinding/Global also >> goes >> >> >> to >> >> >> bindings... (thru an observer pattern and the magic of naming >> policies) >> >> >> >> >> >> The bindings is what is used by the compiler, so what if an >> environment >> >> >> does not importSelf? It means that the variable it declares are not >> >> >> bound, >> >> >> so it is not reachable (kind of invisible class/Global). >> >> >> >> >> >> IOW, the bindings will contain all the imports, including >> self-imports. >> >> >> importSelf is generally what we want to do, unless weird cases of >> >> >> powerless >> >> >> environment for obfuscation or trustless sandboxing reason. >> >> >> >> >> >> Now, associationAt: does not speak for itself. It's too hard to >> decide >> >> >> if >> >> >> we're speaking of own declarations or bindings... Analyzing the >> usage >> >> >> is >> >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix >> >> >> without >> >> >> semantic shift. >> >> > >> >> > This would need as well elaboration as well a separate thread. >> >> > >> >> > >> >> >> The semantic will be carried by the senders (the Tools), and the >> tools >> >> >> by >> >> >> usage we want to make of Environment. So we first have to define >> that: >> >> >> what >> >> >> feature do we want to support? With which tool? That probably >> require >> >> >> yet >> >> >> another thread... >> >> > >> >> > Yes >> >> > >> >> > --Hannes >> >> > >> >> >> > >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/a7d32f53/attachment.htm From hannes.hirzel at gmail.com Thu Sep 29 17:38:41 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 17:38:44 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 9/29/16, Nicolas Cellier wrote: > 2016-09-29 18:39 GMT+02:00 Jakob Reschke : > >> Many questions should be answered with tooling here, but in the >> particular case I mentioned, IMHO it is not about tooling. Until now, >> code that does `Smalltalk at: something` wants to look up something >> dynamically or it can't be sure that this class is actually loaded. As >> there was only one place to do such lookups, no differentiation about >> visibility or the source of a binding was necessary. >> >> Instances of `Smalltalk at: something` should either be replaced by an >> environment aware equivalent that makes clear if a name should be >> looked up *only* in the receiving environment (in its declarations), >> or if a name should be resolved, looking also in imported environments >> (in the bindings). > > > Agree > > >> As it is inconvenient to find all these pieces of >> code and change them all, `Smalltalk (globals)` could be the "active" >> environment (currently via dynamic scoping with `on: >> CurrentEnvironment do: ...`), not the original global environment. > > > I don't like the idea of CurrentEnvironment at all. IMO global state > stinks. Sure but we also have ActiveWorld ActiveHand World ScriptingSystem Smalltalk ActiveEvent Sensor Transcript Display TextConstants ImageImports SystemOrganization to list just a few. Every Project (with subclasses MVCProject and MorphicProject) has an instance variable 'environment'. This variable is not used as of now (no access, no stores) Project current environment (does not work -- yet?) looks like a natural thing to have. Depending on the project type a project specific environment might be set up when entering the project. > It would mean that a lotta behavior would change by simply switching one > shared variable... > I see it more like a not so clever workaround to make tools still work in > presence of environments with minimal changes. > > > >> But >> then Environment>>at: must behave sensibly. I would expect that I can >> always do `Smalltalk at: #Object` to retrieve `Object` in any >> environment (under the assumption that every environment would import >> the "Kernel" or original environment). This is currently not the case, >> because Environment>>at: looks only into an environment's (own) >> declarations, not the imported bindings. >> >> > I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. > VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for > deferred bindings. > I remind you that Smalltalk itself is a global variable created with a > different instance for each environment. > > Object is in the superclass chain, so we can still access with superclass > superclass ... environment. > > > >> 2016-09-29 17:30 GMT+02:00 Nicolas Cellier > gmail.com>: >> > >> > >> > 2016-09-29 15:15 GMT+02:00 Jakob Reschke >> > : >> >> >> >> Hi, >> >> >> >> Environment>>associationAt: is part of the Smalltalk globals >> >> Dictionary compatibility interface, right? As a quick and dirty fix, I >> >> changed instances of Smalltalk at: xyz in Monticello code to >> >> CurrentEnvironment signal at: xyz, but #at: also only reads in the >> >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: >> >> #Object returns nil by default. It would make more sense to perform a >> >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't >> >> it? >> >> >> >> Best, >> >> Jakob >> >> >> > >> > I imagine that the question is about tools. >> > For now Smalltalk importSelf, so bindings and declarations do agree. >> > If an Environment does not importSelf, then some variables will be >> > invisibles (unbounds). Do we still want to see them in some tool, or >> > not? >> > What's going on if we play with Alias? Do we want to see the Alias in >> some >> > browser? If not, then we'd better stick with declarations. >> > There is no easy solution. A single facade for two dictionaries cannot >> fit >> > all, so we need several different messages. >> > But it's much about what we want to do with those environments. >> > >> > >> >> >> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : >> >> > On 9/28/16, Nicolas Cellier >> wrote: >> >> >> Since we are at reviewing Environment, here is a small detail that >> >> >> bothers >> >> >> me. I already asked some months ago, but silence was the only >> response, >> >> >> so >> >> >> ping. >> >> >> >> >> >> Implementation of Environment is sometimes not obvious: >> >> >> - Environment>>associationAt: uses declarations inst.var.. >> >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >> >> >> How can it be so different, the selector does not speak, does it? >> >> >> >> >> >> OK, there is a flag: #review in one of them, but that does not make >> >> >> code >> >> >> clearer, it's just a smell of over-complexity or ill-naming. >> >> >> >> >> >> Whatever the reason (self explaining code?) Colin does not comment >> >> >> class/methods, that's a fact. >> >> > >> >> > Alternatively a description of the general ideas and the mechanism >> would >> >> > help. >> >> > >> >> > After all Environments is just a clever combination of a few >> >> > dictionaries to look up class names? Isn't it? ;-) >> >> > >> >> > However the fact that people did not move on much finalising the >> >> > implementation of environments since 2012 shows that it is hard to >> >> > reverse-engineer the intentions from the (incomplete) code. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> Chris made the effort of commenting Environment but then came this >> >> >> declarations/bindings split, and the comment did rapidly rot. >> >> >> We have here an un-healthy statu quo crying for change. >> >> >> >> >> >> So if we want to at least comment the class with the >> >> >> meaning/role/responsibility of inst vars, here is my understanding: >> >> >> >> >> >> environment bind: #Foo to: 0. just add to the declarations. >> >> >> (You see how names are not obvious: bind does not bind the new >> binding >> >> >> to >> >> >> bindings). >> >> > >> >> > Environments >> >> > >> >> > bind: aSymbol to: anObject >> >> > | binding newBinding | >> >> > newBinding := aSymbol => anObject. >> >> > >> >> > binding := declarations associationAt: aSymbol ifAbsent: >> [nil]. >> >> > binding ifNotNil: >> >> > [binding class == newBinding class >> >> > ifTrue: [binding value: anObject] >> >> > ifFalse: [binding becomeForward: >> >> > newBinding]. >> >> > ^anObject]. >> >> > >> >> > binding := undeclared associationAt: aSymbol ifAbsent: >> >> > [nil]. >> >> > binding >> >> > ifNil: [binding := newBinding] >> >> > ifNotNil: >> >> > [undeclared removeKey: aSymbol. >> >> > binding class == newBinding class >> >> > ifTrue: [binding value: anObject] >> >> > ifFalse: [binding becomeForward: >> >> > newBinding]]. >> >> > >> >> > declarations add: binding. >> >> > self binding: binding addedTo: self. >> >> > ^anObject >> >> > >> >> > >> >> > Could you elaborate a bit please? >> >> > >> >> > >> >> > >> >> > >> >> >> If the Environment importSelf, then the ClassBinding/Global also >> >> >> goes >> >> >> to >> >> >> bindings... (thru an observer pattern and the magic of naming >> policies) >> >> >> >> >> >> The bindings is what is used by the compiler, so what if an >> environment >> >> >> does not importSelf? It means that the variable it declares are not >> >> >> bound, >> >> >> so it is not reachable (kind of invisible class/Global). >> >> >> >> >> >> IOW, the bindings will contain all the imports, including >> self-imports. >> >> >> importSelf is generally what we want to do, unless weird cases of >> >> >> powerless >> >> >> environment for obfuscation or trustless sandboxing reason. >> >> >> >> >> >> Now, associationAt: does not speak for itself. It's too hard to >> decide >> >> >> if >> >> >> we're speaking of own declarations or bindings... Analyzing the >> >> >> usage >> >> >> is >> >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot fix >> >> >> without >> >> >> semantic shift. >> >> > >> >> > This would need as well elaboration as well a separate thread. >> >> > >> >> > >> >> >> The semantic will be carried by the senders (the Tools), and the >> tools >> >> >> by >> >> >> usage we want to make of Environment. So we first have to define >> that: >> >> >> what >> >> >> feature do we want to support? With which tool? That probably >> >> >> require >> >> >> yet >> >> >> another thread... >> >> > >> >> > Yes >> >> > >> >> > --Hannes >> >> > >> >> >> > >> >> > From hannes.hirzel at gmail.com Thu Sep 29 17:42:45 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 17:42:48 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 9/29/16, Frank Shearar wrote: > On 29 September 2016 at 10:10, Nicolas Cellier < > nicolas.cellier.aka.nice@gmail.com> wrote: > >> >> >> 2016-09-29 18:39 GMT+02:00 Jakob Reschke : >> >>> Many questions should be answered with tooling here, but in the >>> particular case I mentioned, IMHO it is not about tooling. Until now, >>> code that does `Smalltalk at: something` wants to look up something >>> dynamically or it can't be sure that this class is actually loaded. As >>> there was only one place to do such lookups, no differentiation about >>> visibility or the source of a binding was necessary. >>> >>> Instances of `Smalltalk at: something` should either be replaced by an >>> environment aware equivalent that makes clear if a name should be >>> looked up *only* in the receiving environment (in its declarations), >>> or if a name should be resolved, looking also in imported environments >>> (in the bindings). >> >> >> Agree >> >> >>> As it is inconvenient to find all these pieces of >>> code and change them all, `Smalltalk (globals)` could be the "active" >>> environment (currently via dynamic scoping with `on: >>> CurrentEnvironment do: ...`), not the original global environment. >> >> >> I don't like the idea of CurrentEnvironment at all. IMO global state >> stinks. >> It would mean that a lotta behavior would change by simply switching one >> shared variable... >> I see it more like a not so clever workaround to make tools still work in >> presence of environments with minimal changes. >> > > Global state does indeed stink, which is why Environments is so nice, > because "global" isn't global anymore. > > But that's the whole point of CurrentEnvironment - it's a _delimited > dynamic variable_, turning formerly actually global state into something > context sensitive. Environment current is parallel to Project current I think this is OK. @Frank, could you elaborate please what you mean with '_delimited dynamic variable_' ? --Hannes > frank > > > >> But >>> then Environment>>at: must behave sensibly. I would expect that I can >>> always do `Smalltalk at: #Object` to retrieve `Object` in any >>> environment (under the assumption that every environment would import >>> the "Kernel" or original environment). This is currently not the case, >>> because Environment>>at: looks only into an environment's (own) >>> declarations, not the imported bindings. >>> >>> >> I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. >> VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for >> deferred bindings. >> I remind you that Smalltalk itself is a global variable created with a >> different instance for each environment. >> >> Object is in the superclass chain, so we can still access with superclass >> superclass ... environment. >> >> >> >>> 2016-09-29 17:30 GMT+02:00 Nicolas Cellier >>> >> l.com>: >>> > >>> > >>> > 2016-09-29 15:15 GMT+02:00 Jakob Reschke >>> > >>> : >>> >> >>> >> Hi, >>> >> >>> >> Environment>>associationAt: is part of the Smalltalk globals >>> >> Dictionary compatibility interface, right? As a quick and dirty fix, >>> >> I >>> >> changed instances of Smalltalk at: xyz in Monticello code to >>> >> CurrentEnvironment signal at: xyz, but #at: also only reads in the >>> >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: >>> >> #Object returns nil by default. It would make more sense to perform a >>> >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't >>> >> it? >>> >> >>> >> Best, >>> >> Jakob >>> >> >>> > >>> > I imagine that the question is about tools. >>> > For now Smalltalk importSelf, so bindings and declarations do agree. >>> > If an Environment does not importSelf, then some variables will be >>> > invisibles (unbounds). Do we still want to see them in some tool, or >>> not? >>> > What's going on if we play with Alias? Do we want to see the Alias in >>> some >>> > browser? If not, then we'd better stick with declarations. >>> > There is no easy solution. A single facade for two dictionaries cannot >>> fit >>> > all, so we need several different messages. >>> > But it's much about what we want to do with those environments. >>> > >>> > >>> >> >>> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : >>> >> > On 9/28/16, Nicolas Cellier >>> wrote: >>> >> >> Since we are at reviewing Environment, here is a small detail that >>> >> >> bothers >>> >> >> me. I already asked some months ago, but silence was the only >>> response, >>> >> >> so >>> >> >> ping. >>> >> >> >>> >> >> Implementation of Environment is sometimes not obvious: >>> >> >> - Environment>>associationAt: uses declarations inst.var.. >>> >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >>> >> >> How can it be so different, the selector does not speak, does it? >>> >> >> >>> >> >> OK, there is a flag: #review in one of them, but that does not >>> >> >> make >>> >> >> code >>> >> >> clearer, it's just a smell of over-complexity or ill-naming. >>> >> >> >>> >> >> Whatever the reason (self explaining code?) Colin does not comment >>> >> >> class/methods, that's a fact. >>> >> > >>> >> > Alternatively a description of the general ideas and the mechanism >>> would >>> >> > help. >>> >> > >>> >> > After all Environments is just a clever combination of a few >>> >> > dictionaries to look up class names? Isn't it? ;-) >>> >> > >>> >> > However the fact that people did not move on much finalising the >>> >> > implementation of environments since 2012 shows that it is hard to >>> >> > reverse-engineer the intentions from the (incomplete) code. >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> >> Chris made the effort of commenting Environment but then came this >>> >> >> declarations/bindings split, and the comment did rapidly rot. >>> >> >> We have here an un-healthy statu quo crying for change. >>> >> >> >>> >> >> So if we want to at least comment the class with the >>> >> >> meaning/role/responsibility of inst vars, here is my >>> >> >> understanding: >>> >> >> >>> >> >> environment bind: #Foo to: 0. just add to the declarations. >>> >> >> (You see how names are not obvious: bind does not bind the new >>> binding >>> >> >> to >>> >> >> bindings). >>> >> > >>> >> > Environments >>> >> > >>> >> > bind: aSymbol to: anObject >>> >> > | binding newBinding | >>> >> > newBinding := aSymbol => anObject. >>> >> > >>> >> > binding := declarations associationAt: aSymbol ifAbsent: >>> [nil]. >>> >> > binding ifNotNil: >>> >> > [binding class == newBinding class >>> >> > ifTrue: [binding value: anObject] >>> >> > ifFalse: [binding becomeForward: >>> >> > newBinding]. >>> >> > ^anObject]. >>> >> > >>> >> > binding := undeclared associationAt: aSymbol ifAbsent: >>> >> > [nil]. >>> >> > binding >>> >> > ifNil: [binding := newBinding] >>> >> > ifNotNil: >>> >> > [undeclared removeKey: aSymbol. >>> >> > binding class == newBinding class >>> >> > ifTrue: [binding value: anObject] >>> >> > ifFalse: [binding becomeForward: >>> >> > newBinding]]. >>> >> > >>> >> > declarations add: binding. >>> >> > self binding: binding addedTo: self. >>> >> > ^anObject >>> >> > >>> >> > >>> >> > Could you elaborate a bit please? >>> >> > >>> >> > >>> >> > >>> >> > >>> >> >> If the Environment importSelf, then the ClassBinding/Global also >>> goes >>> >> >> to >>> >> >> bindings... (thru an observer pattern and the magic of naming >>> policies) >>> >> >> >>> >> >> The bindings is what is used by the compiler, so what if an >>> environment >>> >> >> does not importSelf? It means that the variable it declares are >>> >> >> not >>> >> >> bound, >>> >> >> so it is not reachable (kind of invisible class/Global). >>> >> >> >>> >> >> IOW, the bindings will contain all the imports, including >>> self-imports. >>> >> >> importSelf is generally what we want to do, unless weird cases of >>> >> >> powerless >>> >> >> environment for obfuscation or trustless sandboxing reason. >>> >> >> >>> >> >> Now, associationAt: does not speak for itself. It's too hard to >>> decide >>> >> >> if >>> >> >> we're speaking of own declarations or bindings... Analyzing the >>> usage >>> >> >> is >>> >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot >>> >> >> fix >>> >> >> without >>> >> >> semantic shift. >>> >> > >>> >> > This would need as well elaboration as well a separate thread. >>> >> > >>> >> > >>> >> >> The semantic will be carried by the senders (the Tools), and the >>> tools >>> >> >> by >>> >> >> usage we want to make of Environment. So we first have to define >>> that: >>> >> >> what >>> >> >> feature do we want to support? With which tool? That probably >>> require >>> >> >> yet >>> >> >> another thread... >>> >> > >>> >> > Yes >>> >> > >>> >> > --Hannes >>> >> > >>> >> >>> > >>> >>> >> >> >> >> > From hannes.hirzel at gmail.com Thu Sep 29 17:56:10 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 17:56:13 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: If I inspect Environment current I get an Enviroment instance with declarations, bindings, policies and observers as instance variables. If I do a printit on Environment current I get Smalltalk. When I inspect that I get an instance of SmalltalkImage. With the only instance variable 'globals' which is an environment. What is happening here? Relationship between Environment and SmalltalkImage instance? On 9/29/16, H. Hirzel wrote: > On 9/29/16, Frank Shearar wrote: >> On 29 September 2016 at 10:10, Nicolas Cellier < >> nicolas.cellier.aka.nice@gmail.com> wrote: >> >>> >>> >>> 2016-09-29 18:39 GMT+02:00 Jakob Reschke : >>> >>>> Many questions should be answered with tooling here, but in the >>>> particular case I mentioned, IMHO it is not about tooling. Until now, >>>> code that does `Smalltalk at: something` wants to look up something >>>> dynamically or it can't be sure that this class is actually loaded. As >>>> there was only one place to do such lookups, no differentiation about >>>> visibility or the source of a binding was necessary. >>>> >>>> Instances of `Smalltalk at: something` should either be replaced by an >>>> environment aware equivalent that makes clear if a name should be >>>> looked up *only* in the receiving environment (in its declarations), >>>> or if a name should be resolved, looking also in imported environments >>>> (in the bindings). >>> >>> >>> Agree >>> >>> >>>> As it is inconvenient to find all these pieces of >>>> code and change them all, `Smalltalk (globals)` could be the "active" >>>> environment (currently via dynamic scoping with `on: >>>> CurrentEnvironment do: ...`), not the original global environment. >>> >>> >>> I don't like the idea of CurrentEnvironment at all. IMO global state >>> stinks. >>> It would mean that a lotta behavior would change by simply switching one >>> shared variable... >>> I see it more like a not so clever workaround to make tools still work >>> in >>> presence of environments with minimal changes. >>> >> >> Global state does indeed stink, which is why Environments is so nice, >> because "global" isn't global anymore. >> >> But that's the whole point of CurrentEnvironment - it's a _delimited >> dynamic variable_, turning formerly actually global state into something >> context sensitive. > > Environment current > > is parallel to > > Project current > > I think this is OK. > > @Frank, could you elaborate please what you mean with '_delimited > dynamic variable_' ? > > --Hannes > >> frank >> >> >> >>> But >>>> then Environment>>at: must behave sensibly. I would expect that I can >>>> always do `Smalltalk at: #Object` to retrieve `Object` in any >>>> environment (under the assumption that every environment would import >>>> the "Kernel" or original environment). This is currently not the case, >>>> because Environment>>at: looks only into an environment's (own) >>>> declarations, not the imported bindings. >>>> >>>> >>> I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. >>> VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for >>> deferred bindings. >>> I remind you that Smalltalk itself is a global variable created with a >>> different instance for each environment. >>> >>> Object is in the superclass chain, so we can still access with >>> superclass >>> superclass ... environment. >>> >>> >>> >>>> 2016-09-29 17:30 GMT+02:00 Nicolas Cellier >>>> >>> l.com>: >>>> > >>>> > >>>> > 2016-09-29 15:15 GMT+02:00 Jakob Reschke >>>> > >>>> : >>>> >> >>>> >> Hi, >>>> >> >>>> >> Environment>>associationAt: is part of the Smalltalk globals >>>> >> Dictionary compatibility interface, right? As a quick and dirty fix, >>>> >> I >>>> >> changed instances of Smalltalk at: xyz in Monticello code to >>>> >> CurrentEnvironment signal at: xyz, but #at: also only reads in the >>>> >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: >>>> >> #Object returns nil by default. It would make more sense to perform >>>> >> a >>>> >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't >>>> >> it? >>>> >> >>>> >> Best, >>>> >> Jakob >>>> >> >>>> > >>>> > I imagine that the question is about tools. >>>> > For now Smalltalk importSelf, so bindings and declarations do agree. >>>> > If an Environment does not importSelf, then some variables will be >>>> > invisibles (unbounds). Do we still want to see them in some tool, or >>>> not? >>>> > What's going on if we play with Alias? Do we want to see the Alias in >>>> some >>>> > browser? If not, then we'd better stick with declarations. >>>> > There is no easy solution. A single facade for two dictionaries >>>> > cannot >>>> fit >>>> > all, so we need several different messages. >>>> > But it's much about what we want to do with those environments. >>>> > >>>> > >>>> >> >>>> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : >>>> >> > On 9/28/16, Nicolas Cellier >>>> wrote: >>>> >> >> Since we are at reviewing Environment, here is a small detail >>>> >> >> that >>>> >> >> bothers >>>> >> >> me. I already asked some months ago, but silence was the only >>>> response, >>>> >> >> so >>>> >> >> ping. >>>> >> >> >>>> >> >> Implementation of Environment is sometimes not obvious: >>>> >> >> - Environment>>associationAt: uses declarations inst.var.. >>>> >> >> - Environment>>associationOrUndeclaredAt: uses bindings inst.var. >>>> >> >> How can it be so different, the selector does not speak, does it? >>>> >> >> >>>> >> >> OK, there is a flag: #review in one of them, but that does not >>>> >> >> make >>>> >> >> code >>>> >> >> clearer, it's just a smell of over-complexity or ill-naming. >>>> >> >> >>>> >> >> Whatever the reason (self explaining code?) Colin does not >>>> >> >> comment >>>> >> >> class/methods, that's a fact. >>>> >> > >>>> >> > Alternatively a description of the general ideas and the mechanism >>>> would >>>> >> > help. >>>> >> > >>>> >> > After all Environments is just a clever combination of a few >>>> >> > dictionaries to look up class names? Isn't it? ;-) >>>> >> > >>>> >> > However the fact that people did not move on much finalising the >>>> >> > implementation of environments since 2012 shows that it is hard >>>> >> > to >>>> >> > reverse-engineer the intentions from the (incomplete) code. >>>> >> > >>>> >> > >>>> >> > >>>> >> > >>>> >> > >>>> >> >> Chris made the effort of commenting Environment but then came >>>> >> >> this >>>> >> >> declarations/bindings split, and the comment did rapidly rot. >>>> >> >> We have here an un-healthy statu quo crying for change. >>>> >> >> >>>> >> >> So if we want to at least comment the class with the >>>> >> >> meaning/role/responsibility of inst vars, here is my >>>> >> >> understanding: >>>> >> >> >>>> >> >> environment bind: #Foo to: 0. just add to the declarations. >>>> >> >> (You see how names are not obvious: bind does not bind the new >>>> binding >>>> >> >> to >>>> >> >> bindings). >>>> >> > >>>> >> > Environments >>>> >> > >>>> >> > bind: aSymbol to: anObject >>>> >> > | binding newBinding | >>>> >> > newBinding := aSymbol => anObject. >>>> >> > >>>> >> > binding := declarations associationAt: aSymbol ifAbsent: >>>> [nil]. >>>> >> > binding ifNotNil: >>>> >> > [binding class == newBinding class >>>> >> > ifTrue: [binding value: anObject] >>>> >> > ifFalse: [binding becomeForward: >>>> >> > newBinding]. >>>> >> > ^anObject]. >>>> >> > >>>> >> > binding := undeclared associationAt: aSymbol ifAbsent: >>>> >> > [nil]. >>>> >> > binding >>>> >> > ifNil: [binding := newBinding] >>>> >> > ifNotNil: >>>> >> > [undeclared removeKey: aSymbol. >>>> >> > binding class == newBinding class >>>> >> > ifTrue: [binding value: anObject] >>>> >> > ifFalse: [binding becomeForward: >>>> >> > newBinding]]. >>>> >> > >>>> >> > declarations add: binding. >>>> >> > self binding: binding addedTo: self. >>>> >> > ^anObject >>>> >> > >>>> >> > >>>> >> > Could you elaborate a bit please? >>>> >> > >>>> >> > >>>> >> > >>>> >> > >>>> >> >> If the Environment importSelf, then the ClassBinding/Global also >>>> goes >>>> >> >> to >>>> >> >> bindings... (thru an observer pattern and the magic of naming >>>> policies) >>>> >> >> >>>> >> >> The bindings is what is used by the compiler, so what if an >>>> environment >>>> >> >> does not importSelf? It means that the variable it declares are >>>> >> >> not >>>> >> >> bound, >>>> >> >> so it is not reachable (kind of invisible class/Global). >>>> >> >> >>>> >> >> IOW, the bindings will contain all the imports, including >>>> self-imports. >>>> >> >> importSelf is generally what we want to do, unless weird cases of >>>> >> >> powerless >>>> >> >> environment for obfuscation or trustless sandboxing reason. >>>> >> >> >>>> >> >> Now, associationAt: does not speak for itself. It's too hard to >>>> decide >>>> >> >> if >>>> >> >> we're speaking of own declarations or bindings... Analyzing the >>>> usage >>>> >> >> is >>>> >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot >>>> >> >> fix >>>> >> >> without >>>> >> >> semantic shift. >>>> >> > >>>> >> > This would need as well elaboration as well a separate thread. >>>> >> > >>>> >> > >>>> >> >> The semantic will be carried by the senders (the Tools), and the >>>> tools >>>> >> >> by >>>> >> >> usage we want to make of Environment. So we first have to define >>>> that: >>>> >> >> what >>>> >> >> feature do we want to support? With which tool? That probably >>>> require >>>> >> >> yet >>>> >> >> another thread... >>>> >> > >>>> >> > Yes >>>> >> > >>>> >> > --Hannes >>>> >> > >>>> >> >>>> > >>>> >>>> >>> >>> >>> >>> >> > From hannes.hirzel at gmail.com Thu Sep 29 18:35:25 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu Sep 29 18:35:28 2016 Subject: [squeak-dev] What are environments for In-Reply-To: References: <59c629fa6b8545cbbf434efe04051a76@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: I agree that a simple workspace example first is better. It could be an updated version of the example taken from http://wiki.squeak.org/squeak/6220 seaside := (Environment named: #Seaside) import: Smalltalk globals; importSelf; exportSelf; yourself. magma := (Environment named: #Magma) import: Smalltalk globals; importSelf; exportSelf; yourself. app := (Environment named: #AwesomeApp) import: Smalltalk globals; import: seaside; from: seaside import: {#Session -> #SeasideSession}; import: magma; from: magma import: {#Session -> #MagmaSession}; importSelf; exportSelf; yourself. I assume with the changes from Nicolas of today this will look different. Just two environments would be sufficient. --Hannes On 9/29/16, Jakob Reschke wrote: > I don't know if this would be quicker to implement than a Project > type, but at the moment I would appreciate a simple Workspace that > evaluates everything in a specific Environment. Projects would be far > more useful to actually write code in another Environment, of course. > > 2016-09-29 14:37 GMT+02:00 David T. Lewis : >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >>> On 9/29/16, Jakob Reschke wrote: >>> > Hi Nicolas, >>> > >>> > First, thank you for answering me in the other thread. >>> > >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >>> > : >>> >> Without clear goals or vision, fixing could essentially mean "let >>> >> Environment be transparent", that is let it remain a promise, a >>> >> potential, >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of >>> >> over-engineered nice piece of code that might serve later. OK this >>> >> sounds >>> >> like a mandatory first step. >>> > >>> > I don't quite get what you mean by transparent, other than fixing it >>> > and enhancing the documentation to shed some light on what it is, why >>> > it is there and how to use it. >>> > >>> >> But then, what feature are we after? >>> >> I have read bootstrapping, sandboxing, letting concurrent packages >>> >> and/or >>> >> versions co-exist, stop prefixing class names with pseudo >>> >> namespace... >>> >> So environment are about reducing global variable scope. >>> >> >>> >> For me, the essential decisions are in these questions: >>> >> - how will environments and source-code-management interfere? >>> >> - how are we going to specify reproducible artifacts (images)? >>> >> >>> >> Are we going to use environment "statically" like in VW, just like >>> >> namespaces are in many languages? That somehow means that the SCM >>> >> will >>> >> have >>> >> to be environment aware. >>> >> >>> >> Or are we going to transfer this responsibility at a higher level, >>> >> like >>> >> Metacello for example? In this later case, we have greater >>> >> flexibility, >>> >> but >>> >> assembling an image means telling which package is installed into >>> >> which >>> >> environment, then which import are necessary for each environment. >>> > >>> > It depends on whether you look at Environments as a developer's tool >>> > (like, e. g., Java packages) or an operator's/administrator's tool >>> > (like, e. g., Docker containers, maybe). In this discrimination >>> > developers can also be operators while they gather the dependencies >>> > for their projects, for example. >>> > >>> > Treating them as an operator's tool, I could imagine to create a new >>> > environment for every "Squeak app" you want to deploy in a production >>> > image. Installing that app via Metacello or the Squeak Map could >>> > (optionally?) create such an environment, isolating its dependencies >>> > (and their particular versions) from other apps in that image. >>> > Alternatively, you could install that app or library package into an >>> > existing environment that you must specify then. But I do not consider >>> > myself an operator, so I might be off conventional paths here... >>> > >>> > Another thing I have in mind is running a new test case against many >>> > older versions of a package (and its dependencies?) to find out which >>> > version introduced a regression, without changing the "main" >>> > environment each time when another version is checked out. Imagine you >>> > would want to do this with the Kernel or Collections package. I would >>> > want "throwaway" environments for this. >>> > >>> > My current naive use case is to hide from a Pharo package that I want >>> > to get going in Squeak the fact that in Pharo some classes have been >>> > renamed. I just want to make the older Squeak classes available under >>> > their changed names, without really renaming the classes themselves >>> > and without doing a big search&replace in the client package. This is >>> > probably bound to fail, because the interface has probably changed as >>> > well, but a generalization of this would be compatibility-, adapter- >>> > or emulation environments. >>> >>> Another maybe simple use case could be to have a project specific >>> environment set up when you enter a project >>> (http://wiki.squeak.org/squeak/1020). >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >>> >>> 1) Subclass MorphicProject --- MyMorphicProject >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >>> 4) ... some more adaptations ..... to enter a new Environment -- how? >>> >> >> I like this idea a lot. >> >> I would love to see a simple "hello world!" level example of >> Environments. >> If someone could make an EnvironmentsDemoProject that opens a new project >> with >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', >> I think it might really help me to understand how to use Environments. >> >> Dave >> >> > > From frank.shearar at gmail.com Thu Sep 29 18:57:09 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Sep 29 18:57:12 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: On 29 September 2016 at 10:42, H. Hirzel wrote: > On 9/29/16, Frank Shearar wrote: > > On 29 September 2016 at 10:10, Nicolas Cellier < > > nicolas.cellier.aka.nice@gmail.com> wrote: > > > >> > >> > >> 2016-09-29 18:39 GMT+02:00 Jakob Reschke > : > >> > >>> Many questions should be answered with tooling here, but in the > >>> particular case I mentioned, IMHO it is not about tooling. Until now, > >>> code that does `Smalltalk at: something` wants to look up something > >>> dynamically or it can't be sure that this class is actually loaded. As > >>> there was only one place to do such lookups, no differentiation about > >>> visibility or the source of a binding was necessary. > >>> > >>> Instances of `Smalltalk at: something` should either be replaced by an > >>> environment aware equivalent that makes clear if a name should be > >>> looked up *only* in the receiving environment (in its declarations), > >>> or if a name should be resolved, looking also in imported environments > >>> (in the bindings). > >> > >> > >> Agree > >> > >> > >>> As it is inconvenient to find all these pieces of > >>> code and change them all, `Smalltalk (globals)` could be the "active" > >>> environment (currently via dynamic scoping with `on: > >>> CurrentEnvironment do: ...`), not the original global environment. > >> > >> > >> I don't like the idea of CurrentEnvironment at all. IMO global state > >> stinks. > >> It would mean that a lotta behavior would change by simply switching one > >> shared variable... > >> I see it more like a not so clever workaround to make tools still work > in > >> presence of environments with minimal changes. > >> > > > > Global state does indeed stink, which is why Environments is so nice, > > because "global" isn't global anymore. > > > > But that's the whole point of CurrentEnvironment - it's a _delimited > > dynamic variable_, turning formerly actually global state into something > > context sensitive. > > Environment current > > is parallel to > > Project current > > I think this is OK. > > @Frank, could you elaborate please what you mean with '_delimited > dynamic variable_' ? > Well, I like to be precise with my terminology. The tl;dr is that a delimited dynamic variable is just like what other people call a dynamic variable, except it plays nicely with stack slicing. The throw-a-Notification-get-an-answer idiom is exactly equivalent to delimited dynamic variables http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-February/176777.html has a bit of a conversation around the topic, and has pointers to in-depth articles on delimited dynamic binding, and I've done my small part in trying to dig into the topic here: http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express-delimited-dynamic-variables/ . Anyway, the fundamental point I was trying to make is that using a Notification (CurrentEnvironment) is exactly avoiding global state, but it seems I missed the point that you and Nicolas were making, around various things having a #environment property. frank > --Hannes > > > frank > > > > > > > >> But > >>> then Environment>>at: must behave sensibly. I would expect that I can > >>> always do `Smalltalk at: #Object` to retrieve `Object` in any > >>> environment (under the assumption that every environment would import > >>> the "Kernel" or original environment). This is currently not the case, > >>> because Environment>>at: looks only into an environment's (own) > >>> declarations, not the imported bindings. > >>> > >>> > >> I don't know. Maybe (Smalltalk at: #Foo) is questionable by itself. > >> VW did introduce #{Foo} ifPresent: [:foo | ] or something like that for > >> deferred bindings. > >> I remind you that Smalltalk itself is a global variable created with a > >> different instance for each environment. > >> > >> Object is in the superclass chain, so we can still access with > superclass > >> superclass ... environment. > >> > >> > >> > >>> 2016-09-29 17:30 GMT+02:00 Nicolas Cellier > >>> >>> l.com>: > >>> > > >>> > > >>> > 2016-09-29 15:15 GMT+02:00 Jakob Reschke > >>> > > >>> : > >>> >> > >>> >> Hi, > >>> >> > >>> >> Environment>>associationAt: is part of the Smalltalk globals > >>> >> Dictionary compatibility interface, right? As a quick and dirty fix, > >>> >> I > >>> >> changed instances of Smalltalk at: xyz in Monticello code to > >>> >> CurrentEnvironment signal at: xyz, but #at: also only reads in the > >>> >> declarations, so myEnvironment at: #MCWriter or myEnvironment at: > >>> >> #Object returns nil by default. It would make more sense to perform > a > >>> >> full lookup via #valueOf:ifAbsent: in #at: and its cousins, wouldn't > >>> >> it? > >>> >> > >>> >> Best, > >>> >> Jakob > >>> >> > >>> > > >>> > I imagine that the question is about tools. > >>> > For now Smalltalk importSelf, so bindings and declarations do agree. > >>> > If an Environment does not importSelf, then some variables will be > >>> > invisibles (unbounds). Do we still want to see them in some tool, or > >>> not? > >>> > What's going on if we play with Alias? Do we want to see the Alias in > >>> some > >>> > browser? If not, then we'd better stick with declarations. > >>> > There is no easy solution. A single facade for two dictionaries > cannot > >>> fit > >>> > all, so we need several different messages. > >>> > But it's much about what we want to do with those environments. > >>> > > >>> > > >>> >> > >>> >> 2016-09-29 7:33 GMT+02:00 H. Hirzel : > >>> >> > On 9/28/16, Nicolas Cellier > >>> wrote: > >>> >> >> Since we are at reviewing Environment, here is a small detail > that > >>> >> >> bothers > >>> >> >> me. I already asked some months ago, but silence was the only > >>> response, > >>> >> >> so > >>> >> >> ping. > >>> >> >> > >>> >> >> Implementation of Environment is sometimes not obvious: > >>> >> >> - Environment>>associationAt: uses declarations inst.var.. > >>> >> >> - Environment>>associationOrUndeclaredAt: uses bindings > inst.var. > >>> >> >> How can it be so different, the selector does not speak, does it? > >>> >> >> > >>> >> >> OK, there is a flag: #review in one of them, but that does not > >>> >> >> make > >>> >> >> code > >>> >> >> clearer, it's just a smell of over-complexity or ill-naming. > >>> >> >> > >>> >> >> Whatever the reason (self explaining code?) Colin does not > comment > >>> >> >> class/methods, that's a fact. > >>> >> > > >>> >> > Alternatively a description of the general ideas and the mechanism > >>> would > >>> >> > help. > >>> >> > > >>> >> > After all Environments is just a clever combination of a few > >>> >> > dictionaries to look up class names? Isn't it? ;-) > >>> >> > > >>> >> > However the fact that people did not move on much finalising the > >>> >> > implementation of environments since 2012 shows that it is hard > to > >>> >> > reverse-engineer the intentions from the (incomplete) code. > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> >> Chris made the effort of commenting Environment but then came > this > >>> >> >> declarations/bindings split, and the comment did rapidly rot. > >>> >> >> We have here an un-healthy statu quo crying for change. > >>> >> >> > >>> >> >> So if we want to at least comment the class with the > >>> >> >> meaning/role/responsibility of inst vars, here is my > >>> >> >> understanding: > >>> >> >> > >>> >> >> environment bind: #Foo to: 0. just add to the declarations. > >>> >> >> (You see how names are not obvious: bind does not bind the new > >>> binding > >>> >> >> to > >>> >> >> bindings). > >>> >> > > >>> >> > Environments > >>> >> > > >>> >> > bind: aSymbol to: anObject > >>> >> > | binding newBinding | > >>> >> > newBinding := aSymbol => anObject. > >>> >> > > >>> >> > binding := declarations associationAt: aSymbol ifAbsent: > >>> [nil]. > >>> >> > binding ifNotNil: > >>> >> > [binding class == newBinding class > >>> >> > ifTrue: [binding value: anObject] > >>> >> > ifFalse: [binding becomeForward: > >>> >> > newBinding]. > >>> >> > ^anObject]. > >>> >> > > >>> >> > binding := undeclared associationAt: aSymbol ifAbsent: > >>> >> > [nil]. > >>> >> > binding > >>> >> > ifNil: [binding := newBinding] > >>> >> > ifNotNil: > >>> >> > [undeclared removeKey: aSymbol. > >>> >> > binding class == newBinding class > >>> >> > ifTrue: [binding value: anObject] > >>> >> > ifFalse: [binding becomeForward: > >>> >> > newBinding]]. > >>> >> > > >>> >> > declarations add: binding. > >>> >> > self binding: binding addedTo: self. > >>> >> > ^anObject > >>> >> > > >>> >> > > >>> >> > Could you elaborate a bit please? > >>> >> > > >>> >> > > >>> >> > > >>> >> > > >>> >> >> If the Environment importSelf, then the ClassBinding/Global also > >>> goes > >>> >> >> to > >>> >> >> bindings... (thru an observer pattern and the magic of naming > >>> policies) > >>> >> >> > >>> >> >> The bindings is what is used by the compiler, so what if an > >>> environment > >>> >> >> does not importSelf? It means that the variable it declares are > >>> >> >> not > >>> >> >> bound, > >>> >> >> so it is not reachable (kind of invisible class/Global). > >>> >> >> > >>> >> >> IOW, the bindings will contain all the imports, including > >>> self-imports. > >>> >> >> importSelf is generally what we want to do, unless weird cases of > >>> >> >> powerless > >>> >> >> environment for obfuscation or trustless sandboxing reason. > >>> >> >> > >>> >> >> Now, associationAt: does not speak for itself. It's too hard to > >>> decide > >>> >> >> if > >>> >> >> we're speaking of own declarations or bindings... Analyzing the > >>> usage > >>> >> >> is > >>> >> >> difficult. bindingAt: would be less ambiguous, so IMO we cannot > >>> >> >> fix > >>> >> >> without > >>> >> >> semantic shift. > >>> >> > > >>> >> > This would need as well elaboration as well a separate thread. > >>> >> > > >>> >> > > >>> >> >> The semantic will be carried by the senders (the Tools), and the > >>> tools > >>> >> >> by > >>> >> >> usage we want to make of Environment. So we first have to define > >>> that: > >>> >> >> what > >>> >> >> feature do we want to support? With which tool? That probably > >>> require > >>> >> >> yet > >>> >> >> another thread... > >>> >> > > >>> >> > Yes > >>> >> > > >>> >> > --Hannes > >>> >> > > >>> >> > >>> > > >>> > >>> > >> > >> > >> > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/e9506d58/attachment-0001.htm From Das.Linux at gmx.de Thu Sep 29 19:19:27 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Sep 29 19:19:31 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <6D60EF71-D9DB-4C33-B708-154EC4333F4C@gmx.de> On 29.09.2016, at 20:57, Frank Shearar wrote: > >> >> Environment current >> >> is parallel to >> >> Project current >> >> I think this is OK. >> >> @Frank, could you elaborate please what you mean with '_delimited >> dynamic variable_' ? > > Well, I like to be precise with my terminology. The tl;dr is that a delimited dynamic variable is just like what other people call a dynamic variable, except it plays nicely with stack slicing. The throw-a-Notification-get-an-answer idiom is exactly equivalent to delimited dynamic variables > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-February/176777.html has a bit of a conversation around the topic, and has pointers to in-depth articles on delimited dynamic binding, and I've done my small part in trying to dig into the topic here: http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express-delimited-dynamic-variables/. > > Anyway, the fundamental point I was trying to make is that using a Notification (CurrentEnvironment) is exactly avoiding global state, but it seems I missed the point that you and Nicolas were making, around various things having a #environment property. A note: The first time I had seen a dynamic variable was in seaside where it is/was used for accessing the 'request context' (Being a web framework, this thingy described the HTTP request received by the framework). To access that, you call self requestContext zork in you seaside class, which boils down to requestContext ^ CurrentRequestContext value And CurrentRequestContext being a Dynamic Variable implemented as Notification. However, since then, we have merged in the DynamicVariable as ProcessSpecificVariable contributed by Martin von L?wis. This provides a more efficient way to 'resolve' the DV to a value, because the Notification-based DV needs to peel the stack and re-built it (particularly hurting Cog) whereas the ProcessSpecificVariable-based DV 'just' needs some Dict-lookups in the current Process. ======== I quite like accessing the current Environment via a dynamic variable, as it exactly provides the control-flow scope that is necessary for this kind of thing. We should however adopt a proper DV here, increasing efficiency and readability. No more 'CurrentEnvironment signal ifNil: [?]' but rather Object>>environment ^ CurrentEnvironment value and DynamicVariable subclass: #CurrentEnvironment instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: '...' and CurrentEnvironment class>>default ^ Smalltalk globals and then, for example EnvironmentLoader>>evaluate: chunk ^ CurrentEnvironment use: environment during: [Compiler evaluate: chunk environment: environment] (not tested, tho) Best regards -Tobias PS: I sometimes call DVs semi-globals. not really global, not really non-global? From commits at source.squeak.org Thu Sep 29 21:55:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Sep 29 21:55:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160929215503.20346.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068974.html Name: EToys-tfel.259 Ancestors: EToys-tfel.258 Another fix for copying Kedama, KedamaPatches need to reference the copy of their world, too, if that was copied. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068975.html Name: Kernel-nice.798 Ancestors: Kernel-nice.797 Better fix for http://bugs.squeak.org/view.php?id=1554 A class variable defined in a superclass should take precedence over a global variable. First look in local class variables. Then look in local sharedPools (a local sharedPool will shadow a super class variable, that sounds fair). Then look in superclass pools. When superclass chain is exhausted, look in the Environment that were provided as parameter. Note that this is mostly squeak 1.x implementation of #scopeHas:ifTrue: (or st-80), except that anEvironment parameter replaces Smalltalk. This way we avoid duplicate lookup of previous workaround. And we never ever look in superclass environment, that's not necessarily ours. This currently breaks some EnvironmentTest because inheriting superclass environment is a cheap and easy way to import all Smalltalk (unless you are not an Object or ProtoObject of course). The longest and proper way would be to properly export some symbols from Smalltalk globals, and import them explicitely in the tested environment. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068976.html Name: Kernel-nice.1042 Ancestors: Kernel-tfel.1041, Kernel-nice.798 Merge Kernel-nice.798 (variable scope fix, don't resolve name in superclass environment) Reminder: this requires some Smalltalk exportSelf. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068977.html Name: Environments-nice.63 Ancestors: Environments-mt.62 Update the class comment of Environment to match current instance variable list. Update the postscript to export Smalltalk bindings. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068978.html Name: Environments-nice.64 Ancestors: Environments-nice.63 Fix the postscript: it's Smalltalk globals that should be exported... Note: Environment stack policies without testing if they already exist, so there's a big danger to exportmore than once! There might be undesired side effects (notifying more than once?) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068979.html Name: EToys-tfel.260 Ancestors: EToys-tfel.259 for performance, write sexp on DataStream ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068980.html Name: EToys-tfel.261 Ancestors: EToys-tfel.260 make ScriptableButtons hold on to their own action scripts, rather than their enclosing paste up morph. Otherwise the button action changes when I drop it in a different world! ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068981.html Name: EToys-tfel.262 Ancestors: EToys-tfel.261 remove a transcript show that was triggered often during compilation of kedama scripts ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068982.html Name: EToys-tfel.263 Ancestors: EToys-tfel.262 - remove two obsolete methods - forward sendLog to the Debugger ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068983.html Name: Morphic-tfel.1311 Ancestors: Morphic-tfel.1310 - scroll to top if the FillInTheBlankMorph has a lot of text - translate the title string of FillInTheBlankMorph ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068984.html Name: Tools-tfel.729 Ancestors: Tools-tfel.728 When the system is set to eToyFriendly, the debugger previously offered to store the log of the error in a text file. To help with keeping track of problems for the people who use Etoys, add some facility so we can offer to send error reports to a server set in a preference. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068985.html Name: EToys-tfel.264 Ancestors: EToys-tfel.263 renamed sendLog to sendReport ============================================= From frank.shearar at gmail.com Fri Sep 30 00:02:00 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Fri Sep 30 00:02:04 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <6D60EF71-D9DB-4C33-B708-154EC4333F4C@gmx.de> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <6D60EF71-D9DB-4C33-B708-154EC4333F4C@gmx.de> Message-ID: On 29 September 2016 at 12:19, Tobias Pape wrote: > > On 29.09.2016, at 20:57, Frank Shearar wrote: > > > >> > >> Environment current > >> > >> is parallel to > >> > >> Project current > >> > >> I think this is OK. > >> > >> @Frank, could you elaborate please what you mean with '_delimited > >> dynamic variable_' ? > > > > Well, I like to be precise with my terminology. The tl;dr is that a > delimited dynamic variable is just like what other people call a dynamic > variable, except it plays nicely with stack slicing. The > throw-a-Notification-get-an-answer idiom is exactly equivalent to > delimited dynamic variables > > > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2014- > February/176777.html has a bit of a conversation around the topic, and > has pointers to in-depth articles on delimited dynamic binding, and I've > done my small part in trying to dig into the topic here: > http://www.lshift.net/blog/2012/06/27/resumable- > exceptions-can-macro-express-delimited-dynamic-variables/. > > > > Anyway, the fundamental point I was trying to make is that using a > Notification (CurrentEnvironment) is exactly avoiding global state, but it > seems I missed the point that you and Nicolas were making, around various > things having a #environment property. > > A note: The first time I had seen a dynamic variable was in seaside where > it is/was used for accessing the 'request context' (Being a web framework, > this thingy described the HTTP request received by the framework). > > To access that, you call > > self requestContext zork > > in you seaside class, which boils down to > > requestContext > > ^ CurrentRequestContext value > > And CurrentRequestContext being a Dynamic Variable implemented as > Notification. > > However, since then, we have merged in the DynamicVariable as > ProcessSpecificVariable contributed by Martin von L?wis. > This provides a more efficient way to 'resolve' the DV to a value, because > the Notification-based DV needs to peel the stack and re-built it > (particularly hurting Cog) whereas the ProcessSpecificVariable-based DV > 'just' needs some Dict-lookups in the current Process. > This is why I like being specific in terminology. Yes, the thing called DynamicVariable in Squeak trunk is a dynamic variable, and not a delimited dynamic variable, which is exactly why you cannot combine using DynamicVariable and stack manipulations. Debugging happens to do said stack manipulations. Yes, the Notification idiom is much less efficient (in its current implementation (*)) than DynamicVariable, but DynamicVariable fundamentally cannot work correctly with stack manipulations. Oleg Kiselyov covers the issue in depth in the various articles linked to from http://okmij.org/ftp/Computation/dynamic-binding.html#DDBinding. (*) I would imagine that VM support would allow for efficient delimited dynamic variables, because Henry Baker wrote a whole pile of papers back in the late 70s on the subject (see http://www.pipeline.com/~hbaker1/home.html, for instance "Shallow Binding Makes Functional Arrays Fast". frank > > ======== > > I quite like accessing the current Environment via a dynamic variable, as > it exactly provides the control-flow scope that is necessary for this kind > of thing. > > We should however adopt a proper DV here, increasing efficiency and > readability. > No more 'CurrentEnvironment signal ifNil: [?]' > > but rather > > Object>>environment > > ^ CurrentEnvironment value > > and > > DynamicVariable subclass: #CurrentEnvironment > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: '...' > and > CurrentEnvironment class>>default > > ^ Smalltalk globals > > and then, for example > > EnvironmentLoader>>evaluate: chunk > > ^ CurrentEnvironment use: environment during: > [Compiler evaluate: chunk environment: environment] > > > (not tested, tho) > > Best regards > -Tobias > > PS: I sometimes call DVs semi-globals. not really global, not really > non-global? > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160929/ee3abb56/attachment.htm From commits at source.squeak.org Fri Sep 30 08:40:46 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 30 08:40:49 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.265.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.265.mcz ==================== Summary ==================== Name: EToys-tfel.265 Author: tfel Time: 30 September 2016, 10:40:09.643046 am UUID: bc1d4833-2a0a-e64f-8cbd-b63fc582cdd5 Ancestors: EToys-tfel.264 - remove the old KedamaVectorizer class - remove all autogenerated methods - make it so that any user defined script call to a turtle forces the surrounding conditionals be sequentially executed. this can be optimized further, but considering we'll rewrite this entire thing anyway, it might not be worth it right now. =============== Diff against EToys-tfel.264 =============== Item was removed: - ----- Method: AssignmentNode>>assignmentMsgType (in category '*Etoys-Tweak-Kedama-Generated') ----- - assignmentMsgType - ^ #assignment! Item was removed: - ----- Method: AssignmentNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: AssignmentNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: AssignmentNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: AssignmentNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: AssignmentNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: AssignmentNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: AssignmentNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: AssignmentNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: AssignmentNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: BlockNode>>blockRewriteInfo:statementType:primaryBreedPair: (in category '*Etoys-Tweak-Kedama-Generated') ----- - blockRewriteInfo: t1 statementType: t2 primaryBreedPair: t3 - (#(#parallel #sequential #die ) includes: t2) - ifFalse: [^ t1]. - t3 - ifNil: [^ t1]. - ^ Array with: t3 first with: 'var' , t3 first identityHash printString , self identityHash printString! Item was removed: - ----- Method: BlockNode>>blockType:parentMessageType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - blockType: t1 parentMessageType: t2 - t1 = #none - ifTrue: [^ #top]. - t2 = #condition - ifTrue: [^ #condition]. - t2 = #sequential - ifTrue: [^ #sequential]. - ^ #default! Item was removed: - ----- Method: BlockNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: BlockNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: BlockNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: BlockNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: BlockNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: BlockNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: BlockNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: BlockNode>>isTopStmtForBlock: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmtForBlock: t1 - t1 = nil - ifTrue: [^ nil]. - ^ false! Item was removed: - ----- Method: BlockNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: BlockNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: BlockNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: BraceNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: BraceNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: BraceNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: BraceNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: BraceNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: BraceNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: BraceNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: BraceNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: BraceNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: CascadeNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: CascadeNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: CascadeNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: CascadeNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: CascadeNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: CascadeNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: CascadeNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: CascadeNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: CascadeNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: CommentNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: CommentNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: CommentNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: CommentNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: CommentNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: CommentNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: CommentNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: CommentNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: CommentNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was changed: ----- Method: KedamaAttributeEvaluator class>>clearGeneratedMethodsFrom: (in category 'as yet unclassified') ----- clearGeneratedMethodsFrom: rootClass " self clearGeneratedMethodsFrom: ParseNode " (rootClass allSubclasses copyWith: rootClass) do: [:cls | + #('*Autogenerated-Kedama' '*Autogenerated-Kedama-accessing') do: [:cat | - #('*Etoys-Tweak-Kedama-Generated' '*Etoys-Tweak-Kedama-accessing') do: [:cat | (cls organization listAtCategoryNamed: cat) do: [:sel | cls removeSelectorSilently: sel. ] ]. ]. "(ParseNode organization listAtCategoryNamed: 'accessing') do: [:sel | ParseNode removeSelectorSilently: sel ]. " ! Item was changed: ----- Method: KedamaAttributeEvaluator>>compileEvaluator (in category 'actions') ----- compileEvaluator | meth | semanticRules associationsDo: [:assoc | assoc value do: [:rule | meth := rule ruleText. Debug == true ifTrue: [ Transcript show: assoc key name; cr; show: meth; cr. ]. + assoc key compileSilently: meth classified: '*Autogenerated-Kedama'. - assoc key compileSilently: meth classified: '*Etoys-Tweak-Kedama-Generated'. ]. ]. ! Item was changed: ----- Method: KedamaAttributeEvaluator>>generateInstVarAndAccessor:forGrammarClass: (in category 'private') ----- generateInstVarAndAccessor: attrName forGrammarClass: grammarClass | newMessage | newMessage := attrName, ' "Answer the value of ', attrName, '" ^ (KedamaEvaluatorNodeState stateFor: self at: #', attrName, ') value'. + grammarClass compileSilently: newMessage classified: '*Autogenerated-Kedama-accessing' notifying: nil. - grammarClass compileSilently: newMessage classified: '*Etoys-Tweak-Kedama-accessing' notifying: nil. newMessage := 'raw', attrName, ' "Answer the value of ', attrName, '" ^ KedamaEvaluatorNodeState stateFor: self at: #', attrName. + grammarClass compileSilently: newMessage classified: '*Autogenerated-Kedama-accessing' notifying: nil. - grammarClass compileSilently: newMessage classified: '*Etoys-Tweak-Kedama-accessing' notifying: nil. newMessage := attrName, ':', ' anObject "Set the value of ', attrName, '" KedamaEvaluatorNodeState stateFor: self at: #', attrName, ' put: anObject'. + grammarClass compileSilently: newMessage classified: '*Autogenerated-Kedama-accessing' notifying: nil - grammarClass compileSilently: newMessage classified: '*Etoys-Tweak-Kedama-accessing' notifying: nil ! Item was changed: ----- Method: KedamaExamplerPlayer>>copyAllMethodsAgain2 (in category '*Etoys-Squeakland-debug support') ----- copyAllMethodsAgain2 | c result | c := turtles class. result := (ClassBuilder new) name: c name inEnvironment: c environment subclassOf: c superclass type: c typeOfClass instanceVariableNames: KedamaTurtleVectorPlayer2 instanceVariablesString classVariableNames: KedamaTurtleVectorPlayer2 classVariablesString poolDictionaries: KedamaTurtleVectorPlayer2 sharedPoolsString category: Object categoryForUniclasses. turtles class copyAllCategoriesUnobtrusivelyFrom: KedamaTurtleVectorPlayer2. sequentialStub ifNotNil: [sequentialStub class copyAllCategoriesUnobtrusivelyFrom: KedamaSequenceExecutionStub]. self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" + c superclass environment forgetClass: result logged: false. - result environment forgetClass: result logged: false. c superclass removeSubclass: result. ! Item was added: + ----- Method: KedamaExamplerPlayer>>selectorIncludesSequentialCommand: (in category '*Etoys-Squeakland-testing') ----- + selectorIncludesSequentialCommand: aSymbol + + self flag: #todo. "for now we go sequential for any user defined script" + ^ self class scripts includesKey: aSymbol "(self class sourceCodeAt: aSymbol) + includesSubstring: 'doSequentialCommand:'"! Item was changed: ----- Method: KedamaTurtleMethodAttributionDefinition2 class>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category 'rules') ----- determineStatementType: parentStmtType fromDict: dict primaryBreedPair: myPrimaryBreedPair messageType: myMessageType isStatement: myIsStatement receiverObject: myReceiverObject | vectorTurtle turtleSelectors participants reads writes unknownReceiverSelectors | "Do the calculation only at the statement level." myIsStatement ifFalse: [^ parentStmtType]. "If there is a doSequentially: block, the block is sequential." participants := dict at: self. (participants select: [:e | (e first notNil and: [e first isPrototypeTurtlePlayer])]) size = 0 ifTrue: [^ #none]. myMessageType = #sequential ifTrue: [^ #sequential]. parentStmtType = #sequential ifTrue: [^ #sequential]. "If there is not turtle involved in the statement, it is not transformed." myPrimaryBreedPair ifNil: [^ #none]. vectorTurtle := myPrimaryBreedPair first. myMessageType = #condition ifTrue: [ reads := IdentitySet new. writes := IdentitySet new. participants do: [:list | + ((list first = vectorTurtle) and: [list fifth = #testBody and: [list fourth isNil and: [ + vectorTurtle selectorIncludesSequentialCommand: list second]]]) + ifTrue: [^ #sequential]. + (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) ~= #read]) ifTrue: [ + list first ifNotNil: [writes add: list first]]. + (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) = #read]) ifTrue: [ + list first ifNotNil: [reads add: list first]]. - (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) ~= #read]) ifTrue: [list first ifNotNil: [writes add: list first]]. - (((list at: 5) = #testBody or: [(list at: 5) = #testCond]) and: [(list at: 4) = #read]) ifTrue: [list first ifNotNil: [reads add: list first]]. ]. ((writes intersection: reads) copyWithout: vectorTurtle) ifNotEmpty: [ ^ #sequential ]. ^ #parallel. ]. reads := IdentitySet new. writes := IdentitySet new. turtleSelectors := OrderedCollection new. unknownReceiverSelectors := OrderedCollection new. participants do: [:list | list first = vectorTurtle ifTrue: [ ((vectorTurtle isBreedSelector: list second) or: [ (vectorTurtle isUserDefinedSelector: list second)]) ifFalse: [ + turtleSelectors add: list second. - turtleSelectors add: list second ]. ]. list first ifNil: [unknownReceiverSelectors add: list second] ifNotNil: [ ((list at: 4) == #read) ifTrue: [reads add: list first]. ((list at: 4) == #read) ifFalse: [writes add: list first]. ]. (vectorTurtle containsSequentialSelector: list second) ifTrue: [^ #sequential]. ]. (turtleSelectors includes: #die) ifTrue: [^ #die]. (((self isKindOf: AssignmentNode) and: [myReceiverObject = vectorTurtle]) and: [vectorTurtle isBreedSelector: self property property]) ifTrue: [^ #none]. (vectorTurtle areOkaySelectors: unknownReceiverSelectors) ifFalse: [ ^ #sequential. ]. (vectorTurtle vectorizableTheseSelectors: turtleSelectors) ifFalse: [^ #sequential]. ((reads intersection: writes) copyWithout: vectorTurtle) ifNotEmpty: [^ #sequential]. "Check the hard way. If any leaf nodes" self nodesDo: [:node | (node isMessageNode and: [vectorTurtle containsSequentialSelector: node selector]) ifTrue: [^ #sequential]]. ^ #parallel. ! Item was removed: - Object subclass: #KedamaVectorizer - instanceVariableNames: 'attributes root' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-StarSqueak'! Item was removed: - ----- Method: KedamaVectorizer>>checkFirstPairFor:in: (in category 'private') ----- - checkFirstPairFor: stmt in: obj - - ^ self checkRequireVectorIn: stmt for: obj. - " - - | receiver selector ret | - receiver := Compiler evaluate: (self getReceiverFromStatement: stmt) name for: obj logged: false. - selector := (self getSelectorFromStatement: stmt) key. - ret := self isVectorizationRequiredWithPlayer: receiver andSelector: selector. - attributes setAttribute: #firstTurtle of: stmt to: receiver. - attributes setAttribute: #requireVector of: stmt to: ret. - ^ ret. - "! Item was removed: - ----- Method: KedamaVectorizer>>checkRequireVectorIn:for: (in category 'private') ----- - checkRequireVectorIn: aMessageNode for: obj - - | players playersSet playerNodes | - "self halt." - playerNodes := self getAllPlayersIn: aMessageNode for: obj. - players := playerNodes collect: [:e | Compiler evaluate: e name for: obj.]. - playersSet := players asSet. - (playersSet select: [:e | e isPrototypeTurtlePlayer]) size = 0 ifTrue: [ - attributes setAttribute: #firstTurtle of: aMessageNode to: (Compiler evaluate: playerNodes first name for: obj). - attributes setAttribute: #requireVector of: aMessageNode to: false. - ^ self. - ]. - (playersSet select: [:e | e isPrototypeTurtlePlayer]) size > 0 ifTrue: [ - playerNodes with: players do: [:n :p | | sel | - p isPrototypeTurtlePlayer ifTrue: [ - sel := self getSelectorRootFor: p fromMessageNode: aMessageNode for: obj ignoreSelectors: #(beNotZero: setTurtleCount: getTurtleCount setGrouped: getGrouped). - sel ifNotNil: [ - (self isVectorizationRequiredWithPlayer: p andSelector: sel) ifTrue: [ - attributes setAttribute: #requireVector of: aMessageNode to: true. - attributes setAttribute: #firstTurtle of: aMessageNode to: p. - attributes setAttribute: #firstNode of: aMessageNode to: n. - ^ self. - ]. - ]. - ]. - ]. - ]. - - attributes setAttribute: #firstTurtle of: aMessageNode to: players first. - attributes setAttribute: #requireVector of: aMessageNode to: false. - ! Item was removed: - ----- Method: KedamaVectorizer>>getAllPlayersIn:for: (in category 'player and selector look up') ----- - getAllPlayersIn: aMessageNode for: obj - - | aCollection | - aCollection := OrderedCollection new. - self getPlayersMessage: aMessageNode for: obj into: aCollection. - ^ aCollection. - ! Item was removed: - ----- Method: KedamaVectorizer>>getAllPlayersInMethodNode:for: (in category 'player and selector look up') ----- - getAllPlayersInMethodNode: aMethodNode for: obj - - | aCollection | - aCollection := OrderedCollection new. - aMethodNode block statements do: [:stmt | - (stmt isMemberOf: MessageNode) ifTrue: [ - self getPlayersMessage: stmt for: obj into: aCollection. - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self getPlayersBlock: stmt for: obj into: aCollection. - ]. - ]. - ^ aCollection. - ! Item was removed: - ----- Method: KedamaVectorizer>>getPlayersBlock:for:into: (in category 'player and selector look up') ----- - getPlayersBlock: aBlockNode for: obj into: aCollection - - - | statements | - statements := aBlockNode statements. - statements do: [:stmt | - (stmt isMemberOf: MessageNode) ifTrue: [ - self getPlayersMessage: stmt for: obj into: aCollection. - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self getPlayersBlock: stmt for: obj into: aCollection.. - ]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>getPlayersMessage:for:into: (in category 'player and selector look up') ----- - getPlayersMessage: aMessageNode for: obj into: aCollection - - - ((Array with: aMessageNode receiver), aMessageNode arguments) do: [:stmt | | thisPlayer | - (stmt isMemberOf: MessageNode) ifTrue: [ - self getPlayersMessage: stmt for: obj into: aCollection. - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self getPlayersBlock: stmt for: obj into: aCollection.. - ]. - (stmt isMemberOf: VariableNode) ifTrue: [ - thisPlayer := Compiler evaluate: stmt name for: obj. - (thisPlayer isKindOf: Player) ifTrue: [aCollection add: stmt]. - ]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>getSelectorFor:fromBlockNode:for:ifFoundDo:ignoreSelectors: (in category 'player and selector look up') ----- - getSelectorFor: receiver fromBlockNode: aBlockNode for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - - root ifNotNil: [^ self]. - aBlockNode statements do: [:stmt | - (stmt isMemberOf: MessageNode) ifTrue: [ - self getSelectorFor: receiver fromMessageNode: stmt for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self getSelectorFor: receiver fromBlockNode: stmt for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - ]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>getSelectorFor:fromMessageNode:for:ifFoundDo:ignoreSelectors: (in category 'player and selector look up') ----- - getSelectorFor: receiver fromMessageNode: aMessageNode for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - - - root ifNotNil: [^ self]. - (Array with: aMessageNode receiver), aMessageNode arguments do: [:stmt | | key thisPlayer | - (stmt isMemberOf: VariableNode) ifTrue: [ - thisPlayer := Compiler evaluate: stmt name for: obj. - thisPlayer == receiver ifTrue: [ - key := aMessageNode selector key. - (ignoreSelectors includes: key) ifFalse: [aBlock value: key. ^ self]]. - ]. - (stmt isMemberOf: MessageNode) ifTrue: [ - self getSelectorFor: receiver fromMessageNode: stmt for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self getSelectorFor: receiver fromBlockNode: stmt for: obj ifFoundDo: aBlock ignoreSelectors: ignoreSelectors - ]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>getSelectorRootFor:fromMessageNode:for:ignoreSelectors: (in category 'player and selector look up') ----- - getSelectorRootFor: receiver fromMessageNode: aMessageNode for: obj ignoreSelectors: ignoreSelectors - - | val | - root := nil. - self getSelectorFor: receiver fromMessageNode: aMessageNode for: obj ifFoundDo: [:sel | root := sel] ignoreSelectors: ignoreSelectors. - val := root. - root := nil. - ^ val. - ! Item was removed: - ----- Method: KedamaVectorizer>>includesTurtlePlayer:for: (in category 'entry point') ----- - includesTurtlePlayer: aMethodNode for: obj - - | players | - players := self getAllPlayersInMethodNode: aMethodNode for: obj. - players do: [:e | | p | - p := Compiler evaluate: e name for: obj. - (p isKindOf: KedamaExamplerPlayer) ifTrue: [^ true]. - ]. - ^ false. - ! Item was removed: - ----- Method: KedamaVectorizer>>initialize (in category 'initialization') ----- - initialize - - attributes := KedamaAttributeDictionary new initialize. - ! Item was removed: - ----- Method: KedamaVectorizer>>insertTurtleCommandAt:in:variableNode:from:firstReceiverName: (in category 'insert block node') ----- - insertTurtleCommandAt: index in: statements variableNode: varNode from: encoder firstReceiverName: origName - - | messageNode blockNode newMessageNode selector | - messageNode := statements at: index. - (attributes getAttribute: #requireVector of: messageNode) ifFalse: [^ self]. - blockNode := BlockNode new arguments: (Array with: varNode) statements: (Array with: messageNode) returns: false from: encoder. - selector := (attributes getAttribute: #dieMessage of: messageNode) ifNotNil: [#doDieCommand:]. - selector ifNil: [ - selector := (attributes getAttribute: #constant of: messageNode) ifTrue: [#doCommand:] ifFalse: [#doSequentialCommand:]. - ]. - - newMessageNode := MessageNode new - receiver: (encoder encodeVariable: origName) - selector: selector - arguments: (Array with: blockNode) - precedence: 3 - from: encoder - sourceRange: nil. - - statements at: index put: newMessageNode. - ! Item was removed: - ----- Method: KedamaVectorizer>>isScalarizable:andSelector: (in category 'private') ----- - isScalarizable: aPlayer andSelector: selector - - (aPlayer isKindOf: Player) ifFalse: [^ false]. - aPlayer isPrototypeTurtlePlayer ifFalse: [^ false]. - - (#(getX getY getHeading getAngleTo: getDistanceTo: getUphillIn: getReplicated color) includes: selector) ifTrue: [^ true]. - - ^ ((aPlayer class organization listAtCategoryNamed: 'access') select: [:sel | sel beginsWith: 'get']) includes: selector. - ! Item was removed: - ----- Method: KedamaVectorizer>>isVectorizationRequiredWithPlayer:andSelector: (in category 'private') ----- - isVectorizationRequiredWithPlayer: aPlayer andSelector: selector - - (aPlayer isKindOf: Player) ifFalse: [^ false]. - aPlayer isPrototypeTurtlePlayer ifFalse: [^ false]. - - ^ (#(setTurtleCount: getTurtleCount setGrouped: getGrouped) includes: selector) not. - ! Item was removed: - ----- Method: KedamaVectorizer>>replace:with:inBlockNode: (in category 'replace receiver') ----- - replace: varName with: newNode inBlockNode: aBlockNode - - aBlockNode statements do: [:e | - (e isMemberOf: MessageNode) ifTrue: [ - self replace: varName with: newNode inMessageNode: e. - ]. - (e isMemberOf: BlockNode) ifTrue: [ - self replace: varName with: newNode inBlockNode: e. - ]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>replace:with:inMessageNode: (in category 'replace receiver') ----- - replace: varName with: newNode inMessageNode: aMessageNode - - | receiver att | - aMessageNode arguments withIndexDo: [:e :index | - (e isMemberOf: MessageNode) ifTrue: [ - self replace: varName with: newNode inMessageNode: e. - ]. - (e isMemberOf: BlockNode) ifTrue: [ - self replace: varName with: newNode inBlockNode: e. - ]. - (e isMemberOf: VariableNode) ifTrue: [ - att := attributes getAttribute: #isTurtle of: e. - ((att notNil & att) and: [e name = varName]) ifTrue: [aMessageNode arguments at: index put: newNode]. - ]. - - ]. - - receiver := aMessageNode receiver. - (receiver isMemberOf: MessageNode) ifTrue: [ - self replace: varName with: newNode inMessageNode: receiver. - ]. - - (receiver isMemberOf: VariableNode) ifTrue: [ - att := attributes getAttribute: #isTurtle of: receiver. - ((att notNil & att) and: [receiver name = varName]) ifTrue: [aMessageNode receiver: newNode]. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>replaceRoot:with:inMessageNode: (in category 'replace receiver') ----- - replaceRoot: varName with: newNode inMessageNode: aMessageNode - - (attributes getAttribute: #requireVector of: aMessageNode) ifFalse: [^ self]. - - (aMessageNode isMemberOf: MessageNode) ifTrue: [ - self replace: varName with: newNode inMessageNode: aMessageNode. - ]. - (aMessageNode isMemberOf: BlockNode) ifTrue: [ - self replace: varName with: newNode inBlockNode: aMessageNode. - ]. - ! Item was removed: - ----- Method: KedamaVectorizer>>traverseBlock:in:firstPlayer:inCondition: (in category 'vectorization attribute calculation') ----- - traverseBlock: aBlockNode in: obj firstPlayer: firstPlayer inCondition: inCondition - - | value statements | - statements := aBlockNode statements. - statements do: [:stmt | - (stmt isMemberOf: MessageNode) ifTrue: [ - self traverseMessage: stmt in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (stmt isMemberOf: BlockNode) ifTrue: [ - self traverseBlock: stmt in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (stmt isMemberOf: VariableNode) ifTrue: [ - attributes setAttribute: #constant of: stmt to: false - ]. - (stmt isMemberOf: LiteralNode) ifTrue: [ - attributes setAttribute: #constant of: stmt to: true - ]. - ]. - value := statements allSatisfy: [:stmt | attributes getAttribute: #constant of: stmt]. - - attributes setAttribute: #constant of: aBlockNode to: value. - ! Item was removed: - ----- Method: KedamaVectorizer>>traverseMessage:in:firstPlayer:inCondition: (in category 'vectorization attribute calculation') ----- - traverseMessage: aMessageNode in: obj firstPlayer: firstPlayer inCondition: inCondition - - | receiver thisPlayer ret constant proto | - - aMessageNode arguments do: [:argument | - (argument isMemberOf: MessageNode) ifTrue: [ - self traverseMessage: argument in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (argument isMemberOf: BlockNode) ifTrue: [ - self traverseBlock: argument in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (argument isMemberOf: LiteralNode) ifTrue: [ - attributes setAttribute: #constant of: argument to: true. - ]. - (argument isMemberOf: VariableNode) ifTrue: [ - thisPlayer := Compiler evaluate: argument name for: obj. - ret := (thisPlayer isKindOf: Player) and: [thisPlayer costume renderedMorph isKindOf: KedamaPatchMorph]. - attributes setAttribute: #constant of: argument to: ret. - ]. - ]. - - receiver := aMessageNode receiver. - (receiver isMemberOf: MessageNode) ifTrue: [ - self traverseMessage: receiver in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (receiver isMemberOf: BlockNode) ifTrue: [ - self traverseBlock: receiver in: obj firstPlayer: firstPlayer inCondition: inCondition. - ]. - (receiver isMemberOf: LiteralNode) ifTrue: [ - attributes setAttribute: #constant of: receiver to: true. - ]. - (receiver isMemberOf: VariableNode) ifTrue: [ - thisPlayer := Compiler evaluate: receiver name for: obj. - ret := thisPlayer == firstPlayer. - attributes setAttribute: #constant of: receiver to: ret. - proto := (thisPlayer isKindOf: Player) and: [thisPlayer isPrototypeTurtlePlayer]. - attributes setAttribute: #isTurtle of: receiver to: proto. - attributes setAttribute: #scalar of: aMessageNode selector to: - (ret not and: [(proto and: [self isScalarizable: thisPlayer andSelector: aMessageNode selector key])]). - ]. - - "special cases..." - (#(atRandom die getReplicated bounceOn: bounceOn:color: bounceOnColor: ifTrue: ifFalse: ifTrue:ifFalse: itFalse:ifTrue: - setPatchValueIn:to: getTurtleAt: getTurtleOf:) includes: aMessageNode selector key) ifTrue: [ - attributes setAttribute: #constant of: aMessageNode to: false. - aMessageNode selector key = #die ifTrue: [ - attributes setAttribute: #dieMessage of: root to: true. - ]. - - ] ifFalse: [ - constant := (aMessageNode arguments copyWith: receiver) allSatisfy: [:t | attributes getAttribute: #constant of: t]. - attributes setAttribute: #constant of: aMessageNode to: constant. - ]. - - ! Item was removed: - ----- Method: KedamaVectorizer>>traverseMessageRoot:in:firstPlayer: (in category 'vectorization attribute calculation') ----- - traverseMessageRoot: aMessageNode in: obj firstPlayer: firstPlayer - - | inCondition | - inCondition := #(ifTrue: ifFalse: ifTrue:ifFalse:) includes: aMessageNode selector key. - - root := aMessageNode. - - self traverseMessage: aMessageNode in: obj firstPlayer: firstPlayer inCondition: inCondition. - ! Item was removed: - ----- Method: KedamaVectorizer>>vectorize:object: (in category 'entry point') ----- - vectorize: aMethodNode object: obj - - aMethodNode block statements withIndexDo: [:stmt :index | - (stmt isMemberOf: MessageNode) ifTrue: [ - self checkFirstPairFor: stmt in: obj. - self traverseMessageRoot: stmt in: obj firstPlayer: (attributes getAttribute: #firstTurtle of: stmt). - ]. - - (stmt isMemberOf: MessageNode) ifTrue: [ - self vectorizeAt: index inMethodNode: aMethodNode. - ]. - ]. - - ^ aMethodNode. - - - ! Item was removed: - ----- Method: KedamaVectorizer>>vectorizeAt:inMethodNode: (in category 'private') ----- - vectorizeAt: index inMethodNode: aMethodNode - - | v encoder origReceiverName origReceiver aMessageNode | - aMessageNode := aMethodNode block statements at: index. - (attributes getAttribute: #requireVector of: aMessageNode) ifFalse: [^ self]. - - encoder := aMethodNode encoder. - encoder autoBind: 'xxxObj'. - v := encoder encodeVariable: 'xxxObj' sourceRange: nil ifUnknown: []. - origReceiver := attributes getAttribute: #firstNode of: aMessageNode. - (origReceiver isMemberOf: VariableNode) ifTrue: [ - origReceiverName := origReceiver name. - ] ifFalse: [ - origReceiverName := 'self'. - ]. - - self replaceRoot: origReceiverName with: v inMessageNode: aMessageNode. - "self changeSelectorAt: index inMethodNode: aMethodNode." - self insertTurtleCommandAt: index in: aMethodNode block statements variableNode: v from: encoder firstReceiverName: origReceiverName. - - ! Item was removed: - ----- Method: LeafNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: LeafNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: LeafNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: LeafNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: LeafNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: LeafNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: LeafNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: LeafNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: LeafNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: LeafNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: LiteralNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: LiteralNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: LiteralNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: LiteralNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: LiteralNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: LiteralNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: LiteralNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: LiteralNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: LiteralNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: LiteralNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: LiteralVariableNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: LiteralVariableNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: LiteralVariableNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: LiteralVariableNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: LiteralVariableNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: LiteralVariableNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: LiteralVariableNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: LiteralVariableNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: LiteralVariableNode>>rewriteVariable:with:rewriteInfo: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rewriteVariable: t1 with: t2 rewriteInfo: t3 - t2 - ifNil: [^ nil]. - t2 first = t1 - ifTrue: [^ t3]. - ^ nil! Item was removed: - ----- Method: LiteralVariableNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: LiteralVariableNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: LiteralVariableNode>>variableReceiver: (in category '*Etoys-Tweak-Kedama-Generated') ----- - variableReceiver: t1 - | t2 t3 | - (self key isKindOf: LookupKey) - ifTrue: [^ self key value]. - t3 := self key. - t2 := Compiler new - evaluate: t3 asString - in: nil - to: t1 - notifying: nil - ifFail: [] - logged: false. - ^ t2! Item was removed: - ----- Method: MessageAsTempNode>>addNodeInfoTo:receiverObject:stmtChain:scriptReceiver:messageType:isStatement:isInTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - addNodeInfoTo: t1 receiverObject: t2 stmtChain: t3 scriptReceiver: t4 messageType: t5 isStatement: t6 isInTest: t7 parentNode: t8 - | t9 t10 t11 t12 t13 t14 t15 t16 t17 | - t12 := WriteStream - on: (Array new: 2). - t13 := #none. - t16 := Player readOrWriteOrNil: self selector key. - t14 := t3 - inject: false - into: [:t18 :t19 | t18 - | (t19 at: 2)]. - (t14 - and: [t7 not]) - ifTrue: [t13 := #testBody]. - t7 - ifTrue: [t13 := #testCond]. - t7 - ifTrue: [t15 := t3 reverse - detect: [:t18 | t18 second] - ifNone: [self halt]. - (t1 at: t15 first) - add: (Array - with: t2 - with: self selector - with: self receiver - with: #read - with: t13). - ^ t1]. - self receiver isLeaf - ifTrue: [t2 isPlayerLike - ifTrue: [(#(#getPatchValueIn: #setPatchValueIn:to: ) includes: self selector key) - ifTrue: [t17 := self selector key = #getPatchValueIn:. - t9 := self arguments first. - t9 isLeaf - ifTrue: [t10 := (t9 key isKindOf: LookupKey) - ifTrue: [t9 key key] - ifFalse: [t9 key]. - t11 := Compiler - evaluate: t10 - for: t4 - notifying: nil - logged: false. - t12 - nextPut: (Array - with: t11 - with: self selector key - with: self receiver key - with: (t17 - ifTrue: [#read] - ifFalse: [#write]) - with: t13). - t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: (t17 - ifTrue: [#write] - ifFalse: [#read]) - with: t13)] - ifFalse: [t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: #read - with: t13)]] - ifFalse: [t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: t16 - with: t13)]]] - ifFalse: [(t6 - and: [t5 ~~ #condition]) - ifTrue: [t12 - nextPut: (Array - with: nil - with: self selector key - with: self receiver - with: t16 - with: t13)]]. - t12 contents - do: [:t18 | t3 - do: [:t19 | (t1 - at: (t19 at: 1)) - addFirst: t18]]. - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>addToStmtChain:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - addToStmtChain: t1 isStatement: t2 - | t3 | - t3 := self messageType value = #condition. - t2 - ifTrue: [^ t1 - copyWith: (Array with: self with: t3)]. - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: MessageAsTempNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: MessageAsTempNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- - determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 - | t7 t8 t9 t10 t11 t13 | - t5 - ifFalse: [^ t1]. - t9 := t2 at: self. - (t9 - select: [:t14 | t14 first notNil - and: [t14 first isPrototypeTurtlePlayer]]) size = 0 - ifTrue: [^ #none]. - t4 = #sequential - ifTrue: [^ #sequential]. - t1 = #sequential - ifTrue: [^ #sequential]. - t3 - ifNil: [^ #none]. - t7 := t3 first. - t4 = #condition - ifTrue: [t11 := IdentitySet new. - t13 := IdentitySet new. - t9 - do: [:t14 | - (((t14 at: 5) - = #testBody - or: [(t14 at: 5) - = #testCond]) - and: [(t14 at: 4) - ~= #read]) - ifTrue: [t14 first - ifNotNil: [t13 add: t14 first]]. - (((t14 at: 5) - = #testBody - or: [(t14 at: 5) - = #testCond]) - and: [(t14 at: 4) - = #read]) - ifTrue: [t14 first - ifNotNil: [t11 add: t14 first]]]. - ((t13 intersection: t11) - copyWithout: t7) - ifNotEmpty: [^ #sequential]. - ^ #parallel]. - t11 := IdentitySet new. - t13 := IdentitySet new. - t8 := OrderedCollection new. - t10 := OrderedCollection new. - t9 - do: [:t14 | - t14 first = t7 - ifTrue: [((t7 isBreedSelector: t14 second) - or: [t7 isUserDefinedSelector: t14 second]) - ifFalse: [t8 add: t14 second]]. - t14 first - ifNil: [t10 add: t14 second] - ifNotNil: [(t14 at: 4) - == #read - ifTrue: [t11 add: t14 first]. - (t14 at: 4) - == #read - ifFalse: [t13 add: t14 first]]. - (t7 containsSequentialSelector: t14 second) - ifTrue: [^ #sequential]]. - (t8 includes: #die) - ifTrue: [^ #die]. - (((self isKindOf: AssignmentNode) - and: [t6 = t7]) - and: [t7 isBreedSelector: self property property]) - ifTrue: [^ #none]. - (t7 areOkaySelectors: t10) - ifFalse: [^ #sequential]. - (t7 vectorizableTheseSelectors: t8) - ifFalse: [^ #sequential]. - ((t11 intersection: t13) - copyWithout: t7) - ifNotEmpty: [^ #sequential]. - self - nodesDo: [:t14 | (t14 isMessageNode - and: [t7 containsSequentialSelector: t14 selector]) - ifTrue: [^ #sequential]]. - ^ #parallel! Item was removed: - ----- Method: MessageAsTempNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: MessageAsTempNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: MessageAsTempNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: MessageAsTempNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: MessageAsTempNode>>msgType (in category '*Etoys-Tweak-Kedama-Generated') ----- - msgType - (#(#ifTrue: #ifFalse: #ifTrue:ifFalse: #ifFalse:ifTrue: ) includes: self selector key) - ifTrue: [^ #condition]. - (#(#whileTrue: #whileFalse: ) includes: self selector key) - ifTrue: [^ #loop]. - (#(#doSequentially: ) includes: self selector key) - ifTrue: [^ #sequential]. - ^ #none! Item was removed: - ----- Method: MessageAsTempNode>>parentRewriteInfo:primaryBreedPair:isStatement:isTopStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - parentRewriteInfo: t1 primaryBreedPair: t2 isStatement: t3 isTopStatement: t4 - t4 - ifTrue: [t2 - ifNil: [^ t1]. - ^ t2]. - t3 - ifTrue: [t2 - ifNil: [^ t1]. - t1 - ifNil: [^ t1]. - t1 first = t2 first - ifFalse: [^ t2]]. - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>primaryBreedPair:fromDict:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - primaryBreedPair: t1 fromDict: t2 isStatement: t3 - | t4 t5 | - t3 - ifTrue: [t4 := (t2 at: self) - select: [:t6 | t6 first notNil - and: [t6 first isPrototypeTurtlePlayer - and: [(t6 first isBreedSelector: t6 second) not]]]. - (t4 - collect: [:t6 | t6 first]) asSet size = 0 - ifTrue: [^ t1]. - t5 := t4 first third. - ^ Array - with: t4 first first - with: ((t5 isKindOf: LookupKey) - ifTrue: [t5 key] - ifFalse: [t5])]. - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>rewriteInfo:statementType:primaryBreedPair:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rewriteInfo: t1 statementType: t2 primaryBreedPair: t3 isStatement: t4 - t4 - ifTrue: [(#(#parallel #sequential #die ) includes: t2) - ifFalse: [^ nil]. - t3 - ifNil: [^ nil]. - ^ Array with: t3 first with: 'var' , t3 first identityHash printString , self identityHash printString]. - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: MessageAsTempNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: MessageAsTempNode>>transfer:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 isStatement: t2 - t2 - ifTrue: [t1 at: self put: OrderedCollection new]. - ^ t1! Item was removed: - ----- Method: MessageNode>>addNodeInfoTo:receiverObject:stmtChain:scriptReceiver:messageType:isStatement:isInTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - addNodeInfoTo: t1 receiverObject: t2 stmtChain: t3 scriptReceiver: t4 messageType: t5 isStatement: t6 isInTest: t7 parentNode: t8 - | t9 t10 t11 t12 t13 t14 t15 t16 t17 | - t12 := WriteStream - on: (Array new: 2). - t13 := #none. - t16 := Player readOrWriteOrNil: self selector key. - t14 := t3 - inject: false - into: [:t18 :t19 | t18 - | (t19 at: 2)]. - (t14 - and: [t7 not]) - ifTrue: [t13 := #testBody]. - t7 - ifTrue: [t13 := #testCond]. - t7 - ifTrue: [t15 := t3 reverse - detect: [:t18 | t18 second] - ifNone: [self halt]. - (t1 at: t15 first) - add: (Array - with: t2 - with: self selector - with: self receiver - with: #read - with: t13). - ^ t1]. - self receiver isLeaf - ifTrue: [t2 isPlayerLike - ifTrue: [(#(#getPatchValueIn: #setPatchValueIn:to: ) includes: self selector key) - ifTrue: [t17 := self selector key = #getPatchValueIn:. - t9 := self arguments first. - t9 isLeaf - ifTrue: [t10 := (t9 key isKindOf: LookupKey) - ifTrue: [t9 key key] - ifFalse: [t9 key]. - t11 := Compiler - evaluate: t10 - for: t4 - notifying: nil - logged: false. - t12 - nextPut: (Array - with: t11 - with: self selector key - with: self receiver key - with: (t17 - ifTrue: [#read] - ifFalse: [#write]) - with: t13). - t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: (t17 - ifTrue: [#write] - ifFalse: [#read]) - with: t13)] - ifFalse: [t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: #read - with: t13)]] - ifFalse: [t12 - nextPut: (Array - with: t2 - with: self selector key - with: self receiver key - with: t16 - with: t13)]]] - ifFalse: [(t6 - and: [t5 ~~ #condition]) - ifTrue: [t12 - nextPut: (Array - with: nil - with: self selector key - with: self receiver - with: t16 - with: t13)]]. - t12 contents - do: [:t18 | t3 - do: [:t19 | (t1 - at: (t19 at: 1)) - addFirst: t18]]. - ^ t1! Item was removed: - ----- Method: MessageNode>>addToStmtChain:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - addToStmtChain: t1 isStatement: t2 - | t3 | - t3 := self messageType value = #condition. - t2 - ifTrue: [^ t1 - copyWith: (Array with: self with: t3)]. - ^ t1! Item was removed: - ----- Method: MessageNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: MessageNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: MessageNode>>determineStatementType:fromDict:primaryBreedPair:messageType:isStatement:receiverObject: (in category '*Etoys-Tweak-Kedama-Generated') ----- - determineStatementType: t1 fromDict: t2 primaryBreedPair: t3 messageType: t4 isStatement: t5 receiverObject: t6 - | t7 t8 t9 t10 t11 t13 | - t5 - ifFalse: [^ t1]. - t9 := t2 at: self. - (t9 - select: [:t14 | t14 first notNil - and: [t14 first isPrototypeTurtlePlayer]]) size = 0 - ifTrue: [^ #none]. - t4 = #sequential - ifTrue: [^ #sequential]. - t1 = #sequential - ifTrue: [^ #sequential]. - t3 - ifNil: [^ #none]. - t7 := t3 first. - t4 = #condition - ifTrue: [t11 := IdentitySet new. - t13 := IdentitySet new. - t9 - do: [:t14 | - (((t14 at: 5) - = #testBody - or: [(t14 at: 5) - = #testCond]) - and: [(t14 at: 4) - ~= #read]) - ifTrue: [t14 first - ifNotNil: [t13 add: t14 first]]. - (((t14 at: 5) - = #testBody - or: [(t14 at: 5) - = #testCond]) - and: [(t14 at: 4) - = #read]) - ifTrue: [t14 first - ifNotNil: [t11 add: t14 first]]]. - ((t13 intersection: t11) - copyWithout: t7) - ifNotEmpty: [^ #sequential]. - ^ #parallel]. - t11 := IdentitySet new. - t13 := IdentitySet new. - t8 := OrderedCollection new. - t10 := OrderedCollection new. - t9 - do: [:t14 | - t14 first = t7 - ifTrue: [((t7 isBreedSelector: t14 second) - or: [t7 isUserDefinedSelector: t14 second]) - ifFalse: [t8 add: t14 second]]. - t14 first - ifNil: [t10 add: t14 second] - ifNotNil: [(t14 at: 4) - == #read - ifTrue: [t11 add: t14 first]. - (t14 at: 4) - == #read - ifFalse: [t13 add: t14 first]]. - (t7 containsSequentialSelector: t14 second) - ifTrue: [^ #sequential]]. - (t8 includes: #die) - ifTrue: [^ #die]. - (((self isKindOf: AssignmentNode) - and: [t6 = t7]) - and: [t7 isBreedSelector: self property property]) - ifTrue: [^ #none]. - (t7 areOkaySelectors: t10) - ifFalse: [^ #sequential]. - (t7 vectorizableTheseSelectors: t8) - ifFalse: [^ #sequential]. - ((t11 intersection: t13) - copyWithout: t7) - ifNotEmpty: [^ #sequential]. - self - nodesDo: [:t14 | (t14 isMessageNode - and: [t7 containsSequentialSelector: t14 selector]) - ifTrue: [^ #sequential]]. - ^ #parallel! Item was removed: - ----- Method: MessageNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: MessageNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: MessageNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: MessageNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: MessageNode>>msgType (in category '*Etoys-Tweak-Kedama-Generated') ----- - msgType - (#(#ifTrue: #ifFalse: #ifTrue:ifFalse: #ifFalse:ifTrue: ) includes: self selector key) - ifTrue: [^ #condition]. - (#(#whileTrue: #whileFalse: ) includes: self selector key) - ifTrue: [^ #loop]. - (#(#doSequentially: ) includes: self selector key) - ifTrue: [^ #sequential]. - ^ #none! Item was removed: - ----- Method: MessageNode>>parentRewriteInfo:primaryBreedPair:isStatement:isTopStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - parentRewriteInfo: t1 primaryBreedPair: t2 isStatement: t3 isTopStatement: t4 - t4 - ifTrue: [t2 - ifNil: [^ t1]. - ^ t2]. - t3 - ifTrue: [t2 - ifNil: [^ t1]. - t1 - ifNil: [^ t1]. - t1 first = t2 first - ifFalse: [^ t2]]. - ^ t1! Item was removed: - ----- Method: MessageNode>>primaryBreedPair:fromDict:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - primaryBreedPair: t1 fromDict: t2 isStatement: t3 - | t4 t5 | - t3 - ifTrue: [t4 := (t2 at: self) - select: [:t6 | t6 first notNil - and: [t6 first isPrototypeTurtlePlayer - and: [(t6 first isBreedSelector: t6 second) not]]]. - (t4 - collect: [:t6 | t6 first]) asSet size = 0 - ifTrue: [^ t1]. - t5 := t4 first third. - ^ Array - with: t4 first first - with: ((t5 isKindOf: LookupKey) - ifTrue: [t5 key] - ifFalse: [t5])]. - ^ t1! Item was removed: - ----- Method: MessageNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: MessageNode>>rewriteInfo:statementType:primaryBreedPair:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rewriteInfo: t1 statementType: t2 primaryBreedPair: t3 isStatement: t4 - t4 - ifTrue: [(#(#parallel #sequential #die ) includes: t2) - ifFalse: [^ nil]. - t3 - ifNil: [^ nil]. - ^ Array with: t3 first with: 'var' , t3 first identityHash printString , self identityHash printString]. - ^ t1! Item was removed: - ----- Method: MessageNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: MessageNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: MessageNode>>transfer:isStatement: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 isStatement: t2 - t2 - ifTrue: [t1 at: self put: OrderedCollection new]. - ^ t1! Item was removed: - ----- Method: MethodNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: MethodNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: MethodNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: MethodNode>>initialBlockType (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialBlockType - ^ #none! Item was removed: - ----- Method: MethodNode>>initialDictForNodeInfo (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialDictForNodeInfo - ^ Dictionary new! Item was removed: - ----- Method: MethodNode>>initialEmptyList (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialEmptyList - ^ #()! Item was removed: - ----- Method: MethodNode>>initialFalse (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialFalse - ^ false! Item was removed: - ----- Method: MethodNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: MethodNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: MethodNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: MethodNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: MethodNode>>rawstart (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawstart - ^ KedamaEvaluatorNodeState stateFor: self at: #start! Item was removed: - ----- Method: MethodNode>>rcvr (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr - ^ true! Item was removed: - ----- Method: MethodNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: MethodNode>>start (in category '*Etoys-Tweak-Kedama-accessing') ----- - start - ^ (KedamaEvaluatorNodeState stateFor: self at: #start) value! Item was removed: - ----- Method: MethodNode>>start: (in category '*Etoys-Tweak-Kedama-accessing') ----- - start: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #start - put: t1! Item was removed: - ----- Method: MethodNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: MethodNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: MethodTempsNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: MethodTempsNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: MethodTempsNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: MethodTempsNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: MethodTempsNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: MethodTempsNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: MethodTempsNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: MethodTempsNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: MethodTempsNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: ParseNode>>blockType (in category '*Etoys-Tweak-Kedama-accessing') ----- - blockType - ^ (KedamaEvaluatorNodeState stateFor: self at: #blockType) value! Item was removed: - ----- Method: ParseNode>>blockType: (in category '*Etoys-Tweak-Kedama-accessing') ----- - blockType: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #blockType - put: t1! Item was removed: - ----- Method: ParseNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: ParseNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: ParseNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: ParseNode>>isInTest (in category '*Etoys-Tweak-Kedama-accessing') ----- - isInTest - ^ (KedamaEvaluatorNodeState stateFor: self at: #isInTest) value! Item was removed: - ----- Method: ParseNode>>isInTest: (in category '*Etoys-Tweak-Kedama-accessing') ----- - isInTest: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #isInTest - put: t1! Item was removed: - ----- Method: ParseNode>>isStatement (in category '*Etoys-Tweak-Kedama-accessing') ----- - isStatement - ^ (KedamaEvaluatorNodeState stateFor: self at: #isStatement) value! Item was removed: - ----- Method: ParseNode>>isStatement: (in category '*Etoys-Tweak-Kedama-accessing') ----- - isStatement: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #isStatement - put: t1! Item was removed: - ----- Method: ParseNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: ParseNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: ParseNode>>isTopStatement (in category '*Etoys-Tweak-Kedama-accessing') ----- - isTopStatement - ^ (KedamaEvaluatorNodeState stateFor: self at: #isTopStatement) value! Item was removed: - ----- Method: ParseNode>>isTopStatement: (in category '*Etoys-Tweak-Kedama-accessing') ----- - isTopStatement: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #isTopStatement - put: t1! Item was removed: - ----- Method: ParseNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: ParseNode>>messageType (in category '*Etoys-Tweak-Kedama-accessing') ----- - messageType - ^ (KedamaEvaluatorNodeState stateFor: self at: #messageType) value! Item was removed: - ----- Method: ParseNode>>messageType: (in category '*Etoys-Tweak-Kedama-accessing') ----- - messageType: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #messageType - put: t1! Item was removed: - ----- Method: ParseNode>>myNode (in category '*Etoys-Tweak-Kedama-accessing') ----- - myNode - ^ (KedamaEvaluatorNodeState stateFor: self at: #myNode) value! Item was removed: - ----- Method: ParseNode>>myNode: (in category '*Etoys-Tweak-Kedama-accessing') ----- - myNode: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #myNode - put: t1! Item was removed: - ----- Method: ParseNode>>nodeInfoIn (in category '*Etoys-Tweak-Kedama-accessing') ----- - nodeInfoIn - ^ (KedamaEvaluatorNodeState stateFor: self at: #nodeInfoIn) value! Item was removed: - ----- Method: ParseNode>>nodeInfoIn: (in category '*Etoys-Tweak-Kedama-accessing') ----- - nodeInfoIn: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #nodeInfoIn - put: t1! Item was removed: - ----- Method: ParseNode>>nodeInfoOut (in category '*Etoys-Tweak-Kedama-accessing') ----- - nodeInfoOut - ^ (KedamaEvaluatorNodeState stateFor: self at: #nodeInfoOut) value! Item was removed: - ----- Method: ParseNode>>nodeInfoOut: (in category '*Etoys-Tweak-Kedama-accessing') ----- - nodeInfoOut: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #nodeInfoOut - put: t1! Item was removed: - ----- Method: ParseNode>>primaryBreedPair (in category '*Etoys-Tweak-Kedama-accessing') ----- - primaryBreedPair - ^ (KedamaEvaluatorNodeState stateFor: self at: #primaryBreedPair) value! Item was removed: - ----- Method: ParseNode>>primaryBreedPair: (in category '*Etoys-Tweak-Kedama-accessing') ----- - primaryBreedPair: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #primaryBreedPair - put: t1! Item was removed: - ----- Method: ParseNode>>rawblockType (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawblockType - ^ KedamaEvaluatorNodeState stateFor: self at: #blockType! Item was removed: - ----- Method: ParseNode>>rawisInTest (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawisInTest - ^ KedamaEvaluatorNodeState stateFor: self at: #isInTest! Item was removed: - ----- Method: ParseNode>>rawisStatement (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawisStatement - ^ KedamaEvaluatorNodeState stateFor: self at: #isStatement! Item was removed: - ----- Method: ParseNode>>rawisTopStatement (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawisTopStatement - ^ KedamaEvaluatorNodeState stateFor: self at: #isTopStatement! Item was removed: - ----- Method: ParseNode>>rawmessageType (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawmessageType - ^ KedamaEvaluatorNodeState stateFor: self at: #messageType! Item was removed: - ----- Method: ParseNode>>rawmyNode (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawmyNode - ^ KedamaEvaluatorNodeState stateFor: self at: #myNode! Item was removed: - ----- Method: ParseNode>>rawnodeInfoIn (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawnodeInfoIn - ^ KedamaEvaluatorNodeState stateFor: self at: #nodeInfoIn! Item was removed: - ----- Method: ParseNode>>rawnodeInfoOut (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawnodeInfoOut - ^ KedamaEvaluatorNodeState stateFor: self at: #nodeInfoOut! Item was removed: - ----- Method: ParseNode>>rawprimaryBreedPair (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawprimaryBreedPair - ^ KedamaEvaluatorNodeState stateFor: self at: #primaryBreedPair! Item was removed: - ----- Method: ParseNode>>rawreceiverObject (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawreceiverObject - ^ KedamaEvaluatorNodeState stateFor: self at: #receiverObject! Item was removed: - ----- Method: ParseNode>>rawrewriteInfoIn (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawrewriteInfoIn - ^ KedamaEvaluatorNodeState stateFor: self at: #rewriteInfoIn! Item was removed: - ----- Method: ParseNode>>rawrewriteInfoOut (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawrewriteInfoOut - ^ KedamaEvaluatorNodeState stateFor: self at: #rewriteInfoOut! Item was removed: - ----- Method: ParseNode>>rawrvr (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawrvr - ^ KedamaEvaluatorNodeState stateFor: self at: #rvr! Item was removed: - ----- Method: ParseNode>>rawstatementType (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawstatementType - ^ KedamaEvaluatorNodeState stateFor: self at: #statementType! Item was removed: - ----- Method: ParseNode>>rawstmtChain (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawstmtChain - ^ KedamaEvaluatorNodeState stateFor: self at: #stmtChain! Item was removed: - ----- Method: ParseNode>>rawxxxOccurences (in category '*Etoys-Tweak-Kedama-accessing') ----- - rawxxxOccurences - ^ KedamaEvaluatorNodeState stateFor: self at: #xxxOccurences! Item was removed: - ----- Method: ParseNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: ParseNode>>receiverObject (in category '*Etoys-Tweak-Kedama-accessing') ----- - receiverObject - ^ (KedamaEvaluatorNodeState stateFor: self at: #receiverObject) value! Item was removed: - ----- Method: ParseNode>>receiverObject: (in category '*Etoys-Tweak-Kedama-accessing') ----- - receiverObject: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #receiverObject - put: t1! Item was removed: - ----- Method: ParseNode>>rewriteInfoIn (in category '*Etoys-Tweak-Kedama-accessing') ----- - rewriteInfoIn - ^ (KedamaEvaluatorNodeState stateFor: self at: #rewriteInfoIn) value! Item was removed: - ----- Method: ParseNode>>rewriteInfoIn: (in category '*Etoys-Tweak-Kedama-accessing') ----- - rewriteInfoIn: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #rewriteInfoIn - put: t1! Item was removed: - ----- Method: ParseNode>>rewriteInfoOut (in category '*Etoys-Tweak-Kedama-accessing') ----- - rewriteInfoOut - ^ (KedamaEvaluatorNodeState stateFor: self at: #rewriteInfoOut) value! Item was removed: - ----- Method: ParseNode>>rewriteInfoOut: (in category '*Etoys-Tweak-Kedama-accessing') ----- - rewriteInfoOut: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #rewriteInfoOut - put: t1! Item was removed: - ----- Method: ParseNode>>rvr (in category '*Etoys-Tweak-Kedama-accessing') ----- - rvr - ^ (KedamaEvaluatorNodeState stateFor: self at: #rvr) value! Item was removed: - ----- Method: ParseNode>>rvr: (in category '*Etoys-Tweak-Kedama-accessing') ----- - rvr: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #rvr - put: t1! Item was removed: - ----- Method: ParseNode>>statementType (in category '*Etoys-Tweak-Kedama-accessing') ----- - statementType - ^ (KedamaEvaluatorNodeState stateFor: self at: #statementType) value! Item was removed: - ----- Method: ParseNode>>statementType: (in category '*Etoys-Tweak-Kedama-accessing') ----- - statementType: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #statementType - put: t1! Item was removed: - ----- Method: ParseNode>>stmtChain (in category '*Etoys-Tweak-Kedama-accessing') ----- - stmtChain - ^ (KedamaEvaluatorNodeState stateFor: self at: #stmtChain) value! Item was removed: - ----- Method: ParseNode>>stmtChain: (in category '*Etoys-Tweak-Kedama-accessing') ----- - stmtChain: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #stmtChain - put: t1! Item was removed: - ----- Method: ParseNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: ParseNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: ParseNode>>xxxOccurences (in category '*Etoys-Tweak-Kedama-accessing') ----- - xxxOccurences - ^ (KedamaEvaluatorNodeState stateFor: self at: #xxxOccurences) value! Item was removed: - ----- Method: ParseNode>>xxxOccurences: (in category '*Etoys-Tweak-Kedama-accessing') ----- - xxxOccurences: t1 - KedamaEvaluatorNodeState - stateFor: self - at: #xxxOccurences - put: t1! Item was changed: ----- Method: Player class>>setNewInstVarNames: (in category 'user-defined inst vars') ----- setNewInstVarNames: listOfStrings "Make listOfStrings be the new list of instance variable names for the receiver" | disappearing firstAppearing instVarString instVarList | instVarList := self instVarNames asOrderedCollection. disappearing := instVarList copy. disappearing removeAllFoundIn: listOfStrings. disappearing do: [:oldName | self removeAccessorsFor: oldName]. firstAppearing := listOfStrings copy. firstAppearing removeAllFoundIn: instVarList. instVarString := String streamContents: [:aStream | listOfStrings do: [:aString | aStream nextPutAll: aString; nextPut: $ ]]. superclass subclass: self name instanceVariableNames: instVarString classVariableNames: '' poolDictionaries: '' category: self categoryForUniclasses. self flag: #todo. self flag: #uniclasses. "Discuss if we really want to hide uniclasses again" + superclass environment forgetClass: self logged: false. - self environment forgetClass: self logged: false. superclass removeSubclass: self. firstAppearing do: [:newName | self compileAccessorsFor: newName]. ! Item was changed: ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') ----- cleanUpEtoysGarbage "Project cleanUpEtoysGarbage" "All these should eventuall go away and be fixed, but for now we have this here." Smalltalk garbageCollect. "Clear weak message sends to remove modal windows from worlds that are closing." (WeakMessageSend allInstances select: [:wm | (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil]. "Clear the weak dictionary on the class side that keeps node state around in the rewriter" KedamaEvaluatorNodeState initialize. "Clear the KedamaEvaluator that holds on to the last Kedama world" ScriptEditorMorph setDefaultEvaluator. "Clear the hard references to player classes, " (Smalltalk organization listAtCategoryNamed: 'UserObjects') do: [:name | Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false]. Player withAllSubclasses select: [:c | c isSystemDefined not] thenDo: [:c | c superclass removeSubclass: c]. "Clear the paste buffer" HandMorph initialize. "Clear the reference to the project tree in SkObject" SkObject initialize. + PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p flushPlayerListCache]]. Smalltalk garbageCollect.! Item was removed: - ----- Method: ReturnNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: ReturnNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: ReturnNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: ReturnNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: ReturnNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: ReturnNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: ReturnNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: ReturnNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: ReturnNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: SelectorNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: SelectorNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: SelectorNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: SelectorNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: SelectorNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: SelectorNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: SelectorNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: SelectorNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: SelectorNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: SelectorNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: TempVariableNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: TempVariableNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: TempVariableNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: TempVariableNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: TempVariableNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: TempVariableNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: TempVariableNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: TempVariableNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: TempVariableNode>>rewriteVariable:with:rewriteInfo: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rewriteVariable: t1 with: t2 rewriteInfo: t3 - t2 - ifNil: [^ nil]. - t2 first = t1 - ifTrue: [^ t3]. - ^ nil! Item was removed: - ----- Method: TempVariableNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: TempVariableNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: TempVariableNode>>variableReceiver: (in category '*Etoys-Tweak-Kedama-Generated') ----- - variableReceiver: t1 - | t2 t3 | - (self key isKindOf: LookupKey) - ifTrue: [^ self key value]. - t3 := self key. - t2 := Compiler new - evaluate: t3 asString - in: nil - to: t1 - notifying: nil - ifFail: [] - logged: false. - ^ t2! Item was removed: - ----- Method: VariableNode>>defaultBlockType: (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultBlockType: t1 - ^ #default! Item was removed: - ----- Method: VariableNode>>defaultMessageType (in category '*Etoys-Tweak-Kedama-Generated') ----- - defaultMessageType - ^ #none! Item was removed: - ----- Method: VariableNode>>firstInReceivers: (in category '*Etoys-Tweak-Kedama-Generated') ----- - firstInReceivers: t1 - ^ t1 first! Item was removed: - ----- Method: VariableNode>>initialNil (in category '*Etoys-Tweak-Kedama-Generated') ----- - initialNil - ^ nil! Item was removed: - ----- Method: VariableNode>>isStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isStmt: t1 - ^ t1 = #top - or: [t1 = #condition]! Item was removed: - ----- Method: VariableNode>>isTest:parentNode: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTest: t1 parentNode: t2 - t1 = true - ifTrue: [^ true]. - ^ (t2 isMemberOf: MessageNode) - and: [t2 receiver = self - and: [t2 messageType value = #condition]]! Item was removed: - ----- Method: VariableNode>>isTopStmt: (in category '*Etoys-Tweak-Kedama-Generated') ----- - isTopStmt: t1 - t1 = nil - ifTrue: [^ true]. - ^ false! Item was removed: - ----- Method: VariableNode>>rcvr: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rcvr: t1 - ^ t1! Item was removed: - ----- Method: VariableNode>>rewriteVariable:with:rewriteInfo: (in category '*Etoys-Tweak-Kedama-Generated') ----- - rewriteVariable: t1 with: t2 rewriteInfo: t3 - t2 - ifNil: [^ nil]. - t2 first = t1 - ifTrue: [^ t3]. - ^ nil! Item was removed: - ----- Method: VariableNode>>thisNode (in category '*Etoys-Tweak-Kedama-Generated') ----- - thisNode - ^ self! Item was removed: - ----- Method: VariableNode>>transfer: (in category '*Etoys-Tweak-Kedama-Generated') ----- - transfer: t1 - ^ t1! Item was removed: - ----- Method: VariableNode>>variableReceiver: (in category '*Etoys-Tweak-Kedama-Generated') ----- - variableReceiver: t1 - | t2 t3 | - (self key isKindOf: LookupKey) - ifTrue: [^ self key value]. - t3 := self key. - t2 := Compiler new - evaluate: t3 asString - in: nil - to: t1 - notifying: nil - ifFail: [] - logged: false. - ^ t2! From commits at source.squeak.org Fri Sep 30 08:42:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 30 08:42:08 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-tfel.200.mcz Message-ID: Tim Felgentreff uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-tfel.200.mcz ==================== Summary ==================== Name: MorphicExtras-tfel.200 Author: tfel Time: 30 September 2016, 10:41:47.794046 am UUID: 7928bc41-4f8c-164d-b1e2-716d4bdb204e Ancestors: MorphicExtras-tfel.199 remove cached thumbnails from book morph pages before saving them =============== Diff against MorphicExtras-tfel.199 =============== Item was changed: ----- Method: BookMorph>>releaseCachedState (in category 'caching') ----- releaseCachedState "Release the cached state of all my pages." super releaseCachedState. self removeProperty: #allText. "the cache for text search" pages do: [:page | + page == currentPage ifFalse: [page fullReleaseCachedState]. + page removeProperty: #cachedThumbnail].! - page == currentPage ifFalse: [page fullReleaseCachedState]]. - ! From timfelgentreff at gmail.com Fri Sep 30 09:23:35 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Sep 30 09:23:50 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1042.mcz In-Reply-To: <57ecce76.7627c80a.f9d95.9ab2SMTPIN_ADDED_MISSING@mx.google.com> References: <57ecce76.7627c80a.f9d95.9ab2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This breaks compiling EToys scripts when those refer to global classes. I probably don't understand something here, but for context, EToys players are not in the global environment, they create their own otherwise empty environment. On Thu, 29 Sep 2016 at 10:19 wrote: > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-nice.1042.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.1042 > Author: nice > Time: 29 September 2016, 10:15:16.009388 am > UUID: 8923b113-72cf-414e-802c-cef7c50f8ad1 > Ancestors: Kernel-tfel.1041, Kernel-nice.798 > > Merge Kernel-nice.798 (variable scope fix, don't resolve name in > superclass environment) > > Reminder: this requires some Smalltalk exportSelf. > > =============== Diff against Kernel-tfel.1041 =============== > > Item was changed: > ----- Method: Class>>bindingOf:environment: (in category 'compiling') > ----- > bindingOf: varName environment: anEnvironment > "Answer the binding of some variable resolved in the scope of the > receiver" > | aSymbol binding | > aSymbol := varName asSymbol. > > + "First look in local classVar dictionary." > + binding := self classPool bindingOf: aSymbol. > + binding ifNotNil:[^binding]. > - "First look in classVar dictionary." > - (self classThatDefinesClassVariable: aSymbol) ifNotNil: > - [:x | ^x classPool bindingOf: aSymbol]. > > + "Next look in local shared pools." > - "Next look in shared pools." > self sharedPools do:[:pool | > binding := pool bindingOf: aSymbol. > binding ifNotNil:[^binding]. > ]. > > + "Next look into superclass pools" > + superclass ifNotNil: [^ superclass bindingOf: aSymbol environment: > anEnvironment]. > + > + "No more superclass... Last look in declared environment." > + ^anEnvironment bindingOf: aSymbol > - "Next look in declared environment." > - binding := anEnvironment bindingOf: aSymbol. > - binding ifNotNil:[^binding]. > > - "Finally look higher up the superclass chain and fail at the end." > - superclass == nil > - ifTrue: [^ nil] > - ifFalse: [^ superclass bindingOf: aSymbol]. > - > ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160930/d225bd28/attachment.htm From timfelgentreff at gmail.com Fri Sep 30 09:32:09 2016 From: timfelgentreff at gmail.com (Tim Felgentreff) Date: Fri Sep 30 09:32:23 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1042.mcz In-Reply-To: References: <57ecce76.7627c80a.f9d95.9ab2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: The behavior before would look up aSymbol in the environment of the superclass. Now we'll have to import it into the environment of the subclass. Is that the desired new behavior? On Fri, 30 Sep 2016 at 11:23 Tim Felgentreff wrote: > This breaks compiling EToys scripts when those refer to global classes. I > probably don't understand something here, but for context, EToys players > are not in the global environment, they create their own otherwise empty > environment. > > On Thu, 29 Sep 2016 at 10:19 wrote: > >> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-nice.1042.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-nice.1042 >> Author: nice >> Time: 29 September 2016, 10:15:16.009388 am >> UUID: 8923b113-72cf-414e-802c-cef7c50f8ad1 >> Ancestors: Kernel-tfel.1041, Kernel-nice.798 >> >> Merge Kernel-nice.798 (variable scope fix, don't resolve name in >> superclass environment) >> >> Reminder: this requires some Smalltalk exportSelf. >> >> =============== Diff against Kernel-tfel.1041 =============== >> >> Item was changed: >> ----- Method: Class>>bindingOf:environment: (in category 'compiling') >> ----- >> bindingOf: varName environment: anEnvironment >> "Answer the binding of some variable resolved in the scope of the >> receiver" >> | aSymbol binding | >> aSymbol := varName asSymbol. >> >> + "First look in local classVar dictionary." >> + binding := self classPool bindingOf: aSymbol. >> + binding ifNotNil:[^binding]. >> - "First look in classVar dictionary." >> - (self classThatDefinesClassVariable: aSymbol) ifNotNil: >> - [:x | ^x classPool bindingOf: aSymbol]. >> >> + "Next look in local shared pools." >> - "Next look in shared pools." >> self sharedPools do:[:pool | >> binding := pool bindingOf: aSymbol. >> binding ifNotNil:[^binding]. >> ]. >> >> + "Next look into superclass pools" >> + superclass ifNotNil: [^ superclass bindingOf: aSymbol >> environment: anEnvironment]. >> + >> + "No more superclass... Last look in declared environment." >> + ^anEnvironment bindingOf: aSymbol >> - "Next look in declared environment." >> - binding := anEnvironment bindingOf: aSymbol. >> - binding ifNotNil:[^binding]. >> >> - "Finally look higher up the superclass chain and fail at the end." >> - superclass == nil >> - ifTrue: [^ nil] >> - ifFalse: [^ superclass bindingOf: aSymbol]. >> - >> ! >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160930/5bd8b57f/attachment.htm From commits at source.squeak.org Fri Sep 30 09:39:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 30 09:39:27 2016 Subject: [squeak-dev] The Trunk: EToys-tfel.266.mcz Message-ID: Tim Felgentreff uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-tfel.266.mcz ==================== Summary ==================== Name: EToys-tfel.266 Author: tfel Time: 30 September 2016, 11:38:29.998245 am UUID: 984ecc63-aae1-7445-b5ae-8b0f1a83be61 Ancestors: EToys-tfel.265 for now, always compile scripts in the global environment. =============== Diff against EToys-tfel.265 =============== Item was changed: ----- Method: ScriptEncoder>>init:context:notifying: (in category 'as yet unclassified') ----- init: class context: ctxt notifying: parser super init: (CompilationCue source: nil context: ctxt receiver: nil class: class + environment: Smalltalk - environment: class environment requestor: nil) notifying: parser! From Das.Linux at gmx.de Fri Sep 30 10:18:34 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Sep 30 10:18:39 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <6D60EF71-D9DB-4C33-B708-154EC4333F4C@gmx.de> Message-ID: <34684355-27C1-4786-B963-88E78212F163@gmx.de> On 30.09.2016, at 02:02, Frank Shearar wrote: > On 29 September 2016 at 12:19, Tobias Pape wrote: > > On 29.09.2016, at 20:57, Frank Shearar wrote: > > > >> > >> Environment current > >> > >> is parallel to > >> > >> Project current > >> > >> I think this is OK. > >> > >> @Frank, could you elaborate please what you mean with '_delimited > >> dynamic variable_' ? > > > > Well, I like to be precise with my terminology. The tl;dr is that a delimited dynamic variable is just like what other people call a dynamic variable, except it plays nicely with stack slicing. The throw-a-Notification-get-an-answer idiom is exactly equivalent to delimited dynamic variables > > > > http://lists.squeakfoundation.org/pipermail/squeak-dev/2014-February/176777.html has a bit of a conversation around the topic, and has pointers to in-depth articles on delimited dynamic binding, and I've done my small part in trying to dig into the topic here: http://www.lshift.net/blog/2012/06/27/resumable-exceptions-can-macro-express-delimited-dynamic-variables/. > > > > Anyway, the fundamental point I was trying to make is that using a Notification (CurrentEnvironment) is exactly avoiding global state, but it seems I missed the point that you and Nicolas were making, around various things having a #environment property. > > A note: The first time I had seen a dynamic variable was in seaside where > it is/was used for accessing the 'request context' (Being a web framework, this thingy described the HTTP request received by the framework). > > To access that, you call > > self requestContext zork > > in you seaside class, which boils down to > > requestContext > > ^ CurrentRequestContext value > > And CurrentRequestContext being a Dynamic Variable implemented as Notification. > > However, since then, we have merged in the DynamicVariable as ProcessSpecificVariable contributed by Martin von L?wis. > This provides a more efficient way to 'resolve' the DV to a value, because the Notification-based DV needs to peel the stack and re-built it (particularly hurting Cog) whereas the ProcessSpecificVariable-based DV 'just' needs some Dict-lookups in the current Process. > > This is why I like being specific in terminology. Yes, the thing called DynamicVariable in Squeak trunk is a dynamic variable, and not a delimited dynamic variable, which is exactly why you cannot combine using DynamicVariable and stack manipulations. Debugging happens to do said stack manipulations. Ok, I think I understand, but doesn't the [ ] ensure: [] in DynamicVariable class>>value:during: take care of the delimition? > > Yes, the Notification idiom is much less efficient (in its current implementation (*)) than DynamicVariable, but DynamicVariable fundamentally cannot work correctly with stack manipulations. Oleg Kiselyov covers the issue in depth in the various articles linked to from http://okmij.org/ftp/Computation/dynamic-binding.html#DDBinding. > > (*) I would imagine that VM support would allow for efficient delimited dynamic variables, because Henry Baker wrote a whole pile of papers back in the late 70s on the subject (see http://www.pipeline.com/~hbaker1/home.html, for instance "Shallow Binding Makes Functional Arrays Fast". > > frank > > > ======== > > I quite like accessing the current Environment via a dynamic variable, as it exactly provides the control-flow scope that is necessary for this kind of thing. > > We should however adopt a proper DV here, increasing efficiency and readability. > No more 'CurrentEnvironment signal ifNil: [?]' > > but rather > > Object>>environment > > ^ CurrentEnvironment value > > and > > DynamicVariable subclass: #CurrentEnvironment > instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: '...' > and > CurrentEnvironment class>>default > > ^ Smalltalk globals > > and then, for example > > EnvironmentLoader>>evaluate: chunk > > ^ CurrentEnvironment use: environment during: > [Compiler evaluate: chunk environment: environment] > > > (not tested, tho) > > Best regards > -Tobias > > PS: I sometimes call DVs semi-globals. not really global, not really non-global? > > > > From hannes.hirzel at gmail.com Fri Sep 30 11:29:37 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri Sep 30 11:29:40 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments Message-ID: Starting a new thread, culled from the thread 'What are environments for'. There are many more good questions and thoughts in the thread 'What are environments for' but this thread is just about what the subject says: How to create a 'Hello world' example for environments --Hannes On 9/29/16, David T. Lewis wrote: > On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >> On 9/29/16, Jakob Reschke wrote: >> > Hi Nicolas, >> > >> > First, thank you for answering me in the other thread. >> > >> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >> > : >> >> Without clear goals or vision, fixing could essentially mean "let >> >> Environment be transparent", that is let it remain a promise, a >> >> potential, >> >> whithout too many side effects... Not exactly YAGNI, just a bit of >> >> over-engineered nice piece of code that might serve later. OK this >> >> sounds >> >> like a mandatory first step. >> > I don't quite get what you mean by transparent, other than fixing it >> > and enhancing the documentation to shed some light on what it is, why >> > it is there and how to use it. .. ... >> Another maybe simple use case could be to have a project specific >> environment set up when you enter a project >> (http://wiki.squeak.org/squeak/1020). >> >> We now have very nicely cleaned up Project code in Squeak 5.1 >> >> 1) Subclass MorphicProject --- MyMorphicProject >> 2) Subclass PasteUpMorph --- MyPasteUpMorph >> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >> 4) ... some more adaptations ..... to enter a new Environment -- how? >> > > I like this idea a lot. > > I would love to see a simple "hello world!" level example of Environments. > If someone could make an EnvironmentsDemoProject that opens a new project > with > something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', > I think it might really help me to understand how to use Environments. > > Dave So let's focus on a 'hello world' example for environments and do it _slowly_ step by step so that people can catch up with the issues. Outline of steps of a 'Hello world' environments example ============================================= Steps 1. subclass Object with a #Hello class. 2. compile a class method #say the method should write 'Hello' to the Transcript 3. run Hello say The result should be 'Hello' on the Transcript 4. create a new Environment called "myEnvironment". 5. import the Smalltalk environmnet into myEnvironment 6. subclass Object with a #Hello class in myEnvironment 7. compile a method #say the method should write 'Buenas dias' to the Transcript run Hello say Result should be 30-Sept-2016 Starting a new thread, culled from the thread 'What are environments for'. There are many more good questions and thoughts in the thread 'What are environments for' but this thread is just about what the subject says: How to create a 'Hello world' example for environments --Hannes On 9/29/16, David T. Lewis wrote: > On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >> On 9/29/16, Jakob Reschke wrote: >> > Hi Nicolas, >> > >> > First, thank you for answering me in the other thread. >> > >> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >> > : >> >> Without clear goals or vision, fixing could essentially mean "let >> >> Environment be transparent", that is let it remain a promise, a >> >> potential, >> >> whithout too many side effects... Not exactly YAGNI, just a bit of >> >> over-engineered nice piece of code that might serve later. OK this >> >> sounds >> >> like a mandatory first step. >> > I don't quite get what you mean by transparent, other than fixing it >> > and enhancing the documentation to shed some light on what it is, why >> > it is there and how to use it. .. ... >> Another maybe simple use case could be to have a project specific >> environment set up when you enter a project >> (http://wiki.squeak.org/squeak/1020). >> >> We now have very nicely cleaned up Project code in Squeak 5.1 >> >> 1) Subclass MorphicProject --- MyMorphicProject >> 2) Subclass PasteUpMorph --- MyPasteUpMorph >> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >> 4) ... some more adaptations ..... to enter a new Environment -- how? >> > > I like this idea a lot. > > I would love to see a simple "hello world!" level example of Environments. > If someone could make an EnvironmentsDemoProject that opens a new project > with > something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', > I think it might really help me to understand how to use Environments. > > Dave So let's focus on a 'hello world' example for environments and do it _slowly_ step by step so that people can catch up with the issues. Outline of steps of a 'Hello world' environments example ============================================= Steps 1. subclass Object with a #Hello class. 2. compile a class method #say the method should write 'Hello' to the Transcript 3. run Hello say The result should be 'Hello' on the Transcript 4. create a new Environment called "myEnvironment". 5. import the Smalltalk environmnet into myEnvironment 6. subclass Object with a #Hello class in myEnvironment 7. compile a method #say the method should write 'Buenas dias' to the Transcript run Hello say The result should be 'Buenas dias' on the Transcript 8. Leave environment called 'myEnvironment' 9. run Hello say The result should be this time 'Hello' on the Transcript Any comments on these steps? From jakob.reschke at student.hpi.de Fri Sep 30 12:57:08 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Fri Sep 30 12:57:34 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> References: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: Hello, Looks good to me as an outline. I have the following comments, questions or doubts: 1. Currently, for me it does not feel like "entering" or "leaving" an Environment, as that works with dynamic scoping in a block. So step 8 could turn out to be void. 2. Since all of this should go into a workspace, not into the browser, what is the shortest applicable snippet of code that, given a source code string and a class, creates a new method in that class? 3. I am not sure what will happen if you attempt to create a subclass that has the same name as another imported class. Generally, evaluating Superclass subclass: #Subclass ... a second time will replace the former Subclass by the new Subclass. 'myEnvironment' would have imported Hello from Smalltalk globals, so an "old" Hello is already visible. We have to check that evaluating the subclass expression will not try to update that existing Hello class, but create a new one instead. Here, the "shallow" lookup mechanism would be needed. Once I have figured out 2. I will try out and check 3. ;-) Kind regards, Jakob 2016-09-30 13:29 GMT+02:00 H. Hirzel : > Starting a new thread, culled from the thread 'What are environments for'. > > There are many more good questions and thoughts in the thread 'What > are environments for' but this thread is just about what the subject > says: > > How to create a 'Hello world' example for environments > > --Hannes > > On 9/29/16, David T. Lewis wrote: >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >>> On 9/29/16, Jakob Reschke wrote: >>> > Hi Nicolas, >>> > >>> > First, thank you for answering me in the other thread. >>> > >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >>> > : >>> >> Without clear goals or vision, fixing could essentially mean "let >>> >> Environment be transparent", that is let it remain a promise, a >>> >> potential, >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of >>> >> over-engineered nice piece of code that might serve later. OK this >>> >> sounds >>> >> like a mandatory first step. > > >>> > I don't quite get what you mean by transparent, other than fixing it >>> > and enhancing the documentation to shed some light on what it is, why >>> > it is there and how to use it. > .. > ... > >>> Another maybe simple use case could be to have a project specific >>> environment set up when you enter a project >>> (http://wiki.squeak.org/squeak/1020). >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >>> >>> 1) Subclass MorphicProject --- MyMorphicProject >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >>> 4) ... some more adaptations ..... to enter a new Environment -- how? >>> >> >> I like this idea a lot. >> >> I would love to see a simple "hello world!" level example of Environments. >> If someone could make an EnvironmentsDemoProject that opens a new project >> with >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', >> I think it might really help me to understand how to use Environments. >> >> Dave > > So let's focus on a 'hello world' example for environments and do it > _slowly_ step by step so that people can catch up with the issues. > > > > Outline of steps of a 'Hello world' environments example > ============================================= > > Steps > > > 1. subclass Object with a #Hello class. > > 2. compile a class method #say the method should write 'Hello' to the Transcript > > 3. run > Hello say > > The result should be 'Hello' on the Transcript > > > 4. create a new Environment called "myEnvironment". > > 5. import the Smalltalk environmnet into myEnvironment > > 6. subclass Object with a #Hello class in myEnvironment > > 7. compile a method #say the method should write 'Buenas dias' to the Transcript > > run > Hello say > > Result should be > > 30-Sept-2016 > > Starting a new thread, culled from the thread 'What are environments for'. > > There are many more good questions and thoughts in the thread 'What > are environments for' but this thread is just about what the subject > says: > > How to create a 'Hello world' example for environments > > --Hannes > > On 9/29/16, David T. Lewis wrote: >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: >>> On 9/29/16, Jakob Reschke wrote: >>> > Hi Nicolas, >>> > >>> > First, thank you for answering me in the other thread. >>> > >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier >>> > : >>> >> Without clear goals or vision, fixing could essentially mean "let >>> >> Environment be transparent", that is let it remain a promise, a >>> >> potential, >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of >>> >> over-engineered nice piece of code that might serve later. OK this >>> >> sounds >>> >> like a mandatory first step. > > >>> > I don't quite get what you mean by transparent, other than fixing it >>> > and enhancing the documentation to shed some light on what it is, why >>> > it is there and how to use it. > .. > ... > >>> Another maybe simple use case could be to have a project specific >>> environment set up when you enter a project >>> (http://wiki.squeak.org/squeak/1020). >>> >>> We now have very nicely cleaned up Project code in Squeak 5.1 >>> >>> 1) Subclass MorphicProject --- MyMorphicProject >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph >>> 4) ... some more adaptations ..... to enter a new Environment -- how? >>> >> >> I like this idea a lot. >> >> I would love to see a simple "hello world!" level example of Environments. >> If someone could make an EnvironmentsDemoProject that opens a new project >> with >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', >> I think it might really help me to understand how to use Environments. >> >> Dave > > So let's focus on a 'hello world' example for environments and do it > _slowly_ step by step so that people can catch up with the issues. > > > > Outline of steps of a 'Hello world' environments example > ============================================= > > Steps > > > 1. subclass Object with a #Hello class. > > 2. compile a class method #say the method should write 'Hello' to the Transcript > > 3. run > Hello say > > The result should be 'Hello' on the Transcript > > > 4. create a new Environment called "myEnvironment". > > 5. import the Smalltalk environmnet into myEnvironment > > 6. subclass Object with a #Hello class in myEnvironment > > 7. compile a method #say the method should write 'Buenas dias' to the Transcript > > run > Hello say > > The result should be 'Buenas dias' on the Transcript > > > 8. Leave environment called 'myEnvironment' > > > 9. run > Hello say > > The result should be this time 'Hello' on the Transcript > > > > Any comments on these steps? > From nicolas.cellier.aka.nice at gmail.com Fri Sep 30 13:14:06 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Sep 30 13:14:10 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1042.mcz In-Reply-To: References: <57ecce76.7627c80a.f9d95.9ab2SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-09-30 11:32 GMT+02:00 Tim Felgentreff : > The behavior before would look up aSymbol in the environment of the > superclass. Now we'll have to import it into the environment of the > subclass. Is that the desired new behavior? > > Yes please, explicitely import the superclass environment (see #import:). > On Fri, 30 Sep 2016 at 11:23 Tim Felgentreff > wrote: > >> This breaks compiling EToys scripts when those refer to global classes. I >> probably don't understand something here, but for context, EToys players >> are not in the global environment, they create their own otherwise empty >> environment. >> >> On Thu, 29 Sep 2016 at 10:19 wrote: >> >>> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >>> http://source.squeak.org/trunk/Kernel-nice.1042.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Kernel-nice.1042 >>> Author: nice >>> Time: 29 September 2016, 10:15:16.009388 am >>> UUID: 8923b113-72cf-414e-802c-cef7c50f8ad1 >>> Ancestors: Kernel-tfel.1041, Kernel-nice.798 >>> >>> Merge Kernel-nice.798 (variable scope fix, don't resolve name in >>> superclass environment) >>> >>> Reminder: this requires some Smalltalk exportSelf. >>> >>> =============== Diff against Kernel-tfel.1041 =============== >>> >>> Item was changed: >>> ----- Method: Class>>bindingOf:environment: (in category 'compiling') >>> ----- >>> bindingOf: varName environment: anEnvironment >>> "Answer the binding of some variable resolved in the scope of >>> the receiver" >>> | aSymbol binding | >>> aSymbol := varName asSymbol. >>> >>> + "First look in local classVar dictionary." >>> + binding := self classPool bindingOf: aSymbol. >>> + binding ifNotNil:[^binding]. >>> - "First look in classVar dictionary." >>> - (self classThatDefinesClassVariable: aSymbol) ifNotNil: >>> - [:x | ^x classPool bindingOf: aSymbol]. >>> >>> + "Next look in local shared pools." >>> - "Next look in shared pools." >>> self sharedPools do:[:pool | >>> binding := pool bindingOf: aSymbol. >>> binding ifNotNil:[^binding]. >>> ]. >>> >>> + "Next look into superclass pools" >>> + superclass ifNotNil: [^ superclass bindingOf: aSymbol >>> environment: anEnvironment]. >>> + >>> + "No more superclass... Last look in declared environment." >>> + ^anEnvironment bindingOf: aSymbol >>> - "Next look in declared environment." >>> - binding := anEnvironment bindingOf: aSymbol. >>> - binding ifNotNil:[^binding]. >>> >>> - "Finally look higher up the superclass chain and fail at the >>> end." >>> - superclass == nil >>> - ifTrue: [^ nil] >>> - ifFalse: [^ superclass bindingOf: aSymbol]. >>> - >>> ! >>> >>> >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160930/1541fe3d/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Sep 30 16:49:58 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Sep 30 16:50:02 2016 Subject: [squeak-dev] How to create a 'Hello world' example for environments In-Reply-To: References: <1b71c3e63ecf478a96762182f4d3dabd@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: 2016-09-30 14:57 GMT+02:00 Jakob Reschke : > Hello, > > Looks good to me as an outline. I have the following comments, > questions or doubts: > > 1. Currently, for me it does not feel like "entering" or "leaving" an > Environment, as that works with dynamic scoping in a block. So step 8 > could turn out to be void. > > 2. Since all of this should go into a workspace, not into the browser, > what is the shortest applicable snippet of code that, given a source > code string and a class, creates a new method in that class? > > 3. I am not sure what will happen if you attempt to create a subclass > that has the same name as another imported class. Generally, > evaluating Superclass subclass: #Subclass ... a second time will > replace the former Subclass by the new Subclass. 'myEnvironment' would > have imported Hello from Smalltalk globals, so an "old" Hello is > already visible. We have to check that evaluating the subclass > expression will not try to update that existing Hello class, but > create a new one instead. Here, the "shallow" lookup mechanism would > be needed. > > Don't import: Smalltalk globals entirely, just from: Smalltalk globals import: #Transcript. and #Object too, depending in which environment you'll evaluate the message for creating the class... > Once I have figured out 2. I will try out and check 3. ;-) > > Kind regards, > Jakob > > Here is a snippet that works, but is not especially short. | createHelloClass createHelloMethod english spanish | "Straight but verbose code to create a Hello class and compile a say method. There's one trick: Environment current, otherwise Compiler would evaluate in nil class environment, not good" createHelloClass := [Object subclass: #Hello instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Test']. createHelloMethod := [:greeting | | methodSource sourceCode | methodSource := 'say Transcript cr; show: ' , greeting printString. sourceCode := 'Hello class compile: ' , methodSource printString , ' classified: ' , 'test' printString. Compiler evaluate: sourceCode environment: Environment current]. "Create the english and spanish environments" english := Smalltalk globals. spanish := Environment withName: 'Spanish'. spanish importSelf. spanish from: english import: #Transcript. "Create the class and compile the method in each environment:" [createHelloClass value. createHelloMethod value: 'Hello world'] on: CurrentEnvironment do: [:exc | exc resume: english]. [createHelloClass value. createHelloMethod value: 'Buenos dias'] on: CurrentEnvironment do: [:exc | exc resume: spanish]. "Greet" Compiler evaluate: 'Hello say' environment: english. Compiler evaluate: 'Hello say' environment: spanish. Compiler evaluate: 'Hello say' environment: english. "Cleanup" [Compiler evaluate: 'Hello removeFromSystem' environment: Environment current] on: CurrentEnvironment do: [:exc | exc resume: english]. [Compiler evaluate: 'Hello removeFromSystem' environment: Environment current] on: CurrentEnvironment do: [:exc | exc resume: spanish]. Yes, a DynamicVariable: CurrentEnvironment value: english during: ["load something"]. would be nicer than: ["load something"] on: CurrentEnvironment do: [:exc | exc resume: english]. Otherwise we coulf fileIn some chunk format stream thru en EnvironmentLoader for: english... > 2016-09-30 13:29 GMT+02:00 H. Hirzel : > > Starting a new thread, culled from the thread 'What are environments > for'. > > > > There are many more good questions and thoughts in the thread 'What > > are environments for' but this thread is just about what the subject > > says: > > > > How to create a 'Hello world' example for environments > > > > --Hannes > > > > On 9/29/16, David T. Lewis wrote: > >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: > >>> On 9/29/16, Jakob Reschke wrote: > >>> > Hi Nicolas, > >>> > > >>> > First, thank you for answering me in the other thread. > >>> > > >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > >>> > : > >>> >> Without clear goals or vision, fixing could essentially mean "let > >>> >> Environment be transparent", that is let it remain a promise, a > >>> >> potential, > >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of > >>> >> over-engineered nice piece of code that might serve later. OK this > >>> >> sounds > >>> >> like a mandatory first step. > > > > > >>> > I don't quite get what you mean by transparent, other than fixing it > >>> > and enhancing the documentation to shed some light on what it is, why > >>> > it is there and how to use it. > > .. > > ... > > > >>> Another maybe simple use case could be to have a project specific > >>> environment set up when you enter a project > >>> (http://wiki.squeak.org/squeak/1020). > >>> > >>> We now have very nicely cleaned up Project code in Squeak 5.1 > >>> > >>> 1) Subclass MorphicProject --- MyMorphicProject > >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph > >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph > >>> 4) ... some more adaptations ..... to enter a new Environment -- how? > >>> > >> > >> I like this idea a lot. > >> > >> I would love to see a simple "hello world!" level example of > Environments. > >> If someone could make an EnvironmentsDemoProject that opens a new > project > >> with > >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', > >> I think it might really help me to understand how to use Environments. > >> > >> Dave > > > > So let's focus on a 'hello world' example for environments and do it > > _slowly_ step by step so that people can catch up with the issues. > > > > > > > > Outline of steps of a 'Hello world' environments example > > ============================================= > > > > Steps > > > > > > 1. subclass Object with a #Hello class. > > > > 2. compile a class method #say the method should write 'Hello' to the > Transcript > > > > 3. run > > Hello say > > > > The result should be 'Hello' on the Transcript > > > > > > 4. create a new Environment called "myEnvironment". > > > > 5. import the Smalltalk environmnet into myEnvironment > > > > 6. subclass Object with a #Hello class in myEnvironment > > > > 7. compile a method #say the method should write 'Buenas dias' to the > Transcript > > > > run > > Hello say > > > > Result should be > > > > 30-Sept-2016 > > > > Starting a new thread, culled from the thread 'What are environments > for'. > > > > There are many more good questions and thoughts in the thread 'What > > are environments for' but this thread is just about what the subject > > says: > > > > How to create a 'Hello world' example for environments > > > > --Hannes > > > > On 9/29/16, David T. Lewis wrote: > >> On Thu, Sep 29, 2016 at 07:51:23AM +0200, H. Hirzel wrote: > >>> On 9/29/16, Jakob Reschke wrote: > >>> > Hi Nicolas, > >>> > > >>> > First, thank you for answering me in the other thread. > >>> > > >>> > 2016-09-28 23:02 GMT+02:00 Nicolas Cellier > >>> > : > >>> >> Without clear goals or vision, fixing could essentially mean "let > >>> >> Environment be transparent", that is let it remain a promise, a > >>> >> potential, > >>> >> whithout too many side effects... Not exactly YAGNI, just a bit of > >>> >> over-engineered nice piece of code that might serve later. OK this > >>> >> sounds > >>> >> like a mandatory first step. > > > > > >>> > I don't quite get what you mean by transparent, other than fixing it > >>> > and enhancing the documentation to shed some light on what it is, why > >>> > it is there and how to use it. > > .. > > ... > > > >>> Another maybe simple use case could be to have a project specific > >>> environment set up when you enter a project > >>> (http://wiki.squeak.org/squeak/1020). > >>> > >>> We now have very nicely cleaned up Project code in Squeak 5.1 > >>> > >>> 1) Subclass MorphicProject --- MyMorphicProject > >>> 2) Subclass PasteUpMorph --- MyPasteUpMorph > >>> 3) Override #initialize in MyMorphicProject and use MyPasteUpMorph > >>> 4) ... some more adaptations ..... to enter a new Environment -- how? > >>> > >> > >> I like this idea a lot. > >> > >> I would love to see a simple "hello world!" level example of > Environments. > >> If someone could make an EnvironmentsDemoProject that opens a new > project > >> with > >> something that changes Duck>>speak ==> 'quack' to Duck>>speak ==> 'moo', > >> I think it might really help me to understand how to use Environments. > >> > >> Dave > > > > So let's focus on a 'hello world' example for environments and do it > > _slowly_ step by step so that people can catch up with the issues. > > > > > > > > Outline of steps of a 'Hello world' environments example > > ============================================= > > > > Steps > > > > > > 1. subclass Object with a #Hello class. > > > > 2. compile a class method #say the method should write 'Hello' to the > Transcript > > > > 3. run > > Hello say > > > > The result should be 'Hello' on the Transcript > > > > > > 4. create a new Environment called "myEnvironment". > > > > 5. import the Smalltalk environmnet into myEnvironment > > > > 6. subclass Object with a #Hello class in myEnvironment > > > > 7. compile a method #say the method should write 'Buenas dias' to the > Transcript > > > > run > > Hello say > > > > The result should be 'Buenas dias' on the Transcript > > > > > > 8. Leave environment called 'myEnvironment' > > > > > > 9. run > > Hello say > > > > The result should be this time 'Hello' on the Transcript > > > > > > > > Any comments on these steps? > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160930/36b8639a/attachment.htm From asqueaker at gmail.com Fri Sep 30 21:36:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri Sep 30 21:37:13 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: >> I don't like the idea of CurrentEnvironment at all. IMO global state >> stinks. >> It would mean that a lotta behavior would change by simply switching one >> shared variable... >> I see it more like a not so clever workaround to make tools still work in >> presence of environments with minimal changes. > > > Global state does indeed stink, which is why Environments is so nice, > because "global" isn't global anymore. This deserves some qualification. Its true that writable globals stink, you never know what state its going to be in, and updating it introduces contention, etc. However, Class names don't suddenly point to a different class object within the context of a running application, and no one ever replaces Smalltalk with a new instance. These globals are just "there" -- read-only bindings which don't suffer the stinky issues associated with writable globals. I'm glad Nicolas started the other thread asking "what's it for?" To me, that's the most important question -- is there something actually truly useful gained in exchange for complicating the language and tools? Is it only about everyone being able to have elegant, prefix-less class names all loaded into one image? Most of the use-cases mentioned in this and the other threads were just "cool ways to handle a one-off problem." For the real world, we have been wanting smaller, more modular images. The conditions of having less code and responsibility in those smaller images bodes them less likely to benefit from Environments. Multiple small images passing messages over the network lets those Smalltalk applications run on multiple processor cores, compared to one monolithic image with all the code loaded and disambiguated via a hierarchy of Environment imports/exports and running on just one process core. In 15 years, I think I've had just one name collision between classes of different packages (neither of which used prefixes). I think I simply renamed one of them. Dynamic system. With Environments, I would still have had to write some code to do various imports/exports/renames, etc.. and so it doesn't actually save me any development effort. I guess it boils down to letting me keep pretty, but ambiguous, names in the code. But, I actually prefer prefixes... Not trying to be a party pooper, but complexity is commonplace, simplicity is rare. If we still have a simple system, we should value that aspect and try to keep it that way. At least _optionally_... Best, Chris From commits at source.squeak.org Fri Sep 30 21:55:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Sep 30 21:55:06 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160930215503.25076.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-September/068986.html Name: EToys-tfel.265 Ancestors: EToys-tfel.264 - remove the old KedamaVectorizer class - remove all autogenerated methods - make it so that any user defined script call to a turtle forces the surrounding conditionals be sequentially executed. this can be optimized further, but considering we'll rewrite this entire thing anyway, it might not be worth it right now. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068987.html Name: MorphicExtras-tfel.200 Ancestors: MorphicExtras-tfel.199 remove cached thumbnails from book morph pages before saving them ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-September/068988.html Name: EToys-tfel.266 Ancestors: EToys-tfel.265 for now, always compile scripts in the global environment. ============================================= From jakob.reschke at student.hpi.de Fri Sep 30 23:02:27 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Fri Sep 30 23:02:55 2016 Subject: [squeak-dev] Environment declarations vs bindings In-Reply-To: <144bc6e315ae458fbb9db72bc1c7d8ff@MX2015-DAG2.hpi.uni-potsdam.de> References: <7d6a8675d46348b0b59f25d7d1bdf847@MX2015-DAG2.hpi.uni-potsdam.de> <3eaa1fc280184f8fa49d7555b0da97c4@MX2015-DAG2.hpi.uni-potsdam.de> <144bc6e315ae458fbb9db72bc1c7d8ff@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: I suppose nobody of us wants throw everything over and force Environments onto it. All of this is about opportunities that were available if Environments could actually be used and operated intuitively, right? I, too, think that you should not have to care about Environments if you do not want to. Though, it might be neccessary or advantageous in some uncommon cases, some of which we have collected already. Some code, however, like the loading facilities of Monticello, currently seem to not play very well together with Environments (because of the access to the Smalltalk dictionary, how that is implemented in Environment, and the dynamic binding issue). But if you cannot load/install something into an Environment and if there are no (additional) tools to put code into an Environment and then run it, then how are you supposed to make use of the feature? Now that I formulated it that way, I think somebody claimed to already use Environments for something at some point in another, older discussion. I would like to know how they did it, given Environments' current state. If you only refer to the dynamic Environment issue with your comment about added complexity, an alternate solution would possibly be to add explicit environment parameters to all facilities that would need them and that do not have them yet (thinking of Monticello again). But that seems even more invasive to me and it bloats interfaces if you also want to keep the existing environment-agnostic interface, which we certainly want to do. Kind regards, Jakob 2016-09-30 23:36 GMT+02:00 Chris Muller : >>> I don't like the idea of CurrentEnvironment at all. IMO global state >>> stinks. >>> It would mean that a lotta behavior would change by simply switching one >>> shared variable... >>> I see it more like a not so clever workaround to make tools still work in >>> presence of environments with minimal changes. >> >> >> Global state does indeed stink, which is why Environments is so nice, >> because "global" isn't global anymore. > > This deserves some qualification. Its true that writable globals > stink, you never know what state its going to be in, and updating it > introduces contention, etc. However, Class names don't suddenly point > to a different class object within the context of a running > application, and no one ever replaces Smalltalk with a new instance. > These globals are just "there" -- read-only bindings which don't > suffer the stinky issues associated with writable globals. > > I'm glad Nicolas started the other thread asking "what's it for?" To > me, that's the most important question -- is there something actually > truly useful gained in exchange for complicating the language and > tools? Is it only about everyone being able to have elegant, > prefix-less class names all loaded into one image? Most of the > use-cases mentioned in this and the other threads were just "cool ways > to handle a one-off problem." > > For the real world, we have been wanting smaller, more modular images. > The conditions of having less code and responsibility in those smaller > images bodes them less likely to benefit from Environments. Multiple > small images passing messages over the network lets those Smalltalk > applications run on multiple processor cores, compared to one > monolithic image with all the code loaded and disambiguated via a > hierarchy of Environment imports/exports and running on just one > process core. > > In 15 years, I think I've had just one name collision between classes > of different packages (neither of which used prefixes). I think I > simply renamed one of them. Dynamic system. With Environments, I > would still have had to write some code to do various > imports/exports/renames, etc.. and so it doesn't actually save me any > development effort. I guess it boils down to letting me keep pretty, > but ambiguous, names in the code. But, I actually prefer prefixes... > > Not trying to be a party pooper, but complexity is commonplace, > simplicity is rare. If we still have a simple system, we should value > that aspect and try to keep it that way. At least _optionally_... > > Best, > Chris >